Files
zeekay 645325a641 regenerate from cloud 939b09d4
The projection was 113 commits behind the document it claims to describe, and
`generate.py --all --check` reported every one of the thirteen clients DRIFTED —
the same +19 models in each, because they all fell behind the same emission.

Regenerated in place from hanzo-inc/cloud openapi.yaml at 939b09d4
(sha256 087024f6…), which is the only description of this API that cannot name a
route the binary does not serve. `--check` is clean across all thirteen after.

.spec-lock moved with the code. The generator READS that file and never writes
it — hanzoai/ci`s lane does — so a hand run leaves every lock naming the previous
document. A lock that disagrees with the tree beside it is worse than no lock:
the next `--check` without `--spec` fetches what production serves, compares it
to a digest that was already wrong, and reports drift that is really staleness.
2026-08-24 23:32:53 -07:00

118 lines
5.1 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.
*/
/*
* SyncApi.h
*
*
*/
#ifndef HANZO_API_SyncApi_H_
#define HANZO_API_SyncApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/PatchSyncIn.h"
#include "hanzo/model/SyncList.h"
#include "hanzo/model/SyncQueued.h"
#include "hanzo/model/SyncReq.h"
#include "hanzo/model/SyncView.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class SyncApi
{
public:
explicit SyncApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~SyncApi();
/// <summary>
/// Delete removes one sync and tears down the outbound mirror it derived, answering 204.
/// </summary>
/// <remarks>
/// Delete removes one sync and tears down the outbound mirror it derived, answering 204. The teardown is the point: without it an unsynced repository would keep force-pushing to the upstream it is no longer linked to. Org-scoped, so another tenant&#39;s id is the same 404 an unknown id gives.
/// </remarks>
/// <param name="id">ID is the sync to act on, from the path.</param>
pplx::task<void> deleteSyncById(
utility::string_t id
) const;
/// <summary>
/// List returns every sync link the caller&#39;s org has, each with its two endpoints, its direction and trigger policy, and the time it last reconciled.
/// </summary>
/// <remarks>
/// List returns every sync link the caller&#39;s org has, each with its two endpoints, its direction and trigger policy, and the time it last reconciled. Scoped to the caller&#39;s own org — another tenant&#39;s links are structurally unreachable.
/// </remarks>
pplx::task<std::shared_ptr<SyncList>> getSync(
) const;
/// <summary>
/// Get returns one sync by id.
/// </summary>
/// <remarks>
/// Get returns one sync by id. It is org-scoped: an id belonging to another tenant is the same 404 an unknown id gives, so a probe learns nothing about what exists.
/// </remarks>
/// <param name="id">ID is the sync to act on, from the path.</param>
pplx::task<std::shared_ptr<SyncView>> getSyncById(
utility::string_t id
) const;
/// <summary>
/// Patch updates one sync&#39;s mutable policy — direction, trigger and actor — in place.
/// </summary>
/// <remarks>
/// Patch updates one sync&#39;s mutable policy — direction, trigger and actor — in place. The endpoints and the kind are immutable: re-pointing a sync is a delete and a create, so a link can never silently start syncing somewhere else. A field the request omits is left as it was. Changing the direction immediately reconciles the derived outbound mirror, so turning push off stops the upstream being written to rather than merely recording the intent.
/// </remarks>
/// <param name="id">ID is the sync to update, from the path.</param>
/// <param name="patchSyncIn"></param>
pplx::task<std::shared_ptr<SyncView>> patchSyncById(
utility::string_t id,
std::shared_ptr<PatchSyncIn> patchSyncIn
) const;
/// <summary>
/// Create declares a sync between two endpoints and returns it.
/// </summary>
/// <remarks>
/// Create declares a sync between two endpoints and returns it. It is an UPSERT: re-declaring the same source and target updates that link rather than piling up duplicates, so a console that re-submits is safe. The org comes from the validated principal, never from the request, so a sync can only ever bind endpoints inside the caller&#39;s own org. A git source must be an https clone URL on the provider&#39;s own host with no embedded credentials; a target left empty is derived as a native repository named after the source. With run&#x3D;true the first reconcile is queued in the background, so a large initial import never blocks this response.
/// </remarks>
/// <param name="syncReq"></param>
pplx::task<std::shared_ptr<SyncView>> postSync(
std::shared_ptr<SyncReq> syncReq
) const;
/// <summary>
/// Run reconciles one sync now — the manual re-sync, and the initial import for a link created without run&#x3D;true.
/// </summary>
/// <remarks>
/// Run reconciles one sync now — the manual re-sync, and the initial import for a link created without run&#x3D;true. The work is handed to a bounded background worker and the call answers 202 immediately, so a large mirror-in never holds the request open; queued&#x3D;true means accepted, not finished.
/// </remarks>
/// <param name="id">ID is the sync to act on, from the path.</param>
pplx::task<std::shared_ptr<SyncQueued>> postSyncByIdRun(
utility::string_t id
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_SyncApi_H_ */