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.
115 lines
5.3 KiB
C++
115 lines
5.3 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.
|
|
*/
|
|
|
|
/*
|
|
* MarketplaceApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_MarketplaceApi_H_
|
|
#define HANZO_API_MarketplaceApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/InstallReq.h"
|
|
#include "hanzo/model/InstallState.h"
|
|
#include "hanzo/model/Listing.h"
|
|
#include "hanzo/model/ListingPage.h"
|
|
#include "hanzo/model/MarketCatalog.h"
|
|
#include "hanzo/model/PublishReq.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class MarketplaceApi
|
|
{
|
|
public:
|
|
|
|
explicit MarketplaceApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~MarketplaceApi();
|
|
|
|
/// <summary>
|
|
/// Unpublish withdraws one of the caller org's listings from the marketplace and answers 204.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Unpublish withdraws one of the caller org's listings from the marketplace and answers 204. Only the publishing org can remove its own listing; an id that is unknown, or belongs to another org, is the same 404, so a probe learns nothing about what exists. Removing a listing removes its price from per-call enforcement; it does not uninstall the tool for anyone who already installed it.
|
|
/// </remarks>
|
|
/// <param name="id">ID is the listing to unpublish, from the path.</param>
|
|
pplx::task<void> deleteMarketplaceListingsById(
|
|
utility::string_t id
|
|
) const;
|
|
/// <summary>
|
|
/// Discover lists every tool and agent the caller can reach in their own org and project, enriched with any public listing's title, category and price, and with installed=true on the ones already activated for that scope.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Discover lists every tool and agent the caller can reach in their own org and project, enriched with any public listing's title, category and price, and with installed=true on the ones already activated for that scope. It is the shop window: one read that answers what exists, what it costs and what is already on.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<MarketCatalog>> getMarketplace(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the listings the caller's own org has published — what this org is offering, not what it can buy.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the listings the caller's own org has published — what this org is offering, not what it can buy. A publisher only ever sees its own rows.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<ListingPage>> getMarketplaceListings(
|
|
) const;
|
|
/// <summary>
|
|
/// Install activates one tool for the caller's own org and project.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Install activates one tool for the caller's own org and project. A marketplace install IS the tool plane's activation write — one store, one truth — so an installed capability is immediately dispatchable and a monetized one is priced from its listing at every call. The tool must resolve in the caller's scope, so installing something that does not exist is refused rather than recorded.
|
|
/// </remarks>
|
|
/// <param name="installReq"></param>
|
|
pplx::task<std::shared_ptr<InstallState>> postMarketplaceInstall(
|
|
std::shared_ptr<InstallReq> installReq
|
|
) const;
|
|
/// <summary>
|
|
/// Publish offers one tool on the marketplace, optionally monetized.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Publish offers one tool on the marketplace, optionally monetized. The tool must already resolve in the publisher's own scope, so a listing can never advertise a capability that does not exist; a listing with a price must name the payout wallet the x402 client settles to, so a monetized offer is never unpayable. The price is exact to 18 decimal places, so a per-call price below a cent is a real price and not a rounded-away zero. The listing is owned by the publishing org, paid into a wallet of that same org, and answers 201 with the created row.
|
|
/// </remarks>
|
|
/// <param name="publishReq"></param>
|
|
pplx::task<std::shared_ptr<Listing>> postMarketplaceListings(
|
|
std::shared_ptr<PublishReq> publishReq
|
|
) const;
|
|
/// <summary>
|
|
/// Uninstall deactivates one tool for the caller's own org and project, so it stops being dispatchable there.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Uninstall deactivates one tool for the caller's own org and project, so it stops being dispatchable there. It is the exact inverse of install and touches the same activation record; deactivating something that was never active is not an error. The listing itself is untouched — this withdraws the caller's use of a capability, not anyone's offer of it.
|
|
/// </remarks>
|
|
/// <param name="installReq"></param>
|
|
pplx::task<std::shared_ptr<InstallState>> postMarketplaceUninstall(
|
|
std::shared_ptr<InstallReq> installReq
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_MarketplaceApi_H_ */
|
|
|