@drxsuperapp/sdk 1.1.514 → 2.0.0
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/.openapi-generator/FILES +418 -371
- package/.openapi-generator-ignore +23 -23
- package/api.ts +1491 -1491
- package/apis/AdminPointsApi.ts +80 -0
- package/apis/CalendarRewardsApi.ts +196 -0
- package/apis/PWATournamentManagementApi.ts +177 -0
- package/apis/PWATournamentPlayerApi.ts +262 -0
- package/apis/PWATournamentTeamApi.ts +265 -0
- package/apis/index.ts +5 -0
- package/base.ts +86 -86
- package/common.ts +150 -150
- package/configuration.ts +115 -115
- package/dist/apis/AdminPointsApi.d.ts +31 -0
- package/dist/apis/AdminPointsApi.js +55 -0
- package/dist/apis/CalendarRewardsApi.d.ts +58 -0
- package/dist/apis/CalendarRewardsApi.js +152 -0
- package/dist/apis/PWATournamentManagementApi.d.ts +54 -0
- package/dist/apis/PWATournamentManagementApi.js +124 -0
- package/dist/apis/PWATournamentPlayerApi.d.ts +73 -0
- package/dist/apis/PWATournamentPlayerApi.js +171 -0
- package/dist/apis/PWATournamentTeamApi.d.ts +73 -0
- package/dist/apis/PWATournamentTeamApi.js +171 -0
- package/dist/apis/index.d.ts +5 -0
- package/dist/apis/index.js +5 -0
- package/dist/models/ApiAdminPointDropsPost200Response.d.ts +51 -0
- package/dist/models/ApiAdminPointDropsPost200Response.js +54 -0
- package/dist/models/ApiAdminPointDropsPost200ResponseResponseObject.d.ts +51 -0
- package/dist/models/ApiAdminPointDropsPost200ResponseResponseObject.js +56 -0
- package/dist/models/ApiAdminPointDropsPost200ResponseResponseObjectCreatedAt.d.ts +26 -0
- package/dist/models/ApiAdminPointDropsPost200ResponseResponseObjectCreatedAt.js +31 -0
- package/dist/models/ApiAdminPointDropsPostRequest.d.ts +74 -0
- package/dist/models/ApiAdminPointDropsPostRequest.js +73 -0
- package/dist/models/ApiCalendarRewardCheckInPost200Response.d.ts +51 -0
- package/dist/models/ApiCalendarRewardCheckInPost200Response.js +54 -0
- package/dist/models/ApiCalendarRewardCheckInPost200ResponseResponseObject.d.ts +44 -0
- package/dist/models/ApiCalendarRewardCheckInPost200ResponseResponseObject.js +47 -0
- package/dist/models/ApiCalendarRewardClaimWeeklyPost200Response.d.ts +51 -0
- package/dist/models/ApiCalendarRewardClaimWeeklyPost200Response.js +54 -0
- package/dist/models/ApiCalendarRewardClaimWeeklyPost200ResponseResponseObject.d.ts +44 -0
- package/dist/models/ApiCalendarRewardClaimWeeklyPost200ResponseResponseObject.js +51 -0
- package/dist/models/ApiCalendarRewardStatusGet200Response.d.ts +51 -0
- package/dist/models/ApiCalendarRewardStatusGet200Response.js +54 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObject.d.ts +60 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObject.js +63 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObjectAttendanceHistoryInner.d.ts +38 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObjectAttendanceHistoryInner.js +47 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObjectConfig.d.ts +50 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObjectConfig.js +55 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObjectToday.d.ts +38 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObjectToday.js +47 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObjectWeek.d.ts +56 -0
- package/dist/models/ApiCalendarRewardStatusGet200ResponseResponseObjectWeek.js +59 -0
- package/dist/models/ApiPwaTournamentGet200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentGet200Response.js +54 -0
- package/dist/models/ApiPwaTournamentGet200ResponseResponseObjectInner.d.ts +38 -0
- package/dist/models/ApiPwaTournamentGet200ResponseResponseObjectInner.js +47 -0
- package/dist/models/ApiPwaTournamentIdGet200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentIdGet200Response.js +54 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObject.d.ts +99 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObject.js +91 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObjectBracket.d.ts +39 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObjectBracket.js +47 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObjectBracketRoundsInnerInner.d.ts +74 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObjectBracketRoundsInnerInner.js +71 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObjectCreatedBy.d.ts +38 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObjectCreatedBy.js +47 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObjectTeamsInner.d.ts +45 -0
- package/dist/models/ApiPwaTournamentIdGet200ResponseResponseObjectTeamsInner.js +52 -0
- package/dist/models/ApiPwaTournamentPost200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentPost200Response.js +54 -0
- package/dist/models/ApiPwaTournamentPostRequest.d.ts +39 -0
- package/dist/models/ApiPwaTournamentPostRequest.js +48 -0
- package/dist/models/ApiPwaTournamentPostRequestAdminInner.d.ts +26 -0
- package/dist/models/ApiPwaTournamentPostRequestAdminInner.js +31 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersGet200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersGet200Response.js +54 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersGet200ResponseResponseObjectInner.d.ts +44 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersGet200ResponseResponseObjectInner.js +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersPost200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersPost200Response.js +54 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersPostRequest.d.ts +32 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersPostRequest.js +43 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersSavePost200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersSavePost200Response.js +54 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersSavePost200ResponseResponseObject.d.ts +44 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersSavePost200ResponseResponseObject.js +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersSavePostRequest.d.ts +33 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersSavePostRequest.js +44 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersSavePostRequestPlayersInner.d.ts +38 -0
- package/dist/models/ApiPwaTournamentTournamentIdPlayersSavePostRequestPlayersInner.js +45 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsGet200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsGet200Response.js +54 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsGet200ResponseResponseObjectInner.d.ts +63 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsGet200ResponseResponseObjectInner.js +64 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsPost200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsPost200Response.js +54 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsPostRequest.d.ts +38 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsPostRequest.js +47 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsSavePost200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsSavePost200Response.js +54 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsSavePost200ResponseResponseObject.d.ts +63 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsSavePost200ResponseResponseObject.js +64 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsSavePostRequestInner.d.ts +44 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsSavePostRequestInner.js +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsTeamIdDelete200Response.d.ts +51 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsTeamIdDelete200Response.js +54 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsTeamIdDelete200ResponseResponseObject.d.ts +50 -0
- package/dist/models/ApiPwaTournamentTournamentIdTeamsTeamIdDelete200ResponseResponseObject.js +55 -0
- package/dist/models/ApiWalletUnbindPost200Response.d.ts +51 -0
- package/dist/models/ApiWalletUnbindPost200Response.js +54 -0
- package/dist/models/ApiWalletUnbindPost200ResponseResponseObject.d.ts +32 -0
- package/dist/models/ApiWalletUnbindPost200ResponseResponseObject.js +43 -0
- package/dist/models/ApiWeb3RedeemPost200ResponseResponseObjectData.d.ts +69 -0
- package/dist/models/ApiWeb3RedeemPost200ResponseResponseObjectData.js +68 -0
- package/dist/models/index.d.ts +42 -0
- package/dist/models/index.js +42 -0
- package/ecosystem.config.js +13 -13
- package/git_push.sh +57 -57
- package/hooks.json +30 -30
- package/models/ApiAdminPointDropsPost200Response.ts +100 -0
- package/models/ApiAdminPointDropsPost200ResponseResponseObject.ts +101 -0
- package/models/ApiAdminPointDropsPost200ResponseResponseObjectCreatedAt.ts +46 -0
- package/models/ApiAdminPointDropsPostRequest.ts +123 -0
- package/models/ApiCalendarRewardCheckInPost200Response.ts +100 -0
- package/models/ApiCalendarRewardCheckInPost200ResponseResponseObject.ts +82 -0
- package/models/ApiCalendarRewardClaimWeeklyPost200Response.ts +100 -0
- package/models/ApiCalendarRewardClaimWeeklyPost200ResponseResponseObject.ts +84 -0
- package/models/ApiCalendarRewardStatusGet200Response.ts +100 -0
- package/models/ApiCalendarRewardStatusGet200ResponseResponseObject.ts +131 -0
- package/models/ApiCalendarRewardStatusGet200ResponseResponseObjectAttendanceHistoryInner.ts +75 -0
- package/models/ApiCalendarRewardStatusGet200ResponseResponseObjectConfig.ts +93 -0
- package/models/ApiCalendarRewardStatusGet200ResponseResponseObjectToday.ts +75 -0
- package/models/ApiCalendarRewardStatusGet200ResponseResponseObjectWeek.ts +102 -0
- package/models/ApiPwaTournamentGet200Response.ts +100 -0
- package/models/ApiPwaTournamentGet200ResponseResponseObjectInner.ts +75 -0
- package/models/ApiPwaTournamentIdGet200Response.ts +100 -0
- package/models/ApiPwaTournamentIdGet200ResponseResponseObject.ts +188 -0
- package/models/ApiPwaTournamentIdGet200ResponseResponseObjectBracket.ts +83 -0
- package/models/ApiPwaTournamentIdGet200ResponseResponseObjectBracketRoundsInnerInner.ts +129 -0
- package/models/ApiPwaTournamentIdGet200ResponseResponseObjectCreatedBy.ts +75 -0
- package/models/ApiPwaTournamentIdGet200ResponseResponseObjectTeamsInner.ts +92 -0
- package/models/ApiPwaTournamentPost200Response.ts +100 -0
- package/models/ApiPwaTournamentPostRequest.ts +83 -0
- package/models/ApiPwaTournamentPostRequestAdminInner.ts +46 -0
- package/models/ApiPwaTournamentTournamentIdPlayersGet200Response.ts +100 -0
- package/models/ApiPwaTournamentTournamentIdPlayersGet200ResponseResponseObjectInner.ts +84 -0
- package/models/ApiPwaTournamentTournamentIdPlayersPost200Response.ts +100 -0
- package/models/ApiPwaTournamentTournamentIdPlayersPostRequest.ts +66 -0
- package/models/ApiPwaTournamentTournamentIdPlayersSavePost200Response.ts +100 -0
- package/models/ApiPwaTournamentTournamentIdPlayersSavePost200ResponseResponseObject.ts +84 -0
- package/models/ApiPwaTournamentTournamentIdPlayersSavePostRequest.ts +74 -0
- package/models/ApiPwaTournamentTournamentIdPlayersSavePostRequestPlayersInner.ts +74 -0
- package/models/ApiPwaTournamentTournamentIdTeamsGet200Response.ts +100 -0
- package/models/ApiPwaTournamentTournamentIdTeamsGet200ResponseResponseObjectInner.ts +119 -0
- package/models/ApiPwaTournamentTournamentIdTeamsPost200Response.ts +100 -0
- package/models/ApiPwaTournamentTournamentIdTeamsPostRequest.ts +75 -0
- package/models/ApiPwaTournamentTournamentIdTeamsSavePost200Response.ts +100 -0
- package/models/ApiPwaTournamentTournamentIdTeamsSavePost200ResponseResponseObject.ts +119 -0
- package/models/ApiPwaTournamentTournamentIdTeamsSavePostRequestInner.ts +84 -0
- package/models/ApiPwaTournamentTournamentIdTeamsTeamIdDelete200Response.ts +100 -0
- package/models/ApiPwaTournamentTournamentIdTeamsTeamIdDelete200ResponseResponseObject.ts +93 -0
- package/models/index.ts +42 -0
- package/openapitools.json +7 -7
- package/package.json +30 -30
- package/tsconfig.json +17 -17
- package/workflow.sh +88 -88
- package/deploy.log +0 -931
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* DRX API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
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
|
+
import * as runtime from '../runtime';
|
|
15
|
+
import { ApiPwaTournamentGet200ResponseFromJSON, ApiPwaTournamentIdGet200ResponseFromJSON, ApiPwaTournamentPost200ResponseFromJSON, ApiPwaTournamentPostRequestToJSON, } from '../models/index';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export class PWATournamentManagementApi extends runtime.BaseAPI {
|
|
20
|
+
/**
|
|
21
|
+
* Get tournaments where current user is an admin
|
|
22
|
+
* Get My Tournaments
|
|
23
|
+
*/
|
|
24
|
+
async apiPwaTournamentGetRaw(initOverrides) {
|
|
25
|
+
const queryParameters = {};
|
|
26
|
+
const headerParameters = {};
|
|
27
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
28
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
29
|
+
}
|
|
30
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
31
|
+
const token = this.configuration.accessToken;
|
|
32
|
+
const tokenString = await token("BearerAuth", []);
|
|
33
|
+
if (tokenString) {
|
|
34
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const response = await this.request({
|
|
38
|
+
path: `/api/pwa-tournament`,
|
|
39
|
+
method: 'GET',
|
|
40
|
+
headers: headerParameters,
|
|
41
|
+
query: queryParameters,
|
|
42
|
+
}, initOverrides);
|
|
43
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentGet200ResponseFromJSON(jsonValue));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get tournaments where current user is an admin
|
|
47
|
+
* Get My Tournaments
|
|
48
|
+
*/
|
|
49
|
+
async apiPwaTournamentGet(initOverrides) {
|
|
50
|
+
const response = await this.apiPwaTournamentGetRaw(initOverrides);
|
|
51
|
+
return await response.value();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get tournament with admins, players, teams, bracket rounds, and championTeamId.
|
|
55
|
+
* Get Tournament Detail
|
|
56
|
+
*/
|
|
57
|
+
async apiPwaTournamentIdGetRaw(requestParameters, initOverrides) {
|
|
58
|
+
if (requestParameters['id'] == null) {
|
|
59
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiPwaTournamentIdGet().');
|
|
60
|
+
}
|
|
61
|
+
const queryParameters = {};
|
|
62
|
+
const headerParameters = {};
|
|
63
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
64
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
65
|
+
}
|
|
66
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
67
|
+
const token = this.configuration.accessToken;
|
|
68
|
+
const tokenString = await token("BearerAuth", []);
|
|
69
|
+
if (tokenString) {
|
|
70
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const response = await this.request({
|
|
74
|
+
path: `/api/pwa-tournament/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
75
|
+
method: 'GET',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
}, initOverrides);
|
|
79
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentIdGet200ResponseFromJSON(jsonValue));
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get tournament with admins, players, teams, bracket rounds, and championTeamId.
|
|
83
|
+
* Get Tournament Detail
|
|
84
|
+
*/
|
|
85
|
+
async apiPwaTournamentIdGet(requestParameters, initOverrides) {
|
|
86
|
+
const response = await this.apiPwaTournamentIdGetRaw(requestParameters, initOverrides);
|
|
87
|
+
return await response.value();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Create PWA Tournament with admin user ids
|
|
91
|
+
* Create PWA Tournament
|
|
92
|
+
*/
|
|
93
|
+
async apiPwaTournamentPostRaw(requestParameters, initOverrides) {
|
|
94
|
+
const queryParameters = {};
|
|
95
|
+
const headerParameters = {};
|
|
96
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
97
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
98
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
99
|
+
}
|
|
100
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
101
|
+
const token = this.configuration.accessToken;
|
|
102
|
+
const tokenString = await token("BearerAuth", []);
|
|
103
|
+
if (tokenString) {
|
|
104
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const response = await this.request({
|
|
108
|
+
path: `/api/pwa-tournament`,
|
|
109
|
+
method: 'POST',
|
|
110
|
+
headers: headerParameters,
|
|
111
|
+
query: queryParameters,
|
|
112
|
+
body: ApiPwaTournamentPostRequestToJSON(requestParameters['apiPwaTournamentPostRequest']),
|
|
113
|
+
}, initOverrides);
|
|
114
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentPost200ResponseFromJSON(jsonValue));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Create PWA Tournament with admin user ids
|
|
118
|
+
* Create PWA Tournament
|
|
119
|
+
*/
|
|
120
|
+
async apiPwaTournamentPost(requestParameters = {}, initOverrides) {
|
|
121
|
+
const response = await this.apiPwaTournamentPostRaw(requestParameters, initOverrides);
|
|
122
|
+
return await response.value();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DRX API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { ApiPwaTournamentTournamentIdPlayersGet200Response, ApiPwaTournamentTournamentIdPlayersPost200Response, ApiPwaTournamentTournamentIdPlayersPostRequest, ApiPwaTournamentTournamentIdPlayersSavePost200Response, ApiPwaTournamentTournamentIdPlayersSavePostRequest } from '../models/index';
|
|
14
|
+
export interface ApiPwaTournamentTournamentIdPlayersGetRequest {
|
|
15
|
+
tournamentId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ApiPwaTournamentTournamentIdPlayersPlayerIdDeleteRequest {
|
|
18
|
+
tournamentId: string;
|
|
19
|
+
playerId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ApiPwaTournamentTournamentIdPlayersPostOperationRequest {
|
|
22
|
+
tournamentId: string;
|
|
23
|
+
apiPwaTournamentTournamentIdPlayersPostRequest?: ApiPwaTournamentTournamentIdPlayersPostRequest;
|
|
24
|
+
}
|
|
25
|
+
export interface ApiPwaTournamentTournamentIdPlayersSavePostOperationRequest {
|
|
26
|
+
tournamentId: string;
|
|
27
|
+
apiPwaTournamentTournamentIdPlayersSavePostRequest?: ApiPwaTournamentTournamentIdPlayersSavePostRequest;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export declare class PWATournamentPlayerApi extends runtime.BaseAPI {
|
|
33
|
+
/**
|
|
34
|
+
* Get all players of a tournament
|
|
35
|
+
* Get Tournament Players
|
|
36
|
+
*/
|
|
37
|
+
apiPwaTournamentTournamentIdPlayersGetRaw(requestParameters: ApiPwaTournamentTournamentIdPlayersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiPwaTournamentTournamentIdPlayersGet200Response>>;
|
|
38
|
+
/**
|
|
39
|
+
* Get all players of a tournament
|
|
40
|
+
* Get Tournament Players
|
|
41
|
+
*/
|
|
42
|
+
apiPwaTournamentTournamentIdPlayersGet(requestParameters: ApiPwaTournamentTournamentIdPlayersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiPwaTournamentTournamentIdPlayersGet200Response>;
|
|
43
|
+
/**
|
|
44
|
+
* Delete a player from tournament
|
|
45
|
+
* Delete Tournament Player
|
|
46
|
+
*/
|
|
47
|
+
apiPwaTournamentTournamentIdPlayersPlayerIdDeleteRaw(requestParameters: ApiPwaTournamentTournamentIdPlayersPlayerIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiPwaTournamentTournamentIdPlayersPost200Response>>;
|
|
48
|
+
/**
|
|
49
|
+
* Delete a player from tournament
|
|
50
|
+
* Delete Tournament Player
|
|
51
|
+
*/
|
|
52
|
+
apiPwaTournamentTournamentIdPlayersPlayerIdDelete(requestParameters: ApiPwaTournamentTournamentIdPlayersPlayerIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiPwaTournamentTournamentIdPlayersPost200Response>;
|
|
53
|
+
/**
|
|
54
|
+
* Add a new player to tournament
|
|
55
|
+
* Add Tournament Player
|
|
56
|
+
*/
|
|
57
|
+
apiPwaTournamentTournamentIdPlayersPostRaw(requestParameters: ApiPwaTournamentTournamentIdPlayersPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiPwaTournamentTournamentIdPlayersPost200Response>>;
|
|
58
|
+
/**
|
|
59
|
+
* Add a new player to tournament
|
|
60
|
+
* Add Tournament Player
|
|
61
|
+
*/
|
|
62
|
+
apiPwaTournamentTournamentIdPlayersPost(requestParameters: ApiPwaTournamentTournamentIdPlayersPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiPwaTournamentTournamentIdPlayersPost200Response>;
|
|
63
|
+
/**
|
|
64
|
+
* Save players and validate total players must be power of two
|
|
65
|
+
* Save Tournament Players
|
|
66
|
+
*/
|
|
67
|
+
apiPwaTournamentTournamentIdPlayersSavePostRaw(requestParameters: ApiPwaTournamentTournamentIdPlayersSavePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiPwaTournamentTournamentIdPlayersSavePost200Response>>;
|
|
68
|
+
/**
|
|
69
|
+
* Save players and validate total players must be power of two
|
|
70
|
+
* Save Tournament Players
|
|
71
|
+
*/
|
|
72
|
+
apiPwaTournamentTournamentIdPlayersSavePost(requestParameters: ApiPwaTournamentTournamentIdPlayersSavePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiPwaTournamentTournamentIdPlayersSavePost200Response>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* DRX API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
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
|
+
import * as runtime from '../runtime';
|
|
15
|
+
import { ApiPwaTournamentTournamentIdPlayersGet200ResponseFromJSON, ApiPwaTournamentTournamentIdPlayersPost200ResponseFromJSON, ApiPwaTournamentTournamentIdPlayersPostRequestToJSON, ApiPwaTournamentTournamentIdPlayersSavePost200ResponseFromJSON, ApiPwaTournamentTournamentIdPlayersSavePostRequestToJSON, } from '../models/index';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export class PWATournamentPlayerApi extends runtime.BaseAPI {
|
|
20
|
+
/**
|
|
21
|
+
* Get all players of a tournament
|
|
22
|
+
* Get Tournament Players
|
|
23
|
+
*/
|
|
24
|
+
async apiPwaTournamentTournamentIdPlayersGetRaw(requestParameters, initOverrides) {
|
|
25
|
+
if (requestParameters['tournamentId'] == null) {
|
|
26
|
+
throw new runtime.RequiredError('tournamentId', 'Required parameter "tournamentId" was null or undefined when calling apiPwaTournamentTournamentIdPlayersGet().');
|
|
27
|
+
}
|
|
28
|
+
const queryParameters = {};
|
|
29
|
+
const headerParameters = {};
|
|
30
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
31
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
32
|
+
}
|
|
33
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
+
const token = this.configuration.accessToken;
|
|
35
|
+
const tokenString = await token("BearerAuth", []);
|
|
36
|
+
if (tokenString) {
|
|
37
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const response = await this.request({
|
|
41
|
+
path: `/api/pwa-tournament/{tournamentId}/players`.replace(`{${"tournamentId"}}`, encodeURIComponent(String(requestParameters['tournamentId']))),
|
|
42
|
+
method: 'GET',
|
|
43
|
+
headers: headerParameters,
|
|
44
|
+
query: queryParameters,
|
|
45
|
+
}, initOverrides);
|
|
46
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentTournamentIdPlayersGet200ResponseFromJSON(jsonValue));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get all players of a tournament
|
|
50
|
+
* Get Tournament Players
|
|
51
|
+
*/
|
|
52
|
+
async apiPwaTournamentTournamentIdPlayersGet(requestParameters, initOverrides) {
|
|
53
|
+
const response = await this.apiPwaTournamentTournamentIdPlayersGetRaw(requestParameters, initOverrides);
|
|
54
|
+
return await response.value();
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Delete a player from tournament
|
|
58
|
+
* Delete Tournament Player
|
|
59
|
+
*/
|
|
60
|
+
async apiPwaTournamentTournamentIdPlayersPlayerIdDeleteRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['tournamentId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('tournamentId', 'Required parameter "tournamentId" was null or undefined when calling apiPwaTournamentTournamentIdPlayersPlayerIdDelete().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['playerId'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('playerId', 'Required parameter "playerId" was null or undefined when calling apiPwaTournamentTournamentIdPlayersPlayerIdDelete().');
|
|
66
|
+
}
|
|
67
|
+
const queryParameters = {};
|
|
68
|
+
const headerParameters = {};
|
|
69
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
70
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
71
|
+
}
|
|
72
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
73
|
+
const token = this.configuration.accessToken;
|
|
74
|
+
const tokenString = await token("BearerAuth", []);
|
|
75
|
+
if (tokenString) {
|
|
76
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const response = await this.request({
|
|
80
|
+
path: `/api/pwa-tournament/{tournamentId}/players/{playerId}`.replace(`{${"tournamentId"}}`, encodeURIComponent(String(requestParameters['tournamentId']))).replace(`{${"playerId"}}`, encodeURIComponent(String(requestParameters['playerId']))),
|
|
81
|
+
method: 'DELETE',
|
|
82
|
+
headers: headerParameters,
|
|
83
|
+
query: queryParameters,
|
|
84
|
+
}, initOverrides);
|
|
85
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentTournamentIdPlayersPost200ResponseFromJSON(jsonValue));
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Delete a player from tournament
|
|
89
|
+
* Delete Tournament Player
|
|
90
|
+
*/
|
|
91
|
+
async apiPwaTournamentTournamentIdPlayersPlayerIdDelete(requestParameters, initOverrides) {
|
|
92
|
+
const response = await this.apiPwaTournamentTournamentIdPlayersPlayerIdDeleteRaw(requestParameters, initOverrides);
|
|
93
|
+
return await response.value();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Add a new player to tournament
|
|
97
|
+
* Add Tournament Player
|
|
98
|
+
*/
|
|
99
|
+
async apiPwaTournamentTournamentIdPlayersPostRaw(requestParameters, initOverrides) {
|
|
100
|
+
if (requestParameters['tournamentId'] == null) {
|
|
101
|
+
throw new runtime.RequiredError('tournamentId', 'Required parameter "tournamentId" was null or undefined when calling apiPwaTournamentTournamentIdPlayersPost().');
|
|
102
|
+
}
|
|
103
|
+
const queryParameters = {};
|
|
104
|
+
const headerParameters = {};
|
|
105
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
106
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
107
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
108
|
+
}
|
|
109
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
110
|
+
const token = this.configuration.accessToken;
|
|
111
|
+
const tokenString = await token("BearerAuth", []);
|
|
112
|
+
if (tokenString) {
|
|
113
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const response = await this.request({
|
|
117
|
+
path: `/api/pwa-tournament/{tournamentId}/players`.replace(`{${"tournamentId"}}`, encodeURIComponent(String(requestParameters['tournamentId']))),
|
|
118
|
+
method: 'POST',
|
|
119
|
+
headers: headerParameters,
|
|
120
|
+
query: queryParameters,
|
|
121
|
+
body: ApiPwaTournamentTournamentIdPlayersPostRequestToJSON(requestParameters['apiPwaTournamentTournamentIdPlayersPostRequest']),
|
|
122
|
+
}, initOverrides);
|
|
123
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentTournamentIdPlayersPost200ResponseFromJSON(jsonValue));
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Add a new player to tournament
|
|
127
|
+
* Add Tournament Player
|
|
128
|
+
*/
|
|
129
|
+
async apiPwaTournamentTournamentIdPlayersPost(requestParameters, initOverrides) {
|
|
130
|
+
const response = await this.apiPwaTournamentTournamentIdPlayersPostRaw(requestParameters, initOverrides);
|
|
131
|
+
return await response.value();
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Save players and validate total players must be power of two
|
|
135
|
+
* Save Tournament Players
|
|
136
|
+
*/
|
|
137
|
+
async apiPwaTournamentTournamentIdPlayersSavePostRaw(requestParameters, initOverrides) {
|
|
138
|
+
if (requestParameters['tournamentId'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('tournamentId', 'Required parameter "tournamentId" was null or undefined when calling apiPwaTournamentTournamentIdPlayersSavePost().');
|
|
140
|
+
}
|
|
141
|
+
const queryParameters = {};
|
|
142
|
+
const headerParameters = {};
|
|
143
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
144
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
145
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
146
|
+
}
|
|
147
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
148
|
+
const token = this.configuration.accessToken;
|
|
149
|
+
const tokenString = await token("BearerAuth", []);
|
|
150
|
+
if (tokenString) {
|
|
151
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const response = await this.request({
|
|
155
|
+
path: `/api/pwa-tournament/{tournamentId}/players/save`.replace(`{${"tournamentId"}}`, encodeURIComponent(String(requestParameters['tournamentId']))),
|
|
156
|
+
method: 'POST',
|
|
157
|
+
headers: headerParameters,
|
|
158
|
+
query: queryParameters,
|
|
159
|
+
body: ApiPwaTournamentTournamentIdPlayersSavePostRequestToJSON(requestParameters['apiPwaTournamentTournamentIdPlayersSavePostRequest']),
|
|
160
|
+
}, initOverrides);
|
|
161
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentTournamentIdPlayersSavePost200ResponseFromJSON(jsonValue));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Save players and validate total players must be power of two
|
|
165
|
+
* Save Tournament Players
|
|
166
|
+
*/
|
|
167
|
+
async apiPwaTournamentTournamentIdPlayersSavePost(requestParameters, initOverrides) {
|
|
168
|
+
const response = await this.apiPwaTournamentTournamentIdPlayersSavePostRaw(requestParameters, initOverrides);
|
|
169
|
+
return await response.value();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DRX API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { ApiPwaTournamentTournamentIdTeamsGet200Response, ApiPwaTournamentTournamentIdTeamsPost200Response, ApiPwaTournamentTournamentIdTeamsPostRequest, ApiPwaTournamentTournamentIdTeamsSavePost200Response, ApiPwaTournamentTournamentIdTeamsSavePostRequestInner, ApiPwaTournamentTournamentIdTeamsTeamIdDelete200Response } from '../models/index';
|
|
14
|
+
export interface ApiPwaTournamentTournamentIdTeamsGetRequest {
|
|
15
|
+
tournamentId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ApiPwaTournamentTournamentIdTeamsPostOperationRequest {
|
|
18
|
+
tournamentId: string;
|
|
19
|
+
apiPwaTournamentTournamentIdTeamsPostRequest?: ApiPwaTournamentTournamentIdTeamsPostRequest;
|
|
20
|
+
}
|
|
21
|
+
export interface ApiPwaTournamentTournamentIdTeamsSavePostRequest {
|
|
22
|
+
tournamentId: string;
|
|
23
|
+
apiPwaTournamentTournamentIdTeamsSavePostRequestInner?: Array<ApiPwaTournamentTournamentIdTeamsSavePostRequestInner>;
|
|
24
|
+
}
|
|
25
|
+
export interface ApiPwaTournamentTournamentIdTeamsTeamIdDeleteRequest {
|
|
26
|
+
tournamentId: string;
|
|
27
|
+
teamId: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export declare class PWATournamentTeamApi extends runtime.BaseAPI {
|
|
33
|
+
/**
|
|
34
|
+
* Get all teams of a tournament
|
|
35
|
+
* Get Tournament Teams
|
|
36
|
+
*/
|
|
37
|
+
apiPwaTournamentTournamentIdTeamsGetRaw(requestParameters: ApiPwaTournamentTournamentIdTeamsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiPwaTournamentTournamentIdTeamsGet200Response>>;
|
|
38
|
+
/**
|
|
39
|
+
* Get all teams of a tournament
|
|
40
|
+
* Get Tournament Teams
|
|
41
|
+
*/
|
|
42
|
+
apiPwaTournamentTournamentIdTeamsGet(requestParameters: ApiPwaTournamentTournamentIdTeamsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiPwaTournamentTournamentIdTeamsGet200Response>;
|
|
43
|
+
/**
|
|
44
|
+
* Create a team from two players
|
|
45
|
+
* Add Tournament Team
|
|
46
|
+
*/
|
|
47
|
+
apiPwaTournamentTournamentIdTeamsPostRaw(requestParameters: ApiPwaTournamentTournamentIdTeamsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiPwaTournamentTournamentIdTeamsPost200Response>>;
|
|
48
|
+
/**
|
|
49
|
+
* Create a team from two players
|
|
50
|
+
* Add Tournament Team
|
|
51
|
+
*/
|
|
52
|
+
apiPwaTournamentTournamentIdTeamsPost(requestParameters: ApiPwaTournamentTournamentIdTeamsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiPwaTournamentTournamentIdTeamsPost200Response>;
|
|
53
|
+
/**
|
|
54
|
+
* Replace all teams in a tournament with payload teams (idempotent). Blocked if bracket/matches already exist.
|
|
55
|
+
* Save Tournament Teams (Bulk)
|
|
56
|
+
*/
|
|
57
|
+
apiPwaTournamentTournamentIdTeamsSavePostRaw(requestParameters: ApiPwaTournamentTournamentIdTeamsSavePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiPwaTournamentTournamentIdTeamsSavePost200Response>>;
|
|
58
|
+
/**
|
|
59
|
+
* Replace all teams in a tournament with payload teams (idempotent). Blocked if bracket/matches already exist.
|
|
60
|
+
* Save Tournament Teams (Bulk)
|
|
61
|
+
*/
|
|
62
|
+
apiPwaTournamentTournamentIdTeamsSavePost(requestParameters: ApiPwaTournamentTournamentIdTeamsSavePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiPwaTournamentTournamentIdTeamsSavePost200Response>;
|
|
63
|
+
/**
|
|
64
|
+
* Delete a team from tournament
|
|
65
|
+
* Delete Tournament Team
|
|
66
|
+
*/
|
|
67
|
+
apiPwaTournamentTournamentIdTeamsTeamIdDeleteRaw(requestParameters: ApiPwaTournamentTournamentIdTeamsTeamIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiPwaTournamentTournamentIdTeamsTeamIdDelete200Response>>;
|
|
68
|
+
/**
|
|
69
|
+
* Delete a team from tournament
|
|
70
|
+
* Delete Tournament Team
|
|
71
|
+
*/
|
|
72
|
+
apiPwaTournamentTournamentIdTeamsTeamIdDelete(requestParameters: ApiPwaTournamentTournamentIdTeamsTeamIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiPwaTournamentTournamentIdTeamsTeamIdDelete200Response>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* DRX API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
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
|
+
import * as runtime from '../runtime';
|
|
15
|
+
import { ApiPwaTournamentTournamentIdTeamsGet200ResponseFromJSON, ApiPwaTournamentTournamentIdTeamsPost200ResponseFromJSON, ApiPwaTournamentTournamentIdTeamsPostRequestToJSON, ApiPwaTournamentTournamentIdTeamsSavePost200ResponseFromJSON, ApiPwaTournamentTournamentIdTeamsSavePostRequestInnerToJSON, ApiPwaTournamentTournamentIdTeamsTeamIdDelete200ResponseFromJSON, } from '../models/index';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export class PWATournamentTeamApi extends runtime.BaseAPI {
|
|
20
|
+
/**
|
|
21
|
+
* Get all teams of a tournament
|
|
22
|
+
* Get Tournament Teams
|
|
23
|
+
*/
|
|
24
|
+
async apiPwaTournamentTournamentIdTeamsGetRaw(requestParameters, initOverrides) {
|
|
25
|
+
if (requestParameters['tournamentId'] == null) {
|
|
26
|
+
throw new runtime.RequiredError('tournamentId', 'Required parameter "tournamentId" was null or undefined when calling apiPwaTournamentTournamentIdTeamsGet().');
|
|
27
|
+
}
|
|
28
|
+
const queryParameters = {};
|
|
29
|
+
const headerParameters = {};
|
|
30
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
31
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
32
|
+
}
|
|
33
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
+
const token = this.configuration.accessToken;
|
|
35
|
+
const tokenString = await token("BearerAuth", []);
|
|
36
|
+
if (tokenString) {
|
|
37
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const response = await this.request({
|
|
41
|
+
path: `/api/pwa-tournament/{tournamentId}/teams`.replace(`{${"tournamentId"}}`, encodeURIComponent(String(requestParameters['tournamentId']))),
|
|
42
|
+
method: 'GET',
|
|
43
|
+
headers: headerParameters,
|
|
44
|
+
query: queryParameters,
|
|
45
|
+
}, initOverrides);
|
|
46
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentTournamentIdTeamsGet200ResponseFromJSON(jsonValue));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get all teams of a tournament
|
|
50
|
+
* Get Tournament Teams
|
|
51
|
+
*/
|
|
52
|
+
async apiPwaTournamentTournamentIdTeamsGet(requestParameters, initOverrides) {
|
|
53
|
+
const response = await this.apiPwaTournamentTournamentIdTeamsGetRaw(requestParameters, initOverrides);
|
|
54
|
+
return await response.value();
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Create a team from two players
|
|
58
|
+
* Add Tournament Team
|
|
59
|
+
*/
|
|
60
|
+
async apiPwaTournamentTournamentIdTeamsPostRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['tournamentId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('tournamentId', 'Required parameter "tournamentId" was null or undefined when calling apiPwaTournamentTournamentIdTeamsPost().');
|
|
63
|
+
}
|
|
64
|
+
const queryParameters = {};
|
|
65
|
+
const headerParameters = {};
|
|
66
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
67
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
68
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
69
|
+
}
|
|
70
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
71
|
+
const token = this.configuration.accessToken;
|
|
72
|
+
const tokenString = await token("BearerAuth", []);
|
|
73
|
+
if (tokenString) {
|
|
74
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const response = await this.request({
|
|
78
|
+
path: `/api/pwa-tournament/{tournamentId}/teams`.replace(`{${"tournamentId"}}`, encodeURIComponent(String(requestParameters['tournamentId']))),
|
|
79
|
+
method: 'POST',
|
|
80
|
+
headers: headerParameters,
|
|
81
|
+
query: queryParameters,
|
|
82
|
+
body: ApiPwaTournamentTournamentIdTeamsPostRequestToJSON(requestParameters['apiPwaTournamentTournamentIdTeamsPostRequest']),
|
|
83
|
+
}, initOverrides);
|
|
84
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentTournamentIdTeamsPost200ResponseFromJSON(jsonValue));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Create a team from two players
|
|
88
|
+
* Add Tournament Team
|
|
89
|
+
*/
|
|
90
|
+
async apiPwaTournamentTournamentIdTeamsPost(requestParameters, initOverrides) {
|
|
91
|
+
const response = await this.apiPwaTournamentTournamentIdTeamsPostRaw(requestParameters, initOverrides);
|
|
92
|
+
return await response.value();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Replace all teams in a tournament with payload teams (idempotent). Blocked if bracket/matches already exist.
|
|
96
|
+
* Save Tournament Teams (Bulk)
|
|
97
|
+
*/
|
|
98
|
+
async apiPwaTournamentTournamentIdTeamsSavePostRaw(requestParameters, initOverrides) {
|
|
99
|
+
if (requestParameters['tournamentId'] == null) {
|
|
100
|
+
throw new runtime.RequiredError('tournamentId', 'Required parameter "tournamentId" was null or undefined when calling apiPwaTournamentTournamentIdTeamsSavePost().');
|
|
101
|
+
}
|
|
102
|
+
const queryParameters = {};
|
|
103
|
+
const headerParameters = {};
|
|
104
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
105
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
106
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
107
|
+
}
|
|
108
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
109
|
+
const token = this.configuration.accessToken;
|
|
110
|
+
const tokenString = await token("BearerAuth", []);
|
|
111
|
+
if (tokenString) {
|
|
112
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const response = await this.request({
|
|
116
|
+
path: `/api/pwa-tournament/{tournamentId}/teams/save`.replace(`{${"tournamentId"}}`, encodeURIComponent(String(requestParameters['tournamentId']))),
|
|
117
|
+
method: 'POST',
|
|
118
|
+
headers: headerParameters,
|
|
119
|
+
query: queryParameters,
|
|
120
|
+
body: requestParameters['apiPwaTournamentTournamentIdTeamsSavePostRequestInner'].map(ApiPwaTournamentTournamentIdTeamsSavePostRequestInnerToJSON),
|
|
121
|
+
}, initOverrides);
|
|
122
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentTournamentIdTeamsSavePost200ResponseFromJSON(jsonValue));
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Replace all teams in a tournament with payload teams (idempotent). Blocked if bracket/matches already exist.
|
|
126
|
+
* Save Tournament Teams (Bulk)
|
|
127
|
+
*/
|
|
128
|
+
async apiPwaTournamentTournamentIdTeamsSavePost(requestParameters, initOverrides) {
|
|
129
|
+
const response = await this.apiPwaTournamentTournamentIdTeamsSavePostRaw(requestParameters, initOverrides);
|
|
130
|
+
return await response.value();
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Delete a team from tournament
|
|
134
|
+
* Delete Tournament Team
|
|
135
|
+
*/
|
|
136
|
+
async apiPwaTournamentTournamentIdTeamsTeamIdDeleteRaw(requestParameters, initOverrides) {
|
|
137
|
+
if (requestParameters['tournamentId'] == null) {
|
|
138
|
+
throw new runtime.RequiredError('tournamentId', 'Required parameter "tournamentId" was null or undefined when calling apiPwaTournamentTournamentIdTeamsTeamIdDelete().');
|
|
139
|
+
}
|
|
140
|
+
if (requestParameters['teamId'] == null) {
|
|
141
|
+
throw new runtime.RequiredError('teamId', 'Required parameter "teamId" was null or undefined when calling apiPwaTournamentTournamentIdTeamsTeamIdDelete().');
|
|
142
|
+
}
|
|
143
|
+
const queryParameters = {};
|
|
144
|
+
const headerParameters = {};
|
|
145
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
146
|
+
headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // ApiKeyAuth authentication
|
|
147
|
+
}
|
|
148
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
149
|
+
const token = this.configuration.accessToken;
|
|
150
|
+
const tokenString = await token("BearerAuth", []);
|
|
151
|
+
if (tokenString) {
|
|
152
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const response = await this.request({
|
|
156
|
+
path: `/api/pwa-tournament/{tournamentId}/teams/{teamId}`.replace(`{${"tournamentId"}}`, encodeURIComponent(String(requestParameters['tournamentId']))).replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
|
|
157
|
+
method: 'DELETE',
|
|
158
|
+
headers: headerParameters,
|
|
159
|
+
query: queryParameters,
|
|
160
|
+
}, initOverrides);
|
|
161
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiPwaTournamentTournamentIdTeamsTeamIdDelete200ResponseFromJSON(jsonValue));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Delete a team from tournament
|
|
165
|
+
* Delete Tournament Team
|
|
166
|
+
*/
|
|
167
|
+
async apiPwaTournamentTournamentIdTeamsTeamIdDelete(requestParameters, initOverrides) {
|
|
168
|
+
const response = await this.apiPwaTournamentTournamentIdTeamsTeamIdDeleteRaw(requestParameters, initOverrides);
|
|
169
|
+
return await response.value();
|
|
170
|
+
}
|
|
171
|
+
}
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from './AdminPointsApi';
|
|
1
2
|
export * from './AppConfigurationApi';
|
|
2
3
|
export * from './AuthenticationApi';
|
|
4
|
+
export * from './CalendarRewardsApi';
|
|
3
5
|
export * from './CategoryManagementApi';
|
|
4
6
|
export * from './EsportsManagementApi';
|
|
5
7
|
export * from './FeatureApi';
|
|
@@ -9,6 +11,9 @@ export * from './HealthCheckApi';
|
|
|
9
11
|
export * from './MMASportsApi';
|
|
10
12
|
export * from './NewsManagementApi';
|
|
11
13
|
export * from './NotificationManagementApi';
|
|
14
|
+
export * from './PWATournamentManagementApi';
|
|
15
|
+
export * from './PWATournamentPlayerApi';
|
|
16
|
+
export * from './PWATournamentTeamApi';
|
|
12
17
|
export * from './PadelSportsApi';
|
|
13
18
|
export * from './PoolWalletManagementApi';
|
|
14
19
|
export * from './PublicRewardApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './AdminPointsApi';
|
|
3
4
|
export * from './AppConfigurationApi';
|
|
4
5
|
export * from './AuthenticationApi';
|
|
6
|
+
export * from './CalendarRewardsApi';
|
|
5
7
|
export * from './CategoryManagementApi';
|
|
6
8
|
export * from './EsportsManagementApi';
|
|
7
9
|
export * from './FeatureApi';
|
|
@@ -11,6 +13,9 @@ export * from './HealthCheckApi';
|
|
|
11
13
|
export * from './MMASportsApi';
|
|
12
14
|
export * from './NewsManagementApi';
|
|
13
15
|
export * from './NotificationManagementApi';
|
|
16
|
+
export * from './PWATournamentManagementApi';
|
|
17
|
+
export * from './PWATournamentPlayerApi';
|
|
18
|
+
export * from './PWATournamentTeamApi';
|
|
14
19
|
export * from './PadelSportsApi';
|
|
15
20
|
export * from './PoolWalletManagementApi';
|
|
16
21
|
export * from './PublicRewardApi';
|