@jugarhoy/api 1.1.22 → 1.1.24

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.
@@ -28,17 +28,17 @@ import {
28
28
  RegistrationStatusToJSON,
29
29
  } from '../models/index';
30
30
 
31
- export interface ApiAppPlayRegistrationsIdDeleteRequest {
31
+ export interface CancelPlayRegistrationRequest {
32
32
  id: string;
33
33
  }
34
34
 
35
- export interface ApiAppPlayRegistrationsMyRegistrationsGetRequest {
35
+ export interface GetMyPlayRegistrationsRequest {
36
36
  status?: RegistrationStatus;
37
37
  page?: number;
38
38
  size?: number;
39
39
  }
40
40
 
41
- export interface ApiAppPlayRegistrationsPlaySearchIdPostRequest {
41
+ export interface RegisterForPlaySearchRequest {
42
42
  playSearchId: string;
43
43
  }
44
44
 
@@ -50,11 +50,11 @@ export class AppPlayRegistrationApi extends runtime.BaseAPI {
50
50
  /**
51
51
  * Cancel registration
52
52
  */
53
- async apiAppPlayRegistrationsIdDeleteRaw(requestParameters: ApiAppPlayRegistrationsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
53
+ async cancelPlayRegistrationRaw(requestParameters: CancelPlayRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
54
54
  if (requestParameters['id'] == null) {
55
55
  throw new runtime.RequiredError(
56
56
  'id',
57
- 'Required parameter "id" was null or undefined when calling apiAppPlayRegistrationsIdDelete().'
57
+ 'Required parameter "id" was null or undefined when calling cancelPlayRegistration().'
58
58
  );
59
59
  }
60
60
 
@@ -83,14 +83,14 @@ export class AppPlayRegistrationApi extends runtime.BaseAPI {
83
83
  /**
84
84
  * Cancel registration
85
85
  */
86
- async apiAppPlayRegistrationsIdDelete(requestParameters: ApiAppPlayRegistrationsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
87
- await this.apiAppPlayRegistrationsIdDeleteRaw(requestParameters, initOverrides);
86
+ async cancelPlayRegistration(requestParameters: CancelPlayRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
87
+ await this.cancelPlayRegistrationRaw(requestParameters, initOverrides);
88
88
  }
89
89
 
90
90
  /**
91
91
  * Get user\'s registrations
92
92
  */
93
- async apiAppPlayRegistrationsMyRegistrationsGetRaw(requestParameters: ApiAppPlayRegistrationsMyRegistrationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayRegistrationListResponse>> {
93
+ async getMyPlayRegistrationsRaw(requestParameters: GetMyPlayRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayRegistrationListResponse>> {
94
94
  const queryParameters: any = {};
95
95
 
96
96
  if (requestParameters['status'] != null) {
@@ -128,19 +128,19 @@ export class AppPlayRegistrationApi extends runtime.BaseAPI {
128
128
  /**
129
129
  * Get user\'s registrations
130
130
  */
131
- async apiAppPlayRegistrationsMyRegistrationsGet(requestParameters: ApiAppPlayRegistrationsMyRegistrationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayRegistrationListResponse> {
132
- const response = await this.apiAppPlayRegistrationsMyRegistrationsGetRaw(requestParameters, initOverrides);
131
+ async getMyPlayRegistrations(requestParameters: GetMyPlayRegistrationsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayRegistrationListResponse> {
132
+ const response = await this.getMyPlayRegistrationsRaw(requestParameters, initOverrides);
133
133
  return await response.value();
134
134
  }
135
135
 
136
136
  /**
137
137
  * Register for a play search
138
138
  */
139
- async apiAppPlayRegistrationsPlaySearchIdPostRaw(requestParameters: ApiAppPlayRegistrationsPlaySearchIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayRegistrationDTO>> {
139
+ async registerForPlaySearchRaw(requestParameters: RegisterForPlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayRegistrationDTO>> {
140
140
  if (requestParameters['playSearchId'] == null) {
141
141
  throw new runtime.RequiredError(
142
142
  'playSearchId',
143
- 'Required parameter "playSearchId" was null or undefined when calling apiAppPlayRegistrationsPlaySearchIdPost().'
143
+ 'Required parameter "playSearchId" was null or undefined when calling registerForPlaySearch().'
144
144
  );
145
145
  }
146
146
 
@@ -169,8 +169,8 @@ export class AppPlayRegistrationApi extends runtime.BaseAPI {
169
169
  /**
170
170
  * Register for a play search
171
171
  */
172
- async apiAppPlayRegistrationsPlaySearchIdPost(requestParameters: ApiAppPlayRegistrationsPlaySearchIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayRegistrationDTO> {
173
- const response = await this.apiAppPlayRegistrationsPlaySearchIdPostRaw(requestParameters, initOverrides);
172
+ async registerForPlaySearch(requestParameters: RegisterForPlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayRegistrationDTO> {
173
+ const response = await this.registerForPlaySearchRaw(requestParameters, initOverrides);
174
174
  return await response.value();
175
175
  }
176
176
 
@@ -40,39 +40,39 @@ import {
40
40
  SportToJSON,
41
41
  } from '../models/index';
42
42
 
43
- export interface ApiAppPlaySearchesGetRequest {
44
- sport: Sport;
45
- type?: PlaySearchType;
46
- latitude?: number;
47
- longitude?: number;
48
- radiusMeters?: number;
49
- gender?: string;
50
- category?: string;
51
- status?: string;
52
- page?: number;
53
- size?: number;
54
- }
55
-
56
- export interface ApiAppPlaySearchesIdCancelDeleteRequest {
43
+ export interface CancelPlaySearchRequest {
57
44
  id: string;
58
45
  }
59
46
 
60
- export interface ApiAppPlaySearchesIdConfirmPutRequest {
47
+ export interface ConfirmPlaySearchRequest {
61
48
  id: string;
62
49
  }
63
50
 
64
- export interface ApiAppPlaySearchesIdGetRequest {
65
- id: string;
51
+ export interface CreatePlaySearchOperationRequest {
52
+ createPlaySearchRequest: CreatePlaySearchRequest;
66
53
  }
67
54
 
68
- export interface ApiAppPlaySearchesMySearchesGetRequest {
55
+ export interface GetMyPlaySearchesRequest {
69
56
  status?: PlaySearchStatus;
70
57
  page?: number;
71
58
  size?: number;
72
59
  }
73
60
 
74
- export interface ApiAppPlaySearchesPostRequest {
75
- createPlaySearchRequest: CreatePlaySearchRequest;
61
+ export interface GetPlaySearchByIdRequest {
62
+ id: string;
63
+ }
64
+
65
+ export interface ListPlaySearchesRequest {
66
+ sport: Sport;
67
+ type?: PlaySearchType;
68
+ latitude?: number;
69
+ longitude?: number;
70
+ radiusMeters?: number;
71
+ gender?: string;
72
+ category?: string;
73
+ status?: string;
74
+ page?: number;
75
+ size?: number;
76
76
  }
77
77
 
78
78
  /**
@@ -80,95 +80,14 @@ export interface ApiAppPlaySearchesPostRequest {
80
80
  */
81
81
  export class AppPlaySearchApi extends runtime.BaseAPI {
82
82
 
83
- /**
84
- * List play searches with filters (supports location-based search)
85
- */
86
- async apiAppPlaySearchesGetRaw(requestParameters: ApiAppPlaySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchListResponse>> {
87
- if (requestParameters['sport'] == null) {
88
- throw new runtime.RequiredError(
89
- 'sport',
90
- 'Required parameter "sport" was null or undefined when calling apiAppPlaySearchesGet().'
91
- );
92
- }
93
-
94
- const queryParameters: any = {};
95
-
96
- if (requestParameters['sport'] != null) {
97
- queryParameters['sport'] = requestParameters['sport'];
98
- }
99
-
100
- if (requestParameters['type'] != null) {
101
- queryParameters['type'] = requestParameters['type'];
102
- }
103
-
104
- if (requestParameters['latitude'] != null) {
105
- queryParameters['latitude'] = requestParameters['latitude'];
106
- }
107
-
108
- if (requestParameters['longitude'] != null) {
109
- queryParameters['longitude'] = requestParameters['longitude'];
110
- }
111
-
112
- if (requestParameters['radiusMeters'] != null) {
113
- queryParameters['radiusMeters'] = requestParameters['radiusMeters'];
114
- }
115
-
116
- if (requestParameters['gender'] != null) {
117
- queryParameters['gender'] = requestParameters['gender'];
118
- }
119
-
120
- if (requestParameters['category'] != null) {
121
- queryParameters['category'] = requestParameters['category'];
122
- }
123
-
124
- if (requestParameters['status'] != null) {
125
- queryParameters['status'] = requestParameters['status'];
126
- }
127
-
128
- if (requestParameters['page'] != null) {
129
- queryParameters['page'] = requestParameters['page'];
130
- }
131
-
132
- if (requestParameters['size'] != null) {
133
- queryParameters['size'] = requestParameters['size'];
134
- }
135
-
136
- const headerParameters: runtime.HTTPHeaders = {};
137
-
138
- if (this.configuration && this.configuration.accessToken) {
139
- const token = this.configuration.accessToken;
140
- const tokenString = await token("bearerAuth", []);
141
-
142
- if (tokenString) {
143
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
144
- }
145
- }
146
- const response = await this.request({
147
- path: `/api/app/play-searches`,
148
- method: 'GET',
149
- headers: headerParameters,
150
- query: queryParameters,
151
- }, initOverrides);
152
-
153
- return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchListResponseFromJSON(jsonValue));
154
- }
155
-
156
- /**
157
- * List play searches with filters (supports location-based search)
158
- */
159
- async apiAppPlaySearchesGet(requestParameters: ApiAppPlaySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchListResponse> {
160
- const response = await this.apiAppPlaySearchesGetRaw(requestParameters, initOverrides);
161
- return await response.value();
162
- }
163
-
164
83
  /**
165
84
  * Cancel own play search
166
85
  */
167
- async apiAppPlaySearchesIdCancelDeleteRaw(requestParameters: ApiAppPlaySearchesIdCancelDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
86
+ async cancelPlaySearchRaw(requestParameters: CancelPlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
168
87
  if (requestParameters['id'] == null) {
169
88
  throw new runtime.RequiredError(
170
89
  'id',
171
- 'Required parameter "id" was null or undefined when calling apiAppPlaySearchesIdCancelDelete().'
90
+ 'Required parameter "id" was null or undefined when calling cancelPlaySearch().'
172
91
  );
173
92
  }
174
93
 
@@ -197,18 +116,18 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
197
116
  /**
198
117
  * Cancel own play search
199
118
  */
200
- async apiAppPlaySearchesIdCancelDelete(requestParameters: ApiAppPlaySearchesIdCancelDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
201
- await this.apiAppPlaySearchesIdCancelDeleteRaw(requestParameters, initOverrides);
119
+ async cancelPlaySearch(requestParameters: CancelPlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
120
+ await this.cancelPlaySearchRaw(requestParameters, initOverrides);
202
121
  }
203
122
 
204
123
  /**
205
124
  * Confirm a FILLED play search and notify all registrants
206
125
  */
207
- async apiAppPlaySearchesIdConfirmPutRaw(requestParameters: ApiAppPlaySearchesIdConfirmPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
126
+ async confirmPlaySearchRaw(requestParameters: ConfirmPlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
208
127
  if (requestParameters['id'] == null) {
209
128
  throw new runtime.RequiredError(
210
129
  'id',
211
- 'Required parameter "id" was null or undefined when calling apiAppPlaySearchesIdConfirmPut().'
130
+ 'Required parameter "id" was null or undefined when calling confirmPlaySearch().'
212
131
  );
213
132
  }
214
133
 
@@ -237,18 +156,18 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
237
156
  /**
238
157
  * Confirm a FILLED play search and notify all registrants
239
158
  */
240
- async apiAppPlaySearchesIdConfirmPut(requestParameters: ApiAppPlaySearchesIdConfirmPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
241
- await this.apiAppPlaySearchesIdConfirmPutRaw(requestParameters, initOverrides);
159
+ async confirmPlaySearch(requestParameters: ConfirmPlaySearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
160
+ await this.confirmPlaySearchRaw(requestParameters, initOverrides);
242
161
  }
243
162
 
244
163
  /**
245
- * Get play search details with registrations
164
+ * Create a new play search
246
165
  */
247
- async apiAppPlaySearchesIdGetRaw(requestParameters: ApiAppPlaySearchesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDetailDTO>> {
248
- if (requestParameters['id'] == null) {
166
+ async createPlaySearchRaw(requestParameters: CreatePlaySearchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDTO>> {
167
+ if (requestParameters['createPlaySearchRequest'] == null) {
249
168
  throw new runtime.RequiredError(
250
- 'id',
251
- 'Required parameter "id" was null or undefined when calling apiAppPlaySearchesIdGet().'
169
+ 'createPlaySearchRequest',
170
+ 'Required parameter "createPlaySearchRequest" was null or undefined when calling createPlaySearch().'
252
171
  );
253
172
  }
254
173
 
@@ -256,6 +175,8 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
256
175
 
257
176
  const headerParameters: runtime.HTTPHeaders = {};
258
177
 
178
+ headerParameters['Content-Type'] = 'application/json';
179
+
259
180
  if (this.configuration && this.configuration.accessToken) {
260
181
  const token = this.configuration.accessToken;
261
182
  const tokenString = await token("bearerAuth", []);
@@ -265,27 +186,28 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
265
186
  }
266
187
  }
267
188
  const response = await this.request({
268
- path: `/api/app/play-searches/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
269
- method: 'GET',
189
+ path: `/api/app/play-searches`,
190
+ method: 'POST',
270
191
  headers: headerParameters,
271
192
  query: queryParameters,
193
+ body: CreatePlaySearchRequestToJSON(requestParameters['createPlaySearchRequest']),
272
194
  }, initOverrides);
273
195
 
274
- return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDetailDTOFromJSON(jsonValue));
196
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDTOFromJSON(jsonValue));
275
197
  }
276
198
 
277
199
  /**
278
- * Get play search details with registrations
200
+ * Create a new play search
279
201
  */
280
- async apiAppPlaySearchesIdGet(requestParameters: ApiAppPlaySearchesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDetailDTO> {
281
- const response = await this.apiAppPlaySearchesIdGetRaw(requestParameters, initOverrides);
202
+ async createPlaySearch(requestParameters: CreatePlaySearchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDTO> {
203
+ const response = await this.createPlaySearchRaw(requestParameters, initOverrides);
282
204
  return await response.value();
283
205
  }
284
206
 
285
207
  /**
286
208
  * Get user\'s own play searches
287
209
  */
288
- async apiAppPlaySearchesMySearchesGetRaw(requestParameters: ApiAppPlaySearchesMySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchListResponse>> {
210
+ async getMyPlaySearchesRaw(requestParameters: GetMyPlaySearchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchListResponse>> {
289
211
  const queryParameters: any = {};
290
212
 
291
213
  if (requestParameters['status'] != null) {
@@ -323,19 +245,19 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
323
245
  /**
324
246
  * Get user\'s own play searches
325
247
  */
326
- async apiAppPlaySearchesMySearchesGet(requestParameters: ApiAppPlaySearchesMySearchesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchListResponse> {
327
- const response = await this.apiAppPlaySearchesMySearchesGetRaw(requestParameters, initOverrides);
248
+ async getMyPlaySearches(requestParameters: GetMyPlaySearchesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchListResponse> {
249
+ const response = await this.getMyPlaySearchesRaw(requestParameters, initOverrides);
328
250
  return await response.value();
329
251
  }
330
252
 
331
253
  /**
332
- * Create a new play search
254
+ * Get play search details with registrations
333
255
  */
334
- async apiAppPlaySearchesPostRaw(requestParameters: ApiAppPlaySearchesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDTO>> {
335
- if (requestParameters['createPlaySearchRequest'] == null) {
256
+ async getPlaySearchByIdRaw(requestParameters: GetPlaySearchByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDetailDTO>> {
257
+ if (requestParameters['id'] == null) {
336
258
  throw new runtime.RequiredError(
337
- 'createPlaySearchRequest',
338
- 'Required parameter "createPlaySearchRequest" was null or undefined when calling apiAppPlaySearchesPost().'
259
+ 'id',
260
+ 'Required parameter "id" was null or undefined when calling getPlaySearchById().'
339
261
  );
340
262
  }
341
263
 
@@ -343,7 +265,86 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
343
265
 
344
266
  const headerParameters: runtime.HTTPHeaders = {};
345
267
 
346
- headerParameters['Content-Type'] = 'application/json';
268
+ if (this.configuration && this.configuration.accessToken) {
269
+ const token = this.configuration.accessToken;
270
+ const tokenString = await token("bearerAuth", []);
271
+
272
+ if (tokenString) {
273
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
274
+ }
275
+ }
276
+ const response = await this.request({
277
+ path: `/api/app/play-searches/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
278
+ method: 'GET',
279
+ headers: headerParameters,
280
+ query: queryParameters,
281
+ }, initOverrides);
282
+
283
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDetailDTOFromJSON(jsonValue));
284
+ }
285
+
286
+ /**
287
+ * Get play search details with registrations
288
+ */
289
+ async getPlaySearchById(requestParameters: GetPlaySearchByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDetailDTO> {
290
+ const response = await this.getPlaySearchByIdRaw(requestParameters, initOverrides);
291
+ return await response.value();
292
+ }
293
+
294
+ /**
295
+ * List play searches with filters
296
+ */
297
+ async listPlaySearchesRaw(requestParameters: ListPlaySearchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchListResponse>> {
298
+ if (requestParameters['sport'] == null) {
299
+ throw new runtime.RequiredError(
300
+ 'sport',
301
+ 'Required parameter "sport" was null or undefined when calling listPlaySearches().'
302
+ );
303
+ }
304
+
305
+ const queryParameters: any = {};
306
+
307
+ if (requestParameters['sport'] != null) {
308
+ queryParameters['sport'] = requestParameters['sport'];
309
+ }
310
+
311
+ if (requestParameters['type'] != null) {
312
+ queryParameters['type'] = requestParameters['type'];
313
+ }
314
+
315
+ if (requestParameters['latitude'] != null) {
316
+ queryParameters['latitude'] = requestParameters['latitude'];
317
+ }
318
+
319
+ if (requestParameters['longitude'] != null) {
320
+ queryParameters['longitude'] = requestParameters['longitude'];
321
+ }
322
+
323
+ if (requestParameters['radiusMeters'] != null) {
324
+ queryParameters['radiusMeters'] = requestParameters['radiusMeters'];
325
+ }
326
+
327
+ if (requestParameters['gender'] != null) {
328
+ queryParameters['gender'] = requestParameters['gender'];
329
+ }
330
+
331
+ if (requestParameters['category'] != null) {
332
+ queryParameters['category'] = requestParameters['category'];
333
+ }
334
+
335
+ if (requestParameters['status'] != null) {
336
+ queryParameters['status'] = requestParameters['status'];
337
+ }
338
+
339
+ if (requestParameters['page'] != null) {
340
+ queryParameters['page'] = requestParameters['page'];
341
+ }
342
+
343
+ if (requestParameters['size'] != null) {
344
+ queryParameters['size'] = requestParameters['size'];
345
+ }
346
+
347
+ const headerParameters: runtime.HTTPHeaders = {};
347
348
 
348
349
  if (this.configuration && this.configuration.accessToken) {
349
350
  const token = this.configuration.accessToken;
@@ -355,20 +356,19 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
355
356
  }
356
357
  const response = await this.request({
357
358
  path: `/api/app/play-searches`,
358
- method: 'POST',
359
+ method: 'GET',
359
360
  headers: headerParameters,
360
361
  query: queryParameters,
361
- body: CreatePlaySearchRequestToJSON(requestParameters['createPlaySearchRequest']),
362
362
  }, initOverrides);
363
363
 
364
- return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDTOFromJSON(jsonValue));
364
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchListResponseFromJSON(jsonValue));
365
365
  }
366
366
 
367
367
  /**
368
- * Create a new play search
368
+ * List play searches with filters
369
369
  */
370
- async apiAppPlaySearchesPost(requestParameters: ApiAppPlaySearchesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDTO> {
371
- const response = await this.apiAppPlaySearchesPostRaw(requestParameters, initOverrides);
370
+ async listPlaySearches(requestParameters: ListPlaySearchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchListResponse> {
371
+ const response = await this.listPlaySearchesRaw(requestParameters, initOverrides);
372
372
  return await response.value();
373
373
  }
374
374
 
@@ -28,20 +28,20 @@ import {
28
28
  GroupedPositionsResponseToJSON,
29
29
  } from '../models/index';
30
30
 
31
- export interface ApiAppPositionsAssignPostRequest {
31
+ export interface AssignPositionsOperationRequest {
32
32
  assignPositionsRequest: AssignPositionsRequest;
33
33
  }
34
34
 
35
- export interface ApiAppPositionsAutoAssignPostRequest {
35
+ export interface AutoAssignPositionsOperationRequest {
36
36
  autoAssignPositionsRequest: AutoAssignPositionsRequest;
37
37
  }
38
38
 
39
- export interface ApiAppPositionsPlaySearchIdTeamTeamIdDeleteRequest {
39
+ export interface ClearMatchPositionsRequest {
40
40
  playSearchId: string;
41
41
  teamId: string;
42
42
  }
43
43
 
44
- export interface ApiAppPositionsPlaySearchIdTeamTeamIdGetRequest {
44
+ export interface GetMatchPositionsRequest {
45
45
  playSearchId: string;
46
46
  teamId: string;
47
47
  }
@@ -54,11 +54,11 @@ export class PositionsApi extends runtime.BaseAPI {
54
54
  /**
55
55
  * Assign positions for a match
56
56
  */
57
- async apiAppPositionsAssignPostRaw(requestParameters: ApiAppPositionsAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
57
+ async assignPositionsRaw(requestParameters: AssignPositionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
58
58
  if (requestParameters['assignPositionsRequest'] == null) {
59
59
  throw new runtime.RequiredError(
60
60
  'assignPositionsRequest',
61
- 'Required parameter "assignPositionsRequest" was null or undefined when calling apiAppPositionsAssignPost().'
61
+ 'Required parameter "assignPositionsRequest" was null or undefined when calling assignPositions().'
62
62
  );
63
63
  }
64
64
 
@@ -90,18 +90,18 @@ export class PositionsApi extends runtime.BaseAPI {
90
90
  /**
91
91
  * Assign positions for a match
92
92
  */
93
- async apiAppPositionsAssignPost(requestParameters: ApiAppPositionsAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
94
- await this.apiAppPositionsAssignPostRaw(requestParameters, initOverrides);
93
+ async assignPositions(requestParameters: AssignPositionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
94
+ await this.assignPositionsRaw(requestParameters, initOverrides);
95
95
  }
96
96
 
97
97
  /**
98
98
  * Auto-assign positions based on sport defaults
99
99
  */
100
- async apiAppPositionsAutoAssignPostRaw(requestParameters: ApiAppPositionsAutoAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
100
+ async autoAssignPositionsRaw(requestParameters: AutoAssignPositionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
101
101
  if (requestParameters['autoAssignPositionsRequest'] == null) {
102
102
  throw new runtime.RequiredError(
103
103
  'autoAssignPositionsRequest',
104
- 'Required parameter "autoAssignPositionsRequest" was null or undefined when calling apiAppPositionsAutoAssignPost().'
104
+ 'Required parameter "autoAssignPositionsRequest" was null or undefined when calling autoAssignPositions().'
105
105
  );
106
106
  }
107
107
 
@@ -133,25 +133,25 @@ export class PositionsApi extends runtime.BaseAPI {
133
133
  /**
134
134
  * Auto-assign positions based on sport defaults
135
135
  */
136
- async apiAppPositionsAutoAssignPost(requestParameters: ApiAppPositionsAutoAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
137
- await this.apiAppPositionsAutoAssignPostRaw(requestParameters, initOverrides);
136
+ async autoAssignPositions(requestParameters: AutoAssignPositionsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
137
+ await this.autoAssignPositionsRaw(requestParameters, initOverrides);
138
138
  }
139
139
 
140
140
  /**
141
141
  * Clear all positions for a match
142
142
  */
143
- async apiAppPositionsPlaySearchIdTeamTeamIdDeleteRaw(requestParameters: ApiAppPositionsPlaySearchIdTeamTeamIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
143
+ async clearMatchPositionsRaw(requestParameters: ClearMatchPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
144
144
  if (requestParameters['playSearchId'] == null) {
145
145
  throw new runtime.RequiredError(
146
146
  'playSearchId',
147
- 'Required parameter "playSearchId" was null or undefined when calling apiAppPositionsPlaySearchIdTeamTeamIdDelete().'
147
+ 'Required parameter "playSearchId" was null or undefined when calling clearMatchPositions().'
148
148
  );
149
149
  }
150
150
 
151
151
  if (requestParameters['teamId'] == null) {
152
152
  throw new runtime.RequiredError(
153
153
  'teamId',
154
- 'Required parameter "teamId" was null or undefined when calling apiAppPositionsPlaySearchIdTeamTeamIdDelete().'
154
+ 'Required parameter "teamId" was null or undefined when calling clearMatchPositions().'
155
155
  );
156
156
  }
157
157
 
@@ -180,25 +180,25 @@ export class PositionsApi extends runtime.BaseAPI {
180
180
  /**
181
181
  * Clear all positions for a match
182
182
  */
183
- async apiAppPositionsPlaySearchIdTeamTeamIdDelete(requestParameters: ApiAppPositionsPlaySearchIdTeamTeamIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
184
- await this.apiAppPositionsPlaySearchIdTeamTeamIdDeleteRaw(requestParameters, initOverrides);
183
+ async clearMatchPositions(requestParameters: ClearMatchPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
184
+ await this.clearMatchPositionsRaw(requestParameters, initOverrides);
185
185
  }
186
186
 
187
187
  /**
188
- * Get positions for a match (grouped by team and status)
188
+ * Get positions for a match
189
189
  */
190
- async apiAppPositionsPlaySearchIdTeamTeamIdGetRaw(requestParameters: ApiAppPositionsPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GroupedPositionsResponse>> {
190
+ async getMatchPositionsRaw(requestParameters: GetMatchPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GroupedPositionsResponse>> {
191
191
  if (requestParameters['playSearchId'] == null) {
192
192
  throw new runtime.RequiredError(
193
193
  'playSearchId',
194
- 'Required parameter "playSearchId" was null or undefined when calling apiAppPositionsPlaySearchIdTeamTeamIdGet().'
194
+ 'Required parameter "playSearchId" was null or undefined when calling getMatchPositions().'
195
195
  );
196
196
  }
197
197
 
198
198
  if (requestParameters['teamId'] == null) {
199
199
  throw new runtime.RequiredError(
200
200
  'teamId',
201
- 'Required parameter "teamId" was null or undefined when calling apiAppPositionsPlaySearchIdTeamTeamIdGet().'
201
+ 'Required parameter "teamId" was null or undefined when calling getMatchPositions().'
202
202
  );
203
203
  }
204
204
 
@@ -225,10 +225,10 @@ export class PositionsApi extends runtime.BaseAPI {
225
225
  }
226
226
 
227
227
  /**
228
- * Get positions for a match (grouped by team and status)
228
+ * Get positions for a match
229
229
  */
230
- async apiAppPositionsPlaySearchIdTeamTeamIdGet(requestParameters: ApiAppPositionsPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupedPositionsResponse> {
231
- const response = await this.apiAppPositionsPlaySearchIdTeamTeamIdGetRaw(requestParameters, initOverrides);
230
+ async getMatchPositions(requestParameters: GetMatchPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GroupedPositionsResponse> {
231
+ const response = await this.getMatchPositionsRaw(requestParameters, initOverrides);
232
232
  return await response.value();
233
233
  }
234
234
 
package/apis/VotingApi.ts CHANGED
@@ -15,15 +15,15 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
- ApiAppVotingHasVotedPlaySearchIdGet200Response,
18
+ HasUserVoted200Response,
19
19
  PlayerRatingResponse,
20
20
  SubmitRatingsRequest,
21
21
  VotingStatsResponse,
22
22
  VotingStatusResponse,
23
23
  } from '../models/index';
24
24
  import {
25
- ApiAppVotingHasVotedPlaySearchIdGet200ResponseFromJSON,
26
- ApiAppVotingHasVotedPlaySearchIdGet200ResponseToJSON,
25
+ HasUserVoted200ResponseFromJSON,
26
+ HasUserVoted200ResponseToJSON,
27
27
  PlayerRatingResponseFromJSON,
28
28
  PlayerRatingResponseToJSON,
29
29
  SubmitRatingsRequestFromJSON,
@@ -34,38 +34,38 @@ import {
34
34
  VotingStatusResponseToJSON,
35
35
  } from '../models/index';
36
36
 
37
- export interface ApiAppVotingHasVotedPlaySearchIdGetRequest {
37
+ export interface GetPlayerRatingRequest {
38
38
  playSearchId: string;
39
+ playerId: string;
40
+ teamId: string;
39
41
  }
40
42
 
41
- export interface ApiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGetRequest {
43
+ export interface GetTopRatedPlayersRequest {
42
44
  playSearchId: string;
43
- playerId: string;
44
45
  teamId: string;
46
+ limit?: number;
45
47
  }
46
48
 
47
- export interface ApiAppVotingResultsPlaySearchIdTeamTeamIdGetRequest {
49
+ export interface GetVotingResultsRequest {
48
50
  playSearchId: string;
49
51
  teamId: string;
50
52
  }
51
53
 
52
- export interface ApiAppVotingStatsPlaySearchIdTeamTeamIdGetRequest {
54
+ export interface GetVotingStatsRequest {
53
55
  playSearchId: string;
54
56
  teamId: string;
55
57
  }
56
58
 
57
- export interface ApiAppVotingStatusPlaySearchIdGetRequest {
59
+ export interface GetVotingStatusRequest {
58
60
  playSearchId: string;
59
61
  }
60
62
 
61
- export interface ApiAppVotingSubmitPostRequest {
62
- submitRatingsRequest: SubmitRatingsRequest;
63
+ export interface HasUserVotedRequest {
64
+ playSearchId: string;
63
65
  }
64
66
 
65
- export interface ApiAppVotingTopPlaySearchIdTeamTeamIdGetRequest {
66
- playSearchId: string;
67
- teamId: string;
68
- limit?: number;
67
+ export interface SubmitVotesRequest {
68
+ submitRatingsRequest: SubmitRatingsRequest;
69
69
  }
70
70
 
71
71
  /**
@@ -74,13 +74,27 @@ export interface ApiAppVotingTopPlaySearchIdTeamTeamIdGetRequest {
74
74
  export class VotingApi extends runtime.BaseAPI {
75
75
 
76
76
  /**
77
- * Check if user has submitted ratings for a match
77
+ * Get rating for a specific player in a match
78
78
  */
79
- async apiAppVotingHasVotedPlaySearchIdGetRaw(requestParameters: ApiAppVotingHasVotedPlaySearchIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiAppVotingHasVotedPlaySearchIdGet200Response>> {
79
+ async getPlayerRatingRaw(requestParameters: GetPlayerRatingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayerRatingResponse>> {
80
80
  if (requestParameters['playSearchId'] == null) {
81
81
  throw new runtime.RequiredError(
82
82
  'playSearchId',
83
- 'Required parameter "playSearchId" was null or undefined when calling apiAppVotingHasVotedPlaySearchIdGet().'
83
+ 'Required parameter "playSearchId" was null or undefined when calling getPlayerRating().'
84
+ );
85
+ }
86
+
87
+ if (requestParameters['playerId'] == null) {
88
+ throw new runtime.RequiredError(
89
+ 'playerId',
90
+ 'Required parameter "playerId" was null or undefined when calling getPlayerRating().'
91
+ );
92
+ }
93
+
94
+ if (requestParameters['teamId'] == null) {
95
+ throw new runtime.RequiredError(
96
+ 'teamId',
97
+ 'Required parameter "teamId" was null or undefined when calling getPlayerRating().'
84
98
  );
85
99
  }
86
100
 
@@ -97,50 +111,47 @@ export class VotingApi extends runtime.BaseAPI {
97
111
  }
98
112
  }
99
113
  const response = await this.request({
100
- path: `/api/app/voting/has-voted/{playSearchId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))),
114
+ path: `/api/app/voting/player/{playSearchId}/{playerId}/team/{teamId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))).replace(`{${"playerId"}}`, encodeURIComponent(String(requestParameters['playerId']))).replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
101
115
  method: 'GET',
102
116
  headers: headerParameters,
103
117
  query: queryParameters,
104
118
  }, initOverrides);
105
119
 
106
- return new runtime.JSONApiResponse(response, (jsonValue) => ApiAppVotingHasVotedPlaySearchIdGet200ResponseFromJSON(jsonValue));
120
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlayerRatingResponseFromJSON(jsonValue));
107
121
  }
108
122
 
109
123
  /**
110
- * Check if user has submitted ratings for a match
124
+ * Get rating for a specific player in a match
111
125
  */
112
- async apiAppVotingHasVotedPlaySearchIdGet(requestParameters: ApiAppVotingHasVotedPlaySearchIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiAppVotingHasVotedPlaySearchIdGet200Response> {
113
- const response = await this.apiAppVotingHasVotedPlaySearchIdGetRaw(requestParameters, initOverrides);
126
+ async getPlayerRating(requestParameters: GetPlayerRatingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayerRatingResponse> {
127
+ const response = await this.getPlayerRatingRaw(requestParameters, initOverrides);
114
128
  return await response.value();
115
129
  }
116
130
 
117
131
  /**
118
- * Get rating for a specific player in a match
132
+ * Get top rated players for a match
119
133
  */
120
- async apiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGetRaw(requestParameters: ApiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayerRatingResponse>> {
134
+ async getTopRatedPlayersRaw(requestParameters: GetTopRatedPlayersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PlayerRatingResponse>>> {
121
135
  if (requestParameters['playSearchId'] == null) {
122
136
  throw new runtime.RequiredError(
123
137
  'playSearchId',
124
- 'Required parameter "playSearchId" was null or undefined when calling apiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGet().'
125
- );
126
- }
127
-
128
- if (requestParameters['playerId'] == null) {
129
- throw new runtime.RequiredError(
130
- 'playerId',
131
- 'Required parameter "playerId" was null or undefined when calling apiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGet().'
138
+ 'Required parameter "playSearchId" was null or undefined when calling getTopRatedPlayers().'
132
139
  );
133
140
  }
134
141
 
135
142
  if (requestParameters['teamId'] == null) {
136
143
  throw new runtime.RequiredError(
137
144
  'teamId',
138
- 'Required parameter "teamId" was null or undefined when calling apiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGet().'
145
+ 'Required parameter "teamId" was null or undefined when calling getTopRatedPlayers().'
139
146
  );
140
147
  }
141
148
 
142
149
  const queryParameters: any = {};
143
150
 
151
+ if (requestParameters['limit'] != null) {
152
+ queryParameters['limit'] = requestParameters['limit'];
153
+ }
154
+
144
155
  const headerParameters: runtime.HTTPHeaders = {};
145
156
 
146
157
  if (this.configuration && this.configuration.accessToken) {
@@ -152,38 +163,38 @@ export class VotingApi extends runtime.BaseAPI {
152
163
  }
153
164
  }
154
165
  const response = await this.request({
155
- path: `/api/app/voting/player/{playSearchId}/{playerId}/team/{teamId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))).replace(`{${"playerId"}}`, encodeURIComponent(String(requestParameters['playerId']))).replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
166
+ path: `/api/app/voting/top/{playSearchId}/team/{teamId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))).replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
156
167
  method: 'GET',
157
168
  headers: headerParameters,
158
169
  query: queryParameters,
159
170
  }, initOverrides);
160
171
 
161
- return new runtime.JSONApiResponse(response, (jsonValue) => PlayerRatingResponseFromJSON(jsonValue));
172
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PlayerRatingResponseFromJSON));
162
173
  }
163
174
 
164
175
  /**
165
- * Get rating for a specific player in a match
176
+ * Get top rated players for a match
166
177
  */
167
- async apiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGet(requestParameters: ApiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayerRatingResponse> {
168
- const response = await this.apiAppVotingPlayerPlaySearchIdPlayerIdTeamTeamIdGetRaw(requestParameters, initOverrides);
178
+ async getTopRatedPlayers(requestParameters: GetTopRatedPlayersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PlayerRatingResponse>> {
179
+ const response = await this.getTopRatedPlayersRaw(requestParameters, initOverrides);
169
180
  return await response.value();
170
181
  }
171
182
 
172
183
  /**
173
184
  * Get rating results for a match
174
185
  */
175
- async apiAppVotingResultsPlaySearchIdTeamTeamIdGetRaw(requestParameters: ApiAppVotingResultsPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PlayerRatingResponse>>> {
186
+ async getVotingResultsRaw(requestParameters: GetVotingResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PlayerRatingResponse>>> {
176
187
  if (requestParameters['playSearchId'] == null) {
177
188
  throw new runtime.RequiredError(
178
189
  'playSearchId',
179
- 'Required parameter "playSearchId" was null or undefined when calling apiAppVotingResultsPlaySearchIdTeamTeamIdGet().'
190
+ 'Required parameter "playSearchId" was null or undefined when calling getVotingResults().'
180
191
  );
181
192
  }
182
193
 
183
194
  if (requestParameters['teamId'] == null) {
184
195
  throw new runtime.RequiredError(
185
196
  'teamId',
186
- 'Required parameter "teamId" was null or undefined when calling apiAppVotingResultsPlaySearchIdTeamTeamIdGet().'
197
+ 'Required parameter "teamId" was null or undefined when calling getVotingResults().'
187
198
  );
188
199
  }
189
200
 
@@ -212,26 +223,26 @@ export class VotingApi extends runtime.BaseAPI {
212
223
  /**
213
224
  * Get rating results for a match
214
225
  */
215
- async apiAppVotingResultsPlaySearchIdTeamTeamIdGet(requestParameters: ApiAppVotingResultsPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PlayerRatingResponse>> {
216
- const response = await this.apiAppVotingResultsPlaySearchIdTeamTeamIdGetRaw(requestParameters, initOverrides);
226
+ async getVotingResults(requestParameters: GetVotingResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PlayerRatingResponse>> {
227
+ const response = await this.getVotingResultsRaw(requestParameters, initOverrides);
217
228
  return await response.value();
218
229
  }
219
230
 
220
231
  /**
221
232
  * Get voting statistics for a match
222
233
  */
223
- async apiAppVotingStatsPlaySearchIdTeamTeamIdGetRaw(requestParameters: ApiAppVotingStatsPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VotingStatsResponse>> {
234
+ async getVotingStatsRaw(requestParameters: GetVotingStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VotingStatsResponse>> {
224
235
  if (requestParameters['playSearchId'] == null) {
225
236
  throw new runtime.RequiredError(
226
237
  'playSearchId',
227
- 'Required parameter "playSearchId" was null or undefined when calling apiAppVotingStatsPlaySearchIdTeamTeamIdGet().'
238
+ 'Required parameter "playSearchId" was null or undefined when calling getVotingStats().'
228
239
  );
229
240
  }
230
241
 
231
242
  if (requestParameters['teamId'] == null) {
232
243
  throw new runtime.RequiredError(
233
244
  'teamId',
234
- 'Required parameter "teamId" was null or undefined when calling apiAppVotingStatsPlaySearchIdTeamTeamIdGet().'
245
+ 'Required parameter "teamId" was null or undefined when calling getVotingStats().'
235
246
  );
236
247
  }
237
248
 
@@ -260,19 +271,19 @@ export class VotingApi extends runtime.BaseAPI {
260
271
  /**
261
272
  * Get voting statistics for a match
262
273
  */
263
- async apiAppVotingStatsPlaySearchIdTeamTeamIdGet(requestParameters: ApiAppVotingStatsPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VotingStatsResponse> {
264
- const response = await this.apiAppVotingStatsPlaySearchIdTeamTeamIdGetRaw(requestParameters, initOverrides);
274
+ async getVotingStats(requestParameters: GetVotingStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VotingStatsResponse> {
275
+ const response = await this.getVotingStatsRaw(requestParameters, initOverrides);
265
276
  return await response.value();
266
277
  }
267
278
 
268
279
  /**
269
280
  * Check if voting is currently open for a match
270
281
  */
271
- async apiAppVotingStatusPlaySearchIdGetRaw(requestParameters: ApiAppVotingStatusPlaySearchIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VotingStatusResponse>> {
282
+ async getVotingStatusRaw(requestParameters: GetVotingStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VotingStatusResponse>> {
272
283
  if (requestParameters['playSearchId'] == null) {
273
284
  throw new runtime.RequiredError(
274
285
  'playSearchId',
275
- 'Required parameter "playSearchId" was null or undefined when calling apiAppVotingStatusPlaySearchIdGet().'
286
+ 'Required parameter "playSearchId" was null or undefined when calling getVotingStatus().'
276
287
  );
277
288
  }
278
289
 
@@ -301,19 +312,19 @@ export class VotingApi extends runtime.BaseAPI {
301
312
  /**
302
313
  * Check if voting is currently open for a match
303
314
  */
304
- async apiAppVotingStatusPlaySearchIdGet(requestParameters: ApiAppVotingStatusPlaySearchIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VotingStatusResponse> {
305
- const response = await this.apiAppVotingStatusPlaySearchIdGetRaw(requestParameters, initOverrides);
315
+ async getVotingStatus(requestParameters: GetVotingStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VotingStatusResponse> {
316
+ const response = await this.getVotingStatusRaw(requestParameters, initOverrides);
306
317
  return await response.value();
307
318
  }
308
319
 
309
320
  /**
310
- * Submit ratings for players in a match
321
+ * Check if user has submitted ratings for a match
311
322
  */
312
- async apiAppVotingSubmitPostRaw(requestParameters: ApiAppVotingSubmitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
313
- if (requestParameters['submitRatingsRequest'] == null) {
323
+ async hasUserVotedRaw(requestParameters: HasUserVotedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HasUserVoted200Response>> {
324
+ if (requestParameters['playSearchId'] == null) {
314
325
  throw new runtime.RequiredError(
315
- 'submitRatingsRequest',
316
- 'Required parameter "submitRatingsRequest" was null or undefined when calling apiAppVotingSubmitPost().'
326
+ 'playSearchId',
327
+ 'Required parameter "playSearchId" was null or undefined when calling hasUserVoted().'
317
328
  );
318
329
  }
319
330
 
@@ -321,8 +332,6 @@ export class VotingApi extends runtime.BaseAPI {
321
332
 
322
333
  const headerParameters: runtime.HTTPHeaders = {};
323
334
 
324
- headerParameters['Content-Type'] = 'application/json';
325
-
326
335
  if (this.configuration && this.configuration.accessToken) {
327
336
  const token = this.configuration.accessToken;
328
337
  const tokenString = await token("bearerAuth", []);
@@ -332,49 +341,40 @@ export class VotingApi extends runtime.BaseAPI {
332
341
  }
333
342
  }
334
343
  const response = await this.request({
335
- path: `/api/app/voting/submit`,
336
- method: 'POST',
344
+ path: `/api/app/voting/has-voted/{playSearchId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))),
345
+ method: 'GET',
337
346
  headers: headerParameters,
338
347
  query: queryParameters,
339
- body: SubmitRatingsRequestToJSON(requestParameters['submitRatingsRequest']),
340
348
  }, initOverrides);
341
349
 
342
- return new runtime.VoidApiResponse(response);
350
+ return new runtime.JSONApiResponse(response, (jsonValue) => HasUserVoted200ResponseFromJSON(jsonValue));
343
351
  }
344
352
 
345
353
  /**
346
- * Submit ratings for players in a match
354
+ * Check if user has submitted ratings for a match
347
355
  */
348
- async apiAppVotingSubmitPost(requestParameters: ApiAppVotingSubmitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
349
- await this.apiAppVotingSubmitPostRaw(requestParameters, initOverrides);
356
+ async hasUserVoted(requestParameters: HasUserVotedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HasUserVoted200Response> {
357
+ const response = await this.hasUserVotedRaw(requestParameters, initOverrides);
358
+ return await response.value();
350
359
  }
351
360
 
352
361
  /**
353
- * Get top rated players for a match
362
+ * Submit ratings for players in a match
354
363
  */
355
- async apiAppVotingTopPlaySearchIdTeamTeamIdGetRaw(requestParameters: ApiAppVotingTopPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PlayerRatingResponse>>> {
356
- if (requestParameters['playSearchId'] == null) {
357
- throw new runtime.RequiredError(
358
- 'playSearchId',
359
- 'Required parameter "playSearchId" was null or undefined when calling apiAppVotingTopPlaySearchIdTeamTeamIdGet().'
360
- );
361
- }
362
-
363
- if (requestParameters['teamId'] == null) {
364
+ async submitVotesRaw(requestParameters: SubmitVotesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
365
+ if (requestParameters['submitRatingsRequest'] == null) {
364
366
  throw new runtime.RequiredError(
365
- 'teamId',
366
- 'Required parameter "teamId" was null or undefined when calling apiAppVotingTopPlaySearchIdTeamTeamIdGet().'
367
+ 'submitRatingsRequest',
368
+ 'Required parameter "submitRatingsRequest" was null or undefined when calling submitVotes().'
367
369
  );
368
370
  }
369
371
 
370
372
  const queryParameters: any = {};
371
373
 
372
- if (requestParameters['limit'] != null) {
373
- queryParameters['limit'] = requestParameters['limit'];
374
- }
375
-
376
374
  const headerParameters: runtime.HTTPHeaders = {};
377
375
 
376
+ headerParameters['Content-Type'] = 'application/json';
377
+
378
378
  if (this.configuration && this.configuration.accessToken) {
379
379
  const token = this.configuration.accessToken;
380
380
  const tokenString = await token("bearerAuth", []);
@@ -384,21 +384,21 @@ export class VotingApi extends runtime.BaseAPI {
384
384
  }
385
385
  }
386
386
  const response = await this.request({
387
- path: `/api/app/voting/top/{playSearchId}/team/{teamId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))).replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
388
- method: 'GET',
387
+ path: `/api/app/voting/submit`,
388
+ method: 'POST',
389
389
  headers: headerParameters,
390
390
  query: queryParameters,
391
+ body: SubmitRatingsRequestToJSON(requestParameters['submitRatingsRequest']),
391
392
  }, initOverrides);
392
393
 
393
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PlayerRatingResponseFromJSON));
394
+ return new runtime.VoidApiResponse(response);
394
395
  }
395
396
 
396
397
  /**
397
- * Get top rated players for a match
398
+ * Submit ratings for players in a match
398
399
  */
399
- async apiAppVotingTopPlaySearchIdTeamTeamIdGet(requestParameters: ApiAppVotingTopPlaySearchIdTeamTeamIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PlayerRatingResponse>> {
400
- const response = await this.apiAppVotingTopPlaySearchIdTeamTeamIdGetRaw(requestParameters, initOverrides);
401
- return await response.value();
400
+ async submitVotes(requestParameters: SubmitVotesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
401
+ await this.submitVotesRaw(requestParameters, initOverrides);
402
402
  }
403
403
 
404
404
  }
@@ -0,0 +1,65 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface HasUserVoted200Response
20
+ */
21
+ export interface HasUserVoted200Response {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof HasUserVoted200Response
26
+ */
27
+ hasVoted?: boolean;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the HasUserVoted200Response interface.
32
+ */
33
+ export function instanceOfHasUserVoted200Response(value: object): value is HasUserVoted200Response {
34
+ return true;
35
+ }
36
+
37
+ export function HasUserVoted200ResponseFromJSON(json: any): HasUserVoted200Response {
38
+ return HasUserVoted200ResponseFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function HasUserVoted200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): HasUserVoted200Response {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'hasVoted': json['hasVoted'] == null ? undefined : json['hasVoted'],
48
+ };
49
+ }
50
+
51
+ export function HasUserVoted200ResponseToJSON(json: any): HasUserVoted200Response {
52
+ return HasUserVoted200ResponseToJSONTyped(json, false);
53
+ }
54
+
55
+ export function HasUserVoted200ResponseToJSONTyped(value?: HasUserVoted200Response | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'hasVoted': value['hasVoted'],
63
+ };
64
+ }
65
+
@@ -55,6 +55,12 @@ export interface UpdateTeamRequest {
55
55
  * @memberof UpdateTeamRequest
56
56
  */
57
57
  isActive?: boolean;
58
+ /**
59
+ * Base64 encoded avatar image (data URL format)
60
+ * @type {string}
61
+ * @memberof UpdateTeamRequest
62
+ */
63
+ avatarBase64?: string;
58
64
  }
59
65
 
60
66
  /**
@@ -80,6 +86,7 @@ export function UpdateTeamRequestFromJSONTyped(json: any, ignoreDiscriminator: b
80
86
  'bgColor': json['bgColor'] == null ? undefined : json['bgColor'],
81
87
  'fgColor': json['fgColor'] == null ? undefined : json['fgColor'],
82
88
  'isActive': json['isActive'] == null ? undefined : json['isActive'],
89
+ 'avatarBase64': json['avatarBase64'] == null ? undefined : json['avatarBase64'],
83
90
  };
84
91
  }
85
92
 
@@ -100,6 +107,7 @@ export function UpdateTeamRequestToJSONTyped(value?: UpdateTeamRequest | null, i
100
107
  'bgColor': value['bgColor'],
101
108
  'fgColor': value['fgColor'],
102
109
  'isActive': value['isActive'],
110
+ 'avatarBase64': value['avatarBase64'],
103
111
  };
104
112
  }
105
113
 
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 './ApiAppVotingHasVotedPlaySearchIdGet200Response';
15
14
  export * from './ApproveClubResponse';
16
15
  export * from './ApproveClubResponseResult';
17
16
  export * from './AssignPositionsRequest';
@@ -125,6 +124,7 @@ export * from './GetTeamFeedSummary200Response';
125
124
  export * from './GroupedPositionsResponse';
126
125
  export * from './GroupedPositionsResponseHome';
127
126
  export * from './HasDoorlock200Response';
127
+ export * from './HasUserVoted200Response';
128
128
  export * from './HourShiftDetail';
129
129
  export * from './InitiateReservationParams';
130
130
  export * from './InvitationListItem';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jugarhoy/api",
3
- "version": "1.1.22",
3
+ "version": "1.1.24",
4
4
  "description": "TypeScript SDK for Jugar Hoy API",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
@@ -1,65 +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
- /**
17
- *
18
- * @export
19
- * @interface ApiAppVotingHasVotedPlaySearchIdGet200Response
20
- */
21
- export interface ApiAppVotingHasVotedPlaySearchIdGet200Response {
22
- /**
23
- *
24
- * @type {boolean}
25
- * @memberof ApiAppVotingHasVotedPlaySearchIdGet200Response
26
- */
27
- hasVoted?: boolean;
28
- }
29
-
30
- /**
31
- * Check if a given object implements the ApiAppVotingHasVotedPlaySearchIdGet200Response interface.
32
- */
33
- export function instanceOfApiAppVotingHasVotedPlaySearchIdGet200Response(value: object): value is ApiAppVotingHasVotedPlaySearchIdGet200Response {
34
- return true;
35
- }
36
-
37
- export function ApiAppVotingHasVotedPlaySearchIdGet200ResponseFromJSON(json: any): ApiAppVotingHasVotedPlaySearchIdGet200Response {
38
- return ApiAppVotingHasVotedPlaySearchIdGet200ResponseFromJSONTyped(json, false);
39
- }
40
-
41
- export function ApiAppVotingHasVotedPlaySearchIdGet200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiAppVotingHasVotedPlaySearchIdGet200Response {
42
- if (json == null) {
43
- return json;
44
- }
45
- return {
46
-
47
- 'hasVoted': json['hasVoted'] == null ? undefined : json['hasVoted'],
48
- };
49
- }
50
-
51
- export function ApiAppVotingHasVotedPlaySearchIdGet200ResponseToJSON(json: any): ApiAppVotingHasVotedPlaySearchIdGet200Response {
52
- return ApiAppVotingHasVotedPlaySearchIdGet200ResponseToJSONTyped(json, false);
53
- }
54
-
55
- export function ApiAppVotingHasVotedPlaySearchIdGet200ResponseToJSONTyped(value?: ApiAppVotingHasVotedPlaySearchIdGet200Response | null, ignoreDiscriminator: boolean = false): any {
56
- if (value == null) {
57
- return value;
58
- }
59
-
60
- return {
61
-
62
- 'hasVoted': value['hasVoted'],
63
- };
64
- }
65
-