@jugarhoy/api 1.1.21 → 1.1.22

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.
@@ -15,17 +15,17 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
- ApiAppRecurringGamesIdPlaySearchesGet200Response,
19
18
  CreateRecurringGameRequest,
19
+ ListPlaySearchesByRecurringGame200Response,
20
20
  PlaySearchDTO,
21
21
  RecurringGameResponse,
22
22
  UpdateRecurringGameRequest,
23
23
  } from '../models/index';
24
24
  import {
25
- ApiAppRecurringGamesIdPlaySearchesGet200ResponseFromJSON,
26
- ApiAppRecurringGamesIdPlaySearchesGet200ResponseToJSON,
27
25
  CreateRecurringGameRequestFromJSON,
28
26
  CreateRecurringGameRequestToJSON,
27
+ ListPlaySearchesByRecurringGame200ResponseFromJSON,
28
+ ListPlaySearchesByRecurringGame200ResponseToJSON,
29
29
  PlaySearchDTOFromJSON,
30
30
  PlaySearchDTOToJSON,
31
31
  RecurringGameResponseFromJSON,
@@ -34,55 +34,55 @@ import {
34
34
  UpdateRecurringGameRequestToJSON,
35
35
  } from '../models/index';
36
36
 
37
- export interface ApiAppRecurringGamesIdActivePlaySearchGetRequest {
38
- id: string;
37
+ export interface CreateRecurringGameOperationRequest {
38
+ createRecurringGameRequest: CreateRecurringGameRequest;
39
39
  }
40
40
 
41
- export interface ApiAppRecurringGamesIdDeleteRequest {
41
+ export interface DeleteRecurringGameRequest {
42
42
  id: string;
43
43
  }
44
44
 
45
- export interface ApiAppRecurringGamesIdGetRequest {
45
+ export interface GetActivePlaySearchRequest {
46
46
  id: string;
47
47
  }
48
48
 
49
- export interface ApiAppRecurringGamesIdPatchRequest {
49
+ export interface GetRecurringGameByIdRequest {
50
50
  id: string;
51
- updateRecurringGameRequest: UpdateRecurringGameRequest;
52
51
  }
53
52
 
54
- export interface ApiAppRecurringGamesIdPlaySearchesGetRequest {
53
+ export interface GetVotingPlaySearchRequest {
55
54
  id: string;
56
- page?: number;
57
- size?: number;
58
55
  }
59
56
 
60
- export interface ApiAppRecurringGamesIdVotingPlaySearchGetRequest {
57
+ export interface ListPlaySearchesByRecurringGameRequest {
61
58
  id: string;
59
+ page?: number;
60
+ size?: number;
62
61
  }
63
62
 
64
- export interface ApiAppRecurringGamesPostRequest {
65
- createRecurringGameRequest: CreateRecurringGameRequest;
66
- }
67
-
68
- export interface ApiAppRecurringGamesTeamTeamIdGetRequest {
63
+ export interface ListRecurringGamesByTeamRequest {
69
64
  teamId: string;
70
65
  isActive?: boolean;
71
66
  }
72
67
 
68
+ export interface UpdateRecurringGameOperationRequest {
69
+ id: string;
70
+ updateRecurringGameRequest: UpdateRecurringGameRequest;
71
+ }
72
+
73
73
  /**
74
74
  *
75
75
  */
76
76
  export class RecurringGamesApi extends runtime.BaseAPI {
77
77
 
78
78
  /**
79
- * Get the active (upcoming) PlaySearch for a recurring game
79
+ * Create a recurring game for a team
80
80
  */
81
- async apiAppRecurringGamesIdActivePlaySearchGetRaw(requestParameters: ApiAppRecurringGamesIdActivePlaySearchGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDTO>> {
82
- if (requestParameters['id'] == null) {
81
+ async createRecurringGameRaw(requestParameters: CreateRecurringGameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
82
+ if (requestParameters['createRecurringGameRequest'] == null) {
83
83
  throw new runtime.RequiredError(
84
- 'id',
85
- 'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdActivePlaySearchGet().'
84
+ 'createRecurringGameRequest',
85
+ 'Required parameter "createRecurringGameRequest" was null or undefined when calling createRecurringGame().'
86
86
  );
87
87
  }
88
88
 
@@ -90,6 +90,8 @@ export class RecurringGamesApi extends runtime.BaseAPI {
90
90
 
91
91
  const headerParameters: runtime.HTTPHeaders = {};
92
92
 
93
+ headerParameters['Content-Type'] = 'application/json';
94
+
93
95
  if (this.configuration && this.configuration.accessToken) {
94
96
  const token = this.configuration.accessToken;
95
97
  const tokenString = await token("bearerAuth", []);
@@ -99,31 +101,32 @@ export class RecurringGamesApi extends runtime.BaseAPI {
99
101
  }
100
102
  }
101
103
  const response = await this.request({
102
- path: `/api/app/recurring-games/{id}/active-play-search`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
103
- method: 'GET',
104
+ path: `/api/app/recurring-games`,
105
+ method: 'POST',
104
106
  headers: headerParameters,
105
107
  query: queryParameters,
108
+ body: CreateRecurringGameRequestToJSON(requestParameters['createRecurringGameRequest']),
106
109
  }, initOverrides);
107
110
 
108
- return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDTOFromJSON(jsonValue));
111
+ return new runtime.JSONApiResponse(response, (jsonValue) => RecurringGameResponseFromJSON(jsonValue));
109
112
  }
110
113
 
111
114
  /**
112
- * Get the active (upcoming) PlaySearch for a recurring game
115
+ * Create a recurring game for a team
113
116
  */
114
- async apiAppRecurringGamesIdActivePlaySearchGet(requestParameters: ApiAppRecurringGamesIdActivePlaySearchGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDTO> {
115
- const response = await this.apiAppRecurringGamesIdActivePlaySearchGetRaw(requestParameters, initOverrides);
117
+ async createRecurringGame(requestParameters: CreateRecurringGameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
118
+ const response = await this.createRecurringGameRaw(requestParameters, initOverrides);
116
119
  return await response.value();
117
120
  }
118
121
 
119
122
  /**
120
123
  * Delete a recurring game
121
124
  */
122
- async apiAppRecurringGamesIdDeleteRaw(requestParameters: ApiAppRecurringGamesIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
125
+ async deleteRecurringGameRaw(requestParameters: DeleteRecurringGameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
123
126
  if (requestParameters['id'] == null) {
124
127
  throw new runtime.RequiredError(
125
128
  'id',
126
- 'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdDelete().'
129
+ 'Required parameter "id" was null or undefined when calling deleteRecurringGame().'
127
130
  );
128
131
  }
129
132
 
@@ -152,18 +155,18 @@ export class RecurringGamesApi extends runtime.BaseAPI {
152
155
  /**
153
156
  * Delete a recurring game
154
157
  */
155
- async apiAppRecurringGamesIdDelete(requestParameters: ApiAppRecurringGamesIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
156
- await this.apiAppRecurringGamesIdDeleteRaw(requestParameters, initOverrides);
158
+ async deleteRecurringGame(requestParameters: DeleteRecurringGameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
159
+ await this.deleteRecurringGameRaw(requestParameters, initOverrides);
157
160
  }
158
161
 
159
162
  /**
160
- * Get a recurring game by ID
163
+ * Get the active (upcoming) PlaySearch for a recurring game
161
164
  */
162
- async apiAppRecurringGamesIdGetRaw(requestParameters: ApiAppRecurringGamesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
165
+ async getActivePlaySearchRaw(requestParameters: GetActivePlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDTO>> {
163
166
  if (requestParameters['id'] == null) {
164
167
  throw new runtime.RequiredError(
165
168
  'id',
166
- 'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdGet().'
169
+ 'Required parameter "id" was null or undefined when calling getActivePlaySearch().'
167
170
  );
168
171
  }
169
172
 
@@ -180,38 +183,31 @@ export class RecurringGamesApi extends runtime.BaseAPI {
180
183
  }
181
184
  }
182
185
  const response = await this.request({
183
- path: `/api/app/recurring-games/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
186
+ path: `/api/app/recurring-games/{id}/active-play-search`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
184
187
  method: 'GET',
185
188
  headers: headerParameters,
186
189
  query: queryParameters,
187
190
  }, initOverrides);
188
191
 
189
- return new runtime.JSONApiResponse(response, (jsonValue) => RecurringGameResponseFromJSON(jsonValue));
192
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDTOFromJSON(jsonValue));
190
193
  }
191
194
 
192
195
  /**
193
- * Get a recurring game by ID
196
+ * Get the active (upcoming) PlaySearch for a recurring game
194
197
  */
195
- async apiAppRecurringGamesIdGet(requestParameters: ApiAppRecurringGamesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
196
- const response = await this.apiAppRecurringGamesIdGetRaw(requestParameters, initOverrides);
198
+ async getActivePlaySearch(requestParameters: GetActivePlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDTO> {
199
+ const response = await this.getActivePlaySearchRaw(requestParameters, initOverrides);
197
200
  return await response.value();
198
201
  }
199
202
 
200
203
  /**
201
- * Update a recurring game
204
+ * Get a recurring game by ID
202
205
  */
203
- async apiAppRecurringGamesIdPatchRaw(requestParameters: ApiAppRecurringGamesIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
206
+ async getRecurringGameByIdRaw(requestParameters: GetRecurringGameByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
204
207
  if (requestParameters['id'] == null) {
205
208
  throw new runtime.RequiredError(
206
209
  'id',
207
- 'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdPatch().'
208
- );
209
- }
210
-
211
- if (requestParameters['updateRecurringGameRequest'] == null) {
212
- throw new runtime.RequiredError(
213
- 'updateRecurringGameRequest',
214
- 'Required parameter "updateRecurringGameRequest" was null or undefined when calling apiAppRecurringGamesIdPatch().'
210
+ 'Required parameter "id" was null or undefined when calling getRecurringGameById().'
215
211
  );
216
212
  }
217
213
 
@@ -219,8 +215,6 @@ export class RecurringGamesApi extends runtime.BaseAPI {
219
215
 
220
216
  const headerParameters: runtime.HTTPHeaders = {};
221
217
 
222
- headerParameters['Content-Type'] = 'application/json';
223
-
224
218
  if (this.configuration && this.configuration.accessToken) {
225
219
  const token = this.configuration.accessToken;
226
220
  const tokenString = await token("bearerAuth", []);
@@ -231,44 +225,35 @@ export class RecurringGamesApi extends runtime.BaseAPI {
231
225
  }
232
226
  const response = await this.request({
233
227
  path: `/api/app/recurring-games/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
234
- method: 'PATCH',
228
+ method: 'GET',
235
229
  headers: headerParameters,
236
230
  query: queryParameters,
237
- body: UpdateRecurringGameRequestToJSON(requestParameters['updateRecurringGameRequest']),
238
231
  }, initOverrides);
239
232
 
240
233
  return new runtime.JSONApiResponse(response, (jsonValue) => RecurringGameResponseFromJSON(jsonValue));
241
234
  }
242
235
 
243
236
  /**
244
- * Update a recurring game
237
+ * Get a recurring game by ID
245
238
  */
246
- async apiAppRecurringGamesIdPatch(requestParameters: ApiAppRecurringGamesIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
247
- const response = await this.apiAppRecurringGamesIdPatchRaw(requestParameters, initOverrides);
239
+ async getRecurringGameById(requestParameters: GetRecurringGameByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
240
+ const response = await this.getRecurringGameByIdRaw(requestParameters, initOverrides);
248
241
  return await response.value();
249
242
  }
250
243
 
251
244
  /**
252
- * Get all PlaySearches for a recurring game
245
+ * Get the voting PlaySearch for a recurring game
253
246
  */
254
- async apiAppRecurringGamesIdPlaySearchesGetRaw(requestParameters: ApiAppRecurringGamesIdPlaySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiAppRecurringGamesIdPlaySearchesGet200Response>> {
247
+ async getVotingPlaySearchRaw(requestParameters: GetVotingPlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDTO>> {
255
248
  if (requestParameters['id'] == null) {
256
249
  throw new runtime.RequiredError(
257
250
  'id',
258
- 'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdPlaySearchesGet().'
251
+ 'Required parameter "id" was null or undefined when calling getVotingPlaySearch().'
259
252
  );
260
253
  }
261
254
 
262
255
  const queryParameters: any = {};
263
256
 
264
- if (requestParameters['page'] != null) {
265
- queryParameters['page'] = requestParameters['page'];
266
- }
267
-
268
- if (requestParameters['size'] != null) {
269
- queryParameters['size'] = requestParameters['size'];
270
- }
271
-
272
257
  const headerParameters: runtime.HTTPHeaders = {};
273
258
 
274
259
  if (this.configuration && this.configuration.accessToken) {
@@ -280,36 +265,44 @@ export class RecurringGamesApi extends runtime.BaseAPI {
280
265
  }
281
266
  }
282
267
  const response = await this.request({
283
- path: `/api/app/recurring-games/{id}/play-searches`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
268
+ path: `/api/app/recurring-games/{id}/voting-play-search`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
284
269
  method: 'GET',
285
270
  headers: headerParameters,
286
271
  query: queryParameters,
287
272
  }, initOverrides);
288
273
 
289
- return new runtime.JSONApiResponse(response, (jsonValue) => ApiAppRecurringGamesIdPlaySearchesGet200ResponseFromJSON(jsonValue));
274
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDTOFromJSON(jsonValue));
290
275
  }
291
276
 
292
277
  /**
293
- * Get all PlaySearches for a recurring game
278
+ * Get the voting PlaySearch for a recurring game
294
279
  */
295
- async apiAppRecurringGamesIdPlaySearchesGet(requestParameters: ApiAppRecurringGamesIdPlaySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiAppRecurringGamesIdPlaySearchesGet200Response> {
296
- const response = await this.apiAppRecurringGamesIdPlaySearchesGetRaw(requestParameters, initOverrides);
280
+ async getVotingPlaySearch(requestParameters: GetVotingPlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDTO> {
281
+ const response = await this.getVotingPlaySearchRaw(requestParameters, initOverrides);
297
282
  return await response.value();
298
283
  }
299
284
 
300
285
  /**
301
- * Get the voting PlaySearch for a recurring game
286
+ * Get all PlaySearches for a recurring game
302
287
  */
303
- async apiAppRecurringGamesIdVotingPlaySearchGetRaw(requestParameters: ApiAppRecurringGamesIdVotingPlaySearchGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDTO>> {
288
+ async listPlaySearchesByRecurringGameRaw(requestParameters: ListPlaySearchesByRecurringGameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListPlaySearchesByRecurringGame200Response>> {
304
289
  if (requestParameters['id'] == null) {
305
290
  throw new runtime.RequiredError(
306
291
  'id',
307
- 'Required parameter "id" was null or undefined when calling apiAppRecurringGamesIdVotingPlaySearchGet().'
292
+ 'Required parameter "id" was null or undefined when calling listPlaySearchesByRecurringGame().'
308
293
  );
309
294
  }
310
295
 
311
296
  const queryParameters: any = {};
312
297
 
298
+ if (requestParameters['page'] != null) {
299
+ queryParameters['page'] = requestParameters['page'];
300
+ }
301
+
302
+ if (requestParameters['size'] != null) {
303
+ queryParameters['size'] = requestParameters['size'];
304
+ }
305
+
313
306
  const headerParameters: runtime.HTTPHeaders = {};
314
307
 
315
308
  if (this.configuration && this.configuration.accessToken) {
@@ -321,39 +314,41 @@ export class RecurringGamesApi extends runtime.BaseAPI {
321
314
  }
322
315
  }
323
316
  const response = await this.request({
324
- path: `/api/app/recurring-games/{id}/voting-play-search`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
317
+ path: `/api/app/recurring-games/{id}/play-searches`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
325
318
  method: 'GET',
326
319
  headers: headerParameters,
327
320
  query: queryParameters,
328
321
  }, initOverrides);
329
322
 
330
- return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDTOFromJSON(jsonValue));
323
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListPlaySearchesByRecurringGame200ResponseFromJSON(jsonValue));
331
324
  }
332
325
 
333
326
  /**
334
- * Get the voting PlaySearch for a recurring game
327
+ * Get all PlaySearches for a recurring game
335
328
  */
336
- async apiAppRecurringGamesIdVotingPlaySearchGet(requestParameters: ApiAppRecurringGamesIdVotingPlaySearchGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDTO> {
337
- const response = await this.apiAppRecurringGamesIdVotingPlaySearchGetRaw(requestParameters, initOverrides);
329
+ async listPlaySearchesByRecurringGame(requestParameters: ListPlaySearchesByRecurringGameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListPlaySearchesByRecurringGame200Response> {
330
+ const response = await this.listPlaySearchesByRecurringGameRaw(requestParameters, initOverrides);
338
331
  return await response.value();
339
332
  }
340
333
 
341
334
  /**
342
- * Create a recurring game for a team
335
+ * List recurring games for a team
343
336
  */
344
- async apiAppRecurringGamesPostRaw(requestParameters: ApiAppRecurringGamesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
345
- if (requestParameters['createRecurringGameRequest'] == null) {
337
+ async listRecurringGamesByTeamRaw(requestParameters: ListRecurringGamesByTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<RecurringGameResponse>>> {
338
+ if (requestParameters['teamId'] == null) {
346
339
  throw new runtime.RequiredError(
347
- 'createRecurringGameRequest',
348
- 'Required parameter "createRecurringGameRequest" was null or undefined when calling apiAppRecurringGamesPost().'
340
+ 'teamId',
341
+ 'Required parameter "teamId" was null or undefined when calling listRecurringGamesByTeam().'
349
342
  );
350
343
  }
351
344
 
352
345
  const queryParameters: any = {};
353
346
 
354
- const headerParameters: runtime.HTTPHeaders = {};
347
+ if (requestParameters['isActive'] != null) {
348
+ queryParameters['isActive'] = requestParameters['isActive'];
349
+ }
355
350
 
356
- headerParameters['Content-Type'] = 'application/json';
351
+ const headerParameters: runtime.HTTPHeaders = {};
357
352
 
358
353
  if (this.configuration && this.configuration.accessToken) {
359
354
  const token = this.configuration.accessToken;
@@ -364,43 +359,47 @@ export class RecurringGamesApi extends runtime.BaseAPI {
364
359
  }
365
360
  }
366
361
  const response = await this.request({
367
- path: `/api/app/recurring-games`,
368
- method: 'POST',
362
+ path: `/api/app/recurring-games/team/{teamId}`.replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
363
+ method: 'GET',
369
364
  headers: headerParameters,
370
365
  query: queryParameters,
371
- body: CreateRecurringGameRequestToJSON(requestParameters['createRecurringGameRequest']),
372
366
  }, initOverrides);
373
367
 
374
- return new runtime.JSONApiResponse(response, (jsonValue) => RecurringGameResponseFromJSON(jsonValue));
368
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(RecurringGameResponseFromJSON));
375
369
  }
376
370
 
377
371
  /**
378
- * Create a recurring game for a team
372
+ * List recurring games for a team
379
373
  */
380
- async apiAppRecurringGamesPost(requestParameters: ApiAppRecurringGamesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
381
- const response = await this.apiAppRecurringGamesPostRaw(requestParameters, initOverrides);
374
+ async listRecurringGamesByTeam(requestParameters: ListRecurringGamesByTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<RecurringGameResponse>> {
375
+ const response = await this.listRecurringGamesByTeamRaw(requestParameters, initOverrides);
382
376
  return await response.value();
383
377
  }
384
378
 
385
379
  /**
386
- * List recurring games for a team
380
+ * Update a recurring game
387
381
  */
388
- async apiAppRecurringGamesTeamTeamIdGetRaw(requestParameters: ApiAppRecurringGamesTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<RecurringGameResponse>>> {
389
- if (requestParameters['teamId'] == null) {
382
+ async updateRecurringGameRaw(requestParameters: UpdateRecurringGameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RecurringGameResponse>> {
383
+ if (requestParameters['id'] == null) {
390
384
  throw new runtime.RequiredError(
391
- 'teamId',
392
- 'Required parameter "teamId" was null or undefined when calling apiAppRecurringGamesTeamTeamIdGet().'
385
+ 'id',
386
+ 'Required parameter "id" was null or undefined when calling updateRecurringGame().'
393
387
  );
394
388
  }
395
389
 
396
- const queryParameters: any = {};
397
-
398
- if (requestParameters['isActive'] != null) {
399
- queryParameters['isActive'] = requestParameters['isActive'];
390
+ if (requestParameters['updateRecurringGameRequest'] == null) {
391
+ throw new runtime.RequiredError(
392
+ 'updateRecurringGameRequest',
393
+ 'Required parameter "updateRecurringGameRequest" was null or undefined when calling updateRecurringGame().'
394
+ );
400
395
  }
401
396
 
397
+ const queryParameters: any = {};
398
+
402
399
  const headerParameters: runtime.HTTPHeaders = {};
403
400
 
401
+ headerParameters['Content-Type'] = 'application/json';
402
+
404
403
  if (this.configuration && this.configuration.accessToken) {
405
404
  const token = this.configuration.accessToken;
406
405
  const tokenString = await token("bearerAuth", []);
@@ -410,20 +409,21 @@ export class RecurringGamesApi extends runtime.BaseAPI {
410
409
  }
411
410
  }
412
411
  const response = await this.request({
413
- path: `/api/app/recurring-games/team/{teamId}`.replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
414
- method: 'GET',
412
+ path: `/api/app/recurring-games/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
413
+ method: 'PATCH',
415
414
  headers: headerParameters,
416
415
  query: queryParameters,
416
+ body: UpdateRecurringGameRequestToJSON(requestParameters['updateRecurringGameRequest']),
417
417
  }, initOverrides);
418
418
 
419
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(RecurringGameResponseFromJSON));
419
+ return new runtime.JSONApiResponse(response, (jsonValue) => RecurringGameResponseFromJSON(jsonValue));
420
420
  }
421
421
 
422
422
  /**
423
- * List recurring games for a team
423
+ * Update a recurring game
424
424
  */
425
- async apiAppRecurringGamesTeamTeamIdGet(requestParameters: ApiAppRecurringGamesTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<RecurringGameResponse>> {
426
- const response = await this.apiAppRecurringGamesTeamTeamIdGetRaw(requestParameters, initOverrides);
425
+ async updateRecurringGame(requestParameters: UpdateRecurringGameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RecurringGameResponse> {
426
+ const response = await this.updateRecurringGameRaw(requestParameters, initOverrides);
427
427
  return await response.value();
428
428
  }
429
429
 
@@ -0,0 +1,81 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { PlaySearchDTO } from './PlaySearchDTO';
17
+ import {
18
+ PlaySearchDTOFromJSON,
19
+ PlaySearchDTOFromJSONTyped,
20
+ PlaySearchDTOToJSON,
21
+ PlaySearchDTOToJSONTyped,
22
+ } from './PlaySearchDTO';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ListPlaySearchesByRecurringGame200Response
28
+ */
29
+ export interface ListPlaySearchesByRecurringGame200Response {
30
+ /**
31
+ *
32
+ * @type {Array<PlaySearchDTO>}
33
+ * @memberof ListPlaySearchesByRecurringGame200Response
34
+ */
35
+ data?: Array<PlaySearchDTO>;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof ListPlaySearchesByRecurringGame200Response
40
+ */
41
+ total?: number;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the ListPlaySearchesByRecurringGame200Response interface.
46
+ */
47
+ export function instanceOfListPlaySearchesByRecurringGame200Response(value: object): value is ListPlaySearchesByRecurringGame200Response {
48
+ return true;
49
+ }
50
+
51
+ export function ListPlaySearchesByRecurringGame200ResponseFromJSON(json: any): ListPlaySearchesByRecurringGame200Response {
52
+ return ListPlaySearchesByRecurringGame200ResponseFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function ListPlaySearchesByRecurringGame200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListPlaySearchesByRecurringGame200Response {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(PlaySearchDTOFromJSON)),
62
+ 'total': json['total'] == null ? undefined : json['total'],
63
+ };
64
+ }
65
+
66
+ export function ListPlaySearchesByRecurringGame200ResponseToJSON(json: any): ListPlaySearchesByRecurringGame200Response {
67
+ return ListPlaySearchesByRecurringGame200ResponseToJSONTyped(json, false);
68
+ }
69
+
70
+ export function ListPlaySearchesByRecurringGame200ResponseToJSONTyped(value?: ListPlaySearchesByRecurringGame200Response | null, ignoreDiscriminator: boolean = false): any {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+
75
+ return {
76
+
77
+ 'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(PlaySearchDTOToJSON)),
78
+ 'total': value['total'],
79
+ };
80
+ }
81
+
package/models/index.ts CHANGED
@@ -11,7 +11,6 @@ export * from './ApiAdminPlayPricesIdPutRequest';
11
11
  export * from './ApiAdminPlayPricesPostRequest';
12
12
  export * from './ApiAppFalta1NotificationsSendNewPost200Response';
13
13
  export * from './ApiAppFalta1NotificationsSendNewPost200ResponseStatsInner';
14
- export * from './ApiAppRecurringGamesIdPlaySearchesGet200Response';
15
14
  export * from './ApiAppVotingHasVotedPlaySearchIdGet200Response';
16
15
  export * from './ApproveClubResponse';
17
16
  export * from './ApproveClubResponseResult';
@@ -136,6 +135,7 @@ export * from './LightControlResponse';
136
135
  export * from './LinkPaymentToBillRequest';
137
136
  export * from './ListAllClubsResponse';
138
137
  export * from './ListAllClubsResponseResult';
138
+ export * from './ListPlaySearchesByRecurringGame200Response';
139
139
  export * from './Location';
140
140
  export * from './LocationDto';
141
141
  export * from './ManageLightSwitch200Response';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jugarhoy/api",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "TypeScript SDK for Jugar Hoy API",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
@@ -1,81 +0,0 @@
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
- import { mapValues } from '../runtime';
16
- import type { PlaySearchDTO } from './PlaySearchDTO';
17
- import {
18
- PlaySearchDTOFromJSON,
19
- PlaySearchDTOFromJSONTyped,
20
- PlaySearchDTOToJSON,
21
- PlaySearchDTOToJSONTyped,
22
- } from './PlaySearchDTO';
23
-
24
- /**
25
- *
26
- * @export
27
- * @interface ApiAppRecurringGamesIdPlaySearchesGet200Response
28
- */
29
- export interface ApiAppRecurringGamesIdPlaySearchesGet200Response {
30
- /**
31
- *
32
- * @type {Array<PlaySearchDTO>}
33
- * @memberof ApiAppRecurringGamesIdPlaySearchesGet200Response
34
- */
35
- data?: Array<PlaySearchDTO>;
36
- /**
37
- *
38
- * @type {number}
39
- * @memberof ApiAppRecurringGamesIdPlaySearchesGet200Response
40
- */
41
- total?: number;
42
- }
43
-
44
- /**
45
- * Check if a given object implements the ApiAppRecurringGamesIdPlaySearchesGet200Response interface.
46
- */
47
- export function instanceOfApiAppRecurringGamesIdPlaySearchesGet200Response(value: object): value is ApiAppRecurringGamesIdPlaySearchesGet200Response {
48
- return true;
49
- }
50
-
51
- export function ApiAppRecurringGamesIdPlaySearchesGet200ResponseFromJSON(json: any): ApiAppRecurringGamesIdPlaySearchesGet200Response {
52
- return ApiAppRecurringGamesIdPlaySearchesGet200ResponseFromJSONTyped(json, false);
53
- }
54
-
55
- export function ApiAppRecurringGamesIdPlaySearchesGet200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiAppRecurringGamesIdPlaySearchesGet200Response {
56
- if (json == null) {
57
- return json;
58
- }
59
- return {
60
-
61
- 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(PlaySearchDTOFromJSON)),
62
- 'total': json['total'] == null ? undefined : json['total'],
63
- };
64
- }
65
-
66
- export function ApiAppRecurringGamesIdPlaySearchesGet200ResponseToJSON(json: any): ApiAppRecurringGamesIdPlaySearchesGet200Response {
67
- return ApiAppRecurringGamesIdPlaySearchesGet200ResponseToJSONTyped(json, false);
68
- }
69
-
70
- export function ApiAppRecurringGamesIdPlaySearchesGet200ResponseToJSONTyped(value?: ApiAppRecurringGamesIdPlaySearchesGet200Response | null, ignoreDiscriminator: boolean = false): any {
71
- if (value == null) {
72
- return value;
73
- }
74
-
75
- return {
76
-
77
- 'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(PlaySearchDTOToJSON)),
78
- 'total': value['total'],
79
- };
80
- }
81
-