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.
93 lines
4.7 KiB
C++
93 lines
4.7 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.
|
|
*/
|
|
|
|
/*
|
|
* NotifyApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_NotifyApi_H_
|
|
#define HANZO_API_NotifyApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/AnyType.h"
|
|
#include "hanzo/model/NotifyHealth.h"
|
|
#include "hanzo/model/NotifySend.h"
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class NotifyApi
|
|
{
|
|
public:
|
|
|
|
explicit NotifyApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~NotifyApi();
|
|
|
|
/// <summary>
|
|
/// Reports that the notify send surface is mounted.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Reports that the notify send surface is mounted. It is a pure liveness probe: it answers 200 whenever this subsystem is mounted and checks nothing downstream, so an \"ok\" here says the routes are reachable, not that any provider credential is configured. The body is notifyd's verbatim, so probes and clients that keyed on the standalone service keep working unchanged.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<NotifyHealth>> getNotifyHealth(
|
|
) const;
|
|
/// <summary>
|
|
/// Delivers one transactional message by email or SMS through the caller org's own provider credential.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Delivers one transactional message by email or SMS through the caller org's own provider credential. The channel comes from the body — sms or email — and the provider credential is read from KMS at orgs/<org>/notify/<service>/<key>, never from the environment. The org is the validated principal's, never a client-supplied value, so a caller can only ever send as their own tenant; an unauthenticated caller gets 401. Naming no provider picks the one whose credentials are actually configured (Twilio, then Plivo for SMS; Twilio Email, then SMTP for email) and fails closed when none is. Delivery is synchronous and per recipient: one recipient answers the bare {message_id,status} outcome, several answer the {items:[…]} envelope. A terminal provider failure is a 200 whose status is failed with the reason in error, never a transport error. sync=true is REQUIRED — an async dispatch answers 503, because the queue plane that would run it is owned elsewhere. The message body wins verbatim when present; otherwise template_id (or the event name) selects a built-in template rendered against template_vars.
|
|
/// </remarks>
|
|
/// <param name="notifySend"></param>
|
|
pplx::task<std::shared_ptr<AnyType>> postNotifySend(
|
|
std::shared_ptr<NotifySend> notifySend
|
|
) const;
|
|
/// <summary>
|
|
/// Delivers one transactional email through the caller org's own provider credential.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Delivers one transactional email through the caller org's own provider credential. It is the channel-pinned form of the generic send: identical in every respect except that the channel is fixed to email, OVERRIDING whatever the body names — so a body that says sms still goes out as mail. The provider is the org's own email credential from KMS (Twilio Email, then SMTP), resolved for the validated principal's org; an unauthenticated caller gets 401. Subject is carried on the email channel only.
|
|
/// </remarks>
|
|
/// <param name="notifySend"></param>
|
|
pplx::task<std::shared_ptr<AnyType>> postNotifySendEmail(
|
|
std::shared_ptr<NotifySend> notifySend
|
|
) const;
|
|
/// <summary>
|
|
/// Delivers one transactional SMS through the caller org's own provider credential.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Delivers one transactional SMS through the caller org's own provider credential. It is the channel-pinned form of the generic send: identical in every respect except that the channel is fixed to sms, OVERRIDING whatever the body names — so a body that says email still goes out as a text message. The provider is the org's own SMS credential from KMS (Twilio, then Plivo), resolved for the validated principal's org; an unauthenticated caller gets 401.
|
|
/// </remarks>
|
|
/// <param name="notifySend"></param>
|
|
pplx::task<std::shared_ptr<AnyType>> postNotifySendSms(
|
|
std::shared_ptr<NotifySend> notifySend
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_NotifyApi_H_ */
|
|
|