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

214 lines
14 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.
*/
/*
* EsignApi.h
*
*
*/
#ifndef HANZO_API_EsignApi_H_
#define HANZO_API_EsignApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/EsignCompletion.h"
#include "hanzo/model/EsignDocument.h"
#include "hanzo/model/EsignDocuments.h"
#include "hanzo/model/EsignFieldIn.h"
#include "hanzo/model/EsignHealth.h"
#include "hanzo/model/EsignInsertion.h"
#include "hanzo/model/EsignInvite.h"
#include "hanzo/model/EsignLinks.h"
#include "hanzo/model/EsignPDF.h"
#include "hanzo/model/EsignPlacement.h"
#include "hanzo/model/EsignRecipientIn.h"
#include "hanzo/model/EsignRejectIn.h"
#include "hanzo/model/EsignRejection.h"
#include "hanzo/model/EsignSession.h"
#include "hanzo/model/EsignTrail.h"
#include "hanzo/model/EsignUploadIn.h"
#include "hanzo/model/EsignValueIn.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class EsignApi
{
public:
explicit EsignApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~EsignApi();
/// <summary>
/// Returns your org&#39;s documents, newest first.
/// </summary>
/// <remarks>
/// Returns your org&#39;s documents, newest first. Each carries its status, recipients and field layout. The listing is capped at 200 and there is no paging, so treat it as the recent window rather than a complete export. It reads the caller&#39;s own tenant store, so no other org&#39;s documents can appear in it.
/// </remarks>
pplx::task<std::shared_ptr<EsignDocuments>> getEsignDocuments(
) const;
/// <summary>
/// Returns one document with its recipients and field layout.
/// </summary>
/// <remarks>
/// Returns one document with its recipients and field layout. It answers the document, its recipients with each one&#39;s read and signing status, and every field with its type, page and position — the view a sender&#39;s UI renders, and where the field ids come from. The id is resolved in the caller&#39;s OWN tenant store, so another org&#39;s document id is a 404 rather than a refusal that would confirm it exists.
/// </remarks>
/// <param name="id">ID is the document to act on. It is the path segment: the URL is the addressing authority, and the org it is resolved in comes from the caller&#39;s principal, so an id belonging to another tenant is simply not found.</param>
pplx::task<std::shared_ptr<EsignDocument>> getEsignDocumentsById(
utility::string_t id
) const;
/// <summary>
/// Returns the document&#39;s full audit trail, oldest first.
/// </summary>
/// <remarks>
/// Returns the document&#39;s full audit trail, oldest first. It answers every recorded event for the document in order — created, recipient added, field created, sent, opened, each field inserted, each recipient completed or rejected, and completion — with the actor and timestamp on each. This is the evidence record behind a signature, so it is append-only and nothing in the surface edits it. The id is resolved in the caller&#39;s OWN tenant store, so another org&#39;s document id is a 404.
/// </remarks>
/// <param name="id">ID is the document to act on. It is the path segment: the URL is the addressing authority, and the org it is resolved in comes from the caller&#39;s principal, so an id belonging to another tenant is simply not found.</param>
pplx::task<std::shared_ptr<EsignTrail>> getEsignDocumentsByIdAudit(
utility::string_t id
) const;
/// <summary>
/// Returns the document — the sealed PDF once it is complete.
/// </summary>
/// <remarks>
/// Returns the document — the sealed PDF once it is complete. It answers the document&#39;s current PDF as base64 with a sealed flag and a filename. Before completion that is the original upload; once every signer has finished it is the SEALED artifact, with the field values rendered onto the page and a real x509 PKCS#7 digital signature applied. There is one pdfBase64 field either way, so sealed is what tells you which you are holding. The id is resolved in the caller&#39;s OWN tenant store, so another org&#39;s document id is a 404.
/// </remarks>
/// <param name="id">ID is the document to act on. It is the path segment: the URL is the addressing authority, and the org it is resolved in comes from the caller&#39;s principal, so an id belonging to another tenant is simply not found.</param>
pplx::task<std::shared_ptr<EsignPDF>> getEsignDocumentsByIdDownload(
utility::string_t id
) const;
/// <summary>
/// Reports whether the e-signature surface is mounted.
/// </summary>
/// <remarks>
/// Reports whether the e-signature surface is mounted. It answers ok whenever the subsystem is mounted, takes no tenant and needs no principal. It is deliberately shallow: it is registered before the document host is built, so it still answers on a deployment that came up WITHOUT object storage and therefore serves nothing else. Read it as reachability, never as a promise that documents can be stored.
/// </remarks>
pplx::task<std::shared_ptr<EsignHealth>> getEsignHealth(
) const;
/// <summary>
/// Opens a document you were asked to sign, using your signing link.
/// </summary>
/// <remarks>
/// Opens a document you were asked to sign, using your signing link. It answers the document, the recipient the link identifies, the fields THAT recipient must fill, and the PDF to display. The first open also marks the recipient as having opened it and records that on the audit trail, so this read has a side effect by design. This surface takes NO account: the signing token is the entire credential, and it names the recipient, so a signer sees only their own fields and never the other recipients&#39; tokens. The token resolves to its owning tenant FIRST, before any per-tenant store is opened, and the org segment is only checked against that answer. An unknown or wrong-org token is one and the same 404, never a hint that some other document exists.
/// </remarks>
/// <param name="org"></param>
/// <param name="token"></param>
pplx::task<std::shared_ptr<EsignSession>> getEsignOByOrgSignByToken(
utility::string_t org,
utility::string_t token
) const;
/// <summary>
/// Uploads a PDF and opens a draft ready for recipients and fields.
/// </summary>
/// <remarks>
/// Uploads a PDF and opens a draft ready for recipients and fields. It answers 201 with the document in DRAFT — the state where recipients and fields may still be added, and the only state they may. The bytes go to object storage rather than into the tenant database, and the original is kept under its own key so it survives sealing untouched: a completed document can always be compared against what was uploaded. Creation is recorded on the audit trail. This is the sender&#39;s surface: a validated principal is required, and the document lands in that principal&#39;s OWN org. Isolation is physical rather than a filter — each tenant has its own store — so another org&#39;s document id is simply not there. A body over 32 MiB is refused with 413.
/// </remarks>
/// <param name="esignUploadIn"></param>
pplx::task<std::shared_ptr<EsignDocument>> postEsignDocuments(
std::shared_ptr<EsignUploadIn> esignUploadIn
) const;
/// <summary>
/// Places a field on the page for one recipient to fill.
/// </summary>
/// <remarks>
/// Places a field on the page for one recipient to fill. It adds a signature, date, name, email or text box at a page and position for ONE named recipient, and answers 201 with its id. The recipient must belong to this document; one from elsewhere is refused. Fields are what make a recipient signable: a document cannot be sent while any signing recipient has none. Only while DRAFT — adding a field to a sent document is a 409 — and an unknown document is a 404. The addition is recorded on the audit trail.
/// </remarks>
/// <param name="id"></param>
/// <param name="esignFieldIn"></param>
pplx::task<std::shared_ptr<EsignPlacement>> postEsignDocumentsByIdFields(
utility::string_t id,
std::shared_ptr<EsignFieldIn> esignFieldIn
) const;
/// <summary>
/// Adds someone to a draft and mints their signing token.
/// </summary>
/// <remarks>
/// Adds someone to a draft and mints their signing token. It answers 201 with the recipient&#39;s id and their signing TOKEN — the crypto-random capability that is the only credential the signer&#39;s surface accepts — so this response is where the signing link is built from. A CC recipient is recorded as already complete, because they are never asked to sign. Only while DRAFT: adding a recipient to a document already sent is a 409, because the field layout and the turn order were fixed when it went out. An unknown document is a 404. The addition is recorded on the audit trail.
/// </remarks>
/// <param name="id"></param>
/// <param name="esignRecipientIn"></param>
pplx::task<std::shared_ptr<EsignInvite>> postEsignDocumentsByIdRecipients(
utility::string_t id,
std::shared_ptr<EsignRecipientIn> esignRecipientIn
) const;
/// <summary>
/// Sends the document out and answers each signer&#39;s link.
/// </summary>
/// <remarks>
/// Sends the document out and answers each signer&#39;s link. It moves the document from DRAFT to PENDING and answers the signing tokens — one per signing recipient, with the path to hand them — which is how the links reach the people who must sign. Nothing is emailed by this call; delivering the links is the caller&#39;s. It refuses to send an unsignable document: no recipients at all is a 400, and so is any signing recipient with no fields to fill, named in the error. Re-sending an already-pending document is allowed and re-issues the same links rather than restarting anything; a completed document is a 409, and an unknown one a 404. The send is recorded on the audit trail.
/// </remarks>
/// <param name="id">ID is the document to send. The URL is the addressing authority.</param>
pplx::task<std::shared_ptr<EsignLinks>> postEsignDocumentsByIdSend(
utility::string_t id
) const;
/// <summary>
/// Finishes your signing — and seals the document if you were the last.
/// </summary>
/// <remarks>
/// Finishes your signing — and seals the document if you were the last. It marks this recipient as done and answers whether the DOCUMENT sealed with it. When every signing recipient has completed, sealing happens right here in the same call: the collected values are rendered onto the PDF, a real x509 PKCS#7 signature is applied, the sealed bytes are stored beside the untouched original, and the document moves to COMPLETED. Until then the answer is the recipient&#39;s own completion with the document still pending. It refuses to complete a half-filled signature: a recipient with any unfilled field is a 400 naming how many remain. A document not out for signature is a 409, as is a recipient who has already completed, and under SEQUENTIAL order a signer out of turn is a 403. The token is the whole credential — no account, and a token that does not resolve under the org segment is a 404. Sealing and completion are one transaction, so a failure anywhere leaves the document exactly as it was.
/// </remarks>
/// <param name="org"></param>
/// <param name="token"></param>
pplx::task<std::shared_ptr<EsignCompletion>> postEsignOByOrgSignByTokenComplete(
utility::string_t org,
utility::string_t token
) const;
/// <summary>
/// Fills in one of your fields.
/// </summary>
/// <remarks>
/// Fills in one of your fields. It records a value for one field and marks it inserted. A signature field takes a value with isBase64 true for drawn image bytes, or false for a typed signature; a date, name or email field falls back to today, the recipient&#39;s name or their email when the value is omitted; any other type requires one. Nothing is sealed here — filling every field still leaves the document pending until the completion call. The token is the whole credential and it bounds what can be written: a field belonging to another recipient is refused with 401 even under a valid token, an unknown field is a 404, and a field already filled is a 409. A document not out for signature is a 409, as is a recipient who has already completed or rejected. Under SEQUENTIAL order a signer whose turn has not come is refused 403 until every earlier signer has signed. Each insertion is recorded on the audit trail.
/// </remarks>
/// <param name="org"></param>
/// <param name="token"></param>
/// <param name="fieldId"></param>
/// <param name="esignValueIn"></param>
pplx::task<std::shared_ptr<EsignInsertion>> postEsignOByOrgSignByTokenFieldsByFieldid(
utility::string_t org,
utility::string_t token,
utility::string_t fieldId,
std::shared_ptr<EsignValueIn> esignValueIn
) const;
/// <summary>
/// Declines to sign, with an optional reason.
/// </summary>
/// <remarks>
/// Declines to sign, with an optional reason. It records this recipient&#39;s refusal and moves the WHOLE DOCUMENT to REJECTED — one declining signer ends it for everyone, and there is no route back: the document cannot then be signed or completed. An optional reason is stored and written onto the audit trail with the rejection, which is what the sender sees. A document not out for signature is a 409, and so is a recipient who has already signed or already rejected — a refusal cannot be taken back or repeated. The token is the whole credential; one that does not resolve under the org segment is a 404.
/// </remarks>
/// <param name="org"></param>
/// <param name="token"></param>
/// <param name="esignRejectIn"></param>
pplx::task<std::shared_ptr<EsignRejection>> postEsignOByOrgSignByTokenReject(
utility::string_t org,
utility::string_t token,
std::shared_ptr<EsignRejectIn> esignRejectIn
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_EsignApi_H_ */