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.
112 lines
5.0 KiB
C++
112 lines
5.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.
|
|
*/
|
|
|
|
/*
|
|
* PromptApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_PromptApi_H_
|
|
#define HANZO_API_PromptApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/CatalogList.h"
|
|
#include "hanzo/model/MetricList.h"
|
|
#include "hanzo/model/PromptDetail.h"
|
|
#include "hanzo/model/PromptList.h"
|
|
#include "hanzo/model/PromptReq.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class PromptApi
|
|
{
|
|
public:
|
|
|
|
explicit PromptApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~PromptApi();
|
|
|
|
/// <summary>
|
|
/// Delete removes one of the caller org's prompts and every version of it, answering 204.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Delete removes one of the caller org's prompts and every version of it, answering 204. It is scoped to the caller's org, so a name another tenant owns is the same 404 an unknown name gives. There is no undo: the version history goes with it.
|
|
/// </remarks>
|
|
/// <param name="name">Name is the prompt to act on, from the path.</param>
|
|
pplx::task<void> deletePromptByName(
|
|
utility::string_t name
|
|
) const;
|
|
/// <summary>
|
|
/// List returns the caller org's prompt library as one row per prompt: its name, type, every version number it has, its taxonomy and when it last changed.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// List returns the caller org's prompt library as one row per prompt: its name, type, every version number it has, its taxonomy and when it last changed. The template bodies are deliberately absent — fetch one prompt to read its text.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PromptList>> getPrompt(
|
|
) const;
|
|
/// <summary>
|
|
/// Get returns one of the caller org's prompts: its CURRENT template text plus the metadata of every version it has had.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Get returns one of the caller org's prompts: its CURRENT template text plus the metadata of every version it has had. The history carries version numbers, types and timestamps only — not each version's body — so a long history cannot inflate this response. A name the caller's org does not own is 404, whoever owns it.
|
|
/// </remarks>
|
|
/// <param name="name">Name is the prompt to act on, from the path.</param>
|
|
pplx::task<std::shared_ptr<PromptDetail>> getPromptByName(
|
|
utility::string_t name
|
|
) const;
|
|
/// <summary>
|
|
/// Catalog returns the read-only starter prompt library shipped with the binary — reference content every tenant sees the same, NOT the caller's own prompts and never mixed into them.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Catalog returns the read-only starter prompt library shipped with the binary — reference content every tenant sees the same, NOT the caller's own prompts and never mixed into them. An org's library stays honestly empty until someone explicitly imports a starter, which is an ordinary POST /v1/prompt. Entries that would fail the create guards are dropped, so everything offered here can actually be imported.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<CatalogList>> getPromptCatalog(
|
|
) const;
|
|
/// <summary>
|
|
/// Metrics returns real per-prompt statistics for the caller's org: how many versions each prompt has, which one is current, and when it was created and last changed.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Metrics returns real per-prompt statistics for the caller's org: how many versions each prompt has, which one is current, and when it was created and last changed. Every number is counted from the store — nothing here is estimated or fabricated.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<MetricList>> getPromptMetrics(
|
|
) const;
|
|
/// <summary>
|
|
/// Create records a prompt for the caller's org and answers 201 with it.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Create records a prompt for the caller's org and answers 201 with it. A name the org already uses is NOT an error and NOT an overwrite: it appends a new version, so the library keeps real, inspectable history and the response carries the whole version list. The name is also the URL segment the prompt is fetched by, which is why its shape is constrained and a handful of names are reserved.
|
|
/// </remarks>
|
|
/// <param name="promptReq"></param>
|
|
pplx::task<std::shared_ptr<PromptDetail>> postPrompt(
|
|
std::shared_ptr<PromptReq> promptReq
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_PromptApi_H_ */
|
|
|