@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,446 @@
|
|
|
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 AuthMeResponse,
|
|
18
|
+
AuthMeResponseFromJSON,
|
|
19
|
+
AuthMeResponseToJSON,
|
|
20
|
+
} from '../models/AuthMeResponse';
|
|
21
|
+
import {
|
|
22
|
+
type ErrorEnvelope,
|
|
23
|
+
ErrorEnvelopeFromJSON,
|
|
24
|
+
ErrorEnvelopeToJSON,
|
|
25
|
+
} from '../models/ErrorEnvelope';
|
|
26
|
+
import {
|
|
27
|
+
type SignupRequest,
|
|
28
|
+
SignupRequestFromJSON,
|
|
29
|
+
SignupRequestToJSON,
|
|
30
|
+
} from '../models/SignupRequest';
|
|
31
|
+
|
|
32
|
+
export interface AuthGitHubCallbackRequest {
|
|
33
|
+
code?: string;
|
|
34
|
+
state?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface AuthLoginRequest {
|
|
38
|
+
signupRequest: SignupRequest;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface AuthSignupRequest {
|
|
42
|
+
signupRequest: SignupRequest;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* AuthApi - interface
|
|
47
|
+
*
|
|
48
|
+
* @export
|
|
49
|
+
* @interface AuthApiInterface
|
|
50
|
+
*/
|
|
51
|
+
export interface AuthApiInterface {
|
|
52
|
+
/**
|
|
53
|
+
* Creates request options for authGitHubCallback without sending the request
|
|
54
|
+
* @param {string} [code]
|
|
55
|
+
* @param {string} [state]
|
|
56
|
+
* @throws {RequiredError}
|
|
57
|
+
* @memberof AuthApiInterface
|
|
58
|
+
*/
|
|
59
|
+
authGitHubCallbackRequestOpts(requestParameters: AuthGitHubCallbackRequest): Promise<runtime.RequestOpts>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @summary GitHub OAuth callback
|
|
64
|
+
* @param {string} [code]
|
|
65
|
+
* @param {string} [state]
|
|
66
|
+
* @param {*} [options] Override http request option.
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
* @memberof AuthApiInterface
|
|
69
|
+
*/
|
|
70
|
+
authGitHubCallbackRaw(requestParameters: AuthGitHubCallbackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* GitHub OAuth callback
|
|
74
|
+
*/
|
|
75
|
+
authGitHubCallback(requestParameters: AuthGitHubCallbackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Creates request options for authGitHubLogin without sending the request
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
* @memberof AuthApiInterface
|
|
81
|
+
*/
|
|
82
|
+
authGitHubLoginRequestOpts(): Promise<runtime.RequestOpts>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 302-redirects to GitHub\'s authorize endpoint with a CSRF- protected state. The callback at /v1/auth/github/callback mints the session on completion.
|
|
86
|
+
* @summary Start GitHub OAuth flow
|
|
87
|
+
* @param {*} [options] Override http request option.
|
|
88
|
+
* @throws {RequiredError}
|
|
89
|
+
* @memberof AuthApiInterface
|
|
90
|
+
*/
|
|
91
|
+
authGitHubLoginRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 302-redirects to GitHub\'s authorize endpoint with a CSRF- protected state. The callback at /v1/auth/github/callback mints the session on completion.
|
|
95
|
+
* Start GitHub OAuth flow
|
|
96
|
+
*/
|
|
97
|
+
authGitHubLogin(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Creates request options for authLogin without sending the request
|
|
101
|
+
* @param {SignupRequest} signupRequest
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
* @memberof AuthApiInterface
|
|
104
|
+
*/
|
|
105
|
+
authLoginRequestOpts(requestParameters: AuthLoginRequest): Promise<runtime.RequestOpts>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @summary Sign in with email + password
|
|
110
|
+
* @param {SignupRequest} signupRequest
|
|
111
|
+
* @param {*} [options] Override http request option.
|
|
112
|
+
* @throws {RequiredError}
|
|
113
|
+
* @memberof AuthApiInterface
|
|
114
|
+
*/
|
|
115
|
+
authLoginRaw(requestParameters: AuthLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthMeResponse>>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Sign in with email + password
|
|
119
|
+
*/
|
|
120
|
+
authLogin(requestParameters: AuthLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthMeResponse>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates request options for authLogout without sending the request
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
* @memberof AuthApiInterface
|
|
126
|
+
*/
|
|
127
|
+
authLogoutRequestOpts(): Promise<runtime.RequestOpts>;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @summary Terminate the current session
|
|
132
|
+
* @param {*} [options] Override http request option.
|
|
133
|
+
* @throws {RequiredError}
|
|
134
|
+
* @memberof AuthApiInterface
|
|
135
|
+
*/
|
|
136
|
+
authLogoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Terminate the current session
|
|
140
|
+
*/
|
|
141
|
+
authLogout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Creates request options for authMe without sending the request
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
* @memberof AuthApiInterface
|
|
147
|
+
*/
|
|
148
|
+
authMeRequestOpts(): Promise<runtime.RequestOpts>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @summary Inspect the current session
|
|
153
|
+
* @param {*} [options] Override http request option.
|
|
154
|
+
* @throws {RequiredError}
|
|
155
|
+
* @memberof AuthApiInterface
|
|
156
|
+
*/
|
|
157
|
+
authMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthMeResponse>>;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Inspect the current session
|
|
161
|
+
*/
|
|
162
|
+
authMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthMeResponse>;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Creates request options for authSignup without sending the request
|
|
166
|
+
* @param {SignupRequest} signupRequest
|
|
167
|
+
* @throws {RequiredError}
|
|
168
|
+
* @memberof AuthApiInterface
|
|
169
|
+
*/
|
|
170
|
+
authSignupRequestOpts(requestParameters: AuthSignupRequest): Promise<runtime.RequestOpts>;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Email + password sign-up. Returns a session cookie on success plus the user record. Password minimum is 10 characters (bcrypt cost 10).
|
|
174
|
+
* @summary Create a new account
|
|
175
|
+
* @param {SignupRequest} signupRequest
|
|
176
|
+
* @param {*} [options] Override http request option.
|
|
177
|
+
* @throws {RequiredError}
|
|
178
|
+
* @memberof AuthApiInterface
|
|
179
|
+
*/
|
|
180
|
+
authSignupRaw(requestParameters: AuthSignupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthMeResponse>>;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Email + password sign-up. Returns a session cookie on success plus the user record. Password minimum is 10 characters (bcrypt cost 10).
|
|
184
|
+
* Create a new account
|
|
185
|
+
*/
|
|
186
|
+
authSignup(requestParameters: AuthSignupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthMeResponse>;
|
|
187
|
+
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
*
|
|
192
|
+
*/
|
|
193
|
+
export class AuthApi extends runtime.BaseAPI implements AuthApiInterface {
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Creates request options for authGitHubCallback without sending the request
|
|
197
|
+
*/
|
|
198
|
+
async authGitHubCallbackRequestOpts(requestParameters: AuthGitHubCallbackRequest): Promise<runtime.RequestOpts> {
|
|
199
|
+
const queryParameters: any = {};
|
|
200
|
+
|
|
201
|
+
if (requestParameters['code'] != null) {
|
|
202
|
+
queryParameters['code'] = requestParameters['code'];
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (requestParameters['state'] != null) {
|
|
206
|
+
queryParameters['state'] = requestParameters['state'];
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
let urlPath = `/v1/auth/github/callback`;
|
|
213
|
+
|
|
214
|
+
return {
|
|
215
|
+
path: urlPath,
|
|
216
|
+
method: 'GET',
|
|
217
|
+
headers: headerParameters,
|
|
218
|
+
query: queryParameters,
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* GitHub OAuth callback
|
|
224
|
+
*/
|
|
225
|
+
async authGitHubCallbackRaw(requestParameters: AuthGitHubCallbackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
226
|
+
const requestOptions = await this.authGitHubCallbackRequestOpts(requestParameters);
|
|
227
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
228
|
+
|
|
229
|
+
return new runtime.VoidApiResponse(response);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* GitHub OAuth callback
|
|
234
|
+
*/
|
|
235
|
+
async authGitHubCallback(requestParameters: AuthGitHubCallbackRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
236
|
+
await this.authGitHubCallbackRaw(requestParameters, initOverrides);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Creates request options for authGitHubLogin without sending the request
|
|
241
|
+
*/
|
|
242
|
+
async authGitHubLoginRequestOpts(): Promise<runtime.RequestOpts> {
|
|
243
|
+
const queryParameters: any = {};
|
|
244
|
+
|
|
245
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
let urlPath = `/v1/auth/github/login`;
|
|
249
|
+
|
|
250
|
+
return {
|
|
251
|
+
path: urlPath,
|
|
252
|
+
method: 'GET',
|
|
253
|
+
headers: headerParameters,
|
|
254
|
+
query: queryParameters,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* 302-redirects to GitHub\'s authorize endpoint with a CSRF- protected state. The callback at /v1/auth/github/callback mints the session on completion.
|
|
260
|
+
* Start GitHub OAuth flow
|
|
261
|
+
*/
|
|
262
|
+
async authGitHubLoginRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
263
|
+
const requestOptions = await this.authGitHubLoginRequestOpts();
|
|
264
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
265
|
+
|
|
266
|
+
return new runtime.VoidApiResponse(response);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* 302-redirects to GitHub\'s authorize endpoint with a CSRF- protected state. The callback at /v1/auth/github/callback mints the session on completion.
|
|
271
|
+
* Start GitHub OAuth flow
|
|
272
|
+
*/
|
|
273
|
+
async authGitHubLogin(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
274
|
+
await this.authGitHubLoginRaw(initOverrides);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Creates request options for authLogin without sending the request
|
|
279
|
+
*/
|
|
280
|
+
async authLoginRequestOpts(requestParameters: AuthLoginRequest): Promise<runtime.RequestOpts> {
|
|
281
|
+
if (requestParameters['signupRequest'] == null) {
|
|
282
|
+
throw new runtime.RequiredError(
|
|
283
|
+
'signupRequest',
|
|
284
|
+
'Required parameter "signupRequest" was null or undefined when calling authLogin().'
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const queryParameters: any = {};
|
|
289
|
+
|
|
290
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
291
|
+
|
|
292
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
let urlPath = `/v1/auth/login`;
|
|
296
|
+
|
|
297
|
+
return {
|
|
298
|
+
path: urlPath,
|
|
299
|
+
method: 'POST',
|
|
300
|
+
headers: headerParameters,
|
|
301
|
+
query: queryParameters,
|
|
302
|
+
body: SignupRequestToJSON(requestParameters['signupRequest']),
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Sign in with email + password
|
|
308
|
+
*/
|
|
309
|
+
async authLoginRaw(requestParameters: AuthLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthMeResponse>> {
|
|
310
|
+
const requestOptions = await this.authLoginRequestOpts(requestParameters);
|
|
311
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
312
|
+
|
|
313
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AuthMeResponseFromJSON(jsonValue));
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Sign in with email + password
|
|
318
|
+
*/
|
|
319
|
+
async authLogin(requestParameters: AuthLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthMeResponse> {
|
|
320
|
+
const response = await this.authLoginRaw(requestParameters, initOverrides);
|
|
321
|
+
return await response.value();
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Creates request options for authLogout without sending the request
|
|
326
|
+
*/
|
|
327
|
+
async authLogoutRequestOpts(): Promise<runtime.RequestOpts> {
|
|
328
|
+
const queryParameters: any = {};
|
|
329
|
+
|
|
330
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
let urlPath = `/v1/auth/logout`;
|
|
334
|
+
|
|
335
|
+
return {
|
|
336
|
+
path: urlPath,
|
|
337
|
+
method: 'POST',
|
|
338
|
+
headers: headerParameters,
|
|
339
|
+
query: queryParameters,
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Terminate the current session
|
|
345
|
+
*/
|
|
346
|
+
async authLogoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
347
|
+
const requestOptions = await this.authLogoutRequestOpts();
|
|
348
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
349
|
+
|
|
350
|
+
return new runtime.VoidApiResponse(response);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Terminate the current session
|
|
355
|
+
*/
|
|
356
|
+
async authLogout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
357
|
+
await this.authLogoutRaw(initOverrides);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Creates request options for authMe without sending the request
|
|
362
|
+
*/
|
|
363
|
+
async authMeRequestOpts(): Promise<runtime.RequestOpts> {
|
|
364
|
+
const queryParameters: any = {};
|
|
365
|
+
|
|
366
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
let urlPath = `/v1/auth/me`;
|
|
370
|
+
|
|
371
|
+
return {
|
|
372
|
+
path: urlPath,
|
|
373
|
+
method: 'GET',
|
|
374
|
+
headers: headerParameters,
|
|
375
|
+
query: queryParameters,
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Inspect the current session
|
|
381
|
+
*/
|
|
382
|
+
async authMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthMeResponse>> {
|
|
383
|
+
const requestOptions = await this.authMeRequestOpts();
|
|
384
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
385
|
+
|
|
386
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AuthMeResponseFromJSON(jsonValue));
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Inspect the current session
|
|
391
|
+
*/
|
|
392
|
+
async authMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthMeResponse> {
|
|
393
|
+
const response = await this.authMeRaw(initOverrides);
|
|
394
|
+
return await response.value();
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Creates request options for authSignup without sending the request
|
|
399
|
+
*/
|
|
400
|
+
async authSignupRequestOpts(requestParameters: AuthSignupRequest): Promise<runtime.RequestOpts> {
|
|
401
|
+
if (requestParameters['signupRequest'] == null) {
|
|
402
|
+
throw new runtime.RequiredError(
|
|
403
|
+
'signupRequest',
|
|
404
|
+
'Required parameter "signupRequest" was null or undefined when calling authSignup().'
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const queryParameters: any = {};
|
|
409
|
+
|
|
410
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
411
|
+
|
|
412
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
let urlPath = `/v1/auth/signup`;
|
|
416
|
+
|
|
417
|
+
return {
|
|
418
|
+
path: urlPath,
|
|
419
|
+
method: 'POST',
|
|
420
|
+
headers: headerParameters,
|
|
421
|
+
query: queryParameters,
|
|
422
|
+
body: SignupRequestToJSON(requestParameters['signupRequest']),
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Email + password sign-up. Returns a session cookie on success plus the user record. Password minimum is 10 characters (bcrypt cost 10).
|
|
428
|
+
* Create a new account
|
|
429
|
+
*/
|
|
430
|
+
async authSignupRaw(requestParameters: AuthSignupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthMeResponse>> {
|
|
431
|
+
const requestOptions = await this.authSignupRequestOpts(requestParameters);
|
|
432
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
433
|
+
|
|
434
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AuthMeResponseFromJSON(jsonValue));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Email + password sign-up. Returns a session cookie on success plus the user record. Password minimum is 10 characters (bcrypt cost 10).
|
|
439
|
+
* Create a new account
|
|
440
|
+
*/
|
|
441
|
+
async authSignup(requestParameters: AuthSignupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthMeResponse> {
|
|
442
|
+
const response = await this.authSignupRaw(requestParameters, initOverrides);
|
|
443
|
+
return await response.value();
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
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
|
+
|
|
22
|
+
export interface BillingCheckoutRequest {
|
|
23
|
+
tier: BillingCheckoutTierEnum;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* BillingApi - interface
|
|
28
|
+
*
|
|
29
|
+
* @export
|
|
30
|
+
* @interface BillingApiInterface
|
|
31
|
+
*/
|
|
32
|
+
export interface BillingApiInterface {
|
|
33
|
+
/**
|
|
34
|
+
* Creates request options for billingCheckout without sending the request
|
|
35
|
+
* @param {'hobbyist' | 'pro' | 'scale'} tier
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
* @memberof BillingApiInterface
|
|
38
|
+
*/
|
|
39
|
+
billingCheckoutRequestOpts(requestParameters: BillingCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 302-redirects to Polar\'s hosted checkout for the requested tier.
|
|
43
|
+
* @summary Polar.sh checkout redirect
|
|
44
|
+
* @param {'hobbyist' | 'pro' | 'scale'} tier
|
|
45
|
+
* @param {*} [options] Override http request option.
|
|
46
|
+
* @throws {RequiredError}
|
|
47
|
+
* @memberof BillingApiInterface
|
|
48
|
+
*/
|
|
49
|
+
billingCheckoutRaw(requestParameters: BillingCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 302-redirects to Polar\'s hosted checkout for the requested tier.
|
|
53
|
+
* Polar.sh checkout redirect
|
|
54
|
+
*/
|
|
55
|
+
billingCheckout(requestParameters: BillingCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Creates request options for billingPortal without sending the request
|
|
59
|
+
* @throws {RequiredError}
|
|
60
|
+
* @memberof BillingApiInterface
|
|
61
|
+
*/
|
|
62
|
+
billingPortalRequestOpts(): Promise<runtime.RequestOpts>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @summary Polar.sh customer portal redirect
|
|
67
|
+
* @param {*} [options] Override http request option.
|
|
68
|
+
* @throws {RequiredError}
|
|
69
|
+
* @memberof BillingApiInterface
|
|
70
|
+
*/
|
|
71
|
+
billingPortalRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Polar.sh customer portal redirect
|
|
75
|
+
*/
|
|
76
|
+
billingPortal(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
83
|
+
export class BillingApi extends runtime.BaseAPI implements BillingApiInterface {
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Creates request options for billingCheckout without sending the request
|
|
87
|
+
*/
|
|
88
|
+
async billingCheckoutRequestOpts(requestParameters: BillingCheckoutRequest): Promise<runtime.RequestOpts> {
|
|
89
|
+
if (requestParameters['tier'] == null) {
|
|
90
|
+
throw new runtime.RequiredError(
|
|
91
|
+
'tier',
|
|
92
|
+
'Required parameter "tier" was null or undefined when calling billingCheckout().'
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const queryParameters: any = {};
|
|
97
|
+
|
|
98
|
+
if (requestParameters['tier'] != null) {
|
|
99
|
+
queryParameters['tier'] = requestParameters['tier'];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
let urlPath = `/v1/checkout`;
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
path: urlPath,
|
|
109
|
+
method: 'GET',
|
|
110
|
+
headers: headerParameters,
|
|
111
|
+
query: queryParameters,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 302-redirects to Polar\'s hosted checkout for the requested tier.
|
|
117
|
+
* Polar.sh checkout redirect
|
|
118
|
+
*/
|
|
119
|
+
async billingCheckoutRaw(requestParameters: BillingCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
120
|
+
const requestOptions = await this.billingCheckoutRequestOpts(requestParameters);
|
|
121
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
122
|
+
|
|
123
|
+
return new runtime.VoidApiResponse(response);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 302-redirects to Polar\'s hosted checkout for the requested tier.
|
|
128
|
+
* Polar.sh checkout redirect
|
|
129
|
+
*/
|
|
130
|
+
async billingCheckout(requestParameters: BillingCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
131
|
+
await this.billingCheckoutRaw(requestParameters, initOverrides);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Creates request options for billingPortal without sending the request
|
|
136
|
+
*/
|
|
137
|
+
async billingPortalRequestOpts(): Promise<runtime.RequestOpts> {
|
|
138
|
+
const queryParameters: any = {};
|
|
139
|
+
|
|
140
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
let urlPath = `/v1/portal`;
|
|
144
|
+
|
|
145
|
+
return {
|
|
146
|
+
path: urlPath,
|
|
147
|
+
method: 'GET',
|
|
148
|
+
headers: headerParameters,
|
|
149
|
+
query: queryParameters,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Polar.sh customer portal redirect
|
|
155
|
+
*/
|
|
156
|
+
async billingPortalRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
157
|
+
const requestOptions = await this.billingPortalRequestOpts();
|
|
158
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
159
|
+
|
|
160
|
+
return new runtime.VoidApiResponse(response);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Polar.sh customer portal redirect
|
|
165
|
+
*/
|
|
166
|
+
async billingPortal(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
167
|
+
await this.billingPortalRaw(initOverrides);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @export
|
|
174
|
+
*/
|
|
175
|
+
export const BillingCheckoutTierEnum = {
|
|
176
|
+
Hobbyist: 'hobbyist',
|
|
177
|
+
Pro: 'pro',
|
|
178
|
+
Scale: 'scale'
|
|
179
|
+
} as const;
|
|
180
|
+
export type BillingCheckoutTierEnum = typeof BillingCheckoutTierEnum[keyof typeof BillingCheckoutTierEnum];
|