Files
zeekay 189ce08e51 Regenerate against the document the deployment answers for
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.
2026-09-05 18:07:13 -07:00

99 lines
5.3 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.
*/
/*
* BotApi.h
*
*
*/
#ifndef HANZO_API_BotApi_H_
#define HANZO_API_BotApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/BotRoster.h"
#include "hanzo/model/BotRuns.h"
#include "hanzo/model/BotStopped.h"
#include "hanzo/model/BotSync.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class BotApi
{
public:
explicit BotApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~BotApi();
/// <summary>
/// Returns the caller org&#39;s bots as space members — each with the member account uuid and the Person reference the roster addresses it by.
/// </summary>
/// <remarks>
/// Returns the caller org&#39;s bots as space members — each with the member account uuid and the Person reference the roster addresses it by. A deployment that runs no team subsystem has no spaces and therefore no roster, which is an empty list rather than an error: ErrNoPeer is the ONE error that means \&quot;this deployment does not run that app\&quot;, and every other failure is an outage and says so.
/// </remarks>
pplx::task<std::shared_ptr<BotRoster>> getBotMembers(
) const;
/// <summary>
/// List returns the caller org&#39;s live bot runs, read from the bot runtime and projected into the console contract with each run&#39;s live session URL derived here.
/// </summary>
/// <remarks>
/// List returns the caller org&#39;s live bot runs, read from the bot runtime and projected into the console contract with each run&#39;s live session URL derived here. The org is ALWAYS the validated principal&#39;s org, NEVER a request field, and it is what scopes the runtime&#39;s answer — so one tenant can never enumerate another&#39;s runs. A runtime that cannot answer is an error, not an empty list: [] would tell the caller \&quot;your org has no runs\&quot;, which is a different claim from \&quot;we could not ask\&quot;, and the difference is the whole reason this endpoint exists.
/// </remarks>
pplx::task<std::shared_ptr<BotRuns>> getBotRuns(
) const;
/// <summary>
/// Re-projects the caller org&#39;s bots as members into every space of the org and removes the ones whose agent is gone.
/// </summary>
/// <remarks>
/// Re-projects the caller org&#39;s bots as members into every space of the org and removes the ones whose agent is gone. Idempotent, and admin only — the admin bit rides the caller to team, which is what decides it.
/// </remarks>
pplx::task<std::shared_ptr<BotSync>> postBotMembersSync(
) const;
/// <summary>
/// Answers 501 to every call: launching a bot run is not implemented.
/// </summary>
/// <remarks>
/// Answers 501 to every call: launching a bot run is not implemented. The bot runtime exposes no launch operation, so nothing here can start a sandbox. This address is published rather than dropped because it is the collection every run is created in: GET lists them, POST would launch one. The refusal is total and takes no input. No run id is minted, no session URL is handed back, and no per-run fee is charged. That is the point: the earlier version minted an id the runtime had never heard of, pointed it at a VNC node that did not exist, and took real money for it. 501 is the truth, and the truth is cheaper than a plausible lie. Listing and stopping runs are live and org-scoped. Only the launch is missing, and it returns in the same change that can prove a bot boots — a runtime-side launch operation first (TS, cross-repo), with the entitlement gate and the meter beside it.
/// </remarks>
pplx::task<void> postBotRuns(
) const;
/// <summary>
/// Stop terminates one of the caller org&#39;s own bot runs and reports its terminal state.
/// </summary>
/// <remarks>
/// Stop terminates one of the caller org&#39;s own bot runs and reports its terminal state. The own-key guard is the org: it is the caller&#39;s validated org, never theirs to choose, and the runtime resolves the run id UNDER it. A run belonging to another tenant is not among this org&#39;s runs, so it answers absent — the same 404 a nonexistent id gets, which is what keeps this from being an oracle. Absence is honoured ONLY when the runtime answers it. A runtime that does not serve stop reports nothing about the run, and reporting \&quot;stopped\&quot; on that basis would be a stop that cannot fail — so it is a 502.
/// </remarks>
/// <param name="runId">RunID is the run to stop, as the bot runtime named it. It is read from the URL — the &#x60;{runId}&#x60; segment the router matched on — and a body carrying a different id cannot redirect the stop.</param>
pplx::task<std::shared_ptr<BotStopped>> postBotRunsByRunidStop(
utility::string_t runId
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_BotApi_H_ */