mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection these were generated from was a month old and predated the compute migration, so every one of them described /v1/visor — which the API serves at zero paths now. That is why a hand-written console client and a generated one had drifted the same way at the same time. No /v1/visor path survives here. The word still appears as a source-plane value and inside gvisor and supervisor, which are not this rename.
237 lines
21 KiB
C++
237 lines
21 KiB
C++
/**
|
|
* Hanzo Cloud API
|
|
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
*
|
|
* The version of the OpenAPI document: v1
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* TodoApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_TodoApi_H_
|
|
#define HANZO_API_TodoApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/IssueEdit.h"
|
|
#include "hanzo/model/IssueHit.h"
|
|
#include "hanzo/model/IssueHits.h"
|
|
#include "hanzo/model/IssueView.h"
|
|
#include "hanzo/model/NewIssue.h"
|
|
#include "hanzo/model/RoomWork.h"
|
|
#include "hanzo/model/TodoProject.h"
|
|
#include <vector>
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class TodoApi
|
|
{
|
|
public:
|
|
|
|
explicit TodoApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~TodoApi();
|
|
|
|
/// <summary>
|
|
/// Refused — a board is a repository on the forge
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Answers 405. A todo board IS a repository on this deployment's forge, so creating, renaming and deleting one is a FORGE operation carried out with FORGE permissions. Offering it here would put a second endpoint on the same object, guarded by this surface instead of by the forge — a weaker guard on the same thing. So the route exists and refuses, rather than 404ing: \"not this service's job\" and \"no such thing\" are different facts, and the body names the forge so a caller knows where the job IS done. What this surface DOES own is the work on a board: list the boards you can see, read and file their issues, move a card between columns, and read the schedule a milestone is. Those are the routes beside this one.
|
|
/// </remarks>
|
|
/// <param name="key"></param>
|
|
pplx::task<void> deleteTodoProjectsByKey(
|
|
utility::string_t key
|
|
) const;
|
|
/// <summary>
|
|
/// Returns a board's issues — work items with their column, priority, assignee, labels and schedule.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns a board's issues — work items with their column, priority, assignee, labels and schedule. WHICH board is a filter, not an address. Bound to a repository (the key from the path) it is that project's board; left unbound it is the org's whole board; narrowed by label it is a board smaller than any repository — which is the only way an app that lives as a directory inside a shared repository can have one. Every combination is the same rows through the same projection, so no two boards can disagree about what a column means. The column is a LABEL on the forge, so the board and the forge web UI are the same object seen twice: relabelling in either moves the card in both. A closed issue reads as done whatever its labels say.
|
|
/// </remarks>
|
|
/// <param name="key">Key is the project whose issues to list, from the path. EMPTY means every project in the org — the global board. It is a filter like the rest of this struct rather than an address, which is what lets one op answer both \"this board\" and \"all the work\" without a second surface disagreeing with the first about what a column is. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="status">Status keeps only issues in that board column: backlog, todo, in_progress, done or canceled. An unknown value is refused with 400. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="kind">Kind keeps only work items of that shape: issue, pr or epic. An unknown value is refused with 400. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="repo">Repo keeps only issues bound to that git repository. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="label">Label keeps only issues carrying that label, compared case-insensitively. This is how a board narrows to something SMALLER than a repository — the one mechanism for it. An estate whose apps are directories inside one repository (hanzoai/cloud carries ~140 of them) has no repository per app to address, so the app is a label: `label=app/meet` is the meet board. Nothing is provisioned to make one exist; a board is the query. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="source">Source keeps only issues opened from that surface: team, git, crm, helpdesk, cms or agent. An unknown value is refused with 400. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="scheduled">Scheduled keeps only issues that carry a date — a start, a due date or both. This is the timeline's slice of the board: pass scheduled=true to get exactly the rows a gantt has somewhere to draw, instead of fetching every issue and discarding the undated ones client-side. (optional, default to false)</param>
|
|
pplx::task<std::vector<std::shared_ptr<IssueView>>> getTodoBoard(
|
|
boost::optional<utility::string_t> key,
|
|
boost::optional<utility::string_t> status,
|
|
boost::optional<utility::string_t> kind,
|
|
boost::optional<utility::string_t> repo,
|
|
boost::optional<utility::string_t> label,
|
|
boost::optional<utility::string_t> source,
|
|
boost::optional<bool> scheduled
|
|
) const;
|
|
/// <summary>
|
|
/// Answers across every project in the org.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Answers across every project in the org. The org comes from the validated principal and never from the request: a caller able to name the org could read another tenant's backlog, and a search is exactly the shape that would quietly return it.
|
|
/// </remarks>
|
|
/// <param name="q">Q matches an issue's title or description. A word from the issue, which is what someone remembers — not its number, which is what they are looking up. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="project">Project narrows to one team key; \"\" searches every project in the org, which is the point of this op. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="status">Status keeps one board column: backlog, todo, in_progress, done, canceled. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="kind">Kind keeps one shape: issue, pr, epic. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="repo">Repo keeps issues bound to one git repository. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="room">Room keeps issues bound to one collaboration room, spelled \"<space>_<room>\" — the exact value GET /v1/meet/call answers with, so a channel's call and its todo list name the room the same way. This is the read a channel view runs to draw its own list; it spans every board of the org, because the work a channel is about is not confined to one board. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="source">Source keeps one origin: team, git, crm, helpdesk, cms, agent. \"git\" is how you ask for the mirrored GitHub issues specifically. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="assignee">Assignee keeps issues held by one person. Pass \"me\" for yourself. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="limit">Limit caps the answer; 0 means the default, and anything above the ceiling is clamped rather than refused — a search that errors on being too broad teaches people to guess. (optional, default to 0L)</param>
|
|
pplx::task<std::shared_ptr<IssueHits>> getTodoIssues(
|
|
boost::optional<utility::string_t> q,
|
|
boost::optional<utility::string_t> project,
|
|
boost::optional<utility::string_t> status,
|
|
boost::optional<utility::string_t> kind,
|
|
boost::optional<utility::string_t> repo,
|
|
boost::optional<utility::string_t> room,
|
|
boost::optional<utility::string_t> source,
|
|
boost::optional<utility::string_t> assignee,
|
|
boost::optional<int64_t> limit
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the boards of your org — the places your work actually is.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the boards of your org — the places your work actually is. The key addresses the board's issues. A BOARD IS A PLACE WORK IS, not an object somebody provisioned. So the list is assembled from the work itself: the repositories your org has filed issues on, plus the boards the index holds. A repository with nothing on it is not in the list and is still perfectly addressable — GET /projects/<name> reads it and a create files into it — so nothing is lost by leaving it out. Measured, which is why: reading the forge's whole repository inventory put 745 boards here, of which all but a handful were vendored forks and mirrors (.github, .profile, DOMPurify, BoatAttack) that will never carry this org's work. A list that long is not a list — the estate's real roadmap was in it somewhere and no one could see it. The forge half is the FORGE's answer for your own account, so two people in one org can legitimately see different boards.
|
|
/// </remarks>
|
|
pplx::task<std::vector<std::shared_ptr<TodoProject>>> getTodoProjects(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns one board of your org by its key — the repository name.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns one board of your org by its key — the repository name. 404 when your org has no repository under that key, or when your own forge account cannot see it.
|
|
/// </remarks>
|
|
/// <param name="key">Key is the project's org-unique handle: 2-8 uppercase alphanumerics starting with a letter (\"ENG\", \"OPS2\"). Matched case-insensitively.</param>
|
|
pplx::task<std::shared_ptr<TodoProject>> getTodoProjectsByKey(
|
|
utility::string_t key
|
|
) const;
|
|
/// <summary>
|
|
/// Returns a board's issues — work items with their column, priority, assignee, labels and schedule.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns a board's issues — work items with their column, priority, assignee, labels and schedule. WHICH board is a filter, not an address. Bound to a repository (the key from the path) it is that project's board; left unbound it is the org's whole board; narrowed by label it is a board smaller than any repository — which is the only way an app that lives as a directory inside a shared repository can have one. Every combination is the same rows through the same projection, so no two boards can disagree about what a column means. The column is a LABEL on the forge, so the board and the forge web UI are the same object seen twice: relabelling in either moves the card in both. A closed issue reads as done whatever its labels say.
|
|
/// </remarks>
|
|
/// <param name="key">Key is the project whose issues to list, from the path. EMPTY means every project in the org — the global board. It is a filter like the rest of this struct rather than an address, which is what lets one op answer both \"this board\" and \"all the work\" without a second surface disagreeing with the first about what a column is.</param>
|
|
/// <param name="status">Status keeps only issues in that board column: backlog, todo, in_progress, done or canceled. An unknown value is refused with 400. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="kind">Kind keeps only work items of that shape: issue, pr or epic. An unknown value is refused with 400. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="repo">Repo keeps only issues bound to that git repository. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="label">Label keeps only issues carrying that label, compared case-insensitively. This is how a board narrows to something SMALLER than a repository — the one mechanism for it. An estate whose apps are directories inside one repository (hanzoai/cloud carries ~140 of them) has no repository per app to address, so the app is a label: `label=app/meet` is the meet board. Nothing is provisioned to make one exist; a board is the query. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="source">Source keeps only issues opened from that surface: team, git, crm, helpdesk, cms or agent. An unknown value is refused with 400. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="scheduled">Scheduled keeps only issues that carry a date — a start, a due date or both. This is the timeline's slice of the board: pass scheduled=true to get exactly the rows a gantt has somewhere to draw, instead of fetching every issue and discarding the undated ones client-side. (optional, default to false)</param>
|
|
pplx::task<std::vector<std::shared_ptr<IssueView>>> getTodoProjectsByKeyIssues(
|
|
utility::string_t key,
|
|
boost::optional<utility::string_t> status,
|
|
boost::optional<utility::string_t> kind,
|
|
boost::optional<utility::string_t> repo,
|
|
boost::optional<utility::string_t> label,
|
|
boost::optional<utility::string_t> source,
|
|
boost::optional<bool> scheduled
|
|
) const;
|
|
/// <summary>
|
|
/// Returns ONE work item in full — its description included.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns ONE work item in full — its description included. The list reads answer a board, and a board is a summary: the description is where the actual content of a work item lives — what an issue asks for, what an epic's acceptance criteria are — and no read on this surface returned it. The address is the one PATCH already accepts, so an item you can move is now an item you can read. It reads the forge directly rather than filtering the org fan-out, then falls back to the index for a board the forge has never heard of — the same order, and the same reason, as GetProject: a row is one kind of thing however it came to exist, so a caller does not have to know which store it is in to fetch it.
|
|
/// </remarks>
|
|
/// <param name="key">Key is the board — the repository name, or an index board's key.</param>
|
|
/// <param name="num">Num is the issue's number on that board.</param>
|
|
pplx::task<std::shared_ptr<IssueView>> getTodoProjectsByKeyIssuesByNum(
|
|
utility::string_t key,
|
|
int64_t num
|
|
) const;
|
|
/// <summary>
|
|
/// Summarises one room's work.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Summarises one room's work. The room is opaque here and is deliberately not resolved: this package cannot say whether a room exists — apps/team owns that document — so an unknown room answers an EMPTY board rather than a 404. That is the honest answer and the useful one: a channel that has never had an item filed in it and a channel id that was mistyped both have no work, and inventing a distinction would require this surface to hold a second copy of the room list (HIP-0523 §2 forbids it, and it would drift the first time a room was renamed). Tenancy is the validated principal's org and nothing else, so a caller cannot read another tenant's channel by naming its room.
|
|
/// </remarks>
|
|
/// <param name="room">Room is the room, spelled \"<space>_<room>\" — the same value GET /v1/meet/call answers with, so a channel's call and its work name the room identically. From the path.</param>
|
|
pplx::task<std::shared_ptr<RoomWork>> getTodoRoomsByRoom(
|
|
utility::string_t room
|
|
) const;
|
|
/// <summary>
|
|
/// Refused — a board is a repository on the forge
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Answers 405. A todo board IS a repository on this deployment's forge, so creating, renaming and deleting one is a FORGE operation carried out with FORGE permissions. Offering it here would put a second endpoint on the same object, guarded by this surface instead of by the forge — a weaker guard on the same thing. So the route exists and refuses, rather than 404ing: \"not this service's job\" and \"no such thing\" are different facts, and the body names the forge so a caller knows where the job IS done. What this surface DOES own is the work on a board: list the boards you can see, read and file their issues, move a card between columns, and read the schedule a milestone is. Those are the routes beside this one.
|
|
/// </remarks>
|
|
/// <param name="key"></param>
|
|
pplx::task<void> patchTodoProjectsByKey(
|
|
utility::string_t key
|
|
) const;
|
|
/// <summary>
|
|
/// Edits a work item — rename it, rewrite it, move it to another column, or re-prioritise it.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Edits a work item — rename it, rewrite it, move it to another column, or re-prioritise it. Absent fields are left alone. MOVING A CARD IS A RELABEL. The column lives in the forge's label set, so the move replaces that set rather than writing a status column here that a forge-side change could contradict. Moving to `done` also CLOSES the issue on the forge, because a done card and an open issue are a contradiction.
|
|
/// </remarks>
|
|
/// <param name="key">Key is the board — the repository name, from the path.</param>
|
|
/// <param name="num">Num is the issue number on that repository, from the path.</param>
|
|
/// <param name="issueEdit"></param>
|
|
pplx::task<std::shared_ptr<IssueView>> patchTodoProjectsByKeyIssuesByNum(
|
|
utility::string_t key,
|
|
int64_t num,
|
|
std::shared_ptr<IssueEdit> issueEdit
|
|
) const;
|
|
/// <summary>
|
|
/// Refused — a board is a repository on the forge
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Answers 405. A todo board IS a repository on this deployment's forge, so creating, renaming and deleting one is a FORGE operation carried out with FORGE permissions. Offering it here would put a second endpoint on the same object, guarded by this surface instead of by the forge — a weaker guard on the same thing. So the route exists and refuses, rather than 404ing: \"not this service's job\" and \"no such thing\" are different facts, and the body names the forge so a caller knows where the job IS done. What this surface DOES own is the work on a board: list the boards you can see, read and file their issues, move a card between columns, and read the schedule a milestone is. Those are the routes beside this one.
|
|
/// </remarks>
|
|
pplx::task<void> postTodoProjects(
|
|
) const;
|
|
/// <summary>
|
|
/// Opens a work item on the board — an issue on that repository on the deployment's forge, filed as YOU.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Opens a work item on the board — an issue on that repository on the deployment's forge, filed as YOU. The column and priority are written as LABELS, which is what makes the card and the forge issue the same object: someone relabelling in the forge web UI has moved your card.
|
|
/// </remarks>
|
|
/// <param name="key">Key is the board — the repository name, from the path.</param>
|
|
/// <param name="newIssue"></param>
|
|
pplx::task<std::shared_ptr<IssueView>> postTodoProjectsByKeyIssues(
|
|
utility::string_t key,
|
|
std::shared_ptr<NewIssue> newIssue
|
|
) const;
|
|
/// <summary>
|
|
/// Takes an issue: it becomes yours and it moves to in_progress.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Takes an issue: it becomes yours and it moves to in_progress. The holder is the CALLER, never an argument. \"Assign this to someone else\" is a different act with different authority, and it already exists as a PATCH; conflating them would let anyone hand work to anyone by naming them. Claiming something already held by someone else is refused rather than silently taken — two agents on one issue is the failure this prevents, and a claim that quietly wins a race is worse than one that says no.
|
|
/// </remarks>
|
|
/// <param name="key"></param>
|
|
/// <param name="num"></param>
|
|
pplx::task<std::shared_ptr<IssueHit>> postTodoProjectsByKeyIssuesByNumClaim(
|
|
utility::string_t key,
|
|
int64_t num
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_TodoApi_H_ */
|
|
|