@jugarhoy/api 1.0.8 → 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/AuthApi.ts +12 -12
- package/apis/NotificationsApi.ts +167 -0
- package/apis/index.ts +1 -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/NotificationType.ts +5 -5
- package/models/UnreadCountResponseDto.ts +65 -0
- package/models/{UserNotification.ts → UserNotificationConfig.ts} +27 -27
- package/models/index.ts +8 -2
- package/package.json +1 -1
- package/models/RequestPasswordReset200Response.ts +0 -65
package/apis/AuthApi.ts
CHANGED
|
@@ -19,7 +19,7 @@ import type {
|
|
|
19
19
|
CreateFromInvite400Response,
|
|
20
20
|
GetSession401Response,
|
|
21
21
|
GetSession500Response,
|
|
22
|
-
|
|
22
|
+
MarkNotificationAsRead200Response,
|
|
23
23
|
RequestPasswordReset500Response,
|
|
24
24
|
RequestPasswordResetRequest,
|
|
25
25
|
ResendEmailVerification500Response,
|
|
@@ -43,8 +43,8 @@ import {
|
|
|
43
43
|
GetSession401ResponseToJSON,
|
|
44
44
|
GetSession500ResponseFromJSON,
|
|
45
45
|
GetSession500ResponseToJSON,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
MarkNotificationAsRead200ResponseFromJSON,
|
|
47
|
+
MarkNotificationAsRead200ResponseToJSON,
|
|
48
48
|
RequestPasswordReset500ResponseFromJSON,
|
|
49
49
|
RequestPasswordReset500ResponseToJSON,
|
|
50
50
|
RequestPasswordResetRequestFromJSON,
|
|
@@ -252,7 +252,7 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
252
252
|
/**
|
|
253
253
|
* Request a password reset email
|
|
254
254
|
*/
|
|
255
|
-
async requestPasswordResetRaw(requestParameters: RequestPasswordResetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
255
|
+
async requestPasswordResetRaw(requestParameters: RequestPasswordResetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarkNotificationAsRead200Response>> {
|
|
256
256
|
if (requestParameters['requestPasswordResetRequest'] == null) {
|
|
257
257
|
throw new runtime.RequiredError(
|
|
258
258
|
'requestPasswordResetRequest',
|
|
@@ -282,13 +282,13 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
282
282
|
body: RequestPasswordResetRequestToJSON(requestParameters['requestPasswordResetRequest']),
|
|
283
283
|
}, initOverrides);
|
|
284
284
|
|
|
285
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
285
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MarkNotificationAsRead200ResponseFromJSON(jsonValue));
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
/**
|
|
289
289
|
* Request a password reset email
|
|
290
290
|
*/
|
|
291
|
-
async requestPasswordReset(requestParameters: RequestPasswordResetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
291
|
+
async requestPasswordReset(requestParameters: RequestPasswordResetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarkNotificationAsRead200Response> {
|
|
292
292
|
const response = await this.requestPasswordResetRaw(requestParameters, initOverrides);
|
|
293
293
|
return await response.value();
|
|
294
294
|
}
|
|
@@ -296,7 +296,7 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
296
296
|
/**
|
|
297
297
|
* Resend email verification link
|
|
298
298
|
*/
|
|
299
|
-
async resendEmailVerificationRaw(requestParameters: ResendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
299
|
+
async resendEmailVerificationRaw(requestParameters: ResendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarkNotificationAsRead200Response>> {
|
|
300
300
|
if (requestParameters['resendEmailVerificationRequest'] == null) {
|
|
301
301
|
throw new runtime.RequiredError(
|
|
302
302
|
'resendEmailVerificationRequest',
|
|
@@ -326,13 +326,13 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
326
326
|
body: ResendEmailVerificationRequestToJSON(requestParameters['resendEmailVerificationRequest']),
|
|
327
327
|
}, initOverrides);
|
|
328
328
|
|
|
329
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
329
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MarkNotificationAsRead200ResponseFromJSON(jsonValue));
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
/**
|
|
333
333
|
* Resend email verification link
|
|
334
334
|
*/
|
|
335
|
-
async resendEmailVerification(requestParameters: ResendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
335
|
+
async resendEmailVerification(requestParameters: ResendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarkNotificationAsRead200Response> {
|
|
336
336
|
const response = await this.resendEmailVerificationRaw(requestParameters, initOverrides);
|
|
337
337
|
return await response.value();
|
|
338
338
|
}
|
|
@@ -384,7 +384,7 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
384
384
|
/**
|
|
385
385
|
* Send an email verification link
|
|
386
386
|
*/
|
|
387
|
-
async sendEmailVerificationRaw(requestParameters: SendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
387
|
+
async sendEmailVerificationRaw(requestParameters: SendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarkNotificationAsRead200Response>> {
|
|
388
388
|
if (requestParameters['sendEmailVerificationRequest'] == null) {
|
|
389
389
|
throw new runtime.RequiredError(
|
|
390
390
|
'sendEmailVerificationRequest',
|
|
@@ -414,13 +414,13 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
414
414
|
body: SendEmailVerificationRequestToJSON(requestParameters['sendEmailVerificationRequest']),
|
|
415
415
|
}, initOverrides);
|
|
416
416
|
|
|
417
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
417
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MarkNotificationAsRead200ResponseFromJSON(jsonValue));
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
/**
|
|
421
421
|
* Send an email verification link
|
|
422
422
|
*/
|
|
423
|
-
async sendEmailVerification(requestParameters: SendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
423
|
+
async sendEmailVerification(requestParameters: SendEmailVerificationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarkNotificationAsRead200Response> {
|
|
424
424
|
const response = await this.sendEmailVerificationRaw(requestParameters, initOverrides);
|
|
425
425
|
return await response.value();
|
|
426
426
|
}
|
|
@@ -0,0 +1,167 @@
|
|
|
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
|
+
MarkNotificationAsRead200Response,
|
|
19
|
+
NotificationListResponseDto,
|
|
20
|
+
UnreadCountResponseDto,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
MarkNotificationAsRead200ResponseFromJSON,
|
|
24
|
+
MarkNotificationAsRead200ResponseToJSON,
|
|
25
|
+
NotificationListResponseDtoFromJSON,
|
|
26
|
+
NotificationListResponseDtoToJSON,
|
|
27
|
+
UnreadCountResponseDtoFromJSON,
|
|
28
|
+
UnreadCountResponseDtoToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface ListNotificationsRequest {
|
|
32
|
+
limit?: number;
|
|
33
|
+
offset?: number;
|
|
34
|
+
unreadOnly?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface MarkNotificationAsReadRequest {
|
|
38
|
+
id: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export class NotificationsApi extends runtime.BaseAPI {
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get count of unread notifications for the current user
|
|
48
|
+
*/
|
|
49
|
+
async getUnreadNotificationsCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnreadCountResponseDto>> {
|
|
50
|
+
const queryParameters: any = {};
|
|
51
|
+
|
|
52
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
53
|
+
|
|
54
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
55
|
+
const token = this.configuration.accessToken;
|
|
56
|
+
const tokenString = await token("bearerAuth", []);
|
|
57
|
+
|
|
58
|
+
if (tokenString) {
|
|
59
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const response = await this.request({
|
|
63
|
+
path: `/api/notifications/unread-count`,
|
|
64
|
+
method: 'GET',
|
|
65
|
+
headers: headerParameters,
|
|
66
|
+
query: queryParameters,
|
|
67
|
+
}, initOverrides);
|
|
68
|
+
|
|
69
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UnreadCountResponseDtoFromJSON(jsonValue));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get count of unread notifications for the current user
|
|
74
|
+
*/
|
|
75
|
+
async getUnreadNotificationsCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnreadCountResponseDto> {
|
|
76
|
+
const response = await this.getUnreadNotificationsCountRaw(initOverrides);
|
|
77
|
+
return await response.value();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* List notifications for the current user
|
|
82
|
+
*/
|
|
83
|
+
async listNotificationsRaw(requestParameters: ListNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationListResponseDto>> {
|
|
84
|
+
const queryParameters: any = {};
|
|
85
|
+
|
|
86
|
+
if (requestParameters['limit'] != null) {
|
|
87
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (requestParameters['offset'] != null) {
|
|
91
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (requestParameters['unreadOnly'] != null) {
|
|
95
|
+
queryParameters['unreadOnly'] = requestParameters['unreadOnly'];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
99
|
+
|
|
100
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
101
|
+
const token = this.configuration.accessToken;
|
|
102
|
+
const tokenString = await token("bearerAuth", []);
|
|
103
|
+
|
|
104
|
+
if (tokenString) {
|
|
105
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const response = await this.request({
|
|
109
|
+
path: `/api/notifications`,
|
|
110
|
+
method: 'GET',
|
|
111
|
+
headers: headerParameters,
|
|
112
|
+
query: queryParameters,
|
|
113
|
+
}, initOverrides);
|
|
114
|
+
|
|
115
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationListResponseDtoFromJSON(jsonValue));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* List notifications for the current user
|
|
120
|
+
*/
|
|
121
|
+
async listNotifications(requestParameters: ListNotificationsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationListResponseDto> {
|
|
122
|
+
const response = await this.listNotificationsRaw(requestParameters, initOverrides);
|
|
123
|
+
return await response.value();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Mark a notification as read
|
|
128
|
+
*/
|
|
129
|
+
async markNotificationAsReadRaw(requestParameters: MarkNotificationAsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarkNotificationAsRead200Response>> {
|
|
130
|
+
if (requestParameters['id'] == null) {
|
|
131
|
+
throw new runtime.RequiredError(
|
|
132
|
+
'id',
|
|
133
|
+
'Required parameter "id" was null or undefined when calling markNotificationAsRead().'
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const queryParameters: any = {};
|
|
138
|
+
|
|
139
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
140
|
+
|
|
141
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
142
|
+
const token = this.configuration.accessToken;
|
|
143
|
+
const tokenString = await token("bearerAuth", []);
|
|
144
|
+
|
|
145
|
+
if (tokenString) {
|
|
146
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const response = await this.request({
|
|
150
|
+
path: `/api/notifications/{id}/read`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
151
|
+
method: 'PUT',
|
|
152
|
+
headers: headerParameters,
|
|
153
|
+
query: queryParameters,
|
|
154
|
+
}, initOverrides);
|
|
155
|
+
|
|
156
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MarkNotificationAsRead200ResponseFromJSON(jsonValue));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Mark a notification as read
|
|
161
|
+
*/
|
|
162
|
+
async markNotificationAsRead(requestParameters: MarkNotificationAsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarkNotificationAsRead200Response> {
|
|
163
|
+
const response = await this.markNotificationAsReadRaw(requestParameters, initOverrides);
|
|
164
|
+
return await response.value();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
}
|
package/apis/index.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from './DevicesApi';
|
|
|
24
24
|
export * from './HealthApi';
|
|
25
25
|
export * from './MercadoPagoApi';
|
|
26
26
|
export * from './MercadoPagoIPNApi';
|
|
27
|
+
export * from './NotificationsApi';
|
|
27
28
|
export * from './PlaySpotsApi';
|
|
28
29
|
export * from './ReservesApi';
|
|
29
30
|
export * from './UsersApi';
|
|
@@ -0,0 +1,65 @@
|
|
|
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 MarkNotificationAsRead200Response
|
|
20
|
+
*/
|
|
21
|
+
export interface MarkNotificationAsRead200Response {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof MarkNotificationAsRead200Response
|
|
26
|
+
*/
|
|
27
|
+
success?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the MarkNotificationAsRead200Response interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfMarkNotificationAsRead200Response(value: object): value is MarkNotificationAsRead200Response {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function MarkNotificationAsRead200ResponseFromJSON(json: any): MarkNotificationAsRead200Response {
|
|
38
|
+
return MarkNotificationAsRead200ResponseFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function MarkNotificationAsRead200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarkNotificationAsRead200Response {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'success': json['success'] == null ? undefined : json['success'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function MarkNotificationAsRead200ResponseToJSON(json: any): MarkNotificationAsRead200Response {
|
|
52
|
+
return MarkNotificationAsRead200ResponseToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function MarkNotificationAsRead200ResponseToJSONTyped(value?: MarkNotificationAsRead200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'success': value['success'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
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 Notification
|
|
28
|
+
*/
|
|
29
|
+
export interface Notification {
|
|
30
|
+
/**
|
|
31
|
+
* Unique identifier for the notification
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Notification
|
|
34
|
+
*/
|
|
35
|
+
id?: string;
|
|
36
|
+
/**
|
|
37
|
+
* ID of the user who receives this notification
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof Notification
|
|
40
|
+
*/
|
|
41
|
+
userId?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {NotificationCategory}
|
|
45
|
+
* @memberof Notification
|
|
46
|
+
*/
|
|
47
|
+
type?: NotificationCategory;
|
|
48
|
+
/**
|
|
49
|
+
* Notification title (Spanish)
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof Notification
|
|
52
|
+
*/
|
|
53
|
+
title?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Notification message body (Spanish)
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof Notification
|
|
58
|
+
*/
|
|
59
|
+
message?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the user has read this notification
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof Notification
|
|
64
|
+
*/
|
|
65
|
+
read?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Optional ID of related entity (e.g., reserveId, paymentId) for deep linking
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof Notification
|
|
70
|
+
*/
|
|
71
|
+
relatedId?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Optional JSON object with additional data for navigation/deep linking
|
|
74
|
+
* @type {{ [key: string]: any; }}
|
|
75
|
+
* @memberof Notification
|
|
76
|
+
*/
|
|
77
|
+
metadata?: { [key: string]: any; } | null;
|
|
78
|
+
/**
|
|
79
|
+
* When the notification was created
|
|
80
|
+
* @type {Date}
|
|
81
|
+
* @memberof Notification
|
|
82
|
+
*/
|
|
83
|
+
createdAt?: Date;
|
|
84
|
+
/**
|
|
85
|
+
* When the notification was last updated
|
|
86
|
+
* @type {Date}
|
|
87
|
+
* @memberof Notification
|
|
88
|
+
*/
|
|
89
|
+
updatedAt?: Date;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Check if a given object implements the Notification interface.
|
|
96
|
+
*/
|
|
97
|
+
export function instanceOfNotification(value: object): value is Notification {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function NotificationFromJSON(json: any): Notification {
|
|
102
|
+
return NotificationFromJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function NotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Notification {
|
|
106
|
+
if (json == null) {
|
|
107
|
+
return json;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
112
|
+
'userId': json['userId'] == null ? undefined : json['userId'],
|
|
113
|
+
'type': json['type'] == null ? undefined : NotificationCategoryFromJSON(json['type']),
|
|
114
|
+
'title': json['title'] == null ? undefined : json['title'],
|
|
115
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
116
|
+
'read': json['read'] == null ? undefined : json['read'],
|
|
117
|
+
'relatedId': json['relatedId'] == null ? undefined : json['relatedId'],
|
|
118
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
119
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
120
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function NotificationToJSON(json: any): Notification {
|
|
125
|
+
return NotificationToJSONTyped(json, false);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function NotificationToJSONTyped(value?: Notification | null, ignoreDiscriminator: boolean = false): any {
|
|
129
|
+
if (value == null) {
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
|
|
135
|
+
'id': value['id'],
|
|
136
|
+
'userId': value['userId'],
|
|
137
|
+
'type': NotificationCategoryToJSON(value['type']),
|
|
138
|
+
'title': value['title'],
|
|
139
|
+
'message': value['message'],
|
|
140
|
+
'read': value['read'],
|
|
141
|
+
'relatedId': value['relatedId'],
|
|
142
|
+
'metadata': value['metadata'],
|
|
143
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
144
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
* Category of notification for users
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const NotificationCategory = {
|
|
21
|
+
Reservation: 'reservation',
|
|
22
|
+
Payment: 'payment',
|
|
23
|
+
General: 'general',
|
|
24
|
+
Promo: 'promo',
|
|
25
|
+
FindPlayer: 'find_player',
|
|
26
|
+
NewTournament: 'new_tournament',
|
|
27
|
+
Training: 'training'
|
|
28
|
+
} as const;
|
|
29
|
+
export type NotificationCategory = typeof NotificationCategory[keyof typeof NotificationCategory];
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export function instanceOfNotificationCategory(value: any): boolean {
|
|
33
|
+
for (const key in NotificationCategory) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(NotificationCategory, key)) {
|
|
35
|
+
if (NotificationCategory[key as keyof typeof NotificationCategory] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function NotificationCategoryFromJSON(json: any): NotificationCategory {
|
|
44
|
+
return NotificationCategoryFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function NotificationCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationCategory {
|
|
48
|
+
return json as NotificationCategory;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function NotificationCategoryToJSON(value?: NotificationCategory | null): any {
|
|
52
|
+
return value as any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function NotificationCategoryToJSONTyped(value: any, ignoreDiscriminator: boolean): NotificationCategory {
|
|
56
|
+
return value as NotificationCategory;
|
|
57
|
+
}
|
|
58
|
+
|
|
@@ -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
|
+
|
|
@@ -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
|
|
|
@@ -0,0 +1,65 @@
|
|
|
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 UnreadCountResponseDto
|
|
20
|
+
*/
|
|
21
|
+
export interface UnreadCountResponseDto {
|
|
22
|
+
/**
|
|
23
|
+
* Number of unread notifications
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof UnreadCountResponseDto
|
|
26
|
+
*/
|
|
27
|
+
count?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the UnreadCountResponseDto interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfUnreadCountResponseDto(value: object): value is UnreadCountResponseDto {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function UnreadCountResponseDtoFromJSON(json: any): UnreadCountResponseDto {
|
|
38
|
+
return UnreadCountResponseDtoFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function UnreadCountResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnreadCountResponseDto {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'count': json['count'] == null ? undefined : json['count'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function UnreadCountResponseDtoToJSON(json: any): UnreadCountResponseDto {
|
|
52
|
+
return UnreadCountResponseDtoToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function UnreadCountResponseDtoToJSONTyped(value?: UnreadCountResponseDto | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'count': value['count'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -13,60 +13,60 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { NotificationChannelType } from './NotificationChannelType';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
NotificationChannelTypeFromJSON,
|
|
19
|
+
NotificationChannelTypeFromJSONTyped,
|
|
20
|
+
NotificationChannelTypeToJSON,
|
|
21
|
+
NotificationChannelTypeToJSONTyped,
|
|
22
|
+
} from './NotificationChannelType';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* @export
|
|
27
|
-
* @interface
|
|
27
|
+
* @interface UserNotificationConfig
|
|
28
28
|
*/
|
|
29
|
-
export interface
|
|
29
|
+
export interface UserNotificationConfig {
|
|
30
30
|
/**
|
|
31
31
|
* Unique identifier for the notification preference
|
|
32
32
|
* @type {string}
|
|
33
|
-
* @memberof
|
|
33
|
+
* @memberof UserNotificationConfig
|
|
34
34
|
*/
|
|
35
35
|
id?: string;
|
|
36
36
|
/**
|
|
37
37
|
* ID of the user this notification preference belongs to
|
|
38
38
|
* @type {string}
|
|
39
|
-
* @memberof
|
|
39
|
+
* @memberof UserNotificationConfig
|
|
40
40
|
*/
|
|
41
41
|
userId?: string;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
|
-
* @type {
|
|
45
|
-
* @memberof
|
|
44
|
+
* @type {NotificationChannelType}
|
|
45
|
+
* @memberof UserNotificationConfig
|
|
46
46
|
*/
|
|
47
|
-
type?:
|
|
47
|
+
type?: NotificationChannelType;
|
|
48
48
|
/**
|
|
49
49
|
* JSON object containing subscription information for this notification type
|
|
50
50
|
* @type {{ [key: string]: any; }}
|
|
51
|
-
* @memberof
|
|
51
|
+
* @memberof UserNotificationConfig
|
|
52
52
|
*/
|
|
53
53
|
subscriptionId?: { [key: string]: any; };
|
|
54
54
|
/**
|
|
55
55
|
* Whether this notification type is enabled for the user
|
|
56
56
|
* @type {boolean}
|
|
57
|
-
* @memberof
|
|
57
|
+
* @memberof UserNotificationConfig
|
|
58
58
|
*/
|
|
59
59
|
enabled?: boolean;
|
|
60
60
|
/**
|
|
61
61
|
* When this notification preference was created
|
|
62
62
|
* @type {Date}
|
|
63
|
-
* @memberof
|
|
63
|
+
* @memberof UserNotificationConfig
|
|
64
64
|
*/
|
|
65
65
|
createdAt?: Date;
|
|
66
66
|
/**
|
|
67
67
|
* When this notification preference was last updated
|
|
68
68
|
* @type {Date}
|
|
69
|
-
* @memberof
|
|
69
|
+
* @memberof UserNotificationConfig
|
|
70
70
|
*/
|
|
71
71
|
updatedAt?: Date;
|
|
72
72
|
}
|
|
@@ -74,17 +74,17 @@ export interface UserNotification {
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* Check if a given object implements the
|
|
77
|
+
* Check if a given object implements the UserNotificationConfig interface.
|
|
78
78
|
*/
|
|
79
|
-
export function
|
|
79
|
+
export function instanceOfUserNotificationConfig(value: object): value is UserNotificationConfig {
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export function
|
|
84
|
-
return
|
|
83
|
+
export function UserNotificationConfigFromJSON(json: any): UserNotificationConfig {
|
|
84
|
+
return UserNotificationConfigFromJSONTyped(json, false);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export function
|
|
87
|
+
export function UserNotificationConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserNotificationConfig {
|
|
88
88
|
if (json == null) {
|
|
89
89
|
return json;
|
|
90
90
|
}
|
|
@@ -92,7 +92,7 @@ export function UserNotificationFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
92
92
|
|
|
93
93
|
'id': json['id'] == null ? undefined : json['id'],
|
|
94
94
|
'userId': json['userId'] == null ? undefined : json['userId'],
|
|
95
|
-
'type': json['type'] == null ? undefined :
|
|
95
|
+
'type': json['type'] == null ? undefined : NotificationChannelTypeFromJSON(json['type']),
|
|
96
96
|
'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
|
|
97
97
|
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
98
98
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
@@ -100,11 +100,11 @@ export function UserNotificationFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export function
|
|
104
|
-
return
|
|
103
|
+
export function UserNotificationConfigToJSON(json: any): UserNotificationConfig {
|
|
104
|
+
return UserNotificationConfigToJSONTyped(json, false);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
export function
|
|
107
|
+
export function UserNotificationConfigToJSONTyped(value?: UserNotificationConfig | null, ignoreDiscriminator: boolean = false): any {
|
|
108
108
|
if (value == null) {
|
|
109
109
|
return value;
|
|
110
110
|
}
|
|
@@ -113,7 +113,7 @@ export function UserNotificationToJSONTyped(value?: UserNotification | null, ign
|
|
|
113
113
|
|
|
114
114
|
'id': value['id'],
|
|
115
115
|
'userId': value['userId'],
|
|
116
|
-
'type':
|
|
116
|
+
'type': NotificationChannelTypeToJSON(value['type']),
|
|
117
117
|
'subscriptionId': value['subscriptionId'],
|
|
118
118
|
'enabled': value['enabled'],
|
|
119
119
|
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
package/models/index.ts
CHANGED
|
@@ -102,9 +102,15 @@ export * from './Location';
|
|
|
102
102
|
export * from './LocationDto';
|
|
103
103
|
export * from './ManageLightSwitch200Response';
|
|
104
104
|
export * from './ManageLightSwitch500Response';
|
|
105
|
+
export * from './MarkNotificationAsRead200Response';
|
|
105
106
|
export * from './MatchRequirements';
|
|
106
107
|
export * from './MercadoPagoIPN';
|
|
107
108
|
export * from './Message';
|
|
109
|
+
export * from './Notification';
|
|
110
|
+
export * from './NotificationCategory';
|
|
111
|
+
export * from './NotificationChannelType';
|
|
112
|
+
export * from './NotificationDto';
|
|
113
|
+
export * from './NotificationListResponseDto';
|
|
108
114
|
export * from './NotificationTemplate';
|
|
109
115
|
export * from './NotificationTemplateDto';
|
|
110
116
|
export * from './NotificationType';
|
|
@@ -143,7 +149,6 @@ export * from './RegisterClubParams';
|
|
|
143
149
|
export * from './RegisterClubResponse';
|
|
144
150
|
export * from './RegisterClubResponseResult';
|
|
145
151
|
export * from './RentHour';
|
|
146
|
-
export * from './RequestPasswordReset200Response';
|
|
147
152
|
export * from './RequestPasswordReset500Response';
|
|
148
153
|
export * from './RequestPasswordResetRequest';
|
|
149
154
|
export * from './ResendEmailVerification500Response';
|
|
@@ -178,6 +183,7 @@ export * from './TimeOfDay';
|
|
|
178
183
|
export * from './ToggleServiceConfigRequest';
|
|
179
184
|
export * from './TriggerDeviceAction200Response';
|
|
180
185
|
export * from './TriggerDeviceActionRequest';
|
|
186
|
+
export * from './UnreadCountResponseDto';
|
|
181
187
|
export * from './UpdateBillRequest';
|
|
182
188
|
export * from './UpdateFeatureRequest';
|
|
183
189
|
export * from './UpdateReservationAdminRequest';
|
|
@@ -189,7 +195,7 @@ export * from './User';
|
|
|
189
195
|
export * from './UserAuth';
|
|
190
196
|
export * from './UserDto';
|
|
191
197
|
export * from './UserInvitation';
|
|
192
|
-
export * from './
|
|
198
|
+
export * from './UserNotificationConfig';
|
|
193
199
|
export * from './UserNotificationDto';
|
|
194
200
|
export * from './UserRating';
|
|
195
201
|
export * from './UserReserveDto';
|
package/package.json
CHANGED
|
@@ -1,65 +0,0 @@
|
|
|
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 RequestPasswordReset200Response
|
|
20
|
-
*/
|
|
21
|
-
export interface RequestPasswordReset200Response {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {boolean}
|
|
25
|
-
* @memberof RequestPasswordReset200Response
|
|
26
|
-
*/
|
|
27
|
-
success?: boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Check if a given object implements the RequestPasswordReset200Response interface.
|
|
32
|
-
*/
|
|
33
|
-
export function instanceOfRequestPasswordReset200Response(value: object): value is RequestPasswordReset200Response {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function RequestPasswordReset200ResponseFromJSON(json: any): RequestPasswordReset200Response {
|
|
38
|
-
return RequestPasswordReset200ResponseFromJSONTyped(json, false);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function RequestPasswordReset200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RequestPasswordReset200Response {
|
|
42
|
-
if (json == null) {
|
|
43
|
-
return json;
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
|
|
47
|
-
'success': json['success'] == null ? undefined : json['success'],
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function RequestPasswordReset200ResponseToJSON(json: any): RequestPasswordReset200Response {
|
|
52
|
-
return RequestPasswordReset200ResponseToJSONTyped(json, false);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function RequestPasswordReset200ResponseToJSONTyped(value?: RequestPasswordReset200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
-
if (value == null) {
|
|
57
|
-
return value;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
|
|
62
|
-
'success': value['success'],
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|