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

86 lines
3.5 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.
*/
/*
* EntitlementApi.h
*
*
*/
#ifndef HANZO_API_EntitlementApi_H_
#define HANZO_API_EntitlementApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/EntitlementsView.h"
#include "hanzo/model/MutateReq.h"
#include "hanzo/model/ProjectionView.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class EntitlementApi
{
public:
explicit EntitlementApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~EntitlementApi();
/// <summary>
/// Projection reports which console apps the CALLER&#39;s org may open, and the plan slug that decides it.
/// </summary>
/// <remarks>
/// Projection reports which console apps the CALLER&#39;s org may open, and the plan slug that decides it. It is the READ side of the unified paywall: the org&#39;s plan tier resolved from commerce, which is a different authority from the enablement store behind GET /v1/entitlement/orgs/{org} (that one is the org&#39;s own on/off intent). It fails SAFE-TO-LOCKED, never 500: an unvalidated principal is a 403, but a commerce outage reports every app locked at 200 rather than breaking the shell. The ENFORCEMENT path still fails open, so functionality survives the same outage even while the UI conservatively shows locked.
/// </remarks>
pplx::task<std::shared_ptr<ProjectionView>> getEntitlement(
) const;
/// <summary>
/// Get lists the products an org has ENABLED — its own intent, which the console&#39;s paid-product sidebar reads to decide what to show.
/// </summary>
/// <remarks>
/// Get lists the products an org has ENABLED — its own intent, which the console&#39;s paid-product sidebar reads to decide what to show. It is distinct from what the org&#39;s plan ENTITLES it to (that is GET /v1/entitlement, resolved from commerce). A caller may only read its OWN org&#39;s row; a platform super admin may read any.
/// </remarks>
/// <param name="org"></param>
pplx::task<std::shared_ptr<EntitlementsView>> getEntitlementOrgsByOrg(
utility::string_t org
) const;
/// <summary>
/// Post turns products on or off for an org and returns the enabled set afterwards.
/// </summary>
/// <remarks>
/// Post turns products on or off for an org and returns the enabled set afterwards. A product may only be ENABLED if the org&#39;s plan already ENTITLES it, so enabling never spends new money — a product the plan does not grant answers 402 and the console routes that to an upgrade prompt. DISABLING is never gated. A platform super admin bypasses the plan check (operator comp/grant) and may target any org; everyone else may only change their own. Commerce unreachable is a 503, never an implicit yes.
/// </remarks>
/// <param name="org"></param>
/// <param name="mutateReq"></param>
pplx::task<std::shared_ptr<EntitlementsView>> postEntitlementOrgsByOrg(
utility::string_t org,
std::shared_ptr<MutateReq> mutateReq
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_EntitlementApi_H_ */