@onesignal/node-onesignal 5.2.0-beta1 → 5.3.0-beta1
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/DefaultApi.md +1547 -431
- package/apis/DefaultApi.ts +1492 -89
- package/dist/apis/DefaultApi.d.ts +40 -0
- package/dist/apis/DefaultApi.js +1363 -100
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/models/ApiKeyToken.d.ts +23 -0
- package/dist/models/ApiKeyToken.js +52 -0
- package/dist/models/ApiKeyToken.js.map +1 -0
- package/dist/models/ApiKeyTokensListResponse.d.ts +18 -0
- package/dist/models/ApiKeyTokensListResponse.js +22 -0
- package/dist/models/ApiKeyTokensListResponse.js.map +1 -0
- package/dist/models/CopyTemplateRequest.d.ts +17 -0
- package/dist/models/CopyTemplateRequest.js +22 -0
- package/dist/models/CopyTemplateRequest.js.map +1 -0
- package/dist/models/CreateApiKeyRequest.d.ts +20 -0
- package/dist/models/CreateApiKeyRequest.js +34 -0
- package/dist/models/CreateApiKeyRequest.js.map +1 -0
- package/dist/models/CreateApiKeyResponse.d.ts +18 -0
- package/dist/models/CreateApiKeyResponse.js +28 -0
- package/dist/models/CreateApiKeyResponse.js.map +1 -0
- package/dist/models/CreateTemplateRequest.d.ts +25 -0
- package/dist/models/CreateTemplateRequest.js +64 -0
- package/dist/models/CreateTemplateRequest.js.map +1 -0
- package/dist/models/CustomEvent.d.ts +23 -0
- package/dist/models/CustomEvent.js +46 -0
- package/dist/models/CustomEvent.js.map +1 -0
- package/dist/models/CustomEventsRequest.d.ts +18 -0
- package/dist/models/CustomEventsRequest.js +22 -0
- package/dist/models/CustomEventsRequest.js.map +1 -0
- package/dist/models/NotificationWithMeta.d.ts +1 -0
- package/dist/models/NotificationWithMeta.js +6 -0
- package/dist/models/NotificationWithMeta.js.map +1 -1
- package/dist/models/NotificationWithMetaAllOf.d.ts +1 -0
- package/dist/models/NotificationWithMetaAllOf.js +6 -0
- package/dist/models/NotificationWithMetaAllOf.js.map +1 -1
- package/dist/models/ObjectSerializer.d.ts +14 -0
- package/dist/models/ObjectSerializer.js +47 -0
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/StartLiveActivityRequest.d.ts +37 -0
- package/dist/models/StartLiveActivityRequest.js +112 -0
- package/dist/models/StartLiveActivityRequest.js.map +1 -0
- package/dist/models/StartLiveActivitySuccessResponse.d.ts +17 -0
- package/dist/models/StartLiveActivitySuccessResponse.js +22 -0
- package/dist/models/StartLiveActivitySuccessResponse.js.map +1 -0
- package/dist/models/TemplateResource.d.ts +25 -0
- package/dist/models/TemplateResource.js +52 -0
- package/dist/models/TemplateResource.js.map +1 -0
- package/dist/models/TemplatesListResponse.d.ts +18 -0
- package/dist/models/TemplatesListResponse.js +22 -0
- package/dist/models/TemplatesListResponse.js.map +1 -0
- package/dist/models/UpdateApiKeyRequest.d.ts +20 -0
- package/dist/models/UpdateApiKeyRequest.js +34 -0
- package/dist/models/UpdateApiKeyRequest.js.map +1 -0
- package/dist/models/UpdateTemplateRequest.d.ts +24 -0
- package/dist/models/UpdateTemplateRequest.js +58 -0
- package/dist/models/UpdateTemplateRequest.js.map +1 -0
- package/dist/models/all.d.ts +14 -0
- package/dist/models/all.js +14 -0
- package/dist/models/all.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +88 -0
- package/dist/types/ObjectParamAPI.js +42 -0
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +26 -0
- package/dist/types/ObservableAPI.js +422 -86
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +26 -0
- package/dist/types/PromiseAPI.js +56 -0
- package/dist/types/PromiseAPI.js.map +1 -1
- package/models/ApiKeyToken.ts +69 -0
- package/models/ApiKeyTokensListResponse.ts +32 -0
- package/models/App.ts +1 -1
- package/models/BasicNotification.ts +1 -1
- package/models/BasicNotificationAllOf.ts +1 -1
- package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
- package/models/Button.ts +1 -1
- package/models/CopyTemplateRequest.ts +34 -0
- package/models/CreateApiKeyRequest.ts +48 -0
- package/models/CreateApiKeyResponse.ts +38 -0
- package/models/CreateNotificationSuccessResponse.ts +1 -1
- package/models/CreateSegmentConflictResponse.ts +1 -1
- package/models/CreateSegmentSuccessResponse.ts +1 -1
- package/models/CreateTemplateRequest.ts +102 -0
- package/models/CreateUserConflictResponse.ts +1 -1
- package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
- package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
- package/models/CustomEvent.ts +74 -0
- package/models/CustomEventsRequest.ts +32 -0
- package/models/DeliveryData.ts +1 -1
- package/models/ExportEventsSuccessResponse.ts +1 -1
- package/models/ExportSubscriptionsRequestBody.ts +1 -1
- package/models/ExportSubscriptionsSuccessResponse.ts +1 -1
- package/models/Filter.ts +1 -1
- package/models/FilterExpression.ts +1 -1
- package/models/GenericError.ts +1 -1
- package/models/GenericSuccessBoolResponse.ts +1 -1
- package/models/GetNotificationHistoryRequestBody.ts +1 -1
- package/models/GetSegmentsSuccessResponse.ts +1 -1
- package/models/LanguageStringMap.ts +1 -1
- package/models/Notification.ts +1 -1
- package/models/NotificationAllOf.ts +1 -1
- package/models/NotificationHistorySuccessResponse.ts +1 -1
- package/models/NotificationSlice.ts +1 -1
- package/models/NotificationTarget.ts +1 -1
- package/models/NotificationWithMeta.ts +11 -1
- package/models/NotificationWithMetaAllOf.ts +11 -1
- package/models/ObjectSerializer.ts +48 -1
- package/models/Operator.ts +1 -1
- package/models/OutcomeData.ts +1 -1
- package/models/OutcomesData.ts +1 -1
- package/models/PlatformDeliveryData.ts +1 -1
- package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
- package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
- package/models/PropertiesBody.ts +1 -1
- package/models/PropertiesDeltas.ts +1 -1
- package/models/PropertiesObject.ts +1 -1
- package/models/Purchase.ts +1 -1
- package/models/RateLimitError.ts +1 -1
- package/models/Segment.ts +1 -1
- package/models/SegmentData.ts +1 -1
- package/models/SegmentNotificationTarget.ts +1 -1
- package/models/StartLiveActivityRequest.ts +177 -0
- package/models/StartLiveActivitySuccessResponse.ts +31 -0
- package/models/Subscription.ts +1 -1
- package/models/SubscriptionBody.ts +1 -1
- package/models/SubscriptionNotificationTarget.ts +1 -1
- package/models/TemplateResource.ts +72 -0
- package/models/TemplatesListResponse.ts +32 -0
- package/models/TransferSubscriptionRequestBody.ts +1 -1
- package/models/UpdateApiKeyRequest.ts +48 -0
- package/models/UpdateLiveActivityRequest.ts +1 -1
- package/models/UpdateLiveActivitySuccessResponse.ts +1 -1
- package/models/UpdateTemplateRequest.ts +92 -0
- package/models/UpdateUserRequest.ts +1 -1
- package/models/User.ts +1 -1
- package/models/UserIdentityBody.ts +1 -1
- package/models/WebButton.ts +1 -1
- package/models/all.ts +14 -0
- package/onesignal-node-onesignal-5.3.0-beta1.tgz +0 -0
- package/package.json +6 -5
- package/types/ObjectParamAPI.ts +386 -0
- package/types/ObservableAPI.ts +370 -0
- package/types/PromiseAPI.ts +174 -0
package/dist/apis/DefaultApi.js
CHANGED
|
@@ -80,7 +80,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
80
80
|
.replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
|
|
81
81
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
82
82
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
83
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
83
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
84
84
|
if (appId !== undefined) {
|
|
85
85
|
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
86
86
|
}
|
|
@@ -102,6 +102,55 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
|
+
DefaultApiRequestFactory.prototype.copyTemplateToApp = function (templateId, appId, copyTemplateRequest, _options) {
|
|
106
|
+
var _a, _b, _c;
|
|
107
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
108
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
109
|
+
return __generator(this, function (_d) {
|
|
110
|
+
switch (_d.label) {
|
|
111
|
+
case 0:
|
|
112
|
+
_config = _options || this.configuration;
|
|
113
|
+
if (templateId === null || templateId === undefined) {
|
|
114
|
+
throw new baseapi_1.RequiredError("DefaultApi", "copyTemplateToApp", "templateId");
|
|
115
|
+
}
|
|
116
|
+
if (appId === null || appId === undefined) {
|
|
117
|
+
throw new baseapi_1.RequiredError("DefaultApi", "copyTemplateToApp", "appId");
|
|
118
|
+
}
|
|
119
|
+
if (copyTemplateRequest === null || copyTemplateRequest === undefined) {
|
|
120
|
+
throw new baseapi_1.RequiredError("DefaultApi", "copyTemplateToApp", "copyTemplateRequest");
|
|
121
|
+
}
|
|
122
|
+
localVarPath = '/templates/{template_id}/copy_to_app'
|
|
123
|
+
.replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
|
|
124
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
125
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
126
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
127
|
+
if (appId !== undefined) {
|
|
128
|
+
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
129
|
+
}
|
|
130
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
131
|
+
"application/json"
|
|
132
|
+
]);
|
|
133
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
134
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(copyTemplateRequest, "CopyTemplateRequest", ""), contentType);
|
|
135
|
+
requestContext.setBody(serializedBody);
|
|
136
|
+
authMethod = _config.authMethods["organization_api_key"];
|
|
137
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
138
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
139
|
+
case 1:
|
|
140
|
+
_d.sent();
|
|
141
|
+
_d.label = 2;
|
|
142
|
+
case 2:
|
|
143
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
144
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
145
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
146
|
+
case 3:
|
|
147
|
+
_d.sent();
|
|
148
|
+
_d.label = 4;
|
|
149
|
+
case 4: return [2, requestContext];
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
};
|
|
105
154
|
DefaultApiRequestFactory.prototype.createAlias = function (appId, aliasLabel, aliasId, userIdentityBody, _options) {
|
|
106
155
|
var _a, _b, _c;
|
|
107
156
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -128,7 +177,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
128
177
|
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
129
178
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
130
179
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
131
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
180
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
132
181
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
133
182
|
"application/json"
|
|
134
183
|
]);
|
|
@@ -175,7 +224,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
175
224
|
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
176
225
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
177
226
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
178
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
227
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
179
228
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
180
229
|
"application/json"
|
|
181
230
|
]);
|
|
@@ -200,6 +249,49 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
200
249
|
});
|
|
201
250
|
});
|
|
202
251
|
};
|
|
252
|
+
DefaultApiRequestFactory.prototype.createApiKey = function (appId, createApiKeyRequest, _options) {
|
|
253
|
+
var _a, _b, _c;
|
|
254
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
255
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
256
|
+
return __generator(this, function (_d) {
|
|
257
|
+
switch (_d.label) {
|
|
258
|
+
case 0:
|
|
259
|
+
_config = _options || this.configuration;
|
|
260
|
+
if (appId === null || appId === undefined) {
|
|
261
|
+
throw new baseapi_1.RequiredError("DefaultApi", "createApiKey", "appId");
|
|
262
|
+
}
|
|
263
|
+
if (createApiKeyRequest === null || createApiKeyRequest === undefined) {
|
|
264
|
+
throw new baseapi_1.RequiredError("DefaultApi", "createApiKey", "createApiKeyRequest");
|
|
265
|
+
}
|
|
266
|
+
localVarPath = '/apps/{app_id}/auth/tokens'
|
|
267
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
268
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
269
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
270
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
271
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
272
|
+
"application/json"
|
|
273
|
+
]);
|
|
274
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
275
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createApiKeyRequest, "CreateApiKeyRequest", ""), contentType);
|
|
276
|
+
requestContext.setBody(serializedBody);
|
|
277
|
+
authMethod = _config.authMethods["organization_api_key"];
|
|
278
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
279
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
280
|
+
case 1:
|
|
281
|
+
_d.sent();
|
|
282
|
+
_d.label = 2;
|
|
283
|
+
case 2:
|
|
284
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
285
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
286
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
287
|
+
case 3:
|
|
288
|
+
_d.sent();
|
|
289
|
+
_d.label = 4;
|
|
290
|
+
case 4: return [2, requestContext];
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
};
|
|
203
295
|
DefaultApiRequestFactory.prototype.createApp = function (app, _options) {
|
|
204
296
|
var _a, _b, _c;
|
|
205
297
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -214,7 +306,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
214
306
|
localVarPath = '/apps';
|
|
215
307
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
216
308
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
217
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
309
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
218
310
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
219
311
|
"application/json"
|
|
220
312
|
]);
|
|
@@ -239,6 +331,49 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
239
331
|
});
|
|
240
332
|
});
|
|
241
333
|
};
|
|
334
|
+
DefaultApiRequestFactory.prototype.createCustomEvents = function (appId, customEventsRequest, _options) {
|
|
335
|
+
var _a, _b, _c;
|
|
336
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
337
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
338
|
+
return __generator(this, function (_d) {
|
|
339
|
+
switch (_d.label) {
|
|
340
|
+
case 0:
|
|
341
|
+
_config = _options || this.configuration;
|
|
342
|
+
if (appId === null || appId === undefined) {
|
|
343
|
+
throw new baseapi_1.RequiredError("DefaultApi", "createCustomEvents", "appId");
|
|
344
|
+
}
|
|
345
|
+
if (customEventsRequest === null || customEventsRequest === undefined) {
|
|
346
|
+
throw new baseapi_1.RequiredError("DefaultApi", "createCustomEvents", "customEventsRequest");
|
|
347
|
+
}
|
|
348
|
+
localVarPath = '/apps/{app_id}/integrations/custom_events'
|
|
349
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
350
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
351
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
352
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
353
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
354
|
+
"application/json"
|
|
355
|
+
]);
|
|
356
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
357
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(customEventsRequest, "CustomEventsRequest", ""), contentType);
|
|
358
|
+
requestContext.setBody(serializedBody);
|
|
359
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
360
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
361
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
362
|
+
case 1:
|
|
363
|
+
_d.sent();
|
|
364
|
+
_d.label = 2;
|
|
365
|
+
case 2:
|
|
366
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
367
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
368
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
369
|
+
case 3:
|
|
370
|
+
_d.sent();
|
|
371
|
+
_d.label = 4;
|
|
372
|
+
case 4: return [2, requestContext];
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
};
|
|
242
377
|
DefaultApiRequestFactory.prototype.createNotification = function (notification, _options) {
|
|
243
378
|
var _a, _b, _c;
|
|
244
379
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -253,7 +388,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
253
388
|
localVarPath = '/notifications';
|
|
254
389
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
255
390
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
256
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
391
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
257
392
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
258
393
|
"application/json"
|
|
259
394
|
]);
|
|
@@ -293,7 +428,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
293
428
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
294
429
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
295
430
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
296
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
431
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
297
432
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
298
433
|
"application/json"
|
|
299
434
|
]);
|
|
@@ -344,7 +479,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
344
479
|
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
345
480
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
346
481
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
347
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
482
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
348
483
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
349
484
|
"application/json"
|
|
350
485
|
]);
|
|
@@ -369,6 +504,45 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
369
504
|
});
|
|
370
505
|
});
|
|
371
506
|
};
|
|
507
|
+
DefaultApiRequestFactory.prototype.createTemplate = function (createTemplateRequest, _options) {
|
|
508
|
+
var _a, _b, _c;
|
|
509
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
510
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
511
|
+
return __generator(this, function (_d) {
|
|
512
|
+
switch (_d.label) {
|
|
513
|
+
case 0:
|
|
514
|
+
_config = _options || this.configuration;
|
|
515
|
+
if (createTemplateRequest === null || createTemplateRequest === undefined) {
|
|
516
|
+
throw new baseapi_1.RequiredError("DefaultApi", "createTemplate", "createTemplateRequest");
|
|
517
|
+
}
|
|
518
|
+
localVarPath = '/templates';
|
|
519
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
520
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
521
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
522
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
523
|
+
"application/json"
|
|
524
|
+
]);
|
|
525
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
526
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(createTemplateRequest, "CreateTemplateRequest", ""), contentType);
|
|
527
|
+
requestContext.setBody(serializedBody);
|
|
528
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
529
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
530
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
531
|
+
case 1:
|
|
532
|
+
_d.sent();
|
|
533
|
+
_d.label = 2;
|
|
534
|
+
case 2:
|
|
535
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
536
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
537
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
538
|
+
case 3:
|
|
539
|
+
_d.sent();
|
|
540
|
+
_d.label = 4;
|
|
541
|
+
case 4: return [2, requestContext];
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
});
|
|
545
|
+
};
|
|
372
546
|
DefaultApiRequestFactory.prototype.createUser = function (appId, user, _options) {
|
|
373
547
|
var _a, _b, _c;
|
|
374
548
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -387,7 +561,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
387
561
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
388
562
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
389
563
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
390
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
564
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
391
565
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
392
566
|
"application/json"
|
|
393
567
|
]);
|
|
@@ -439,7 +613,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
439
613
|
.replace('{' + 'alias_label_to_delete' + '}', encodeURIComponent(String(aliasLabelToDelete)));
|
|
440
614
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
441
615
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
442
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
616
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
443
617
|
authMethod = _config.authMethods["rest_api_key"];
|
|
444
618
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
445
619
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -458,6 +632,44 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
458
632
|
});
|
|
459
633
|
});
|
|
460
634
|
};
|
|
635
|
+
DefaultApiRequestFactory.prototype.deleteApiKey = function (appId, tokenId, _options) {
|
|
636
|
+
var _a, _b, _c;
|
|
637
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
638
|
+
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
639
|
+
return __generator(this, function (_d) {
|
|
640
|
+
switch (_d.label) {
|
|
641
|
+
case 0:
|
|
642
|
+
_config = _options || this.configuration;
|
|
643
|
+
if (appId === null || appId === undefined) {
|
|
644
|
+
throw new baseapi_1.RequiredError("DefaultApi", "deleteApiKey", "appId");
|
|
645
|
+
}
|
|
646
|
+
if (tokenId === null || tokenId === undefined) {
|
|
647
|
+
throw new baseapi_1.RequiredError("DefaultApi", "deleteApiKey", "tokenId");
|
|
648
|
+
}
|
|
649
|
+
localVarPath = '/apps/{app_id}/auth/tokens/{token_id}'
|
|
650
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
651
|
+
.replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
|
|
652
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
653
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
654
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
655
|
+
authMethod = _config.authMethods["organization_api_key"];
|
|
656
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
657
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
658
|
+
case 1:
|
|
659
|
+
_d.sent();
|
|
660
|
+
_d.label = 2;
|
|
661
|
+
case 2:
|
|
662
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
663
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
664
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
665
|
+
case 3:
|
|
666
|
+
_d.sent();
|
|
667
|
+
_d.label = 4;
|
|
668
|
+
case 4: return [2, requestContext];
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
});
|
|
672
|
+
};
|
|
461
673
|
DefaultApiRequestFactory.prototype.deleteSegment = function (appId, segmentId, _options) {
|
|
462
674
|
var _a, _b, _c;
|
|
463
675
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -477,7 +689,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
477
689
|
.replace('{' + 'segment_id' + '}', encodeURIComponent(String(segmentId)));
|
|
478
690
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
479
691
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
480
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
692
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
481
693
|
authMethod = _config.authMethods["rest_api_key"];
|
|
482
694
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
483
695
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -515,7 +727,47 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
515
727
|
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
516
728
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
517
729
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
518
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
730
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
731
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
732
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
733
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
734
|
+
case 1:
|
|
735
|
+
_d.sent();
|
|
736
|
+
_d.label = 2;
|
|
737
|
+
case 2:
|
|
738
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
739
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
740
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
741
|
+
case 3:
|
|
742
|
+
_d.sent();
|
|
743
|
+
_d.label = 4;
|
|
744
|
+
case 4: return [2, requestContext];
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
});
|
|
748
|
+
};
|
|
749
|
+
DefaultApiRequestFactory.prototype.deleteTemplate = function (templateId, appId, _options) {
|
|
750
|
+
var _a, _b, _c;
|
|
751
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
752
|
+
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
753
|
+
return __generator(this, function (_d) {
|
|
754
|
+
switch (_d.label) {
|
|
755
|
+
case 0:
|
|
756
|
+
_config = _options || this.configuration;
|
|
757
|
+
if (templateId === null || templateId === undefined) {
|
|
758
|
+
throw new baseapi_1.RequiredError("DefaultApi", "deleteTemplate", "templateId");
|
|
759
|
+
}
|
|
760
|
+
if (appId === null || appId === undefined) {
|
|
761
|
+
throw new baseapi_1.RequiredError("DefaultApi", "deleteTemplate", "appId");
|
|
762
|
+
}
|
|
763
|
+
localVarPath = '/templates/{template_id}'
|
|
764
|
+
.replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
|
|
765
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
766
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
767
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
768
|
+
if (appId !== undefined) {
|
|
769
|
+
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
770
|
+
}
|
|
519
771
|
authMethod = _config.authMethods["rest_api_key"];
|
|
520
772
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
521
773
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -557,7 +809,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
557
809
|
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
558
810
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
559
811
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
560
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
812
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
561
813
|
authMethod = _config.authMethods["rest_api_key"];
|
|
562
814
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
563
815
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -594,7 +846,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
594
846
|
.replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
|
|
595
847
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
596
848
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
597
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
849
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
598
850
|
if (appId !== undefined) {
|
|
599
851
|
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
600
852
|
}
|
|
@@ -631,7 +883,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
631
883
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
632
884
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
633
885
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
634
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
886
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
635
887
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
636
888
|
"application/json"
|
|
637
889
|
]);
|
|
@@ -679,7 +931,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
679
931
|
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
680
932
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
681
933
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
682
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
934
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
683
935
|
authMethod = _config.authMethods["rest_api_key"];
|
|
684
936
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
685
937
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -717,7 +969,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
717
969
|
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
718
970
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
719
971
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
720
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
972
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
721
973
|
authMethod = _config.authMethods["rest_api_key"];
|
|
722
974
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
723
975
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -751,7 +1003,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
751
1003
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
752
1004
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
753
1005
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
754
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1006
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
755
1007
|
authMethod = _config.authMethods["organization_api_key"];
|
|
756
1008
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
757
1009
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -781,7 +1033,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
781
1033
|
localVarPath = '/apps';
|
|
782
1034
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
783
1035
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
784
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1036
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
785
1037
|
authMethod = _config.authMethods["organization_api_key"];
|
|
786
1038
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
787
1039
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -818,7 +1070,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
818
1070
|
.replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
|
|
819
1071
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
820
1072
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
821
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1073
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
822
1074
|
if (appId !== undefined) {
|
|
823
1075
|
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
824
1076
|
}
|
|
@@ -858,7 +1110,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
858
1110
|
.replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
|
|
859
1111
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
860
1112
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
861
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1113
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
862
1114
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
863
1115
|
"application/json"
|
|
864
1116
|
]);
|
|
@@ -897,7 +1149,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
897
1149
|
localVarPath = '/notifications';
|
|
898
1150
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
899
1151
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
900
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1152
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
901
1153
|
if (appId !== undefined) {
|
|
902
1154
|
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
903
1155
|
}
|
|
@@ -946,7 +1198,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
946
1198
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
947
1199
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
948
1200
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
949
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1201
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
950
1202
|
if (outcomeNames !== undefined) {
|
|
951
1203
|
requestContext.setQueryParam("outcome_names", ObjectSerializer_1.ObjectSerializer.serialize(outcomeNames, "string", ""));
|
|
952
1204
|
}
|
|
@@ -995,7 +1247,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
995
1247
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
996
1248
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
997
1249
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
998
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1250
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
999
1251
|
if (offset !== undefined) {
|
|
1000
1252
|
requestContext.setQueryParam("offset", ObjectSerializer_1.ObjectSerializer.serialize(offset, "number", ""));
|
|
1001
1253
|
}
|
|
@@ -1043,7 +1295,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1043
1295
|
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
1044
1296
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
1045
1297
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1046
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1298
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1047
1299
|
authMethod = _config.authMethods["rest_api_key"];
|
|
1048
1300
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1049
1301
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -1062,36 +1314,27 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1062
1314
|
});
|
|
1063
1315
|
});
|
|
1064
1316
|
};
|
|
1065
|
-
DefaultApiRequestFactory.prototype.
|
|
1317
|
+
DefaultApiRequestFactory.prototype.rotateApiKey = function (appId, tokenId, _options) {
|
|
1066
1318
|
var _a, _b, _c;
|
|
1067
1319
|
return __awaiter(this, void 0, void 0, function () {
|
|
1068
|
-
var _config, localVarPath, requestContext,
|
|
1320
|
+
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
1069
1321
|
return __generator(this, function (_d) {
|
|
1070
1322
|
switch (_d.label) {
|
|
1071
1323
|
case 0:
|
|
1072
1324
|
_config = _options || this.configuration;
|
|
1073
1325
|
if (appId === null || appId === undefined) {
|
|
1074
|
-
throw new baseapi_1.RequiredError("DefaultApi", "
|
|
1326
|
+
throw new baseapi_1.RequiredError("DefaultApi", "rotateApiKey", "appId");
|
|
1075
1327
|
}
|
|
1076
|
-
if (
|
|
1077
|
-
throw new baseapi_1.RequiredError("DefaultApi", "
|
|
1078
|
-
}
|
|
1079
|
-
if (transferSubscriptionRequestBody === null || transferSubscriptionRequestBody === undefined) {
|
|
1080
|
-
throw new baseapi_1.RequiredError("DefaultApi", "transferSubscription", "transferSubscriptionRequestBody");
|
|
1328
|
+
if (tokenId === null || tokenId === undefined) {
|
|
1329
|
+
throw new baseapi_1.RequiredError("DefaultApi", "rotateApiKey", "tokenId");
|
|
1081
1330
|
}
|
|
1082
|
-
localVarPath = '/apps/{app_id}/
|
|
1331
|
+
localVarPath = '/apps/{app_id}/auth/tokens/{token_id}/rotate'
|
|
1083
1332
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1084
|
-
.replace('{' + '
|
|
1085
|
-
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.
|
|
1333
|
+
.replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
|
|
1334
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
1086
1335
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1087
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1088
|
-
|
|
1089
|
-
"application/json"
|
|
1090
|
-
]);
|
|
1091
|
-
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1092
|
-
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""), contentType);
|
|
1093
|
-
requestContext.setBody(serializedBody);
|
|
1094
|
-
authMethod = _config.authMethods["rest_api_key"];
|
|
1336
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1337
|
+
authMethod = _config.authMethods["organization_api_key"];
|
|
1095
1338
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1096
1339
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1097
1340
|
case 1:
|
|
@@ -1109,32 +1352,35 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1109
1352
|
});
|
|
1110
1353
|
});
|
|
1111
1354
|
};
|
|
1112
|
-
DefaultApiRequestFactory.prototype.
|
|
1355
|
+
DefaultApiRequestFactory.prototype.startLiveActivity = function (appId, activityType, startLiveActivityRequest, _options) {
|
|
1113
1356
|
var _a, _b, _c;
|
|
1114
1357
|
return __awaiter(this, void 0, void 0, function () {
|
|
1115
|
-
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
1358
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
1116
1359
|
return __generator(this, function (_d) {
|
|
1117
1360
|
switch (_d.label) {
|
|
1118
1361
|
case 0:
|
|
1119
1362
|
_config = _options || this.configuration;
|
|
1120
1363
|
if (appId === null || appId === undefined) {
|
|
1121
|
-
throw new baseapi_1.RequiredError("DefaultApi", "
|
|
1364
|
+
throw new baseapi_1.RequiredError("DefaultApi", "startLiveActivity", "appId");
|
|
1122
1365
|
}
|
|
1123
|
-
if (
|
|
1124
|
-
throw new baseapi_1.RequiredError("DefaultApi", "
|
|
1366
|
+
if (activityType === null || activityType === undefined) {
|
|
1367
|
+
throw new baseapi_1.RequiredError("DefaultApi", "startLiveActivity", "activityType");
|
|
1125
1368
|
}
|
|
1126
|
-
if (
|
|
1127
|
-
throw new baseapi_1.RequiredError("DefaultApi", "
|
|
1369
|
+
if (startLiveActivityRequest === null || startLiveActivityRequest === undefined) {
|
|
1370
|
+
throw new baseapi_1.RequiredError("DefaultApi", "startLiveActivity", "startLiveActivityRequest");
|
|
1128
1371
|
}
|
|
1129
|
-
localVarPath = '/apps/{app_id}/
|
|
1372
|
+
localVarPath = '/apps/{app_id}/activities/activity/{activity_type}'
|
|
1130
1373
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1131
|
-
.replace('{' + '
|
|
1374
|
+
.replace('{' + 'activity_type' + '}', encodeURIComponent(String(activityType)));
|
|
1132
1375
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
1133
1376
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1134
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1377
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1378
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1379
|
+
"application/json"
|
|
1380
|
+
]);
|
|
1381
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1382
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(startLiveActivityRequest, "StartLiveActivityRequest", ""), contentType);
|
|
1383
|
+
requestContext.setBody(serializedBody);
|
|
1138
1384
|
authMethod = _config.authMethods["rest_api_key"];
|
|
1139
1385
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1140
1386
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -1153,7 +1399,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1153
1399
|
});
|
|
1154
1400
|
});
|
|
1155
1401
|
};
|
|
1156
|
-
DefaultApiRequestFactory.prototype.
|
|
1402
|
+
DefaultApiRequestFactory.prototype.transferSubscription = function (appId, subscriptionId, transferSubscriptionRequestBody, _options) {
|
|
1157
1403
|
var _a, _b, _c;
|
|
1158
1404
|
return __awaiter(this, void 0, void 0, function () {
|
|
1159
1405
|
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
@@ -1162,16 +1408,154 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1162
1408
|
case 0:
|
|
1163
1409
|
_config = _options || this.configuration;
|
|
1164
1410
|
if (appId === null || appId === undefined) {
|
|
1165
|
-
throw new baseapi_1.RequiredError("DefaultApi", "
|
|
1411
|
+
throw new baseapi_1.RequiredError("DefaultApi", "transferSubscription", "appId");
|
|
1166
1412
|
}
|
|
1167
|
-
if (
|
|
1168
|
-
throw new baseapi_1.RequiredError("DefaultApi", "
|
|
1413
|
+
if (subscriptionId === null || subscriptionId === undefined) {
|
|
1414
|
+
throw new baseapi_1.RequiredError("DefaultApi", "transferSubscription", "subscriptionId");
|
|
1169
1415
|
}
|
|
1170
|
-
|
|
1416
|
+
if (transferSubscriptionRequestBody === null || transferSubscriptionRequestBody === undefined) {
|
|
1417
|
+
throw new baseapi_1.RequiredError("DefaultApi", "transferSubscription", "transferSubscriptionRequestBody");
|
|
1418
|
+
}
|
|
1419
|
+
localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/owner'
|
|
1420
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1421
|
+
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
1422
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
1423
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1424
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1425
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1426
|
+
"application/json"
|
|
1427
|
+
]);
|
|
1428
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1429
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""), contentType);
|
|
1430
|
+
requestContext.setBody(serializedBody);
|
|
1431
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
1432
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1433
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1434
|
+
case 1:
|
|
1435
|
+
_d.sent();
|
|
1436
|
+
_d.label = 2;
|
|
1437
|
+
case 2:
|
|
1438
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1439
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1440
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1441
|
+
case 3:
|
|
1442
|
+
_d.sent();
|
|
1443
|
+
_d.label = 4;
|
|
1444
|
+
case 4: return [2, requestContext];
|
|
1445
|
+
}
|
|
1446
|
+
});
|
|
1447
|
+
});
|
|
1448
|
+
};
|
|
1449
|
+
DefaultApiRequestFactory.prototype.unsubscribeEmailWithToken = function (appId, notificationId, token, _options) {
|
|
1450
|
+
var _a, _b, _c;
|
|
1451
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1452
|
+
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
1453
|
+
return __generator(this, function (_d) {
|
|
1454
|
+
switch (_d.label) {
|
|
1455
|
+
case 0:
|
|
1456
|
+
_config = _options || this.configuration;
|
|
1457
|
+
if (appId === null || appId === undefined) {
|
|
1458
|
+
throw new baseapi_1.RequiredError("DefaultApi", "unsubscribeEmailWithToken", "appId");
|
|
1459
|
+
}
|
|
1460
|
+
if (notificationId === null || notificationId === undefined) {
|
|
1461
|
+
throw new baseapi_1.RequiredError("DefaultApi", "unsubscribeEmailWithToken", "notificationId");
|
|
1462
|
+
}
|
|
1463
|
+
if (token === null || token === undefined) {
|
|
1464
|
+
throw new baseapi_1.RequiredError("DefaultApi", "unsubscribeEmailWithToken", "token");
|
|
1465
|
+
}
|
|
1466
|
+
localVarPath = '/apps/{app_id}/notifications/{notification_id}/unsubscribe'
|
|
1467
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1468
|
+
.replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
|
|
1469
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
1470
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1471
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1472
|
+
if (token !== undefined) {
|
|
1473
|
+
requestContext.setQueryParam("token", ObjectSerializer_1.ObjectSerializer.serialize(token, "string", ""));
|
|
1474
|
+
}
|
|
1475
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
1476
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1477
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1478
|
+
case 1:
|
|
1479
|
+
_d.sent();
|
|
1480
|
+
_d.label = 2;
|
|
1481
|
+
case 2:
|
|
1482
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1483
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1484
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1485
|
+
case 3:
|
|
1486
|
+
_d.sent();
|
|
1487
|
+
_d.label = 4;
|
|
1488
|
+
case 4: return [2, requestContext];
|
|
1489
|
+
}
|
|
1490
|
+
});
|
|
1491
|
+
});
|
|
1492
|
+
};
|
|
1493
|
+
DefaultApiRequestFactory.prototype.updateApiKey = function (appId, tokenId, updateApiKeyRequest, _options) {
|
|
1494
|
+
var _a, _b, _c;
|
|
1495
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1496
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
1497
|
+
return __generator(this, function (_d) {
|
|
1498
|
+
switch (_d.label) {
|
|
1499
|
+
case 0:
|
|
1500
|
+
_config = _options || this.configuration;
|
|
1501
|
+
if (appId === null || appId === undefined) {
|
|
1502
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateApiKey", "appId");
|
|
1503
|
+
}
|
|
1504
|
+
if (tokenId === null || tokenId === undefined) {
|
|
1505
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateApiKey", "tokenId");
|
|
1506
|
+
}
|
|
1507
|
+
if (updateApiKeyRequest === null || updateApiKeyRequest === undefined) {
|
|
1508
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateApiKey", "updateApiKeyRequest");
|
|
1509
|
+
}
|
|
1510
|
+
localVarPath = '/apps/{app_id}/auth/tokens/{token_id}'
|
|
1511
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1512
|
+
.replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
|
|
1513
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
1514
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1515
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1516
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1517
|
+
"application/json"
|
|
1518
|
+
]);
|
|
1519
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1520
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateApiKeyRequest, "UpdateApiKeyRequest", ""), contentType);
|
|
1521
|
+
requestContext.setBody(serializedBody);
|
|
1522
|
+
authMethod = _config.authMethods["organization_api_key"];
|
|
1523
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1524
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1525
|
+
case 1:
|
|
1526
|
+
_d.sent();
|
|
1527
|
+
_d.label = 2;
|
|
1528
|
+
case 2:
|
|
1529
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1530
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1531
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1532
|
+
case 3:
|
|
1533
|
+
_d.sent();
|
|
1534
|
+
_d.label = 4;
|
|
1535
|
+
case 4: return [2, requestContext];
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
});
|
|
1539
|
+
};
|
|
1540
|
+
DefaultApiRequestFactory.prototype.updateApp = function (appId, app, _options) {
|
|
1541
|
+
var _a, _b, _c;
|
|
1542
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1543
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
1544
|
+
return __generator(this, function (_d) {
|
|
1545
|
+
switch (_d.label) {
|
|
1546
|
+
case 0:
|
|
1547
|
+
_config = _options || this.configuration;
|
|
1548
|
+
if (appId === null || appId === undefined) {
|
|
1549
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateApp", "appId");
|
|
1550
|
+
}
|
|
1551
|
+
if (app === null || app === undefined) {
|
|
1552
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateApp", "app");
|
|
1553
|
+
}
|
|
1554
|
+
localVarPath = '/apps/{app_id}'
|
|
1171
1555
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
1172
1556
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
1173
1557
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1174
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1558
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1175
1559
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1176
1560
|
"application/json"
|
|
1177
1561
|
]);
|
|
@@ -1218,7 +1602,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1218
1602
|
.replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)));
|
|
1219
1603
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
1220
1604
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1221
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1605
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1222
1606
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1223
1607
|
"application/json"
|
|
1224
1608
|
]);
|
|
@@ -1265,7 +1649,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1265
1649
|
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
1266
1650
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
1267
1651
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1268
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1652
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1269
1653
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1270
1654
|
"application/json"
|
|
1271
1655
|
]);
|
|
@@ -1290,6 +1674,106 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1290
1674
|
});
|
|
1291
1675
|
});
|
|
1292
1676
|
};
|
|
1677
|
+
DefaultApiRequestFactory.prototype.updateSubscriptionByToken = function (appId, tokenType, token, subscriptionBody, _options) {
|
|
1678
|
+
var _a, _b, _c;
|
|
1679
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1680
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
1681
|
+
return __generator(this, function (_d) {
|
|
1682
|
+
switch (_d.label) {
|
|
1683
|
+
case 0:
|
|
1684
|
+
_config = _options || this.configuration;
|
|
1685
|
+
if (appId === null || appId === undefined) {
|
|
1686
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateSubscriptionByToken", "appId");
|
|
1687
|
+
}
|
|
1688
|
+
if (tokenType === null || tokenType === undefined) {
|
|
1689
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateSubscriptionByToken", "tokenType");
|
|
1690
|
+
}
|
|
1691
|
+
if (token === null || token === undefined) {
|
|
1692
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateSubscriptionByToken", "token");
|
|
1693
|
+
}
|
|
1694
|
+
if (subscriptionBody === null || subscriptionBody === undefined) {
|
|
1695
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateSubscriptionByToken", "subscriptionBody");
|
|
1696
|
+
}
|
|
1697
|
+
localVarPath = '/apps/{app_id}/subscriptions_by_token/{token_type}/{token}'
|
|
1698
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1699
|
+
.replace('{' + 'token_type' + '}', encodeURIComponent(String(tokenType)))
|
|
1700
|
+
.replace('{' + 'token' + '}', encodeURIComponent(String(token)));
|
|
1701
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
1702
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1703
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1704
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1705
|
+
"application/json"
|
|
1706
|
+
]);
|
|
1707
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1708
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(subscriptionBody, "SubscriptionBody", ""), contentType);
|
|
1709
|
+
requestContext.setBody(serializedBody);
|
|
1710
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
1711
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1712
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1713
|
+
case 1:
|
|
1714
|
+
_d.sent();
|
|
1715
|
+
_d.label = 2;
|
|
1716
|
+
case 2:
|
|
1717
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1718
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1719
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1720
|
+
case 3:
|
|
1721
|
+
_d.sent();
|
|
1722
|
+
_d.label = 4;
|
|
1723
|
+
case 4: return [2, requestContext];
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1726
|
+
});
|
|
1727
|
+
};
|
|
1728
|
+
DefaultApiRequestFactory.prototype.updateTemplate = function (templateId, appId, updateTemplateRequest, _options) {
|
|
1729
|
+
var _a, _b, _c;
|
|
1730
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1731
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
1732
|
+
return __generator(this, function (_d) {
|
|
1733
|
+
switch (_d.label) {
|
|
1734
|
+
case 0:
|
|
1735
|
+
_config = _options || this.configuration;
|
|
1736
|
+
if (templateId === null || templateId === undefined) {
|
|
1737
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateTemplate", "templateId");
|
|
1738
|
+
}
|
|
1739
|
+
if (appId === null || appId === undefined) {
|
|
1740
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateTemplate", "appId");
|
|
1741
|
+
}
|
|
1742
|
+
if (updateTemplateRequest === null || updateTemplateRequest === undefined) {
|
|
1743
|
+
throw new baseapi_1.RequiredError("DefaultApi", "updateTemplate", "updateTemplateRequest");
|
|
1744
|
+
}
|
|
1745
|
+
localVarPath = '/templates/{template_id}'
|
|
1746
|
+
.replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
|
|
1747
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
1748
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1749
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1750
|
+
if (appId !== undefined) {
|
|
1751
|
+
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
1752
|
+
}
|
|
1753
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1754
|
+
"application/json"
|
|
1755
|
+
]);
|
|
1756
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1757
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(updateTemplateRequest, "UpdateTemplateRequest", ""), contentType);
|
|
1758
|
+
requestContext.setBody(serializedBody);
|
|
1759
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
1760
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1761
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1762
|
+
case 1:
|
|
1763
|
+
_d.sent();
|
|
1764
|
+
_d.label = 2;
|
|
1765
|
+
case 2:
|
|
1766
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1767
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1768
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1769
|
+
case 3:
|
|
1770
|
+
_d.sent();
|
|
1771
|
+
_d.label = 4;
|
|
1772
|
+
case 4: return [2, requestContext];
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1775
|
+
});
|
|
1776
|
+
};
|
|
1293
1777
|
DefaultApiRequestFactory.prototype.updateUser = function (appId, aliasLabel, aliasId, updateUserRequest, _options) {
|
|
1294
1778
|
var _a, _b, _c;
|
|
1295
1779
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1316,7 +1800,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1316
1800
|
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
1317
1801
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
1318
1802
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1319
|
-
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.
|
|
1803
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1320
1804
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1321
1805
|
"application/json"
|
|
1322
1806
|
]);
|
|
@@ -1341,6 +1825,125 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1341
1825
|
});
|
|
1342
1826
|
});
|
|
1343
1827
|
};
|
|
1828
|
+
DefaultApiRequestFactory.prototype.viewApiKeys = function (appId, _options) {
|
|
1829
|
+
var _a, _b, _c;
|
|
1830
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1831
|
+
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
1832
|
+
return __generator(this, function (_d) {
|
|
1833
|
+
switch (_d.label) {
|
|
1834
|
+
case 0:
|
|
1835
|
+
_config = _options || this.configuration;
|
|
1836
|
+
if (appId === null || appId === undefined) {
|
|
1837
|
+
throw new baseapi_1.RequiredError("DefaultApi", "viewApiKeys", "appId");
|
|
1838
|
+
}
|
|
1839
|
+
localVarPath = '/apps/{app_id}/auth/tokens'
|
|
1840
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
1841
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
1842
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1843
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1844
|
+
authMethod = _config.authMethods["organization_api_key"];
|
|
1845
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1846
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1847
|
+
case 1:
|
|
1848
|
+
_d.sent();
|
|
1849
|
+
_d.label = 2;
|
|
1850
|
+
case 2:
|
|
1851
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1852
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1853
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1854
|
+
case 3:
|
|
1855
|
+
_d.sent();
|
|
1856
|
+
_d.label = 4;
|
|
1857
|
+
case 4: return [2, requestContext];
|
|
1858
|
+
}
|
|
1859
|
+
});
|
|
1860
|
+
});
|
|
1861
|
+
};
|
|
1862
|
+
DefaultApiRequestFactory.prototype.viewTemplate = function (templateId, appId, _options) {
|
|
1863
|
+
var _a, _b, _c;
|
|
1864
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1865
|
+
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
1866
|
+
return __generator(this, function (_d) {
|
|
1867
|
+
switch (_d.label) {
|
|
1868
|
+
case 0:
|
|
1869
|
+
_config = _options || this.configuration;
|
|
1870
|
+
if (templateId === null || templateId === undefined) {
|
|
1871
|
+
throw new baseapi_1.RequiredError("DefaultApi", "viewTemplate", "templateId");
|
|
1872
|
+
}
|
|
1873
|
+
if (appId === null || appId === undefined) {
|
|
1874
|
+
throw new baseapi_1.RequiredError("DefaultApi", "viewTemplate", "appId");
|
|
1875
|
+
}
|
|
1876
|
+
localVarPath = '/templates/{template_id}'
|
|
1877
|
+
.replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
|
|
1878
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
1879
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1880
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1881
|
+
if (appId !== undefined) {
|
|
1882
|
+
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
1883
|
+
}
|
|
1884
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
1885
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1886
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1887
|
+
case 1:
|
|
1888
|
+
_d.sent();
|
|
1889
|
+
_d.label = 2;
|
|
1890
|
+
case 2:
|
|
1891
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1892
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1893
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1894
|
+
case 3:
|
|
1895
|
+
_d.sent();
|
|
1896
|
+
_d.label = 4;
|
|
1897
|
+
case 4: return [2, requestContext];
|
|
1898
|
+
}
|
|
1899
|
+
});
|
|
1900
|
+
});
|
|
1901
|
+
};
|
|
1902
|
+
DefaultApiRequestFactory.prototype.viewTemplates = function (appId, limit, offset, channel, _options) {
|
|
1903
|
+
var _a, _b, _c;
|
|
1904
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1905
|
+
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
1906
|
+
return __generator(this, function (_d) {
|
|
1907
|
+
switch (_d.label) {
|
|
1908
|
+
case 0:
|
|
1909
|
+
_config = _options || this.configuration;
|
|
1910
|
+
if (appId === null || appId === undefined) {
|
|
1911
|
+
throw new baseapi_1.RequiredError("DefaultApi", "viewTemplates", "appId");
|
|
1912
|
+
}
|
|
1913
|
+
localVarPath = '/templates';
|
|
1914
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
1915
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1916
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.3.0-beta1");
|
|
1917
|
+
if (appId !== undefined) {
|
|
1918
|
+
requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
|
|
1919
|
+
}
|
|
1920
|
+
if (limit !== undefined) {
|
|
1921
|
+
requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
|
|
1922
|
+
}
|
|
1923
|
+
if (offset !== undefined) {
|
|
1924
|
+
requestContext.setQueryParam("offset", ObjectSerializer_1.ObjectSerializer.serialize(offset, "number", ""));
|
|
1925
|
+
}
|
|
1926
|
+
if (channel !== undefined) {
|
|
1927
|
+
requestContext.setQueryParam("channel", ObjectSerializer_1.ObjectSerializer.serialize(channel, "'push' | 'email' | 'sms'", ""));
|
|
1928
|
+
}
|
|
1929
|
+
authMethod = _config.authMethods["rest_api_key"];
|
|
1930
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1931
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1932
|
+
case 1:
|
|
1933
|
+
_d.sent();
|
|
1934
|
+
_d.label = 2;
|
|
1935
|
+
case 2:
|
|
1936
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1937
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1938
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1939
|
+
case 3:
|
|
1940
|
+
_d.sent();
|
|
1941
|
+
_d.label = 4;
|
|
1942
|
+
case 4: return [2, requestContext];
|
|
1943
|
+
}
|
|
1944
|
+
});
|
|
1945
|
+
});
|
|
1946
|
+
};
|
|
1344
1947
|
return DefaultApiRequestFactory;
|
|
1345
1948
|
}(baseapi_1.BaseAPIRequestFactory));
|
|
1346
1949
|
exports.DefaultApiRequestFactory = DefaultApiRequestFactory;
|
|
@@ -1407,6 +2010,48 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
1407
2010
|
});
|
|
1408
2011
|
});
|
|
1409
2012
|
};
|
|
2013
|
+
DefaultApiResponseProcessor.prototype.copyTemplateToApp = function (response) {
|
|
2014
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2015
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
|
|
2016
|
+
return __generator(this, function (_q) {
|
|
2017
|
+
switch (_q.label) {
|
|
2018
|
+
case 0:
|
|
2019
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2020
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
2021
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2022
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2023
|
+
return [4, response.body.text()];
|
|
2024
|
+
case 1:
|
|
2025
|
+
body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
|
|
2026
|
+
"TemplateResource", ""]);
|
|
2027
|
+
return [2, body];
|
|
2028
|
+
case 2:
|
|
2029
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
2030
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2031
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2032
|
+
return [4, response.body.text()];
|
|
2033
|
+
case 3:
|
|
2034
|
+
body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
|
|
2035
|
+
"GenericError", ""]);
|
|
2036
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
2037
|
+
case 4:
|
|
2038
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
|
|
2039
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2040
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2041
|
+
return [4, response.body.text()];
|
|
2042
|
+
case 5:
|
|
2043
|
+
body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
|
|
2044
|
+
"TemplateResource", ""]);
|
|
2045
|
+
return [2, body];
|
|
2046
|
+
case 6:
|
|
2047
|
+
_o = exception_1.ApiException.bind;
|
|
2048
|
+
_p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
2049
|
+
return [4, response.getBodyAsAny()];
|
|
2050
|
+
case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
|
|
2051
|
+
}
|
|
2052
|
+
});
|
|
2053
|
+
});
|
|
2054
|
+
};
|
|
1410
2055
|
DefaultApiResponseProcessor.prototype.createAlias = function (response) {
|
|
1411
2056
|
return __awaiter(this, void 0, void 0, function () {
|
|
1412
2057
|
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, body, _w, _x, _y, _z, _0, _1;
|
|
@@ -1540,16 +2185,109 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
1540
2185
|
_0 = exception_1.ApiException.bind;
|
|
1541
2186
|
_1 = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
1542
2187
|
return [4, response.getBodyAsAny()];
|
|
1543
|
-
case 13: throw new (_0.apply(exception_1.ApiException, _1.concat([_2.sent(), response.headers])))();
|
|
2188
|
+
case 13: throw new (_0.apply(exception_1.ApiException, _1.concat([_2.sent(), response.headers])))();
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
});
|
|
2192
|
+
};
|
|
2193
|
+
DefaultApiResponseProcessor.prototype.createApiKey = function (response) {
|
|
2194
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2195
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
|
|
2196
|
+
return __generator(this, function (_q) {
|
|
2197
|
+
switch (_q.label) {
|
|
2198
|
+
case 0:
|
|
2199
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2200
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
2201
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2202
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2203
|
+
return [4, response.body.text()];
|
|
2204
|
+
case 1:
|
|
2205
|
+
body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
|
|
2206
|
+
"CreateApiKeyResponse", ""]);
|
|
2207
|
+
return [2, body];
|
|
2208
|
+
case 2:
|
|
2209
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
2210
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2211
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2212
|
+
return [4, response.body.text()];
|
|
2213
|
+
case 3:
|
|
2214
|
+
body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
|
|
2215
|
+
"GenericError", ""]);
|
|
2216
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
2217
|
+
case 4:
|
|
2218
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
|
|
2219
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2220
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2221
|
+
return [4, response.body.text()];
|
|
2222
|
+
case 5:
|
|
2223
|
+
body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
|
|
2224
|
+
"CreateApiKeyResponse", ""]);
|
|
2225
|
+
return [2, body];
|
|
2226
|
+
case 6:
|
|
2227
|
+
_o = exception_1.ApiException.bind;
|
|
2228
|
+
_p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
2229
|
+
return [4, response.getBodyAsAny()];
|
|
2230
|
+
case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
|
|
2231
|
+
}
|
|
2232
|
+
});
|
|
2233
|
+
});
|
|
2234
|
+
};
|
|
2235
|
+
DefaultApiResponseProcessor.prototype.createApp = function (response) {
|
|
2236
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2237
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
2238
|
+
return __generator(this, function (_u) {
|
|
2239
|
+
switch (_u.label) {
|
|
2240
|
+
case 0:
|
|
2241
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2242
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
2243
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2244
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2245
|
+
return [4, response.body.text()];
|
|
2246
|
+
case 1:
|
|
2247
|
+
body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
|
|
2248
|
+
"App", ""]);
|
|
2249
|
+
return [2, body];
|
|
2250
|
+
case 2:
|
|
2251
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
2252
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2253
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2254
|
+
return [4, response.body.text()];
|
|
2255
|
+
case 3:
|
|
2256
|
+
body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
|
|
2257
|
+
"GenericError", ""]);
|
|
2258
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
2259
|
+
case 4:
|
|
2260
|
+
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3, 6];
|
|
2261
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2262
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2263
|
+
return [4, response.body.text()];
|
|
2264
|
+
case 5:
|
|
2265
|
+
body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
|
|
2266
|
+
"RateLimitError", ""]);
|
|
2267
|
+
throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
|
|
2268
|
+
case 6:
|
|
2269
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
|
|
2270
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2271
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2272
|
+
return [4, response.body.text()];
|
|
2273
|
+
case 7:
|
|
2274
|
+
body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
|
|
2275
|
+
"App", ""]);
|
|
2276
|
+
return [2, body];
|
|
2277
|
+
case 8:
|
|
2278
|
+
_s = exception_1.ApiException.bind;
|
|
2279
|
+
_t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
2280
|
+
return [4, response.getBodyAsAny()];
|
|
2281
|
+
case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
|
|
1544
2282
|
}
|
|
1545
2283
|
});
|
|
1546
2284
|
});
|
|
1547
2285
|
};
|
|
1548
|
-
DefaultApiResponseProcessor.prototype.
|
|
2286
|
+
DefaultApiResponseProcessor.prototype.createCustomEvents = function (response) {
|
|
1549
2287
|
return __awaiter(this, void 0, void 0, function () {
|
|
1550
|
-
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
1551
|
-
return __generator(this, function (
|
|
1552
|
-
switch (
|
|
2288
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
|
|
2289
|
+
return __generator(this, function (_y) {
|
|
2290
|
+
switch (_y.label) {
|
|
1553
2291
|
case 0:
|
|
1554
2292
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1555
2293
|
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
@@ -1557,8 +2295,8 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
1557
2295
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1558
2296
|
return [4, response.body.text()];
|
|
1559
2297
|
case 1:
|
|
1560
|
-
body = _b.apply(_a, [_d.apply(_c, [
|
|
1561
|
-
"
|
|
2298
|
+
body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
|
|
2299
|
+
"object", ""]);
|
|
1562
2300
|
return [2, body];
|
|
1563
2301
|
case 2:
|
|
1564
2302
|
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
@@ -1566,32 +2304,41 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
1566
2304
|
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1567
2305
|
return [4, response.body.text()];
|
|
1568
2306
|
case 3:
|
|
1569
|
-
body = _f.apply(_e, [_h.apply(_g, [
|
|
2307
|
+
body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
|
|
1570
2308
|
"GenericError", ""]);
|
|
1571
2309
|
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
1572
2310
|
case 4:
|
|
1573
|
-
if (!(0, util_1.isCodeInRange)("
|
|
2311
|
+
if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 6];
|
|
1574
2312
|
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1575
2313
|
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1576
2314
|
return [4, response.body.text()];
|
|
1577
2315
|
case 5:
|
|
1578
|
-
body = _k.apply(_j, [_m.apply(_l, [
|
|
1579
|
-
"
|
|
1580
|
-
throw new exception_1.ApiException(
|
|
2316
|
+
body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
|
|
2317
|
+
"GenericError", ""]);
|
|
2318
|
+
throw new exception_1.ApiException(401, "Unauthorized", body, response.headers);
|
|
1581
2319
|
case 6:
|
|
1582
|
-
if (!(
|
|
2320
|
+
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3, 8];
|
|
1583
2321
|
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1584
2322
|
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1585
2323
|
return [4, response.body.text()];
|
|
1586
2324
|
case 7:
|
|
1587
|
-
body = _p.apply(_o, [_r.apply(_q, [
|
|
1588
|
-
"
|
|
1589
|
-
|
|
2325
|
+
body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
|
|
2326
|
+
"RateLimitError", ""]);
|
|
2327
|
+
throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
|
|
1590
2328
|
case 8:
|
|
1591
|
-
|
|
1592
|
-
_t =
|
|
2329
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
|
|
2330
|
+
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2331
|
+
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2332
|
+
return [4, response.body.text()];
|
|
2333
|
+
case 9:
|
|
2334
|
+
body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
|
|
2335
|
+
"object", ""]);
|
|
2336
|
+
return [2, body];
|
|
2337
|
+
case 10:
|
|
2338
|
+
_w = exception_1.ApiException.bind;
|
|
2339
|
+
_x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
1593
2340
|
return [4, response.getBodyAsAny()];
|
|
1594
|
-
case
|
|
2341
|
+
case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
|
|
1595
2342
|
}
|
|
1596
2343
|
});
|
|
1597
2344
|
});
|
|
@@ -1785,6 +2532,57 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
1785
2532
|
});
|
|
1786
2533
|
});
|
|
1787
2534
|
};
|
|
2535
|
+
DefaultApiResponseProcessor.prototype.createTemplate = function (response) {
|
|
2536
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2537
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
2538
|
+
return __generator(this, function (_u) {
|
|
2539
|
+
switch (_u.label) {
|
|
2540
|
+
case 0:
|
|
2541
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2542
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
2543
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2544
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2545
|
+
return [4, response.body.text()];
|
|
2546
|
+
case 1:
|
|
2547
|
+
body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
|
|
2548
|
+
"TemplateResource", ""]);
|
|
2549
|
+
return [2, body];
|
|
2550
|
+
case 2:
|
|
2551
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
2552
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2553
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2554
|
+
return [4, response.body.text()];
|
|
2555
|
+
case 3:
|
|
2556
|
+
body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
|
|
2557
|
+
"GenericError", ""]);
|
|
2558
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
2559
|
+
case 4:
|
|
2560
|
+
if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 6];
|
|
2561
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2562
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2563
|
+
return [4, response.body.text()];
|
|
2564
|
+
case 5:
|
|
2565
|
+
body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
|
|
2566
|
+
"GenericError", ""]);
|
|
2567
|
+
throw new exception_1.ApiException(422, "Unprocessable Entity", body, response.headers);
|
|
2568
|
+
case 6:
|
|
2569
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
|
|
2570
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2571
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2572
|
+
return [4, response.body.text()];
|
|
2573
|
+
case 7:
|
|
2574
|
+
body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
|
|
2575
|
+
"TemplateResource", ""]);
|
|
2576
|
+
return [2, body];
|
|
2577
|
+
case 8:
|
|
2578
|
+
_s = exception_1.ApiException.bind;
|
|
2579
|
+
_t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
2580
|
+
return [4, response.getBodyAsAny()];
|
|
2581
|
+
case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
|
|
2582
|
+
}
|
|
2583
|
+
});
|
|
2584
|
+
});
|
|
2585
|
+
};
|
|
1788
2586
|
DefaultApiResponseProcessor.prototype.createUser = function (response) {
|
|
1789
2587
|
return __awaiter(this, void 0, void 0, function () {
|
|
1790
2588
|
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, body, _w, _x, _y, _z, body, _0, _1, _2, _3, _4, _5;
|
|
@@ -1932,6 +2730,48 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
1932
2730
|
});
|
|
1933
2731
|
});
|
|
1934
2732
|
};
|
|
2733
|
+
DefaultApiResponseProcessor.prototype.deleteApiKey = function (response) {
|
|
2734
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2735
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
|
|
2736
|
+
return __generator(this, function (_q) {
|
|
2737
|
+
switch (_q.label) {
|
|
2738
|
+
case 0:
|
|
2739
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2740
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
2741
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2742
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2743
|
+
return [4, response.body.text()];
|
|
2744
|
+
case 1:
|
|
2745
|
+
body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
|
|
2746
|
+
"object", ""]);
|
|
2747
|
+
return [2, body];
|
|
2748
|
+
case 2:
|
|
2749
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
2750
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2751
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2752
|
+
return [4, response.body.text()];
|
|
2753
|
+
case 3:
|
|
2754
|
+
body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
|
|
2755
|
+
"GenericError", ""]);
|
|
2756
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
2757
|
+
case 4:
|
|
2758
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
|
|
2759
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2760
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2761
|
+
return [4, response.body.text()];
|
|
2762
|
+
case 5:
|
|
2763
|
+
body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
|
|
2764
|
+
"object", ""]);
|
|
2765
|
+
return [2, body];
|
|
2766
|
+
case 6:
|
|
2767
|
+
_o = exception_1.ApiException.bind;
|
|
2768
|
+
_p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
2769
|
+
return [4, response.getBodyAsAny()];
|
|
2770
|
+
case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
|
|
2771
|
+
}
|
|
2772
|
+
});
|
|
2773
|
+
});
|
|
2774
|
+
};
|
|
1935
2775
|
DefaultApiResponseProcessor.prototype.deleteSegment = function (response) {
|
|
1936
2776
|
return __awaiter(this, void 0, void 0, function () {
|
|
1937
2777
|
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
|
|
@@ -2055,6 +2895,57 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
2055
2895
|
});
|
|
2056
2896
|
});
|
|
2057
2897
|
};
|
|
2898
|
+
DefaultApiResponseProcessor.prototype.deleteTemplate = function (response) {
|
|
2899
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2900
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
2901
|
+
return __generator(this, function (_u) {
|
|
2902
|
+
switch (_u.label) {
|
|
2903
|
+
case 0:
|
|
2904
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2905
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
2906
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2907
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2908
|
+
return [4, response.body.text()];
|
|
2909
|
+
case 1:
|
|
2910
|
+
body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
|
|
2911
|
+
"GenericSuccessBoolResponse", ""]);
|
|
2912
|
+
return [2, body];
|
|
2913
|
+
case 2:
|
|
2914
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
2915
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2916
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2917
|
+
return [4, response.body.text()];
|
|
2918
|
+
case 3:
|
|
2919
|
+
body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
|
|
2920
|
+
"GenericError", ""]);
|
|
2921
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
2922
|
+
case 4:
|
|
2923
|
+
if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 6];
|
|
2924
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2925
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2926
|
+
return [4, response.body.text()];
|
|
2927
|
+
case 5:
|
|
2928
|
+
body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
|
|
2929
|
+
"GenericError", ""]);
|
|
2930
|
+
throw new exception_1.ApiException(404, "Not Found", body, response.headers);
|
|
2931
|
+
case 6:
|
|
2932
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
|
|
2933
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2934
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2935
|
+
return [4, response.body.text()];
|
|
2936
|
+
case 7:
|
|
2937
|
+
body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
|
|
2938
|
+
"GenericSuccessBoolResponse", ""]);
|
|
2939
|
+
return [2, body];
|
|
2940
|
+
case 8:
|
|
2941
|
+
_s = exception_1.ApiException.bind;
|
|
2942
|
+
_t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
2943
|
+
return [4, response.getBodyAsAny()];
|
|
2944
|
+
case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
|
|
2945
|
+
}
|
|
2946
|
+
});
|
|
2947
|
+
});
|
|
2948
|
+
};
|
|
2058
2949
|
DefaultApiResponseProcessor.prototype.deleteUser = function (response) {
|
|
2059
2950
|
return __awaiter(this, void 0, void 0, function () {
|
|
2060
2951
|
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
@@ -2740,28 +3631,121 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
2740
3631
|
"GenericError", ""]);
|
|
2741
3632
|
throw new exception_1.ApiException(404, "Not Found", body, response.headers);
|
|
2742
3633
|
case 6:
|
|
2743
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3, 8];
|
|
3634
|
+
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3, 8];
|
|
3635
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3636
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3637
|
+
return [4, response.body.text()];
|
|
3638
|
+
case 7:
|
|
3639
|
+
body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
|
|
3640
|
+
"RateLimitError", ""]);
|
|
3641
|
+
throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
|
|
3642
|
+
case 8:
|
|
3643
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
|
|
3644
|
+
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3645
|
+
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3646
|
+
return [4, response.body.text()];
|
|
3647
|
+
case 9:
|
|
3648
|
+
body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
|
|
3649
|
+
"User", ""]);
|
|
3650
|
+
return [2, body];
|
|
3651
|
+
case 10:
|
|
3652
|
+
_w = exception_1.ApiException.bind;
|
|
3653
|
+
_x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
3654
|
+
return [4, response.getBodyAsAny()];
|
|
3655
|
+
case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
|
|
3656
|
+
}
|
|
3657
|
+
});
|
|
3658
|
+
});
|
|
3659
|
+
};
|
|
3660
|
+
DefaultApiResponseProcessor.prototype.rotateApiKey = function (response) {
|
|
3661
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3662
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
|
|
3663
|
+
return __generator(this, function (_q) {
|
|
3664
|
+
switch (_q.label) {
|
|
3665
|
+
case 0:
|
|
3666
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3667
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
3668
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3669
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3670
|
+
return [4, response.body.text()];
|
|
3671
|
+
case 1:
|
|
3672
|
+
body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
|
|
3673
|
+
"CreateApiKeyResponse", ""]);
|
|
3674
|
+
return [2, body];
|
|
3675
|
+
case 2:
|
|
3676
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
3677
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3678
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3679
|
+
return [4, response.body.text()];
|
|
3680
|
+
case 3:
|
|
3681
|
+
body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
|
|
3682
|
+
"GenericError", ""]);
|
|
3683
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
3684
|
+
case 4:
|
|
3685
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
|
|
3686
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3687
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3688
|
+
return [4, response.body.text()];
|
|
3689
|
+
case 5:
|
|
3690
|
+
body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
|
|
3691
|
+
"CreateApiKeyResponse", ""]);
|
|
3692
|
+
return [2, body];
|
|
3693
|
+
case 6:
|
|
3694
|
+
_o = exception_1.ApiException.bind;
|
|
3695
|
+
_p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
3696
|
+
return [4, response.getBodyAsAny()];
|
|
3697
|
+
case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
|
|
3698
|
+
}
|
|
3699
|
+
});
|
|
3700
|
+
});
|
|
3701
|
+
};
|
|
3702
|
+
DefaultApiResponseProcessor.prototype.startLiveActivity = function (response) {
|
|
3703
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3704
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
3705
|
+
return __generator(this, function (_u) {
|
|
3706
|
+
switch (_u.label) {
|
|
3707
|
+
case 0:
|
|
3708
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3709
|
+
if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3, 2];
|
|
3710
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3711
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3712
|
+
return [4, response.body.text()];
|
|
3713
|
+
case 1:
|
|
3714
|
+
body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
|
|
3715
|
+
"StartLiveActivitySuccessResponse", ""]);
|
|
3716
|
+
return [2, body];
|
|
3717
|
+
case 2:
|
|
3718
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
3719
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3720
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3721
|
+
return [4, response.body.text()];
|
|
3722
|
+
case 3:
|
|
3723
|
+
body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
|
|
3724
|
+
"GenericError", ""]);
|
|
3725
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
3726
|
+
case 4:
|
|
3727
|
+
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3, 6];
|
|
3728
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3729
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3730
|
+
return [4, response.body.text()];
|
|
3731
|
+
case 5:
|
|
3732
|
+
body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
|
|
3733
|
+
"RateLimitError", ""]);
|
|
3734
|
+
throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
|
|
3735
|
+
case 6:
|
|
3736
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
|
|
2744
3737
|
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2745
3738
|
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2746
3739
|
return [4, response.body.text()];
|
|
2747
3740
|
case 7:
|
|
2748
|
-
body = _p.apply(_o, [_r.apply(_q, [
|
|
2749
|
-
"
|
|
2750
|
-
throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
|
|
2751
|
-
case 8:
|
|
2752
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
|
|
2753
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2754
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2755
|
-
return [4, response.body.text()];
|
|
2756
|
-
case 9:
|
|
2757
|
-
body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
|
|
2758
|
-
"User", ""]);
|
|
3741
|
+
body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
|
|
3742
|
+
"StartLiveActivitySuccessResponse", ""]);
|
|
2759
3743
|
return [2, body];
|
|
2760
|
-
case
|
|
2761
|
-
|
|
2762
|
-
|
|
3744
|
+
case 8:
|
|
3745
|
+
_s = exception_1.ApiException.bind;
|
|
3746
|
+
_t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
2763
3747
|
return [4, response.getBodyAsAny()];
|
|
2764
|
-
case
|
|
3748
|
+
case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
|
|
2765
3749
|
}
|
|
2766
3750
|
});
|
|
2767
3751
|
});
|
|
@@ -2886,6 +3870,48 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
2886
3870
|
});
|
|
2887
3871
|
});
|
|
2888
3872
|
};
|
|
3873
|
+
DefaultApiResponseProcessor.prototype.updateApiKey = function (response) {
|
|
3874
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3875
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
|
|
3876
|
+
return __generator(this, function (_q) {
|
|
3877
|
+
switch (_q.label) {
|
|
3878
|
+
case 0:
|
|
3879
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3880
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
3881
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3882
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3883
|
+
return [4, response.body.text()];
|
|
3884
|
+
case 1:
|
|
3885
|
+
body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
|
|
3886
|
+
"object", ""]);
|
|
3887
|
+
return [2, body];
|
|
3888
|
+
case 2:
|
|
3889
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
3890
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3891
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3892
|
+
return [4, response.body.text()];
|
|
3893
|
+
case 3:
|
|
3894
|
+
body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
|
|
3895
|
+
"GenericError", ""]);
|
|
3896
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
3897
|
+
case 4:
|
|
3898
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
|
|
3899
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3900
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3901
|
+
return [4, response.body.text()];
|
|
3902
|
+
case 5:
|
|
3903
|
+
body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
|
|
3904
|
+
"object", ""]);
|
|
3905
|
+
return [2, body];
|
|
3906
|
+
case 6:
|
|
3907
|
+
_o = exception_1.ApiException.bind;
|
|
3908
|
+
_p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
3909
|
+
return [4, response.getBodyAsAny()];
|
|
3910
|
+
case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
|
|
3911
|
+
}
|
|
3912
|
+
});
|
|
3913
|
+
});
|
|
3914
|
+
};
|
|
2889
3915
|
DefaultApiResponseProcessor.prototype.updateApp = function (response) {
|
|
2890
3916
|
return __awaiter(this, void 0, void 0, function () {
|
|
2891
3917
|
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
@@ -3051,6 +4077,99 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
3051
4077
|
});
|
|
3052
4078
|
});
|
|
3053
4079
|
};
|
|
4080
|
+
DefaultApiResponseProcessor.prototype.updateSubscriptionByToken = function (response) {
|
|
4081
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4082
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
4083
|
+
return __generator(this, function (_u) {
|
|
4084
|
+
switch (_u.label) {
|
|
4085
|
+
case 0:
|
|
4086
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
4087
|
+
if (!(0, util_1.isCodeInRange)("202", response.httpStatusCode)) return [3, 2];
|
|
4088
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4089
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4090
|
+
return [4, response.body.text()];
|
|
4091
|
+
case 1:
|
|
4092
|
+
body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
|
|
4093
|
+
"object", ""]);
|
|
4094
|
+
return [2, body];
|
|
4095
|
+
case 2:
|
|
4096
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
4097
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4098
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4099
|
+
return [4, response.body.text()];
|
|
4100
|
+
case 3:
|
|
4101
|
+
body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
|
|
4102
|
+
"GenericError", ""]);
|
|
4103
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
4104
|
+
case 4:
|
|
4105
|
+
if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 6];
|
|
4106
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4107
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4108
|
+
return [4, response.body.text()];
|
|
4109
|
+
case 5:
|
|
4110
|
+
body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
|
|
4111
|
+
"GenericError", ""]);
|
|
4112
|
+
throw new exception_1.ApiException(404, "Not Found", body, response.headers);
|
|
4113
|
+
case 6:
|
|
4114
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
|
|
4115
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4116
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4117
|
+
return [4, response.body.text()];
|
|
4118
|
+
case 7:
|
|
4119
|
+
body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
|
|
4120
|
+
"object", ""]);
|
|
4121
|
+
return [2, body];
|
|
4122
|
+
case 8:
|
|
4123
|
+
_s = exception_1.ApiException.bind;
|
|
4124
|
+
_t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
4125
|
+
return [4, response.getBodyAsAny()];
|
|
4126
|
+
case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
|
|
4127
|
+
}
|
|
4128
|
+
});
|
|
4129
|
+
});
|
|
4130
|
+
};
|
|
4131
|
+
DefaultApiResponseProcessor.prototype.updateTemplate = function (response) {
|
|
4132
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4133
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
|
|
4134
|
+
return __generator(this, function (_q) {
|
|
4135
|
+
switch (_q.label) {
|
|
4136
|
+
case 0:
|
|
4137
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
4138
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
4139
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4140
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4141
|
+
return [4, response.body.text()];
|
|
4142
|
+
case 1:
|
|
4143
|
+
body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
|
|
4144
|
+
"TemplateResource", ""]);
|
|
4145
|
+
return [2, body];
|
|
4146
|
+
case 2:
|
|
4147
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
4148
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4149
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4150
|
+
return [4, response.body.text()];
|
|
4151
|
+
case 3:
|
|
4152
|
+
body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
|
|
4153
|
+
"GenericError", ""]);
|
|
4154
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
4155
|
+
case 4:
|
|
4156
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
|
|
4157
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4158
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4159
|
+
return [4, response.body.text()];
|
|
4160
|
+
case 5:
|
|
4161
|
+
body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
|
|
4162
|
+
"TemplateResource", ""]);
|
|
4163
|
+
return [2, body];
|
|
4164
|
+
case 6:
|
|
4165
|
+
_o = exception_1.ApiException.bind;
|
|
4166
|
+
_p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
4167
|
+
return [4, response.getBodyAsAny()];
|
|
4168
|
+
case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
|
|
4169
|
+
}
|
|
4170
|
+
});
|
|
4171
|
+
});
|
|
4172
|
+
};
|
|
3054
4173
|
DefaultApiResponseProcessor.prototype.updateUser = function (response) {
|
|
3055
4174
|
return __awaiter(this, void 0, void 0, function () {
|
|
3056
4175
|
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
|
|
@@ -3111,6 +4230,150 @@ var DefaultApiResponseProcessor = (function () {
|
|
|
3111
4230
|
});
|
|
3112
4231
|
});
|
|
3113
4232
|
};
|
|
4233
|
+
DefaultApiResponseProcessor.prototype.viewApiKeys = function (response) {
|
|
4234
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4235
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
|
|
4236
|
+
return __generator(this, function (_q) {
|
|
4237
|
+
switch (_q.label) {
|
|
4238
|
+
case 0:
|
|
4239
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
4240
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
4241
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4242
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4243
|
+
return [4, response.body.text()];
|
|
4244
|
+
case 1:
|
|
4245
|
+
body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
|
|
4246
|
+
"ApiKeyTokensListResponse", ""]);
|
|
4247
|
+
return [2, body];
|
|
4248
|
+
case 2:
|
|
4249
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
4250
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4251
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4252
|
+
return [4, response.body.text()];
|
|
4253
|
+
case 3:
|
|
4254
|
+
body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
|
|
4255
|
+
"GenericError", ""]);
|
|
4256
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
4257
|
+
case 4:
|
|
4258
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
|
|
4259
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4260
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4261
|
+
return [4, response.body.text()];
|
|
4262
|
+
case 5:
|
|
4263
|
+
body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
|
|
4264
|
+
"ApiKeyTokensListResponse", ""]);
|
|
4265
|
+
return [2, body];
|
|
4266
|
+
case 6:
|
|
4267
|
+
_o = exception_1.ApiException.bind;
|
|
4268
|
+
_p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
4269
|
+
return [4, response.getBodyAsAny()];
|
|
4270
|
+
case 7: throw new (_o.apply(exception_1.ApiException, _p.concat([_q.sent(), response.headers])))();
|
|
4271
|
+
}
|
|
4272
|
+
});
|
|
4273
|
+
});
|
|
4274
|
+
};
|
|
4275
|
+
DefaultApiResponseProcessor.prototype.viewTemplate = function (response) {
|
|
4276
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4277
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
4278
|
+
return __generator(this, function (_u) {
|
|
4279
|
+
switch (_u.label) {
|
|
4280
|
+
case 0:
|
|
4281
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
4282
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
4283
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4284
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4285
|
+
return [4, response.body.text()];
|
|
4286
|
+
case 1:
|
|
4287
|
+
body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
|
|
4288
|
+
"TemplateResource", ""]);
|
|
4289
|
+
return [2, body];
|
|
4290
|
+
case 2:
|
|
4291
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
4292
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4293
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4294
|
+
return [4, response.body.text()];
|
|
4295
|
+
case 3:
|
|
4296
|
+
body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
|
|
4297
|
+
"GenericError", ""]);
|
|
4298
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
4299
|
+
case 4:
|
|
4300
|
+
if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 6];
|
|
4301
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4302
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4303
|
+
return [4, response.body.text()];
|
|
4304
|
+
case 5:
|
|
4305
|
+
body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
|
|
4306
|
+
"GenericError", ""]);
|
|
4307
|
+
throw new exception_1.ApiException(404, "Not Found", body, response.headers);
|
|
4308
|
+
case 6:
|
|
4309
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
|
|
4310
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4311
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4312
|
+
return [4, response.body.text()];
|
|
4313
|
+
case 7:
|
|
4314
|
+
body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
|
|
4315
|
+
"TemplateResource", ""]);
|
|
4316
|
+
return [2, body];
|
|
4317
|
+
case 8:
|
|
4318
|
+
_s = exception_1.ApiException.bind;
|
|
4319
|
+
_t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
4320
|
+
return [4, response.getBodyAsAny()];
|
|
4321
|
+
case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
|
|
4322
|
+
}
|
|
4323
|
+
});
|
|
4324
|
+
});
|
|
4325
|
+
};
|
|
4326
|
+
DefaultApiResponseProcessor.prototype.viewTemplates = function (response) {
|
|
4327
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4328
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, _s, _t;
|
|
4329
|
+
return __generator(this, function (_u) {
|
|
4330
|
+
switch (_u.label) {
|
|
4331
|
+
case 0:
|
|
4332
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
4333
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
4334
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4335
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4336
|
+
return [4, response.body.text()];
|
|
4337
|
+
case 1:
|
|
4338
|
+
body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
|
|
4339
|
+
"TemplatesListResponse", ""]);
|
|
4340
|
+
return [2, body];
|
|
4341
|
+
case 2:
|
|
4342
|
+
if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3, 4];
|
|
4343
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4344
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4345
|
+
return [4, response.body.text()];
|
|
4346
|
+
case 3:
|
|
4347
|
+
body = _f.apply(_e, [_h.apply(_g, [_u.sent(), contentType]),
|
|
4348
|
+
"GenericError", ""]);
|
|
4349
|
+
throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
|
|
4350
|
+
case 4:
|
|
4351
|
+
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3, 6];
|
|
4352
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4353
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4354
|
+
return [4, response.body.text()];
|
|
4355
|
+
case 5:
|
|
4356
|
+
body = _k.apply(_j, [_m.apply(_l, [_u.sent(), contentType]),
|
|
4357
|
+
"RateLimitError", ""]);
|
|
4358
|
+
throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
|
|
4359
|
+
case 6:
|
|
4360
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 8];
|
|
4361
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
4362
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
4363
|
+
return [4, response.body.text()];
|
|
4364
|
+
case 7:
|
|
4365
|
+
body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
|
|
4366
|
+
"TemplatesListResponse", ""]);
|
|
4367
|
+
return [2, body];
|
|
4368
|
+
case 8:
|
|
4369
|
+
_s = exception_1.ApiException.bind;
|
|
4370
|
+
_t = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
4371
|
+
return [4, response.getBodyAsAny()];
|
|
4372
|
+
case 9: throw new (_s.apply(exception_1.ApiException, _t.concat([_u.sent(), response.headers])))();
|
|
4373
|
+
}
|
|
4374
|
+
});
|
|
4375
|
+
});
|
|
4376
|
+
};
|
|
3114
4377
|
return DefaultApiResponseProcessor;
|
|
3115
4378
|
}());
|
|
3116
4379
|
exports.DefaultApiResponseProcessor = DefaultApiResponseProcessor;
|