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

236 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.
*/
/*
* ComplianceApi.h
*
*
*/
#ifndef HANZO_API_ComplianceApi_H_
#define HANZO_API_ComplianceApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/AccList.h"
#include "hanzo/model/AccView.h"
#include "hanzo/model/AccreditationDecision.h"
#include "hanzo/model/AccreditationReq.h"
#include "hanzo/model/AuditList.h"
#include "hanzo/model/CheckList.h"
#include "hanzo/model/CheckView.h"
#include "hanzo/model/HealthView.h"
#include "hanzo/model/RecordList.h"
#include "hanzo/model/StatusView.h"
#include "hanzo/model/Subject.h"
#include "hanzo/model/SubjectList.h"
#include "hanzo/model/SubjectReq.h"
#include "hanzo/model/VerificationDecision.h"
#include "hanzo/model/VerificationReq.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class ComplianceApi
{
public:
explicit ComplianceApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~ComplianceApi();
/// <summary>
/// Returns the org&#39;s tracked accreditation-state records, newest first — evidence entries the org keeps, never a platform certification.
/// </summary>
/// <remarks>
/// Returns the org&#39;s tracked accreditation-state records, newest first — evidence entries the org keeps, never a platform certification.
/// </remarks>
/// <param name="limit">Limit caps the rows returned; non-positive means the server default. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<AccList>> getComplianceAccreditation(
boost::optional<int64_t> limit
) const;
/// <summary>
/// Returns one tracked accreditation record.
/// </summary>
/// <remarks>
/// Returns one tracked accreditation record.
/// </remarks>
/// <param name="id">ID is the accreditation record to read, from the path.</param>
pplx::task<std::shared_ptr<AccView>> getComplianceAccreditationById(
utility::string_t id
) const;
/// <summary>
/// AuditRead is the compliance read of the SHARED tamper-evident audit plane — the SOC 2 posture surface (privileged actions: who started/decided what, when).
/// </summary>
/// <remarks>
/// AuditRead is the compliance read of the SHARED tamper-evident audit plane — the SOC 2 posture surface (privileged actions: who started/decided what, when). The org is PINNED to the caller&#39;s validated org and the rows are narrowed to compliance.* actions. Fail-closed: no principal is a 403, no configured audit store a 501.
/// </remarks>
/// <param name="result">Result filters rows by outcome result: success, deny, or error; empty means all. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
pplx::task<std::shared_ptr<AuditList>> getComplianceAudit(
boost::optional<utility::string_t> result
) const;
/// <summary>
/// Health reports subsystem liveness and the wired verification provider.
/// </summary>
/// <remarks>
/// Health reports subsystem liveness and the wired verification provider. Fail-open on purpose: it never probes the external provider, so a provider outage cannot fail liveness.
/// </remarks>
pplx::task<std::shared_ptr<HealthView>> getComplianceHealth(
) const;
/// <summary>
/// ListRecords is the unified compliance-record view for the org: its verifications and accreditation records together, each provider-reported or tracked, never platform-asserted.
/// </summary>
/// <remarks>
/// ListRecords is the unified compliance-record view for the org: its verifications and accreditation records together, each provider-reported or tracked, never platform-asserted. PII stays in the subject store; records carry only opaque ids and statuses.
/// </remarks>
/// <param name="limit">Limit caps the rows returned; non-positive means the server default. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<RecordList>> getComplianceRecords(
boost::optional<int64_t> limit
) const;
/// <summary>
/// Status is the org&#39;s honest posture read: the wired provider and the per-status tally of its verifications.
/// </summary>
/// <remarks>
/// Status is the org&#39;s honest posture read: the wired provider and the per-status tally of its verifications. It is deliberately NOT a boolean \&quot;compliant\&quot; — it reports counts of provider-reported states and carries the boundary disclaimer.
/// </remarks>
pplx::task<std::shared_ptr<StatusView>> getComplianceStatus(
) const;
/// <summary>
/// Returns the org&#39;s subjects as PII-MINIMIZED summaries — no name or email, only whether an email is on file.
/// </summary>
/// <remarks>
/// Returns the org&#39;s subjects as PII-MINIMIZED summaries — no name or email, only whether an email is on file. The full record is returned only by the explicit single-subject read.
/// </remarks>
/// <param name="limit">Limit caps the rows returned; non-positive means the server default. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<SubjectList>> getComplianceSubjects(
boost::optional<int64_t> limit
) const;
/// <summary>
/// Returns one subject WITH its contact PII — the only surface that returns it, and only to the owning org.
/// </summary>
/// <remarks>
/// Returns one subject WITH its contact PII — the only surface that returns it, and only to the owning org. The response is never cached by any intermediary.
/// </remarks>
/// <param name="id">ID is the subject to read, from the path.</param>
pplx::task<std::shared_ptr<Subject>> getComplianceSubjectsById(
utility::string_t id
) const;
/// <summary>
/// Returns the org&#39;s KYC/KYB verifications, newest first — opaque subject references and provider-reported statuses only, no subject PII.
/// </summary>
/// <remarks>
/// Returns the org&#39;s KYC/KYB verifications, newest first — opaque subject references and provider-reported statuses only, no subject PII.
/// </remarks>
/// <param name="limit">Limit caps the rows returned; non-positive means the server default. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<CheckList>> getComplianceVerifications(
boost::optional<int64_t> limit
) const;
/// <summary>
/// Returns one verification — its opaque subject reference and provider-reported status, no subject PII.
/// </summary>
/// <remarks>
/// Returns one verification — its opaque subject reference and provider-reported status, no subject PII.
/// </remarks>
/// <param name="id">ID is the verification to act on, from the path.</param>
pplx::task<std::shared_ptr<CheckView>> getComplianceVerificationsById(
utility::string_t id
) const;
/// <summary>
/// Records an ASSERTED accreditation state for a subject — the subject&#39;s own assertion, with no verifier.
/// </summary>
/// <remarks>
/// Records an ASSERTED accreditation state for a subject — the subject&#39;s own assertion, with no verifier. Every CONFIRMED state (provider_verified, reviewer_confirmed) and every rejected/expired state is a DECISION recorded via the decision endpoint, attributed to the reviewer — a create can never stamp a confirmation. The underlying figures (income, net worth) are never stored; only the method, category, and state.
/// </remarks>
/// <param name="accreditationReq"></param>
pplx::task<std::shared_ptr<AccView>> postComplianceAccreditation(
std::shared_ptr<AccreditationReq> accreditationReq
) const;
/// <summary>
/// Records an org reviewer&#39;s decision on an accreditation record — a reviewer confirmation, a provider verification the reviewer has evidence of (a CPA/attorney letter, a verifier report), a rejection, or an expiry.
/// </summary>
/// <remarks>
/// Records an org reviewer&#39;s decision on an accreditation record — a reviewer confirmation, a provider verification the reviewer has evidence of (a CPA/attorney letter, a verifier report), a rejection, or an expiry. ROLE-GATED (an org admin or platform reviewer) and ATTRIBUTED: the reviewer&#39;s identity is recorded as ReviewerSub and audited. Human-in-the-loop: the platform never confirms on its own, and even a provider_verified state carries the reviewer who recorded it.
/// </remarks>
/// <param name="id">ID is the accreditation record to decide, from the path.</param>
/// <param name="accreditationDecision"></param>
pplx::task<std::shared_ptr<AccView>> postComplianceAccreditationByIdDecision(
utility::string_t id,
std::shared_ptr<AccreditationDecision> accreditationDecision
) const;
/// <summary>
/// Records a party the org is verifying as part of its own onboarding/compliance — a team member, vendor, customer, or counterparty.
/// </summary>
/// <remarks>
/// Records a party the org is verifying as part of its own onboarding/compliance — a team member, vendor, customer, or counterparty. The subject&#39;s contact PII (name/email) is sealed at rest and returned only to the owning org; downstream records reference the subject by opaque id.
/// </remarks>
/// <param name="subjectReq"></param>
pplx::task<std::shared_ptr<Subject>> postComplianceSubjects(
std::shared_ptr<SubjectReq> subjectReq
) const;
/// <summary>
/// Begins a KYC/KYB verification of a subject through the wired provider — an existing subject by id, or one created inline from the request.
/// </summary>
/// <remarks>
/// Begins a KYC/KYB verification of a subject through the wired provider — an existing subject by id, or one created inline from the request. The returned status is provider-reported and never terminal on a fresh start: starting a verification can never yield a verified record, and a provider error is a 502, never a verification.
/// </remarks>
/// <param name="verificationReq"></param>
pplx::task<std::shared_ptr<CheckView>> postComplianceVerifications(
std::shared_ptr<VerificationReq> verificationReq
) const;
/// <summary>
/// Records a privileged reviewer&#39;s MANUAL decision on a verification — the human-in-the-loop path, and the ONLY route to a passing status when no real provider is wired.
/// </summary>
/// <remarks>
/// Records a privileged reviewer&#39;s MANUAL decision on a verification — the human-in-the-loop path, and the ONLY route to a passing status when no real provider is wired. It produces a DISTINCT reviewer_confirmed, never a provider_verified (a provider decision is the provider&#39;s to report, via the webhook or a reconcile), and it is ROLE-GATED (an org admin or platform reviewer) AND ATTRIBUTED (the reviewer&#39;s user id is DecidedBy), so a manual pass is always accountable.
/// </remarks>
/// <param name="id">ID is the verification to decide, from the path.</param>
/// <param name="verificationDecision"></param>
pplx::task<std::shared_ptr<CheckView>> postComplianceVerificationsByIdDecision(
utility::string_t id,
std::shared_ptr<VerificationDecision> verificationDecision
) const;
/// <summary>
/// Polls the wired provider for its current decision and records it, ATTRIBUTED to the provider — the internal PULL reconcile.
/// </summary>
/// <remarks>
/// Polls the wired provider for its current decision and records it, ATTRIBUTED to the provider — the internal PULL reconcile. For the Manual provider the check stays pending; for a hosted provider it reflects the provider&#39;s settled status. A poll error is a 502, never a verification.
/// </remarks>
/// <param name="id">ID is the verification to act on, from the path.</param>
pplx::task<std::shared_ptr<CheckView>> postComplianceVerificationsByIdRefresh(
utility::string_t id
) const;
/// <summary>
/// Provider push that settles a verification, authenticated by HMAC signature
/// </summary>
/// <remarks>
/// The external PUSH reconcile: a verification provider (or a Hanzo relay) signals that a check settled, and the reconciled check comes back. It authenticates by an HMAC SIGNATURE over the RAW body bytes rather than by a principal — an external caller has no validated org — and the org is then resolved FROM the record the signed provider reference matches, so a call can only ever touch the one tenant that owns that reference. The body carries NO trusted decision. A valid signature cannot force a status: the reference only says WHICH check to re-read, and the status is then pulled from the wired provider, which stays the source of truth. With no real provider configured a check stays pending, and the only route to a passing status is the role-gated, attributed reviewer decision. An unknown reference is a benign 200 &#x60;{\&quot;ignored\&quot;: ...}&#x60; no-op, not an error, so a provider replaying stale events neither retry-storms nor learns whether a reference exists in some other tenant. Fails closed otherwise: 501 unless a webhook secret is configured, 401 on a signature that does not verify, 400 with no provider reference, 413 over 1 MiB, and 502 if the secret or the provider is unreachable.
/// </remarks>
pplx::task<void> postComplianceVerificationsWebhook(
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_ComplianceApi_H_ */