@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
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
* Types of notification channels that can be enabled/disabled
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const NotificationChannelType = {
|
|
21
|
+
Whatsapp: 'WHATSAPP',
|
|
22
|
+
PushWeb: 'PUSH_WEB',
|
|
23
|
+
PushNative: 'PUSH_NATIVE',
|
|
24
|
+
Email: 'EMAIL'
|
|
25
|
+
} as const;
|
|
26
|
+
export type NotificationChannelType = typeof NotificationChannelType[keyof typeof NotificationChannelType];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfNotificationChannelType(value: any): boolean {
|
|
30
|
+
for (const key in NotificationChannelType) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(NotificationChannelType, key)) {
|
|
32
|
+
if (NotificationChannelType[key as keyof typeof NotificationChannelType] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function NotificationChannelTypeFromJSON(json: any): NotificationChannelType {
|
|
41
|
+
return NotificationChannelTypeFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function NotificationChannelTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationChannelType {
|
|
45
|
+
return json as NotificationChannelType;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function NotificationChannelTypeToJSON(value?: NotificationChannelType | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function NotificationChannelTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): NotificationChannelType {
|
|
53
|
+
return value as NotificationChannelType;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,139 @@
|
|
|
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 { NotificationCategory } from './NotificationCategory';
|
|
17
|
+
import {
|
|
18
|
+
NotificationCategoryFromJSON,
|
|
19
|
+
NotificationCategoryFromJSONTyped,
|
|
20
|
+
NotificationCategoryToJSON,
|
|
21
|
+
NotificationCategoryToJSONTyped,
|
|
22
|
+
} from './NotificationCategory';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface NotificationDto
|
|
28
|
+
*/
|
|
29
|
+
export interface NotificationDto {
|
|
30
|
+
/**
|
|
31
|
+
* Unique identifier for the notification
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof NotificationDto
|
|
34
|
+
*/
|
|
35
|
+
id?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {NotificationCategory}
|
|
39
|
+
* @memberof NotificationDto
|
|
40
|
+
*/
|
|
41
|
+
type?: NotificationCategory;
|
|
42
|
+
/**
|
|
43
|
+
* Notification title (Spanish)
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof NotificationDto
|
|
46
|
+
*/
|
|
47
|
+
title?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Notification message body (Spanish)
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof NotificationDto
|
|
52
|
+
*/
|
|
53
|
+
message?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the user has read this notification
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof NotificationDto
|
|
58
|
+
*/
|
|
59
|
+
read?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Optional ID of related entity for deep linking
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof NotificationDto
|
|
64
|
+
*/
|
|
65
|
+
relatedId?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* Optional JSON object with additional data
|
|
68
|
+
* @type {{ [key: string]: any; }}
|
|
69
|
+
* @memberof NotificationDto
|
|
70
|
+
*/
|
|
71
|
+
metadata?: { [key: string]: any; } | null;
|
|
72
|
+
/**
|
|
73
|
+
* When the notification was created
|
|
74
|
+
* @type {Date}
|
|
75
|
+
* @memberof NotificationDto
|
|
76
|
+
*/
|
|
77
|
+
createdAt?: Date;
|
|
78
|
+
/**
|
|
79
|
+
* When the notification was last updated
|
|
80
|
+
* @type {Date}
|
|
81
|
+
* @memberof NotificationDto
|
|
82
|
+
*/
|
|
83
|
+
updatedAt?: Date;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Check if a given object implements the NotificationDto interface.
|
|
90
|
+
*/
|
|
91
|
+
export function instanceOfNotificationDto(value: object): value is NotificationDto {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function NotificationDtoFromJSON(json: any): NotificationDto {
|
|
96
|
+
return NotificationDtoFromJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function NotificationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationDto {
|
|
100
|
+
if (json == null) {
|
|
101
|
+
return json;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
106
|
+
'type': json['type'] == null ? undefined : NotificationCategoryFromJSON(json['type']),
|
|
107
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
108
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
109
|
+
'read': json['read'] == null ? undefined : json['read'],
|
|
110
|
+
'relatedId': json['relatedId'] == null ? undefined : json['relatedId'],
|
|
111
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
112
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
113
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function NotificationDtoToJSON(json: any): NotificationDto {
|
|
118
|
+
return NotificationDtoToJSONTyped(json, false);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function NotificationDtoToJSONTyped(value?: NotificationDto | null, ignoreDiscriminator: boolean = false): any {
|
|
122
|
+
if (value == null) {
|
|
123
|
+
return value;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
|
|
128
|
+
'id': value['id'],
|
|
129
|
+
'type': NotificationCategoryToJSON(value['type']),
|
|
130
|
+
'title': value['title'],
|
|
131
|
+
'message': value['message'],
|
|
132
|
+
'read': value['read'],
|
|
133
|
+
'relatedId': value['relatedId'],
|
|
134
|
+
'metadata': value['metadata'],
|
|
135
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
136
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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 { NotificationDto } from './NotificationDto';
|
|
17
|
+
import {
|
|
18
|
+
NotificationDtoFromJSON,
|
|
19
|
+
NotificationDtoFromJSONTyped,
|
|
20
|
+
NotificationDtoToJSON,
|
|
21
|
+
NotificationDtoToJSONTyped,
|
|
22
|
+
} from './NotificationDto';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface NotificationListResponseDto
|
|
28
|
+
*/
|
|
29
|
+
export interface NotificationListResponseDto {
|
|
30
|
+
/**
|
|
31
|
+
* List of notifications
|
|
32
|
+
* @type {Array<NotificationDto>}
|
|
33
|
+
* @memberof NotificationListResponseDto
|
|
34
|
+
*/
|
|
35
|
+
notifications?: Array<NotificationDto>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of notifications for the user
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof NotificationListResponseDto
|
|
40
|
+
*/
|
|
41
|
+
total?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Whether there are more notifications to load
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof NotificationListResponseDto
|
|
46
|
+
*/
|
|
47
|
+
hasMore?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the NotificationListResponseDto interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfNotificationListResponseDto(value: object): value is NotificationListResponseDto {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function NotificationListResponseDtoFromJSON(json: any): NotificationListResponseDto {
|
|
58
|
+
return NotificationListResponseDtoFromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function NotificationListResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationListResponseDto {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'notifications': json['notifications'] == null ? undefined : ((json['notifications'] as Array<any>).map(NotificationDtoFromJSON)),
|
|
68
|
+
'total': json['total'] == null ? undefined : json['total'],
|
|
69
|
+
'hasMore': json['hasMore'] == null ? undefined : json['hasMore'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function NotificationListResponseDtoToJSON(json: any): NotificationListResponseDto {
|
|
74
|
+
return NotificationListResponseDtoToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function NotificationListResponseDtoToJSONTyped(value?: NotificationListResponseDto | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'notifications': value['notifications'] == null ? undefined : ((value['notifications'] as Array<any>).map(NotificationDtoToJSON)),
|
|
85
|
+
'total': value['total'],
|
|
86
|
+
'hasMore': value['hasMore'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -0,0 +1,146 @@
|
|
|
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 { ParameterMapping } from './ParameterMapping';
|
|
17
|
+
import {
|
|
18
|
+
ParameterMappingFromJSON,
|
|
19
|
+
ParameterMappingFromJSONTyped,
|
|
20
|
+
ParameterMappingToJSON,
|
|
21
|
+
ParameterMappingToJSONTyped,
|
|
22
|
+
} from './ParameterMapping';
|
|
23
|
+
import type { NotificationType } from './NotificationType';
|
|
24
|
+
import {
|
|
25
|
+
NotificationTypeFromJSON,
|
|
26
|
+
NotificationTypeFromJSONTyped,
|
|
27
|
+
NotificationTypeToJSON,
|
|
28
|
+
NotificationTypeToJSONTyped,
|
|
29
|
+
} from './NotificationType';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface NotificationTemplate
|
|
35
|
+
*/
|
|
36
|
+
export interface NotificationTemplate {
|
|
37
|
+
/**
|
|
38
|
+
* Unique identifier for the notification template
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof NotificationTemplate
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* Customer ID this template belongs to
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof NotificationTemplate
|
|
47
|
+
*/
|
|
48
|
+
customerId: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {NotificationType}
|
|
52
|
+
* @memberof NotificationTemplate
|
|
53
|
+
*/
|
|
54
|
+
type: NotificationType;
|
|
55
|
+
/**
|
|
56
|
+
* WhatsApp template name (e.g., "reserve_confirmation")
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof NotificationTemplate
|
|
59
|
+
*/
|
|
60
|
+
templateName: string;
|
|
61
|
+
/**
|
|
62
|
+
* Template language code (e.g., "es", "en")
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof NotificationTemplate
|
|
65
|
+
*/
|
|
66
|
+
languageCode: string;
|
|
67
|
+
/**
|
|
68
|
+
* Array of parameter mappings for template variables
|
|
69
|
+
* @type {Array<ParameterMapping>}
|
|
70
|
+
* @memberof NotificationTemplate
|
|
71
|
+
*/
|
|
72
|
+
parameterMappings: Array<ParameterMapping>;
|
|
73
|
+
/**
|
|
74
|
+
* Timestamp when the template was created
|
|
75
|
+
* @type {Date}
|
|
76
|
+
* @memberof NotificationTemplate
|
|
77
|
+
*/
|
|
78
|
+
createdAt: Date;
|
|
79
|
+
/**
|
|
80
|
+
* Timestamp when the template was last updated
|
|
81
|
+
* @type {Date}
|
|
82
|
+
* @memberof NotificationTemplate
|
|
83
|
+
*/
|
|
84
|
+
updatedAt: Date;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Check if a given object implements the NotificationTemplate interface.
|
|
91
|
+
*/
|
|
92
|
+
export function instanceOfNotificationTemplate(value: object): value is NotificationTemplate {
|
|
93
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
94
|
+
if (!('customerId' in value) || value['customerId'] === undefined) return false;
|
|
95
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
96
|
+
if (!('templateName' in value) || value['templateName'] === undefined) return false;
|
|
97
|
+
if (!('languageCode' in value) || value['languageCode'] === undefined) return false;
|
|
98
|
+
if (!('parameterMappings' in value) || value['parameterMappings'] === undefined) return false;
|
|
99
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
100
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function NotificationTemplateFromJSON(json: any): NotificationTemplate {
|
|
105
|
+
return NotificationTemplateFromJSONTyped(json, false);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function NotificationTemplateFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTemplate {
|
|
109
|
+
if (json == null) {
|
|
110
|
+
return json;
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
|
|
114
|
+
'id': json['id'],
|
|
115
|
+
'customerId': json['customerId'],
|
|
116
|
+
'type': NotificationTypeFromJSON(json['type']),
|
|
117
|
+
'templateName': json['templateName'],
|
|
118
|
+
'languageCode': json['languageCode'],
|
|
119
|
+
'parameterMappings': ((json['parameterMappings'] as Array<any>).map(ParameterMappingFromJSON)),
|
|
120
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
121
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function NotificationTemplateToJSON(json: any): NotificationTemplate {
|
|
126
|
+
return NotificationTemplateToJSONTyped(json, false);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function NotificationTemplateToJSONTyped(value?: NotificationTemplate | null, ignoreDiscriminator: boolean = false): any {
|
|
130
|
+
if (value == null) {
|
|
131
|
+
return value;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
|
|
136
|
+
'id': value['id'],
|
|
137
|
+
'customerId': value['customerId'],
|
|
138
|
+
'type': NotificationTypeToJSON(value['type']),
|
|
139
|
+
'templateName': value['templateName'],
|
|
140
|
+
'languageCode': value['languageCode'],
|
|
141
|
+
'parameterMappings': ((value['parameterMappings'] as Array<any>).map(ParameterMappingToJSON)),
|
|
142
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
143
|
+
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
@@ -0,0 +1,155 @@
|
|
|
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 { ParameterMapping } from './ParameterMapping';
|
|
17
|
+
import {
|
|
18
|
+
ParameterMappingFromJSON,
|
|
19
|
+
ParameterMappingFromJSONTyped,
|
|
20
|
+
ParameterMappingToJSON,
|
|
21
|
+
ParameterMappingToJSONTyped,
|
|
22
|
+
} from './ParameterMapping';
|
|
23
|
+
import type { NotificationType } from './NotificationType';
|
|
24
|
+
import {
|
|
25
|
+
NotificationTypeFromJSON,
|
|
26
|
+
NotificationTypeFromJSONTyped,
|
|
27
|
+
NotificationTypeToJSON,
|
|
28
|
+
NotificationTypeToJSONTyped,
|
|
29
|
+
} from './NotificationType';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface NotificationTemplateDto
|
|
35
|
+
*/
|
|
36
|
+
export interface NotificationTemplateDto {
|
|
37
|
+
/**
|
|
38
|
+
* Unique identifier for the notification template
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof NotificationTemplateDto
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* Customer ID this template belongs to
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof NotificationTemplateDto
|
|
47
|
+
*/
|
|
48
|
+
customerId: string;
|
|
49
|
+
/**
|
|
50
|
+
* Customer name for display (superadmin view)
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof NotificationTemplateDto
|
|
53
|
+
*/
|
|
54
|
+
customerName: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {NotificationType}
|
|
58
|
+
* @memberof NotificationTemplateDto
|
|
59
|
+
*/
|
|
60
|
+
type: NotificationType;
|
|
61
|
+
/**
|
|
62
|
+
* WhatsApp template name (e.g., "reserve_confirmation")
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof NotificationTemplateDto
|
|
65
|
+
*/
|
|
66
|
+
templateName: string;
|
|
67
|
+
/**
|
|
68
|
+
* Template language code (e.g., "es", "en")
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof NotificationTemplateDto
|
|
71
|
+
*/
|
|
72
|
+
languageCode: string;
|
|
73
|
+
/**
|
|
74
|
+
* Array of parameter mappings for template variables
|
|
75
|
+
* @type {Array<ParameterMapping>}
|
|
76
|
+
* @memberof NotificationTemplateDto
|
|
77
|
+
*/
|
|
78
|
+
parameterMappings: Array<ParameterMapping>;
|
|
79
|
+
/**
|
|
80
|
+
* Timestamp when the template was created
|
|
81
|
+
* @type {Date}
|
|
82
|
+
* @memberof NotificationTemplateDto
|
|
83
|
+
*/
|
|
84
|
+
createdAt: Date;
|
|
85
|
+
/**
|
|
86
|
+
* Timestamp when the template was last updated
|
|
87
|
+
* @type {Date}
|
|
88
|
+
* @memberof NotificationTemplateDto
|
|
89
|
+
*/
|
|
90
|
+
updatedAt: Date;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Check if a given object implements the NotificationTemplateDto interface.
|
|
97
|
+
*/
|
|
98
|
+
export function instanceOfNotificationTemplateDto(value: object): value is NotificationTemplateDto {
|
|
99
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
100
|
+
if (!('customerId' in value) || value['customerId'] === undefined) return false;
|
|
101
|
+
if (!('customerName' in value) || value['customerName'] === undefined) return false;
|
|
102
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
103
|
+
if (!('templateName' in value) || value['templateName'] === undefined) return false;
|
|
104
|
+
if (!('languageCode' in value) || value['languageCode'] === undefined) return false;
|
|
105
|
+
if (!('parameterMappings' in value) || value['parameterMappings'] === undefined) return false;
|
|
106
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
107
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function NotificationTemplateDtoFromJSON(json: any): NotificationTemplateDto {
|
|
112
|
+
return NotificationTemplateDtoFromJSONTyped(json, false);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function NotificationTemplateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTemplateDto {
|
|
116
|
+
if (json == null) {
|
|
117
|
+
return json;
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
|
|
121
|
+
'id': json['id'],
|
|
122
|
+
'customerId': json['customerId'],
|
|
123
|
+
'customerName': json['customerName'],
|
|
124
|
+
'type': NotificationTypeFromJSON(json['type']),
|
|
125
|
+
'templateName': json['templateName'],
|
|
126
|
+
'languageCode': json['languageCode'],
|
|
127
|
+
'parameterMappings': ((json['parameterMappings'] as Array<any>).map(ParameterMappingFromJSON)),
|
|
128
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
129
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function NotificationTemplateDtoToJSON(json: any): NotificationTemplateDto {
|
|
134
|
+
return NotificationTemplateDtoToJSONTyped(json, false);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function NotificationTemplateDtoToJSONTyped(value?: NotificationTemplateDto | null, ignoreDiscriminator: boolean = false): any {
|
|
138
|
+
if (value == null) {
|
|
139
|
+
return value;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
|
|
144
|
+
'id': value['id'],
|
|
145
|
+
'customerId': value['customerId'],
|
|
146
|
+
'customerName': value['customerName'],
|
|
147
|
+
'type': NotificationTypeToJSON(value['type']),
|
|
148
|
+
'templateName': value['templateName'],
|
|
149
|
+
'languageCode': value['languageCode'],
|
|
150
|
+
'parameterMappings': ((value['parameterMappings'] as Array<any>).map(ParameterMappingToJSON)),
|
|
151
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
152
|
+
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Represents the type of notification to be sent
|
|
18
18
|
* @export
|
|
19
19
|
*/
|
|
20
20
|
export const NotificationType = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
Reserve: 'RESERVE',
|
|
22
|
+
Cancellation: 'CANCELLATION',
|
|
23
|
+
Reminder: 'REMINDER',
|
|
24
|
+
PaymentConfirmation: 'PAYMENT_CONFIRMATION'
|
|
25
25
|
} as const;
|
|
26
26
|
export type NotificationType = typeof NotificationType[keyof typeof NotificationType];
|
|
27
27
|
|