@jugarhoy/api 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apis/AdminClubConfigApi.ts +294 -0
- package/apis/AdminClubsApi.ts +48 -0
- package/apis/AdminPlaySpotShiftsApi.ts +11 -3
- package/apis/AdminPlaySpotsApi.ts +11 -3
- package/apis/AdminReservationsApi.ts +5 -0
- package/apis/AdminWhatsAppTemplatesApi.ts +330 -0
- package/apis/AuthApi.ts +12 -12
- package/apis/DevicesApi.ts +52 -0
- package/apis/NotificationsApi.ts +167 -0
- package/apis/ReservesApi.ts +2 -10
- package/apis/index.ts +3 -0
- package/models/ApiAdminPlayPricesIdPutRequest.ts +6 -22
- package/models/ApiAdminPlayPricesPostRequest.ts +7 -23
- package/models/ApproveClubResponse.ts +83 -0
- package/models/ApproveClubResponseResult.ts +81 -0
- package/models/ComputedValueType.ts +59 -0
- package/models/CreateServiceConfigRequest.ts +152 -0
- package/models/CustomerServiceConfig.ts +168 -0
- package/models/CustomerServiceConfigDto.ts +180 -0
- package/models/HasDoorlock200Response.ts +65 -0
- package/models/MarkNotificationAsRead200Response.ts +65 -0
- package/models/Notification.ts +147 -0
- package/models/NotificationCategory.ts +58 -0
- package/models/NotificationChannelType.ts +55 -0
- package/models/NotificationDto.ts +139 -0
- package/models/NotificationListResponseDto.ts +89 -0
- package/models/NotificationTemplate.ts +146 -0
- package/models/NotificationTemplateDto.ts +155 -0
- package/models/NotificationType.ts +5 -5
- package/models/ParameterMapping.ts +161 -0
- package/models/ParameterValueType.ts +55 -0
- package/models/PlayPrice.ts +8 -25
- package/models/ProcessEmailMessageRequest.ts +41 -5
- package/models/ServiceType.ts +53 -0
- package/models/TestNotificationTemplate200Response.ts +73 -0
- package/models/TestNotificationTemplateRequest.ts +66 -0
- package/models/ToggleServiceConfigRequest.ts +66 -0
- package/models/UnreadCountResponseDto.ts +65 -0
- package/models/UpdateServiceConfigRequest.ts +125 -0
- package/models/UpsertNotificationTemplateRequest.ts +123 -0
- package/models/{UserNotification.ts → UserNotificationConfig.ts} +27 -27
- package/models/UserSession.ts +8 -0
- package/models/WhatsAppProvider.ts +54 -0
- package/models/index.ts +26 -2
- package/package.json +1 -1
- package/models/RequestPasswordReset200Response.ts +0 -65
package/apis/ReservesApi.ts
CHANGED
|
@@ -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';
|
|
@@ -22,6 +24,7 @@ export * from './DevicesApi';
|
|
|
22
24
|
export * from './HealthApi';
|
|
23
25
|
export * from './MercadoPagoApi';
|
|
24
26
|
export * from './MercadoPagoIPNApi';
|
|
27
|
+
export * from './NotificationsApi';
|
|
25
28
|
export * from './PlaySpotsApi';
|
|
26
29
|
export * from './ReservesApi';
|
|
27
30
|
export * from './UsersApi';
|
|
@@ -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
|
-
*
|
|
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
|
-
|
|
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
|
-
'
|
|
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
|
-
'
|
|
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
|
-
*
|
|
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
|
-
|
|
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 (!('
|
|
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
|
-
'
|
|
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
|
-
'
|
|
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
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
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 { Customer } from './Customer';
|
|
17
|
+
import {
|
|
18
|
+
CustomerFromJSON,
|
|
19
|
+
CustomerFromJSONTyped,
|
|
20
|
+
CustomerToJSON,
|
|
21
|
+
CustomerToJSONTyped,
|
|
22
|
+
} from './Customer';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ApproveClubResponseResult
|
|
28
|
+
*/
|
|
29
|
+
export interface ApproveClubResponseResult {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Customer}
|
|
33
|
+
* @memberof ApproveClubResponseResult
|
|
34
|
+
*/
|
|
35
|
+
customer?: Customer;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ApproveClubResponseResult
|
|
40
|
+
*/
|
|
41
|
+
message?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the ApproveClubResponseResult interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfApproveClubResponseResult(value: object): value is ApproveClubResponseResult {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ApproveClubResponseResultFromJSON(json: any): ApproveClubResponseResult {
|
|
52
|
+
return ApproveClubResponseResultFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ApproveClubResponseResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApproveClubResponseResult {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'customer': json['customer'] == null ? undefined : CustomerFromJSON(json['customer']),
|
|
62
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function ApproveClubResponseResultToJSON(json: any): ApproveClubResponseResult {
|
|
67
|
+
return ApproveClubResponseResultToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function ApproveClubResponseResultToJSONTyped(value?: ApproveClubResponseResult | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'customer': CustomerToJSON(value['customer']),
|
|
78
|
+
'message': value['message'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Jugar Hoy - API
|
|
5
|
+
* API documentation for Jugar Hoy application
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.5.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Represents the type of computed value from Reserve data
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const ComputedValueType = {
|
|
21
|
+
DateFormat: 'DATE_FORMAT',
|
|
22
|
+
TimeRange: 'TIME_RANGE',
|
|
23
|
+
PriceFormat: 'PRICE_FORMAT',
|
|
24
|
+
PhoneFormat: 'PHONE_FORMAT',
|
|
25
|
+
CustomerName: 'CUSTOMER_NAME',
|
|
26
|
+
LocationName: 'LOCATION_NAME',
|
|
27
|
+
SpotName: 'SPOT_NAME',
|
|
28
|
+
DurationMinutes: 'DURATION_MINUTES'
|
|
29
|
+
} as const;
|
|
30
|
+
export type ComputedValueType = typeof ComputedValueType[keyof typeof ComputedValueType];
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export function instanceOfComputedValueType(value: any): boolean {
|
|
34
|
+
for (const key in ComputedValueType) {
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(ComputedValueType, key)) {
|
|
36
|
+
if (ComputedValueType[key as keyof typeof ComputedValueType] === value) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ComputedValueTypeFromJSON(json: any): ComputedValueType {
|
|
45
|
+
return ComputedValueTypeFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ComputedValueTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComputedValueType {
|
|
49
|
+
return json as ComputedValueType;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ComputedValueTypeToJSON(value?: ComputedValueType | null): any {
|
|
53
|
+
return value as any;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ComputedValueTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ComputedValueType {
|
|
57
|
+
return value as ComputedValueType;
|
|
58
|
+
}
|
|
59
|
+
|
|
@@ -0,0 +1,152 @@
|
|
|
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 CreateServiceConfigRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateServiceConfigRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Customer ID
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateServiceConfigRequest
|
|
26
|
+
*/
|
|
27
|
+
customerId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Service type
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateServiceConfigRequest
|
|
32
|
+
*/
|
|
33
|
+
type: CreateServiceConfigRequestTypeEnum;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the service is enabled
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof CreateServiceConfigRequest
|
|
38
|
+
*/
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Service provider (for WhatsApp only)
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof CreateServiceConfigRequest
|
|
44
|
+
*/
|
|
45
|
+
provider?: CreateServiceConfigRequestProviderEnum;
|
|
46
|
+
/**
|
|
47
|
+
* WhatsApp Phone Number ID (for WhatsApp custom provider)
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof CreateServiceConfigRequest
|
|
50
|
+
*/
|
|
51
|
+
phoneNumberId?: string;
|
|
52
|
+
/**
|
|
53
|
+
* WhatsApp access token (for WhatsApp custom provider)
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof CreateServiceConfigRequest
|
|
56
|
+
*/
|
|
57
|
+
accessToken?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Tuya API host URL (for Tuya only)
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof CreateServiceConfigRequest
|
|
62
|
+
*/
|
|
63
|
+
host?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Tuya or WhatsApp access key
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof CreateServiceConfigRequest
|
|
68
|
+
*/
|
|
69
|
+
accessKey?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Tuya secret key (for Tuya only)
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof CreateServiceConfigRequest
|
|
74
|
+
*/
|
|
75
|
+
secretKey?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @export
|
|
81
|
+
*/
|
|
82
|
+
export const CreateServiceConfigRequestTypeEnum = {
|
|
83
|
+
Whatsapp: 'whatsapp',
|
|
84
|
+
Tuya: 'tuya'
|
|
85
|
+
} as const;
|
|
86
|
+
export type CreateServiceConfigRequestTypeEnum = typeof CreateServiceConfigRequestTypeEnum[keyof typeof CreateServiceConfigRequestTypeEnum];
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @export
|
|
90
|
+
*/
|
|
91
|
+
export const CreateServiceConfigRequestProviderEnum = {
|
|
92
|
+
None: 'none',
|
|
93
|
+
Jugarhoy: 'jugarhoy',
|
|
94
|
+
Custom: 'custom'
|
|
95
|
+
} as const;
|
|
96
|
+
export type CreateServiceConfigRequestProviderEnum = typeof CreateServiceConfigRequestProviderEnum[keyof typeof CreateServiceConfigRequestProviderEnum];
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Check if a given object implements the CreateServiceConfigRequest interface.
|
|
101
|
+
*/
|
|
102
|
+
export function instanceOfCreateServiceConfigRequest(value: object): value is CreateServiceConfigRequest {
|
|
103
|
+
if (!('customerId' in value) || value['customerId'] === undefined) return false;
|
|
104
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function CreateServiceConfigRequestFromJSON(json: any): CreateServiceConfigRequest {
|
|
109
|
+
return CreateServiceConfigRequestFromJSONTyped(json, false);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function CreateServiceConfigRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateServiceConfigRequest {
|
|
113
|
+
if (json == null) {
|
|
114
|
+
return json;
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
|
|
118
|
+
'customerId': json['customerId'],
|
|
119
|
+
'type': json['type'],
|
|
120
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
121
|
+
'provider': json['provider'] == null ? undefined : json['provider'],
|
|
122
|
+
'phoneNumberId': json['phoneNumberId'] == null ? undefined : json['phoneNumberId'],
|
|
123
|
+
'accessToken': json['accessToken'] == null ? undefined : json['accessToken'],
|
|
124
|
+
'host': json['host'] == null ? undefined : json['host'],
|
|
125
|
+
'accessKey': json['accessKey'] == null ? undefined : json['accessKey'],
|
|
126
|
+
'secretKey': json['secretKey'] == null ? undefined : json['secretKey'],
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function CreateServiceConfigRequestToJSON(json: any): CreateServiceConfigRequest {
|
|
131
|
+
return CreateServiceConfigRequestToJSONTyped(json, false);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function CreateServiceConfigRequestToJSONTyped(value?: CreateServiceConfigRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
135
|
+
if (value == null) {
|
|
136
|
+
return value;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return {
|
|
140
|
+
|
|
141
|
+
'customerId': value['customerId'],
|
|
142
|
+
'type': value['type'],
|
|
143
|
+
'enabled': value['enabled'],
|
|
144
|
+
'provider': value['provider'],
|
|
145
|
+
'phoneNumberId': value['phoneNumberId'],
|
|
146
|
+
'accessToken': value['accessToken'],
|
|
147
|
+
'host': value['host'],
|
|
148
|
+
'accessKey': value['accessKey'],
|
|
149
|
+
'secretKey': value['secretKey'],
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|