@jugarhoy/api 1.1.10 → 1.1.12
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/apis/PositionsApi.ts +235 -0
- package/apis/RecurringGamesApi.ts +279 -0
- package/apis/SportEventsApi.ts +133 -0
- package/apis/TeamFeedApi.ts +386 -0
- package/apis/TeamsApi.ts +578 -0
- package/apis/VotingApi.ts +404 -0
- package/apis/index.ts +6 -0
- package/models/ApiAppTeamsTeamIdEventsGet200Response.ts +73 -0
- package/models/ApiAppTeamsTeamIdEventsGet200ResponseEventsInner.ts +97 -0
- package/models/ApiAppTeamsTeamIdEventsPostRequest.ts +139 -0
- package/models/ApiAppTeamsTeamIdFeedFeedItemIdPatchRequest.ts +81 -0
- package/models/ApiAppTeamsTeamIdFeedFeedItemIdReactionsPatchRequest.ts +66 -0
- package/models/ApiAppTeamsTeamIdFeedSummaryGet200Response.ts +81 -0
- package/models/ApiAppVotingHasVotedPlaySearchIdGet200Response.ts +65 -0
- package/models/AssignPositionsRequest.ts +92 -0
- package/models/AssignPositionsRequestPositionsInner.ts +130 -0
- package/models/AutoAssignPositionsRequest.ts +93 -0
- package/models/CreatePlaySearchRequest.ts +8 -0
- package/models/CreateRecurringGameRequest.ts +130 -0
- package/models/CreateTeamFeedRequest.ts +82 -0
- package/models/CreateTeamRequest.ts +134 -0
- package/models/FeedMediaType.ts +56 -0
- package/models/GroupedPositionsResponse.ts +83 -0
- package/models/GroupedPositionsResponseHome.ts +83 -0
- package/models/JoinTeamRequest.ts +66 -0
- package/models/MatchVote.ts +134 -0
- package/models/NotificationChannelType.ts +3 -1
- package/models/PlaySearch.ts +8 -0
- package/models/PlaySearchDTO.ts +8 -0
- package/models/PlaySearchDetailDTO.ts +8 -0
- package/models/PlaySearchPosition.ts +153 -0
- package/models/PlayerRatingResponse.ts +111 -0
- package/models/PositionResponse.ts +157 -0
- package/models/PositionStatus.ts +53 -0
- package/models/PositionTeam.ts +53 -0
- package/models/RecurringGame.ts +164 -0
- package/models/RecurringGameResponse.ts +155 -0
- package/models/SportEventData.ts +113 -0
- package/models/SportEventType.ts +77 -0
- package/models/SubmitRatingsRequest.ts +92 -0
- package/models/SubmitRatingsRequestRatingsInner.ts +99 -0
- package/models/Team.ts +186 -0
- package/models/TeamFeedItem.ts +188 -0
- package/models/TeamFeedItemResponse.ts +168 -0
- package/models/TeamFeedListResponse.ts +89 -0
- package/models/TeamFeedMedia.ts +101 -0
- package/models/TeamMember.ts +121 -0
- package/models/TeamMemberResponse.ts +123 -0
- package/models/TeamMemberRole.ts +54 -0
- package/models/TeamResponse.ts +194 -0
- package/models/TeamType.ts +53 -0
- package/models/UpdateMemberRoleRequest.ts +76 -0
- package/models/UpdateRecurringGameRequest.ts +124 -0
- package/models/UpdateTeamRequest.ts +105 -0
- package/models/VotingStatsResponse.ts +93 -0
- package/models/VotingStatusResponse.ts +82 -0
- package/models/index.ts +44 -0
- package/package.json +1 -1
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
AssignPositionsRequest,
|
|
19
|
+
AutoAssignPositionsRequest,
|
|
20
|
+
GroupedPositionsResponse,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
AssignPositionsRequestFromJSON,
|
|
24
|
+
AssignPositionsRequestToJSON,
|
|
25
|
+
AutoAssignPositionsRequestFromJSON,
|
|
26
|
+
AutoAssignPositionsRequestToJSON,
|
|
27
|
+
GroupedPositionsResponseFromJSON,
|
|
28
|
+
GroupedPositionsResponseToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface ApiAppPositionsAssignPostRequest {
|
|
32
|
+
assignPositionsRequest: AssignPositionsRequest;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ApiAppPositionsAutoAssignPostRequest {
|
|
36
|
+
autoAssignPositionsRequest: AutoAssignPositionsRequest;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ApiAppPositionsPlaySearchIdTeamTeamIdDeleteRequest {
|
|
40
|
+
playSearchId: string;
|
|
41
|
+
teamId: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ApiAppPositionsPlaySearchIdTeamTeamIdGetRequest {
|
|
45
|
+
playSearchId: string;
|
|
46
|
+
teamId: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
export class PositionsApi extends runtime.BaseAPI {
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Assign positions for a match
|
|
56
|
+
*/
|
|
57
|
+
async apiAppPositionsAssignPostRaw(requestParameters: ApiAppPositionsAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
58
|
+
if (requestParameters['assignPositionsRequest'] == null) {
|
|
59
|
+
throw new runtime.RequiredError(
|
|
60
|
+
'assignPositionsRequest',
|
|
61
|
+
'Required parameter "assignPositionsRequest" was null or undefined when calling apiAppPositionsAssignPost().'
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const queryParameters: any = {};
|
|
66
|
+
|
|
67
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
68
|
+
|
|
69
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
70
|
+
|
|
71
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
72
|
+
const token = this.configuration.accessToken;
|
|
73
|
+
const tokenString = await token("bearerAuth", []);
|
|
74
|
+
|
|
75
|
+
if (tokenString) {
|
|
76
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const response = await this.request({
|
|
80
|
+
path: `/api/app/positions/assign`,
|
|
81
|
+
method: 'POST',
|
|
82
|
+
headers: headerParameters,
|
|
83
|
+
query: queryParameters,
|
|
84
|
+
body: AssignPositionsRequestToJSON(requestParameters['assignPositionsRequest']),
|
|
85
|
+
}, initOverrides);
|
|
86
|
+
|
|
87
|
+
return new runtime.VoidApiResponse(response);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Assign positions for a match
|
|
92
|
+
*/
|
|
93
|
+
async apiAppPositionsAssignPost(requestParameters: ApiAppPositionsAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
94
|
+
await this.apiAppPositionsAssignPostRaw(requestParameters, initOverrides);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Auto-assign positions based on sport defaults
|
|
99
|
+
*/
|
|
100
|
+
async apiAppPositionsAutoAssignPostRaw(requestParameters: ApiAppPositionsAutoAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
101
|
+
if (requestParameters['autoAssignPositionsRequest'] == null) {
|
|
102
|
+
throw new runtime.RequiredError(
|
|
103
|
+
'autoAssignPositionsRequest',
|
|
104
|
+
'Required parameter "autoAssignPositionsRequest" was null or undefined when calling apiAppPositionsAutoAssignPost().'
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const queryParameters: any = {};
|
|
109
|
+
|
|
110
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
111
|
+
|
|
112
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
113
|
+
|
|
114
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
115
|
+
const token = this.configuration.accessToken;
|
|
116
|
+
const tokenString = await token("bearerAuth", []);
|
|
117
|
+
|
|
118
|
+
if (tokenString) {
|
|
119
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const response = await this.request({
|
|
123
|
+
path: `/api/app/positions/auto-assign`,
|
|
124
|
+
method: 'POST',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
body: AutoAssignPositionsRequestToJSON(requestParameters['autoAssignPositionsRequest']),
|
|
128
|
+
}, initOverrides);
|
|
129
|
+
|
|
130
|
+
return new runtime.VoidApiResponse(response);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Auto-assign positions based on sport defaults
|
|
135
|
+
*/
|
|
136
|
+
async apiAppPositionsAutoAssignPost(requestParameters: ApiAppPositionsAutoAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
137
|
+
await this.apiAppPositionsAutoAssignPostRaw(requestParameters, initOverrides);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Clear all positions for a match
|
|
142
|
+
*/
|
|
143
|
+
async apiAppPositionsPlaySearchIdTeamTeamIdDeleteRaw(requestParameters: ApiAppPositionsPlaySearchIdTeamTeamIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
144
|
+
if (requestParameters['playSearchId'] == null) {
|
|
145
|
+
throw new runtime.RequiredError(
|
|
146
|
+
'playSearchId',
|
|
147
|
+
'Required parameter "playSearchId" was null or undefined when calling apiAppPositionsPlaySearchIdTeamTeamIdDelete().'
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (requestParameters['teamId'] == null) {
|
|
152
|
+
throw new runtime.RequiredError(
|
|
153
|
+
'teamId',
|
|
154
|
+
'Required parameter "teamId" was null or undefined when calling apiAppPositionsPlaySearchIdTeamTeamIdDelete().'
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const queryParameters: any = {};
|
|
159
|
+
|
|
160
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
161
|
+
|
|
162
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
163
|
+
const token = this.configuration.accessToken;
|
|
164
|
+
const tokenString = await token("bearerAuth", []);
|
|
165
|
+
|
|
166
|
+
if (tokenString) {
|
|
167
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
const response = await this.request({
|
|
171
|
+
path: `/api/app/positions/{playSearchId}/team/{teamId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))).replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
|
|
172
|
+
method: 'DELETE',
|
|
173
|
+
headers: headerParameters,
|
|
174
|
+
query: queryParameters,
|
|
175
|
+
}, initOverrides);
|
|
176
|
+
|
|
177
|
+
return new runtime.VoidApiResponse(response);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Clear all positions for a match
|
|
182
|
+
*/
|
|
183
|
+
async apiAppPositionsPlaySearchIdTeamTeamIdDelete(requestParameters: ApiAppPositionsPlaySearchIdTeamTeamIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
184
|
+
await this.apiAppPositionsPlaySearchIdTeamTeamIdDeleteRaw(requestParameters, initOverrides);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Get positions for a match (grouped by team and status)
|
|
189
|
+
*/
|
|
190
|
+
async apiAppPositionsPlaySearchIdTeamTeamIdGetRaw(requestParameters: ApiAppPositionsPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GroupedPositionsResponse>> {
|
|
191
|
+
if (requestParameters['playSearchId'] == null) {
|
|
192
|
+
throw new runtime.RequiredError(
|
|
193
|
+
'playSearchId',
|
|
194
|
+
'Required parameter "playSearchId" was null or undefined when calling apiAppPositionsPlaySearchIdTeamTeamIdGet().'
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (requestParameters['teamId'] == null) {
|
|
199
|
+
throw new runtime.RequiredError(
|
|
200
|
+
'teamId',
|
|
201
|
+
'Required parameter "teamId" was null or undefined when calling apiAppPositionsPlaySearchIdTeamTeamIdGet().'
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const queryParameters: any = {};
|
|
206
|
+
|
|
207
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
208
|
+
|
|
209
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
210
|
+
const token = this.configuration.accessToken;
|
|
211
|
+
const tokenString = await token("bearerAuth", []);
|
|
212
|
+
|
|
213
|
+
if (tokenString) {
|
|
214
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const response = await this.request({
|
|
218
|
+
path: `/api/app/positions/{playSearchId}/team/{teamId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))).replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
|
|
219
|
+
method: 'GET',
|
|
220
|
+
headers: headerParameters,
|
|
221
|
+
query: queryParameters,
|
|
222
|
+
}, initOverrides);
|
|
223
|
+
|
|
224
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GroupedPositionsResponseFromJSON(jsonValue));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Get positions for a match (grouped by team and status)
|
|
229
|
+
*/
|
|
230
|
+
async apiAppPositionsPlaySearchIdTeamTeamIdGet(requestParameters: ApiAppPositionsPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupedPositionsResponse> {
|
|
231
|
+
const response = await this.apiAppPositionsPlaySearchIdTeamTeamIdGetRaw(requestParameters, initOverrides);
|
|
232
|
+
return await response.value();
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
CreateRecurringGameRequest,
|
|
19
|
+
RecurringGameResponse,
|
|
20
|
+
UpdateRecurringGameRequest,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
CreateRecurringGameRequestFromJSON,
|
|
24
|
+
CreateRecurringGameRequestToJSON,
|
|
25
|
+
RecurringGameResponseFromJSON,
|
|
26
|
+
RecurringGameResponseToJSON,
|
|
27
|
+
UpdateRecurringGameRequestFromJSON,
|
|
28
|
+
UpdateRecurringGameRequestToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface ApiAppRecurringGamesIdDeleteRequest {
|
|
32
|
+
id: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ApiAppRecurringGamesIdGetRequest {
|
|
36
|
+
id: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ApiAppRecurringGamesIdPatchRequest {
|
|
40
|
+
id: string;
|
|
41
|
+
updateRecurringGameRequest: UpdateRecurringGameRequest;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ApiAppRecurringGamesPostRequest {
|
|
45
|
+
createRecurringGameRequest: CreateRecurringGameRequest;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ApiAppRecurringGamesTeamTeamIdGetRequest {
|
|
49
|
+
teamId: string;
|
|
50
|
+
isActive?: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
export class RecurringGamesApi extends runtime.BaseAPI {
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Delete a recurring game
|
|
60
|
+
*/
|
|
61
|
+
async apiAppRecurringGamesIdDeleteRaw(requestParameters: ApiAppRecurringGamesIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
62
|
+
if (requestParameters['id'] == null) {
|
|
63
|
+
throw new runtime.RequiredError(
|
|
64
|
+
'id',
|
|
65
|
+
'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdDelete().'
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const queryParameters: any = {};
|
|
70
|
+
|
|
71
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
72
|
+
|
|
73
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
74
|
+
const token = this.configuration.accessToken;
|
|
75
|
+
const tokenString = await token("bearerAuth", []);
|
|
76
|
+
|
|
77
|
+
if (tokenString) {
|
|
78
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const response = await this.request({
|
|
82
|
+
path: `/api/app/recurring-games/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
83
|
+
method: 'DELETE',
|
|
84
|
+
headers: headerParameters,
|
|
85
|
+
query: queryParameters,
|
|
86
|
+
}, initOverrides);
|
|
87
|
+
|
|
88
|
+
return new runtime.VoidApiResponse(response);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Delete a recurring game
|
|
93
|
+
*/
|
|
94
|
+
async apiAppRecurringGamesIdDelete(requestParameters: ApiAppRecurringGamesIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
95
|
+
await this.apiAppRecurringGamesIdDeleteRaw(requestParameters, initOverrides);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Get a recurring game by ID
|
|
100
|
+
*/
|
|
101
|
+
async apiAppRecurringGamesIdGetRaw(requestParameters: ApiAppRecurringGamesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
|
|
102
|
+
if (requestParameters['id'] == null) {
|
|
103
|
+
throw new runtime.RequiredError(
|
|
104
|
+
'id',
|
|
105
|
+
'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdGet().'
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const queryParameters: any = {};
|
|
110
|
+
|
|
111
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
112
|
+
|
|
113
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
114
|
+
const token = this.configuration.accessToken;
|
|
115
|
+
const tokenString = await token("bearerAuth", []);
|
|
116
|
+
|
|
117
|
+
if (tokenString) {
|
|
118
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const response = await this.request({
|
|
122
|
+
path: `/api/app/recurring-games/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
123
|
+
method: 'GET',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
}, initOverrides);
|
|
127
|
+
|
|
128
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RecurringGameResponseFromJSON(jsonValue));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Get a recurring game by ID
|
|
133
|
+
*/
|
|
134
|
+
async apiAppRecurringGamesIdGet(requestParameters: ApiAppRecurringGamesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
|
|
135
|
+
const response = await this.apiAppRecurringGamesIdGetRaw(requestParameters, initOverrides);
|
|
136
|
+
return await response.value();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Update a recurring game
|
|
141
|
+
*/
|
|
142
|
+
async apiAppRecurringGamesIdPatchRaw(requestParameters: ApiAppRecurringGamesIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
|
|
143
|
+
if (requestParameters['id'] == null) {
|
|
144
|
+
throw new runtime.RequiredError(
|
|
145
|
+
'id',
|
|
146
|
+
'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdPatch().'
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (requestParameters['updateRecurringGameRequest'] == null) {
|
|
151
|
+
throw new runtime.RequiredError(
|
|
152
|
+
'updateRecurringGameRequest',
|
|
153
|
+
'Required parameter "updateRecurringGameRequest" was null or undefined when calling apiAppRecurringGamesIdPatch().'
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const queryParameters: any = {};
|
|
158
|
+
|
|
159
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
160
|
+
|
|
161
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
162
|
+
|
|
163
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
164
|
+
const token = this.configuration.accessToken;
|
|
165
|
+
const tokenString = await token("bearerAuth", []);
|
|
166
|
+
|
|
167
|
+
if (tokenString) {
|
|
168
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const response = await this.request({
|
|
172
|
+
path: `/api/app/recurring-games/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
173
|
+
method: 'PATCH',
|
|
174
|
+
headers: headerParameters,
|
|
175
|
+
query: queryParameters,
|
|
176
|
+
body: UpdateRecurringGameRequestToJSON(requestParameters['updateRecurringGameRequest']),
|
|
177
|
+
}, initOverrides);
|
|
178
|
+
|
|
179
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RecurringGameResponseFromJSON(jsonValue));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Update a recurring game
|
|
184
|
+
*/
|
|
185
|
+
async apiAppRecurringGamesIdPatch(requestParameters: ApiAppRecurringGamesIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
|
|
186
|
+
const response = await this.apiAppRecurringGamesIdPatchRaw(requestParameters, initOverrides);
|
|
187
|
+
return await response.value();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Create a recurring game for a team
|
|
192
|
+
*/
|
|
193
|
+
async apiAppRecurringGamesPostRaw(requestParameters: ApiAppRecurringGamesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
|
|
194
|
+
if (requestParameters['createRecurringGameRequest'] == null) {
|
|
195
|
+
throw new runtime.RequiredError(
|
|
196
|
+
'createRecurringGameRequest',
|
|
197
|
+
'Required parameter "createRecurringGameRequest" was null or undefined when calling apiAppRecurringGamesPost().'
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const queryParameters: any = {};
|
|
202
|
+
|
|
203
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
204
|
+
|
|
205
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
206
|
+
|
|
207
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
208
|
+
const token = this.configuration.accessToken;
|
|
209
|
+
const tokenString = await token("bearerAuth", []);
|
|
210
|
+
|
|
211
|
+
if (tokenString) {
|
|
212
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
const response = await this.request({
|
|
216
|
+
path: `/api/app/recurring-games`,
|
|
217
|
+
method: 'POST',
|
|
218
|
+
headers: headerParameters,
|
|
219
|
+
query: queryParameters,
|
|
220
|
+
body: CreateRecurringGameRequestToJSON(requestParameters['createRecurringGameRequest']),
|
|
221
|
+
}, initOverrides);
|
|
222
|
+
|
|
223
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RecurringGameResponseFromJSON(jsonValue));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Create a recurring game for a team
|
|
228
|
+
*/
|
|
229
|
+
async apiAppRecurringGamesPost(requestParameters: ApiAppRecurringGamesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
|
|
230
|
+
const response = await this.apiAppRecurringGamesPostRaw(requestParameters, initOverrides);
|
|
231
|
+
return await response.value();
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* List recurring games for a team
|
|
236
|
+
*/
|
|
237
|
+
async apiAppRecurringGamesTeamTeamIdGetRaw(requestParameters: ApiAppRecurringGamesTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<RecurringGameResponse>>> {
|
|
238
|
+
if (requestParameters['teamId'] == null) {
|
|
239
|
+
throw new runtime.RequiredError(
|
|
240
|
+
'teamId',
|
|
241
|
+
'Required parameter "teamId" was null or undefined when calling apiAppRecurringGamesTeamTeamIdGet().'
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const queryParameters: any = {};
|
|
246
|
+
|
|
247
|
+
if (requestParameters['isActive'] != null) {
|
|
248
|
+
queryParameters['isActive'] = requestParameters['isActive'];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
252
|
+
|
|
253
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
254
|
+
const token = this.configuration.accessToken;
|
|
255
|
+
const tokenString = await token("bearerAuth", []);
|
|
256
|
+
|
|
257
|
+
if (tokenString) {
|
|
258
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const response = await this.request({
|
|
262
|
+
path: `/api/app/recurring-games/team/{teamId}`.replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
|
|
263
|
+
method: 'GET',
|
|
264
|
+
headers: headerParameters,
|
|
265
|
+
query: queryParameters,
|
|
266
|
+
}, initOverrides);
|
|
267
|
+
|
|
268
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(RecurringGameResponseFromJSON));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* List recurring games for a team
|
|
273
|
+
*/
|
|
274
|
+
async apiAppRecurringGamesTeamTeamIdGet(requestParameters: ApiAppRecurringGamesTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<RecurringGameResponse>> {
|
|
275
|
+
const response = await this.apiAppRecurringGamesTeamTeamIdGetRaw(requestParameters, initOverrides);
|
|
276
|
+
return await response.value();
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.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
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ApiAppTeamsTeamIdEventsGet200Response,
|
|
19
|
+
ApiAppTeamsTeamIdEventsPostRequest,
|
|
20
|
+
} from '../models/index';
|
|
21
|
+
import {
|
|
22
|
+
ApiAppTeamsTeamIdEventsGet200ResponseFromJSON,
|
|
23
|
+
ApiAppTeamsTeamIdEventsGet200ResponseToJSON,
|
|
24
|
+
ApiAppTeamsTeamIdEventsPostRequestFromJSON,
|
|
25
|
+
ApiAppTeamsTeamIdEventsPostRequestToJSON,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
|
|
28
|
+
export interface ApiAppTeamsTeamIdEventsGetRequest {
|
|
29
|
+
teamId: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ApiAppTeamsTeamIdEventsPostOperationRequest {
|
|
33
|
+
teamId: string;
|
|
34
|
+
apiAppTeamsTeamIdEventsPostRequest: ApiAppTeamsTeamIdEventsPostRequest;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export class SportEventsApi extends runtime.BaseAPI {
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Get available sport events for team\'s sport
|
|
44
|
+
*/
|
|
45
|
+
async apiAppTeamsTeamIdEventsGetRaw(requestParameters: ApiAppTeamsTeamIdEventsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiAppTeamsTeamIdEventsGet200Response>> {
|
|
46
|
+
if (requestParameters['teamId'] == null) {
|
|
47
|
+
throw new runtime.RequiredError(
|
|
48
|
+
'teamId',
|
|
49
|
+
'Required parameter "teamId" was null or undefined when calling apiAppTeamsTeamIdEventsGet().'
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const queryParameters: any = {};
|
|
54
|
+
|
|
55
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
56
|
+
|
|
57
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
58
|
+
const token = this.configuration.accessToken;
|
|
59
|
+
const tokenString = await token("bearerAuth", []);
|
|
60
|
+
|
|
61
|
+
if (tokenString) {
|
|
62
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const response = await this.request({
|
|
66
|
+
path: `/api/app/teams/{teamId}/events`.replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
|
|
67
|
+
method: 'GET',
|
|
68
|
+
headers: headerParameters,
|
|
69
|
+
query: queryParameters,
|
|
70
|
+
}, initOverrides);
|
|
71
|
+
|
|
72
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApiAppTeamsTeamIdEventsGet200ResponseFromJSON(jsonValue));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Get available sport events for team\'s sport
|
|
77
|
+
*/
|
|
78
|
+
async apiAppTeamsTeamIdEventsGet(requestParameters: ApiAppTeamsTeamIdEventsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiAppTeamsTeamIdEventsGet200Response> {
|
|
79
|
+
const response = await this.apiAppTeamsTeamIdEventsGetRaw(requestParameters, initOverrides);
|
|
80
|
+
return await response.value();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Create a sport event in team feed
|
|
85
|
+
*/
|
|
86
|
+
async apiAppTeamsTeamIdEventsPostRaw(requestParameters: ApiAppTeamsTeamIdEventsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
87
|
+
if (requestParameters['teamId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError(
|
|
89
|
+
'teamId',
|
|
90
|
+
'Required parameter "teamId" was null or undefined when calling apiAppTeamsTeamIdEventsPost().'
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (requestParameters['apiAppTeamsTeamIdEventsPostRequest'] == null) {
|
|
95
|
+
throw new runtime.RequiredError(
|
|
96
|
+
'apiAppTeamsTeamIdEventsPostRequest',
|
|
97
|
+
'Required parameter "apiAppTeamsTeamIdEventsPostRequest" was null or undefined when calling apiAppTeamsTeamIdEventsPost().'
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const queryParameters: any = {};
|
|
102
|
+
|
|
103
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
104
|
+
|
|
105
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
106
|
+
|
|
107
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
108
|
+
const token = this.configuration.accessToken;
|
|
109
|
+
const tokenString = await token("bearerAuth", []);
|
|
110
|
+
|
|
111
|
+
if (tokenString) {
|
|
112
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const response = await this.request({
|
|
116
|
+
path: `/api/app/teams/{teamId}/events`.replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
|
|
117
|
+
method: 'POST',
|
|
118
|
+
headers: headerParameters,
|
|
119
|
+
query: queryParameters,
|
|
120
|
+
body: ApiAppTeamsTeamIdEventsPostRequestToJSON(requestParameters['apiAppTeamsTeamIdEventsPostRequest']),
|
|
121
|
+
}, initOverrides);
|
|
122
|
+
|
|
123
|
+
return new runtime.VoidApiResponse(response);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Create a sport event in team feed
|
|
128
|
+
*/
|
|
129
|
+
async apiAppTeamsTeamIdEventsPost(requestParameters: ApiAppTeamsTeamIdEventsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
130
|
+
await this.apiAppTeamsTeamIdEventsPostRaw(requestParameters, initOverrides);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
}
|