@jugarhoy/api 1.0.9 → 1.0.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.
@@ -0,0 +1,177 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ PlayRegistrationDTO,
19
+ PlayRegistrationListResponse,
20
+ RegistrationStatus,
21
+ } from '../models/index';
22
+ import {
23
+ PlayRegistrationDTOFromJSON,
24
+ PlayRegistrationDTOToJSON,
25
+ PlayRegistrationListResponseFromJSON,
26
+ PlayRegistrationListResponseToJSON,
27
+ RegistrationStatusFromJSON,
28
+ RegistrationStatusToJSON,
29
+ } from '../models/index';
30
+
31
+ export interface ApiAppPlayRegistrationsIdDeleteRequest {
32
+ id: string;
33
+ }
34
+
35
+ export interface ApiAppPlayRegistrationsMyRegistrationsGetRequest {
36
+ status?: RegistrationStatus;
37
+ page?: number;
38
+ size?: number;
39
+ }
40
+
41
+ export interface ApiAppPlayRegistrationsPlaySearchIdPostRequest {
42
+ playSearchId: string;
43
+ }
44
+
45
+ /**
46
+ *
47
+ */
48
+ export class AppPlayRegistrationApi extends runtime.BaseAPI {
49
+
50
+ /**
51
+ * Cancel registration
52
+ */
53
+ async apiAppPlayRegistrationsIdDeleteRaw(requestParameters: ApiAppPlayRegistrationsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
54
+ if (requestParameters['id'] == null) {
55
+ throw new runtime.RequiredError(
56
+ 'id',
57
+ 'Required parameter "id" was null or undefined when calling apiAppPlayRegistrationsIdDelete().'
58
+ );
59
+ }
60
+
61
+ const queryParameters: any = {};
62
+
63
+ const headerParameters: runtime.HTTPHeaders = {};
64
+
65
+ if (this.configuration && this.configuration.accessToken) {
66
+ const token = this.configuration.accessToken;
67
+ const tokenString = await token("bearerAuth", []);
68
+
69
+ if (tokenString) {
70
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
71
+ }
72
+ }
73
+ const response = await this.request({
74
+ path: `/api/app/play-registrations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
75
+ method: 'DELETE',
76
+ headers: headerParameters,
77
+ query: queryParameters,
78
+ }, initOverrides);
79
+
80
+ return new runtime.VoidApiResponse(response);
81
+ }
82
+
83
+ /**
84
+ * Cancel registration
85
+ */
86
+ async apiAppPlayRegistrationsIdDelete(requestParameters: ApiAppPlayRegistrationsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
87
+ await this.apiAppPlayRegistrationsIdDeleteRaw(requestParameters, initOverrides);
88
+ }
89
+
90
+ /**
91
+ * Get user\'s registrations
92
+ */
93
+ async apiAppPlayRegistrationsMyRegistrationsGetRaw(requestParameters: ApiAppPlayRegistrationsMyRegistrationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayRegistrationListResponse>> {
94
+ const queryParameters: any = {};
95
+
96
+ if (requestParameters['status'] != null) {
97
+ queryParameters['status'] = requestParameters['status'];
98
+ }
99
+
100
+ if (requestParameters['page'] != null) {
101
+ queryParameters['page'] = requestParameters['page'];
102
+ }
103
+
104
+ if (requestParameters['size'] != null) {
105
+ queryParameters['size'] = requestParameters['size'];
106
+ }
107
+
108
+ const headerParameters: runtime.HTTPHeaders = {};
109
+
110
+ if (this.configuration && this.configuration.accessToken) {
111
+ const token = this.configuration.accessToken;
112
+ const tokenString = await token("bearerAuth", []);
113
+
114
+ if (tokenString) {
115
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
116
+ }
117
+ }
118
+ const response = await this.request({
119
+ path: `/api/app/play-registrations/my-registrations`,
120
+ method: 'GET',
121
+ headers: headerParameters,
122
+ query: queryParameters,
123
+ }, initOverrides);
124
+
125
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlayRegistrationListResponseFromJSON(jsonValue));
126
+ }
127
+
128
+ /**
129
+ * Get user\'s registrations
130
+ */
131
+ async apiAppPlayRegistrationsMyRegistrationsGet(requestParameters: ApiAppPlayRegistrationsMyRegistrationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayRegistrationListResponse> {
132
+ const response = await this.apiAppPlayRegistrationsMyRegistrationsGetRaw(requestParameters, initOverrides);
133
+ return await response.value();
134
+ }
135
+
136
+ /**
137
+ * Register for a play search
138
+ */
139
+ async apiAppPlayRegistrationsPlaySearchIdPostRaw(requestParameters: ApiAppPlayRegistrationsPlaySearchIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlayRegistrationDTO>> {
140
+ if (requestParameters['playSearchId'] == null) {
141
+ throw new runtime.RequiredError(
142
+ 'playSearchId',
143
+ 'Required parameter "playSearchId" was null or undefined when calling apiAppPlayRegistrationsPlaySearchIdPost().'
144
+ );
145
+ }
146
+
147
+ const queryParameters: any = {};
148
+
149
+ const headerParameters: runtime.HTTPHeaders = {};
150
+
151
+ if (this.configuration && this.configuration.accessToken) {
152
+ const token = this.configuration.accessToken;
153
+ const tokenString = await token("bearerAuth", []);
154
+
155
+ if (tokenString) {
156
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
157
+ }
158
+ }
159
+ const response = await this.request({
160
+ path: `/api/app/play-registrations/{playSearchId}`.replace(`{${"playSearchId"}}`, encodeURIComponent(String(requestParameters['playSearchId']))),
161
+ method: 'POST',
162
+ headers: headerParameters,
163
+ query: queryParameters,
164
+ }, initOverrides);
165
+
166
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlayRegistrationDTOFromJSON(jsonValue));
167
+ }
168
+
169
+ /**
170
+ * Register for a play search
171
+ */
172
+ async apiAppPlayRegistrationsPlaySearchIdPost(requestParameters: ApiAppPlayRegistrationsPlaySearchIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlayRegistrationDTO> {
173
+ const response = await this.apiAppPlayRegistrationsPlaySearchIdPostRaw(requestParameters, initOverrides);
174
+ return await response.value();
175
+ }
176
+
177
+ }
@@ -0,0 +1,323 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ CreatePlaySearchRequest,
19
+ PlaySearchDTO,
20
+ PlaySearchDetailDTO,
21
+ PlaySearchListResponse,
22
+ PlaySearchStatus,
23
+ Sport,
24
+ } from '../models/index';
25
+ import {
26
+ CreatePlaySearchRequestFromJSON,
27
+ CreatePlaySearchRequestToJSON,
28
+ PlaySearchDTOFromJSON,
29
+ PlaySearchDTOToJSON,
30
+ PlaySearchDetailDTOFromJSON,
31
+ PlaySearchDetailDTOToJSON,
32
+ PlaySearchListResponseFromJSON,
33
+ PlaySearchListResponseToJSON,
34
+ PlaySearchStatusFromJSON,
35
+ PlaySearchStatusToJSON,
36
+ SportFromJSON,
37
+ SportToJSON,
38
+ } from '../models/index';
39
+
40
+ export interface ApiAppPlaySearchesGetRequest {
41
+ sport: Sport;
42
+ latitude?: number;
43
+ longitude?: number;
44
+ radiusMeters?: number;
45
+ gender?: string;
46
+ category?: string;
47
+ status?: string;
48
+ page?: number;
49
+ size?: number;
50
+ }
51
+
52
+ export interface ApiAppPlaySearchesIdCancelDeleteRequest {
53
+ id: string;
54
+ }
55
+
56
+ export interface ApiAppPlaySearchesIdGetRequest {
57
+ id: string;
58
+ }
59
+
60
+ export interface ApiAppPlaySearchesMySearchesGetRequest {
61
+ status?: PlaySearchStatus;
62
+ page?: number;
63
+ size?: number;
64
+ }
65
+
66
+ export interface ApiAppPlaySearchesPostRequest {
67
+ createPlaySearchRequest: CreatePlaySearchRequest;
68
+ }
69
+
70
+ /**
71
+ *
72
+ */
73
+ export class AppPlaySearchApi extends runtime.BaseAPI {
74
+
75
+ /**
76
+ * List play searches with filters (supports location-based search)
77
+ */
78
+ async apiAppPlaySearchesGetRaw(requestParameters: ApiAppPlaySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchListResponse>> {
79
+ if (requestParameters['sport'] == null) {
80
+ throw new runtime.RequiredError(
81
+ 'sport',
82
+ 'Required parameter "sport" was null or undefined when calling apiAppPlaySearchesGet().'
83
+ );
84
+ }
85
+
86
+ const queryParameters: any = {};
87
+
88
+ if (requestParameters['sport'] != null) {
89
+ queryParameters['sport'] = requestParameters['sport'];
90
+ }
91
+
92
+ if (requestParameters['latitude'] != null) {
93
+ queryParameters['latitude'] = requestParameters['latitude'];
94
+ }
95
+
96
+ if (requestParameters['longitude'] != null) {
97
+ queryParameters['longitude'] = requestParameters['longitude'];
98
+ }
99
+
100
+ if (requestParameters['radiusMeters'] != null) {
101
+ queryParameters['radiusMeters'] = requestParameters['radiusMeters'];
102
+ }
103
+
104
+ if (requestParameters['gender'] != null) {
105
+ queryParameters['gender'] = requestParameters['gender'];
106
+ }
107
+
108
+ if (requestParameters['category'] != null) {
109
+ queryParameters['category'] = requestParameters['category'];
110
+ }
111
+
112
+ if (requestParameters['status'] != null) {
113
+ queryParameters['status'] = requestParameters['status'];
114
+ }
115
+
116
+ if (requestParameters['page'] != null) {
117
+ queryParameters['page'] = requestParameters['page'];
118
+ }
119
+
120
+ if (requestParameters['size'] != null) {
121
+ queryParameters['size'] = requestParameters['size'];
122
+ }
123
+
124
+ const headerParameters: runtime.HTTPHeaders = {};
125
+
126
+ if (this.configuration && this.configuration.accessToken) {
127
+ const token = this.configuration.accessToken;
128
+ const tokenString = await token("bearerAuth", []);
129
+
130
+ if (tokenString) {
131
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
132
+ }
133
+ }
134
+ const response = await this.request({
135
+ path: `/api/app/play-searches`,
136
+ method: 'GET',
137
+ headers: headerParameters,
138
+ query: queryParameters,
139
+ }, initOverrides);
140
+
141
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchListResponseFromJSON(jsonValue));
142
+ }
143
+
144
+ /**
145
+ * List play searches with filters (supports location-based search)
146
+ */
147
+ async apiAppPlaySearchesGet(requestParameters: ApiAppPlaySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchListResponse> {
148
+ const response = await this.apiAppPlaySearchesGetRaw(requestParameters, initOverrides);
149
+ return await response.value();
150
+ }
151
+
152
+ /**
153
+ * Cancel own play search
154
+ */
155
+ async apiAppPlaySearchesIdCancelDeleteRaw(requestParameters: ApiAppPlaySearchesIdCancelDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
156
+ if (requestParameters['id'] == null) {
157
+ throw new runtime.RequiredError(
158
+ 'id',
159
+ 'Required parameter "id" was null or undefined when calling apiAppPlaySearchesIdCancelDelete().'
160
+ );
161
+ }
162
+
163
+ const queryParameters: any = {};
164
+
165
+ const headerParameters: runtime.HTTPHeaders = {};
166
+
167
+ if (this.configuration && this.configuration.accessToken) {
168
+ const token = this.configuration.accessToken;
169
+ const tokenString = await token("bearerAuth", []);
170
+
171
+ if (tokenString) {
172
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
173
+ }
174
+ }
175
+ const response = await this.request({
176
+ path: `/api/app/play-searches/{id}/cancel`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
177
+ method: 'DELETE',
178
+ headers: headerParameters,
179
+ query: queryParameters,
180
+ }, initOverrides);
181
+
182
+ return new runtime.VoidApiResponse(response);
183
+ }
184
+
185
+ /**
186
+ * Cancel own play search
187
+ */
188
+ async apiAppPlaySearchesIdCancelDelete(requestParameters: ApiAppPlaySearchesIdCancelDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
189
+ await this.apiAppPlaySearchesIdCancelDeleteRaw(requestParameters, initOverrides);
190
+ }
191
+
192
+ /**
193
+ * Get play search details with registrations
194
+ */
195
+ async apiAppPlaySearchesIdGetRaw(requestParameters: ApiAppPlaySearchesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDetailDTO>> {
196
+ if (requestParameters['id'] == null) {
197
+ throw new runtime.RequiredError(
198
+ 'id',
199
+ 'Required parameter "id" was null or undefined when calling apiAppPlaySearchesIdGet().'
200
+ );
201
+ }
202
+
203
+ const queryParameters: any = {};
204
+
205
+ const headerParameters: runtime.HTTPHeaders = {};
206
+
207
+ if (this.configuration && this.configuration.accessToken) {
208
+ const token = this.configuration.accessToken;
209
+ const tokenString = await token("bearerAuth", []);
210
+
211
+ if (tokenString) {
212
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
213
+ }
214
+ }
215
+ const response = await this.request({
216
+ path: `/api/app/play-searches/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
217
+ method: 'GET',
218
+ headers: headerParameters,
219
+ query: queryParameters,
220
+ }, initOverrides);
221
+
222
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDetailDTOFromJSON(jsonValue));
223
+ }
224
+
225
+ /**
226
+ * Get play search details with registrations
227
+ */
228
+ async apiAppPlaySearchesIdGet(requestParameters: ApiAppPlaySearchesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDetailDTO> {
229
+ const response = await this.apiAppPlaySearchesIdGetRaw(requestParameters, initOverrides);
230
+ return await response.value();
231
+ }
232
+
233
+ /**
234
+ * Get user\'s own play searches
235
+ */
236
+ async apiAppPlaySearchesMySearchesGetRaw(requestParameters: ApiAppPlaySearchesMySearchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchListResponse>> {
237
+ const queryParameters: any = {};
238
+
239
+ if (requestParameters['status'] != null) {
240
+ queryParameters['status'] = requestParameters['status'];
241
+ }
242
+
243
+ if (requestParameters['page'] != null) {
244
+ queryParameters['page'] = requestParameters['page'];
245
+ }
246
+
247
+ if (requestParameters['size'] != null) {
248
+ queryParameters['size'] = requestParameters['size'];
249
+ }
250
+
251
+ const headerParameters: runtime.HTTPHeaders = {};
252
+
253
+ if (this.configuration && this.configuration.accessToken) {
254
+ const token = this.configuration.accessToken;
255
+ const tokenString = await token("bearerAuth", []);
256
+
257
+ if (tokenString) {
258
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
259
+ }
260
+ }
261
+ const response = await this.request({
262
+ path: `/api/app/play-searches/my-searches`,
263
+ method: 'GET',
264
+ headers: headerParameters,
265
+ query: queryParameters,
266
+ }, initOverrides);
267
+
268
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchListResponseFromJSON(jsonValue));
269
+ }
270
+
271
+ /**
272
+ * Get user\'s own play searches
273
+ */
274
+ async apiAppPlaySearchesMySearchesGet(requestParameters: ApiAppPlaySearchesMySearchesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchListResponse> {
275
+ const response = await this.apiAppPlaySearchesMySearchesGetRaw(requestParameters, initOverrides);
276
+ return await response.value();
277
+ }
278
+
279
+ /**
280
+ * Create a new play search
281
+ */
282
+ async apiAppPlaySearchesPostRaw(requestParameters: ApiAppPlaySearchesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySearchDTO>> {
283
+ if (requestParameters['createPlaySearchRequest'] == null) {
284
+ throw new runtime.RequiredError(
285
+ 'createPlaySearchRequest',
286
+ 'Required parameter "createPlaySearchRequest" was null or undefined when calling apiAppPlaySearchesPost().'
287
+ );
288
+ }
289
+
290
+ const queryParameters: any = {};
291
+
292
+ const headerParameters: runtime.HTTPHeaders = {};
293
+
294
+ headerParameters['Content-Type'] = 'application/json';
295
+
296
+ if (this.configuration && this.configuration.accessToken) {
297
+ const token = this.configuration.accessToken;
298
+ const tokenString = await token("bearerAuth", []);
299
+
300
+ if (tokenString) {
301
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
302
+ }
303
+ }
304
+ const response = await this.request({
305
+ path: `/api/app/play-searches`,
306
+ method: 'POST',
307
+ headers: headerParameters,
308
+ query: queryParameters,
309
+ body: CreatePlaySearchRequestToJSON(requestParameters['createPlaySearchRequest']),
310
+ }, initOverrides);
311
+
312
+ return new runtime.JSONApiResponse(response, (jsonValue) => PlaySearchDTOFromJSON(jsonValue));
313
+ }
314
+
315
+ /**
316
+ * Create a new play search
317
+ */
318
+ async apiAppPlaySearchesPost(requestParameters: ApiAppPlaySearchesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySearchDTO> {
319
+ const response = await this.apiAppPlaySearchesPostRaw(requestParameters, initOverrides);
320
+ return await response.value();
321
+ }
322
+
323
+ }
package/apis/index.ts CHANGED
@@ -17,6 +17,8 @@ export * from './AdminSubscriptionBillingApi';
17
17
  export * from './AdminSubscriptionsApi';
18
18
  export * from './AdminUsersApi';
19
19
  export * from './AdminWhatsAppTemplatesApi';
20
+ export * from './AppPlayRegistrationApi';
21
+ export * from './AppPlaySearchApi';
20
22
  export * from './AuthApi';
21
23
  export * from './BackgroundApi';
22
24
  export * from './ClubApi';
@@ -0,0 +1,184 @@
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
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ClubPlace
28
+ */
29
+ export interface ClubPlace {
30
+ /**
31
+ * Unique identifier
32
+ * @type {string}
33
+ * @memberof ClubPlace
34
+ */
35
+ id: string;
36
+ /**
37
+ * Google Maps Place ID
38
+ * @type {string}
39
+ * @memberof ClubPlace
40
+ */
41
+ placeId: string;
42
+ /**
43
+ * Array of sports available at this club
44
+ * @type {Array<Sport>}
45
+ * @memberof ClubPlace
46
+ */
47
+ sports: Array<Sport>;
48
+ /**
49
+ * Name of the club/place
50
+ * @type {string}
51
+ * @memberof ClubPlace
52
+ */
53
+ name: string;
54
+ /**
55
+ * Formatted address from Google Maps
56
+ * @type {string}
57
+ * @memberof ClubPlace
58
+ */
59
+ address: string;
60
+ /**
61
+ *
62
+ * @type {number}
63
+ * @memberof ClubPlace
64
+ */
65
+ latitude: number;
66
+ /**
67
+ *
68
+ * @type {number}
69
+ * @memberof ClubPlace
70
+ */
71
+ longitude: number;
72
+ /**
73
+ * Phone number from Google Maps
74
+ * @type {string}
75
+ * @memberof ClubPlace
76
+ */
77
+ phone?: string | null;
78
+ /**
79
+ * Website from Google Maps
80
+ * @type {string}
81
+ * @memberof ClubPlace
82
+ */
83
+ website?: string | null;
84
+ /**
85
+ * Google Places types (e.g., ["gym", "establishment"])
86
+ * @type {Array<string>}
87
+ * @memberof ClubPlace
88
+ */
89
+ types?: Array<string>;
90
+ /**
91
+ * Google Maps rating
92
+ * @type {number}
93
+ * @memberof ClubPlace
94
+ */
95
+ rating?: number | null;
96
+ /**
97
+ * Photo URLs from Google Maps
98
+ * @type {Array<string>}
99
+ * @memberof ClubPlace
100
+ */
101
+ photoUrls?: Array<string>;
102
+ /**
103
+ *
104
+ * @type {Date}
105
+ * @memberof ClubPlace
106
+ */
107
+ createdAt?: Date;
108
+ /**
109
+ *
110
+ * @type {Date}
111
+ * @memberof ClubPlace
112
+ */
113
+ updatedAt?: Date;
114
+ }
115
+
116
+ /**
117
+ * Check if a given object implements the ClubPlace interface.
118
+ */
119
+ export function instanceOfClubPlace(value: object): value is ClubPlace {
120
+ if (!('id' in value) || value['id'] === undefined) return false;
121
+ if (!('placeId' in value) || value['placeId'] === undefined) return false;
122
+ if (!('sports' in value) || value['sports'] === undefined) return false;
123
+ if (!('name' in value) || value['name'] === undefined) return false;
124
+ if (!('address' in value) || value['address'] === undefined) return false;
125
+ if (!('latitude' in value) || value['latitude'] === undefined) return false;
126
+ if (!('longitude' in value) || value['longitude'] === undefined) return false;
127
+ return true;
128
+ }
129
+
130
+ export function ClubPlaceFromJSON(json: any): ClubPlace {
131
+ return ClubPlaceFromJSONTyped(json, false);
132
+ }
133
+
134
+ export function ClubPlaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClubPlace {
135
+ if (json == null) {
136
+ return json;
137
+ }
138
+ return {
139
+
140
+ 'id': json['id'],
141
+ 'placeId': json['placeId'],
142
+ 'sports': ((json['sports'] as Array<any>).map(SportFromJSON)),
143
+ 'name': json['name'],
144
+ 'address': json['address'],
145
+ 'latitude': json['latitude'],
146
+ 'longitude': json['longitude'],
147
+ 'phone': json['phone'] == null ? undefined : json['phone'],
148
+ 'website': json['website'] == null ? undefined : json['website'],
149
+ 'types': json['types'] == null ? undefined : json['types'],
150
+ 'rating': json['rating'] == null ? undefined : json['rating'],
151
+ 'photoUrls': json['photoUrls'] == null ? undefined : json['photoUrls'],
152
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
153
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
154
+ };
155
+ }
156
+
157
+ export function ClubPlaceToJSON(json: any): ClubPlace {
158
+ return ClubPlaceToJSONTyped(json, false);
159
+ }
160
+
161
+ export function ClubPlaceToJSONTyped(value?: ClubPlace | null, ignoreDiscriminator: boolean = false): any {
162
+ if (value == null) {
163
+ return value;
164
+ }
165
+
166
+ return {
167
+
168
+ 'id': value['id'],
169
+ 'placeId': value['placeId'],
170
+ 'sports': ((value['sports'] as Array<any>).map(SportToJSON)),
171
+ 'name': value['name'],
172
+ 'address': value['address'],
173
+ 'latitude': value['latitude'],
174
+ 'longitude': value['longitude'],
175
+ 'phone': value['phone'],
176
+ 'website': value['website'],
177
+ 'types': value['types'],
178
+ 'rating': value['rating'],
179
+ 'photoUrls': value['photoUrls'],
180
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
181
+ 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
182
+ };
183
+ }
184
+