@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,290 @@
|
|
|
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 ErrorEnvelope,
|
|
18
|
+
ErrorEnvelopeFromJSON,
|
|
19
|
+
ErrorEnvelopeToJSON,
|
|
20
|
+
} from '../models/ErrorEnvelope';
|
|
21
|
+
import {
|
|
22
|
+
type TournamentEnvelope,
|
|
23
|
+
TournamentEnvelopeFromJSON,
|
|
24
|
+
TournamentEnvelopeToJSON,
|
|
25
|
+
} from '../models/TournamentEnvelope';
|
|
26
|
+
import {
|
|
27
|
+
type TournamentsListResponse,
|
|
28
|
+
TournamentsListResponseFromJSON,
|
|
29
|
+
TournamentsListResponseToJSON,
|
|
30
|
+
} from '../models/TournamentsListResponse';
|
|
31
|
+
|
|
32
|
+
export interface TournamentsGetRequest {
|
|
33
|
+
id: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface TournamentsListRequest {
|
|
37
|
+
cursor?: string;
|
|
38
|
+
limit?: number;
|
|
39
|
+
game?: string;
|
|
40
|
+
status?: TournamentsListStatusEnum;
|
|
41
|
+
tier?: TournamentsListTierEnum;
|
|
42
|
+
region?: string;
|
|
43
|
+
leagueId?: number;
|
|
44
|
+
seriesId?: number;
|
|
45
|
+
from?: Date;
|
|
46
|
+
to?: Date;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* TournamentsApi - interface
|
|
51
|
+
*
|
|
52
|
+
* @export
|
|
53
|
+
* @interface TournamentsApiInterface
|
|
54
|
+
*/
|
|
55
|
+
export interface TournamentsApiInterface {
|
|
56
|
+
/**
|
|
57
|
+
* Creates request options for tournamentsGet without sending the request
|
|
58
|
+
* @param {string} id
|
|
59
|
+
* @throws {RequiredError}
|
|
60
|
+
* @memberof TournamentsApiInterface
|
|
61
|
+
*/
|
|
62
|
+
tournamentsGetRequestOpts(requestParameters: TournamentsGetRequest): Promise<runtime.RequestOpts>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @summary Get a single tournament
|
|
67
|
+
* @param {string} id
|
|
68
|
+
* @param {*} [options] Override http request option.
|
|
69
|
+
* @throws {RequiredError}
|
|
70
|
+
* @memberof TournamentsApiInterface
|
|
71
|
+
*/
|
|
72
|
+
tournamentsGetRaw(requestParameters: TournamentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TournamentEnvelope>>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Get a single tournament
|
|
76
|
+
*/
|
|
77
|
+
tournamentsGet(requestParameters: TournamentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TournamentEnvelope>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Creates request options for tournamentsList without sending the request
|
|
81
|
+
* @param {string} [cursor] Opaque pagination cursor. Hand back the value from `meta.next_cursor` to fetch the next page. Cursors are valid for at least 24 hours; treat them as opaque strings.
|
|
82
|
+
* @param {number} [limit] Items per page. 1-200, default 50. (Pro+ on `/v1/matches` may request up to 10k via `?bulk=true`.)
|
|
83
|
+
* @param {string} [game]
|
|
84
|
+
* @param {'upcoming' | 'live' | 'completed' | 'cancelled'} [status]
|
|
85
|
+
* @param {'s' | 'a' | 'b' | 'c' | 'd'} [tier]
|
|
86
|
+
* @param {string} [region]
|
|
87
|
+
* @param {number} [leagueId]
|
|
88
|
+
* @param {number} [seriesId]
|
|
89
|
+
* @param {Date} [from]
|
|
90
|
+
* @param {Date} [to]
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
* @memberof TournamentsApiInterface
|
|
93
|
+
*/
|
|
94
|
+
tournamentsListRequestOpts(requestParameters: TournamentsListRequest): Promise<runtime.RequestOpts>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Returns tournaments with denormalized league/series summaries. Brackets (the DAG of previous-match edges) are gated to Hobbyist+ via the `brackets` capability — Free-tier callers see the tournament metadata but `brackets` field is omitted.
|
|
98
|
+
* @summary List tournaments
|
|
99
|
+
* @param {string} [cursor] Opaque pagination cursor. Hand back the value from `meta.next_cursor` to fetch the next page. Cursors are valid for at least 24 hours; treat them as opaque strings.
|
|
100
|
+
* @param {number} [limit] Items per page. 1-200, default 50. (Pro+ on `/v1/matches` may request up to 10k via `?bulk=true`.)
|
|
101
|
+
* @param {string} [game]
|
|
102
|
+
* @param {'upcoming' | 'live' | 'completed' | 'cancelled'} [status]
|
|
103
|
+
* @param {'s' | 'a' | 'b' | 'c' | 'd'} [tier]
|
|
104
|
+
* @param {string} [region]
|
|
105
|
+
* @param {number} [leagueId]
|
|
106
|
+
* @param {number} [seriesId]
|
|
107
|
+
* @param {Date} [from]
|
|
108
|
+
* @param {Date} [to]
|
|
109
|
+
* @param {*} [options] Override http request option.
|
|
110
|
+
* @throws {RequiredError}
|
|
111
|
+
* @memberof TournamentsApiInterface
|
|
112
|
+
*/
|
|
113
|
+
tournamentsListRaw(requestParameters: TournamentsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TournamentsListResponse>>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Returns tournaments with denormalized league/series summaries. Brackets (the DAG of previous-match edges) are gated to Hobbyist+ via the `brackets` capability — Free-tier callers see the tournament metadata but `brackets` field is omitted.
|
|
117
|
+
* List tournaments
|
|
118
|
+
*/
|
|
119
|
+
tournamentsList(requestParameters: TournamentsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TournamentsListResponse>;
|
|
120
|
+
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
export class TournamentsApi extends runtime.BaseAPI implements TournamentsApiInterface {
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Creates request options for tournamentsGet without sending the request
|
|
130
|
+
*/
|
|
131
|
+
async tournamentsGetRequestOpts(requestParameters: TournamentsGetRequest): Promise<runtime.RequestOpts> {
|
|
132
|
+
if (requestParameters['id'] == null) {
|
|
133
|
+
throw new runtime.RequiredError(
|
|
134
|
+
'id',
|
|
135
|
+
'Required parameter "id" was null or undefined when calling tournamentsGet().'
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const queryParameters: any = {};
|
|
140
|
+
|
|
141
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
142
|
+
|
|
143
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
144
|
+
const token = this.configuration.accessToken;
|
|
145
|
+
const tokenString = await token("apiKey", []);
|
|
146
|
+
|
|
147
|
+
if (tokenString) {
|
|
148
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
let urlPath = `/v1/tournaments/{id}`;
|
|
153
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
path: urlPath,
|
|
157
|
+
method: 'GET',
|
|
158
|
+
headers: headerParameters,
|
|
159
|
+
query: queryParameters,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Get a single tournament
|
|
165
|
+
*/
|
|
166
|
+
async tournamentsGetRaw(requestParameters: TournamentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TournamentEnvelope>> {
|
|
167
|
+
const requestOptions = await this.tournamentsGetRequestOpts(requestParameters);
|
|
168
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
169
|
+
|
|
170
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TournamentEnvelopeFromJSON(jsonValue));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Get a single tournament
|
|
175
|
+
*/
|
|
176
|
+
async tournamentsGet(requestParameters: TournamentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TournamentEnvelope> {
|
|
177
|
+
const response = await this.tournamentsGetRaw(requestParameters, initOverrides);
|
|
178
|
+
return await response.value();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Creates request options for tournamentsList without sending the request
|
|
183
|
+
*/
|
|
184
|
+
async tournamentsListRequestOpts(requestParameters: TournamentsListRequest): Promise<runtime.RequestOpts> {
|
|
185
|
+
const queryParameters: any = {};
|
|
186
|
+
|
|
187
|
+
if (requestParameters['cursor'] != null) {
|
|
188
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (requestParameters['limit'] != null) {
|
|
192
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (requestParameters['game'] != null) {
|
|
196
|
+
queryParameters['game'] = requestParameters['game'];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (requestParameters['status'] != null) {
|
|
200
|
+
queryParameters['status'] = requestParameters['status'];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (requestParameters['tier'] != null) {
|
|
204
|
+
queryParameters['tier'] = requestParameters['tier'];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (requestParameters['region'] != null) {
|
|
208
|
+
queryParameters['region'] = requestParameters['region'];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (requestParameters['leagueId'] != null) {
|
|
212
|
+
queryParameters['league_id'] = requestParameters['leagueId'];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (requestParameters['seriesId'] != null) {
|
|
216
|
+
queryParameters['series_id'] = requestParameters['seriesId'];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (requestParameters['from'] != null) {
|
|
220
|
+
queryParameters['from'] = (requestParameters['from'] as any).toISOString().substring(0,10);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (requestParameters['to'] != null) {
|
|
224
|
+
queryParameters['to'] = (requestParameters['to'] as any).toISOString().substring(0,10);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
228
|
+
|
|
229
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
230
|
+
const token = this.configuration.accessToken;
|
|
231
|
+
const tokenString = await token("apiKey", []);
|
|
232
|
+
|
|
233
|
+
if (tokenString) {
|
|
234
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
let urlPath = `/v1/tournaments`;
|
|
239
|
+
|
|
240
|
+
return {
|
|
241
|
+
path: urlPath,
|
|
242
|
+
method: 'GET',
|
|
243
|
+
headers: headerParameters,
|
|
244
|
+
query: queryParameters,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Returns tournaments with denormalized league/series summaries. Brackets (the DAG of previous-match edges) are gated to Hobbyist+ via the `brackets` capability — Free-tier callers see the tournament metadata but `brackets` field is omitted.
|
|
250
|
+
* List tournaments
|
|
251
|
+
*/
|
|
252
|
+
async tournamentsListRaw(requestParameters: TournamentsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TournamentsListResponse>> {
|
|
253
|
+
const requestOptions = await this.tournamentsListRequestOpts(requestParameters);
|
|
254
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
255
|
+
|
|
256
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TournamentsListResponseFromJSON(jsonValue));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Returns tournaments with denormalized league/series summaries. Brackets (the DAG of previous-match edges) are gated to Hobbyist+ via the `brackets` capability — Free-tier callers see the tournament metadata but `brackets` field is omitted.
|
|
261
|
+
* List tournaments
|
|
262
|
+
*/
|
|
263
|
+
async tournamentsList(requestParameters: TournamentsListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TournamentsListResponse> {
|
|
264
|
+
const response = await this.tournamentsListRaw(requestParameters, initOverrides);
|
|
265
|
+
return await response.value();
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @export
|
|
272
|
+
*/
|
|
273
|
+
export const TournamentsListStatusEnum = {
|
|
274
|
+
Upcoming: 'upcoming',
|
|
275
|
+
Live: 'live',
|
|
276
|
+
Completed: 'completed',
|
|
277
|
+
Cancelled: 'cancelled'
|
|
278
|
+
} as const;
|
|
279
|
+
export type TournamentsListStatusEnum = typeof TournamentsListStatusEnum[keyof typeof TournamentsListStatusEnum];
|
|
280
|
+
/**
|
|
281
|
+
* @export
|
|
282
|
+
*/
|
|
283
|
+
export const TournamentsListTierEnum = {
|
|
284
|
+
S: 's',
|
|
285
|
+
A: 'a',
|
|
286
|
+
B: 'b',
|
|
287
|
+
C: 'c',
|
|
288
|
+
D: 'd'
|
|
289
|
+
} as const;
|
|
290
|
+
export type TournamentsListTierEnum = typeof TournamentsListTierEnum[keyof typeof TournamentsListTierEnum];
|
|
@@ -0,0 +1,336 @@
|
|
|
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 ErrorEnvelope,
|
|
18
|
+
ErrorEnvelopeFromJSON,
|
|
19
|
+
ErrorEnvelopeToJSON,
|
|
20
|
+
} from '../models/ErrorEnvelope';
|
|
21
|
+
import {
|
|
22
|
+
type WebhookSubscriptionRequest,
|
|
23
|
+
WebhookSubscriptionRequestFromJSON,
|
|
24
|
+
WebhookSubscriptionRequestToJSON,
|
|
25
|
+
} from '../models/WebhookSubscriptionRequest';
|
|
26
|
+
import {
|
|
27
|
+
type WebhooksCreate201Response,
|
|
28
|
+
WebhooksCreate201ResponseFromJSON,
|
|
29
|
+
WebhooksCreate201ResponseToJSON,
|
|
30
|
+
} from '../models/WebhooksCreate201Response';
|
|
31
|
+
import {
|
|
32
|
+
type WebhooksList200Response,
|
|
33
|
+
WebhooksList200ResponseFromJSON,
|
|
34
|
+
WebhooksList200ResponseToJSON,
|
|
35
|
+
} from '../models/WebhooksList200Response';
|
|
36
|
+
|
|
37
|
+
export interface PolarWebhookReceiveRequest {
|
|
38
|
+
body: object;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface WebhooksCreateRequest {
|
|
42
|
+
webhookSubscriptionRequest: WebhookSubscriptionRequest;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface WebhooksDeleteRequest {
|
|
46
|
+
id: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* WebhooksApi - interface
|
|
51
|
+
*
|
|
52
|
+
* @export
|
|
53
|
+
* @interface WebhooksApiInterface
|
|
54
|
+
*/
|
|
55
|
+
export interface WebhooksApiInterface {
|
|
56
|
+
/**
|
|
57
|
+
* Creates request options for polarWebhookReceive without sending the request
|
|
58
|
+
* @param {object} body
|
|
59
|
+
* @throws {RequiredError}
|
|
60
|
+
* @memberof WebhooksApiInterface
|
|
61
|
+
*/
|
|
62
|
+
polarWebhookReceiveRequestOpts(requestParameters: PolarWebhookReceiveRequest): Promise<runtime.RequestOpts>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Ingests Polar subscription events. HMAC-signed (Standard Webhooks spec). Idempotent on event_id. Customers should not call this directly; documented for completeness.
|
|
66
|
+
* @summary Polar.sh webhook receiver
|
|
67
|
+
* @param {object} body
|
|
68
|
+
* @param {*} [options] Override http request option.
|
|
69
|
+
* @throws {RequiredError}
|
|
70
|
+
* @memberof WebhooksApiInterface
|
|
71
|
+
*/
|
|
72
|
+
polarWebhookReceiveRaw(requestParameters: PolarWebhookReceiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Ingests Polar subscription events. HMAC-signed (Standard Webhooks spec). Idempotent on event_id. Customers should not call this directly; documented for completeness.
|
|
76
|
+
* Polar.sh webhook receiver
|
|
77
|
+
*/
|
|
78
|
+
polarWebhookReceive(requestParameters: PolarWebhookReceiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Creates request options for webhooksCreate without sending the request
|
|
82
|
+
* @param {WebhookSubscriptionRequest} webhookSubscriptionRequest
|
|
83
|
+
* @throws {RequiredError}
|
|
84
|
+
* @memberof WebhooksApiInterface
|
|
85
|
+
*/
|
|
86
|
+
webhooksCreateRequestOpts(requestParameters: WebhooksCreateRequest): Promise<runtime.RequestOpts>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Registers a new webhook URL. The signing secret is generated and returned EXACTLY ONCE. Optional filters narrow the events delivered (game, league, tournament). Pro tier or higher.
|
|
90
|
+
* @summary Create a webhook subscription
|
|
91
|
+
* @param {WebhookSubscriptionRequest} webhookSubscriptionRequest
|
|
92
|
+
* @param {*} [options] Override http request option.
|
|
93
|
+
* @throws {RequiredError}
|
|
94
|
+
* @memberof WebhooksApiInterface
|
|
95
|
+
*/
|
|
96
|
+
webhooksCreateRaw(requestParameters: WebhooksCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhooksCreate201Response>>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Registers a new webhook URL. The signing secret is generated and returned EXACTLY ONCE. Optional filters narrow the events delivered (game, league, tournament). Pro tier or higher.
|
|
100
|
+
* Create a webhook subscription
|
|
101
|
+
*/
|
|
102
|
+
webhooksCreate(requestParameters: WebhooksCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhooksCreate201Response>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Creates request options for webhooksDelete without sending the request
|
|
106
|
+
* @param {number} id
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
* @memberof WebhooksApiInterface
|
|
109
|
+
*/
|
|
110
|
+
webhooksDeleteRequestOpts(requestParameters: WebhooksDeleteRequest): Promise<runtime.RequestOpts>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @summary Revoke a webhook subscription
|
|
115
|
+
* @param {number} id
|
|
116
|
+
* @param {*} [options] Override http request option.
|
|
117
|
+
* @throws {RequiredError}
|
|
118
|
+
* @memberof WebhooksApiInterface
|
|
119
|
+
*/
|
|
120
|
+
webhooksDeleteRaw(requestParameters: WebhooksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Revoke a webhook subscription
|
|
124
|
+
*/
|
|
125
|
+
webhooksDelete(requestParameters: WebhooksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Creates request options for webhooksList without sending the request
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
* @memberof WebhooksApiInterface
|
|
131
|
+
*/
|
|
132
|
+
webhooksListRequestOpts(): Promise<runtime.RequestOpts>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Returns the calling API key\'s webhook subscriptions. Signing secrets are NEVER echoed; only the metadata.
|
|
136
|
+
* @summary List webhook subscriptions
|
|
137
|
+
* @param {*} [options] Override http request option.
|
|
138
|
+
* @throws {RequiredError}
|
|
139
|
+
* @memberof WebhooksApiInterface
|
|
140
|
+
*/
|
|
141
|
+
webhooksListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhooksList200Response>>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Returns the calling API key\'s webhook subscriptions. Signing secrets are NEVER echoed; only the metadata.
|
|
145
|
+
* List webhook subscriptions
|
|
146
|
+
*/
|
|
147
|
+
webhooksList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhooksList200Response>;
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface {
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for polarWebhookReceive without sending the request
|
|
158
|
+
*/
|
|
159
|
+
async polarWebhookReceiveRequestOpts(requestParameters: PolarWebhookReceiveRequest): Promise<runtime.RequestOpts> {
|
|
160
|
+
if (requestParameters['body'] == null) {
|
|
161
|
+
throw new runtime.RequiredError(
|
|
162
|
+
'body',
|
|
163
|
+
'Required parameter "body" was null or undefined when calling polarWebhookReceive().'
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const queryParameters: any = {};
|
|
168
|
+
|
|
169
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
170
|
+
|
|
171
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
let urlPath = `/v1/webhooks/polar`;
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
path: urlPath,
|
|
178
|
+
method: 'POST',
|
|
179
|
+
headers: headerParameters,
|
|
180
|
+
query: queryParameters,
|
|
181
|
+
body: requestParameters['body'] as any,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Ingests Polar subscription events. HMAC-signed (Standard Webhooks spec). Idempotent on event_id. Customers should not call this directly; documented for completeness.
|
|
187
|
+
* Polar.sh webhook receiver
|
|
188
|
+
*/
|
|
189
|
+
async polarWebhookReceiveRaw(requestParameters: PolarWebhookReceiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
190
|
+
const requestOptions = await this.polarWebhookReceiveRequestOpts(requestParameters);
|
|
191
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
192
|
+
|
|
193
|
+
return new runtime.VoidApiResponse(response);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Ingests Polar subscription events. HMAC-signed (Standard Webhooks spec). Idempotent on event_id. Customers should not call this directly; documented for completeness.
|
|
198
|
+
* Polar.sh webhook receiver
|
|
199
|
+
*/
|
|
200
|
+
async polarWebhookReceive(requestParameters: PolarWebhookReceiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
201
|
+
await this.polarWebhookReceiveRaw(requestParameters, initOverrides);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Creates request options for webhooksCreate without sending the request
|
|
206
|
+
*/
|
|
207
|
+
async webhooksCreateRequestOpts(requestParameters: WebhooksCreateRequest): Promise<runtime.RequestOpts> {
|
|
208
|
+
if (requestParameters['webhookSubscriptionRequest'] == null) {
|
|
209
|
+
throw new runtime.RequiredError(
|
|
210
|
+
'webhookSubscriptionRequest',
|
|
211
|
+
'Required parameter "webhookSubscriptionRequest" was null or undefined when calling webhooksCreate().'
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const queryParameters: any = {};
|
|
216
|
+
|
|
217
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
218
|
+
|
|
219
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
let urlPath = `/v1/account/webhooks`;
|
|
223
|
+
|
|
224
|
+
return {
|
|
225
|
+
path: urlPath,
|
|
226
|
+
method: 'POST',
|
|
227
|
+
headers: headerParameters,
|
|
228
|
+
query: queryParameters,
|
|
229
|
+
body: WebhookSubscriptionRequestToJSON(requestParameters['webhookSubscriptionRequest']),
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Registers a new webhook URL. The signing secret is generated and returned EXACTLY ONCE. Optional filters narrow the events delivered (game, league, tournament). Pro tier or higher.
|
|
235
|
+
* Create a webhook subscription
|
|
236
|
+
*/
|
|
237
|
+
async webhooksCreateRaw(requestParameters: WebhooksCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhooksCreate201Response>> {
|
|
238
|
+
const requestOptions = await this.webhooksCreateRequestOpts(requestParameters);
|
|
239
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
240
|
+
|
|
241
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WebhooksCreate201ResponseFromJSON(jsonValue));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Registers a new webhook URL. The signing secret is generated and returned EXACTLY ONCE. Optional filters narrow the events delivered (game, league, tournament). Pro tier or higher.
|
|
246
|
+
* Create a webhook subscription
|
|
247
|
+
*/
|
|
248
|
+
async webhooksCreate(requestParameters: WebhooksCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhooksCreate201Response> {
|
|
249
|
+
const response = await this.webhooksCreateRaw(requestParameters, initOverrides);
|
|
250
|
+
return await response.value();
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Creates request options for webhooksDelete without sending the request
|
|
255
|
+
*/
|
|
256
|
+
async webhooksDeleteRequestOpts(requestParameters: WebhooksDeleteRequest): Promise<runtime.RequestOpts> {
|
|
257
|
+
if (requestParameters['id'] == null) {
|
|
258
|
+
throw new runtime.RequiredError(
|
|
259
|
+
'id',
|
|
260
|
+
'Required parameter "id" was null or undefined when calling webhooksDelete().'
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const queryParameters: any = {};
|
|
265
|
+
|
|
266
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
let urlPath = `/v1/account/webhooks/{id}`;
|
|
270
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
271
|
+
|
|
272
|
+
return {
|
|
273
|
+
path: urlPath,
|
|
274
|
+
method: 'DELETE',
|
|
275
|
+
headers: headerParameters,
|
|
276
|
+
query: queryParameters,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Revoke a webhook subscription
|
|
282
|
+
*/
|
|
283
|
+
async webhooksDeleteRaw(requestParameters: WebhooksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
284
|
+
const requestOptions = await this.webhooksDeleteRequestOpts(requestParameters);
|
|
285
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
286
|
+
|
|
287
|
+
return new runtime.VoidApiResponse(response);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Revoke a webhook subscription
|
|
292
|
+
*/
|
|
293
|
+
async webhooksDelete(requestParameters: WebhooksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
294
|
+
await this.webhooksDeleteRaw(requestParameters, initOverrides);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Creates request options for webhooksList without sending the request
|
|
299
|
+
*/
|
|
300
|
+
async webhooksListRequestOpts(): Promise<runtime.RequestOpts> {
|
|
301
|
+
const queryParameters: any = {};
|
|
302
|
+
|
|
303
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
let urlPath = `/v1/account/webhooks`;
|
|
307
|
+
|
|
308
|
+
return {
|
|
309
|
+
path: urlPath,
|
|
310
|
+
method: 'GET',
|
|
311
|
+
headers: headerParameters,
|
|
312
|
+
query: queryParameters,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Returns the calling API key\'s webhook subscriptions. Signing secrets are NEVER echoed; only the metadata.
|
|
318
|
+
* List webhook subscriptions
|
|
319
|
+
*/
|
|
320
|
+
async webhooksListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhooksList200Response>> {
|
|
321
|
+
const requestOptions = await this.webhooksListRequestOpts();
|
|
322
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
323
|
+
|
|
324
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WebhooksList200ResponseFromJSON(jsonValue));
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Returns the calling API key\'s webhook subscriptions. Signing secrets are NEVER echoed; only the metadata.
|
|
329
|
+
* List webhook subscriptions
|
|
330
|
+
*/
|
|
331
|
+
async webhooksList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhooksList200Response> {
|
|
332
|
+
const response = await this.webhooksListRaw(initOverrides);
|
|
333
|
+
return await response.value();
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './AccountApi';
|
|
4
|
+
export * from './AuthApi';
|
|
5
|
+
export * from './BillingApi';
|
|
6
|
+
export * from './GamesApi';
|
|
7
|
+
export * from './LeaguesApi';
|
|
8
|
+
export * from './MatchesApi';
|
|
9
|
+
export * from './MetaApi';
|
|
10
|
+
export * from './SeriesApi';
|
|
11
|
+
export * from './TournamentsApi';
|
|
12
|
+
export * from './WebhooksApi';
|