@jugarhoy/api 1.0.6 → 1.0.8

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.
Files changed (34) hide show
  1. package/apis/AdminClubConfigApi.ts +294 -0
  2. package/apis/AdminClubsApi.ts +48 -0
  3. package/apis/AdminPlaySpotShiftsApi.ts +11 -3
  4. package/apis/AdminPlaySpotsApi.ts +11 -3
  5. package/apis/AdminReservationsApi.ts +5 -0
  6. package/apis/AdminWhatsAppTemplatesApi.ts +330 -0
  7. package/apis/DevicesApi.ts +52 -0
  8. package/apis/ReservesApi.ts +2 -10
  9. package/apis/index.ts +2 -0
  10. package/models/ApiAdminPlayPricesIdPutRequest.ts +6 -22
  11. package/models/ApiAdminPlayPricesPostRequest.ts +7 -23
  12. package/models/ApproveClubResponse.ts +83 -0
  13. package/models/ApproveClubResponseResult.ts +81 -0
  14. package/models/ComputedValueType.ts +59 -0
  15. package/models/CreateServiceConfigRequest.ts +152 -0
  16. package/models/CustomerServiceConfig.ts +168 -0
  17. package/models/CustomerServiceConfigDto.ts +180 -0
  18. package/models/HasDoorlock200Response.ts +65 -0
  19. package/models/NotificationTemplate.ts +146 -0
  20. package/models/NotificationTemplateDto.ts +155 -0
  21. package/models/ParameterMapping.ts +161 -0
  22. package/models/ParameterValueType.ts +55 -0
  23. package/models/PlayPrice.ts +8 -25
  24. package/models/ProcessEmailMessageRequest.ts +41 -5
  25. package/models/ServiceType.ts +53 -0
  26. package/models/TestNotificationTemplate200Response.ts +73 -0
  27. package/models/TestNotificationTemplateRequest.ts +66 -0
  28. package/models/ToggleServiceConfigRequest.ts +66 -0
  29. package/models/UpdateServiceConfigRequest.ts +125 -0
  30. package/models/UpsertNotificationTemplateRequest.ts +123 -0
  31. package/models/UserSession.ts +8 -0
  32. package/models/WhatsAppProvider.ts +54 -0
  33. package/models/index.ts +18 -0
  34. package/package.json +1 -1
@@ -0,0 +1,330 @@
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
+ NotificationTemplateDto,
19
+ TestNotificationTemplate200Response,
20
+ TestNotificationTemplateRequest,
21
+ UpsertNotificationTemplateRequest,
22
+ } from '../models/index';
23
+ import {
24
+ NotificationTemplateDtoFromJSON,
25
+ NotificationTemplateDtoToJSON,
26
+ TestNotificationTemplate200ResponseFromJSON,
27
+ TestNotificationTemplate200ResponseToJSON,
28
+ TestNotificationTemplateRequestFromJSON,
29
+ TestNotificationTemplateRequestToJSON,
30
+ UpsertNotificationTemplateRequestFromJSON,
31
+ UpsertNotificationTemplateRequestToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface DeleteNotificationTemplateRequest {
35
+ templateId: string;
36
+ }
37
+
38
+ export interface GetNotificationTemplateRequest {
39
+ customerId: string;
40
+ type: GetNotificationTemplateTypeEnum;
41
+ }
42
+
43
+ export interface ListCustomerNotificationTemplatesRequest {
44
+ customerId: string;
45
+ }
46
+
47
+ export interface TestNotificationTemplateOperationRequest {
48
+ templateId: string;
49
+ testNotificationTemplateRequest: TestNotificationTemplateRequest;
50
+ }
51
+
52
+ export interface UpsertNotificationTemplateOperationRequest {
53
+ upsertNotificationTemplateRequest: UpsertNotificationTemplateRequest;
54
+ }
55
+
56
+ /**
57
+ *
58
+ */
59
+ export class AdminWhatsAppTemplatesApi extends runtime.BaseAPI {
60
+
61
+ /**
62
+ * Delete a notification template (superadmin only)
63
+ */
64
+ async deleteNotificationTemplateRaw(requestParameters: DeleteNotificationTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
65
+ if (requestParameters['templateId'] == null) {
66
+ throw new runtime.RequiredError(
67
+ 'templateId',
68
+ 'Required parameter "templateId" was null or undefined when calling deleteNotificationTemplate().'
69
+ );
70
+ }
71
+
72
+ const queryParameters: any = {};
73
+
74
+ const headerParameters: runtime.HTTPHeaders = {};
75
+
76
+ if (this.configuration && this.configuration.accessToken) {
77
+ const token = this.configuration.accessToken;
78
+ const tokenString = await token("bearerAuth", []);
79
+
80
+ if (tokenString) {
81
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
82
+ }
83
+ }
84
+ const response = await this.request({
85
+ path: `/api/admin/whatsapp/templates/{templateId}`.replace(`{${"templateId"}}`, encodeURIComponent(String(requestParameters['templateId']))),
86
+ method: 'DELETE',
87
+ headers: headerParameters,
88
+ query: queryParameters,
89
+ }, initOverrides);
90
+
91
+ return new runtime.VoidApiResponse(response);
92
+ }
93
+
94
+ /**
95
+ * Delete a notification template (superadmin only)
96
+ */
97
+ async deleteNotificationTemplate(requestParameters: DeleteNotificationTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
98
+ await this.deleteNotificationTemplateRaw(requestParameters, initOverrides);
99
+ }
100
+
101
+ /**
102
+ * Get a specific notification template
103
+ */
104
+ async getNotificationTemplateRaw(requestParameters: GetNotificationTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationTemplateDto>> {
105
+ if (requestParameters['customerId'] == null) {
106
+ throw new runtime.RequiredError(
107
+ 'customerId',
108
+ 'Required parameter "customerId" was null or undefined when calling getNotificationTemplate().'
109
+ );
110
+ }
111
+
112
+ if (requestParameters['type'] == null) {
113
+ throw new runtime.RequiredError(
114
+ 'type',
115
+ 'Required parameter "type" was null or undefined when calling getNotificationTemplate().'
116
+ );
117
+ }
118
+
119
+ const queryParameters: any = {};
120
+
121
+ const headerParameters: runtime.HTTPHeaders = {};
122
+
123
+ if (this.configuration && this.configuration.accessToken) {
124
+ const token = this.configuration.accessToken;
125
+ const tokenString = await token("bearerAuth", []);
126
+
127
+ if (tokenString) {
128
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
129
+ }
130
+ }
131
+ const response = await this.request({
132
+ path: `/api/admin/whatsapp/templates/{customerId}/{type}`.replace(`{${"customerId"}}`, encodeURIComponent(String(requestParameters['customerId']))).replace(`{${"type"}}`, encodeURIComponent(String(requestParameters['type']))),
133
+ method: 'GET',
134
+ headers: headerParameters,
135
+ query: queryParameters,
136
+ }, initOverrides);
137
+
138
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTemplateDtoFromJSON(jsonValue));
139
+ }
140
+
141
+ /**
142
+ * Get a specific notification template
143
+ */
144
+ async getNotificationTemplate(requestParameters: GetNotificationTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationTemplateDto> {
145
+ const response = await this.getNotificationTemplateRaw(requestParameters, initOverrides);
146
+ return await response.value();
147
+ }
148
+
149
+ /**
150
+ * List all notification templates (superadmin only)
151
+ */
152
+ async listAllNotificationTemplatesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<NotificationTemplateDto>>> {
153
+ const queryParameters: any = {};
154
+
155
+ const headerParameters: runtime.HTTPHeaders = {};
156
+
157
+ if (this.configuration && this.configuration.accessToken) {
158
+ const token = this.configuration.accessToken;
159
+ const tokenString = await token("bearerAuth", []);
160
+
161
+ if (tokenString) {
162
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
163
+ }
164
+ }
165
+ const response = await this.request({
166
+ path: `/api/admin/whatsapp/templates`,
167
+ method: 'GET',
168
+ headers: headerParameters,
169
+ query: queryParameters,
170
+ }, initOverrides);
171
+
172
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NotificationTemplateDtoFromJSON));
173
+ }
174
+
175
+ /**
176
+ * List all notification templates (superadmin only)
177
+ */
178
+ async listAllNotificationTemplates(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<NotificationTemplateDto>> {
179
+ const response = await this.listAllNotificationTemplatesRaw(initOverrides);
180
+ return await response.value();
181
+ }
182
+
183
+ /**
184
+ * List notification templates for a specific customer
185
+ */
186
+ async listCustomerNotificationTemplatesRaw(requestParameters: ListCustomerNotificationTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<NotificationTemplateDto>>> {
187
+ if (requestParameters['customerId'] == null) {
188
+ throw new runtime.RequiredError(
189
+ 'customerId',
190
+ 'Required parameter "customerId" was null or undefined when calling listCustomerNotificationTemplates().'
191
+ );
192
+ }
193
+
194
+ const queryParameters: any = {};
195
+
196
+ const headerParameters: runtime.HTTPHeaders = {};
197
+
198
+ if (this.configuration && this.configuration.accessToken) {
199
+ const token = this.configuration.accessToken;
200
+ const tokenString = await token("bearerAuth", []);
201
+
202
+ if (tokenString) {
203
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
204
+ }
205
+ }
206
+ const response = await this.request({
207
+ path: `/api/admin/whatsapp/templates/{customerId}`.replace(`{${"customerId"}}`, encodeURIComponent(String(requestParameters['customerId']))),
208
+ method: 'GET',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ }, initOverrides);
212
+
213
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NotificationTemplateDtoFromJSON));
214
+ }
215
+
216
+ /**
217
+ * List notification templates for a specific customer
218
+ */
219
+ async listCustomerNotificationTemplates(requestParameters: ListCustomerNotificationTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<NotificationTemplateDto>> {
220
+ const response = await this.listCustomerNotificationTemplatesRaw(requestParameters, initOverrides);
221
+ return await response.value();
222
+ }
223
+
224
+ /**
225
+ * Send a test WhatsApp message using a notification template (superadmin only)
226
+ */
227
+ async testNotificationTemplateRaw(requestParameters: TestNotificationTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestNotificationTemplate200Response>> {
228
+ if (requestParameters['templateId'] == null) {
229
+ throw new runtime.RequiredError(
230
+ 'templateId',
231
+ 'Required parameter "templateId" was null or undefined when calling testNotificationTemplate().'
232
+ );
233
+ }
234
+
235
+ if (requestParameters['testNotificationTemplateRequest'] == null) {
236
+ throw new runtime.RequiredError(
237
+ 'testNotificationTemplateRequest',
238
+ 'Required parameter "testNotificationTemplateRequest" was null or undefined when calling testNotificationTemplate().'
239
+ );
240
+ }
241
+
242
+ const queryParameters: any = {};
243
+
244
+ const headerParameters: runtime.HTTPHeaders = {};
245
+
246
+ headerParameters['Content-Type'] = 'application/json';
247
+
248
+ if (this.configuration && this.configuration.accessToken) {
249
+ const token = this.configuration.accessToken;
250
+ const tokenString = await token("bearerAuth", []);
251
+
252
+ if (tokenString) {
253
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
254
+ }
255
+ }
256
+ const response = await this.request({
257
+ path: `/api/admin/whatsapp/templates/{templateId}/test`.replace(`{${"templateId"}}`, encodeURIComponent(String(requestParameters['templateId']))),
258
+ method: 'POST',
259
+ headers: headerParameters,
260
+ query: queryParameters,
261
+ body: TestNotificationTemplateRequestToJSON(requestParameters['testNotificationTemplateRequest']),
262
+ }, initOverrides);
263
+
264
+ return new runtime.JSONApiResponse(response, (jsonValue) => TestNotificationTemplate200ResponseFromJSON(jsonValue));
265
+ }
266
+
267
+ /**
268
+ * Send a test WhatsApp message using a notification template (superadmin only)
269
+ */
270
+ async testNotificationTemplate(requestParameters: TestNotificationTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TestNotificationTemplate200Response> {
271
+ const response = await this.testNotificationTemplateRaw(requestParameters, initOverrides);
272
+ return await response.value();
273
+ }
274
+
275
+ /**
276
+ * Create or update a notification template (superadmin only)
277
+ */
278
+ async upsertNotificationTemplateRaw(requestParameters: UpsertNotificationTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationTemplateDto>> {
279
+ if (requestParameters['upsertNotificationTemplateRequest'] == null) {
280
+ throw new runtime.RequiredError(
281
+ 'upsertNotificationTemplateRequest',
282
+ 'Required parameter "upsertNotificationTemplateRequest" was null or undefined when calling upsertNotificationTemplate().'
283
+ );
284
+ }
285
+
286
+ const queryParameters: any = {};
287
+
288
+ const headerParameters: runtime.HTTPHeaders = {};
289
+
290
+ headerParameters['Content-Type'] = 'application/json';
291
+
292
+ if (this.configuration && this.configuration.accessToken) {
293
+ const token = this.configuration.accessToken;
294
+ const tokenString = await token("bearerAuth", []);
295
+
296
+ if (tokenString) {
297
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
298
+ }
299
+ }
300
+ const response = await this.request({
301
+ path: `/api/admin/whatsapp/templates`,
302
+ method: 'POST',
303
+ headers: headerParameters,
304
+ query: queryParameters,
305
+ body: UpsertNotificationTemplateRequestToJSON(requestParameters['upsertNotificationTemplateRequest']),
306
+ }, initOverrides);
307
+
308
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTemplateDtoFromJSON(jsonValue));
309
+ }
310
+
311
+ /**
312
+ * Create or update a notification template (superadmin only)
313
+ */
314
+ async upsertNotificationTemplate(requestParameters: UpsertNotificationTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationTemplateDto> {
315
+ const response = await this.upsertNotificationTemplateRaw(requestParameters, initOverrides);
316
+ return await response.value();
317
+ }
318
+
319
+ }
320
+
321
+ /**
322
+ * @export
323
+ */
324
+ export const GetNotificationTemplateTypeEnum = {
325
+ Reserve: 'RESERVE',
326
+ Cancellation: 'CANCELLATION',
327
+ Reminder: 'REMINDER',
328
+ PaymentConfirmation: 'PAYMENT_CONFIRMATION'
329
+ } as const;
330
+ export type GetNotificationTemplateTypeEnum = typeof GetNotificationTemplateTypeEnum[keyof typeof GetNotificationTemplateTypeEnum];
@@ -16,11 +16,14 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  GenerateCode500Response,
19
+ HasDoorlock200Response,
19
20
  ReservationAccessCodeResponse,
20
21
  } from '../models/index';
21
22
  import {
22
23
  GenerateCode500ResponseFromJSON,
23
24
  GenerateCode500ResponseToJSON,
25
+ HasDoorlock200ResponseFromJSON,
26
+ HasDoorlock200ResponseToJSON,
24
27
  ReservationAccessCodeResponseFromJSON,
25
28
  ReservationAccessCodeResponseToJSON,
26
29
  } from '../models/index';
@@ -34,6 +37,10 @@ export interface GetCodeRequest {
34
37
  t: string;
35
38
  }
36
39
 
40
+ export interface HasDoorlockRequest {
41
+ locationId: string;
42
+ }
43
+
37
44
  /**
38
45
  *
39
46
  */
@@ -133,4 +140,49 @@ export class DevicesApi extends runtime.BaseAPI {
133
140
  return await response.value();
134
141
  }
135
142
 
143
+ /**
144
+ * Check if a location has a doorlock device
145
+ */
146
+ async hasDoorlockRaw(requestParameters: HasDoorlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HasDoorlock200Response>> {
147
+ if (requestParameters['locationId'] == null) {
148
+ throw new runtime.RequiredError(
149
+ 'locationId',
150
+ 'Required parameter "locationId" was null or undefined when calling hasDoorlock().'
151
+ );
152
+ }
153
+
154
+ const queryParameters: any = {};
155
+
156
+ if (requestParameters['locationId'] != null) {
157
+ queryParameters['locationId'] = requestParameters['locationId'];
158
+ }
159
+
160
+ const headerParameters: runtime.HTTPHeaders = {};
161
+
162
+ if (this.configuration && this.configuration.accessToken) {
163
+ const token = this.configuration.accessToken;
164
+ const tokenString = await token("bearerAuth", []);
165
+
166
+ if (tokenString) {
167
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
168
+ }
169
+ }
170
+ const response = await this.request({
171
+ path: `/api/devices/has-doorlock`,
172
+ method: 'GET',
173
+ headers: headerParameters,
174
+ query: queryParameters,
175
+ }, initOverrides);
176
+
177
+ return new runtime.JSONApiResponse(response, (jsonValue) => HasDoorlock200ResponseFromJSON(jsonValue));
178
+ }
179
+
180
+ /**
181
+ * Check if a location has a doorlock device
182
+ */
183
+ async hasDoorlock(requestParameters: HasDoorlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HasDoorlock200Response> {
184
+ const response = await this.hasDoorlockRaw(requestParameters, initOverrides);
185
+ return await response.value();
186
+ }
187
+
136
188
  }
@@ -320,7 +320,7 @@ export class ReservesApi extends runtime.BaseAPI {
320
320
  }
321
321
 
322
322
  /**
323
- * Process an email message
323
+ * Process an email message from Gmail Apps Script
324
324
  */
325
325
  async processEmailMessageRaw(requestParameters: ProcessEmailMessageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Reserve>> {
326
326
  if (requestParameters['processEmailMessageRequest'] == null) {
@@ -336,14 +336,6 @@ export class ReservesApi extends runtime.BaseAPI {
336
336
 
337
337
  headerParameters['Content-Type'] = 'application/json';
338
338
 
339
- if (this.configuration && this.configuration.accessToken) {
340
- const token = this.configuration.accessToken;
341
- const tokenString = await token("bearerAuth", []);
342
-
343
- if (tokenString) {
344
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
345
- }
346
- }
347
339
  const response = await this.request({
348
340
  path: `/api/reservations/email-message`,
349
341
  method: 'POST',
@@ -356,7 +348,7 @@ export class ReservesApi extends runtime.BaseAPI {
356
348
  }
357
349
 
358
350
  /**
359
- * Process an email message
351
+ * Process an email message from Gmail Apps Script
360
352
  */
361
353
  async processEmailMessage(requestParameters: ProcessEmailMessageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Reserve> {
362
354
  const response = await this.processEmailMessageRaw(requestParameters, initOverrides);
package/apis/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './AdminClubConfigApi';
3
4
  export * from './AdminClubsApi';
4
5
  export * from './AdminCoachesApi';
5
6
  export * from './AdminCustomersApi';
@@ -15,6 +16,7 @@ export * from './AdminReservationsApi';
15
16
  export * from './AdminSubscriptionBillingApi';
16
17
  export * from './AdminSubscriptionsApi';
17
18
  export * from './AdminUsersApi';
19
+ export * from './AdminWhatsAppTemplatesApi';
18
20
  export * from './AuthApi';
19
21
  export * from './BackgroundApi';
20
22
  export * from './ClubApi';
@@ -13,14 +13,6 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { DayOfWeek } from './DayOfWeek';
17
- import {
18
- DayOfWeekFromJSON,
19
- DayOfWeekFromJSONTyped,
20
- DayOfWeekToJSON,
21
- DayOfWeekToJSONTyped,
22
- } from './DayOfWeek';
23
-
24
16
  /**
25
17
  *
26
18
  * @export
@@ -46,23 +38,17 @@ export interface ApiAdminPlayPricesIdPutRequest {
46
38
  */
47
39
  price?: number;
48
40
  /**
49
- * IDs of the play spots this price applies to
41
+ * IDs of the play spots this price applies to. Empty array means applies to all spots.
50
42
  * @type {Array<string>}
51
43
  * @memberof ApiAdminPlayPricesIdPutRequest
52
44
  */
53
45
  playSpotIds?: Array<string>;
54
46
  /**
55
- * Time from which the price applies in HH:MM format
56
- * @type {string}
57
- * @memberof ApiAdminPlayPricesIdPutRequest
58
- */
59
- hourFrom?: string;
60
- /**
61
- * Days of the week this price applies to
62
- * @type {Array<DayOfWeek>}
47
+ * IDs of the play spot shifts this price applies to. Can be empty array if shifts not configured yet.
48
+ * @type {Array<string>}
63
49
  * @memberof ApiAdminPlayPricesIdPutRequest
64
50
  */
65
- weekDays?: Array<DayOfWeek>;
51
+ playSpotShiftIds?: Array<string>;
66
52
  /**
67
53
  * Whether this price is for subscription-based access
68
54
  * @type {boolean}
@@ -109,8 +95,7 @@ export function ApiAdminPlayPricesIdPutRequestFromJSONTyped(json: any, ignoreDis
109
95
  'duration': json['duration'] == null ? undefined : json['duration'],
110
96
  'price': json['price'] == null ? undefined : json['price'],
111
97
  'playSpotIds': json['playSpotIds'] == null ? undefined : json['playSpotIds'],
112
- 'hourFrom': json['hourFrom'] == null ? undefined : json['hourFrom'],
113
- 'weekDays': json['weekDays'] == null ? undefined : ((json['weekDays'] as Array<any>).map(DayOfWeekFromJSON)),
98
+ 'playSpotShiftIds': json['playSpotShiftIds'] == null ? undefined : json['playSpotShiftIds'],
114
99
  'isSubscription': json['isSubscription'] == null ? undefined : json['isSubscription'],
115
100
  'chargeOn': json['chargeOn'] == null ? undefined : json['chargeOn'],
116
101
  };
@@ -131,8 +116,7 @@ export function ApiAdminPlayPricesIdPutRequestToJSONTyped(value?: ApiAdminPlayPr
131
116
  'duration': value['duration'],
132
117
  'price': value['price'],
133
118
  'playSpotIds': value['playSpotIds'],
134
- 'hourFrom': value['hourFrom'],
135
- 'weekDays': value['weekDays'] == null ? undefined : ((value['weekDays'] as Array<any>).map(DayOfWeekToJSON)),
119
+ 'playSpotShiftIds': value['playSpotShiftIds'],
136
120
  'isSubscription': value['isSubscription'],
137
121
  'chargeOn': value['chargeOn'],
138
122
  };
@@ -13,14 +13,6 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { DayOfWeek } from './DayOfWeek';
17
- import {
18
- DayOfWeekFromJSON,
19
- DayOfWeekFromJSONTyped,
20
- DayOfWeekToJSON,
21
- DayOfWeekToJSONTyped,
22
- } from './DayOfWeek';
23
-
24
16
  /**
25
17
  *
26
18
  * @export
@@ -46,23 +38,17 @@ export interface ApiAdminPlayPricesPostRequest {
46
38
  */
47
39
  price: number;
48
40
  /**
49
- * IDs of the play spots this price applies to
41
+ * IDs of the play spots this price applies to. Empty array means applies to all spots.
50
42
  * @type {Array<string>}
51
43
  * @memberof ApiAdminPlayPricesPostRequest
52
44
  */
53
45
  playSpotIds: Array<string>;
54
46
  /**
55
- * Time from which the price applies in HH:MM format (e.g., "09:15", "14:30")
56
- * @type {string}
57
- * @memberof ApiAdminPlayPricesPostRequest
58
- */
59
- hourFrom?: string;
60
- /**
61
- * Days of the week this price applies to
62
- * @type {Array<DayOfWeek>}
47
+ * IDs of the play spot shifts this price applies to. Can be empty array if shifts not configured yet.
48
+ * @type {Array<string>}
63
49
  * @memberof ApiAdminPlayPricesPostRequest
64
50
  */
65
- weekDays: Array<DayOfWeek>;
51
+ playSpotShiftIds: Array<string>;
66
52
  /**
67
53
  * Whether this price is for subscription-based access
68
54
  * @type {boolean}
@@ -96,7 +82,7 @@ export function instanceOfApiAdminPlayPricesPostRequest(value: object): value is
96
82
  if (!('duration' in value) || value['duration'] === undefined) return false;
97
83
  if (!('price' in value) || value['price'] === undefined) return false;
98
84
  if (!('playSpotIds' in value) || value['playSpotIds'] === undefined) return false;
99
- if (!('weekDays' in value) || value['weekDays'] === undefined) return false;
85
+ if (!('playSpotShiftIds' in value) || value['playSpotShiftIds'] === undefined) return false;
100
86
  if (!('isSubscription' in value) || value['isSubscription'] === undefined) return false;
101
87
  return true;
102
88
  }
@@ -115,8 +101,7 @@ export function ApiAdminPlayPricesPostRequestFromJSONTyped(json: any, ignoreDisc
115
101
  'duration': json['duration'],
116
102
  'price': json['price'],
117
103
  'playSpotIds': json['playSpotIds'],
118
- 'hourFrom': json['hourFrom'] == null ? undefined : json['hourFrom'],
119
- 'weekDays': ((json['weekDays'] as Array<any>).map(DayOfWeekFromJSON)),
104
+ 'playSpotShiftIds': json['playSpotShiftIds'],
120
105
  'isSubscription': json['isSubscription'],
121
106
  'chargeOn': json['chargeOn'] == null ? undefined : json['chargeOn'],
122
107
  };
@@ -137,8 +122,7 @@ export function ApiAdminPlayPricesPostRequestToJSONTyped(value?: ApiAdminPlayPri
137
122
  'duration': value['duration'],
138
123
  'price': value['price'],
139
124
  'playSpotIds': value['playSpotIds'],
140
- 'hourFrom': value['hourFrom'],
141
- 'weekDays': ((value['weekDays'] as Array<any>).map(DayOfWeekToJSON)),
125
+ 'playSpotShiftIds': value['playSpotShiftIds'],
142
126
  'isSubscription': value['isSubscription'],
143
127
  'chargeOn': value['chargeOn'],
144
128
  };
@@ -0,0 +1,83 @@
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 { ApproveClubResponseResult } from './ApproveClubResponseResult';
17
+ import {
18
+ ApproveClubResponseResultFromJSON,
19
+ ApproveClubResponseResultFromJSONTyped,
20
+ ApproveClubResponseResultToJSON,
21
+ ApproveClubResponseResultToJSONTyped,
22
+ } from './ApproveClubResponseResult';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ApproveClubResponse
28
+ */
29
+ export interface ApproveClubResponse {
30
+ /**
31
+ * Whether the operation was successful
32
+ * @type {boolean}
33
+ * @memberof ApproveClubResponse
34
+ */
35
+ success: boolean;
36
+ /**
37
+ *
38
+ * @type {ApproveClubResponseResult}
39
+ * @memberof ApproveClubResponse
40
+ */
41
+ result: ApproveClubResponseResult;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the ApproveClubResponse interface.
46
+ */
47
+ export function instanceOfApproveClubResponse(value: object): value is ApproveClubResponse {
48
+ if (!('success' in value) || value['success'] === undefined) return false;
49
+ if (!('result' in value) || value['result'] === undefined) return false;
50
+ return true;
51
+ }
52
+
53
+ export function ApproveClubResponseFromJSON(json: any): ApproveClubResponse {
54
+ return ApproveClubResponseFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function ApproveClubResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApproveClubResponse {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'success': json['success'],
64
+ 'result': ApproveClubResponseResultFromJSON(json['result']),
65
+ };
66
+ }
67
+
68
+ export function ApproveClubResponseToJSON(json: any): ApproveClubResponse {
69
+ return ApproveClubResponseToJSONTyped(json, false);
70
+ }
71
+
72
+ export function ApproveClubResponseToJSONTyped(value?: ApproveClubResponse | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'success': value['success'],
80
+ 'result': ApproveClubResponseResultToJSON(value['result']),
81
+ };
82
+ }
83
+