@jugarhoy/api 1.0.9 → 1.1.1

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.
@@ -0,0 +1,252 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { Sport } from './Sport';
17
+ import {
18
+ SportFromJSON,
19
+ SportFromJSONTyped,
20
+ SportToJSON,
21
+ SportToJSONTyped,
22
+ } from './Sport';
23
+ import type { PlaySearchStatus } from './PlaySearchStatus';
24
+ import {
25
+ PlaySearchStatusFromJSON,
26
+ PlaySearchStatusFromJSONTyped,
27
+ PlaySearchStatusToJSON,
28
+ PlaySearchStatusToJSONTyped,
29
+ } from './PlaySearchStatus';
30
+ import type { DominantSide } from './DominantSide';
31
+ import {
32
+ DominantSideFromJSON,
33
+ DominantSideFromJSONTyped,
34
+ DominantSideToJSON,
35
+ DominantSideToJSONTyped,
36
+ } from './DominantSide';
37
+
38
+ /**
39
+ *
40
+ * @export
41
+ * @interface PlaySearch
42
+ */
43
+ export interface PlaySearch {
44
+ /**
45
+ * Unique identifier for the search
46
+ * @type {string}
47
+ * @memberof PlaySearch
48
+ */
49
+ id: string;
50
+ /**
51
+ * ID of the user who created the search
52
+ * @type {string}
53
+ * @memberof PlaySearch
54
+ */
55
+ userId: string;
56
+ /**
57
+ * Reference to ClubPlace (Google Maps location)
58
+ * @type {string}
59
+ * @memberof PlaySearch
60
+ */
61
+ clubPlaceId: string;
62
+ /**
63
+ *
64
+ * @type {Sport}
65
+ * @memberof PlaySearch
66
+ */
67
+ sport: Sport;
68
+ /**
69
+ * When the match will happen
70
+ * @type {Date}
71
+ * @memberof PlaySearch
72
+ */
73
+ matchDateTime: Date;
74
+ /**
75
+ * Match duration in minutes
76
+ * @type {number}
77
+ * @memberof PlaySearch
78
+ */
79
+ duration: number;
80
+ /**
81
+ * Gender requirement (MALE, FEMALE, MIXED, ALL)
82
+ * @type {string}
83
+ * @memberof PlaySearch
84
+ */
85
+ gender?: string | null;
86
+ /**
87
+ * Skill level category (e.g., Intermedio, Avanzado)
88
+ * @type {string}
89
+ * @memberof PlaySearch
90
+ */
91
+ category?: string | null;
92
+ /**
93
+ *
94
+ * @type {DominantSide}
95
+ * @memberof PlaySearch
96
+ */
97
+ dominantSide?: DominantSide;
98
+ /**
99
+ * Maximum number of players needed
100
+ * @type {number}
101
+ * @memberof PlaySearch
102
+ */
103
+ quota: number;
104
+ /**
105
+ * Current number of PRIMARY registrations
106
+ * @type {number}
107
+ * @memberof PlaySearch
108
+ */
109
+ quotaFilledCount: number;
110
+ /**
111
+ * Last moment to register
112
+ * @type {Date}
113
+ * @memberof PlaySearch
114
+ */
115
+ registrationDeadline: Date;
116
+ /**
117
+ * Price per player
118
+ * @type {number}
119
+ * @memberof PlaySearch
120
+ */
121
+ price?: number | null;
122
+ /**
123
+ * Currency code
124
+ * @type {string}
125
+ * @memberof PlaySearch
126
+ */
127
+ currency?: string | null;
128
+ /**
129
+ * Payment method (CASH, TRANSFER, MERCADOPAGO)
130
+ * @type {string}
131
+ * @memberof PlaySearch
132
+ */
133
+ paymentMethod: string;
134
+ /**
135
+ * Additional notes from the creator
136
+ * @type {string}
137
+ * @memberof PlaySearch
138
+ */
139
+ notes?: string | null;
140
+ /**
141
+ *
142
+ * @type {PlaySearchStatus}
143
+ * @memberof PlaySearch
144
+ */
145
+ status: PlaySearchStatus;
146
+ /**
147
+ * Optional link to a reservation
148
+ * @type {string}
149
+ * @memberof PlaySearch
150
+ */
151
+ reserveId?: string | null;
152
+ /**
153
+ *
154
+ * @type {Date}
155
+ * @memberof PlaySearch
156
+ */
157
+ createdAt?: Date;
158
+ /**
159
+ *
160
+ * @type {Date}
161
+ * @memberof PlaySearch
162
+ */
163
+ updatedAt?: Date;
164
+ }
165
+
166
+
167
+
168
+ /**
169
+ * Check if a given object implements the PlaySearch interface.
170
+ */
171
+ export function instanceOfPlaySearch(value: object): value is PlaySearch {
172
+ if (!('id' in value) || value['id'] === undefined) return false;
173
+ if (!('userId' in value) || value['userId'] === undefined) return false;
174
+ if (!('clubPlaceId' in value) || value['clubPlaceId'] === undefined) return false;
175
+ if (!('sport' in value) || value['sport'] === undefined) return false;
176
+ if (!('matchDateTime' in value) || value['matchDateTime'] === undefined) return false;
177
+ if (!('duration' in value) || value['duration'] === undefined) return false;
178
+ if (!('quota' in value) || value['quota'] === undefined) return false;
179
+ if (!('quotaFilledCount' in value) || value['quotaFilledCount'] === undefined) return false;
180
+ if (!('registrationDeadline' in value) || value['registrationDeadline'] === undefined) return false;
181
+ if (!('paymentMethod' in value) || value['paymentMethod'] === undefined) return false;
182
+ if (!('status' in value) || value['status'] === undefined) return false;
183
+ return true;
184
+ }
185
+
186
+ export function PlaySearchFromJSON(json: any): PlaySearch {
187
+ return PlaySearchFromJSONTyped(json, false);
188
+ }
189
+
190
+ export function PlaySearchFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaySearch {
191
+ if (json == null) {
192
+ return json;
193
+ }
194
+ return {
195
+
196
+ 'id': json['id'],
197
+ 'userId': json['userId'],
198
+ 'clubPlaceId': json['clubPlaceId'],
199
+ 'sport': SportFromJSON(json['sport']),
200
+ 'matchDateTime': (new Date(json['matchDateTime'])),
201
+ 'duration': json['duration'],
202
+ 'gender': json['gender'] == null ? undefined : json['gender'],
203
+ 'category': json['category'] == null ? undefined : json['category'],
204
+ 'dominantSide': json['dominantSide'] == null ? undefined : DominantSideFromJSON(json['dominantSide']),
205
+ 'quota': json['quota'],
206
+ 'quotaFilledCount': json['quotaFilledCount'],
207
+ 'registrationDeadline': (new Date(json['registrationDeadline'])),
208
+ 'price': json['price'] == null ? undefined : json['price'],
209
+ 'currency': json['currency'] == null ? undefined : json['currency'],
210
+ 'paymentMethod': json['paymentMethod'],
211
+ 'notes': json['notes'] == null ? undefined : json['notes'],
212
+ 'status': PlaySearchStatusFromJSON(json['status']),
213
+ 'reserveId': json['reserveId'] == null ? undefined : json['reserveId'],
214
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
215
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
216
+ };
217
+ }
218
+
219
+ export function PlaySearchToJSON(json: any): PlaySearch {
220
+ return PlaySearchToJSONTyped(json, false);
221
+ }
222
+
223
+ export function PlaySearchToJSONTyped(value?: PlaySearch | null, ignoreDiscriminator: boolean = false): any {
224
+ if (value == null) {
225
+ return value;
226
+ }
227
+
228
+ return {
229
+
230
+ 'id': value['id'],
231
+ 'userId': value['userId'],
232
+ 'clubPlaceId': value['clubPlaceId'],
233
+ 'sport': SportToJSON(value['sport']),
234
+ 'matchDateTime': ((value['matchDateTime']).toISOString()),
235
+ 'duration': value['duration'],
236
+ 'gender': value['gender'],
237
+ 'category': value['category'],
238
+ 'dominantSide': DominantSideToJSON(value['dominantSide']),
239
+ 'quota': value['quota'],
240
+ 'quotaFilledCount': value['quotaFilledCount'],
241
+ 'registrationDeadline': ((value['registrationDeadline']).toISOString()),
242
+ 'price': value['price'],
243
+ 'currency': value['currency'],
244
+ 'paymentMethod': value['paymentMethod'],
245
+ 'notes': value['notes'],
246
+ 'status': PlaySearchStatusToJSON(value['status']),
247
+ 'reserveId': value['reserveId'],
248
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
249
+ 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
250
+ };
251
+ }
252
+
@@ -0,0 +1,266 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { Sport } from './Sport';
17
+ import {
18
+ SportFromJSON,
19
+ SportFromJSONTyped,
20
+ SportToJSON,
21
+ SportToJSONTyped,
22
+ } from './Sport';
23
+ import type { PlaySearchStatus } from './PlaySearchStatus';
24
+ import {
25
+ PlaySearchStatusFromJSON,
26
+ PlaySearchStatusFromJSONTyped,
27
+ PlaySearchStatusToJSON,
28
+ PlaySearchStatusToJSONTyped,
29
+ } from './PlaySearchStatus';
30
+ import type { DominantSide } from './DominantSide';
31
+ import {
32
+ DominantSideFromJSON,
33
+ DominantSideFromJSONTyped,
34
+ DominantSideToJSON,
35
+ DominantSideToJSONTyped,
36
+ } from './DominantSide';
37
+ import type { PlayRegistrationDTOUser } from './PlayRegistrationDTOUser';
38
+ import {
39
+ PlayRegistrationDTOUserFromJSON,
40
+ PlayRegistrationDTOUserFromJSONTyped,
41
+ PlayRegistrationDTOUserToJSON,
42
+ PlayRegistrationDTOUserToJSONTyped,
43
+ } from './PlayRegistrationDTOUser';
44
+ import type { PlaySearchDTOClubPlace } from './PlaySearchDTOClubPlace';
45
+ import {
46
+ PlaySearchDTOClubPlaceFromJSON,
47
+ PlaySearchDTOClubPlaceFromJSONTyped,
48
+ PlaySearchDTOClubPlaceToJSON,
49
+ PlaySearchDTOClubPlaceToJSONTyped,
50
+ } from './PlaySearchDTOClubPlace';
51
+
52
+ /**
53
+ *
54
+ * @export
55
+ * @interface PlaySearchDTO
56
+ */
57
+ export interface PlaySearchDTO {
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof PlaySearchDTO
62
+ */
63
+ id: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof PlaySearchDTO
68
+ */
69
+ userId: string;
70
+ /**
71
+ *
72
+ * @type {PlayRegistrationDTOUser}
73
+ * @memberof PlaySearchDTO
74
+ */
75
+ user?: PlayRegistrationDTOUser;
76
+ /**
77
+ *
78
+ * @type {PlaySearchDTOClubPlace}
79
+ * @memberof PlaySearchDTO
80
+ */
81
+ clubPlace: PlaySearchDTOClubPlace;
82
+ /**
83
+ *
84
+ * @type {Sport}
85
+ * @memberof PlaySearchDTO
86
+ */
87
+ sport: Sport;
88
+ /**
89
+ *
90
+ * @type {Date}
91
+ * @memberof PlaySearchDTO
92
+ */
93
+ matchDateTime: Date;
94
+ /**
95
+ *
96
+ * @type {number}
97
+ * @memberof PlaySearchDTO
98
+ */
99
+ duration: number;
100
+ /**
101
+ *
102
+ * @type {string}
103
+ * @memberof PlaySearchDTO
104
+ */
105
+ gender?: string | null;
106
+ /**
107
+ *
108
+ * @type {string}
109
+ * @memberof PlaySearchDTO
110
+ */
111
+ category?: string | null;
112
+ /**
113
+ *
114
+ * @type {DominantSide}
115
+ * @memberof PlaySearchDTO
116
+ */
117
+ dominantSide?: DominantSide;
118
+ /**
119
+ *
120
+ * @type {number}
121
+ * @memberof PlaySearchDTO
122
+ */
123
+ quota: number;
124
+ /**
125
+ *
126
+ * @type {number}
127
+ * @memberof PlaySearchDTO
128
+ */
129
+ quotaFilledCount: number;
130
+ /**
131
+ *
132
+ * @type {Date}
133
+ * @memberof PlaySearchDTO
134
+ */
135
+ registrationDeadline: Date;
136
+ /**
137
+ *
138
+ * @type {number}
139
+ * @memberof PlaySearchDTO
140
+ */
141
+ price?: number | null;
142
+ /**
143
+ *
144
+ * @type {string}
145
+ * @memberof PlaySearchDTO
146
+ */
147
+ currency?: string | null;
148
+ /**
149
+ *
150
+ * @type {string}
151
+ * @memberof PlaySearchDTO
152
+ */
153
+ paymentMethod: string;
154
+ /**
155
+ *
156
+ * @type {string}
157
+ * @memberof PlaySearchDTO
158
+ */
159
+ notes?: string | null;
160
+ /**
161
+ *
162
+ * @type {PlaySearchStatus}
163
+ * @memberof PlaySearchDTO
164
+ */
165
+ status: PlaySearchStatus;
166
+ /**
167
+ * Distance in meters (only present in nearby searches)
168
+ * @type {number}
169
+ * @memberof PlaySearchDTO
170
+ */
171
+ distance?: number | null;
172
+ /**
173
+ *
174
+ * @type {Date}
175
+ * @memberof PlaySearchDTO
176
+ */
177
+ createdAt?: Date;
178
+ }
179
+
180
+
181
+
182
+ /**
183
+ * Check if a given object implements the PlaySearchDTO interface.
184
+ */
185
+ export function instanceOfPlaySearchDTO(value: object): value is PlaySearchDTO {
186
+ if (!('id' in value) || value['id'] === undefined) return false;
187
+ if (!('userId' in value) || value['userId'] === undefined) return false;
188
+ if (!('clubPlace' in value) || value['clubPlace'] === undefined) return false;
189
+ if (!('sport' in value) || value['sport'] === undefined) return false;
190
+ if (!('matchDateTime' in value) || value['matchDateTime'] === undefined) return false;
191
+ if (!('duration' in value) || value['duration'] === undefined) return false;
192
+ if (!('quota' in value) || value['quota'] === undefined) return false;
193
+ if (!('quotaFilledCount' in value) || value['quotaFilledCount'] === undefined) return false;
194
+ if (!('registrationDeadline' in value) || value['registrationDeadline'] === undefined) return false;
195
+ if (!('paymentMethod' in value) || value['paymentMethod'] === undefined) return false;
196
+ if (!('status' in value) || value['status'] === undefined) return false;
197
+ return true;
198
+ }
199
+
200
+ export function PlaySearchDTOFromJSON(json: any): PlaySearchDTO {
201
+ return PlaySearchDTOFromJSONTyped(json, false);
202
+ }
203
+
204
+ export function PlaySearchDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaySearchDTO {
205
+ if (json == null) {
206
+ return json;
207
+ }
208
+ return {
209
+
210
+ 'id': json['id'],
211
+ 'userId': json['userId'],
212
+ 'user': json['user'] == null ? undefined : PlayRegistrationDTOUserFromJSON(json['user']),
213
+ 'clubPlace': PlaySearchDTOClubPlaceFromJSON(json['clubPlace']),
214
+ 'sport': SportFromJSON(json['sport']),
215
+ 'matchDateTime': (new Date(json['matchDateTime'])),
216
+ 'duration': json['duration'],
217
+ 'gender': json['gender'] == null ? undefined : json['gender'],
218
+ 'category': json['category'] == null ? undefined : json['category'],
219
+ 'dominantSide': json['dominantSide'] == null ? undefined : DominantSideFromJSON(json['dominantSide']),
220
+ 'quota': json['quota'],
221
+ 'quotaFilledCount': json['quotaFilledCount'],
222
+ 'registrationDeadline': (new Date(json['registrationDeadline'])),
223
+ 'price': json['price'] == null ? undefined : json['price'],
224
+ 'currency': json['currency'] == null ? undefined : json['currency'],
225
+ 'paymentMethod': json['paymentMethod'],
226
+ 'notes': json['notes'] == null ? undefined : json['notes'],
227
+ 'status': PlaySearchStatusFromJSON(json['status']),
228
+ 'distance': json['distance'] == null ? undefined : json['distance'],
229
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
230
+ };
231
+ }
232
+
233
+ export function PlaySearchDTOToJSON(json: any): PlaySearchDTO {
234
+ return PlaySearchDTOToJSONTyped(json, false);
235
+ }
236
+
237
+ export function PlaySearchDTOToJSONTyped(value?: PlaySearchDTO | null, ignoreDiscriminator: boolean = false): any {
238
+ if (value == null) {
239
+ return value;
240
+ }
241
+
242
+ return {
243
+
244
+ 'id': value['id'],
245
+ 'userId': value['userId'],
246
+ 'user': PlayRegistrationDTOUserToJSON(value['user']),
247
+ 'clubPlace': PlaySearchDTOClubPlaceToJSON(value['clubPlace']),
248
+ 'sport': SportToJSON(value['sport']),
249
+ 'matchDateTime': ((value['matchDateTime']).toISOString()),
250
+ 'duration': value['duration'],
251
+ 'gender': value['gender'],
252
+ 'category': value['category'],
253
+ 'dominantSide': DominantSideToJSON(value['dominantSide']),
254
+ 'quota': value['quota'],
255
+ 'quotaFilledCount': value['quotaFilledCount'],
256
+ 'registrationDeadline': ((value['registrationDeadline']).toISOString()),
257
+ 'price': value['price'],
258
+ 'currency': value['currency'],
259
+ 'paymentMethod': value['paymentMethod'],
260
+ 'notes': value['notes'],
261
+ 'status': PlaySearchStatusToJSON(value['status']),
262
+ 'distance': value['distance'],
263
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
264
+ };
265
+ }
266
+
@@ -0,0 +1,121 @@
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 PlaySearchDTOClubPlace
20
+ */
21
+ export interface PlaySearchDTOClubPlace {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof PlaySearchDTOClubPlace
26
+ */
27
+ id?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof PlaySearchDTOClubPlace
32
+ */
33
+ placeId?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof PlaySearchDTOClubPlace
38
+ */
39
+ name?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof PlaySearchDTOClubPlace
44
+ */
45
+ address?: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof PlaySearchDTOClubPlace
50
+ */
51
+ latitude?: number;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof PlaySearchDTOClubPlace
56
+ */
57
+ longitude?: number;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof PlaySearchDTOClubPlace
62
+ */
63
+ rating?: number | null;
64
+ /**
65
+ *
66
+ * @type {Array<string>}
67
+ * @memberof PlaySearchDTOClubPlace
68
+ */
69
+ photoUrls?: Array<string>;
70
+ }
71
+
72
+ /**
73
+ * Check if a given object implements the PlaySearchDTOClubPlace interface.
74
+ */
75
+ export function instanceOfPlaySearchDTOClubPlace(value: object): value is PlaySearchDTOClubPlace {
76
+ return true;
77
+ }
78
+
79
+ export function PlaySearchDTOClubPlaceFromJSON(json: any): PlaySearchDTOClubPlace {
80
+ return PlaySearchDTOClubPlaceFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function PlaySearchDTOClubPlaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaySearchDTOClubPlace {
84
+ if (json == null) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'id': json['id'] == null ? undefined : json['id'],
90
+ 'placeId': json['placeId'] == null ? undefined : json['placeId'],
91
+ 'name': json['name'] == null ? undefined : json['name'],
92
+ 'address': json['address'] == null ? undefined : json['address'],
93
+ 'latitude': json['latitude'] == null ? undefined : json['latitude'],
94
+ 'longitude': json['longitude'] == null ? undefined : json['longitude'],
95
+ 'rating': json['rating'] == null ? undefined : json['rating'],
96
+ 'photoUrls': json['photoUrls'] == null ? undefined : json['photoUrls'],
97
+ };
98
+ }
99
+
100
+ export function PlaySearchDTOClubPlaceToJSON(json: any): PlaySearchDTOClubPlace {
101
+ return PlaySearchDTOClubPlaceToJSONTyped(json, false);
102
+ }
103
+
104
+ export function PlaySearchDTOClubPlaceToJSONTyped(value?: PlaySearchDTOClubPlace | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'id': value['id'],
112
+ 'placeId': value['placeId'],
113
+ 'name': value['name'],
114
+ 'address': value['address'],
115
+ 'latitude': value['latitude'],
116
+ 'longitude': value['longitude'],
117
+ 'rating': value['rating'],
118
+ 'photoUrls': value['photoUrls'],
119
+ };
120
+ }
121
+