@jugarhoy/api 1.1.27 → 1.1.29

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,259 @@
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
+ ServiceType,
19
+ ServiceTypeDto,
20
+ } from '../models/index';
21
+ import {
22
+ ServiceTypeFromJSON,
23
+ ServiceTypeToJSON,
24
+ ServiceTypeDtoFromJSON,
25
+ ServiceTypeDtoToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface CreateServiceTypeRequest {
29
+ serviceTypeDto: ServiceTypeDto;
30
+ }
31
+
32
+ export interface DeleteServiceTypeRequest {
33
+ id: string;
34
+ }
35
+
36
+ export interface GetServiceTypeRequest {
37
+ id: string;
38
+ }
39
+
40
+ export interface UpdateServiceTypeRequest {
41
+ id: string;
42
+ serviceTypeDto: ServiceTypeDto;
43
+ }
44
+
45
+ /**
46
+ *
47
+ */
48
+ export class AdminServiceTypesApi extends runtime.BaseAPI {
49
+
50
+ /**
51
+ * Create a new service type
52
+ */
53
+ async createServiceTypeRaw(requestParameters: CreateServiceTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServiceType>> {
54
+ if (requestParameters['serviceTypeDto'] == null) {
55
+ throw new runtime.RequiredError(
56
+ 'serviceTypeDto',
57
+ 'Required parameter "serviceTypeDto" was null or undefined when calling createServiceType().'
58
+ );
59
+ }
60
+
61
+ const queryParameters: any = {};
62
+
63
+ const headerParameters: runtime.HTTPHeaders = {};
64
+
65
+ headerParameters['Content-Type'] = 'application/json';
66
+
67
+ if (this.configuration && this.configuration.accessToken) {
68
+ const token = this.configuration.accessToken;
69
+ const tokenString = await token("bearerAuth", []);
70
+
71
+ if (tokenString) {
72
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
73
+ }
74
+ }
75
+ const response = await this.request({
76
+ path: `/api/admin/service-types`,
77
+ method: 'POST',
78
+ headers: headerParameters,
79
+ query: queryParameters,
80
+ body: ServiceTypeDtoToJSON(requestParameters['serviceTypeDto']),
81
+ }, initOverrides);
82
+
83
+ return new runtime.JSONApiResponse(response, (jsonValue) => ServiceTypeFromJSON(jsonValue));
84
+ }
85
+
86
+ /**
87
+ * Create a new service type
88
+ */
89
+ async createServiceType(requestParameters: CreateServiceTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServiceType> {
90
+ const response = await this.createServiceTypeRaw(requestParameters, initOverrides);
91
+ return await response.value();
92
+ }
93
+
94
+ /**
95
+ * Delete a service type
96
+ */
97
+ async deleteServiceTypeRaw(requestParameters: DeleteServiceTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
98
+ if (requestParameters['id'] == null) {
99
+ throw new runtime.RequiredError(
100
+ 'id',
101
+ 'Required parameter "id" was null or undefined when calling deleteServiceType().'
102
+ );
103
+ }
104
+
105
+ const queryParameters: any = {};
106
+
107
+ const headerParameters: runtime.HTTPHeaders = {};
108
+
109
+ if (this.configuration && this.configuration.accessToken) {
110
+ const token = this.configuration.accessToken;
111
+ const tokenString = await token("bearerAuth", []);
112
+
113
+ if (tokenString) {
114
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
115
+ }
116
+ }
117
+ const response = await this.request({
118
+ path: `/api/admin/service-types/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
119
+ method: 'DELETE',
120
+ headers: headerParameters,
121
+ query: queryParameters,
122
+ }, initOverrides);
123
+
124
+ return new runtime.VoidApiResponse(response);
125
+ }
126
+
127
+ /**
128
+ * Delete a service type
129
+ */
130
+ async deleteServiceType(requestParameters: DeleteServiceTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
131
+ await this.deleteServiceTypeRaw(requestParameters, initOverrides);
132
+ }
133
+
134
+ /**
135
+ * Get a service type by ID
136
+ */
137
+ async getServiceTypeRaw(requestParameters: GetServiceTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServiceType>> {
138
+ if (requestParameters['id'] == null) {
139
+ throw new runtime.RequiredError(
140
+ 'id',
141
+ 'Required parameter "id" was null or undefined when calling getServiceType().'
142
+ );
143
+ }
144
+
145
+ const queryParameters: any = {};
146
+
147
+ const headerParameters: runtime.HTTPHeaders = {};
148
+
149
+ if (this.configuration && this.configuration.accessToken) {
150
+ const token = this.configuration.accessToken;
151
+ const tokenString = await token("bearerAuth", []);
152
+
153
+ if (tokenString) {
154
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
155
+ }
156
+ }
157
+ const response = await this.request({
158
+ path: `/api/admin/service-types/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
159
+ method: 'GET',
160
+ headers: headerParameters,
161
+ query: queryParameters,
162
+ }, initOverrides);
163
+
164
+ return new runtime.JSONApiResponse(response, (jsonValue) => ServiceTypeFromJSON(jsonValue));
165
+ }
166
+
167
+ /**
168
+ * Get a service type by ID
169
+ */
170
+ async getServiceType(requestParameters: GetServiceTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServiceType> {
171
+ const response = await this.getServiceTypeRaw(requestParameters, initOverrides);
172
+ return await response.value();
173
+ }
174
+
175
+ /**
176
+ * List service types for the current customer
177
+ */
178
+ async listServiceTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ServiceType>>> {
179
+ const queryParameters: any = {};
180
+
181
+ const headerParameters: runtime.HTTPHeaders = {};
182
+
183
+ if (this.configuration && this.configuration.accessToken) {
184
+ const token = this.configuration.accessToken;
185
+ const tokenString = await token("bearerAuth", []);
186
+
187
+ if (tokenString) {
188
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
189
+ }
190
+ }
191
+ const response = await this.request({
192
+ path: `/api/admin/service-types`,
193
+ method: 'GET',
194
+ headers: headerParameters,
195
+ query: queryParameters,
196
+ }, initOverrides);
197
+
198
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceTypeFromJSON));
199
+ }
200
+
201
+ /**
202
+ * List service types for the current customer
203
+ */
204
+ async listServiceTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ServiceType>> {
205
+ const response = await this.listServiceTypesRaw(initOverrides);
206
+ return await response.value();
207
+ }
208
+
209
+ /**
210
+ * Update a service type
211
+ */
212
+ async updateServiceTypeRaw(requestParameters: UpdateServiceTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
213
+ if (requestParameters['id'] == null) {
214
+ throw new runtime.RequiredError(
215
+ 'id',
216
+ 'Required parameter "id" was null or undefined when calling updateServiceType().'
217
+ );
218
+ }
219
+
220
+ if (requestParameters['serviceTypeDto'] == null) {
221
+ throw new runtime.RequiredError(
222
+ 'serviceTypeDto',
223
+ 'Required parameter "serviceTypeDto" was null or undefined when calling updateServiceType().'
224
+ );
225
+ }
226
+
227
+ const queryParameters: any = {};
228
+
229
+ const headerParameters: runtime.HTTPHeaders = {};
230
+
231
+ headerParameters['Content-Type'] = 'application/json';
232
+
233
+ if (this.configuration && this.configuration.accessToken) {
234
+ const token = this.configuration.accessToken;
235
+ const tokenString = await token("bearerAuth", []);
236
+
237
+ if (tokenString) {
238
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
239
+ }
240
+ }
241
+ const response = await this.request({
242
+ path: `/api/admin/service-types/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
243
+ method: 'PUT',
244
+ headers: headerParameters,
245
+ query: queryParameters,
246
+ body: ServiceTypeDtoToJSON(requestParameters['serviceTypeDto']),
247
+ }, initOverrides);
248
+
249
+ return new runtime.VoidApiResponse(response);
250
+ }
251
+
252
+ /**
253
+ * Update a service type
254
+ */
255
+ async updateServiceType(requestParameters: UpdateServiceTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
256
+ await this.updateServiceTypeRaw(requestParameters, initOverrides);
257
+ }
258
+
259
+ }
package/apis/ClubApi.ts CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ AppLocationItem,
18
19
  ClubMySubscriptionDto,
19
20
  ClubProfileDto,
20
21
  ClubSearchResponse,
@@ -27,8 +28,13 @@ import type {
27
28
  SearchClubs400Response,
28
29
  SearchClubs500Response,
29
30
  Sport,
31
+ UpdateAppLocationParams,
32
+ UpdateClubSettingsParams,
33
+ UpdateClubSettingsResponse,
30
34
  } from '../models/index';
31
35
  import {
36
+ AppLocationItemFromJSON,
37
+ AppLocationItemToJSON,
32
38
  ClubMySubscriptionDtoFromJSON,
33
39
  ClubMySubscriptionDtoToJSON,
34
40
  ClubProfileDtoFromJSON,
@@ -53,6 +59,12 @@ import {
53
59
  SearchClubs500ResponseToJSON,
54
60
  SportFromJSON,
55
61
  SportToJSON,
62
+ UpdateAppLocationParamsFromJSON,
63
+ UpdateAppLocationParamsToJSON,
64
+ UpdateClubSettingsParamsFromJSON,
65
+ UpdateClubSettingsParamsToJSON,
66
+ UpdateClubSettingsResponseFromJSON,
67
+ UpdateClubSettingsResponseToJSON,
56
68
  } from '../models/index';
57
69
 
58
70
  export interface ApiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPostRequest {
@@ -60,6 +72,11 @@ export interface ApiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPo
60
72
  subscriptionId: string;
61
73
  }
62
74
 
75
+ export interface GetClubLocationRequest {
76
+ clubCode: string;
77
+ locationId: string;
78
+ }
79
+
63
80
  export interface GetClubMySubscriptionsRequest {
64
81
  clubCode: string;
65
82
  }
@@ -68,6 +85,10 @@ export interface GetClubProfileRequest {
68
85
  clubCode: string;
69
86
  }
70
87
 
88
+ export interface ListClubLocationsRequest {
89
+ clubCode: string;
90
+ }
91
+
71
92
  export interface RegisterClubRequest {
72
93
  registerClubParams: RegisterClubParams;
73
94
  }
@@ -82,6 +103,17 @@ export interface SearchClubsRequest {
82
103
  size?: number;
83
104
  }
84
105
 
106
+ export interface UpdateClubLocationRequest {
107
+ clubCode: string;
108
+ locationId: string;
109
+ updateAppLocationParams: UpdateAppLocationParams;
110
+ }
111
+
112
+ export interface UpdateClubSettingsRequest {
113
+ clubCode: string;
114
+ updateClubSettingsParams: UpdateClubSettingsParams;
115
+ }
116
+
85
117
  /**
86
118
  *
87
119
  */
@@ -134,6 +166,54 @@ export class ClubApi extends runtime.BaseAPI {
134
166
  await this.apiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPostRaw(requestParameters, initOverrides);
135
167
  }
136
168
 
169
+ /**
170
+ * Get a single location with hours (club admin only)
171
+ */
172
+ async getClubLocationRaw(requestParameters: GetClubLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppLocationItem>> {
173
+ if (requestParameters['clubCode'] == null) {
174
+ throw new runtime.RequiredError(
175
+ 'clubCode',
176
+ 'Required parameter "clubCode" was null or undefined when calling getClubLocation().'
177
+ );
178
+ }
179
+
180
+ if (requestParameters['locationId'] == null) {
181
+ throw new runtime.RequiredError(
182
+ 'locationId',
183
+ 'Required parameter "locationId" was null or undefined when calling getClubLocation().'
184
+ );
185
+ }
186
+
187
+ const queryParameters: any = {};
188
+
189
+ const headerParameters: runtime.HTTPHeaders = {};
190
+
191
+ if (this.configuration && this.configuration.accessToken) {
192
+ const token = this.configuration.accessToken;
193
+ const tokenString = await token("bearerAuth", []);
194
+
195
+ if (tokenString) {
196
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
197
+ }
198
+ }
199
+ const response = await this.request({
200
+ path: `/api/club/{clubCode}/locations/{locationId}`.replace(`{${"clubCode"}}`, encodeURIComponent(String(requestParameters['clubCode']))).replace(`{${"locationId"}}`, encodeURIComponent(String(requestParameters['locationId']))),
201
+ method: 'GET',
202
+ headers: headerParameters,
203
+ query: queryParameters,
204
+ }, initOverrides);
205
+
206
+ return new runtime.JSONApiResponse(response, (jsonValue) => AppLocationItemFromJSON(jsonValue));
207
+ }
208
+
209
+ /**
210
+ * Get a single location with hours (club admin only)
211
+ */
212
+ async getClubLocation(requestParameters: GetClubLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppLocationItem> {
213
+ const response = await this.getClubLocationRaw(requestParameters, initOverrides);
214
+ return await response.value();
215
+ }
216
+
137
217
  /**
138
218
  * Get the authenticated user\'s active subscriptions in a club
139
219
  */
@@ -250,6 +330,47 @@ export class ClubApi extends runtime.BaseAPI {
250
330
  return await response.value();
251
331
  }
252
332
 
333
+ /**
334
+ * List locations for the club (club admin only)
335
+ */
336
+ async listClubLocationsRaw(requestParameters: ListClubLocationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AppLocationItem>>> {
337
+ if (requestParameters['clubCode'] == null) {
338
+ throw new runtime.RequiredError(
339
+ 'clubCode',
340
+ 'Required parameter "clubCode" was null or undefined when calling listClubLocations().'
341
+ );
342
+ }
343
+
344
+ const queryParameters: any = {};
345
+
346
+ const headerParameters: runtime.HTTPHeaders = {};
347
+
348
+ if (this.configuration && this.configuration.accessToken) {
349
+ const token = this.configuration.accessToken;
350
+ const tokenString = await token("bearerAuth", []);
351
+
352
+ if (tokenString) {
353
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
354
+ }
355
+ }
356
+ const response = await this.request({
357
+ path: `/api/club/{clubCode}/locations`.replace(`{${"clubCode"}}`, encodeURIComponent(String(requestParameters['clubCode']))),
358
+ method: 'GET',
359
+ headers: headerParameters,
360
+ query: queryParameters,
361
+ }, initOverrides);
362
+
363
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AppLocationItemFromJSON));
364
+ }
365
+
366
+ /**
367
+ * List locations for the club (club admin only)
368
+ */
369
+ async listClubLocations(requestParameters: ListClubLocationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AppLocationItem>> {
370
+ const response = await this.listClubLocationsRaw(requestParameters, initOverrides);
371
+ return await response.value();
372
+ }
373
+
253
374
  /**
254
375
  * Register a new club
255
376
  */
@@ -356,4 +477,113 @@ export class ClubApi extends runtime.BaseAPI {
356
477
  return await response.value();
357
478
  }
358
479
 
480
+ /**
481
+ * Update a location and its hours (club admin only)
482
+ */
483
+ async updateClubLocationRaw(requestParameters: UpdateClubLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppLocationItem>> {
484
+ if (requestParameters['clubCode'] == null) {
485
+ throw new runtime.RequiredError(
486
+ 'clubCode',
487
+ 'Required parameter "clubCode" was null or undefined when calling updateClubLocation().'
488
+ );
489
+ }
490
+
491
+ if (requestParameters['locationId'] == null) {
492
+ throw new runtime.RequiredError(
493
+ 'locationId',
494
+ 'Required parameter "locationId" was null or undefined when calling updateClubLocation().'
495
+ );
496
+ }
497
+
498
+ if (requestParameters['updateAppLocationParams'] == null) {
499
+ throw new runtime.RequiredError(
500
+ 'updateAppLocationParams',
501
+ 'Required parameter "updateAppLocationParams" was null or undefined when calling updateClubLocation().'
502
+ );
503
+ }
504
+
505
+ const queryParameters: any = {};
506
+
507
+ const headerParameters: runtime.HTTPHeaders = {};
508
+
509
+ headerParameters['Content-Type'] = 'application/json';
510
+
511
+ if (this.configuration && this.configuration.accessToken) {
512
+ const token = this.configuration.accessToken;
513
+ const tokenString = await token("bearerAuth", []);
514
+
515
+ if (tokenString) {
516
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
517
+ }
518
+ }
519
+ const response = await this.request({
520
+ path: `/api/club/{clubCode}/locations/{locationId}`.replace(`{${"clubCode"}}`, encodeURIComponent(String(requestParameters['clubCode']))).replace(`{${"locationId"}}`, encodeURIComponent(String(requestParameters['locationId']))),
521
+ method: 'PUT',
522
+ headers: headerParameters,
523
+ query: queryParameters,
524
+ body: UpdateAppLocationParamsToJSON(requestParameters['updateAppLocationParams']),
525
+ }, initOverrides);
526
+
527
+ return new runtime.JSONApiResponse(response, (jsonValue) => AppLocationItemFromJSON(jsonValue));
528
+ }
529
+
530
+ /**
531
+ * Update a location and its hours (club admin only)
532
+ */
533
+ async updateClubLocation(requestParameters: UpdateClubLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppLocationItem> {
534
+ const response = await this.updateClubLocationRaw(requestParameters, initOverrides);
535
+ return await response.value();
536
+ }
537
+
538
+ /**
539
+ * Update club settings (admin only)
540
+ */
541
+ async updateClubSettingsRaw(requestParameters: UpdateClubSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateClubSettingsResponse>> {
542
+ if (requestParameters['clubCode'] == null) {
543
+ throw new runtime.RequiredError(
544
+ 'clubCode',
545
+ 'Required parameter "clubCode" was null or undefined when calling updateClubSettings().'
546
+ );
547
+ }
548
+
549
+ if (requestParameters['updateClubSettingsParams'] == null) {
550
+ throw new runtime.RequiredError(
551
+ 'updateClubSettingsParams',
552
+ 'Required parameter "updateClubSettingsParams" was null or undefined when calling updateClubSettings().'
553
+ );
554
+ }
555
+
556
+ const queryParameters: any = {};
557
+
558
+ const headerParameters: runtime.HTTPHeaders = {};
559
+
560
+ headerParameters['Content-Type'] = 'application/json';
561
+
562
+ if (this.configuration && this.configuration.accessToken) {
563
+ const token = this.configuration.accessToken;
564
+ const tokenString = await token("bearerAuth", []);
565
+
566
+ if (tokenString) {
567
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
568
+ }
569
+ }
570
+ const response = await this.request({
571
+ path: `/api/club/{clubCode}/settings`.replace(`{${"clubCode"}}`, encodeURIComponent(String(requestParameters['clubCode']))),
572
+ method: 'PATCH',
573
+ headers: headerParameters,
574
+ query: queryParameters,
575
+ body: UpdateClubSettingsParamsToJSON(requestParameters['updateClubSettingsParams']),
576
+ }, initOverrides);
577
+
578
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateClubSettingsResponseFromJSON(jsonValue));
579
+ }
580
+
581
+ /**
582
+ * Update club settings (admin only)
583
+ */
584
+ async updateClubSettings(requestParameters: UpdateClubSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateClubSettingsResponse> {
585
+ const response = await this.updateClubSettingsRaw(requestParameters, initOverrides);
586
+ return await response.value();
587
+ }
588
+
359
589
  }
package/apis/index.ts CHANGED
@@ -13,6 +13,7 @@ export * from './AdminPlayPricesApi';
13
13
  export * from './AdminPlaySpotShiftsApi';
14
14
  export * from './AdminPlaySpotsApi';
15
15
  export * from './AdminReservationsApi';
16
+ export * from './AdminServiceTypesApi';
16
17
  export * from './AdminSubscriptionBillingApi';
17
18
  export * from './AdminSubscriptionsApi';
18
19
  export * from './AdminUsersApi';
@@ -0,0 +1,84 @@
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 AppLocationHourItem
20
+ */
21
+ export interface AppLocationHourItem {
22
+ /**
23
+ * Day key (monday|tuesday|wednesday|thursday|friday|saturday|sunday|holiday)
24
+ * @type {string}
25
+ * @memberof AppLocationHourItem
26
+ */
27
+ day: string;
28
+ /**
29
+ * Opening time in HH:mm format
30
+ * @type {string}
31
+ * @memberof AppLocationHourItem
32
+ */
33
+ open: string;
34
+ /**
35
+ * Closing time in HH:mm format
36
+ * @type {string}
37
+ * @memberof AppLocationHourItem
38
+ */
39
+ close: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the AppLocationHourItem interface.
44
+ */
45
+ export function instanceOfAppLocationHourItem(value: object): value is AppLocationHourItem {
46
+ if (!('day' in value) || value['day'] === undefined) return false;
47
+ if (!('open' in value) || value['open'] === undefined) return false;
48
+ if (!('close' in value) || value['close'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function AppLocationHourItemFromJSON(json: any): AppLocationHourItem {
53
+ return AppLocationHourItemFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function AppLocationHourItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppLocationHourItem {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'day': json['day'],
63
+ 'open': json['open'],
64
+ 'close': json['close'],
65
+ };
66
+ }
67
+
68
+ export function AppLocationHourItemToJSON(json: any): AppLocationHourItem {
69
+ return AppLocationHourItemToJSONTyped(json, false);
70
+ }
71
+
72
+ export function AppLocationHourItemToJSONTyped(value?: AppLocationHourItem | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'day': value['day'],
80
+ 'open': value['open'],
81
+ 'close': value['close'],
82
+ };
83
+ }
84
+