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

120 lines
7.1 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.
*/
/*
* LeaderboardApi.h
*
*
*/
#ifndef HANZO_API_LeaderboardApi_H_
#define HANZO_API_LeaderboardApi_H_
#include "hanzo/ApiClient.h"
#include "hanzo/model/ActivityView.h"
#include "hanzo/model/LeaderboardView.h"
#include "hanzo/model/OptinView.h"
#include "hanzo/model/OrgOptinReq.h"
#include "hanzo/model/OrgOptinView.h"
#include "hanzo/model/UserOptinReq.h"
#include "hanzo/model/UserOptinView.h"
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace hanzo {
namespace api {
using namespace hanzo::model;
class LeaderboardApi
{
public:
explicit LeaderboardApi( std::shared_ptr<const ApiClient> apiClient );
virtual ~LeaderboardApi();
/// <summary>
/// Leaderboard ranks AI usage over a window, either the users of the caller&#39;s own org or organizations against each other, and always reports the caller&#39;s own standing even when it falls outside the returned page.
/// </summary>
/// <remarks>
/// Leaderboard ranks AI usage over a window, either the users of the caller&#39;s own org or organizations against each other, and always reports the caller&#39;s own standing even when it falls outside the returned page. Identities are private by default: a caller sees themselves, plus the peers or orgs that opted into public listing, and only an admin sees their own org&#39;s members named. Cross-org spend is restricted to platform admins. When the warehouse is not connected the board answers empty with available&#x3D;false rather than a fabricated rank.
/// </remarks>
/// <param name="scope">Scope picks the board: \&quot;personal\&quot; (default) ranks the caller among their own org&#39;s users, \&quot;org\&quot; is that same org board named for an admin, \&quot;global\&quot; ranks organizations against each other. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="metric">Metric is the value ranked: tokens (default), requests, or cost. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="period">Period is the window ranked: day, week, month (default) or all. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="limit">Limit caps the rows returned, clamped to 100. Defaults to 10, which is also what a non-positive or unparseable value takes. (optional, default to 0L)</param>
pplx::task<std::shared_ptr<LeaderboardView>> getLeaderboard(
boost::optional<utility::string_t> scope,
boost::optional<utility::string_t> metric,
boost::optional<utility::string_t> period,
boost::optional<int64_t> limit
) const;
/// <summary>
/// Activity returns the per-day usage series for ONE authorized subject — the points a contribution heatmap and a timeline are drawn from, gap-filled so every day in the range is present.
/// </summary>
/// <remarks>
/// Activity returns the per-day usage series for ONE authorized subject — the points a contribution heatmap and a timeline are drawn from, gap-filled so every day in the range is present. Authorization is resolved server-side from the validated principal, so a caller can never widen the subject past what they are entitled to: a non-admin reads only themselves and their own org. subject&#x3D;project answers empty with a note, because the usage ledger records no project column yet. When the warehouse is not connected the series answers empty with available&#x3D;false rather than fabricated days.
/// </remarks>
/// <param name="subject">Subject is what the series is about: \&quot;user\&quot; (default), \&quot;org\&quot; or \&quot;project\&quot;. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="id">ID names the subject within what the caller is entitled to see. Omitted (or \&quot;me\&quot;) it is the caller themselves, or their own org. Another user requires org admin and must belong to the caller&#39;s org; another org requires a SuperAdmin. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="from">From is the first day of the range, \&quot;2006-01-02\&quot;. Defaults to 90 days back. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
/// <param name="to">To is the last day of the range, \&quot;2006-01-02\&quot;. Defaults to today; the span is clamped to 366 days. (optional, default to utility::conversions::to_string_t(&quot;&quot;))</param>
pplx::task<std::shared_ptr<ActivityView>> getLeaderboardActivity(
boost::optional<utility::string_t> subject,
boost::optional<utility::string_t> id,
boost::optional<utility::string_t> from,
boost::optional<utility::string_t> to
) const;
/// <summary>
/// Returns the caller&#39;s own public-listing preference and their org&#39;s, each with whether the caller may change it.
/// </summary>
/// <remarks>
/// Returns the caller&#39;s own public-listing preference and their org&#39;s, each with whether the caller may change it. Public listing is opt-in and private by default, so a fresh caller reads listed&#x3D;false for both.
/// </remarks>
pplx::task<std::shared_ptr<OptinView>> getLeaderboardOptin(
) const;
/// <summary>
/// Sets the CALLER&#39;s own public-listing preference on the leaderboard.
/// </summary>
/// <remarks>
/// Sets the CALLER&#39;s own public-listing preference on the leaderboard. Self only: the row written is keyed by the caller&#39;s validated ledger identity, so this can never edit another member&#39;s visibility whatever the request says. A caller opting in with no handle is given their username, so a listed row never renders as \&quot;Anonymous\&quot; to its own owner.
/// </remarks>
/// <param name="userOptinReq"></param>
pplx::task<std::shared_ptr<UserOptinView>> putLeaderboardOptin(
std::shared_ptr<UserOptinReq> userOptinReq
) const;
/// <summary>
/// Sets the ORG&#39;s listing on the cross-org global board.
/// </summary>
/// <remarks>
/// Sets the ORG&#39;s listing on the cross-org global board. Only an admin of the caller&#39;s own org — an org admin or a platform SuperAdmin — may change it, and the org written is the caller&#39;s validated tenant, never a value from the request. Listing consents to publishing the org&#39;s usage VOLUME; cross-org spend stays restricted to platform admins regardless.
/// </remarks>
/// <param name="orgOptinReq"></param>
pplx::task<std::shared_ptr<OrgOptinView>> putLeaderboardOptinOrg(
std::shared_ptr<OrgOptinReq> orgOptinReq
) const;
protected:
std::shared_ptr<const ApiClient> m_ApiClient;
};
}
}
#endif /* HANZO_API_LeaderboardApi_H_ */