Files
zeekay 189ce08e51 Regenerate against the document the deployment answers for
The projection these were generated from was a month old and predated the
compute migration, so every one of them described /v1/visor — which the API
serves at zero paths now. That is why a hand-written console client and a
generated one had drifted the same way at the same time.

No /v1/visor path survives here. The word still appears as a source-plane
value and inside gvisor and supervisor, which are not this rename.
2026-09-05 18:07:13 -07:00

161 lines
6.5 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.
*/
/*
* TelApi.h
*
*
*/
#ifndef HANZO_API_TelApi_H_
#define HANZO_API_TelApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/BuyInput.h"
#include "hanzo/model/Call.h"
#include "hanzo/model/CallInput.h"
#include "hanzo/model/CallList.h"
#include "hanzo/model/MessageInput.h"
#include "hanzo/model/MessageList.h"
#include "hanzo/model/Number.h"
#include "hanzo/model/NumberList.h"
#include "hanzo/model/SMS.h"
#include "hanzo/model/Summary.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class TelApi
{
public:
explicit TelApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~TelApi();
/// <summary>
/// Ends a call this org placed.
/// </summary>
/// <remarks>
/// Ends a call this org placed. The holding is read for THIS org before the carrier is asked, for the reason releaseNumber gives one surface up: an id belonging to another tenant would otherwise be hung up by whoever guessed it.
/// </remarks>
/// <param name="id"></param>
pplx::task<void> deleteTelCallsById(
utility::string_t id
) const;
/// <summary>
/// Checks the holding is THIS org&#39;s before it reaches the carrier.
/// </summary>
/// <remarks>
/// Checks the holding is THIS org&#39;s before it reaches the carrier. Without that read, an id belonging to another tenant would be released by whoever guessed it.
/// </remarks>
/// <param name="id"></param>
pplx::task<void> deleteTelNumbersById(
utility::string_t id
) const;
/// <summary>
/// Lists the calls this org has placed or received, newest first.
/// </summary>
/// <remarks>
/// Lists the calls this org has placed or received, newest first. Like the message list beside it, these are our own records rather than the carrier&#39;s.
/// </remarks>
pplx::task<std::shared_ptr<CallList>> getTelCalls(
) const;
/// <summary>
/// Lists the messages this org has sent or received, newest first.
/// </summary>
/// <remarks>
/// Lists the messages this org has sent or received, newest first. Records from our own store, not the carrier&#39;s — so it is what this platform did on the org&#39;s behalf, which is the set an audit or a bill has to agree with.
/// </remarks>
pplx::task<std::shared_ptr<MessageList>> getTelMessages(
) const;
/// <summary>
/// Lists the phone numbers this org HOLDS — the ones it has bought and not released.
/// </summary>
/// <remarks>
/// Lists the phone numbers this org HOLDS — the ones it has bought and not released. Distinct from the availability search one path down (&#x60;/numbers/available&#x60;), which asks the carrier what could be bought: this answers only from our own store, so it is what an org owns rather than what it could own.
/// </remarks>
pplx::task<std::shared_ptr<NumberList>> getTelNumbers(
) const;
/// <summary>
/// Asks the carrier what is available to buy.
/// </summary>
/// <remarks>
/// Asks the carrier what is available to buy. Nothing is recorded — a search is not a holding, and treating it as one is how inventory leaks.
/// </remarks>
/// <param name="country"> (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="area"> (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="type"> (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="limit"> (optional, default to 0L)</param>
pplx::task<std::shared_ptr<NumberList>> getTelNumbersAvailable(
boost::optional<utility::string_t> country,
boost::optional<utility::string_t> area,
boost::optional<utility::string_t> type,
boost::optional<int64_t> limit
) const;
/// <summary>
/// Counts what this org holds on the telephony plane: its numbers, its calls and its messages.
/// </summary>
/// <remarks>
/// Counts what this org holds on the telephony plane: its numbers, its calls and its messages. The one read a dashboard makes before it asks for any list, so it answers three totals and no rows.
/// </remarks>
pplx::task<std::shared_ptr<Summary>> getTelSummary(
) const;
/// <summary>
/// Dials.
/// </summary>
/// <remarks>
/// Dials. An &#x60;agent&#x60; names a Hanzo assistant to answer it; the call is refused up front when no assistant plane is configured, because a call that connects to silence has already cost the person who answered it.
/// </remarks>
/// <param name="callInput"></param>
pplx::task<std::shared_ptr<Call>> postTelCalls(
std::shared_ptr<CallInput> callInput
) const;
/// <summary>
/// Sends a message from one of this org&#39;s own numbers.
/// </summary>
/// <remarks>
/// Sends a message from one of this org&#39;s own numbers. &#x60;from&#x60; must be a number the org HOLDS, checked against the store rather than taken on trust — a caller that could send from any number could impersonate one, and the carrier would deliver it. &#x60;to&#x60; is required, and the body needs text or media, because a message with neither is delivered as nothing and billed as something.
/// </remarks>
/// <param name="messageInput"></param>
pplx::task<std::shared_ptr<SMS>> postTelMessages(
std::shared_ptr<MessageInput> messageInput
) const;
/// <summary>
/// Provisions with the carrier FIRST and records second.
/// </summary>
/// <remarks>
/// Provisions with the carrier FIRST and records second. The other order records a holding that may not exist, and a number the platform believes it owns but cannot use is worse than one it failed to buy.
/// </remarks>
/// <param name="buyInput"></param>
pplx::task<std::shared_ptr<Number>> postTelNumbers(
std::shared_ptr<BuyInput> buyInput
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_TelApi_H_ */