pingram 1.0.33 → 1.0.34-alpha.1539
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/dist/generated/src/apis/UserApi.d.ts +1 -95
- package/dist/generated/src/apis/UserApi.js +0 -218
- package/dist/generated/src/apis/index.d.ts +1 -1
- package/dist/generated/src/models/UserPreferencesGETResponse.d.ts +47 -0
- package/dist/generated/src/models/UserPreferencesGETResponse.js +61 -0
- package/dist/generated/src/models/UserPreferencesGETResponseNotificationsInner.d.ts +52 -0
- package/dist/generated/src/models/UserPreferencesGETResponseNotificationsInner.js +64 -0
- package/dist/generated/src/models/UserPreferencesGETResponsePreferencesInner.d.ts +63 -0
- package/dist/generated/src/models/UserPreferencesGETResponsePreferencesInner.js +75 -0
- package/dist/generated/src/models/UserPreferencesGETResponseSubNotificationsInner.d.ts +44 -0
- package/dist/generated/src/models/UserPreferencesGETResponseSubNotificationsInner.js +59 -0
- package/dist/generated/src/models/UserPreferencesPOSTRequestInner.d.ts +69 -0
- package/dist/generated/src/models/UserPreferencesPOSTRequestInner.js +78 -0
- package/dist/generated/src/models/UserPreferencesPOSTResponseInner.d.ts +57 -0
- package/dist/generated/src/models/UserPreferencesPOSTResponseInner.js +70 -0
- package/dist/generated/src/models/UserPreferencesPOSTResponseInnerChannelsStatesInner.d.ts +57 -0
- package/dist/generated/src/models/UserPreferencesPOSTResponseInnerChannelsStatesInner.js +73 -0
- package/dist/generated/src/models/index.d.ts +7 -0
- package/dist/generated/src/models/index.js +7 -0
- package/dist/src/client.js +1 -1
- package/package.json +1 -1
|
@@ -10,11 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetAccountMetadataResponse,
|
|
14
|
-
export interface GetInAppNotificationsRequest {
|
|
15
|
-
before?: string;
|
|
16
|
-
count?: number;
|
|
17
|
-
}
|
|
13
|
+
import type { GetAccountMetadataResponse, PostUserRequest, User } from '../models/index';
|
|
18
14
|
export interface GetUserRequest {
|
|
19
15
|
userId: string;
|
|
20
16
|
}
|
|
@@ -22,12 +18,6 @@ export interface IdentifyRequest {
|
|
|
22
18
|
userId: string;
|
|
23
19
|
postUserRequest: PostUserRequest;
|
|
24
20
|
}
|
|
25
|
-
export interface MarkInAppNotificationsAsSeenRequest {
|
|
26
|
-
inAppNotificationUnreadClearRequest: InAppNotificationUnreadClearRequest;
|
|
27
|
-
}
|
|
28
|
-
export interface UpdateInAppNotificationStatusRequest {
|
|
29
|
-
inAppNotificationPatchRequest: InAppNotificationPatchRequest;
|
|
30
|
-
}
|
|
31
21
|
/**
|
|
32
22
|
* UserApi - interface
|
|
33
23
|
*
|
|
@@ -47,32 +37,6 @@ export interface UserApiInterface {
|
|
|
47
37
|
* Get account-level metadata including logo, VAPID key, and web push status
|
|
48
38
|
*/
|
|
49
39
|
getAccountMetadata(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountMetadataResponse>;
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* @summary Get in-app notifications for a user
|
|
53
|
-
* @param {string} [before] Timestamp or ISO date to fetch notifications before
|
|
54
|
-
* @param {number} [count] Number of notifications to return (default 10)
|
|
55
|
-
* @param {*} [options] Override http request option.
|
|
56
|
-
* @throws {RequiredError}
|
|
57
|
-
* @memberof UserApiInterface
|
|
58
|
-
*/
|
|
59
|
-
getInAppNotificationsRaw(requestParameters: GetInAppNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetInappNotificationsResponse>>;
|
|
60
|
-
/**
|
|
61
|
-
* Get in-app notifications for a user
|
|
62
|
-
*/
|
|
63
|
-
getInAppNotifications(before?: string, count?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetInappNotificationsResponse>;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @summary Get the count of unread in-app notifications for a user
|
|
67
|
-
* @param {*} [options] Override http request option.
|
|
68
|
-
* @throws {RequiredError}
|
|
69
|
-
* @memberof UserApiInterface
|
|
70
|
-
*/
|
|
71
|
-
getInAppUnreadCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InappUnreadCountResponse>>;
|
|
72
|
-
/**
|
|
73
|
-
* Get the count of unread in-app notifications for a user
|
|
74
|
-
*/
|
|
75
|
-
getInAppUnreadCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InappUnreadCountResponse>;
|
|
76
40
|
/**
|
|
77
41
|
*
|
|
78
42
|
* @summary Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.
|
|
@@ -100,32 +64,6 @@ export interface UserApiInterface {
|
|
|
100
64
|
* Create or update a user with the given ID. Updates lastSeenTime automatically.
|
|
101
65
|
*/
|
|
102
66
|
identify(userId: string, postUserRequest: PostUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<User>;
|
|
103
|
-
/**
|
|
104
|
-
*
|
|
105
|
-
* @summary Mark in-app web notifications as seen/read for a user
|
|
106
|
-
* @param {InAppNotificationUnreadClearRequest} inAppNotificationUnreadClearRequest
|
|
107
|
-
* @param {*} [options] Override http request option.
|
|
108
|
-
* @throws {RequiredError}
|
|
109
|
-
* @memberof UserApiInterface
|
|
110
|
-
*/
|
|
111
|
-
markInAppNotificationsAsSeenRaw(requestParameters: MarkInAppNotificationsAsSeenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
112
|
-
/**
|
|
113
|
-
* Mark in-app web notifications as seen/read for a user
|
|
114
|
-
*/
|
|
115
|
-
markInAppNotificationsAsSeen(inAppNotificationUnreadClearRequest: InAppNotificationUnreadClearRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
116
|
-
/**
|
|
117
|
-
*
|
|
118
|
-
* @summary Update in-app web notification status (opened, archived, clicked, etc.)
|
|
119
|
-
* @param {InAppNotificationPatchRequest} inAppNotificationPatchRequest
|
|
120
|
-
* @param {*} [options] Override http request option.
|
|
121
|
-
* @throws {RequiredError}
|
|
122
|
-
* @memberof UserApiInterface
|
|
123
|
-
*/
|
|
124
|
-
updateInAppNotificationStatusRaw(requestParameters: UpdateInAppNotificationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
125
|
-
/**
|
|
126
|
-
* Update in-app web notification status (opened, archived, clicked, etc.)
|
|
127
|
-
*/
|
|
128
|
-
updateInAppNotificationStatus(inAppNotificationPatchRequest: InAppNotificationPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
129
67
|
}
|
|
130
68
|
/**
|
|
131
69
|
*
|
|
@@ -139,22 +77,6 @@ export declare class UserApi extends runtime.BaseAPI implements UserApiInterface
|
|
|
139
77
|
* Get account-level metadata including logo, VAPID key, and web push status
|
|
140
78
|
*/
|
|
141
79
|
getAccountMetadata(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountMetadataResponse>;
|
|
142
|
-
/**
|
|
143
|
-
* Get in-app notifications for a user
|
|
144
|
-
*/
|
|
145
|
-
getInAppNotificationsRaw(requestParameters: GetInAppNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetInappNotificationsResponse>>;
|
|
146
|
-
/**
|
|
147
|
-
* Get in-app notifications for a user
|
|
148
|
-
*/
|
|
149
|
-
getInAppNotifications(before?: string, count?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetInappNotificationsResponse>;
|
|
150
|
-
/**
|
|
151
|
-
* Get the count of unread in-app notifications for a user
|
|
152
|
-
*/
|
|
153
|
-
getInAppUnreadCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InappUnreadCountResponse>>;
|
|
154
|
-
/**
|
|
155
|
-
* Get the count of unread in-app notifications for a user
|
|
156
|
-
*/
|
|
157
|
-
getInAppUnreadCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InappUnreadCountResponse>;
|
|
158
80
|
/**
|
|
159
81
|
* Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.
|
|
160
82
|
*/
|
|
@@ -171,20 +93,4 @@ export declare class UserApi extends runtime.BaseAPI implements UserApiInterface
|
|
|
171
93
|
* Create or update a user with the given ID. Updates lastSeenTime automatically.
|
|
172
94
|
*/
|
|
173
95
|
identify(userId: string, postUserRequest: PostUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<User>;
|
|
174
|
-
/**
|
|
175
|
-
* Mark in-app web notifications as seen/read for a user
|
|
176
|
-
*/
|
|
177
|
-
markInAppNotificationsAsSeenRaw(requestParameters: MarkInAppNotificationsAsSeenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
178
|
-
/**
|
|
179
|
-
* Mark in-app web notifications as seen/read for a user
|
|
180
|
-
*/
|
|
181
|
-
markInAppNotificationsAsSeen(inAppNotificationUnreadClearRequest: InAppNotificationUnreadClearRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
182
|
-
/**
|
|
183
|
-
* Update in-app web notification status (opened, archived, clicked, etc.)
|
|
184
|
-
*/
|
|
185
|
-
updateInAppNotificationStatusRaw(requestParameters: UpdateInAppNotificationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
186
|
-
/**
|
|
187
|
-
* Update in-app web notification status (opened, archived, clicked, etc.)
|
|
188
|
-
*/
|
|
189
|
-
updateInAppNotificationStatus(inAppNotificationPatchRequest: InAppNotificationPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
190
96
|
}
|
|
@@ -103,112 +103,6 @@ class UserApi extends runtime.BaseAPI {
|
|
|
103
103
|
const response = await this.getAccountMetadataRaw(initOverrides);
|
|
104
104
|
return await response.value();
|
|
105
105
|
}
|
|
106
|
-
/**
|
|
107
|
-
* Get in-app notifications for a user
|
|
108
|
-
*/
|
|
109
|
-
async getInAppNotificationsRaw(requestParameters, initOverrides) {
|
|
110
|
-
const queryParameters = {};
|
|
111
|
-
if (requestParameters['before'] != null) {
|
|
112
|
-
queryParameters['before'] = requestParameters['before'];
|
|
113
|
-
}
|
|
114
|
-
if (requestParameters['count'] != null) {
|
|
115
|
-
queryParameters['count'] = requestParameters['count'];
|
|
116
|
-
}
|
|
117
|
-
const headerParameters = {};
|
|
118
|
-
if (this.configuration &&
|
|
119
|
-
(this.configuration.username !== undefined ||
|
|
120
|
-
this.configuration.password !== undefined)) {
|
|
121
|
-
headerParameters['Authorization'] =
|
|
122
|
-
'Basic ' +
|
|
123
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
124
|
-
}
|
|
125
|
-
if (this.configuration &&
|
|
126
|
-
(this.configuration.username !== undefined ||
|
|
127
|
-
this.configuration.password !== undefined)) {
|
|
128
|
-
headerParameters['Authorization'] =
|
|
129
|
-
'Basic ' +
|
|
130
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
131
|
-
}
|
|
132
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
133
|
-
const token = this.configuration.accessToken;
|
|
134
|
-
const tokenString = await token('apiKey', []);
|
|
135
|
-
if (tokenString) {
|
|
136
|
-
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (this.configuration &&
|
|
140
|
-
(this.configuration.username !== undefined ||
|
|
141
|
-
this.configuration.password !== undefined)) {
|
|
142
|
-
headerParameters['Authorization'] =
|
|
143
|
-
'Basic ' +
|
|
144
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
145
|
-
}
|
|
146
|
-
let urlPath = `/user/inapp`;
|
|
147
|
-
const response = await this.request({
|
|
148
|
-
path: urlPath,
|
|
149
|
-
method: 'GET',
|
|
150
|
-
headers: headerParameters,
|
|
151
|
-
query: queryParameters
|
|
152
|
-
}, initOverrides);
|
|
153
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetInappNotificationsResponseFromJSON)(jsonValue));
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Get in-app notifications for a user
|
|
157
|
-
*/
|
|
158
|
-
async getInAppNotifications(before, count, initOverrides) {
|
|
159
|
-
const response = await this.getInAppNotificationsRaw({ before: before, count: count }, initOverrides);
|
|
160
|
-
return await response.value();
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Get the count of unread in-app notifications for a user
|
|
164
|
-
*/
|
|
165
|
-
async getInAppUnreadCountRaw(initOverrides) {
|
|
166
|
-
const queryParameters = {};
|
|
167
|
-
const headerParameters = {};
|
|
168
|
-
if (this.configuration &&
|
|
169
|
-
(this.configuration.username !== undefined ||
|
|
170
|
-
this.configuration.password !== undefined)) {
|
|
171
|
-
headerParameters['Authorization'] =
|
|
172
|
-
'Basic ' +
|
|
173
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
174
|
-
}
|
|
175
|
-
if (this.configuration &&
|
|
176
|
-
(this.configuration.username !== undefined ||
|
|
177
|
-
this.configuration.password !== undefined)) {
|
|
178
|
-
headerParameters['Authorization'] =
|
|
179
|
-
'Basic ' +
|
|
180
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
181
|
-
}
|
|
182
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
183
|
-
const token = this.configuration.accessToken;
|
|
184
|
-
const tokenString = await token('apiKey', []);
|
|
185
|
-
if (tokenString) {
|
|
186
|
-
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
if (this.configuration &&
|
|
190
|
-
(this.configuration.username !== undefined ||
|
|
191
|
-
this.configuration.password !== undefined)) {
|
|
192
|
-
headerParameters['Authorization'] =
|
|
193
|
-
'Basic ' +
|
|
194
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
195
|
-
}
|
|
196
|
-
let urlPath = `/user/inapp/unread`;
|
|
197
|
-
const response = await this.request({
|
|
198
|
-
path: urlPath,
|
|
199
|
-
method: 'GET',
|
|
200
|
-
headers: headerParameters,
|
|
201
|
-
query: queryParameters
|
|
202
|
-
}, initOverrides);
|
|
203
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.InappUnreadCountResponseFromJSON)(jsonValue));
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Get the count of unread in-app notifications for a user
|
|
207
|
-
*/
|
|
208
|
-
async getInAppUnreadCount(initOverrides) {
|
|
209
|
-
const response = await this.getInAppUnreadCountRaw(initOverrides);
|
|
210
|
-
return await response.value();
|
|
211
|
-
}
|
|
212
106
|
/**
|
|
213
107
|
* Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.
|
|
214
108
|
*/
|
|
@@ -322,117 +216,5 @@ class UserApi extends runtime.BaseAPI {
|
|
|
322
216
|
const response = await this.identifyRaw({ userId: userId, postUserRequest: postUserRequest }, initOverrides);
|
|
323
217
|
return await response.value();
|
|
324
218
|
}
|
|
325
|
-
/**
|
|
326
|
-
* Mark in-app web notifications as seen/read for a user
|
|
327
|
-
*/
|
|
328
|
-
async markInAppNotificationsAsSeenRaw(requestParameters, initOverrides) {
|
|
329
|
-
if (requestParameters['inAppNotificationUnreadClearRequest'] == null) {
|
|
330
|
-
throw new runtime.RequiredError('inAppNotificationUnreadClearRequest', 'Required parameter "inAppNotificationUnreadClearRequest" was null or undefined when calling markInAppNotificationsAsSeen().');
|
|
331
|
-
}
|
|
332
|
-
const queryParameters = {};
|
|
333
|
-
const headerParameters = {};
|
|
334
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
335
|
-
if (this.configuration &&
|
|
336
|
-
(this.configuration.username !== undefined ||
|
|
337
|
-
this.configuration.password !== undefined)) {
|
|
338
|
-
headerParameters['Authorization'] =
|
|
339
|
-
'Basic ' +
|
|
340
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
341
|
-
}
|
|
342
|
-
if (this.configuration &&
|
|
343
|
-
(this.configuration.username !== undefined ||
|
|
344
|
-
this.configuration.password !== undefined)) {
|
|
345
|
-
headerParameters['Authorization'] =
|
|
346
|
-
'Basic ' +
|
|
347
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
348
|
-
}
|
|
349
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
350
|
-
const token = this.configuration.accessToken;
|
|
351
|
-
const tokenString = await token('apiKey', []);
|
|
352
|
-
if (tokenString) {
|
|
353
|
-
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
if (this.configuration &&
|
|
357
|
-
(this.configuration.username !== undefined ||
|
|
358
|
-
this.configuration.password !== undefined)) {
|
|
359
|
-
headerParameters['Authorization'] =
|
|
360
|
-
'Basic ' +
|
|
361
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
362
|
-
}
|
|
363
|
-
let urlPath = `/user/inapp/unread`;
|
|
364
|
-
const response = await this.request({
|
|
365
|
-
path: urlPath,
|
|
366
|
-
method: 'PATCH',
|
|
367
|
-
headers: headerParameters,
|
|
368
|
-
query: queryParameters,
|
|
369
|
-
body: (0, index_1.InAppNotificationUnreadClearRequestToJSON)(requestParameters['inAppNotificationUnreadClearRequest'])
|
|
370
|
-
}, initOverrides);
|
|
371
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SuccessResponseFromJSON)(jsonValue));
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Mark in-app web notifications as seen/read for a user
|
|
375
|
-
*/
|
|
376
|
-
async markInAppNotificationsAsSeen(inAppNotificationUnreadClearRequest, initOverrides) {
|
|
377
|
-
const response = await this.markInAppNotificationsAsSeenRaw({
|
|
378
|
-
inAppNotificationUnreadClearRequest: inAppNotificationUnreadClearRequest
|
|
379
|
-
}, initOverrides);
|
|
380
|
-
return await response.value();
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Update in-app web notification status (opened, archived, clicked, etc.)
|
|
384
|
-
*/
|
|
385
|
-
async updateInAppNotificationStatusRaw(requestParameters, initOverrides) {
|
|
386
|
-
if (requestParameters['inAppNotificationPatchRequest'] == null) {
|
|
387
|
-
throw new runtime.RequiredError('inAppNotificationPatchRequest', 'Required parameter "inAppNotificationPatchRequest" was null or undefined when calling updateInAppNotificationStatus().');
|
|
388
|
-
}
|
|
389
|
-
const queryParameters = {};
|
|
390
|
-
const headerParameters = {};
|
|
391
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
392
|
-
if (this.configuration &&
|
|
393
|
-
(this.configuration.username !== undefined ||
|
|
394
|
-
this.configuration.password !== undefined)) {
|
|
395
|
-
headerParameters['Authorization'] =
|
|
396
|
-
'Basic ' +
|
|
397
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
398
|
-
}
|
|
399
|
-
if (this.configuration &&
|
|
400
|
-
(this.configuration.username !== undefined ||
|
|
401
|
-
this.configuration.password !== undefined)) {
|
|
402
|
-
headerParameters['Authorization'] =
|
|
403
|
-
'Basic ' +
|
|
404
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
405
|
-
}
|
|
406
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
407
|
-
const token = this.configuration.accessToken;
|
|
408
|
-
const tokenString = await token('apiKey', []);
|
|
409
|
-
if (tokenString) {
|
|
410
|
-
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
if (this.configuration &&
|
|
414
|
-
(this.configuration.username !== undefined ||
|
|
415
|
-
this.configuration.password !== undefined)) {
|
|
416
|
-
headerParameters['Authorization'] =
|
|
417
|
-
'Basic ' +
|
|
418
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
419
|
-
}
|
|
420
|
-
let urlPath = `/user/inapp`;
|
|
421
|
-
const response = await this.request({
|
|
422
|
-
path: urlPath,
|
|
423
|
-
method: 'PATCH',
|
|
424
|
-
headers: headerParameters,
|
|
425
|
-
query: queryParameters,
|
|
426
|
-
body: (0, index_1.InAppNotificationPatchRequestToJSON)(requestParameters['inAppNotificationPatchRequest'])
|
|
427
|
-
}, initOverrides);
|
|
428
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SuccessResponseFromJSON)(jsonValue));
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Update in-app web notification status (opened, archived, clicked, etc.)
|
|
432
|
-
*/
|
|
433
|
-
async updateInAppNotificationStatus(inAppNotificationPatchRequest, initOverrides) {
|
|
434
|
-
const response = await this.updateInAppNotificationStatusRaw({ inAppNotificationPatchRequest: inAppNotificationPatchRequest }, initOverrides);
|
|
435
|
-
return await response.value();
|
|
436
|
-
}
|
|
437
219
|
}
|
|
438
220
|
exports.UserApi = UserApi;
|
|
@@ -50,7 +50,7 @@ export type { CreateTemplateRequest, DeleteTemplateRequest, GetTemplateRequest,
|
|
|
50
50
|
export { TemplatesApi } from './TemplatesApi';
|
|
51
51
|
export type { CreateNotificationTypeRequest, DeleteNotificationTypeRequest, GetNotificationTypeRequest, UpdateNotificationTypeRequest, TypesApiInterface } from './TypesApi';
|
|
52
52
|
export { TypesApi } from './TypesApi';
|
|
53
|
-
export type {
|
|
53
|
+
export type { GetUserRequest, IdentifyRequest, UserApiInterface } from './UserApi';
|
|
54
54
|
export { UserApi } from './UserApi';
|
|
55
55
|
export type { DeleteUserRequest, ListUsersRequest, RemoveUserFromSuppressionRequest, UsersApiInterface } from './UsersApi';
|
|
56
56
|
export { UsersApi } from './UsersApi';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pingram
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { UserPreferencesGETResponseNotificationsInner } from './UserPreferencesGETResponseNotificationsInner';
|
|
13
|
+
import type { UserPreferencesGETResponseSubNotificationsInner } from './UserPreferencesGETResponseSubNotificationsInner';
|
|
14
|
+
import type { UserPreferencesGETResponsePreferencesInner } from './UserPreferencesGETResponsePreferencesInner';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface UserPreferencesGETResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface UserPreferencesGETResponse {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {Array<UserPreferencesGETResponsePreferencesInner>}
|
|
24
|
+
* @memberof UserPreferencesGETResponse
|
|
25
|
+
*/
|
|
26
|
+
preferences: Array<UserPreferencesGETResponsePreferencesInner>;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {Array<UserPreferencesGETResponseNotificationsInner>}
|
|
30
|
+
* @memberof UserPreferencesGETResponse
|
|
31
|
+
*/
|
|
32
|
+
notifications: Array<UserPreferencesGETResponseNotificationsInner>;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {Array<UserPreferencesGETResponseSubNotificationsInner>}
|
|
36
|
+
* @memberof UserPreferencesGETResponse
|
|
37
|
+
*/
|
|
38
|
+
subNotifications: Array<UserPreferencesGETResponseSubNotificationsInner>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the UserPreferencesGETResponse interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfUserPreferencesGETResponse(value: object): value is UserPreferencesGETResponse;
|
|
44
|
+
export declare function UserPreferencesGETResponseFromJSON(json: any): UserPreferencesGETResponse;
|
|
45
|
+
export declare function UserPreferencesGETResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferencesGETResponse;
|
|
46
|
+
export declare function UserPreferencesGETResponseToJSON(json: any): UserPreferencesGETResponse;
|
|
47
|
+
export declare function UserPreferencesGETResponseToJSONTyped(value?: UserPreferencesGETResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pingram
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfUserPreferencesGETResponse = instanceOfUserPreferencesGETResponse;
|
|
17
|
+
exports.UserPreferencesGETResponseFromJSON = UserPreferencesGETResponseFromJSON;
|
|
18
|
+
exports.UserPreferencesGETResponseFromJSONTyped = UserPreferencesGETResponseFromJSONTyped;
|
|
19
|
+
exports.UserPreferencesGETResponseToJSON = UserPreferencesGETResponseToJSON;
|
|
20
|
+
exports.UserPreferencesGETResponseToJSONTyped = UserPreferencesGETResponseToJSONTyped;
|
|
21
|
+
const UserPreferencesGETResponseNotificationsInner_1 = require("./UserPreferencesGETResponseNotificationsInner");
|
|
22
|
+
const UserPreferencesGETResponseSubNotificationsInner_1 = require("./UserPreferencesGETResponseSubNotificationsInner");
|
|
23
|
+
const UserPreferencesGETResponsePreferencesInner_1 = require("./UserPreferencesGETResponsePreferencesInner");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the UserPreferencesGETResponse interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfUserPreferencesGETResponse(value) {
|
|
28
|
+
if (!('preferences' in value) || value['preferences'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('notifications' in value) || value['notifications'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('subNotifications' in value) || value['subNotifications'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
function UserPreferencesGETResponseFromJSON(json) {
|
|
37
|
+
return UserPreferencesGETResponseFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
function UserPreferencesGETResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if (json == null) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
preferences: json['preferences'].map(UserPreferencesGETResponsePreferencesInner_1.UserPreferencesGETResponsePreferencesInnerFromJSON),
|
|
45
|
+
notifications: json['notifications'].map(UserPreferencesGETResponseNotificationsInner_1.UserPreferencesGETResponseNotificationsInnerFromJSON),
|
|
46
|
+
subNotifications: json['subNotifications'].map(UserPreferencesGETResponseSubNotificationsInner_1.UserPreferencesGETResponseSubNotificationsInnerFromJSON)
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function UserPreferencesGETResponseToJSON(json) {
|
|
50
|
+
return UserPreferencesGETResponseToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function UserPreferencesGETResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
preferences: (value['preferences'] ?? []).map(UserPreferencesGETResponsePreferencesInner_1.UserPreferencesGETResponsePreferencesInnerToJSON),
|
|
58
|
+
notifications: (value['notifications'] ?? []).map(UserPreferencesGETResponseNotificationsInner_1.UserPreferencesGETResponseNotificationsInnerToJSON),
|
|
59
|
+
subNotifications: (value['subNotifications'] ?? []).map(UserPreferencesGETResponseSubNotificationsInner_1.UserPreferencesGETResponseSubNotificationsInnerToJSON)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pingram
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ChannelsEnum } from './ChannelsEnum';
|
|
13
|
+
import type { GetNotificationsResponseInnerOptions } from './GetNotificationsResponseInnerOptions';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface UserPreferencesGETResponseNotificationsInner
|
|
18
|
+
*/
|
|
19
|
+
export interface UserPreferencesGETResponseNotificationsInner {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof UserPreferencesGETResponseNotificationsInner
|
|
24
|
+
*/
|
|
25
|
+
notificationId: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof UserPreferencesGETResponseNotificationsInner
|
|
30
|
+
*/
|
|
31
|
+
title: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {Array<ChannelsEnum>}
|
|
35
|
+
* @memberof UserPreferencesGETResponseNotificationsInner
|
|
36
|
+
*/
|
|
37
|
+
channels: Array<ChannelsEnum>;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {GetNotificationsResponseInnerOptions}
|
|
41
|
+
* @memberof UserPreferencesGETResponseNotificationsInner
|
|
42
|
+
*/
|
|
43
|
+
options?: GetNotificationsResponseInnerOptions;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the UserPreferencesGETResponseNotificationsInner interface.
|
|
47
|
+
*/
|
|
48
|
+
export declare function instanceOfUserPreferencesGETResponseNotificationsInner(value: object): value is UserPreferencesGETResponseNotificationsInner;
|
|
49
|
+
export declare function UserPreferencesGETResponseNotificationsInnerFromJSON(json: any): UserPreferencesGETResponseNotificationsInner;
|
|
50
|
+
export declare function UserPreferencesGETResponseNotificationsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferencesGETResponseNotificationsInner;
|
|
51
|
+
export declare function UserPreferencesGETResponseNotificationsInnerToJSON(json: any): UserPreferencesGETResponseNotificationsInner;
|
|
52
|
+
export declare function UserPreferencesGETResponseNotificationsInnerToJSONTyped(value?: UserPreferencesGETResponseNotificationsInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pingram
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfUserPreferencesGETResponseNotificationsInner = instanceOfUserPreferencesGETResponseNotificationsInner;
|
|
17
|
+
exports.UserPreferencesGETResponseNotificationsInnerFromJSON = UserPreferencesGETResponseNotificationsInnerFromJSON;
|
|
18
|
+
exports.UserPreferencesGETResponseNotificationsInnerFromJSONTyped = UserPreferencesGETResponseNotificationsInnerFromJSONTyped;
|
|
19
|
+
exports.UserPreferencesGETResponseNotificationsInnerToJSON = UserPreferencesGETResponseNotificationsInnerToJSON;
|
|
20
|
+
exports.UserPreferencesGETResponseNotificationsInnerToJSONTyped = UserPreferencesGETResponseNotificationsInnerToJSONTyped;
|
|
21
|
+
const ChannelsEnum_1 = require("./ChannelsEnum");
|
|
22
|
+
const GetNotificationsResponseInnerOptions_1 = require("./GetNotificationsResponseInnerOptions");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the UserPreferencesGETResponseNotificationsInner interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfUserPreferencesGETResponseNotificationsInner(value) {
|
|
27
|
+
if (!('notificationId' in value) || value['notificationId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('title' in value) || value['title'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('channels' in value) || value['channels'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function UserPreferencesGETResponseNotificationsInnerFromJSON(json) {
|
|
36
|
+
return UserPreferencesGETResponseNotificationsInnerFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function UserPreferencesGETResponseNotificationsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
notificationId: json['notificationId'],
|
|
44
|
+
title: json['title'],
|
|
45
|
+
channels: json['channels'].map(ChannelsEnum_1.ChannelsEnumFromJSON),
|
|
46
|
+
options: json['options'] == null
|
|
47
|
+
? undefined
|
|
48
|
+
: (0, GetNotificationsResponseInnerOptions_1.GetNotificationsResponseInnerOptionsFromJSON)(json['options'])
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function UserPreferencesGETResponseNotificationsInnerToJSON(json) {
|
|
52
|
+
return UserPreferencesGETResponseNotificationsInnerToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function UserPreferencesGETResponseNotificationsInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
notificationId: value['notificationId'],
|
|
60
|
+
title: value['title'],
|
|
61
|
+
channels: (value['channels'] ?? []).map(ChannelsEnum_1.ChannelsEnumToJSON),
|
|
62
|
+
options: (0, GetNotificationsResponseInnerOptions_1.GetNotificationsResponseInnerOptionsToJSON)(value['options'])
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pingram
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ChannelsEnum } from './ChannelsEnum';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UserPreferencesGETResponsePreferencesInner
|
|
17
|
+
*/
|
|
18
|
+
export interface UserPreferencesGETResponsePreferencesInner {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UserPreferencesGETResponsePreferencesInner
|
|
23
|
+
*/
|
|
24
|
+
notificationId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {ChannelsEnum}
|
|
28
|
+
* @memberof UserPreferencesGETResponsePreferencesInner
|
|
29
|
+
*/
|
|
30
|
+
channel: ChannelsEnum;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UserPreferencesGETResponsePreferencesInner
|
|
35
|
+
*/
|
|
36
|
+
delivery: UserPreferencesGETResponsePreferencesInnerDeliveryEnum;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof UserPreferencesGETResponsePreferencesInner
|
|
41
|
+
*/
|
|
42
|
+
subNotificationId?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @export
|
|
46
|
+
* @enum {string}
|
|
47
|
+
*/
|
|
48
|
+
export declare enum UserPreferencesGETResponsePreferencesInnerDeliveryEnum {
|
|
49
|
+
OFF = "off",
|
|
50
|
+
INSTANT = "instant",
|
|
51
|
+
HOURLY = "hourly",
|
|
52
|
+
DAILY = "daily",
|
|
53
|
+
WEEKLY = "weekly",
|
|
54
|
+
MONTHLY = "monthly"
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the UserPreferencesGETResponsePreferencesInner interface.
|
|
58
|
+
*/
|
|
59
|
+
export declare function instanceOfUserPreferencesGETResponsePreferencesInner(value: object): value is UserPreferencesGETResponsePreferencesInner;
|
|
60
|
+
export declare function UserPreferencesGETResponsePreferencesInnerFromJSON(json: any): UserPreferencesGETResponsePreferencesInner;
|
|
61
|
+
export declare function UserPreferencesGETResponsePreferencesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferencesGETResponsePreferencesInner;
|
|
62
|
+
export declare function UserPreferencesGETResponsePreferencesInnerToJSON(json: any): UserPreferencesGETResponsePreferencesInner;
|
|
63
|
+
export declare function UserPreferencesGETResponsePreferencesInnerToJSONTyped(value?: UserPreferencesGETResponsePreferencesInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pingram
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UserPreferencesGETResponsePreferencesInnerDeliveryEnum = void 0;
|
|
17
|
+
exports.instanceOfUserPreferencesGETResponsePreferencesInner = instanceOfUserPreferencesGETResponsePreferencesInner;
|
|
18
|
+
exports.UserPreferencesGETResponsePreferencesInnerFromJSON = UserPreferencesGETResponsePreferencesInnerFromJSON;
|
|
19
|
+
exports.UserPreferencesGETResponsePreferencesInnerFromJSONTyped = UserPreferencesGETResponsePreferencesInnerFromJSONTyped;
|
|
20
|
+
exports.UserPreferencesGETResponsePreferencesInnerToJSON = UserPreferencesGETResponsePreferencesInnerToJSON;
|
|
21
|
+
exports.UserPreferencesGETResponsePreferencesInnerToJSONTyped = UserPreferencesGETResponsePreferencesInnerToJSONTyped;
|
|
22
|
+
const ChannelsEnum_1 = require("./ChannelsEnum");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
* @enum {string}
|
|
26
|
+
*/
|
|
27
|
+
var UserPreferencesGETResponsePreferencesInnerDeliveryEnum;
|
|
28
|
+
(function (UserPreferencesGETResponsePreferencesInnerDeliveryEnum) {
|
|
29
|
+
UserPreferencesGETResponsePreferencesInnerDeliveryEnum["OFF"] = "off";
|
|
30
|
+
UserPreferencesGETResponsePreferencesInnerDeliveryEnum["INSTANT"] = "instant";
|
|
31
|
+
UserPreferencesGETResponsePreferencesInnerDeliveryEnum["HOURLY"] = "hourly";
|
|
32
|
+
UserPreferencesGETResponsePreferencesInnerDeliveryEnum["DAILY"] = "daily";
|
|
33
|
+
UserPreferencesGETResponsePreferencesInnerDeliveryEnum["WEEKLY"] = "weekly";
|
|
34
|
+
UserPreferencesGETResponsePreferencesInnerDeliveryEnum["MONTHLY"] = "monthly";
|
|
35
|
+
})(UserPreferencesGETResponsePreferencesInnerDeliveryEnum || (exports.UserPreferencesGETResponsePreferencesInnerDeliveryEnum = UserPreferencesGETResponsePreferencesInnerDeliveryEnum = {}));
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the UserPreferencesGETResponsePreferencesInner interface.
|
|
38
|
+
*/
|
|
39
|
+
function instanceOfUserPreferencesGETResponsePreferencesInner(value) {
|
|
40
|
+
if (!('notificationId' in value) || value['notificationId'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('channel' in value) || value['channel'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('delivery' in value) || value['delivery'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
function UserPreferencesGETResponsePreferencesInnerFromJSON(json) {
|
|
49
|
+
return UserPreferencesGETResponsePreferencesInnerFromJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function UserPreferencesGETResponsePreferencesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
52
|
+
if (json == null) {
|
|
53
|
+
return json;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
notificationId: json['notificationId'],
|
|
57
|
+
channel: (0, ChannelsEnum_1.ChannelsEnumFromJSON)(json['channel']),
|
|
58
|
+
delivery: json['delivery'],
|
|
59
|
+
subNotificationId: json['subNotificationId'] == null ? undefined : json['subNotificationId']
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function UserPreferencesGETResponsePreferencesInnerToJSON(json) {
|
|
63
|
+
return UserPreferencesGETResponsePreferencesInnerToJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
function UserPreferencesGETResponsePreferencesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
notificationId: value['notificationId'],
|
|
71
|
+
channel: (0, ChannelsEnum_1.ChannelsEnumToJSON)(value['channel']),
|
|
72
|
+
delivery: value['delivery'],
|
|
73
|
+
subNotificationId: value['subNotificationId']
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pingram
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UserPreferencesGETResponseSubNotificationsInner
|
|
16
|
+
*/
|
|
17
|
+
export interface UserPreferencesGETResponseSubNotificationsInner {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UserPreferencesGETResponseSubNotificationsInner
|
|
22
|
+
*/
|
|
23
|
+
notificationId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof UserPreferencesGETResponseSubNotificationsInner
|
|
28
|
+
*/
|
|
29
|
+
subNotificationId: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UserPreferencesGETResponseSubNotificationsInner
|
|
34
|
+
*/
|
|
35
|
+
title: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the UserPreferencesGETResponseSubNotificationsInner interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfUserPreferencesGETResponseSubNotificationsInner(value: object): value is UserPreferencesGETResponseSubNotificationsInner;
|
|
41
|
+
export declare function UserPreferencesGETResponseSubNotificationsInnerFromJSON(json: any): UserPreferencesGETResponseSubNotificationsInner;
|
|
42
|
+
export declare function UserPreferencesGETResponseSubNotificationsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferencesGETResponseSubNotificationsInner;
|
|
43
|
+
export declare function UserPreferencesGETResponseSubNotificationsInnerToJSON(json: any): UserPreferencesGETResponseSubNotificationsInner;
|
|
44
|
+
export declare function UserPreferencesGETResponseSubNotificationsInnerToJSONTyped(value?: UserPreferencesGETResponseSubNotificationsInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pingram
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfUserPreferencesGETResponseSubNotificationsInner = instanceOfUserPreferencesGETResponseSubNotificationsInner;
|
|
17
|
+
exports.UserPreferencesGETResponseSubNotificationsInnerFromJSON = UserPreferencesGETResponseSubNotificationsInnerFromJSON;
|
|
18
|
+
exports.UserPreferencesGETResponseSubNotificationsInnerFromJSONTyped = UserPreferencesGETResponseSubNotificationsInnerFromJSONTyped;
|
|
19
|
+
exports.UserPreferencesGETResponseSubNotificationsInnerToJSON = UserPreferencesGETResponseSubNotificationsInnerToJSON;
|
|
20
|
+
exports.UserPreferencesGETResponseSubNotificationsInnerToJSONTyped = UserPreferencesGETResponseSubNotificationsInnerToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the UserPreferencesGETResponseSubNotificationsInner interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfUserPreferencesGETResponseSubNotificationsInner(value) {
|
|
25
|
+
if (!('notificationId' in value) || value['notificationId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('subNotificationId' in value) ||
|
|
28
|
+
value['subNotificationId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('title' in value) || value['title'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function UserPreferencesGETResponseSubNotificationsInnerFromJSON(json) {
|
|
35
|
+
return UserPreferencesGETResponseSubNotificationsInnerFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function UserPreferencesGETResponseSubNotificationsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
notificationId: json['notificationId'],
|
|
43
|
+
subNotificationId: json['subNotificationId'],
|
|
44
|
+
title: json['title']
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function UserPreferencesGETResponseSubNotificationsInnerToJSON(json) {
|
|
48
|
+
return UserPreferencesGETResponseSubNotificationsInnerToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function UserPreferencesGETResponseSubNotificationsInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
notificationId: value['notificationId'],
|
|
56
|
+
subNotificationId: value['subNotificationId'],
|
|
57
|
+
title: value['title']
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pingram
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ChannelsEnum } from './ChannelsEnum';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UserPreferencesPOSTRequestInner
|
|
17
|
+
*/
|
|
18
|
+
export interface UserPreferencesPOSTRequestInner {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UserPreferencesPOSTRequestInner
|
|
23
|
+
*/
|
|
24
|
+
notificationId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UserPreferencesPOSTRequestInner
|
|
29
|
+
*/
|
|
30
|
+
subNotificationId: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {ChannelsEnum}
|
|
34
|
+
* @memberof UserPreferencesPOSTRequestInner
|
|
35
|
+
*/
|
|
36
|
+
channel: ChannelsEnum;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof UserPreferencesPOSTRequestInner
|
|
41
|
+
*/
|
|
42
|
+
state?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof UserPreferencesPOSTRequestInner
|
|
47
|
+
*/
|
|
48
|
+
delivery?: UserPreferencesPOSTRequestInnerDeliveryEnum;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @export
|
|
52
|
+
* @enum {string}
|
|
53
|
+
*/
|
|
54
|
+
export declare enum UserPreferencesPOSTRequestInnerDeliveryEnum {
|
|
55
|
+
OFF = "off",
|
|
56
|
+
INSTANT = "instant",
|
|
57
|
+
HOURLY = "hourly",
|
|
58
|
+
DAILY = "daily",
|
|
59
|
+
WEEKLY = "weekly",
|
|
60
|
+
MONTHLY = "monthly"
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the UserPreferencesPOSTRequestInner interface.
|
|
64
|
+
*/
|
|
65
|
+
export declare function instanceOfUserPreferencesPOSTRequestInner(value: object): value is UserPreferencesPOSTRequestInner;
|
|
66
|
+
export declare function UserPreferencesPOSTRequestInnerFromJSON(json: any): UserPreferencesPOSTRequestInner;
|
|
67
|
+
export declare function UserPreferencesPOSTRequestInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferencesPOSTRequestInner;
|
|
68
|
+
export declare function UserPreferencesPOSTRequestInnerToJSON(json: any): UserPreferencesPOSTRequestInner;
|
|
69
|
+
export declare function UserPreferencesPOSTRequestInnerToJSONTyped(value?: UserPreferencesPOSTRequestInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pingram
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UserPreferencesPOSTRequestInnerDeliveryEnum = void 0;
|
|
17
|
+
exports.instanceOfUserPreferencesPOSTRequestInner = instanceOfUserPreferencesPOSTRequestInner;
|
|
18
|
+
exports.UserPreferencesPOSTRequestInnerFromJSON = UserPreferencesPOSTRequestInnerFromJSON;
|
|
19
|
+
exports.UserPreferencesPOSTRequestInnerFromJSONTyped = UserPreferencesPOSTRequestInnerFromJSONTyped;
|
|
20
|
+
exports.UserPreferencesPOSTRequestInnerToJSON = UserPreferencesPOSTRequestInnerToJSON;
|
|
21
|
+
exports.UserPreferencesPOSTRequestInnerToJSONTyped = UserPreferencesPOSTRequestInnerToJSONTyped;
|
|
22
|
+
const ChannelsEnum_1 = require("./ChannelsEnum");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
* @enum {string}
|
|
26
|
+
*/
|
|
27
|
+
var UserPreferencesPOSTRequestInnerDeliveryEnum;
|
|
28
|
+
(function (UserPreferencesPOSTRequestInnerDeliveryEnum) {
|
|
29
|
+
UserPreferencesPOSTRequestInnerDeliveryEnum["OFF"] = "off";
|
|
30
|
+
UserPreferencesPOSTRequestInnerDeliveryEnum["INSTANT"] = "instant";
|
|
31
|
+
UserPreferencesPOSTRequestInnerDeliveryEnum["HOURLY"] = "hourly";
|
|
32
|
+
UserPreferencesPOSTRequestInnerDeliveryEnum["DAILY"] = "daily";
|
|
33
|
+
UserPreferencesPOSTRequestInnerDeliveryEnum["WEEKLY"] = "weekly";
|
|
34
|
+
UserPreferencesPOSTRequestInnerDeliveryEnum["MONTHLY"] = "monthly";
|
|
35
|
+
})(UserPreferencesPOSTRequestInnerDeliveryEnum || (exports.UserPreferencesPOSTRequestInnerDeliveryEnum = UserPreferencesPOSTRequestInnerDeliveryEnum = {}));
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the UserPreferencesPOSTRequestInner interface.
|
|
38
|
+
*/
|
|
39
|
+
function instanceOfUserPreferencesPOSTRequestInner(value) {
|
|
40
|
+
if (!('notificationId' in value) || value['notificationId'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('subNotificationId' in value) ||
|
|
43
|
+
value['subNotificationId'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('channel' in value) || value['channel'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
function UserPreferencesPOSTRequestInnerFromJSON(json) {
|
|
50
|
+
return UserPreferencesPOSTRequestInnerFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function UserPreferencesPOSTRequestInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
53
|
+
if (json == null) {
|
|
54
|
+
return json;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
notificationId: json['notificationId'],
|
|
58
|
+
subNotificationId: json['subNotificationId'],
|
|
59
|
+
channel: (0, ChannelsEnum_1.ChannelsEnumFromJSON)(json['channel']),
|
|
60
|
+
state: json['state'] == null ? undefined : json['state'],
|
|
61
|
+
delivery: json['delivery'] == null ? undefined : json['delivery']
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function UserPreferencesPOSTRequestInnerToJSON(json) {
|
|
65
|
+
return UserPreferencesPOSTRequestInnerToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
function UserPreferencesPOSTRequestInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
notificationId: value['notificationId'],
|
|
73
|
+
subNotificationId: value['subNotificationId'],
|
|
74
|
+
channel: (0, ChannelsEnum_1.ChannelsEnumToJSON)(value['channel']),
|
|
75
|
+
state: value['state'],
|
|
76
|
+
delivery: value['delivery']
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pingram
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { UserPreferencesPOSTResponseInnerChannelsStatesInner } from './UserPreferencesPOSTResponseInnerChannelsStatesInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UserPreferencesPOSTResponseInner
|
|
17
|
+
*/
|
|
18
|
+
export interface UserPreferencesPOSTResponseInner {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UserPreferencesPOSTResponseInner
|
|
23
|
+
*/
|
|
24
|
+
envId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UserPreferencesPOSTResponseInner
|
|
29
|
+
*/
|
|
30
|
+
userId: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UserPreferencesPOSTResponseInner
|
|
35
|
+
*/
|
|
36
|
+
notificationId: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof UserPreferencesPOSTResponseInner
|
|
41
|
+
*/
|
|
42
|
+
subNotificationId: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<UserPreferencesPOSTResponseInnerChannelsStatesInner>}
|
|
46
|
+
* @memberof UserPreferencesPOSTResponseInner
|
|
47
|
+
*/
|
|
48
|
+
channelsStates?: Array<UserPreferencesPOSTResponseInnerChannelsStatesInner>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the UserPreferencesPOSTResponseInner interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfUserPreferencesPOSTResponseInner(value: object): value is UserPreferencesPOSTResponseInner;
|
|
54
|
+
export declare function UserPreferencesPOSTResponseInnerFromJSON(json: any): UserPreferencesPOSTResponseInner;
|
|
55
|
+
export declare function UserPreferencesPOSTResponseInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferencesPOSTResponseInner;
|
|
56
|
+
export declare function UserPreferencesPOSTResponseInnerToJSON(json: any): UserPreferencesPOSTResponseInner;
|
|
57
|
+
export declare function UserPreferencesPOSTResponseInnerToJSONTyped(value?: UserPreferencesPOSTResponseInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pingram
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfUserPreferencesPOSTResponseInner = instanceOfUserPreferencesPOSTResponseInner;
|
|
17
|
+
exports.UserPreferencesPOSTResponseInnerFromJSON = UserPreferencesPOSTResponseInnerFromJSON;
|
|
18
|
+
exports.UserPreferencesPOSTResponseInnerFromJSONTyped = UserPreferencesPOSTResponseInnerFromJSONTyped;
|
|
19
|
+
exports.UserPreferencesPOSTResponseInnerToJSON = UserPreferencesPOSTResponseInnerToJSON;
|
|
20
|
+
exports.UserPreferencesPOSTResponseInnerToJSONTyped = UserPreferencesPOSTResponseInnerToJSONTyped;
|
|
21
|
+
const UserPreferencesPOSTResponseInnerChannelsStatesInner_1 = require("./UserPreferencesPOSTResponseInnerChannelsStatesInner");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the UserPreferencesPOSTResponseInner interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfUserPreferencesPOSTResponseInner(value) {
|
|
26
|
+
if (!('envId' in value) || value['envId'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('userId' in value) || value['userId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('notificationId' in value) || value['notificationId'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('subNotificationId' in value) ||
|
|
33
|
+
value['subNotificationId'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function UserPreferencesPOSTResponseInnerFromJSON(json) {
|
|
38
|
+
return UserPreferencesPOSTResponseInnerFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function UserPreferencesPOSTResponseInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
envId: json['envId'],
|
|
46
|
+
userId: json['userId'],
|
|
47
|
+
notificationId: json['notificationId'],
|
|
48
|
+
subNotificationId: json['subNotificationId'],
|
|
49
|
+
channelsStates: json['channelsStates'] == null
|
|
50
|
+
? undefined
|
|
51
|
+
: json['channelsStates'].map(UserPreferencesPOSTResponseInnerChannelsStatesInner_1.UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSON)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function UserPreferencesPOSTResponseInnerToJSON(json) {
|
|
55
|
+
return UserPreferencesPOSTResponseInnerToJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
function UserPreferencesPOSTResponseInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
58
|
+
if (value == null) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
envId: value['envId'],
|
|
63
|
+
userId: value['userId'],
|
|
64
|
+
notificationId: value['notificationId'],
|
|
65
|
+
subNotificationId: value['subNotificationId'],
|
|
66
|
+
channelsStates: value['channelsStates'] == null
|
|
67
|
+
? undefined
|
|
68
|
+
: (value['channelsStates'] ?? []).map(UserPreferencesPOSTResponseInnerChannelsStatesInner_1.UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSON)
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pingram
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ChannelsEnum } from './ChannelsEnum';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UserPreferencesPOSTResponseInnerChannelsStatesInner
|
|
17
|
+
*/
|
|
18
|
+
export interface UserPreferencesPOSTResponseInnerChannelsStatesInner {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {ChannelsEnum}
|
|
22
|
+
* @memberof UserPreferencesPOSTResponseInnerChannelsStatesInner
|
|
23
|
+
*/
|
|
24
|
+
channel: ChannelsEnum;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof UserPreferencesPOSTResponseInnerChannelsStatesInner
|
|
29
|
+
*/
|
|
30
|
+
state: boolean;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UserPreferencesPOSTResponseInnerChannelsStatesInner
|
|
35
|
+
*/
|
|
36
|
+
delivery: UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @export
|
|
40
|
+
* @enum {string}
|
|
41
|
+
*/
|
|
42
|
+
export declare enum UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum {
|
|
43
|
+
OFF = "off",
|
|
44
|
+
INSTANT = "instant",
|
|
45
|
+
HOURLY = "hourly",
|
|
46
|
+
DAILY = "daily",
|
|
47
|
+
WEEKLY = "weekly",
|
|
48
|
+
MONTHLY = "monthly"
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the UserPreferencesPOSTResponseInnerChannelsStatesInner interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfUserPreferencesPOSTResponseInnerChannelsStatesInner(value: object): value is UserPreferencesPOSTResponseInnerChannelsStatesInner;
|
|
54
|
+
export declare function UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSON(json: any): UserPreferencesPOSTResponseInnerChannelsStatesInner;
|
|
55
|
+
export declare function UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferencesPOSTResponseInnerChannelsStatesInner;
|
|
56
|
+
export declare function UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSON(json: any): UserPreferencesPOSTResponseInnerChannelsStatesInner;
|
|
57
|
+
export declare function UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSONTyped(value?: UserPreferencesPOSTResponseInnerChannelsStatesInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pingram
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum = void 0;
|
|
17
|
+
exports.instanceOfUserPreferencesPOSTResponseInnerChannelsStatesInner = instanceOfUserPreferencesPOSTResponseInnerChannelsStatesInner;
|
|
18
|
+
exports.UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSON = UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSON;
|
|
19
|
+
exports.UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSONTyped = UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSONTyped;
|
|
20
|
+
exports.UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSON = UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSON;
|
|
21
|
+
exports.UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSONTyped = UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSONTyped;
|
|
22
|
+
const ChannelsEnum_1 = require("./ChannelsEnum");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
* @enum {string}
|
|
26
|
+
*/
|
|
27
|
+
var UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum;
|
|
28
|
+
(function (UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum) {
|
|
29
|
+
UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum["OFF"] = "off";
|
|
30
|
+
UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum["INSTANT"] = "instant";
|
|
31
|
+
UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum["HOURLY"] = "hourly";
|
|
32
|
+
UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum["DAILY"] = "daily";
|
|
33
|
+
UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum["WEEKLY"] = "weekly";
|
|
34
|
+
UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum["MONTHLY"] = "monthly";
|
|
35
|
+
})(UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum || (exports.UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum = UserPreferencesPOSTResponseInnerChannelsStatesInnerDeliveryEnum = {}));
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the UserPreferencesPOSTResponseInnerChannelsStatesInner interface.
|
|
38
|
+
*/
|
|
39
|
+
function instanceOfUserPreferencesPOSTResponseInnerChannelsStatesInner(value) {
|
|
40
|
+
if (!('channel' in value) || value['channel'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('state' in value) || value['state'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('delivery' in value) || value['delivery'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
function UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSON(json) {
|
|
49
|
+
return UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function UserPreferencesPOSTResponseInnerChannelsStatesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
52
|
+
if (json == null) {
|
|
53
|
+
return json;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
channel: (0, ChannelsEnum_1.ChannelsEnumFromJSON)(json['channel']),
|
|
57
|
+
state: json['state'],
|
|
58
|
+
delivery: json['delivery']
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSON(json) {
|
|
62
|
+
return UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
function UserPreferencesPOSTResponseInnerChannelsStatesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
channel: (0, ChannelsEnum_1.ChannelsEnumToJSON)(value['channel']),
|
|
70
|
+
state: value['state'],
|
|
71
|
+
delivery: value['delivery']
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -278,6 +278,13 @@ export * from './UpdateBroadcastRequest';
|
|
|
278
278
|
export * from './UpdateVoiceAgentRequest';
|
|
279
279
|
export * from './UpdateVoiceAgentResponse';
|
|
280
280
|
export * from './User';
|
|
281
|
+
export * from './UserPreferencesGETResponse';
|
|
282
|
+
export * from './UserPreferencesGETResponseNotificationsInner';
|
|
283
|
+
export * from './UserPreferencesGETResponsePreferencesInner';
|
|
284
|
+
export * from './UserPreferencesGETResponseSubNotificationsInner';
|
|
285
|
+
export * from './UserPreferencesPOSTRequestInner';
|
|
286
|
+
export * from './UserPreferencesPOSTResponseInner';
|
|
287
|
+
export * from './UserPreferencesPOSTResponseInnerChannelsStatesInner';
|
|
281
288
|
export * from './UserSuppressionDeleteResponse';
|
|
282
289
|
export * from './VoiceBrowserCallRequest';
|
|
283
290
|
export * from './VoiceBrowserCallResponse';
|
|
@@ -296,6 +296,13 @@ __exportStar(require("./UpdateBroadcastRequest"), exports);
|
|
|
296
296
|
__exportStar(require("./UpdateVoiceAgentRequest"), exports);
|
|
297
297
|
__exportStar(require("./UpdateVoiceAgentResponse"), exports);
|
|
298
298
|
__exportStar(require("./User"), exports);
|
|
299
|
+
__exportStar(require("./UserPreferencesGETResponse"), exports);
|
|
300
|
+
__exportStar(require("./UserPreferencesGETResponseNotificationsInner"), exports);
|
|
301
|
+
__exportStar(require("./UserPreferencesGETResponsePreferencesInner"), exports);
|
|
302
|
+
__exportStar(require("./UserPreferencesGETResponseSubNotificationsInner"), exports);
|
|
303
|
+
__exportStar(require("./UserPreferencesPOSTRequestInner"), exports);
|
|
304
|
+
__exportStar(require("./UserPreferencesPOSTResponseInner"), exports);
|
|
305
|
+
__exportStar(require("./UserPreferencesPOSTResponseInnerChannelsStatesInner"), exports);
|
|
299
306
|
__exportStar(require("./UserSuppressionDeleteResponse"), exports);
|
|
300
307
|
__exportStar(require("./VoiceBrowserCallRequest"), exports);
|
|
301
308
|
__exportStar(require("./VoiceBrowserCallResponse"), exports);
|
package/dist/src/client.js
CHANGED
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.Pingram = void 0;
|
|
9
9
|
const src_1 = require("../generated/src");
|
|
10
10
|
// SDK version for User-Agent header (injected at codegen time)
|
|
11
|
-
const SDK_VERSION = '1.0.
|
|
11
|
+
const SDK_VERSION = '1.0.34';
|
|
12
12
|
const USER_AGENT = `pingram-node/${SDK_VERSION}`;
|
|
13
13
|
const src_2 = require("../generated/src");
|
|
14
14
|
const src_3 = require("../generated/src");
|
package/package.json
CHANGED