mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
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.
107 lines
3.8 KiB
C++
107 lines
3.8 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.
|
|
*/
|
|
|
|
/*
|
|
* TemplateApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_TemplateApi_H_
|
|
#define HANZO_API_TemplateApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/KitList.h"
|
|
#include "hanzo/model/PublishKitIn.h"
|
|
#include "hanzo/model/ReplaceKitIn.h"
|
|
#include "hanzo/model/StarterKit.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class TemplateApi
|
|
{
|
|
public:
|
|
|
|
explicit TemplateApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~TemplateApi();
|
|
|
|
/// <summary>
|
|
/// Deletes the caller org's OWN starter kit.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Deletes the caller org's OWN starter kit. A slug they do not own is a 404, never a delete: the DELETE binds org.
|
|
/// </remarks>
|
|
/// <param name="slug">Slug is the starter kit to act on, from the path.</param>
|
|
pplx::task<void> deleteTemplateBySlug(
|
|
utility::string_t slug
|
|
) const;
|
|
/// <summary>
|
|
/// Lists the public starter-kit catalog plus, for a validated caller, that org's own private kits.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Lists the public starter-kit catalog plus, for a validated caller, that org's own private kits. No request field can widen the scope: the org comes from the validated principal, so an anonymous or cross-org caller structurally sees the public catalog only.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<KitList>> getTemplate(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns one starter kit: the caller org's own by that slug, else the public catalog's.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns one starter kit: the caller org's own by that slug, else the public catalog's. A slug another org owns reads as not found.
|
|
/// </remarks>
|
|
/// <param name="slug">Slug is the starter kit to act on, from the path.</param>
|
|
pplx::task<std::shared_ptr<StarterKit>> getTemplateBySlug(
|
|
utility::string_t slug
|
|
) const;
|
|
/// <summary>
|
|
/// Creates a starter kit PRIVATE to the caller's org and answers 201 with the stored kit.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Creates a starter kit PRIVATE to the caller's org and answers 201 with the stored kit. The owner is stamped by the server, so a body \"org\" is never trusted; publishing over a public-catalog slug is 409, so a slug still names exactly one kit.
|
|
/// </remarks>
|
|
/// <param name="publishKitIn"></param>
|
|
pplx::task<std::shared_ptr<StarterKit>> postTemplate(
|
|
std::shared_ptr<PublishKitIn> publishKitIn
|
|
) const;
|
|
/// <summary>
|
|
/// Overwrites the caller org's OWN starter kit at the path slug, answering the stored kit.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Overwrites the caller org's OWN starter kit at the path slug, answering the stored kit. A slug they do not own is 404, never a create: the UPDATE binds org, so a PUT can never reach another org's kit.
|
|
/// </remarks>
|
|
/// <param name="slug">Slug is the kit to replace, from the path.</param>
|
|
/// <param name="replaceKitIn"></param>
|
|
pplx::task<std::shared_ptr<StarterKit>> putTemplateBySlug(
|
|
utility::string_t slug,
|
|
std::shared_ptr<ReplaceKitIn> replaceKitIn
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_TemplateApi_H_ */
|
|
|