@stadar/sdk 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -0
- package/dist/apis/AccountApi.d.ts +248 -0
- package/dist/apis/AccountApi.d.ts.map +1 -0
- package/dist/apis/AccountApi.js +228 -0
- package/dist/apis/AccountApi.js.map +1 -0
- package/dist/apis/AuthApi.d.ts +232 -0
- package/dist/apis/AuthApi.d.ts.map +1 -0
- package/dist/apis/AuthApi.js +213 -0
- package/dist/apis/AuthApi.js.map +1 -0
- package/dist/apis/BillingApi.d.ts +103 -0
- package/dist/apis/BillingApi.d.ts.map +1 -0
- package/dist/apis/BillingApi.js +92 -0
- package/dist/apis/BillingApi.js.map +1 -0
- package/dist/apis/GamesApi.d.ts +96 -0
- package/dist/apis/GamesApi.d.ts.map +1 -0
- package/dist/apis/GamesApi.js +100 -0
- package/dist/apis/GamesApi.js.map +1 -0
- package/dist/apis/LeaguesApi.d.ts +214 -0
- package/dist/apis/LeaguesApi.d.ts.map +1 -0
- package/dist/apis/LeaguesApi.js +225 -0
- package/dist/apis/LeaguesApi.js.map +1 -0
- package/dist/apis/MatchesApi.d.ts +178 -0
- package/dist/apis/MatchesApi.d.ts.map +1 -0
- package/dist/apis/MatchesApi.js +183 -0
- package/dist/apis/MatchesApi.js.map +1 -0
- package/dist/apis/MetaApi.d.ts +160 -0
- package/dist/apis/MetaApi.d.ts.map +1 -0
- package/dist/apis/MetaApi.js +151 -0
- package/dist/apis/MetaApi.js.map +1 -0
- package/dist/apis/SeriesApi.d.ts +211 -0
- package/dist/apis/SeriesApi.d.ts.map +1 -0
- package/dist/apis/SeriesApi.js +223 -0
- package/dist/apis/SeriesApi.js.map +1 -0
- package/dist/apis/TournamentsApi.d.ts +149 -0
- package/dist/apis/TournamentsApi.d.ts.map +1 -0
- package/dist/apis/TournamentsApi.js +149 -0
- package/dist/apis/TournamentsApi.js.map +1 -0
- package/dist/apis/WebhooksApi.d.ts +173 -0
- package/dist/apis/WebhooksApi.d.ts.map +1 -0
- package/dist/apis/WebhooksApi.js +157 -0
- package/dist/apis/WebhooksApi.js.map +1 -0
- package/dist/apis/index.d.ts +11 -0
- package/dist/apis/index.d.ts.map +1 -0
- package/dist/apis/index.js +13 -0
- package/dist/apis/index.js.map +1 -0
- package/dist/from_env.d.ts +22 -0
- package/dist/from_env.d.ts.map +1 -0
- package/dist/from_env.js +57 -0
- package/dist/from_env.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/models/APIKeySummary.d.ts +57 -0
- package/dist/models/APIKeySummary.d.ts.map +1 -0
- package/dist/models/APIKeySummary.js +58 -0
- package/dist/models/APIKeySummary.js.map +1 -0
- package/dist/models/AccountCreateKey201Response.d.ts +77 -0
- package/dist/models/AccountCreateKey201Response.d.ts.map +1 -0
- package/dist/models/AccountCreateKey201Response.js +69 -0
- package/dist/models/AccountCreateKey201Response.js.map +1 -0
- package/dist/models/AccountCreateKeyRequest.d.ts +33 -0
- package/dist/models/AccountCreateKeyRequest.d.ts.map +1 -0
- package/dist/models/AccountCreateKeyRequest.js +44 -0
- package/dist/models/AccountCreateKeyRequest.js.map +1 -0
- package/dist/models/AccountListKeys200Response.d.ts +34 -0
- package/dist/models/AccountListKeys200Response.d.ts.map +1 -0
- package/dist/models/AccountListKeys200Response.js +43 -0
- package/dist/models/AccountListKeys200Response.js.map +1 -0
- package/dist/models/AccountMeCapabilities200Response.d.ts +41 -0
- package/dist/models/AccountMeCapabilities200Response.d.ts.map +1 -0
- package/dist/models/AccountMeCapabilities200Response.js +46 -0
- package/dist/models/AccountMeCapabilities200Response.js.map +1 -0
- package/dist/models/AccountUsageRecent200Response.d.ts +34 -0
- package/dist/models/AccountUsageRecent200Response.d.ts.map +1 -0
- package/dist/models/AccountUsageRecent200Response.js +43 -0
- package/dist/models/AccountUsageRecent200Response.js.map +1 -0
- package/dist/models/AuthMeResponse.d.ts +41 -0
- package/dist/models/AuthMeResponse.d.ts.map +1 -0
- package/dist/models/AuthMeResponse.js +46 -0
- package/dist/models/AuthMeResponse.js.map +1 -0
- package/dist/models/AuthMeResponseData.d.ts +45 -0
- package/dist/models/AuthMeResponseData.d.ts.map +1 -0
- package/dist/models/AuthMeResponseData.js +46 -0
- package/dist/models/AuthMeResponseData.js.map +1 -0
- package/dist/models/CS2PreviewExtras.d.ts +44 -0
- package/dist/models/CS2PreviewExtras.d.ts.map +1 -0
- package/dist/models/CS2PreviewExtras.js +47 -0
- package/dist/models/CS2PreviewExtras.js.map +1 -0
- package/dist/models/CS2PreviewExtrasMapVetoHistory.d.ts +51 -0
- package/dist/models/CS2PreviewExtrasMapVetoHistory.d.ts.map +1 -0
- package/dist/models/CS2PreviewExtrasMapVetoHistory.js +48 -0
- package/dist/models/CS2PreviewExtrasMapVetoHistory.js.map +1 -0
- package/dist/models/CS2PreviewExtrasMapWinRateValue.d.ts +39 -0
- package/dist/models/CS2PreviewExtrasMapWinRateValue.d.ts.map +1 -0
- package/dist/models/CS2PreviewExtrasMapWinRateValue.js +44 -0
- package/dist/models/CS2PreviewExtrasMapWinRateValue.js.map +1 -0
- package/dist/models/CapabilitySet.d.ts +72 -0
- package/dist/models/CapabilitySet.d.ts.map +1 -0
- package/dist/models/CapabilitySet.js +75 -0
- package/dist/models/CapabilitySet.js.map +1 -0
- package/dist/models/ErrorBody.d.ts +53 -0
- package/dist/models/ErrorBody.d.ts.map +1 -0
- package/dist/models/ErrorBody.js +52 -0
- package/dist/models/ErrorBody.js.map +1 -0
- package/dist/models/ErrorEnvelope.d.ts +34 -0
- package/dist/models/ErrorEnvelope.d.ts.map +1 -0
- package/dist/models/ErrorEnvelope.js +45 -0
- package/dist/models/ErrorEnvelope.js.map +1 -0
- package/dist/models/Game.d.ts +78 -0
- package/dist/models/Game.d.ts.map +1 -0
- package/dist/models/Game.js +62 -0
- package/dist/models/Game.js.map +1 -0
- package/dist/models/GameEnvelope.d.ts +41 -0
- package/dist/models/GameEnvelope.d.ts.map +1 -0
- package/dist/models/GameEnvelope.js +46 -0
- package/dist/models/GameEnvelope.js.map +1 -0
- package/dist/models/GamesListResponse.d.ts +41 -0
- package/dist/models/GamesListResponse.d.ts.map +1 -0
- package/dist/models/GamesListResponse.js +46 -0
- package/dist/models/GamesListResponse.js.map +1 -0
- package/dist/models/HeadToHead.d.ts +51 -0
- package/dist/models/HeadToHead.d.ts.map +1 -0
- package/dist/models/HeadToHead.js +54 -0
- package/dist/models/HeadToHead.js.map +1 -0
- package/dist/models/Healthz200Response.d.ts +40 -0
- package/dist/models/Healthz200Response.d.ts.map +1 -0
- package/dist/models/Healthz200Response.js +48 -0
- package/dist/models/Healthz200Response.js.map +1 -0
- package/dist/models/Last5Result.d.ts +65 -0
- package/dist/models/Last5Result.d.ts.map +1 -0
- package/dist/models/Last5Result.js +67 -0
- package/dist/models/Last5Result.js.map +1 -0
- package/dist/models/League.d.ts +81 -0
- package/dist/models/League.d.ts.map +1 -0
- package/dist/models/League.js +58 -0
- package/dist/models/League.js.map +1 -0
- package/dist/models/LeagueEnvelope.d.ts +41 -0
- package/dist/models/LeagueEnvelope.d.ts.map +1 -0
- package/dist/models/LeagueEnvelope.js +46 -0
- package/dist/models/LeagueEnvelope.js.map +1 -0
- package/dist/models/LeagueSummary.d.ts +45 -0
- package/dist/models/LeagueSummary.d.ts.map +1 -0
- package/dist/models/LeagueSummary.js +46 -0
- package/dist/models/LeagueSummary.js.map +1 -0
- package/dist/models/LeaguesListResponse.d.ts +41 -0
- package/dist/models/LeaguesListResponse.d.ts.map +1 -0
- package/dist/models/LeaguesListResponse.js +46 -0
- package/dist/models/LeaguesListResponse.js.map +1 -0
- package/dist/models/Match.d.ts +145 -0
- package/dist/models/Match.d.ts.map +1 -0
- package/dist/models/Match.js +89 -0
- package/dist/models/Match.js.map +1 -0
- package/dist/models/MatchEnvelope.d.ts +41 -0
- package/dist/models/MatchEnvelope.d.ts.map +1 -0
- package/dist/models/MatchEnvelope.js +46 -0
- package/dist/models/MatchEnvelope.js.map +1 -0
- package/dist/models/MatchParticipant.d.ts +57 -0
- package/dist/models/MatchParticipant.d.ts.map +1 -0
- package/dist/models/MatchParticipant.js +50 -0
- package/dist/models/MatchParticipant.js.map +1 -0
- package/dist/models/MatchPreview.d.ts +62 -0
- package/dist/models/MatchPreview.d.ts.map +1 -0
- package/dist/models/MatchPreview.js +63 -0
- package/dist/models/MatchPreview.js.map +1 -0
- package/dist/models/MatchPreviewEnvelope.d.ts +41 -0
- package/dist/models/MatchPreviewEnvelope.d.ts.map +1 -0
- package/dist/models/MatchPreviewEnvelope.js +46 -0
- package/dist/models/MatchPreviewEnvelope.js.map +1 -0
- package/dist/models/MatchPreviewForm.d.ts +40 -0
- package/dist/models/MatchPreviewForm.d.ts.map +1 -0
- package/dist/models/MatchPreviewForm.js +49 -0
- package/dist/models/MatchPreviewForm.js.map +1 -0
- package/dist/models/MatchPreviewLast5.d.ts +40 -0
- package/dist/models/MatchPreviewLast5.d.ts.map +1 -0
- package/dist/models/MatchPreviewLast5.js +49 -0
- package/dist/models/MatchPreviewLast5.js.map +1 -0
- package/dist/models/MatchesListResponse.d.ts +41 -0
- package/dist/models/MatchesListResponse.d.ts.map +1 -0
- package/dist/models/MatchesListResponse.js +46 -0
- package/dist/models/MatchesListResponse.js.map +1 -0
- package/dist/models/Meta.d.ts +59 -0
- package/dist/models/Meta.d.ts.map +1 -0
- package/dist/models/Meta.js +52 -0
- package/dist/models/Meta.js.map +1 -0
- package/dist/models/Paging.d.ts +45 -0
- package/dist/models/Paging.d.ts.map +1 -0
- package/dist/models/Paging.js +46 -0
- package/dist/models/Paging.js.map +1 -0
- package/dist/models/RootVersion200Response.d.ts +45 -0
- package/dist/models/RootVersion200Response.d.ts.map +1 -0
- package/dist/models/RootVersion200Response.js +46 -0
- package/dist/models/RootVersion200Response.js.map +1 -0
- package/dist/models/Series.d.ts +89 -0
- package/dist/models/Series.d.ts.map +1 -0
- package/dist/models/Series.js +62 -0
- package/dist/models/Series.js.map +1 -0
- package/dist/models/SeriesEnvelope.d.ts +41 -0
- package/dist/models/SeriesEnvelope.d.ts.map +1 -0
- package/dist/models/SeriesEnvelope.js +46 -0
- package/dist/models/SeriesEnvelope.js.map +1 -0
- package/dist/models/SeriesListResponse.d.ts +41 -0
- package/dist/models/SeriesListResponse.d.ts.map +1 -0
- package/dist/models/SeriesListResponse.js +46 -0
- package/dist/models/SeriesListResponse.js.map +1 -0
- package/dist/models/SeriesSummary.d.ts +45 -0
- package/dist/models/SeriesSummary.d.ts.map +1 -0
- package/dist/models/SeriesSummary.js +46 -0
- package/dist/models/SeriesSummary.js.map +1 -0
- package/dist/models/SeriesWinner.d.ts +39 -0
- package/dist/models/SeriesWinner.d.ts.map +1 -0
- package/dist/models/SeriesWinner.js +44 -0
- package/dist/models/SeriesWinner.js.map +1 -0
- package/dist/models/SignupRequest.d.ts +39 -0
- package/dist/models/SignupRequest.d.ts.map +1 -0
- package/dist/models/SignupRequest.js +48 -0
- package/dist/models/SignupRequest.js.map +1 -0
- package/dist/models/SourceCredit.d.ts +45 -0
- package/dist/models/SourceCredit.d.ts.map +1 -0
- package/dist/models/SourceCredit.js +52 -0
- package/dist/models/SourceCredit.js.map +1 -0
- package/dist/models/Stream.d.ts +57 -0
- package/dist/models/Stream.d.ts.map +1 -0
- package/dist/models/Stream.js +50 -0
- package/dist/models/Stream.js.map +1 -0
- package/dist/models/TeamForm.d.ts +59 -0
- package/dist/models/TeamForm.d.ts.map +1 -0
- package/dist/models/TeamForm.js +63 -0
- package/dist/models/TeamForm.js.map +1 -0
- package/dist/models/Tournament.d.ts +148 -0
- package/dist/models/Tournament.d.ts.map +1 -0
- package/dist/models/Tournament.js +88 -0
- package/dist/models/Tournament.js.map +1 -0
- package/dist/models/TournamentEnvelope.d.ts +41 -0
- package/dist/models/TournamentEnvelope.d.ts.map +1 -0
- package/dist/models/TournamentEnvelope.js +46 -0
- package/dist/models/TournamentEnvelope.js.map +1 -0
- package/dist/models/TournamentPrizePool.d.ts +39 -0
- package/dist/models/TournamentPrizePool.d.ts.map +1 -0
- package/dist/models/TournamentPrizePool.js +44 -0
- package/dist/models/TournamentPrizePool.js.map +1 -0
- package/dist/models/TournamentSummary.d.ts +57 -0
- package/dist/models/TournamentSummary.d.ts.map +1 -0
- package/dist/models/TournamentSummary.js +50 -0
- package/dist/models/TournamentSummary.js.map +1 -0
- package/dist/models/TournamentsListResponse.d.ts +41 -0
- package/dist/models/TournamentsListResponse.d.ts.map +1 -0
- package/dist/models/TournamentsListResponse.js +46 -0
- package/dist/models/TournamentsListResponse.js.map +1 -0
- package/dist/models/UsageRow.d.ts +63 -0
- package/dist/models/UsageRow.d.ts.map +1 -0
- package/dist/models/UsageRow.js +52 -0
- package/dist/models/UsageRow.js.map +1 -0
- package/dist/models/UsageToday.d.ts +57 -0
- package/dist/models/UsageToday.d.ts.map +1 -0
- package/dist/models/UsageToday.js +50 -0
- package/dist/models/UsageToday.js.map +1 -0
- package/dist/models/WebhookSubscription.d.ts +81 -0
- package/dist/models/WebhookSubscription.d.ts.map +1 -0
- package/dist/models/WebhookSubscription.js +66 -0
- package/dist/models/WebhookSubscription.js.map +1 -0
- package/dist/models/WebhookSubscriptionRequest.d.ts +67 -0
- package/dist/models/WebhookSubscriptionRequest.d.ts.map +1 -0
- package/dist/models/WebhookSubscriptionRequest.js +63 -0
- package/dist/models/WebhookSubscriptionRequest.js.map +1 -0
- package/dist/models/WebhooksCreate201Response.d.ts +87 -0
- package/dist/models/WebhooksCreate201Response.d.ts.map +1 -0
- package/dist/models/WebhooksCreate201Response.js +68 -0
- package/dist/models/WebhooksCreate201Response.js.map +1 -0
- package/dist/models/WebhooksList200Response.d.ts +34 -0
- package/dist/models/WebhooksList200Response.d.ts.map +1 -0
- package/dist/models/WebhooksList200Response.js +43 -0
- package/dist/models/WebhooksList200Response.js.map +1 -0
- package/dist/models/index.d.ts +56 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +58 -0
- package/dist/models/index.js.map +1 -0
- package/dist/runtime.d.ts +185 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +338 -0
- package/dist/runtime.js.map +1 -0
- package/dist/webhooks.d.ts +29 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +77 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +60 -0
- package/src/apis/AccountApi.ts +474 -0
- package/src/apis/AuthApi.ts +446 -0
- package/src/apis/BillingApi.ts +180 -0
- package/src/apis/GamesApi.ts +195 -0
- package/src/apis/LeaguesApi.ts +457 -0
- package/src/apis/MatchesApi.ts +368 -0
- package/src/apis/MetaApi.ts +289 -0
- package/src/apis/SeriesApi.ts +454 -0
- package/src/apis/TournamentsApi.ts +290 -0
- package/src/apis/WebhooksApi.ts +336 -0
- package/src/apis/index.ts +12 -0
- package/src/from_env.ts +68 -0
- package/src/index.ts +5 -0
- package/src/models/APIKeySummary.ts +101 -0
- package/src/models/AccountCreateKey201Response.ts +128 -0
- package/src/models/AccountCreateKeyRequest.ts +66 -0
- package/src/models/AccountListKeys200Response.ts +73 -0
- package/src/models/AccountMeCapabilities200Response.ts +88 -0
- package/src/models/AccountUsageRecent200Response.ts +73 -0
- package/src/models/AuthMeResponse.ts +88 -0
- package/src/models/AuthMeResponseData.ts +81 -0
- package/src/models/CS2PreviewExtras.ts +89 -0
- package/src/models/CS2PreviewExtrasMapVetoHistory.ts +89 -0
- package/src/models/CS2PreviewExtrasMapWinRateValue.ts +73 -0
- package/src/models/CapabilitySet.ts +114 -0
- package/src/models/ErrorBody.ts +91 -0
- package/src/models/ErrorEnvelope.ts +74 -0
- package/src/models/Game.ts +125 -0
- package/src/models/GameEnvelope.ts +88 -0
- package/src/models/GamesListResponse.ts +88 -0
- package/src/models/HeadToHead.ts +92 -0
- package/src/models/Healthz200Response.ts +75 -0
- package/src/models/Last5Result.ts +113 -0
- package/src/models/League.ts +129 -0
- package/src/models/LeagueEnvelope.ts +88 -0
- package/src/models/LeagueSummary.ts +81 -0
- package/src/models/LeaguesListResponse.ts +88 -0
- package/src/models/Match.ts +243 -0
- package/src/models/MatchEnvelope.ts +88 -0
- package/src/models/MatchParticipant.ts +97 -0
- package/src/models/MatchPreview.ts +137 -0
- package/src/models/MatchPreviewEnvelope.ts +88 -0
- package/src/models/MatchPreviewForm.ts +83 -0
- package/src/models/MatchPreviewLast5.ts +83 -0
- package/src/models/MatchesListResponse.ts +88 -0
- package/src/models/Meta.ts +112 -0
- package/src/models/Paging.ts +81 -0
- package/src/models/RootVersion200Response.ts +81 -0
- package/src/models/Series.ts +152 -0
- package/src/models/SeriesEnvelope.ts +88 -0
- package/src/models/SeriesListResponse.ts +88 -0
- package/src/models/SeriesSummary.ts +81 -0
- package/src/models/SeriesWinner.ts +73 -0
- package/src/models/SignupRequest.ts +75 -0
- package/src/models/SourceCredit.ts +84 -0
- package/src/models/Stream.ts +97 -0
- package/src/models/TeamForm.ts +104 -0
- package/src/models/Tournament.ts +236 -0
- package/src/models/TournamentEnvelope.ts +88 -0
- package/src/models/TournamentPrizePool.ts +73 -0
- package/src/models/TournamentSummary.ts +97 -0
- package/src/models/TournamentsListResponse.ts +88 -0
- package/src/models/UsageRow.ts +105 -0
- package/src/models/UsageToday.ts +97 -0
- package/src/models/WebhookSubscription.ts +133 -0
- package/src/models/WebhookSubscriptionRequest.ts +112 -0
- package/src/models/WebhooksCreate201Response.ts +141 -0
- package/src/models/WebhooksList200Response.ts +73 -0
- package/src/models/index.ts +57 -0
- package/src/runtime.ts +449 -0
- package/src/webhooks.ts +91 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Stadar Esports Data API
|
|
5
|
+
* Read-only, betting-friendly esports data across all major competitive titles. Flat-tier pricing (no per-game gates), Polar- billed subscriptions (Merchant of Record), sandbox keys for evaluation. See https://stadar.net for tier pricing. All endpoints under `/v1/...`. The version in `info.version` matches the URL prefix; non-breaking field additions ship in `/v1`, breaking changes get a `/v2`. We commit to 24 months of `/v1` support after `/v2` ships. Times are UTC end-to-end (RFC 3339). Localization is the client\'s problem. Cursors are opaque base64 strings; treat them as such.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
* Contact: api@stadar.net
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type AccountCreateKey201Response,
|
|
18
|
+
AccountCreateKey201ResponseFromJSON,
|
|
19
|
+
AccountCreateKey201ResponseToJSON,
|
|
20
|
+
} from '../models/AccountCreateKey201Response';
|
|
21
|
+
import {
|
|
22
|
+
type AccountCreateKeyRequest,
|
|
23
|
+
AccountCreateKeyRequestFromJSON,
|
|
24
|
+
AccountCreateKeyRequestToJSON,
|
|
25
|
+
} from '../models/AccountCreateKeyRequest';
|
|
26
|
+
import {
|
|
27
|
+
type AccountListKeys200Response,
|
|
28
|
+
AccountListKeys200ResponseFromJSON,
|
|
29
|
+
AccountListKeys200ResponseToJSON,
|
|
30
|
+
} from '../models/AccountListKeys200Response';
|
|
31
|
+
import {
|
|
32
|
+
type AccountMeCapabilities200Response,
|
|
33
|
+
AccountMeCapabilities200ResponseFromJSON,
|
|
34
|
+
AccountMeCapabilities200ResponseToJSON,
|
|
35
|
+
} from '../models/AccountMeCapabilities200Response';
|
|
36
|
+
import {
|
|
37
|
+
type AccountUsageRecent200Response,
|
|
38
|
+
AccountUsageRecent200ResponseFromJSON,
|
|
39
|
+
AccountUsageRecent200ResponseToJSON,
|
|
40
|
+
} from '../models/AccountUsageRecent200Response';
|
|
41
|
+
import {
|
|
42
|
+
type ErrorEnvelope,
|
|
43
|
+
ErrorEnvelopeFromJSON,
|
|
44
|
+
ErrorEnvelopeToJSON,
|
|
45
|
+
} from '../models/ErrorEnvelope';
|
|
46
|
+
import {
|
|
47
|
+
type UsageToday,
|
|
48
|
+
UsageTodayFromJSON,
|
|
49
|
+
UsageTodayToJSON,
|
|
50
|
+
} from '../models/UsageToday';
|
|
51
|
+
|
|
52
|
+
export interface AccountCreateKeyOperationRequest {
|
|
53
|
+
accountCreateKeyRequest: AccountCreateKeyRequest;
|
|
54
|
+
mode?: AccountCreateKeyOperationModeEnum;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface AccountDeleteKeyRequest {
|
|
58
|
+
id: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* AccountApi - interface
|
|
63
|
+
*
|
|
64
|
+
* @export
|
|
65
|
+
* @interface AccountApiInterface
|
|
66
|
+
*/
|
|
67
|
+
export interface AccountApiInterface {
|
|
68
|
+
/**
|
|
69
|
+
* Creates request options for accountCreateKey without sending the request
|
|
70
|
+
* @param {AccountCreateKeyRequest} accountCreateKeyRequest
|
|
71
|
+
* @param {'live' | 'sandbox'} [mode] `live` (default) returns a production `esp_live_<22>` key. `sandbox` returns an `esp_test_<22>` key. Sandbox keys hit the fixture-only schema and never burn production quota.
|
|
72
|
+
* @throws {RequiredError}
|
|
73
|
+
* @memberof AccountApiInterface
|
|
74
|
+
*/
|
|
75
|
+
accountCreateKeyRequestOpts(requestParameters: AccountCreateKeyOperationRequest): Promise<runtime.RequestOpts>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Generates a new key. The raw key is returned in the response EXACTLY ONCE — save it; subsequent calls only return the non-secret summary. Sandbox keys (`?mode=sandbox`) mint with prefix `esp_test_` and route to the curated fixture set (`esports_sandbox` schema, separate quota counter).
|
|
79
|
+
* @summary Mint a new API key
|
|
80
|
+
* @param {AccountCreateKeyRequest} accountCreateKeyRequest
|
|
81
|
+
* @param {'live' | 'sandbox'} [mode] `live` (default) returns a production `esp_live_<22>` key. `sandbox` returns an `esp_test_<22>` key. Sandbox keys hit the fixture-only schema and never burn production quota.
|
|
82
|
+
* @param {*} [options] Override http request option.
|
|
83
|
+
* @throws {RequiredError}
|
|
84
|
+
* @memberof AccountApiInterface
|
|
85
|
+
*/
|
|
86
|
+
accountCreateKeyRaw(requestParameters: AccountCreateKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCreateKey201Response>>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Generates a new key. The raw key is returned in the response EXACTLY ONCE — save it; subsequent calls only return the non-secret summary. Sandbox keys (`?mode=sandbox`) mint with prefix `esp_test_` and route to the curated fixture set (`esports_sandbox` schema, separate quota counter).
|
|
90
|
+
* Mint a new API key
|
|
91
|
+
*/
|
|
92
|
+
accountCreateKey(requestParameters: AccountCreateKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCreateKey201Response>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Creates request options for accountDeleteKey without sending the request
|
|
96
|
+
* @param {number} id
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
* @memberof AccountApiInterface
|
|
99
|
+
*/
|
|
100
|
+
accountDeleteKeyRequestOpts(requestParameters: AccountDeleteKeyRequest): Promise<runtime.RequestOpts>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @summary Revoke an API key
|
|
105
|
+
* @param {number} id
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
* @memberof AccountApiInterface
|
|
109
|
+
*/
|
|
110
|
+
accountDeleteKeyRaw(requestParameters: AccountDeleteKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Revoke an API key
|
|
114
|
+
*/
|
|
115
|
+
accountDeleteKey(requestParameters: AccountDeleteKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Creates request options for accountListKeys without sending the request
|
|
119
|
+
* @throws {RequiredError}
|
|
120
|
+
* @memberof AccountApiInterface
|
|
121
|
+
*/
|
|
122
|
+
accountListKeysRequestOpts(): Promise<runtime.RequestOpts>;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Returns the non-secret summary of every active key (id, name, prefix, created_at, last_used_at). Revoked keys are excluded.
|
|
126
|
+
* @summary List API keys
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
* @memberof AccountApiInterface
|
|
130
|
+
*/
|
|
131
|
+
accountListKeysRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountListKeys200Response>>;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Returns the non-secret summary of every active key (id, name, prefix, created_at, last_used_at). Revoked keys are excluded.
|
|
135
|
+
* List API keys
|
|
136
|
+
*/
|
|
137
|
+
accountListKeys(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountListKeys200Response>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Creates request options for accountMeCapabilities without sending the request
|
|
141
|
+
* @throws {RequiredError}
|
|
142
|
+
* @memberof AccountApiInterface
|
|
143
|
+
*/
|
|
144
|
+
accountMeCapabilitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Returns the calling user\'s current tier and the list of capability tokens unlocked. SDK consumers call this to surface \"why am I getting a 402\" without guessing — the envelope\'s `data.capabilities` is authoritative.
|
|
148
|
+
* @summary Effective capabilities for the calling user
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
* @memberof AccountApiInterface
|
|
152
|
+
*/
|
|
153
|
+
accountMeCapabilitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountMeCapabilities200Response>>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Returns the calling user\'s current tier and the list of capability tokens unlocked. SDK consumers call this to surface \"why am I getting a 402\" without guessing — the envelope\'s `data.capabilities` is authoritative.
|
|
157
|
+
* Effective capabilities for the calling user
|
|
158
|
+
*/
|
|
159
|
+
accountMeCapabilities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountMeCapabilities200Response>;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Creates request options for accountUsageRecent without sending the request
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
* @memberof AccountApiInterface
|
|
165
|
+
*/
|
|
166
|
+
accountUsageRecentRequestOpts(): Promise<runtime.RequestOpts>;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Returns the last 50 logged requests for the calling user\'s API keys. Content-negotiates: `Accept: text/event-stream` upgrades to SSE; default JSON.
|
|
170
|
+
* @summary Recent request log
|
|
171
|
+
* @param {*} [options] Override http request option.
|
|
172
|
+
* @throws {RequiredError}
|
|
173
|
+
* @memberof AccountApiInterface
|
|
174
|
+
*/
|
|
175
|
+
accountUsageRecentRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountUsageRecent200Response>>;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Returns the last 50 logged requests for the calling user\'s API keys. Content-negotiates: `Accept: text/event-stream` upgrades to SSE; default JSON.
|
|
179
|
+
* Recent request log
|
|
180
|
+
*/
|
|
181
|
+
accountUsageRecent(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountUsageRecent200Response>;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Creates request options for accountUsageToday without sending the request
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
* @memberof AccountApiInterface
|
|
187
|
+
*/
|
|
188
|
+
accountUsageTodayRequestOpts(): Promise<runtime.RequestOpts>;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Returns `{count, quota, pct, tier, resets_at_utc}` for the current UTC day. Reads the Redis counter the Quota middleware writes — same source of truth as the rate limiter.
|
|
192
|
+
* @summary Today\'s quota counter
|
|
193
|
+
* @param {*} [options] Override http request option.
|
|
194
|
+
* @throws {RequiredError}
|
|
195
|
+
* @memberof AccountApiInterface
|
|
196
|
+
*/
|
|
197
|
+
accountUsageTodayRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsageToday>>;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Returns `{count, quota, pct, tier, resets_at_utc}` for the current UTC day. Reads the Redis counter the Quota middleware writes — same source of truth as the rate limiter.
|
|
201
|
+
* Today\'s quota counter
|
|
202
|
+
*/
|
|
203
|
+
accountUsageToday(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsageToday>;
|
|
204
|
+
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
210
|
+
export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Creates request options for accountCreateKey without sending the request
|
|
214
|
+
*/
|
|
215
|
+
async accountCreateKeyRequestOpts(requestParameters: AccountCreateKeyOperationRequest): Promise<runtime.RequestOpts> {
|
|
216
|
+
if (requestParameters['accountCreateKeyRequest'] == null) {
|
|
217
|
+
throw new runtime.RequiredError(
|
|
218
|
+
'accountCreateKeyRequest',
|
|
219
|
+
'Required parameter "accountCreateKeyRequest" was null or undefined when calling accountCreateKey().'
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const queryParameters: any = {};
|
|
224
|
+
|
|
225
|
+
if (requestParameters['mode'] != null) {
|
|
226
|
+
queryParameters['mode'] = requestParameters['mode'];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
230
|
+
|
|
231
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
let urlPath = `/v1/account/keys`;
|
|
235
|
+
|
|
236
|
+
return {
|
|
237
|
+
path: urlPath,
|
|
238
|
+
method: 'POST',
|
|
239
|
+
headers: headerParameters,
|
|
240
|
+
query: queryParameters,
|
|
241
|
+
body: AccountCreateKeyRequestToJSON(requestParameters['accountCreateKeyRequest']),
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Generates a new key. The raw key is returned in the response EXACTLY ONCE — save it; subsequent calls only return the non-secret summary. Sandbox keys (`?mode=sandbox`) mint with prefix `esp_test_` and route to the curated fixture set (`esports_sandbox` schema, separate quota counter).
|
|
247
|
+
* Mint a new API key
|
|
248
|
+
*/
|
|
249
|
+
async accountCreateKeyRaw(requestParameters: AccountCreateKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCreateKey201Response>> {
|
|
250
|
+
const requestOptions = await this.accountCreateKeyRequestOpts(requestParameters);
|
|
251
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
252
|
+
|
|
253
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountCreateKey201ResponseFromJSON(jsonValue));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Generates a new key. The raw key is returned in the response EXACTLY ONCE — save it; subsequent calls only return the non-secret summary. Sandbox keys (`?mode=sandbox`) mint with prefix `esp_test_` and route to the curated fixture set (`esports_sandbox` schema, separate quota counter).
|
|
258
|
+
* Mint a new API key
|
|
259
|
+
*/
|
|
260
|
+
async accountCreateKey(requestParameters: AccountCreateKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCreateKey201Response> {
|
|
261
|
+
const response = await this.accountCreateKeyRaw(requestParameters, initOverrides);
|
|
262
|
+
return await response.value();
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Creates request options for accountDeleteKey without sending the request
|
|
267
|
+
*/
|
|
268
|
+
async accountDeleteKeyRequestOpts(requestParameters: AccountDeleteKeyRequest): Promise<runtime.RequestOpts> {
|
|
269
|
+
if (requestParameters['id'] == null) {
|
|
270
|
+
throw new runtime.RequiredError(
|
|
271
|
+
'id',
|
|
272
|
+
'Required parameter "id" was null or undefined when calling accountDeleteKey().'
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const queryParameters: any = {};
|
|
277
|
+
|
|
278
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
let urlPath = `/v1/account/keys/{id}`;
|
|
282
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
283
|
+
|
|
284
|
+
return {
|
|
285
|
+
path: urlPath,
|
|
286
|
+
method: 'DELETE',
|
|
287
|
+
headers: headerParameters,
|
|
288
|
+
query: queryParameters,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Revoke an API key
|
|
294
|
+
*/
|
|
295
|
+
async accountDeleteKeyRaw(requestParameters: AccountDeleteKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
296
|
+
const requestOptions = await this.accountDeleteKeyRequestOpts(requestParameters);
|
|
297
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
298
|
+
|
|
299
|
+
return new runtime.VoidApiResponse(response);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Revoke an API key
|
|
304
|
+
*/
|
|
305
|
+
async accountDeleteKey(requestParameters: AccountDeleteKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
306
|
+
await this.accountDeleteKeyRaw(requestParameters, initOverrides);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Creates request options for accountListKeys without sending the request
|
|
311
|
+
*/
|
|
312
|
+
async accountListKeysRequestOpts(): Promise<runtime.RequestOpts> {
|
|
313
|
+
const queryParameters: any = {};
|
|
314
|
+
|
|
315
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
let urlPath = `/v1/account/keys`;
|
|
319
|
+
|
|
320
|
+
return {
|
|
321
|
+
path: urlPath,
|
|
322
|
+
method: 'GET',
|
|
323
|
+
headers: headerParameters,
|
|
324
|
+
query: queryParameters,
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Returns the non-secret summary of every active key (id, name, prefix, created_at, last_used_at). Revoked keys are excluded.
|
|
330
|
+
* List API keys
|
|
331
|
+
*/
|
|
332
|
+
async accountListKeysRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountListKeys200Response>> {
|
|
333
|
+
const requestOptions = await this.accountListKeysRequestOpts();
|
|
334
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
335
|
+
|
|
336
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountListKeys200ResponseFromJSON(jsonValue));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Returns the non-secret summary of every active key (id, name, prefix, created_at, last_used_at). Revoked keys are excluded.
|
|
341
|
+
* List API keys
|
|
342
|
+
*/
|
|
343
|
+
async accountListKeys(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountListKeys200Response> {
|
|
344
|
+
const response = await this.accountListKeysRaw(initOverrides);
|
|
345
|
+
return await response.value();
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Creates request options for accountMeCapabilities without sending the request
|
|
350
|
+
*/
|
|
351
|
+
async accountMeCapabilitiesRequestOpts(): Promise<runtime.RequestOpts> {
|
|
352
|
+
const queryParameters: any = {};
|
|
353
|
+
|
|
354
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
let urlPath = `/v1/account/me/capabilities`;
|
|
358
|
+
|
|
359
|
+
return {
|
|
360
|
+
path: urlPath,
|
|
361
|
+
method: 'GET',
|
|
362
|
+
headers: headerParameters,
|
|
363
|
+
query: queryParameters,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Returns the calling user\'s current tier and the list of capability tokens unlocked. SDK consumers call this to surface \"why am I getting a 402\" without guessing — the envelope\'s `data.capabilities` is authoritative.
|
|
369
|
+
* Effective capabilities for the calling user
|
|
370
|
+
*/
|
|
371
|
+
async accountMeCapabilitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountMeCapabilities200Response>> {
|
|
372
|
+
const requestOptions = await this.accountMeCapabilitiesRequestOpts();
|
|
373
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
374
|
+
|
|
375
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountMeCapabilities200ResponseFromJSON(jsonValue));
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Returns the calling user\'s current tier and the list of capability tokens unlocked. SDK consumers call this to surface \"why am I getting a 402\" without guessing — the envelope\'s `data.capabilities` is authoritative.
|
|
380
|
+
* Effective capabilities for the calling user
|
|
381
|
+
*/
|
|
382
|
+
async accountMeCapabilities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountMeCapabilities200Response> {
|
|
383
|
+
const response = await this.accountMeCapabilitiesRaw(initOverrides);
|
|
384
|
+
return await response.value();
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Creates request options for accountUsageRecent without sending the request
|
|
389
|
+
*/
|
|
390
|
+
async accountUsageRecentRequestOpts(): Promise<runtime.RequestOpts> {
|
|
391
|
+
const queryParameters: any = {};
|
|
392
|
+
|
|
393
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
let urlPath = `/v1/account/usage/recent`;
|
|
397
|
+
|
|
398
|
+
return {
|
|
399
|
+
path: urlPath,
|
|
400
|
+
method: 'GET',
|
|
401
|
+
headers: headerParameters,
|
|
402
|
+
query: queryParameters,
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Returns the last 50 logged requests for the calling user\'s API keys. Content-negotiates: `Accept: text/event-stream` upgrades to SSE; default JSON.
|
|
408
|
+
* Recent request log
|
|
409
|
+
*/
|
|
410
|
+
async accountUsageRecentRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountUsageRecent200Response>> {
|
|
411
|
+
const requestOptions = await this.accountUsageRecentRequestOpts();
|
|
412
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
413
|
+
|
|
414
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountUsageRecent200ResponseFromJSON(jsonValue));
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Returns the last 50 logged requests for the calling user\'s API keys. Content-negotiates: `Accept: text/event-stream` upgrades to SSE; default JSON.
|
|
419
|
+
* Recent request log
|
|
420
|
+
*/
|
|
421
|
+
async accountUsageRecent(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountUsageRecent200Response> {
|
|
422
|
+
const response = await this.accountUsageRecentRaw(initOverrides);
|
|
423
|
+
return await response.value();
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Creates request options for accountUsageToday without sending the request
|
|
428
|
+
*/
|
|
429
|
+
async accountUsageTodayRequestOpts(): Promise<runtime.RequestOpts> {
|
|
430
|
+
const queryParameters: any = {};
|
|
431
|
+
|
|
432
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
let urlPath = `/v1/account/usage/today`;
|
|
436
|
+
|
|
437
|
+
return {
|
|
438
|
+
path: urlPath,
|
|
439
|
+
method: 'GET',
|
|
440
|
+
headers: headerParameters,
|
|
441
|
+
query: queryParameters,
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Returns `{count, quota, pct, tier, resets_at_utc}` for the current UTC day. Reads the Redis counter the Quota middleware writes — same source of truth as the rate limiter.
|
|
447
|
+
* Today\'s quota counter
|
|
448
|
+
*/
|
|
449
|
+
async accountUsageTodayRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsageToday>> {
|
|
450
|
+
const requestOptions = await this.accountUsageTodayRequestOpts();
|
|
451
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
452
|
+
|
|
453
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UsageTodayFromJSON(jsonValue));
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Returns `{count, quota, pct, tier, resets_at_utc}` for the current UTC day. Reads the Redis counter the Quota middleware writes — same source of truth as the rate limiter.
|
|
458
|
+
* Today\'s quota counter
|
|
459
|
+
*/
|
|
460
|
+
async accountUsageToday(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsageToday> {
|
|
461
|
+
const response = await this.accountUsageTodayRaw(initOverrides);
|
|
462
|
+
return await response.value();
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* @export
|
|
469
|
+
*/
|
|
470
|
+
export const AccountCreateKeyOperationModeEnum = {
|
|
471
|
+
Live: 'live',
|
|
472
|
+
Sandbox: 'sandbox'
|
|
473
|
+
} as const;
|
|
474
|
+
export type AccountCreateKeyOperationModeEnum = typeof AccountCreateKeyOperationModeEnum[keyof typeof AccountCreateKeyOperationModeEnum];
|