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

175 lines
11 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.
*/
/*
* LegalApi.h
*
*
*/
#ifndef HANZO_API_LegalApi_H_
#define HANZO_API_LegalApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/DocumentPage.h"
#include "hanzo/model/DocumentReply.h"
#include "hanzo/model/FilingPage.h"
#include "hanzo/model/FilingReply.h"
#include "hanzo/model/FilingRequest.h"
#include "hanzo/model/GenerateRequest.h"
#include "hanzo/model/LegalHealth.h"
#include "hanzo/model/SignReply.h"
#include "hanzo/model/SignRequest.h"
#include "hanzo/model/TemplateCatalog.h"
#include "hanzo/model/TemplateOverride.h"
#include "hanzo/model/TemplateReply.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class LegalApi
{
public:
explicit LegalApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~LegalApi();
/// <summary>
/// Returns the org&#39;s generated documents, newest first, WITHOUT their rendered content — fetch one document to read its body.
/// </summary>
/// <remarks>
/// Returns the org&#39;s generated documents, newest first, WITHOUT their rendered content — fetch one document to read its body. The response is marked no-store: these records name the counterparties an org is contracting with, and must not sit in a shared cache.
/// </remarks>
/// <param name="limit">Limit bounds the page. Absent or unparseable means the store&#39;s own default. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<DocumentPage>> getLegalDocuments(
boost::optional<int64_t> limit
) const;
/// <summary>
/// Returns one of the org&#39;s documents WITH its rendered body.
/// </summary>
/// <remarks>
/// Returns one of the org&#39;s documents WITH its rendered body. 404 when the org has no document with that id — a document is never readable across orgs. The response is marked no-store: the body is contract text, sealed at rest and returned only to the owning org, and must not sit in a shared cache.
/// </remarks>
/// <param name="id">ID is the document&#39;s server-minted handle, \&quot;doc_\&quot;-prefixed.</param>
pplx::task<std::shared_ptr<DocumentReply>> getLegalDocumentsById(
utility::string_t id
) const;
/// <summary>
/// Returns the org&#39;s filing records, newest first — which documents were filed where, through which provider, and what the filing&#39;s honest status is.
/// </summary>
/// <remarks>
/// Returns the org&#39;s filing records, newest first — which documents were filed where, through which provider, and what the filing&#39;s honest status is.
/// </remarks>
/// <param name="limit">Limit bounds the page. Absent or unparseable means the store&#39;s own default. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<FilingPage>> getLegalFilings(
boost::optional<int64_t> limit
) const;
/// <summary>
/// Reports that the legal subsystem is serving and how many built-in templates its catalog carries.
/// </summary>
/// <remarks>
/// Reports that the legal subsystem is serving and how many built-in templates its catalog carries. It reads no tenant, so a liveness prober that sends no principal is answered rather than refused.
/// </remarks>
pplx::task<std::shared_ptr<LegalHealth>> getLegalHealth(
) const;
/// <summary>
/// Returns the org&#39;s effective template catalog: every built-in template, with any the org has overridden replaced by its own latest version.
/// </summary>
/// <remarks>
/// Returns the org&#39;s effective template catalog: every built-in template, with any the org has overridden replaced by its own latest version. The listing carries each template&#39;s metadata and its declared MERGE FIELDS — the keys a document generation must supply — but never the template bodies; fetch one template to get its body. Templates in the formation and equity categories are marked counselReview: every document rendered from them carries a counsel notice, and that posture cannot be dropped by an override.
/// </remarks>
pplx::task<std::shared_ptr<TemplateCatalog>> getLegalTemplates(
) const;
/// <summary>
/// Returns one template resolved for the caller&#39;s org — the org&#39;s own override if it has saved one, else the built-in — with its full text/template body and its declared merge fields.
/// </summary>
/// <remarks>
/// Returns one template resolved for the caller&#39;s org — the org&#39;s own override if it has saved one, else the built-in — with its full text/template body and its declared merge fields. 404 when neither exists.
/// </remarks>
/// <param name="id">ID is the template&#39;s stable id, e.g. \&quot;nda\&quot; or \&quot;safe\&quot;.</param>
pplx::task<std::shared_ptr<TemplateReply>> getLegalTemplatesById(
utility::string_t id
) const;
/// <summary>
/// Renders a document from a template and the caller&#39;s own merge data, seals it in the org&#39;s store, and returns it with its rendered body.
/// </summary>
/// <remarks>
/// Renders a document from a template and the caller&#39;s own merge data, seals it in the org&#39;s store, and returns it with its rendered body. The render is PURE and deterministic — no clock, no I/O — so the same template version and the same data always produce identical bytes, which is what makes a generated contract reproducible. It fails CLOSED on a missing merge field: there is no blank-filled contract, only a 400 naming the fields that were absent. When the template is counsel-review the rendered body opens with the counsel notice, which no caller can suppress. The document is a DRAFT. Hanzo Legal manages documents; it does not give legal advice and does not determine that a document is valid or sufficient.
/// </remarks>
/// <param name="generateRequest"></param>
pplx::task<std::shared_ptr<DocumentReply>> postLegalDocuments(
std::shared_ptr<GenerateRequest> generateRequest
) const;
/// <summary>
/// Opens an e-signature request over one document and moves it to out_for_signature, returning the provider&#39;s reference for the request.
/// </summary>
/// <remarks>
/// Opens an e-signature request over one document and moves it to out_for_signature, returning the provider&#39;s reference for the request. The provider is whatever this deployment has wired. The honest default is \&quot;manual\&quot;: the request is recorded and the org fulfils it out of band — nothing here fabricates a signature, and the stub never reports itself complete.
/// </remarks>
/// <param name="id">ID is the document to send for signature, from the path.</param>
/// <param name="signRequest"></param>
pplx::task<std::shared_ptr<SignReply>> postLegalDocumentsByIdSign(
utility::string_t id,
std::shared_ptr<SignRequest> signRequest
) const;
/// <summary>
/// Record that a generated document&#39;s signature request completed
/// </summary>
/// <remarks>
/// Records completion of the signature request opened over a generated document and answers the document with a &#x60;signed&#x60; flag. The e-sign provider&#39;s own status is consulted FIRST and is the default answer; an explicit &#x60;signed&#x60; field in the body overrides it. That override is the whole point: the default &#x60;manual&#x60; provider never self-completes, so a reviewer (or a real provider&#39;s webhook) is what moves the document. A completion flips the document to &#x60;signed&#x60;, stamps &#x60;signedAt&#x60;, and writes a &#x60;legal.document.signed&#x60; audit event; a provider still reporting incomplete answers 200 with the document unchanged, so the call is safe to repeat and never fabricates a signature. Org-scoped and fails closed: a validated principal is required (403 without one), the document is read under the caller&#39;s OWN org so another tenant&#39;s id is a 404, a document with no open signature request is a 400, and a provider whose status call errors is a 502.
/// </remarks>
/// <param name="id"></param>
pplx::task<void> postLegalDocumentsByIdSignComplete(
utility::string_t id
) const;
/// <summary>
/// Records a filing of one or more of the org&#39;s documents with a state or agency, and returns the tracking record.
/// </summary>
/// <remarks>
/// Records a filing of one or more of the org&#39;s documents with a state or agency, and returns the tracking record. It is a TRACKING record, not an autonomous filing. With no filing partner wired the honest status is \&quot;manual\&quot; and the note says so: the documents were generated for signature, and the org files them through its registered agent. Nothing here invents a filing id it does not have. Every document id must belong to the caller&#39;s org; one that does not is a 404 naming it, so a filing can never reach across tenants.
/// </remarks>
/// <param name="filingRequest"></param>
pplx::task<std::shared_ptr<FilingReply>> postLegalFilings(
std::shared_ptr<FilingRequest> filingRequest
) const;
/// <summary>
/// Saves the org&#39;s own version of a template — a custom NDA, a house MSA — and returns it with its new version number.
/// </summary>
/// <remarks>
/// Saves the org&#39;s own version of a template — a custom NDA, a house MSA — and returns it with its new version number. It takes effect for that org only; other orgs keep the built-in. Two boundaries cannot be crossed here. Overriding a built-in INHERITS its category and its counsel-review posture, which can be raised but never dropped; and a formation or equity template is counsel-review whatever the caller sends, so no org can generate a securities-class document without the notice. The body is validated on save, not at generation: a template that references an UNDECLARED merge field is refused with 400 rather than stored and rendered blank into a contract months later.
/// </remarks>
/// <param name="id">ID is the template to override, from the path. Overriding a built-in id inherits that built-in&#39;s category, title and counsel-review posture.</param>
/// <param name="templateOverride"></param>
pplx::task<std::shared_ptr<TemplateReply>> putLegalTemplatesById(
utility::string_t id,
std::shared_ptr<TemplateOverride> templateOverride
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_LegalApi_H_ */