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

80 lines
4.2 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.
*/
/*
* GatewayApi.h
*
*
*/
#ifndef HANZO_API_GatewayApi_H_
#define HANZO_API_GatewayApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/Policy.h"
#include "hanzo/model/TrafficView.h"
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class GatewayApi
{
public:
explicit GatewayApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~GatewayApi();
/// <summary>
/// Report who is calling this org&#39;s API right now
/// </summary>
/// <remarks>
/// Traffic reports who is calling this organization&#39;s API right now: the request count for the last minute split by AGENCY LANE — agent, human, bot, unknown — and the busiest callers behind it, each with its request count, its authentication-failure count, how many distinct paths it touched, and any verdict currently held against it. The lane split is the answer to the question a generic bot filter cannot answer: which of this traffic is the customer&#39;s own automation and which is somebody working through a list. It is computed from credentials we issued, not from the client&#39;s self-description, so a scraper cannot move itself into the agent lane by editing a header. A validated caller appears as a FINGERPRINT — a one-way, per-process digest. It is stable enough to recognise the same caller across a minute and cannot be turned back into a key, so this report is safe to read, screenshot and paste. It also reports what the sensor&#39;s own ceilings are doing (strain, tracked, ceiling, refused) and how many screens the scorer did not answer (unscored), so a control that has stopped measuring or a judge that has stopped answering is a number here rather than a quiet day. Scoped to the caller&#39;s own validated organization. A SuperAdmin may inspect a specific tenant with ?org&#x3D;&lt;slug&gt;, or the lane that has no tenant — every caller the identity boundary could not validate — with an empty ?org&#x3D;.
/// </remarks>
pplx::task<std::shared_ptr<TrafficView>> gatewayTraffic(
) const;
/// <summary>
/// Read returns the EFFECTIVE edge policy the caller is subject to: the platform CORS allowlist and pre-auth per-IP flood cap in force, plus the caller&#39;s own authenticated rate ceiling, edge-cache TTLs and accepted-method allowlist.
/// </summary>
/// <remarks>
/// Read returns the EFFECTIVE edge policy the caller is subject to: the platform CORS allowlist and pre-auth per-IP flood cap in force, plus the caller&#39;s own authenticated rate ceiling, edge-cache TTLs and accepted-method allowlist. A SuperAdmin may inspect a specific tenant&#39;s effective policy with ?org&#x3D;&lt;slug&gt;.
/// </remarks>
pplx::task<std::shared_ptr<Policy>> getGatewayConfig(
) const;
/// <summary>
/// Write updates one policy scope and returns the policy in force after the write.
/// </summary>
/// <remarks>
/// Write updates one policy scope and returns the policy in force after the write. A body carrying any PLATFORM field (cors_origins, per_ip_rpm, window_sec) is a platform write and requires SuperAdmin; otherwise it is a per-org write (org_rpm, cache_ttl_sec, cache_paths, methods) scoped to the caller&#39;s own org — or, for a SuperAdmin, the tenant named by ?org&#x3D;&lt;slug&gt;. A body that sets nothing is a 400. The abuse gate&#39;s mode is an OPERATOR field: setting it requires SuperAdmin, whichever organization it lands on. updated_at and updated_by are server-stamped; a client-supplied value is ignored.
/// </remarks>
/// <param name="policy"></param>
pplx::task<std::shared_ptr<Policy>> putGatewayConfig(
std::shared_ptr<Policy> policy
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_GatewayApi_H_ */