pingram 1.0.2 → 1.0.3

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.
@@ -0,0 +1,154 @@
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 * as runtime from '../runtime';
13
+ import type { APNConfig, PushSettingsFCMPutRequest, PushSettingsFCMResponse } from '../models/index';
14
+ export interface UpsertPushApnSettingsRequest {
15
+ aPNConfig: APNConfig;
16
+ }
17
+ export interface UpsertPushFcmSettingsRequest {
18
+ pushSettingsFCMPutRequest: PushSettingsFCMPutRequest;
19
+ }
20
+ /**
21
+ * PushSettingsApi - interface
22
+ *
23
+ * @export
24
+ * @interface PushSettingsApiInterface
25
+ */
26
+ export interface PushSettingsApiInterface {
27
+ /**
28
+ *
29
+ * @summary Delete Apple Push Notification (APN) configuration for the current account.
30
+ * @param {*} [options] Override http request option.
31
+ * @throws {RequiredError}
32
+ * @memberof PushSettingsApiInterface
33
+ */
34
+ deletePushApnSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
35
+ /**
36
+ * Delete Apple Push Notification (APN) configuration for the current account.
37
+ */
38
+ deletePushApnSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
39
+ /**
40
+ *
41
+ * @summary Delete Firebase Cloud Messaging (FCM) configuration for the current account.
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ * @memberof PushSettingsApiInterface
45
+ */
46
+ deletePushFcmSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
47
+ /**
48
+ * Delete Firebase Cloud Messaging (FCM) configuration for the current account.
49
+ */
50
+ deletePushFcmSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
51
+ /**
52
+ *
53
+ * @summary Get Apple Push Notification (APN) configuration for the current account.
54
+ * @param {*} [options] Override http request option.
55
+ * @throws {RequiredError}
56
+ * @memberof PushSettingsApiInterface
57
+ */
58
+ getPushApnSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APNConfig>>;
59
+ /**
60
+ * Get Apple Push Notification (APN) configuration for the current account.
61
+ */
62
+ getPushApnSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APNConfig>;
63
+ /**
64
+ *
65
+ * @summary Get Firebase Cloud Messaging (FCM) configuration for the current account.
66
+ * @param {*} [options] Override http request option.
67
+ * @throws {RequiredError}
68
+ * @memberof PushSettingsApiInterface
69
+ */
70
+ getPushFcmSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PushSettingsFCMResponse>>;
71
+ /**
72
+ * Get Firebase Cloud Messaging (FCM) configuration for the current account.
73
+ */
74
+ getPushFcmSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PushSettingsFCMResponse>;
75
+ /**
76
+ *
77
+ * @summary Create or update Apple Push Notification (APN) configuration for the current account.
78
+ * @param {APNConfig} aPNConfig
79
+ * @param {*} [options] Override http request option.
80
+ * @throws {RequiredError}
81
+ * @memberof PushSettingsApiInterface
82
+ */
83
+ upsertPushApnSettingsRaw(requestParameters: UpsertPushApnSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APNConfig>>;
84
+ /**
85
+ * Create or update Apple Push Notification (APN) configuration for the current account.
86
+ */
87
+ upsertPushApnSettings(aPNConfig: APNConfig, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APNConfig>;
88
+ /**
89
+ *
90
+ * @summary Create or update Firebase Cloud Messaging (FCM) configuration for the current account.
91
+ * @param {PushSettingsFCMPutRequest} pushSettingsFCMPutRequest
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ * @memberof PushSettingsApiInterface
95
+ */
96
+ upsertPushFcmSettingsRaw(requestParameters: UpsertPushFcmSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PushSettingsFCMResponse>>;
97
+ /**
98
+ * Create or update Firebase Cloud Messaging (FCM) configuration for the current account.
99
+ */
100
+ upsertPushFcmSettings(pushSettingsFCMPutRequest: PushSettingsFCMPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PushSettingsFCMResponse>;
101
+ }
102
+ /**
103
+ *
104
+ */
105
+ export declare class PushSettingsApi extends runtime.BaseAPI implements PushSettingsApiInterface {
106
+ /**
107
+ * Delete Apple Push Notification (APN) configuration for the current account.
108
+ */
109
+ deletePushApnSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
110
+ /**
111
+ * Delete Apple Push Notification (APN) configuration for the current account.
112
+ */
113
+ deletePushApnSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
114
+ /**
115
+ * Delete Firebase Cloud Messaging (FCM) configuration for the current account.
116
+ */
117
+ deletePushFcmSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
118
+ /**
119
+ * Delete Firebase Cloud Messaging (FCM) configuration for the current account.
120
+ */
121
+ deletePushFcmSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
122
+ /**
123
+ * Get Apple Push Notification (APN) configuration for the current account.
124
+ */
125
+ getPushApnSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APNConfig>>;
126
+ /**
127
+ * Get Apple Push Notification (APN) configuration for the current account.
128
+ */
129
+ getPushApnSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APNConfig>;
130
+ /**
131
+ * Get Firebase Cloud Messaging (FCM) configuration for the current account.
132
+ */
133
+ getPushFcmSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PushSettingsFCMResponse>>;
134
+ /**
135
+ * Get Firebase Cloud Messaging (FCM) configuration for the current account.
136
+ */
137
+ getPushFcmSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PushSettingsFCMResponse>;
138
+ /**
139
+ * Create or update Apple Push Notification (APN) configuration for the current account.
140
+ */
141
+ upsertPushApnSettingsRaw(requestParameters: UpsertPushApnSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APNConfig>>;
142
+ /**
143
+ * Create or update Apple Push Notification (APN) configuration for the current account.
144
+ */
145
+ upsertPushApnSettings(aPNConfig: APNConfig, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APNConfig>;
146
+ /**
147
+ * Create or update Firebase Cloud Messaging (FCM) configuration for the current account.
148
+ */
149
+ upsertPushFcmSettingsRaw(requestParameters: UpsertPushFcmSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PushSettingsFCMResponse>>;
150
+ /**
151
+ * Create or update Firebase Cloud Messaging (FCM) configuration for the current account.
152
+ */
153
+ upsertPushFcmSettings(pushSettingsFCMPutRequest: PushSettingsFCMPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PushSettingsFCMResponse>;
154
+ }
@@ -0,0 +1,365 @@
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.PushSettingsApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class PushSettingsApi extends runtime.BaseAPI {
56
+ /**
57
+ * Delete Apple Push Notification (APN) configuration for the current account.
58
+ */
59
+ async deletePushApnSettingsRaw(initOverrides) {
60
+ const queryParameters = {};
61
+ const headerParameters = {};
62
+ if (this.configuration &&
63
+ (this.configuration.username !== undefined ||
64
+ this.configuration.password !== undefined)) {
65
+ headerParameters['Authorization'] =
66
+ 'Basic ' +
67
+ btoa(this.configuration.username + ':' + this.configuration.password);
68
+ }
69
+ if (this.configuration &&
70
+ (this.configuration.username !== undefined ||
71
+ this.configuration.password !== undefined)) {
72
+ headerParameters['Authorization'] =
73
+ 'Basic ' +
74
+ btoa(this.configuration.username + ':' + this.configuration.password);
75
+ }
76
+ if (this.configuration && this.configuration.accessToken) {
77
+ const token = this.configuration.accessToken;
78
+ const tokenString = await token('apiKey', []);
79
+ if (tokenString) {
80
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
81
+ }
82
+ }
83
+ if (this.configuration &&
84
+ (this.configuration.username !== undefined ||
85
+ this.configuration.password !== undefined)) {
86
+ headerParameters['Authorization'] =
87
+ 'Basic ' +
88
+ btoa(this.configuration.username + ':' + this.configuration.password);
89
+ }
90
+ let urlPath = `/settings/push/apn`;
91
+ const response = await this.request({
92
+ path: urlPath,
93
+ method: 'DELETE',
94
+ headers: headerParameters,
95
+ query: queryParameters
96
+ }, initOverrides);
97
+ return new runtime.VoidApiResponse(response);
98
+ }
99
+ /**
100
+ * Delete Apple Push Notification (APN) configuration for the current account.
101
+ */
102
+ async deletePushApnSettings(initOverrides) {
103
+ await this.deletePushApnSettingsRaw(initOverrides);
104
+ }
105
+ /**
106
+ * Delete Firebase Cloud Messaging (FCM) configuration for the current account.
107
+ */
108
+ async deletePushFcmSettingsRaw(initOverrides) {
109
+ const queryParameters = {};
110
+ const headerParameters = {};
111
+ if (this.configuration &&
112
+ (this.configuration.username !== undefined ||
113
+ this.configuration.password !== undefined)) {
114
+ headerParameters['Authorization'] =
115
+ 'Basic ' +
116
+ btoa(this.configuration.username + ':' + this.configuration.password);
117
+ }
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 && this.configuration.accessToken) {
126
+ const token = this.configuration.accessToken;
127
+ const tokenString = await token('apiKey', []);
128
+ if (tokenString) {
129
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
130
+ }
131
+ }
132
+ if (this.configuration &&
133
+ (this.configuration.username !== undefined ||
134
+ this.configuration.password !== undefined)) {
135
+ headerParameters['Authorization'] =
136
+ 'Basic ' +
137
+ btoa(this.configuration.username + ':' + this.configuration.password);
138
+ }
139
+ let urlPath = `/settings/push/fcm`;
140
+ const response = await this.request({
141
+ path: urlPath,
142
+ method: 'DELETE',
143
+ headers: headerParameters,
144
+ query: queryParameters
145
+ }, initOverrides);
146
+ return new runtime.VoidApiResponse(response);
147
+ }
148
+ /**
149
+ * Delete Firebase Cloud Messaging (FCM) configuration for the current account.
150
+ */
151
+ async deletePushFcmSettings(initOverrides) {
152
+ await this.deletePushFcmSettingsRaw(initOverrides);
153
+ }
154
+ /**
155
+ * Get Apple Push Notification (APN) configuration for the current account.
156
+ */
157
+ async getPushApnSettingsRaw(initOverrides) {
158
+ const queryParameters = {};
159
+ const headerParameters = {};
160
+ if (this.configuration &&
161
+ (this.configuration.username !== undefined ||
162
+ this.configuration.password !== undefined)) {
163
+ headerParameters['Authorization'] =
164
+ 'Basic ' +
165
+ btoa(this.configuration.username + ':' + this.configuration.password);
166
+ }
167
+ if (this.configuration &&
168
+ (this.configuration.username !== undefined ||
169
+ this.configuration.password !== undefined)) {
170
+ headerParameters['Authorization'] =
171
+ 'Basic ' +
172
+ btoa(this.configuration.username + ':' + this.configuration.password);
173
+ }
174
+ if (this.configuration && this.configuration.accessToken) {
175
+ const token = this.configuration.accessToken;
176
+ const tokenString = await token('apiKey', []);
177
+ if (tokenString) {
178
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
179
+ }
180
+ }
181
+ if (this.configuration &&
182
+ (this.configuration.username !== undefined ||
183
+ this.configuration.password !== undefined)) {
184
+ headerParameters['Authorization'] =
185
+ 'Basic ' +
186
+ btoa(this.configuration.username + ':' + this.configuration.password);
187
+ }
188
+ let urlPath = `/settings/push/apn`;
189
+ const response = await this.request({
190
+ path: urlPath,
191
+ method: 'GET',
192
+ headers: headerParameters,
193
+ query: queryParameters
194
+ }, initOverrides);
195
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.APNConfigFromJSON)(jsonValue));
196
+ }
197
+ /**
198
+ * Get Apple Push Notification (APN) configuration for the current account.
199
+ */
200
+ async getPushApnSettings(initOverrides) {
201
+ const response = await this.getPushApnSettingsRaw(initOverrides);
202
+ return await response.value();
203
+ }
204
+ /**
205
+ * Get Firebase Cloud Messaging (FCM) configuration for the current account.
206
+ */
207
+ async getPushFcmSettingsRaw(initOverrides) {
208
+ const queryParameters = {};
209
+ const headerParameters = {};
210
+ if (this.configuration &&
211
+ (this.configuration.username !== undefined ||
212
+ this.configuration.password !== undefined)) {
213
+ headerParameters['Authorization'] =
214
+ 'Basic ' +
215
+ btoa(this.configuration.username + ':' + this.configuration.password);
216
+ }
217
+ if (this.configuration &&
218
+ (this.configuration.username !== undefined ||
219
+ this.configuration.password !== undefined)) {
220
+ headerParameters['Authorization'] =
221
+ 'Basic ' +
222
+ btoa(this.configuration.username + ':' + this.configuration.password);
223
+ }
224
+ if (this.configuration && this.configuration.accessToken) {
225
+ const token = this.configuration.accessToken;
226
+ const tokenString = await token('apiKey', []);
227
+ if (tokenString) {
228
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
229
+ }
230
+ }
231
+ if (this.configuration &&
232
+ (this.configuration.username !== undefined ||
233
+ this.configuration.password !== undefined)) {
234
+ headerParameters['Authorization'] =
235
+ 'Basic ' +
236
+ btoa(this.configuration.username + ':' + this.configuration.password);
237
+ }
238
+ let urlPath = `/settings/push/fcm`;
239
+ const response = await this.request({
240
+ path: urlPath,
241
+ method: 'GET',
242
+ headers: headerParameters,
243
+ query: queryParameters
244
+ }, initOverrides);
245
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PushSettingsFCMResponseFromJSON)(jsonValue));
246
+ }
247
+ /**
248
+ * Get Firebase Cloud Messaging (FCM) configuration for the current account.
249
+ */
250
+ async getPushFcmSettings(initOverrides) {
251
+ const response = await this.getPushFcmSettingsRaw(initOverrides);
252
+ return await response.value();
253
+ }
254
+ /**
255
+ * Create or update Apple Push Notification (APN) configuration for the current account.
256
+ */
257
+ async upsertPushApnSettingsRaw(requestParameters, initOverrides) {
258
+ if (requestParameters['aPNConfig'] == null) {
259
+ throw new runtime.RequiredError('aPNConfig', 'Required parameter "aPNConfig" was null or undefined when calling upsertPushApnSettings().');
260
+ }
261
+ const queryParameters = {};
262
+ const headerParameters = {};
263
+ headerParameters['Content-Type'] = 'application/json';
264
+ if (this.configuration &&
265
+ (this.configuration.username !== undefined ||
266
+ this.configuration.password !== undefined)) {
267
+ headerParameters['Authorization'] =
268
+ 'Basic ' +
269
+ btoa(this.configuration.username + ':' + this.configuration.password);
270
+ }
271
+ if (this.configuration &&
272
+ (this.configuration.username !== undefined ||
273
+ this.configuration.password !== undefined)) {
274
+ headerParameters['Authorization'] =
275
+ 'Basic ' +
276
+ btoa(this.configuration.username + ':' + this.configuration.password);
277
+ }
278
+ if (this.configuration && this.configuration.accessToken) {
279
+ const token = this.configuration.accessToken;
280
+ const tokenString = await token('apiKey', []);
281
+ if (tokenString) {
282
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
283
+ }
284
+ }
285
+ if (this.configuration &&
286
+ (this.configuration.username !== undefined ||
287
+ this.configuration.password !== undefined)) {
288
+ headerParameters['Authorization'] =
289
+ 'Basic ' +
290
+ btoa(this.configuration.username + ':' + this.configuration.password);
291
+ }
292
+ let urlPath = `/settings/push/apn`;
293
+ const response = await this.request({
294
+ path: urlPath,
295
+ method: 'PUT',
296
+ headers: headerParameters,
297
+ query: queryParameters,
298
+ body: (0, index_1.APNConfigToJSON)(requestParameters['aPNConfig'])
299
+ }, initOverrides);
300
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.APNConfigFromJSON)(jsonValue));
301
+ }
302
+ /**
303
+ * Create or update Apple Push Notification (APN) configuration for the current account.
304
+ */
305
+ async upsertPushApnSettings(aPNConfig, initOverrides) {
306
+ const response = await this.upsertPushApnSettingsRaw({ aPNConfig: aPNConfig }, initOverrides);
307
+ return await response.value();
308
+ }
309
+ /**
310
+ * Create or update Firebase Cloud Messaging (FCM) configuration for the current account.
311
+ */
312
+ async upsertPushFcmSettingsRaw(requestParameters, initOverrides) {
313
+ if (requestParameters['pushSettingsFCMPutRequest'] == null) {
314
+ throw new runtime.RequiredError('pushSettingsFCMPutRequest', 'Required parameter "pushSettingsFCMPutRequest" was null or undefined when calling upsertPushFcmSettings().');
315
+ }
316
+ const queryParameters = {};
317
+ const headerParameters = {};
318
+ headerParameters['Content-Type'] = 'application/json';
319
+ if (this.configuration &&
320
+ (this.configuration.username !== undefined ||
321
+ this.configuration.password !== undefined)) {
322
+ headerParameters['Authorization'] =
323
+ 'Basic ' +
324
+ btoa(this.configuration.username + ':' + this.configuration.password);
325
+ }
326
+ if (this.configuration &&
327
+ (this.configuration.username !== undefined ||
328
+ this.configuration.password !== undefined)) {
329
+ headerParameters['Authorization'] =
330
+ 'Basic ' +
331
+ btoa(this.configuration.username + ':' + this.configuration.password);
332
+ }
333
+ if (this.configuration && this.configuration.accessToken) {
334
+ const token = this.configuration.accessToken;
335
+ const tokenString = await token('apiKey', []);
336
+ if (tokenString) {
337
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
338
+ }
339
+ }
340
+ if (this.configuration &&
341
+ (this.configuration.username !== undefined ||
342
+ this.configuration.password !== undefined)) {
343
+ headerParameters['Authorization'] =
344
+ 'Basic ' +
345
+ btoa(this.configuration.username + ':' + this.configuration.password);
346
+ }
347
+ let urlPath = `/settings/push/fcm`;
348
+ const response = await this.request({
349
+ path: urlPath,
350
+ method: 'PUT',
351
+ headers: headerParameters,
352
+ query: queryParameters,
353
+ body: (0, index_1.PushSettingsFCMPutRequestToJSON)(requestParameters['pushSettingsFCMPutRequest'])
354
+ }, initOverrides);
355
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PushSettingsFCMResponseFromJSON)(jsonValue));
356
+ }
357
+ /**
358
+ * Create or update Firebase Cloud Messaging (FCM) configuration for the current account.
359
+ */
360
+ async upsertPushFcmSettings(pushSettingsFCMPutRequest, initOverrides) {
361
+ const response = await this.upsertPushFcmSettingsRaw({ pushSettingsFCMPutRequest: pushSettingsFCMPutRequest }, initOverrides);
362
+ return await response.value();
363
+ }
364
+ }
365
+ exports.PushSettingsApi = PushSettingsApi;
@@ -11,6 +11,7 @@ export * from './KeysApi';
11
11
  export * from './LogsApi';
12
12
  export * from './MembersApi';
13
13
  export * from './OrganizationApi';
14
+ export * from './PushSettingsApi';
14
15
  export * from './SenderApi';
15
16
  export * from './TemplatesApi';
16
17
  export * from './TypesApi';
@@ -29,6 +29,7 @@ __exportStar(require("./KeysApi"), exports);
29
29
  __exportStar(require("./LogsApi"), exports);
30
30
  __exportStar(require("./MembersApi"), exports);
31
31
  __exportStar(require("./OrganizationApi"), exports);
32
+ __exportStar(require("./PushSettingsApi"), exports);
32
33
  __exportStar(require("./SenderApi"), exports);
33
34
  __exportStar(require("./TemplatesApi"), exports);
34
35
  __exportStar(require("./TypesApi"), exports);
@@ -0,0 +1,50 @@
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 APNConfig
16
+ */
17
+ export interface APNConfig {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof APNConfig
22
+ */
23
+ KeyId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof APNConfig
28
+ */
29
+ Key: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof APNConfig
34
+ */
35
+ TeamId: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof APNConfig
40
+ */
41
+ Topic: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the APNConfig interface.
45
+ */
46
+ export declare function instanceOfAPNConfig(value: object): value is APNConfig;
47
+ export declare function APNConfigFromJSON(json: any): APNConfig;
48
+ export declare function APNConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): APNConfig;
49
+ export declare function APNConfigToJSON(json: any): APNConfig;
50
+ export declare function APNConfigToJSONTyped(value?: APNConfig | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,62 @@
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.instanceOfAPNConfig = instanceOfAPNConfig;
17
+ exports.APNConfigFromJSON = APNConfigFromJSON;
18
+ exports.APNConfigFromJSONTyped = APNConfigFromJSONTyped;
19
+ exports.APNConfigToJSON = APNConfigToJSON;
20
+ exports.APNConfigToJSONTyped = APNConfigToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the APNConfig interface.
23
+ */
24
+ function instanceOfAPNConfig(value) {
25
+ if (!('KeyId' in value) || value['KeyId'] === undefined)
26
+ return false;
27
+ if (!('Key' in value) || value['Key'] === undefined)
28
+ return false;
29
+ if (!('TeamId' in value) || value['TeamId'] === undefined)
30
+ return false;
31
+ if (!('Topic' in value) || value['Topic'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function APNConfigFromJSON(json) {
36
+ return APNConfigFromJSONTyped(json, false);
37
+ }
38
+ function APNConfigFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ KeyId: json['KeyId'],
44
+ Key: json['Key'],
45
+ TeamId: json['TeamId'],
46
+ Topic: json['Topic']
47
+ };
48
+ }
49
+ function APNConfigToJSON(json) {
50
+ return APNConfigToJSONTyped(json, false);
51
+ }
52
+ function APNConfigToJSONTyped(value, ignoreDiscriminator = false) {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ KeyId: value['KeyId'],
58
+ Key: value['Key'],
59
+ TeamId: value['TeamId'],
60
+ Topic: value['Topic']
61
+ };
62
+ }
@@ -0,0 +1,32 @@
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 PushSettingsFCMPutRequest
16
+ */
17
+ export interface PushSettingsFCMPutRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof PushSettingsFCMPutRequest
22
+ */
23
+ fcmConfig: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the PushSettingsFCMPutRequest interface.
27
+ */
28
+ export declare function instanceOfPushSettingsFCMPutRequest(value: object): value is PushSettingsFCMPutRequest;
29
+ export declare function PushSettingsFCMPutRequestFromJSON(json: any): PushSettingsFCMPutRequest;
30
+ export declare function PushSettingsFCMPutRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushSettingsFCMPutRequest;
31
+ export declare function PushSettingsFCMPutRequestToJSON(json: any): PushSettingsFCMPutRequest;
32
+ export declare function PushSettingsFCMPutRequestToJSONTyped(value?: PushSettingsFCMPutRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfPushSettingsFCMPutRequest = instanceOfPushSettingsFCMPutRequest;
17
+ exports.PushSettingsFCMPutRequestFromJSON = PushSettingsFCMPutRequestFromJSON;
18
+ exports.PushSettingsFCMPutRequestFromJSONTyped = PushSettingsFCMPutRequestFromJSONTyped;
19
+ exports.PushSettingsFCMPutRequestToJSON = PushSettingsFCMPutRequestToJSON;
20
+ exports.PushSettingsFCMPutRequestToJSONTyped = PushSettingsFCMPutRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the PushSettingsFCMPutRequest interface.
23
+ */
24
+ function instanceOfPushSettingsFCMPutRequest(value) {
25
+ if (!('fcmConfig' in value) || value['fcmConfig'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function PushSettingsFCMPutRequestFromJSON(json) {
30
+ return PushSettingsFCMPutRequestFromJSONTyped(json, false);
31
+ }
32
+ function PushSettingsFCMPutRequestFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ fcmConfig: json['fcmConfig']
38
+ };
39
+ }
40
+ function PushSettingsFCMPutRequestToJSON(json) {
41
+ return PushSettingsFCMPutRequestToJSONTyped(json, false);
42
+ }
43
+ function PushSettingsFCMPutRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ fcmConfig: value['fcmConfig']
49
+ };
50
+ }
@@ -0,0 +1,32 @@
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 PushSettingsFCMResponse
16
+ */
17
+ export interface PushSettingsFCMResponse {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof PushSettingsFCMResponse
22
+ */
23
+ fcmConfig: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the PushSettingsFCMResponse interface.
27
+ */
28
+ export declare function instanceOfPushSettingsFCMResponse(value: object): value is PushSettingsFCMResponse;
29
+ export declare function PushSettingsFCMResponseFromJSON(json: any): PushSettingsFCMResponse;
30
+ export declare function PushSettingsFCMResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushSettingsFCMResponse;
31
+ export declare function PushSettingsFCMResponseToJSON(json: any): PushSettingsFCMResponse;
32
+ export declare function PushSettingsFCMResponseToJSONTyped(value?: PushSettingsFCMResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfPushSettingsFCMResponse = instanceOfPushSettingsFCMResponse;
17
+ exports.PushSettingsFCMResponseFromJSON = PushSettingsFCMResponseFromJSON;
18
+ exports.PushSettingsFCMResponseFromJSONTyped = PushSettingsFCMResponseFromJSONTyped;
19
+ exports.PushSettingsFCMResponseToJSON = PushSettingsFCMResponseToJSON;
20
+ exports.PushSettingsFCMResponseToJSONTyped = PushSettingsFCMResponseToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the PushSettingsFCMResponse interface.
23
+ */
24
+ function instanceOfPushSettingsFCMResponse(value) {
25
+ if (!('fcmConfig' in value) || value['fcmConfig'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function PushSettingsFCMResponseFromJSON(json) {
30
+ return PushSettingsFCMResponseFromJSONTyped(json, false);
31
+ }
32
+ function PushSettingsFCMResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ fcmConfig: json['fcmConfig']
38
+ };
39
+ }
40
+ function PushSettingsFCMResponseToJSON(json) {
41
+ return PushSettingsFCMResponseToJSONTyped(json, false);
42
+ }
43
+ function PushSettingsFCMResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ fcmConfig: value['fcmConfig']
49
+ };
50
+ }
@@ -1,3 +1,4 @@
1
+ export * from './APNConfig';
1
2
  export * from './AccountAddressesResponse';
2
3
  export * from './AccountAddressesResponseAddressesInner';
3
4
  export * from './AccountGetResponse';
@@ -127,6 +128,8 @@ export * from './PostEmailTestRequest';
127
128
  export * from './PostEmailTestResponse';
128
129
  export * from './PostSendersRequestBody';
129
130
  export * from './PostUserRequest';
131
+ export * from './PushSettingsFCMPutRequest';
132
+ export * from './PushSettingsFCMResponse';
130
133
  export * from './SenderPostBody';
131
134
  export * from './SenderPostBodyCall';
132
135
  export * from './SenderPostBodyEmail';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
+ __exportStar(require("./APNConfig"), exports);
19
20
  __exportStar(require("./AccountAddressesResponse"), exports);
20
21
  __exportStar(require("./AccountAddressesResponseAddressesInner"), exports);
21
22
  __exportStar(require("./AccountGetResponse"), exports);
@@ -145,6 +146,8 @@ __exportStar(require("./PostEmailTestRequest"), exports);
145
146
  __exportStar(require("./PostEmailTestResponse"), exports);
146
147
  __exportStar(require("./PostSendersRequestBody"), exports);
147
148
  __exportStar(require("./PostUserRequest"), exports);
149
+ __exportStar(require("./PushSettingsFCMPutRequest"), exports);
150
+ __exportStar(require("./PushSettingsFCMResponse"), exports);
148
151
  __exportStar(require("./SenderPostBody"), exports);
149
152
  __exportStar(require("./SenderPostBodyCall"), exports);
150
153
  __exportStar(require("./SenderPostBodyEmail"), exports);
@@ -15,6 +15,7 @@ import { KeysApi } from '../generated/src';
15
15
  import { LogsApi } from '../generated/src';
16
16
  import { MembersApi } from '../generated/src';
17
17
  import { OrganizationApi } from '../generated/src';
18
+ import { PushSettingsApi } from '../generated/src';
18
19
  import { SenderApi } from '../generated/src';
19
20
  import { TemplatesApi } from '../generated/src';
20
21
  import { TypesApi } from '../generated/src';
@@ -113,6 +114,7 @@ export declare class Pingram {
113
114
  logs: LogsApi;
114
115
  members: MembersApi;
115
116
  organization: OrganizationApi;
117
+ pushSettings: PushSettingsApi;
116
118
  sender: SenderApi;
117
119
  templates: TemplatesApi;
118
120
  types: TypesApi;
@@ -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.2';
11
+ const SDK_VERSION = '1.0.3';
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");
@@ -29,6 +29,7 @@ const src_17 = require("../generated/src");
29
29
  const src_18 = require("../generated/src");
30
30
  const src_19 = require("../generated/src");
31
31
  const src_20 = require("../generated/src");
32
+ const src_21 = require("../generated/src");
32
33
  const testing_1 = require("./testing");
33
34
  /**
34
35
  * Get the base URL for a given region
@@ -120,13 +121,14 @@ class Pingram {
120
121
  this.logs = new src_11.LogsApi(this.config);
121
122
  this.members = new src_12.MembersApi(this.config);
122
123
  this.organization = new src_13.OrganizationApi(this.config);
123
- this.sender = new src_14.SenderApi(this.config);
124
- this.templates = new src_15.TemplatesApi(this.config);
125
- this.types = new src_16.TypesApi(this.config);
126
- this.user = new src_17.UserApi(this.config);
127
- this.users = new src_18.UsersApi(this.config);
128
- this.webhooks = new src_19.WebhooksApi(this.config);
129
- this.defaultApi = new src_20.DefaultApi(this.config);
124
+ this.pushSettings = new src_14.PushSettingsApi(this.config);
125
+ this.sender = new src_15.SenderApi(this.config);
126
+ this.templates = new src_16.TemplatesApi(this.config);
127
+ this.types = new src_17.TypesApi(this.config);
128
+ this.user = new src_18.UserApi(this.config);
129
+ this.users = new src_19.UsersApi(this.config);
130
+ this.webhooks = new src_20.WebhooksApi(this.config);
131
+ this.defaultApi = new src_21.DefaultApi(this.config);
130
132
  }
131
133
  /**
132
134
  * Update the base URL (overrides region)
@@ -148,13 +150,14 @@ class Pingram {
148
150
  this.logs = new src_11.LogsApi(this.config);
149
151
  this.members = new src_12.MembersApi(this.config);
150
152
  this.organization = new src_13.OrganizationApi(this.config);
151
- this.sender = new src_14.SenderApi(this.config);
152
- this.templates = new src_15.TemplatesApi(this.config);
153
- this.types = new src_16.TypesApi(this.config);
154
- this.user = new src_17.UserApi(this.config);
155
- this.users = new src_18.UsersApi(this.config);
156
- this.webhooks = new src_19.WebhooksApi(this.config);
157
- this.defaultApi = new src_20.DefaultApi(this.config);
153
+ this.pushSettings = new src_14.PushSettingsApi(this.config);
154
+ this.sender = new src_15.SenderApi(this.config);
155
+ this.templates = new src_16.TemplatesApi(this.config);
156
+ this.types = new src_17.TypesApi(this.config);
157
+ this.user = new src_18.UserApi(this.config);
158
+ this.users = new src_19.UsersApi(this.config);
159
+ this.webhooks = new src_20.WebhooksApi(this.config);
160
+ this.defaultApi = new src_21.DefaultApi(this.config);
158
161
  }
159
162
  /**
160
163
  * send
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pingram",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Official Node.js SDK for Pingram - Send notifications via Email, SMS, Push, In-App, and more",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",