@jugarhoy/api 1.1.7 → 1.1.10
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/AppPlaySearchApi.ts +52 -0
- package/models/CreatePlayRegistrationRequest.ts +16 -0
- package/models/CreatePlaySearchRequest.ts +23 -0
- package/models/PlayRegistration.ts +18 -0
- package/models/PlayRegistrationDTO.ts +27 -0
- package/models/PlaySearch.ts +33 -1
- package/models/PlaySearchDTO.ts +24 -0
- package/models/PlaySearchDetailDTO.ts +32 -0
- package/models/PlaySearchDetailDTOAllOfRegistrations.ts +24 -0
- package/models/PlaySearchType.ts +58 -0
- package/models/User.ts +8 -0
- package/models/UserDto.ts +8 -0
- package/models/index.ts +1 -0
- package/package.json +1 -1
package/apis/AppPlaySearchApi.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
PlaySearchDetailDTO,
|
|
21
21
|
PlaySearchListResponse,
|
|
22
22
|
PlaySearchStatus,
|
|
23
|
+
PlaySearchType,
|
|
23
24
|
Sport,
|
|
24
25
|
} from '../models/index';
|
|
25
26
|
import {
|
|
@@ -33,12 +34,15 @@ import {
|
|
|
33
34
|
PlaySearchListResponseToJSON,
|
|
34
35
|
PlaySearchStatusFromJSON,
|
|
35
36
|
PlaySearchStatusToJSON,
|
|
37
|
+
PlaySearchTypeFromJSON,
|
|
38
|
+
PlaySearchTypeToJSON,
|
|
36
39
|
SportFromJSON,
|
|
37
40
|
SportToJSON,
|
|
38
41
|
} from '../models/index';
|
|
39
42
|
|
|
40
43
|
export interface ApiAppPlaySearchesGetRequest {
|
|
41
44
|
sport: Sport;
|
|
45
|
+
type?: PlaySearchType;
|
|
42
46
|
latitude?: number;
|
|
43
47
|
longitude?: number;
|
|
44
48
|
radiusMeters?: number;
|
|
@@ -53,6 +57,10 @@ export interface ApiAppPlaySearchesIdCancelDeleteRequest {
|
|
|
53
57
|
id: string;
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
export interface ApiAppPlaySearchesIdConfirmPutRequest {
|
|
61
|
+
id: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
56
64
|
export interface ApiAppPlaySearchesIdGetRequest {
|
|
57
65
|
id: string;
|
|
58
66
|
}
|
|
@@ -89,6 +97,10 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
|
|
|
89
97
|
queryParameters['sport'] = requestParameters['sport'];
|
|
90
98
|
}
|
|
91
99
|
|
|
100
|
+
if (requestParameters['type'] != null) {
|
|
101
|
+
queryParameters['type'] = requestParameters['type'];
|
|
102
|
+
}
|
|
103
|
+
|
|
92
104
|
if (requestParameters['latitude'] != null) {
|
|
93
105
|
queryParameters['latitude'] = requestParameters['latitude'];
|
|
94
106
|
}
|
|
@@ -189,6 +201,46 @@ export class AppPlaySearchApi extends runtime.BaseAPI {
|
|
|
189
201
|
await this.apiAppPlaySearchesIdCancelDeleteRaw(requestParameters, initOverrides);
|
|
190
202
|
}
|
|
191
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Confirm a FILLED play search and notify all registrants
|
|
206
|
+
*/
|
|
207
|
+
async apiAppPlaySearchesIdConfirmPutRaw(requestParameters: ApiAppPlaySearchesIdConfirmPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
208
|
+
if (requestParameters['id'] == null) {
|
|
209
|
+
throw new runtime.RequiredError(
|
|
210
|
+
'id',
|
|
211
|
+
'Required parameter "id" was null or undefined when calling apiAppPlaySearchesIdConfirmPut().'
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const queryParameters: any = {};
|
|
216
|
+
|
|
217
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
218
|
+
|
|
219
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
220
|
+
const token = this.configuration.accessToken;
|
|
221
|
+
const tokenString = await token("bearerAuth", []);
|
|
222
|
+
|
|
223
|
+
if (tokenString) {
|
|
224
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const response = await this.request({
|
|
228
|
+
path: `/api/app/play-searches/{id}/confirm`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
229
|
+
method: 'PUT',
|
|
230
|
+
headers: headerParameters,
|
|
231
|
+
query: queryParameters,
|
|
232
|
+
}, initOverrides);
|
|
233
|
+
|
|
234
|
+
return new runtime.VoidApiResponse(response);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Confirm a FILLED play search and notify all registrants
|
|
239
|
+
*/
|
|
240
|
+
async apiAppPlaySearchesIdConfirmPut(requestParameters: ApiAppPlaySearchesIdConfirmPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
241
|
+
await this.apiAppPlaySearchesIdConfirmPutRaw(requestParameters, initOverrides);
|
|
242
|
+
}
|
|
243
|
+
|
|
192
244
|
/**
|
|
193
245
|
* Get play search details with registrations
|
|
194
246
|
*/
|
|
@@ -45,6 +45,18 @@ export interface CreatePlayRegistrationRequest {
|
|
|
45
45
|
* @memberof CreatePlayRegistrationRequest
|
|
46
46
|
*/
|
|
47
47
|
subscriptionId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* How many players this registration represents
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof CreatePlayRegistrationRequest
|
|
52
|
+
*/
|
|
53
|
+
playersCount?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Names of companions (required if playersCount > 1)
|
|
56
|
+
* @type {Array<string>}
|
|
57
|
+
* @memberof CreatePlayRegistrationRequest
|
|
58
|
+
*/
|
|
59
|
+
companionNames?: Array<string>;
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
|
|
@@ -70,6 +82,8 @@ export function CreatePlayRegistrationRequestFromJSONTyped(json: any, ignoreDisc
|
|
|
70
82
|
'type': PlayRegistrationTypeFromJSON(json['type']),
|
|
71
83
|
'playSearchId': json['playSearchId'] == null ? undefined : json['playSearchId'],
|
|
72
84
|
'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
|
|
85
|
+
'playersCount': json['playersCount'] == null ? undefined : json['playersCount'],
|
|
86
|
+
'companionNames': json['companionNames'] == null ? undefined : json['companionNames'],
|
|
73
87
|
};
|
|
74
88
|
}
|
|
75
89
|
|
|
@@ -87,6 +101,8 @@ export function CreatePlayRegistrationRequestToJSONTyped(value?: CreatePlayRegis
|
|
|
87
101
|
'type': PlayRegistrationTypeToJSON(value['type']),
|
|
88
102
|
'playSearchId': value['playSearchId'],
|
|
89
103
|
'subscriptionId': value['subscriptionId'],
|
|
104
|
+
'playersCount': value['playersCount'],
|
|
105
|
+
'companionNames': value['companionNames'],
|
|
90
106
|
};
|
|
91
107
|
}
|
|
92
108
|
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PlaySearchType } from './PlaySearchType';
|
|
17
|
+
import {
|
|
18
|
+
PlaySearchTypeFromJSON,
|
|
19
|
+
PlaySearchTypeFromJSONTyped,
|
|
20
|
+
PlaySearchTypeToJSON,
|
|
21
|
+
PlaySearchTypeToJSONTyped,
|
|
22
|
+
} from './PlaySearchType';
|
|
16
23
|
import type { CreateClubPlaceRequest } from './CreateClubPlaceRequest';
|
|
17
24
|
import {
|
|
18
25
|
CreateClubPlaceRequestFromJSON,
|
|
@@ -40,6 +47,18 @@ export interface CreatePlaySearchRequest {
|
|
|
40
47
|
* @memberof CreatePlaySearchRequest
|
|
41
48
|
*/
|
|
42
49
|
clubPlace: CreateClubPlaceRequest;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {PlaySearchType}
|
|
53
|
+
* @memberof CreatePlaySearchRequest
|
|
54
|
+
*/
|
|
55
|
+
type?: PlaySearchType;
|
|
56
|
+
/**
|
|
57
|
+
* Format of play (optional)
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof CreatePlaySearchRequest
|
|
60
|
+
*/
|
|
61
|
+
playersPerTeam?: number | null;
|
|
43
62
|
/**
|
|
44
63
|
*
|
|
45
64
|
* @type {Date}
|
|
@@ -153,6 +172,8 @@ export function CreatePlaySearchRequestFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
153
172
|
return {
|
|
154
173
|
|
|
155
174
|
'clubPlace': CreateClubPlaceRequestFromJSON(json['clubPlace']),
|
|
175
|
+
'type': json['type'] == null ? undefined : PlaySearchTypeFromJSON(json['type']),
|
|
176
|
+
'playersPerTeam': json['playersPerTeam'] == null ? undefined : json['playersPerTeam'],
|
|
156
177
|
'matchDateTime': (new Date(json['matchDateTime'])),
|
|
157
178
|
'duration': json['duration'],
|
|
158
179
|
'gender': json['gender'] == null ? undefined : json['gender'],
|
|
@@ -180,6 +201,8 @@ export function CreatePlaySearchRequestToJSONTyped(value?: CreatePlaySearchReque
|
|
|
180
201
|
return {
|
|
181
202
|
|
|
182
203
|
'clubPlace': CreateClubPlaceRequestToJSON(value['clubPlace']),
|
|
204
|
+
'type': PlaySearchTypeToJSON(value['type']),
|
|
205
|
+
'playersPerTeam': value['playersPerTeam'],
|
|
183
206
|
'matchDateTime': ((value['matchDateTime']).toISOString()),
|
|
184
207
|
'duration': value['duration'],
|
|
185
208
|
'gender': value['gender'],
|
|
@@ -82,6 +82,18 @@ export interface PlayRegistration {
|
|
|
82
82
|
* @memberof PlayRegistration
|
|
83
83
|
*/
|
|
84
84
|
registrationOrder: number;
|
|
85
|
+
/**
|
|
86
|
+
* How many players this registration represents
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof PlayRegistration
|
|
89
|
+
*/
|
|
90
|
+
playersCount: number;
|
|
91
|
+
/**
|
|
92
|
+
* Names of companions (required if playersCount > 1)
|
|
93
|
+
* @type {Array<string>}
|
|
94
|
+
* @memberof PlayRegistration
|
|
95
|
+
*/
|
|
96
|
+
companionNames: Array<string>;
|
|
85
97
|
/**
|
|
86
98
|
*
|
|
87
99
|
* @type {Date}
|
|
@@ -107,6 +119,8 @@ export function instanceOfPlayRegistration(value: object): value is PlayRegistra
|
|
|
107
119
|
if (!('type' in value) || value['type'] === undefined) return false;
|
|
108
120
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
109
121
|
if (!('registrationOrder' in value) || value['registrationOrder'] === undefined) return false;
|
|
122
|
+
if (!('playersCount' in value) || value['playersCount'] === undefined) return false;
|
|
123
|
+
if (!('companionNames' in value) || value['companionNames'] === undefined) return false;
|
|
110
124
|
return true;
|
|
111
125
|
}
|
|
112
126
|
|
|
@@ -128,6 +142,8 @@ export function PlayRegistrationFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
128
142
|
'reserveId': json['reserveId'] == null ? undefined : json['reserveId'],
|
|
129
143
|
'status': RegistrationStatusFromJSON(json['status']),
|
|
130
144
|
'registrationOrder': json['registrationOrder'],
|
|
145
|
+
'playersCount': json['playersCount'],
|
|
146
|
+
'companionNames': json['companionNames'],
|
|
131
147
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
132
148
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
133
149
|
};
|
|
@@ -152,6 +168,8 @@ export function PlayRegistrationToJSONTyped(value?: PlayRegistration | null, ign
|
|
|
152
168
|
'reserveId': value['reserveId'],
|
|
153
169
|
'status': RegistrationStatusToJSON(value['status']),
|
|
154
170
|
'registrationOrder': value['registrationOrder'],
|
|
171
|
+
'playersCount': value['playersCount'],
|
|
172
|
+
'companionNames': value['companionNames'],
|
|
155
173
|
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
156
174
|
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
157
175
|
};
|
|
@@ -83,6 +83,24 @@ export interface PlayRegistrationDTO {
|
|
|
83
83
|
* @memberof PlayRegistrationDTO
|
|
84
84
|
*/
|
|
85
85
|
registrationOrder: number;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {number}
|
|
89
|
+
* @memberof PlayRegistrationDTO
|
|
90
|
+
*/
|
|
91
|
+
playersCount: number;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {Array<string>}
|
|
95
|
+
* @memberof PlayRegistrationDTO
|
|
96
|
+
*/
|
|
97
|
+
companionNames: Array<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Display name in format "Name" or "Name +X"
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @memberof PlayRegistrationDTO
|
|
102
|
+
*/
|
|
103
|
+
displayName: string;
|
|
86
104
|
/**
|
|
87
105
|
*
|
|
88
106
|
* @type {Date}
|
|
@@ -103,6 +121,9 @@ export function instanceOfPlayRegistrationDTO(value: object): value is PlayRegis
|
|
|
103
121
|
if (!('type' in value) || value['type'] === undefined) return false;
|
|
104
122
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
105
123
|
if (!('registrationOrder' in value) || value['registrationOrder'] === undefined) return false;
|
|
124
|
+
if (!('playersCount' in value) || value['playersCount'] === undefined) return false;
|
|
125
|
+
if (!('companionNames' in value) || value['companionNames'] === undefined) return false;
|
|
126
|
+
if (!('displayName' in value) || value['displayName'] === undefined) return false;
|
|
106
127
|
return true;
|
|
107
128
|
}
|
|
108
129
|
|
|
@@ -123,6 +144,9 @@ export function PlayRegistrationDTOFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
123
144
|
'type': PlayRegistrationTypeFromJSON(json['type']),
|
|
124
145
|
'status': RegistrationStatusFromJSON(json['status']),
|
|
125
146
|
'registrationOrder': json['registrationOrder'],
|
|
147
|
+
'playersCount': json['playersCount'],
|
|
148
|
+
'companionNames': json['companionNames'],
|
|
149
|
+
'displayName': json['displayName'],
|
|
126
150
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
127
151
|
};
|
|
128
152
|
}
|
|
@@ -145,6 +169,9 @@ export function PlayRegistrationDTOToJSONTyped(value?: PlayRegistrationDTO | nul
|
|
|
145
169
|
'type': PlayRegistrationTypeToJSON(value['type']),
|
|
146
170
|
'status': RegistrationStatusToJSON(value['status']),
|
|
147
171
|
'registrationOrder': value['registrationOrder'],
|
|
172
|
+
'playersCount': value['playersCount'],
|
|
173
|
+
'companionNames': value['companionNames'],
|
|
174
|
+
'displayName': value['displayName'],
|
|
148
175
|
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
149
176
|
};
|
|
150
177
|
}
|
package/models/PlaySearch.ts
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PlaySearchType } from './PlaySearchType';
|
|
17
|
+
import {
|
|
18
|
+
PlaySearchTypeFromJSON,
|
|
19
|
+
PlaySearchTypeFromJSONTyped,
|
|
20
|
+
PlaySearchTypeToJSON,
|
|
21
|
+
PlaySearchTypeToJSONTyped,
|
|
22
|
+
} from './PlaySearchType';
|
|
16
23
|
import type { Sport } from './Sport';
|
|
17
24
|
import {
|
|
18
25
|
SportFromJSON,
|
|
@@ -65,6 +72,18 @@ export interface PlaySearch {
|
|
|
65
72
|
* @memberof PlaySearch
|
|
66
73
|
*/
|
|
67
74
|
sport: Sport;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {PlaySearchType}
|
|
78
|
+
* @memberof PlaySearch
|
|
79
|
+
*/
|
|
80
|
+
type: PlaySearchType;
|
|
81
|
+
/**
|
|
82
|
+
* Format of play (1=Singles, 2=Dobles, 5+=Equipo)
|
|
83
|
+
* @type {number}
|
|
84
|
+
* @memberof PlaySearch
|
|
85
|
+
*/
|
|
86
|
+
playersPerTeam?: number | null;
|
|
68
87
|
/**
|
|
69
88
|
* When the match will happen
|
|
70
89
|
* @type {Date}
|
|
@@ -96,7 +115,7 @@ export interface PlaySearch {
|
|
|
96
115
|
*/
|
|
97
116
|
dominantSide?: DominantSide;
|
|
98
117
|
/**
|
|
99
|
-
* Maximum number of
|
|
118
|
+
* Maximum number of participants (updated from 10 to 50)
|
|
100
119
|
* @type {number}
|
|
101
120
|
* @memberof PlaySearch
|
|
102
121
|
*/
|
|
@@ -173,6 +192,12 @@ export interface PlaySearch {
|
|
|
173
192
|
* @memberof PlaySearch
|
|
174
193
|
*/
|
|
175
194
|
alertLimitSentDate?: Date | null;
|
|
195
|
+
/**
|
|
196
|
+
* Timestamp when owner was notified about FILLED status
|
|
197
|
+
* @type {Date}
|
|
198
|
+
* @memberof PlaySearch
|
|
199
|
+
*/
|
|
200
|
+
ownerNotifiedDate?: Date | null;
|
|
176
201
|
}
|
|
177
202
|
|
|
178
203
|
|
|
@@ -185,6 +210,7 @@ export function instanceOfPlaySearch(value: object): value is PlaySearch {
|
|
|
185
210
|
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
186
211
|
if (!('clubPlaceId' in value) || value['clubPlaceId'] === undefined) return false;
|
|
187
212
|
if (!('sport' in value) || value['sport'] === undefined) return false;
|
|
213
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
188
214
|
if (!('matchDateTime' in value) || value['matchDateTime'] === undefined) return false;
|
|
189
215
|
if (!('duration' in value) || value['duration'] === undefined) return false;
|
|
190
216
|
if (!('quota' in value) || value['quota'] === undefined) return false;
|
|
@@ -209,6 +235,8 @@ export function PlaySearchFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
209
235
|
'userId': json['userId'],
|
|
210
236
|
'clubPlaceId': json['clubPlaceId'],
|
|
211
237
|
'sport': SportFromJSON(json['sport']),
|
|
238
|
+
'type': PlaySearchTypeFromJSON(json['type']),
|
|
239
|
+
'playersPerTeam': json['playersPerTeam'] == null ? undefined : json['playersPerTeam'],
|
|
212
240
|
'matchDateTime': (new Date(json['matchDateTime'])),
|
|
213
241
|
'duration': json['duration'],
|
|
214
242
|
'gender': json['gender'] == null ? undefined : json['gender'],
|
|
@@ -227,6 +255,7 @@ export function PlaySearchFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
227
255
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
228
256
|
'alertSentDate': json['alertSentDate'] == null ? undefined : (new Date(json['alertSentDate'])),
|
|
229
257
|
'alertLimitSentDate': json['alertLimitSentDate'] == null ? undefined : (new Date(json['alertLimitSentDate'])),
|
|
258
|
+
'ownerNotifiedDate': json['ownerNotifiedDate'] == null ? undefined : (new Date(json['ownerNotifiedDate'])),
|
|
230
259
|
};
|
|
231
260
|
}
|
|
232
261
|
|
|
@@ -245,6 +274,8 @@ export function PlaySearchToJSONTyped(value?: PlaySearch | null, ignoreDiscrimin
|
|
|
245
274
|
'userId': value['userId'],
|
|
246
275
|
'clubPlaceId': value['clubPlaceId'],
|
|
247
276
|
'sport': SportToJSON(value['sport']),
|
|
277
|
+
'type': PlaySearchTypeToJSON(value['type']),
|
|
278
|
+
'playersPerTeam': value['playersPerTeam'],
|
|
248
279
|
'matchDateTime': ((value['matchDateTime']).toISOString()),
|
|
249
280
|
'duration': value['duration'],
|
|
250
281
|
'gender': value['gender'],
|
|
@@ -263,6 +294,7 @@ export function PlaySearchToJSONTyped(value?: PlaySearch | null, ignoreDiscrimin
|
|
|
263
294
|
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
264
295
|
'alertSentDate': value['alertSentDate'] == null ? undefined : ((value['alertSentDate'] as any).toISOString()),
|
|
265
296
|
'alertLimitSentDate': value['alertLimitSentDate'] == null ? undefined : ((value['alertLimitSentDate'] as any).toISOString()),
|
|
297
|
+
'ownerNotifiedDate': value['ownerNotifiedDate'] == null ? undefined : ((value['ownerNotifiedDate'] as any).toISOString()),
|
|
266
298
|
};
|
|
267
299
|
}
|
|
268
300
|
|
package/models/PlaySearchDTO.ts
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PlaySearchType } from './PlaySearchType';
|
|
17
|
+
import {
|
|
18
|
+
PlaySearchTypeFromJSON,
|
|
19
|
+
PlaySearchTypeFromJSONTyped,
|
|
20
|
+
PlaySearchTypeToJSON,
|
|
21
|
+
PlaySearchTypeToJSONTyped,
|
|
22
|
+
} from './PlaySearchType';
|
|
16
23
|
import type { Sport } from './Sport';
|
|
17
24
|
import {
|
|
18
25
|
SportFromJSON,
|
|
@@ -85,6 +92,18 @@ export interface PlaySearchDTO {
|
|
|
85
92
|
* @memberof PlaySearchDTO
|
|
86
93
|
*/
|
|
87
94
|
sport: Sport;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {PlaySearchType}
|
|
98
|
+
* @memberof PlaySearchDTO
|
|
99
|
+
*/
|
|
100
|
+
type: PlaySearchType;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {number}
|
|
104
|
+
* @memberof PlaySearchDTO
|
|
105
|
+
*/
|
|
106
|
+
playersPerTeam?: number | null;
|
|
88
107
|
/**
|
|
89
108
|
*
|
|
90
109
|
* @type {Date}
|
|
@@ -187,6 +206,7 @@ export function instanceOfPlaySearchDTO(value: object): value is PlaySearchDTO {
|
|
|
187
206
|
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
188
207
|
if (!('clubPlace' in value) || value['clubPlace'] === undefined) return false;
|
|
189
208
|
if (!('sport' in value) || value['sport'] === undefined) return false;
|
|
209
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
190
210
|
if (!('matchDateTime' in value) || value['matchDateTime'] === undefined) return false;
|
|
191
211
|
if (!('duration' in value) || value['duration'] === undefined) return false;
|
|
192
212
|
if (!('quota' in value) || value['quota'] === undefined) return false;
|
|
@@ -212,6 +232,8 @@ export function PlaySearchDTOFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
212
232
|
'user': json['user'] == null ? undefined : PlayRegistrationDTOUserFromJSON(json['user']),
|
|
213
233
|
'clubPlace': PlaySearchDTOClubPlaceFromJSON(json['clubPlace']),
|
|
214
234
|
'sport': SportFromJSON(json['sport']),
|
|
235
|
+
'type': PlaySearchTypeFromJSON(json['type']),
|
|
236
|
+
'playersPerTeam': json['playersPerTeam'] == null ? undefined : json['playersPerTeam'],
|
|
215
237
|
'matchDateTime': (new Date(json['matchDateTime'])),
|
|
216
238
|
'duration': json['duration'],
|
|
217
239
|
'gender': json['gender'] == null ? undefined : json['gender'],
|
|
@@ -246,6 +268,8 @@ export function PlaySearchDTOToJSONTyped(value?: PlaySearchDTO | null, ignoreDis
|
|
|
246
268
|
'user': PlayRegistrationDTOUserToJSON(value['user']),
|
|
247
269
|
'clubPlace': PlaySearchDTOClubPlaceToJSON(value['clubPlace']),
|
|
248
270
|
'sport': SportToJSON(value['sport']),
|
|
271
|
+
'type': PlaySearchTypeToJSON(value['type']),
|
|
272
|
+
'playersPerTeam': value['playersPerTeam'],
|
|
249
273
|
'matchDateTime': ((value['matchDateTime']).toISOString()),
|
|
250
274
|
'duration': value['duration'],
|
|
251
275
|
'gender': value['gender'],
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PlaySearchType } from './PlaySearchType';
|
|
17
|
+
import {
|
|
18
|
+
PlaySearchTypeFromJSON,
|
|
19
|
+
PlaySearchTypeFromJSONTyped,
|
|
20
|
+
PlaySearchTypeToJSON,
|
|
21
|
+
PlaySearchTypeToJSONTyped,
|
|
22
|
+
} from './PlaySearchType';
|
|
16
23
|
import type { Sport } from './Sport';
|
|
17
24
|
import {
|
|
18
25
|
SportFromJSON,
|
|
@@ -99,6 +106,18 @@ export interface PlaySearchDetailDTO {
|
|
|
99
106
|
* @memberof PlaySearchDetailDTO
|
|
100
107
|
*/
|
|
101
108
|
sport: Sport;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {PlaySearchType}
|
|
112
|
+
* @memberof PlaySearchDetailDTO
|
|
113
|
+
*/
|
|
114
|
+
type: PlaySearchType;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @type {number}
|
|
118
|
+
* @memberof PlaySearchDetailDTO
|
|
119
|
+
*/
|
|
120
|
+
playersPerTeam?: number | null;
|
|
102
121
|
/**
|
|
103
122
|
*
|
|
104
123
|
* @type {Date}
|
|
@@ -201,6 +220,12 @@ export interface PlaySearchDetailDTO {
|
|
|
201
220
|
* @memberof PlaySearchDetailDTO
|
|
202
221
|
*/
|
|
203
222
|
counts?: PlaySearchDetailDTOAllOfCounts;
|
|
223
|
+
/**
|
|
224
|
+
* Sum of playersCount for all PRIMARY registrations
|
|
225
|
+
* @type {number}
|
|
226
|
+
* @memberof PlaySearchDetailDTO
|
|
227
|
+
*/
|
|
228
|
+
totalPlayersCount?: number;
|
|
204
229
|
}
|
|
205
230
|
|
|
206
231
|
|
|
@@ -213,6 +238,7 @@ export function instanceOfPlaySearchDetailDTO(value: object): value is PlaySearc
|
|
|
213
238
|
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
214
239
|
if (!('clubPlace' in value) || value['clubPlace'] === undefined) return false;
|
|
215
240
|
if (!('sport' in value) || value['sport'] === undefined) return false;
|
|
241
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
216
242
|
if (!('matchDateTime' in value) || value['matchDateTime'] === undefined) return false;
|
|
217
243
|
if (!('duration' in value) || value['duration'] === undefined) return false;
|
|
218
244
|
if (!('quota' in value) || value['quota'] === undefined) return false;
|
|
@@ -238,6 +264,8 @@ export function PlaySearchDetailDTOFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
238
264
|
'user': json['user'] == null ? undefined : PlayRegistrationDTOUserFromJSON(json['user']),
|
|
239
265
|
'clubPlace': PlaySearchDTOClubPlaceFromJSON(json['clubPlace']),
|
|
240
266
|
'sport': SportFromJSON(json['sport']),
|
|
267
|
+
'type': PlaySearchTypeFromJSON(json['type']),
|
|
268
|
+
'playersPerTeam': json['playersPerTeam'] == null ? undefined : json['playersPerTeam'],
|
|
241
269
|
'matchDateTime': (new Date(json['matchDateTime'])),
|
|
242
270
|
'duration': json['duration'],
|
|
243
271
|
'gender': json['gender'] == null ? undefined : json['gender'],
|
|
@@ -255,6 +283,7 @@ export function PlaySearchDetailDTOFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
255
283
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
256
284
|
'registrations': json['registrations'] == null ? undefined : ((json['registrations'] as Array<any>).map(PlaySearchDetailDTOAllOfRegistrationsFromJSON)),
|
|
257
285
|
'counts': json['counts'] == null ? undefined : PlaySearchDetailDTOAllOfCountsFromJSON(json['counts']),
|
|
286
|
+
'totalPlayersCount': json['totalPlayersCount'] == null ? undefined : json['totalPlayersCount'],
|
|
258
287
|
};
|
|
259
288
|
}
|
|
260
289
|
|
|
@@ -274,6 +303,8 @@ export function PlaySearchDetailDTOToJSONTyped(value?: PlaySearchDetailDTO | nul
|
|
|
274
303
|
'user': PlayRegistrationDTOUserToJSON(value['user']),
|
|
275
304
|
'clubPlace': PlaySearchDTOClubPlaceToJSON(value['clubPlace']),
|
|
276
305
|
'sport': SportToJSON(value['sport']),
|
|
306
|
+
'type': PlaySearchTypeToJSON(value['type']),
|
|
307
|
+
'playersPerTeam': value['playersPerTeam'],
|
|
277
308
|
'matchDateTime': ((value['matchDateTime']).toISOString()),
|
|
278
309
|
'duration': value['duration'],
|
|
279
310
|
'gender': value['gender'],
|
|
@@ -291,6 +322,7 @@ export function PlaySearchDetailDTOToJSONTyped(value?: PlaySearchDetailDTO | nul
|
|
|
291
322
|
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
292
323
|
'registrations': value['registrations'] == null ? undefined : ((value['registrations'] as Array<any>).map(PlaySearchDetailDTOAllOfRegistrationsToJSON)),
|
|
293
324
|
'counts': PlaySearchDetailDTOAllOfCountsToJSON(value['counts']),
|
|
325
|
+
'totalPlayersCount': value['totalPlayersCount'],
|
|
294
326
|
};
|
|
295
327
|
}
|
|
296
328
|
|
|
@@ -57,6 +57,24 @@ export interface PlaySearchDetailDTOAllOfRegistrations {
|
|
|
57
57
|
* @memberof PlaySearchDetailDTOAllOfRegistrations
|
|
58
58
|
*/
|
|
59
59
|
registrationOrder?: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof PlaySearchDetailDTOAllOfRegistrations
|
|
64
|
+
*/
|
|
65
|
+
playersCount?: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Array<string>}
|
|
69
|
+
* @memberof PlaySearchDetailDTOAllOfRegistrations
|
|
70
|
+
*/
|
|
71
|
+
companionNames?: Array<string>;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof PlaySearchDetailDTOAllOfRegistrations
|
|
76
|
+
*/
|
|
77
|
+
displayName?: string;
|
|
60
78
|
/**
|
|
61
79
|
*
|
|
62
80
|
* @type {Date}
|
|
@@ -98,6 +116,9 @@ export function PlaySearchDetailDTOAllOfRegistrationsFromJSONTyped(json: any, ig
|
|
|
98
116
|
'user': json['user'] == null ? undefined : PlaySearchDetailDTOAllOfUserFromJSON(json['user']),
|
|
99
117
|
'status': json['status'] == null ? undefined : json['status'],
|
|
100
118
|
'registrationOrder': json['registrationOrder'] == null ? undefined : json['registrationOrder'],
|
|
119
|
+
'playersCount': json['playersCount'] == null ? undefined : json['playersCount'],
|
|
120
|
+
'companionNames': json['companionNames'] == null ? undefined : json['companionNames'],
|
|
121
|
+
'displayName': json['displayName'] == null ? undefined : json['displayName'],
|
|
101
122
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
102
123
|
};
|
|
103
124
|
}
|
|
@@ -118,6 +139,9 @@ export function PlaySearchDetailDTOAllOfRegistrationsToJSONTyped(value?: PlaySea
|
|
|
118
139
|
'user': PlaySearchDetailDTOAllOfUserToJSON(value['user']),
|
|
119
140
|
'status': value['status'],
|
|
120
141
|
'registrationOrder': value['registrationOrder'],
|
|
142
|
+
'playersCount': value['playersCount'],
|
|
143
|
+
'companionNames': value['companionNames'],
|
|
144
|
+
'displayName': value['displayName'],
|
|
121
145
|
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
122
146
|
};
|
|
123
147
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Tipo de búsqueda de jugadores:
|
|
18
|
+
* - FALTA1: Partido amateur que necesita jugadores
|
|
19
|
+
* - CANCHA_ABIERTA: Torneo organizado por coach/jugador abierto a la comunidad
|
|
20
|
+
* - CLASE_LIBRE: Clase con cupo libre de último momento
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const PlaySearchType = {
|
|
25
|
+
Falta1: 'FALTA1',
|
|
26
|
+
CanchaAbierta: 'CANCHA_ABIERTA',
|
|
27
|
+
ClaseLibre: 'CLASE_LIBRE'
|
|
28
|
+
} as const;
|
|
29
|
+
export type PlaySearchType = typeof PlaySearchType[keyof typeof PlaySearchType];
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export function instanceOfPlaySearchType(value: any): boolean {
|
|
33
|
+
for (const key in PlaySearchType) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(PlaySearchType, key)) {
|
|
35
|
+
if (PlaySearchType[key as keyof typeof PlaySearchType] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function PlaySearchTypeFromJSON(json: any): PlaySearchType {
|
|
44
|
+
return PlaySearchTypeFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function PlaySearchTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaySearchType {
|
|
48
|
+
return json as PlaySearchType;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function PlaySearchTypeToJSON(value?: PlaySearchType | null): any {
|
|
52
|
+
return value as any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function PlaySearchTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): PlaySearchType {
|
|
56
|
+
return value as PlaySearchType;
|
|
57
|
+
}
|
|
58
|
+
|
package/models/User.ts
CHANGED
|
@@ -156,6 +156,12 @@ export interface User {
|
|
|
156
156
|
* @memberof User
|
|
157
157
|
*/
|
|
158
158
|
searchDistanceEnabled?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* User's timezone for date/time formatting (IANA timezone format)
|
|
161
|
+
* @type {string}
|
|
162
|
+
* @memberof User
|
|
163
|
+
*/
|
|
164
|
+
timezone?: string;
|
|
159
165
|
/**
|
|
160
166
|
*
|
|
161
167
|
* @type {UserType}
|
|
@@ -223,6 +229,7 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User
|
|
|
223
229
|
'distanceInKm': json['distanceInKm'] == null ? undefined : json['distanceInKm'],
|
|
224
230
|
'gender': json['gender'] == null ? undefined : GenderFromJSON(json['gender']),
|
|
225
231
|
'searchDistanceEnabled': json['searchDistanceEnabled'] == null ? undefined : json['searchDistanceEnabled'],
|
|
232
|
+
'timezone': json['timezone'] == null ? undefined : json['timezone'],
|
|
226
233
|
'type': UserTypeFromJSON(json['type']),
|
|
227
234
|
'memberOfCustomers': json['memberOfCustomers'] == null ? undefined : json['memberOfCustomers'],
|
|
228
235
|
'userRegisteredAt': json['userRegisteredAt'] == null ? undefined : (new Date(json['userRegisteredAt'])),
|
|
@@ -258,6 +265,7 @@ export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolea
|
|
|
258
265
|
'distanceInKm': value['distanceInKm'],
|
|
259
266
|
'gender': GenderToJSON(value['gender']),
|
|
260
267
|
'searchDistanceEnabled': value['searchDistanceEnabled'],
|
|
268
|
+
'timezone': value['timezone'],
|
|
261
269
|
'type': UserTypeToJSON(value['type']),
|
|
262
270
|
'memberOfCustomers': value['memberOfCustomers'],
|
|
263
271
|
'userRegisteredAt': value['userRegisteredAt'] == null ? undefined : ((value['userRegisteredAt']).toISOString()),
|
package/models/UserDto.ts
CHANGED
|
@@ -99,6 +99,12 @@ export interface UserDto {
|
|
|
99
99
|
* @memberof UserDto
|
|
100
100
|
*/
|
|
101
101
|
searchDistanceEnabled?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* User's timezone for date/time formatting (IANA timezone format)
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof UserDto
|
|
106
|
+
*/
|
|
107
|
+
timezone?: string;
|
|
102
108
|
/**
|
|
103
109
|
* Optional invite code for admin/coach registration
|
|
104
110
|
* @type {string}
|
|
@@ -142,6 +148,7 @@ export function UserDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): U
|
|
|
142
148
|
'distanceInKm': json['distanceInKm'] == null ? undefined : json['distanceInKm'],
|
|
143
149
|
'gender': json['gender'] == null ? undefined : GenderFromJSON(json['gender']),
|
|
144
150
|
'searchDistanceEnabled': json['searchDistanceEnabled'] == null ? undefined : json['searchDistanceEnabled'],
|
|
151
|
+
'timezone': json['timezone'] == null ? undefined : json['timezone'],
|
|
145
152
|
'inviteCode': json['inviteCode'] == null ? undefined : json['inviteCode'],
|
|
146
153
|
};
|
|
147
154
|
}
|
|
@@ -169,6 +176,7 @@ export function UserDtoToJSONTyped(value?: UserDto | null, ignoreDiscriminator:
|
|
|
169
176
|
'distanceInKm': value['distanceInKm'],
|
|
170
177
|
'gender': GenderToJSON(value['gender']),
|
|
171
178
|
'searchDistanceEnabled': value['searchDistanceEnabled'],
|
|
179
|
+
'timezone': value['timezone'],
|
|
172
180
|
'inviteCode': value['inviteCode'],
|
|
173
181
|
};
|
|
174
182
|
}
|
package/models/index.ts
CHANGED
|
@@ -146,6 +146,7 @@ export * from './PlaySearchDetailDTOAllOfRegistrations';
|
|
|
146
146
|
export * from './PlaySearchDetailDTOAllOfUser';
|
|
147
147
|
export * from './PlaySearchListResponse';
|
|
148
148
|
export * from './PlaySearchStatus';
|
|
149
|
+
export * from './PlaySearchType';
|
|
149
150
|
export * from './PlaySpot';
|
|
150
151
|
export * from './PlaySpotAvailabilityDetail';
|
|
151
152
|
export * from './PlaySpotDateSummary';
|