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.
175 lines
11 KiB
C++
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's generated documents, newest first, WITHOUT their rendered content — fetch one document to read its body.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the org'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'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's documents WITH its rendered body.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns one of the org'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's server-minted handle, \"doc_\"-prefixed.</param>
|
|
pplx::task<std::shared_ptr<DocumentReply>> getLegalDocumentsById(
|
|
utility::string_t id
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the org's filing records, newest first — which documents were filed where, through which provider, and what the filing's honest status is.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the org's filing records, newest first — which documents were filed where, through which provider, and what the filing's honest status is.
|
|
/// </remarks>
|
|
/// <param name="limit">Limit bounds the page. Absent or unparseable means the store'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'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'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'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's org — the org'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's org — the org'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's stable id, e.g. \"nda\" or \"safe\".</param>
|
|
pplx::task<std::shared_ptr<TemplateReply>> getLegalTemplatesById(
|
|
utility::string_t id
|
|
) const;
|
|
/// <summary>
|
|
/// Renders a document from a template and the caller's own merge data, seals it in the org's store, and returns it with its rendered body.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Renders a document from a template and the caller's own merge data, seals it in the org'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'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's reference for the request. The provider is whatever this deployment has wired. The honest default is \"manual\": 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's signature request completed
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Records completion of the signature request opened over a generated document and answers the document with a `signed` flag. The e-sign provider's own status is consulted FIRST and is the default answer; an explicit `signed` field in the body overrides it. That override is the whole point: the default `manual` provider never self-completes, so a reviewer (or a real provider's webhook) is what moves the document. A completion flips the document to `signed`, stamps `signedAt`, and writes a `legal.document.signed` 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's OWN org so another tenant'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's documents with a state or agency, and returns the tracking record.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Records a filing of one or more of the org'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 \"manual\" 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'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'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'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'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_ */
|
|
|