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.
113 lines
6.0 KiB
C++
113 lines
6.0 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.
|
|
*/
|
|
|
|
/*
|
|
* TaxonomyApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_TaxonomyApi_H_
|
|
#define HANZO_API_TaxonomyApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/Category.h"
|
|
#include "hanzo/model/CategoryIn.h"
|
|
#include "hanzo/model/Deleted.h"
|
|
#include "hanzo/model/Taxon.h"
|
|
#include "hanzo/model/TaxonIn.h"
|
|
#include "hanzo/model/Taxonomy.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class TaxonomyApi
|
|
{
|
|
public:
|
|
|
|
explicit TaxonomyApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~TaxonomyApi();
|
|
|
|
/// <summary>
|
|
/// Removes one empty category.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Removes one empty category. A category that still has taxa filed under it is refused with 409 and a count: deleting the label off a group must never silently take the products wearing it, and the alternative — orphan rows naming a category that no longer exists — is a catalogue that cannot be rendered. Move or delete its taxa first. An id no category holds is a 404.
|
|
/// </remarks>
|
|
/// <param name="id">ID is the slug to act on, from the path.</param>
|
|
pplx::task<std::shared_ptr<Deleted>> deleteTaxonomyCategoriesById(
|
|
utility::string_t id
|
|
) const;
|
|
/// <summary>
|
|
/// Removes one product from the catalogue.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Removes one product from the catalogue. An id no taxon holds is a 404. To take a product out of view without losing what was written about it, set `published` to false instead.
|
|
/// </remarks>
|
|
/// <param name="id">ID is the slug to act on, from the path.</param>
|
|
pplx::task<std::shared_ptr<Deleted>> deleteTaxonomyTaxaById(
|
|
utility::string_t id
|
|
) const;
|
|
/// <summary>
|
|
/// Read returns the product catalogue as this caller sees it: the PLATFORM catalogue — Hanzo's own products, the part that is true for everyone — plus the caller's own org's rows, every category in display order and each carrying the products filed under it in theirs.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Read returns the product catalogue as this caller sees it: the PLATFORM catalogue — Hanzo's own products, the part that is true for everyone — plus the caller's own org's rows, every category in display order and each carrying the products filed under it in theirs. Another customer's rows are never in it. It is readable signed out, and a signed-out visitor gets the platform catalogue alone, which is what the marketing landing renders from. Where the caller's org and the platform hold the same id, the caller's own row is the one served. That rule exists because ids are unique per ORG and not globally — two customers may each have a \"crm\", and refusing the second would tell one of them the other exists — so a collision with the platform is possible by construction and something has to win deterministically. Yours does: your own catalogue is the one you edited. `?brand=` narrows it the way a brand's own console does: only the categories that brand admits, and within them only the taxa scoped to it. An unpublished row is served only to whoever may edit it — a SuperAdmin for the platform's, an org admin for their own — so a product can be staged before anyone sees it without becoming invisible to the person staging it.
|
|
/// </remarks>
|
|
/// <param name="brand">Brand returns only what that brand's console shows — the categories it admits, and within them the taxa scoped to it. Empty returns everything. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
pplx::task<std::shared_ptr<Taxonomy>> getTaxonomy(
|
|
boost::optional<utility::string_t> brand
|
|
) const;
|
|
/// <summary>
|
|
/// Creates or replaces one category and returns it as stored.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Creates or replaces one category and returns it as stored. The id in the URL is the one it is filed under whatever the body says, so a category can never be written under a name it was not addressed by — which also makes create and replace the same act, and is why there is no POST beside this. Platform SuperAdmin only: one catalogue serves every tenant, so an org admin who could rename a category would rename it for all of them.
|
|
/// </remarks>
|
|
/// <param name="id">ID is the category slug to write, from the path.</param>
|
|
/// <param name="categoryIn"></param>
|
|
pplx::task<std::shared_ptr<Category>> putTaxonomyCategoriesById(
|
|
utility::string_t id,
|
|
std::shared_ptr<CategoryIn> categoryIn
|
|
) const;
|
|
/// <summary>
|
|
/// Creates or replaces one product and returns it as stored.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Creates or replaces one product and returns it as stored. The id in the URL is the one it is filed under whatever the body says. The category must already exist — a taxon naming a category that does not is refused with 400 rather than stored where nothing can render it. A taxon opens exactly one way: `route` for a product the console renders itself, or `href` for one that genuinely lives at its own domain. Giving both, or neither, is refused. Platform SuperAdmin only.
|
|
/// </remarks>
|
|
/// <param name="id">ID is the taxon slug to write, from the path.</param>
|
|
/// <param name="taxonIn"></param>
|
|
pplx::task<std::shared_ptr<Taxon>> putTaxonomyTaxaById(
|
|
utility::string_t id,
|
|
std::shared_ptr<TaxonIn> taxonIn
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_TaxonomyApi_H_ */
|
|
|