@onesignal/node-onesignal 2.0.1-beta1 → 2.1.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 +128 -6
- package/apis/DefaultApi.ts +740 -95
- package/dist/apis/DefaultApi.d.ts +3 -0
- package/dist/apis/DefaultApi.js +1112 -420
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/http/http.d.ts +1 -0
- package/dist/jest.config.d.ts +15 -0
- package/dist/jest.config.js +17 -0
- package/dist/jest.config.js.map +1 -0
- package/dist/models/{DeleteSegmentBadRequestResponse.d.ts → ExportEventsSuccessResponse.d.ts} +2 -2
- package/dist/models/ExportEventsSuccessResponse.js +22 -0
- package/dist/models/ExportEventsSuccessResponse.js.map +1 -0
- package/dist/models/ExportSubscriptionsRequestBody.d.ts +19 -0
- package/dist/models/ExportSubscriptionsRequestBody.js +34 -0
- package/dist/models/ExportSubscriptionsRequestBody.js.map +1 -0
- package/dist/models/{DeletePlayerBadRequestResponse.d.ts → ExportSubscriptionsSuccessResponse.d.ts} +2 -2
- package/dist/models/ExportSubscriptionsSuccessResponse.js +22 -0
- package/dist/models/ExportSubscriptionsSuccessResponse.js.map +1 -0
- package/dist/models/FilterExpression.d.ts +27 -0
- package/dist/models/FilterExpression.js +70 -0
- package/dist/models/FilterExpression.js.map +1 -0
- package/dist/models/GenericError.d.ts +18 -0
- package/dist/models/GenericError.js +22 -0
- package/dist/models/GenericError.js.map +1 -0
- package/dist/models/{IdentifyUserConflictResponseErrorsInner.d.ts → GenericErrorErrorsInner.d.ts} +1 -1
- package/dist/models/GenericErrorErrorsInner.js +28 -0
- package/dist/models/GenericErrorErrorsInner.js.map +1 -0
- package/dist/models/{CreateSegmentBadRequestResponse.d.ts → GenericSuccessBoolResponse.d.ts} +1 -2
- package/dist/models/GenericSuccessBoolResponse.js +22 -0
- package/dist/models/GenericSuccessBoolResponse.js.map +1 -0
- package/dist/models/GetNotificationHistoryRequestBody.d.ts +20 -0
- package/dist/models/GetNotificationHistoryRequestBody.js +34 -0
- package/dist/models/GetNotificationHistoryRequestBody.js.map +1 -0
- package/dist/models/GetSegmentsSuccessResponse.d.ts +21 -0
- package/dist/models/GetSegmentsSuccessResponse.js +40 -0
- package/dist/models/GetSegmentsSuccessResponse.js.map +1 -0
- package/dist/models/LanguageStringMap.d.ts +59 -0
- package/dist/models/LanguageStringMap.js +274 -0
- package/dist/models/LanguageStringMap.js.map +1 -0
- package/dist/models/ObjectSerializer.d.ts +4 -3
- package/dist/models/ObjectSerializer.js +12 -9
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/PropertiesBody.d.ts +18 -0
- package/dist/models/PropertiesBody.js +22 -0
- package/dist/models/PropertiesBody.js.map +1 -0
- package/dist/models/{BadRequestError.d.ts → RateLimitError.d.ts} +2 -1
- package/dist/models/RateLimitError.js +28 -0
- package/dist/models/RateLimitError.js.map +1 -0
- package/dist/models/RateLimiterError.d.ts +18 -0
- package/dist/models/RateLimiterError.js +22 -0
- package/dist/models/RateLimiterError.js.map +1 -0
- package/dist/models/SegmentData.d.ts +23 -0
- package/dist/models/SegmentData.js +58 -0
- package/dist/models/SegmentData.js.map +1 -0
- package/dist/models/Subscription.d.ts +34 -0
- package/dist/models/Subscription.js +118 -0
- package/dist/models/Subscription.js.map +1 -0
- package/dist/models/SubscriptionBody.d.ts +18 -0
- package/dist/models/SubscriptionBody.js +22 -0
- package/dist/models/SubscriptionBody.js.map +1 -0
- package/dist/models/SubscriptionNotificationTarget.d.ts +30 -0
- package/dist/models/SubscriptionNotificationTarget.js +82 -0
- package/dist/models/SubscriptionNotificationTarget.js.map +1 -0
- package/dist/models/{CreateNotificationBadRequestResponse.d.ts → UserIdentityBody.d.ts} +4 -2
- package/dist/models/UserIdentityBody.js +22 -0
- package/dist/models/UserIdentityBody.js.map +1 -0
- package/dist/models/WebButton.d.ts +20 -0
- package/dist/models/WebButton.js +40 -0
- package/dist/models/WebButton.js.map +1 -0
- package/dist/models/all.d.ts +4 -3
- package/dist/models/all.js +4 -3
- package/dist/models/all.js.map +1 -1
- package/dist/servers.js +1 -1
- package/dist/servers.js.map +1 -1
- package/dist/test/DefaultApi.test.d.ts +1 -0
- package/dist/test/DefaultApi.test.js +49 -0
- package/dist/test/DefaultApi.test.js.map +1 -0
- package/dist/types/ObjectParamAPI.d.ts +6 -0
- package/dist/types/ObjectParamAPI.js +3 -0
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +2 -0
- package/dist/types/ObservableAPI.js +89 -65
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +2 -0
- package/dist/types/PromiseAPI.js +4 -0
- package/dist/types/PromiseAPI.js.map +1 -1
- 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/BeginLiveActivityRequest.ts +1 -1
- package/models/Button.ts +1 -1
- package/models/CancelNotificationSuccessResponse.ts +1 -1
- package/models/CreateNotificationSuccessResponse.ts +1 -1
- package/models/CreatePlayerSuccessResponse.ts +1 -1
- package/models/CreateSegmentConflictResponse.ts +1 -1
- package/models/CreateSegmentSuccessResponse.ts +1 -1
- package/models/CreateSubscriptionRequestBody.ts +1 -1
- package/models/CreateUserConflictResponse.ts +1 -1
- package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
- package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
- package/models/DeletePlayerNotFoundResponse.ts +1 -1
- package/models/DeletePlayerSuccessResponse.ts +1 -1
- package/models/DeleteSegmentNotFoundResponse.ts +1 -1
- package/models/DeleteSegmentSuccessResponse.ts +1 -1
- package/models/DeliveryData.ts +1 -1
- package/models/{DeletePlayerBadRequestResponse.ts → ExportEventsSuccessResponse.ts} +7 -7
- package/models/ExportPlayersRequestBody.ts +1 -1
- package/models/ExportPlayersSuccessResponse.ts +1 -1
- package/models/Filter.ts +1 -1
- package/models/FilterExpressions.ts +1 -1
- package/models/{CreateNotificationBadRequestResponse.ts → GenericError.ts} +6 -5
- package/models/{IdentifyUserConflictResponseErrorsInner.ts → GenericErrorErrorsInner.ts} +3 -3
- package/models/GetNotificationRequestBody.ts +1 -1
- package/models/InlineResponse200.ts +1 -1
- package/models/InlineResponse2003.ts +1 -1
- package/models/InlineResponse201.ts +1 -1
- package/models/InlineResponse202.ts +1 -1
- package/models/InvalidIdentifierError.ts +1 -1
- package/models/Notification.ts +1 -1
- package/models/Notification200Errors.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 +1 -1
- package/models/NotificationWithMetaAllOf.ts +1 -1
- package/models/ObjectSerializer.ts +12 -9
- 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/Player.ts +1 -1
- package/models/PlayerNotificationTarget.ts +1 -1
- package/models/PlayerNotificationTargetIncludeAliases.ts +1 -1
- package/models/PlayerSlice.ts +1 -1
- package/models/PropertiesDeltas.ts +1 -1
- package/models/PropertiesObject.ts +1 -1
- package/models/Purchase.ts +1 -1
- package/models/{BadRequestError.ts → RateLimiterError.ts} +6 -5
- package/models/Segment.ts +1 -1
- package/models/SegmentNotificationTarget.ts +1 -1
- package/models/StringMap.ts +1 -1
- package/models/SubscriptionObject.ts +1 -1
- package/models/TransferSubscriptionRequestBody.ts +1 -1
- package/models/UpdateLiveActivityRequest.ts +1 -1
- package/models/UpdateLiveActivitySuccessResponse.ts +1 -1
- package/models/UpdatePlayerSuccessResponse.ts +1 -1
- package/models/UpdatePlayerTagsRequestBody.ts +1 -1
- package/models/UpdatePlayerTagsSuccessResponse.ts +1 -1
- package/models/UpdateSubscriptionRequestBody.ts +1 -1
- package/models/UpdateUserRequest.ts +1 -1
- package/models/User.ts +1 -1
- package/models/UserIdentityRequestBody.ts +1 -1
- package/models/UserIdentityResponse.ts +1 -1
- package/models/UserSubscriptionOptions.ts +1 -1
- package/models/all.ts +4 -3
- package/package.json +2 -2
- package/servers.ts +1 -1
- package/types/ObjectParamAPI.ts +29 -4
- package/types/ObservableAPI.ts +30 -4
- package/types/PromiseAPI.ts +16 -4
- package/dist/models/BadRequestError.js +0 -22
- package/dist/models/BadRequestError.js.map +0 -1
- package/dist/models/CreateNotificationBadRequestResponse.js +0 -22
- package/dist/models/CreateNotificationBadRequestResponse.js.map +0 -1
- package/dist/models/CreateSegmentBadRequestResponse.js +0 -28
- package/dist/models/CreateSegmentBadRequestResponse.js.map +0 -1
- package/dist/models/DeletePlayerBadRequestResponse.js +0 -22
- package/dist/models/DeletePlayerBadRequestResponse.js.map +0 -1
- package/dist/models/DeleteSegmentBadRequestResponse.js +0 -22
- package/dist/models/DeleteSegmentBadRequestResponse.js.map +0 -1
- package/dist/models/FilterNotificationTarget.d.ts +0 -28
- package/dist/models/FilterNotificationTarget.js +0 -88
- package/dist/models/FilterNotificationTarget.js.map +0 -1
- package/dist/models/IdentifyUserConflictResponse.d.ts +0 -18
- package/dist/models/IdentifyUserConflictResponse.js +0 -22
- package/dist/models/IdentifyUserConflictResponse.js.map +0 -1
- package/dist/models/IdentifyUserConflictResponseErrorsInner.js +0 -28
- package/dist/models/IdentifyUserConflictResponseErrorsInner.js.map +0 -1
- package/dist/models/NotificationHistoryBadRequestResponse.d.ts +0 -18
- package/dist/models/NotificationHistoryBadRequestResponse.js +0 -28
- package/dist/models/NotificationHistoryBadRequestResponse.js.map +0 -1
- package/models/CreateSegmentBadRequestResponse.ts +0 -38
- package/models/DeleteSegmentBadRequestResponse.ts +0 -31
- package/models/FilterNotificationTarget.ts +0 -144
- package/models/IdentifyUserConflictResponse.ts +0 -32
- package/models/NotificationHistoryBadRequestResponse.ts +0 -38
package/apis/DefaultApi.ts
CHANGED
|
@@ -11,7 +11,6 @@ import {SecurityAuthentication} from '../auth/auth';
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
import { App } from '../models/App';
|
|
14
|
-
import { BadRequestError } from '../models/BadRequestError';
|
|
15
14
|
import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
|
|
16
15
|
import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
|
|
17
16
|
import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
|
|
@@ -24,10 +23,11 @@ import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResp
|
|
|
24
23
|
import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
|
|
25
24
|
import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
|
|
26
25
|
import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
|
|
26
|
+
import { ExportEventsSuccessResponse } from '../models/ExportEventsSuccessResponse';
|
|
27
27
|
import { ExportPlayersRequestBody } from '../models/ExportPlayersRequestBody';
|
|
28
28
|
import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResponse';
|
|
29
|
+
import { GenericError } from '../models/GenericError';
|
|
29
30
|
import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
|
|
30
|
-
import { IdentifyUserConflictResponse } from '../models/IdentifyUserConflictResponse';
|
|
31
31
|
import { InlineResponse200 } from '../models/InlineResponse200';
|
|
32
32
|
import { InlineResponse2003 } from '../models/InlineResponse2003';
|
|
33
33
|
import { InlineResponse201 } from '../models/InlineResponse201';
|
|
@@ -39,6 +39,7 @@ import { NotificationWithMeta } from '../models/NotificationWithMeta';
|
|
|
39
39
|
import { OutcomesData } from '../models/OutcomesData';
|
|
40
40
|
import { Player } from '../models/Player';
|
|
41
41
|
import { PlayerSlice } from '../models/PlayerSlice';
|
|
42
|
+
import { RateLimiterError } from '../models/RateLimiterError';
|
|
42
43
|
import { Segment } from '../models/Segment';
|
|
43
44
|
import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
|
|
44
45
|
import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
|
|
@@ -94,6 +95,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
94
95
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
95
96
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
96
97
|
|
|
98
|
+
// Always add the One Signal telemetry to the request.
|
|
99
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
100
|
+
|
|
97
101
|
|
|
98
102
|
// Body Params
|
|
99
103
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -150,6 +154,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
150
154
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
151
155
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
152
156
|
|
|
157
|
+
// Always add the One Signal telemetry to the request.
|
|
158
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
159
|
+
|
|
153
160
|
// Query Params
|
|
154
161
|
if (appId !== undefined) {
|
|
155
162
|
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
@@ -192,6 +199,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
192
199
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
193
200
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
194
201
|
|
|
202
|
+
// Always add the One Signal telemetry to the request.
|
|
203
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
204
|
+
|
|
195
205
|
|
|
196
206
|
// Body Params
|
|
197
207
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -240,6 +250,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
240
250
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
241
251
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
242
252
|
|
|
253
|
+
// Always add the One Signal telemetry to the request.
|
|
254
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
255
|
+
|
|
243
256
|
|
|
244
257
|
// Body Params
|
|
245
258
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -288,6 +301,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
288
301
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
289
302
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
290
303
|
|
|
304
|
+
// Always add the One Signal telemetry to the request.
|
|
305
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
306
|
+
|
|
291
307
|
|
|
292
308
|
// Body Params
|
|
293
309
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -339,6 +355,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
339
355
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
340
356
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
341
357
|
|
|
358
|
+
// Always add the One Signal telemetry to the request.
|
|
359
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
360
|
+
|
|
342
361
|
|
|
343
362
|
// Body Params
|
|
344
363
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -410,6 +429,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
410
429
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
411
430
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
412
431
|
|
|
432
|
+
// Always add the One Signal telemetry to the request.
|
|
433
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
434
|
+
|
|
413
435
|
|
|
414
436
|
// Body Params
|
|
415
437
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -465,6 +487,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
465
487
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
466
488
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
467
489
|
|
|
490
|
+
// Always add the One Signal telemetry to the request.
|
|
491
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
492
|
+
|
|
468
493
|
|
|
469
494
|
// Body Params
|
|
470
495
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -537,6 +562,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
537
562
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
538
563
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
539
564
|
|
|
565
|
+
// Always add the One Signal telemetry to the request.
|
|
566
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
567
|
+
|
|
540
568
|
|
|
541
569
|
let authMethod: SecurityAuthentication | undefined;
|
|
542
570
|
// Apply auth methods
|
|
@@ -582,6 +610,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
582
610
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
583
611
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
584
612
|
|
|
613
|
+
// Always add the One Signal telemetry to the request.
|
|
614
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
615
|
+
|
|
585
616
|
// Query Params
|
|
586
617
|
if (appId !== undefined) {
|
|
587
618
|
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
@@ -633,6 +664,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
633
664
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
634
665
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
635
666
|
|
|
667
|
+
// Always add the One Signal telemetry to the request.
|
|
668
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
669
|
+
|
|
636
670
|
|
|
637
671
|
let authMethod: SecurityAuthentication | undefined;
|
|
638
672
|
// Apply auth methods
|
|
@@ -678,6 +712,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
678
712
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
679
713
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
680
714
|
|
|
715
|
+
// Always add the One Signal telemetry to the request.
|
|
716
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
717
|
+
|
|
681
718
|
|
|
682
719
|
let authMethod: SecurityAuthentication | undefined;
|
|
683
720
|
// Apply auth methods
|
|
@@ -731,7 +768,16 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
731
768
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
732
769
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
733
770
|
|
|
771
|
+
// Always add the One Signal telemetry to the request.
|
|
772
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
773
|
+
|
|
734
774
|
|
|
775
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
776
|
+
// Apply auth methods
|
|
777
|
+
authMethod = _config.authMethods["app_key"]
|
|
778
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
779
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
780
|
+
}
|
|
735
781
|
|
|
736
782
|
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
737
783
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
@@ -779,6 +825,62 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
779
825
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
780
826
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
781
827
|
|
|
828
|
+
// Always add the One Signal telemetry to the request.
|
|
829
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
833
|
+
// Apply auth methods
|
|
834
|
+
authMethod = _config.authMethods["app_key"]
|
|
835
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
836
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
840
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
841
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
return requestContext;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time.
|
|
849
|
+
* Export CSV of Events
|
|
850
|
+
* @param notificationId The ID of the notification to export events from.
|
|
851
|
+
* @param appId The ID of the app that the notification belongs to.
|
|
852
|
+
*/
|
|
853
|
+
public async exportEvents(notificationId: string, appId: string, _options?: Configuration): Promise<RequestContext> {
|
|
854
|
+
let _config = _options || this.configuration;
|
|
855
|
+
|
|
856
|
+
// verify required parameter 'notificationId' is not null or undefined
|
|
857
|
+
if (notificationId === null || notificationId === undefined) {
|
|
858
|
+
throw new RequiredError("DefaultApi", "exportEvents", "notificationId");
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
// verify required parameter 'appId' is not null or undefined
|
|
863
|
+
if (appId === null || appId === undefined) {
|
|
864
|
+
throw new RequiredError("DefaultApi", "exportEvents", "appId");
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
// Path Params
|
|
869
|
+
const localVarPath = '/notifications/{notification_id}/export_events?app_id={app_id}'
|
|
870
|
+
.replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
|
|
871
|
+
|
|
872
|
+
// Make Request Context
|
|
873
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
874
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
875
|
+
|
|
876
|
+
// Always add the One Signal telemetry to the request.
|
|
877
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
878
|
+
|
|
879
|
+
// Query Params
|
|
880
|
+
if (appId !== undefined) {
|
|
881
|
+
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
882
|
+
}
|
|
883
|
+
|
|
782
884
|
|
|
783
885
|
let authMethod: SecurityAuthentication | undefined;
|
|
784
886
|
// Apply auth methods
|
|
@@ -797,7 +899,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
797
899
|
|
|
798
900
|
/**
|
|
799
901
|
* Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
|
|
800
|
-
* CSV
|
|
902
|
+
* Export CSV of Players
|
|
801
903
|
* @param appId The app ID that you want to export devices from
|
|
802
904
|
* @param exportPlayersRequestBody
|
|
803
905
|
*/
|
|
@@ -819,6 +921,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
819
921
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
820
922
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
821
923
|
|
|
924
|
+
// Always add the One Signal telemetry to the request.
|
|
925
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
926
|
+
|
|
822
927
|
|
|
823
928
|
// Body Params
|
|
824
929
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -875,6 +980,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
875
980
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
876
981
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
877
982
|
|
|
983
|
+
// Always add the One Signal telemetry to the request.
|
|
984
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
985
|
+
|
|
878
986
|
|
|
879
987
|
let authMethod: SecurityAuthentication | undefined;
|
|
880
988
|
// Apply auth methods
|
|
@@ -928,6 +1036,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
928
1036
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
929
1037
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
930
1038
|
|
|
1039
|
+
// Always add the One Signal telemetry to the request.
|
|
1040
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1041
|
+
|
|
931
1042
|
|
|
932
1043
|
let authMethod: SecurityAuthentication | undefined;
|
|
933
1044
|
// Apply auth methods
|
|
@@ -981,6 +1092,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
981
1092
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
982
1093
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
983
1094
|
|
|
1095
|
+
// Always add the One Signal telemetry to the request.
|
|
1096
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1097
|
+
|
|
984
1098
|
|
|
985
1099
|
let authMethod: SecurityAuthentication | undefined;
|
|
986
1100
|
// Apply auth methods
|
|
@@ -1019,6 +1133,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1019
1133
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1020
1134
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1021
1135
|
|
|
1136
|
+
// Always add the One Signal telemetry to the request.
|
|
1137
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1138
|
+
|
|
1022
1139
|
|
|
1023
1140
|
let authMethod: SecurityAuthentication | undefined;
|
|
1024
1141
|
// Apply auth methods
|
|
@@ -1049,6 +1166,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1049
1166
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1050
1167
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1051
1168
|
|
|
1169
|
+
// Always add the One Signal telemetry to the request.
|
|
1170
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1171
|
+
|
|
1052
1172
|
|
|
1053
1173
|
let authMethod: SecurityAuthentication | undefined;
|
|
1054
1174
|
// Apply auth methods
|
|
@@ -1094,6 +1214,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1094
1214
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1095
1215
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1096
1216
|
|
|
1217
|
+
// Always add the One Signal telemetry to the request.
|
|
1218
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1219
|
+
|
|
1097
1220
|
|
|
1098
1221
|
let authMethod: SecurityAuthentication | undefined;
|
|
1099
1222
|
// Apply auth methods
|
|
@@ -1139,6 +1262,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1139
1262
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1140
1263
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1141
1264
|
|
|
1265
|
+
// Always add the One Signal telemetry to the request.
|
|
1266
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1267
|
+
|
|
1142
1268
|
// Query Params
|
|
1143
1269
|
if (appId !== undefined) {
|
|
1144
1270
|
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
@@ -1189,6 +1315,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1189
1315
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
1190
1316
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1191
1317
|
|
|
1318
|
+
// Always add the One Signal telemetry to the request.
|
|
1319
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1320
|
+
|
|
1192
1321
|
|
|
1193
1322
|
// Body Params
|
|
1194
1323
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -1243,6 +1372,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1243
1372
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1244
1373
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1245
1374
|
|
|
1375
|
+
// Always add the One Signal telemetry to the request.
|
|
1376
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1377
|
+
|
|
1246
1378
|
// Query Params
|
|
1247
1379
|
if (appId !== undefined) {
|
|
1248
1380
|
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
@@ -1316,6 +1448,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1316
1448
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1317
1449
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1318
1450
|
|
|
1451
|
+
// Always add the One Signal telemetry to the request.
|
|
1452
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1453
|
+
|
|
1319
1454
|
// Query Params
|
|
1320
1455
|
if (outcomeNames !== undefined) {
|
|
1321
1456
|
requestContext.setQueryParam("outcome_names", ObjectSerializer.serialize(outcomeNames, "string", ""));
|
|
@@ -1388,6 +1523,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1388
1523
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1389
1524
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1390
1525
|
|
|
1526
|
+
// Always add the One Signal telemetry to the request.
|
|
1527
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1528
|
+
|
|
1391
1529
|
// Query Params
|
|
1392
1530
|
if (appId !== undefined) {
|
|
1393
1531
|
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
@@ -1439,6 +1577,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1439
1577
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1440
1578
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1441
1579
|
|
|
1580
|
+
// Always add the One Signal telemetry to the request.
|
|
1581
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1582
|
+
|
|
1442
1583
|
// Query Params
|
|
1443
1584
|
if (appId !== undefined) {
|
|
1444
1585
|
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
@@ -1514,6 +1655,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1514
1655
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
1515
1656
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1516
1657
|
|
|
1658
|
+
// Always add the One Signal telemetry to the request.
|
|
1659
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1660
|
+
|
|
1517
1661
|
|
|
1518
1662
|
// Body Params
|
|
1519
1663
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -1577,6 +1721,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1577
1721
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
1578
1722
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1579
1723
|
|
|
1724
|
+
// Always add the One Signal telemetry to the request.
|
|
1725
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1726
|
+
|
|
1580
1727
|
|
|
1581
1728
|
// Body Params
|
|
1582
1729
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -1640,6 +1787,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1640
1787
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
1641
1788
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1642
1789
|
|
|
1790
|
+
// Always add the One Signal telemetry to the request.
|
|
1791
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1792
|
+
|
|
1643
1793
|
|
|
1644
1794
|
// Body Params
|
|
1645
1795
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -1696,6 +1846,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1696
1846
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
|
|
1697
1847
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1698
1848
|
|
|
1849
|
+
// Always add the One Signal telemetry to the request.
|
|
1850
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1851
|
+
|
|
1699
1852
|
|
|
1700
1853
|
// Body Params
|
|
1701
1854
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -1760,6 +1913,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1760
1913
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
1761
1914
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1762
1915
|
|
|
1916
|
+
// Always add the One Signal telemetry to the request.
|
|
1917
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1918
|
+
|
|
1763
1919
|
|
|
1764
1920
|
// Body Params
|
|
1765
1921
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -1816,6 +1972,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1816
1972
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
|
|
1817
1973
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1818
1974
|
|
|
1975
|
+
// Always add the One Signal telemetry to the request.
|
|
1976
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
1977
|
+
|
|
1819
1978
|
|
|
1820
1979
|
// Body Params
|
|
1821
1980
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -1875,6 +2034,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1875
2034
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
|
|
1876
2035
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1877
2036
|
|
|
2037
|
+
// Always add the One Signal telemetry to the request.
|
|
2038
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
2039
|
+
|
|
1878
2040
|
|
|
1879
2041
|
// Body Params
|
|
1880
2042
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -1938,6 +2100,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1938
2100
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
1939
2101
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1940
2102
|
|
|
2103
|
+
// Always add the One Signal telemetry to the request.
|
|
2104
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
2105
|
+
|
|
1941
2106
|
|
|
1942
2107
|
// Body Params
|
|
1943
2108
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -2009,6 +2174,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
2009
2174
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
2010
2175
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
2011
2176
|
|
|
2177
|
+
// Always add the One Signal telemetry to the request.
|
|
2178
|
+
requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=1.3.0");
|
|
2179
|
+
|
|
2012
2180
|
|
|
2013
2181
|
// Body Params
|
|
2014
2182
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -2053,11 +2221,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2053
2221
|
return;
|
|
2054
2222
|
}
|
|
2055
2223
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2056
|
-
const body:
|
|
2224
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2225
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2226
|
+
"GenericError", ""
|
|
2227
|
+
) as GenericError;
|
|
2228
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2229
|
+
}
|
|
2230
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2231
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2057
2232
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2058
|
-
"
|
|
2059
|
-
) as
|
|
2060
|
-
throw new ApiException<
|
|
2233
|
+
"RateLimiterError", ""
|
|
2234
|
+
) as RateLimiterError;
|
|
2235
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2061
2236
|
}
|
|
2062
2237
|
|
|
2063
2238
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2089,11 +2264,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2089
2264
|
return body;
|
|
2090
2265
|
}
|
|
2091
2266
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2092
|
-
const body:
|
|
2267
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2268
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2269
|
+
"GenericError", ""
|
|
2270
|
+
) as GenericError;
|
|
2271
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2272
|
+
}
|
|
2273
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2274
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2093
2275
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2094
|
-
"
|
|
2095
|
-
) as
|
|
2096
|
-
throw new ApiException<
|
|
2276
|
+
"RateLimiterError", ""
|
|
2277
|
+
) as RateLimiterError;
|
|
2278
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2097
2279
|
}
|
|
2098
2280
|
|
|
2099
2281
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2125,11 +2307,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2125
2307
|
return body;
|
|
2126
2308
|
}
|
|
2127
2309
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2128
|
-
const body:
|
|
2310
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2311
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2312
|
+
"GenericError", ""
|
|
2313
|
+
) as GenericError;
|
|
2314
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2315
|
+
}
|
|
2316
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2317
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2129
2318
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2130
|
-
"
|
|
2131
|
-
) as
|
|
2132
|
-
throw new ApiException<
|
|
2319
|
+
"RateLimiterError", ""
|
|
2320
|
+
) as RateLimiterError;
|
|
2321
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2133
2322
|
}
|
|
2134
2323
|
|
|
2135
2324
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2161,11 +2350,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2161
2350
|
return body;
|
|
2162
2351
|
}
|
|
2163
2352
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2164
|
-
const body:
|
|
2353
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2354
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2355
|
+
"GenericError", ""
|
|
2356
|
+
) as GenericError;
|
|
2357
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2358
|
+
}
|
|
2359
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2360
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2165
2361
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2166
|
-
"
|
|
2167
|
-
) as
|
|
2168
|
-
throw new ApiException<
|
|
2362
|
+
"RateLimiterError", ""
|
|
2363
|
+
) as RateLimiterError;
|
|
2364
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2169
2365
|
}
|
|
2170
2366
|
|
|
2171
2367
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2197,11 +2393,25 @@ export class DefaultApiResponseProcessor {
|
|
|
2197
2393
|
return body;
|
|
2198
2394
|
}
|
|
2199
2395
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2200
|
-
const body:
|
|
2396
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2397
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2398
|
+
"GenericError", ""
|
|
2399
|
+
) as GenericError;
|
|
2400
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2401
|
+
}
|
|
2402
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2403
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2201
2404
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2202
|
-
"
|
|
2203
|
-
) as
|
|
2204
|
-
throw new ApiException<
|
|
2405
|
+
"GenericError", ""
|
|
2406
|
+
) as GenericError;
|
|
2407
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
2408
|
+
}
|
|
2409
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2410
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2411
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2412
|
+
"RateLimiterError", ""
|
|
2413
|
+
) as RateLimiterError;
|
|
2414
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2205
2415
|
}
|
|
2206
2416
|
|
|
2207
2417
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2233,11 +2443,11 @@ export class DefaultApiResponseProcessor {
|
|
|
2233
2443
|
return body;
|
|
2234
2444
|
}
|
|
2235
2445
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2236
|
-
const body:
|
|
2446
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2237
2447
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2238
|
-
"
|
|
2239
|
-
) as
|
|
2240
|
-
throw new ApiException<
|
|
2448
|
+
"GenericError", ""
|
|
2449
|
+
) as GenericError;
|
|
2450
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2241
2451
|
}
|
|
2242
2452
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2243
2453
|
const body: CreateSegmentConflictResponse = ObjectSerializer.deserialize(
|
|
@@ -2246,6 +2456,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2246
2456
|
) as CreateSegmentConflictResponse;
|
|
2247
2457
|
throw new ApiException<CreateSegmentConflictResponse>(409, "Conflict", body, response.headers);
|
|
2248
2458
|
}
|
|
2459
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2460
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2461
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2462
|
+
"RateLimiterError", ""
|
|
2463
|
+
) as RateLimiterError;
|
|
2464
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2465
|
+
}
|
|
2249
2466
|
|
|
2250
2467
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2251
2468
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2282,6 +2499,27 @@ export class DefaultApiResponseProcessor {
|
|
|
2282
2499
|
) as InlineResponse201;
|
|
2283
2500
|
return body;
|
|
2284
2501
|
}
|
|
2502
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2503
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2504
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2505
|
+
"GenericError", ""
|
|
2506
|
+
) as GenericError;
|
|
2507
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2508
|
+
}
|
|
2509
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2510
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2511
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2512
|
+
"GenericError", ""
|
|
2513
|
+
) as GenericError;
|
|
2514
|
+
throw new ApiException<GenericError>(409, "Operation is not permitted due to user having the maximum number of subscriptions assigned", body, response.headers);
|
|
2515
|
+
}
|
|
2516
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2517
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2518
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2519
|
+
"RateLimiterError", ""
|
|
2520
|
+
) as RateLimiterError;
|
|
2521
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2522
|
+
}
|
|
2285
2523
|
|
|
2286
2524
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2287
2525
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2304,6 +2542,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2304
2542
|
*/
|
|
2305
2543
|
public async createUser(response: ResponseContext): Promise<User > {
|
|
2306
2544
|
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2545
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2546
|
+
const body: User = ObjectSerializer.deserialize(
|
|
2547
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2548
|
+
"User", ""
|
|
2549
|
+
) as User;
|
|
2550
|
+
return body;
|
|
2551
|
+
}
|
|
2307
2552
|
if (isCodeInRange("201", response.httpStatusCode)) {
|
|
2308
2553
|
const body: User = ObjectSerializer.deserialize(
|
|
2309
2554
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
@@ -2318,6 +2563,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2318
2563
|
) as User;
|
|
2319
2564
|
return body;
|
|
2320
2565
|
}
|
|
2566
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2567
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2568
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2569
|
+
"GenericError", ""
|
|
2570
|
+
) as GenericError;
|
|
2571
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2572
|
+
}
|
|
2321
2573
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2322
2574
|
const body: CreateUserConflictResponse = ObjectSerializer.deserialize(
|
|
2323
2575
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
@@ -2325,6 +2577,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2325
2577
|
) as CreateUserConflictResponse;
|
|
2326
2578
|
throw new ApiException<CreateUserConflictResponse>(409, "Multiple User Identity Conflict", body, response.headers);
|
|
2327
2579
|
}
|
|
2580
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2581
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2582
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2583
|
+
"RateLimiterError", ""
|
|
2584
|
+
) as RateLimiterError;
|
|
2585
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2586
|
+
}
|
|
2328
2587
|
|
|
2329
2588
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2330
2589
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2354,6 +2613,27 @@ export class DefaultApiResponseProcessor {
|
|
|
2354
2613
|
) as InlineResponse200;
|
|
2355
2614
|
return body;
|
|
2356
2615
|
}
|
|
2616
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2617
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2618
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2619
|
+
"GenericError", ""
|
|
2620
|
+
) as GenericError;
|
|
2621
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2622
|
+
}
|
|
2623
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2624
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2625
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2626
|
+
"GenericError", ""
|
|
2627
|
+
) as GenericError;
|
|
2628
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
2629
|
+
}
|
|
2630
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2631
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2632
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2633
|
+
"RateLimiterError", ""
|
|
2634
|
+
) as RateLimiterError;
|
|
2635
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2636
|
+
}
|
|
2357
2637
|
|
|
2358
2638
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2359
2639
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2384,11 +2664,11 @@ export class DefaultApiResponseProcessor {
|
|
|
2384
2664
|
return body;
|
|
2385
2665
|
}
|
|
2386
2666
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2387
|
-
const body:
|
|
2667
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2388
2668
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2389
|
-
"
|
|
2390
|
-
) as
|
|
2391
|
-
throw new ApiException<
|
|
2669
|
+
"GenericError", ""
|
|
2670
|
+
) as GenericError;
|
|
2671
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2392
2672
|
}
|
|
2393
2673
|
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
2394
2674
|
const body: DeletePlayerNotFoundResponse = ObjectSerializer.deserialize(
|
|
@@ -2397,6 +2677,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2397
2677
|
) as DeletePlayerNotFoundResponse;
|
|
2398
2678
|
throw new ApiException<DeletePlayerNotFoundResponse>(404, "Not Found", body, response.headers);
|
|
2399
2679
|
}
|
|
2680
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2681
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2682
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2683
|
+
"RateLimiterError", ""
|
|
2684
|
+
) as RateLimiterError;
|
|
2685
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2686
|
+
}
|
|
2400
2687
|
|
|
2401
2688
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2402
2689
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2427,11 +2714,11 @@ export class DefaultApiResponseProcessor {
|
|
|
2427
2714
|
return body;
|
|
2428
2715
|
}
|
|
2429
2716
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2430
|
-
const body:
|
|
2717
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2431
2718
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2432
|
-
"
|
|
2433
|
-
) as
|
|
2434
|
-
throw new ApiException<
|
|
2719
|
+
"GenericError", ""
|
|
2720
|
+
) as GenericError;
|
|
2721
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2435
2722
|
}
|
|
2436
2723
|
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
2437
2724
|
const body: DeleteSegmentNotFoundResponse = ObjectSerializer.deserialize(
|
|
@@ -2440,6 +2727,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2440
2727
|
) as DeleteSegmentNotFoundResponse;
|
|
2441
2728
|
throw new ApiException<DeleteSegmentNotFoundResponse>(404, "Not Found", body, response.headers);
|
|
2442
2729
|
}
|
|
2730
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2731
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2732
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2733
|
+
"RateLimiterError", ""
|
|
2734
|
+
) as RateLimiterError;
|
|
2735
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2736
|
+
}
|
|
2443
2737
|
|
|
2444
2738
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2445
2739
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2465,6 +2759,27 @@ export class DefaultApiResponseProcessor {
|
|
|
2465
2759
|
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
2466
2760
|
return;
|
|
2467
2761
|
}
|
|
2762
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2763
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2764
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2765
|
+
"GenericError", ""
|
|
2766
|
+
) as GenericError;
|
|
2767
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2768
|
+
}
|
|
2769
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2770
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2771
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2772
|
+
"GenericError", ""
|
|
2773
|
+
) as GenericError;
|
|
2774
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
2775
|
+
}
|
|
2776
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2777
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2778
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2779
|
+
"RateLimiterError", ""
|
|
2780
|
+
) as RateLimiterError;
|
|
2781
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2782
|
+
}
|
|
2468
2783
|
|
|
2469
2784
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2470
2785
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2490,6 +2805,27 @@ export class DefaultApiResponseProcessor {
|
|
|
2490
2805
|
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2491
2806
|
return;
|
|
2492
2807
|
}
|
|
2808
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2809
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2810
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2811
|
+
"GenericError", ""
|
|
2812
|
+
) as GenericError;
|
|
2813
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2814
|
+
}
|
|
2815
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2816
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2817
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2818
|
+
"GenericError", ""
|
|
2819
|
+
) as GenericError;
|
|
2820
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
2821
|
+
}
|
|
2822
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2823
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2824
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2825
|
+
"RateLimiterError", ""
|
|
2826
|
+
) as RateLimiterError;
|
|
2827
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2828
|
+
}
|
|
2493
2829
|
|
|
2494
2830
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2495
2831
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2516,11 +2852,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2516
2852
|
return;
|
|
2517
2853
|
}
|
|
2518
2854
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2519
|
-
const body:
|
|
2855
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2856
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2857
|
+
"GenericError", ""
|
|
2858
|
+
) as GenericError;
|
|
2859
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2860
|
+
}
|
|
2861
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2862
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2520
2863
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2521
|
-
"
|
|
2522
|
-
) as
|
|
2523
|
-
throw new ApiException<
|
|
2864
|
+
"RateLimiterError", ""
|
|
2865
|
+
) as RateLimiterError;
|
|
2866
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2524
2867
|
}
|
|
2525
2868
|
|
|
2526
2869
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2535,6 +2878,56 @@ export class DefaultApiResponseProcessor {
|
|
|
2535
2878
|
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2536
2879
|
}
|
|
2537
2880
|
|
|
2881
|
+
/**
|
|
2882
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2883
|
+
* to the expected objects
|
|
2884
|
+
*
|
|
2885
|
+
* @params response Response returned by the server for a request to exportEvents
|
|
2886
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2887
|
+
*/
|
|
2888
|
+
public async exportEvents(response: ResponseContext): Promise<ExportEventsSuccessResponse > {
|
|
2889
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2890
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2891
|
+
const body: ExportEventsSuccessResponse = ObjectSerializer.deserialize(
|
|
2892
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2893
|
+
"ExportEventsSuccessResponse", ""
|
|
2894
|
+
) as ExportEventsSuccessResponse;
|
|
2895
|
+
return body;
|
|
2896
|
+
}
|
|
2897
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2898
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2899
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2900
|
+
"GenericError", ""
|
|
2901
|
+
) as GenericError;
|
|
2902
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2903
|
+
}
|
|
2904
|
+
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
2905
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2906
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2907
|
+
"GenericError", ""
|
|
2908
|
+
) as GenericError;
|
|
2909
|
+
throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
|
|
2910
|
+
}
|
|
2911
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2912
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2913
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2914
|
+
"RateLimiterError", ""
|
|
2915
|
+
) as RateLimiterError;
|
|
2916
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2920
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2921
|
+
const body: ExportEventsSuccessResponse = ObjectSerializer.deserialize(
|
|
2922
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2923
|
+
"ExportEventsSuccessResponse", ""
|
|
2924
|
+
) as ExportEventsSuccessResponse;
|
|
2925
|
+
return body;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2538
2931
|
/**
|
|
2539
2932
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2540
2933
|
* to the expected objects
|
|
@@ -2552,11 +2945,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2552
2945
|
return body;
|
|
2553
2946
|
}
|
|
2554
2947
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2555
|
-
const body:
|
|
2948
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2949
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2950
|
+
"GenericError", ""
|
|
2951
|
+
) as GenericError;
|
|
2952
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2953
|
+
}
|
|
2954
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2955
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2556
2956
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2557
|
-
"
|
|
2558
|
-
) as
|
|
2559
|
-
throw new ApiException<
|
|
2957
|
+
"RateLimiterError", ""
|
|
2958
|
+
) as RateLimiterError;
|
|
2959
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2560
2960
|
}
|
|
2561
2961
|
|
|
2562
2962
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2587,6 +2987,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2587
2987
|
) as UserIdentityResponse;
|
|
2588
2988
|
return body;
|
|
2589
2989
|
}
|
|
2990
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2991
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2992
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2993
|
+
"GenericError", ""
|
|
2994
|
+
) as GenericError;
|
|
2995
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2996
|
+
}
|
|
2590
2997
|
|
|
2591
2998
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2592
2999
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2616,6 +3023,20 @@ export class DefaultApiResponseProcessor {
|
|
|
2616
3023
|
) as User;
|
|
2617
3024
|
return body;
|
|
2618
3025
|
}
|
|
3026
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3027
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3028
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3029
|
+
"GenericError", ""
|
|
3030
|
+
) as GenericError;
|
|
3031
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3032
|
+
}
|
|
3033
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3034
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3035
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3036
|
+
"RateLimiterError", ""
|
|
3037
|
+
) as RateLimiterError;
|
|
3038
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3039
|
+
}
|
|
2619
3040
|
|
|
2620
3041
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2621
3042
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2645,6 +3066,20 @@ export class DefaultApiResponseProcessor {
|
|
|
2645
3066
|
) as InlineResponse200;
|
|
2646
3067
|
return body;
|
|
2647
3068
|
}
|
|
3069
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3070
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3071
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3072
|
+
"GenericError", ""
|
|
3073
|
+
) as GenericError;
|
|
3074
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3075
|
+
}
|
|
3076
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3077
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3078
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3079
|
+
"RateLimiterError", ""
|
|
3080
|
+
) as RateLimiterError;
|
|
3081
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3082
|
+
}
|
|
2648
3083
|
|
|
2649
3084
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2650
3085
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2675,11 +3110,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2675
3110
|
return body;
|
|
2676
3111
|
}
|
|
2677
3112
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2678
|
-
const body:
|
|
3113
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3114
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3115
|
+
"GenericError", ""
|
|
3116
|
+
) as GenericError;
|
|
3117
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3118
|
+
}
|
|
3119
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3120
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2679
3121
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2680
|
-
"
|
|
2681
|
-
) as
|
|
2682
|
-
throw new ApiException<
|
|
3122
|
+
"RateLimiterError", ""
|
|
3123
|
+
) as RateLimiterError;
|
|
3124
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2683
3125
|
}
|
|
2684
3126
|
|
|
2685
3127
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2711,11 +3153,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2711
3153
|
return body;
|
|
2712
3154
|
}
|
|
2713
3155
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2714
|
-
const body:
|
|
3156
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2715
3157
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2716
|
-
"
|
|
2717
|
-
) as
|
|
2718
|
-
throw new ApiException<
|
|
3158
|
+
"GenericError", ""
|
|
3159
|
+
) as GenericError;
|
|
3160
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3161
|
+
}
|
|
3162
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3163
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3164
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3165
|
+
"RateLimiterError", ""
|
|
3166
|
+
) as RateLimiterError;
|
|
3167
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2719
3168
|
}
|
|
2720
3169
|
|
|
2721
3170
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2746,6 +3195,20 @@ export class DefaultApiResponseProcessor {
|
|
|
2746
3195
|
) as InlineResponse2003;
|
|
2747
3196
|
return body;
|
|
2748
3197
|
}
|
|
3198
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3199
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3200
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3201
|
+
"GenericError", ""
|
|
3202
|
+
) as GenericError;
|
|
3203
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3204
|
+
}
|
|
3205
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3206
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3207
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3208
|
+
"RateLimiterError", ""
|
|
3209
|
+
) as RateLimiterError;
|
|
3210
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3211
|
+
}
|
|
2749
3212
|
|
|
2750
3213
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2751
3214
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2776,11 +3239,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2776
3239
|
return body;
|
|
2777
3240
|
}
|
|
2778
3241
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2779
|
-
const body:
|
|
3242
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3243
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3244
|
+
"GenericError", ""
|
|
3245
|
+
) as GenericError;
|
|
3246
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3247
|
+
}
|
|
3248
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3249
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2780
3250
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2781
|
-
"
|
|
2782
|
-
) as
|
|
2783
|
-
throw new ApiException<
|
|
3251
|
+
"RateLimiterError", ""
|
|
3252
|
+
) as RateLimiterError;
|
|
3253
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2784
3254
|
}
|
|
2785
3255
|
|
|
2786
3256
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2812,11 +3282,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2812
3282
|
return body;
|
|
2813
3283
|
}
|
|
2814
3284
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2815
|
-
const body:
|
|
3285
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2816
3286
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2817
|
-
"
|
|
2818
|
-
) as
|
|
2819
|
-
throw new ApiException<
|
|
3287
|
+
"GenericError", ""
|
|
3288
|
+
) as GenericError;
|
|
3289
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3290
|
+
}
|
|
3291
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3292
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3293
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3294
|
+
"RateLimiterError", ""
|
|
3295
|
+
) as RateLimiterError;
|
|
3296
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2820
3297
|
}
|
|
2821
3298
|
|
|
2822
3299
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2848,11 +3325,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2848
3325
|
return body;
|
|
2849
3326
|
}
|
|
2850
3327
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2851
|
-
const body:
|
|
3328
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3329
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3330
|
+
"GenericError", ""
|
|
3331
|
+
) as GenericError;
|
|
3332
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3333
|
+
}
|
|
3334
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3335
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2852
3336
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2853
|
-
"
|
|
2854
|
-
) as
|
|
2855
|
-
throw new ApiException<
|
|
3337
|
+
"RateLimiterError", ""
|
|
3338
|
+
) as RateLimiterError;
|
|
3339
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2856
3340
|
}
|
|
2857
3341
|
|
|
2858
3342
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2884,11 +3368,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2884
3368
|
return body;
|
|
2885
3369
|
}
|
|
2886
3370
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2887
|
-
const body:
|
|
3371
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2888
3372
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2889
|
-
"
|
|
2890
|
-
) as
|
|
2891
|
-
throw new ApiException<
|
|
3373
|
+
"GenericError", ""
|
|
3374
|
+
) as GenericError;
|
|
3375
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3376
|
+
}
|
|
3377
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3378
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3379
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3380
|
+
"RateLimiterError", ""
|
|
3381
|
+
) as RateLimiterError;
|
|
3382
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2892
3383
|
}
|
|
2893
3384
|
|
|
2894
3385
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2920,11 +3411,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2920
3411
|
return body;
|
|
2921
3412
|
}
|
|
2922
3413
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2923
|
-
const body:
|
|
3414
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3415
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3416
|
+
"GenericError", ""
|
|
3417
|
+
) as GenericError;
|
|
3418
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3419
|
+
}
|
|
3420
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3421
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2924
3422
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2925
|
-
"
|
|
2926
|
-
) as
|
|
2927
|
-
throw new ApiException<
|
|
3423
|
+
"RateLimiterError", ""
|
|
3424
|
+
) as RateLimiterError;
|
|
3425
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2928
3426
|
}
|
|
2929
3427
|
|
|
2930
3428
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2956,11 +3454,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2956
3454
|
return body;
|
|
2957
3455
|
}
|
|
2958
3456
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2959
|
-
const body:
|
|
3457
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2960
3458
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2961
|
-
"
|
|
2962
|
-
) as
|
|
2963
|
-
throw new ApiException<
|
|
3459
|
+
"GenericError", ""
|
|
3460
|
+
) as GenericError;
|
|
3461
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3462
|
+
}
|
|
3463
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3464
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3465
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3466
|
+
"RateLimiterError", ""
|
|
3467
|
+
) as RateLimiterError;
|
|
3468
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2964
3469
|
}
|
|
2965
3470
|
|
|
2966
3471
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2991,12 +3496,26 @@ export class DefaultApiResponseProcessor {
|
|
|
2991
3496
|
) as InlineResponse200;
|
|
2992
3497
|
return body;
|
|
2993
3498
|
}
|
|
3499
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3500
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3501
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3502
|
+
"GenericError", ""
|
|
3503
|
+
) as GenericError;
|
|
3504
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3505
|
+
}
|
|
2994
3506
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2995
|
-
const body:
|
|
3507
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3508
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3509
|
+
"GenericError", ""
|
|
3510
|
+
) as GenericError;
|
|
3511
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3512
|
+
}
|
|
3513
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3514
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2996
3515
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2997
|
-
"
|
|
2998
|
-
) as
|
|
2999
|
-
throw new ApiException<
|
|
3516
|
+
"RateLimiterError", ""
|
|
3517
|
+
) as RateLimiterError;
|
|
3518
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3000
3519
|
}
|
|
3001
3520
|
|
|
3002
3521
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3027,12 +3546,26 @@ export class DefaultApiResponseProcessor {
|
|
|
3027
3546
|
) as UserIdentityResponse;
|
|
3028
3547
|
return body;
|
|
3029
3548
|
}
|
|
3549
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3550
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3551
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3552
|
+
"GenericError", ""
|
|
3553
|
+
) as GenericError;
|
|
3554
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3555
|
+
}
|
|
3030
3556
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3031
|
-
const body:
|
|
3557
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3558
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3559
|
+
"GenericError", ""
|
|
3560
|
+
) as GenericError;
|
|
3561
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3562
|
+
}
|
|
3563
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3564
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3032
3565
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3033
|
-
"
|
|
3034
|
-
) as
|
|
3035
|
-
throw new ApiException<
|
|
3566
|
+
"RateLimiterError", ""
|
|
3567
|
+
) as RateLimiterError;
|
|
3568
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3036
3569
|
}
|
|
3037
3570
|
|
|
3038
3571
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3063,6 +3596,27 @@ export class DefaultApiResponseProcessor {
|
|
|
3063
3596
|
) as UserIdentityResponse;
|
|
3064
3597
|
return body;
|
|
3065
3598
|
}
|
|
3599
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3600
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3601
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3602
|
+
"GenericError", ""
|
|
3603
|
+
) as GenericError;
|
|
3604
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3605
|
+
}
|
|
3606
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3607
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3608
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3609
|
+
"GenericError", ""
|
|
3610
|
+
) as GenericError;
|
|
3611
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3612
|
+
}
|
|
3613
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3614
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3615
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3616
|
+
"RateLimiterError", ""
|
|
3617
|
+
) as RateLimiterError;
|
|
3618
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3619
|
+
}
|
|
3066
3620
|
|
|
3067
3621
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3068
3622
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -3093,11 +3647,18 @@ export class DefaultApiResponseProcessor {
|
|
|
3093
3647
|
return body;
|
|
3094
3648
|
}
|
|
3095
3649
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3096
|
-
const body:
|
|
3650
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3097
3651
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3098
|
-
"
|
|
3099
|
-
) as
|
|
3100
|
-
throw new ApiException<
|
|
3652
|
+
"GenericError", ""
|
|
3653
|
+
) as GenericError;
|
|
3654
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3655
|
+
}
|
|
3656
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3657
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3658
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3659
|
+
"RateLimiterError", ""
|
|
3660
|
+
) as RateLimiterError;
|
|
3661
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3101
3662
|
}
|
|
3102
3663
|
|
|
3103
3664
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3129,11 +3690,18 @@ export class DefaultApiResponseProcessor {
|
|
|
3129
3690
|
return body;
|
|
3130
3691
|
}
|
|
3131
3692
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3132
|
-
const body:
|
|
3693
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3133
3694
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3134
|
-
"
|
|
3135
|
-
) as
|
|
3136
|
-
throw new ApiException<
|
|
3695
|
+
"GenericError", ""
|
|
3696
|
+
) as GenericError;
|
|
3697
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3698
|
+
}
|
|
3699
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3700
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3701
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3702
|
+
"RateLimiterError", ""
|
|
3703
|
+
) as RateLimiterError;
|
|
3704
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3137
3705
|
}
|
|
3138
3706
|
|
|
3139
3707
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3165,11 +3733,25 @@ export class DefaultApiResponseProcessor {
|
|
|
3165
3733
|
return body;
|
|
3166
3734
|
}
|
|
3167
3735
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3168
|
-
const body:
|
|
3736
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3737
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3738
|
+
"GenericError", ""
|
|
3739
|
+
) as GenericError;
|
|
3740
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3741
|
+
}
|
|
3742
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3743
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3744
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3745
|
+
"GenericError", ""
|
|
3746
|
+
) as GenericError;
|
|
3747
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3748
|
+
}
|
|
3749
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3750
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3169
3751
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3170
|
-
"
|
|
3171
|
-
) as
|
|
3172
|
-
throw new ApiException<
|
|
3752
|
+
"RateLimiterError", ""
|
|
3753
|
+
) as RateLimiterError;
|
|
3754
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3173
3755
|
}
|
|
3174
3756
|
|
|
3175
3757
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3200,6 +3782,27 @@ export class DefaultApiResponseProcessor {
|
|
|
3200
3782
|
) as UpdatePlayerTagsSuccessResponse;
|
|
3201
3783
|
return body;
|
|
3202
3784
|
}
|
|
3785
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3786
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3787
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3788
|
+
"GenericError", ""
|
|
3789
|
+
) as GenericError;
|
|
3790
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3791
|
+
}
|
|
3792
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3793
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3794
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3795
|
+
"GenericError", ""
|
|
3796
|
+
) as GenericError;
|
|
3797
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3798
|
+
}
|
|
3799
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3800
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3801
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3802
|
+
"RateLimiterError", ""
|
|
3803
|
+
) as RateLimiterError;
|
|
3804
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3805
|
+
}
|
|
3203
3806
|
|
|
3204
3807
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3205
3808
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -3225,6 +3828,27 @@ export class DefaultApiResponseProcessor {
|
|
|
3225
3828
|
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
3226
3829
|
return;
|
|
3227
3830
|
}
|
|
3831
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3832
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3833
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3834
|
+
"GenericError", ""
|
|
3835
|
+
) as GenericError;
|
|
3836
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3837
|
+
}
|
|
3838
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3839
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3840
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3841
|
+
"GenericError", ""
|
|
3842
|
+
) as GenericError;
|
|
3843
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3844
|
+
}
|
|
3845
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3846
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3847
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3848
|
+
"RateLimiterError", ""
|
|
3849
|
+
) as RateLimiterError;
|
|
3850
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3851
|
+
}
|
|
3228
3852
|
|
|
3229
3853
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3230
3854
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -3254,6 +3878,27 @@ export class DefaultApiResponseProcessor {
|
|
|
3254
3878
|
) as InlineResponse202;
|
|
3255
3879
|
return body;
|
|
3256
3880
|
}
|
|
3881
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3882
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3883
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3884
|
+
"GenericError", ""
|
|
3885
|
+
) as GenericError;
|
|
3886
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3887
|
+
}
|
|
3888
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3889
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3890
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3891
|
+
"GenericError", ""
|
|
3892
|
+
) as GenericError;
|
|
3893
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3894
|
+
}
|
|
3895
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3896
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3897
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3898
|
+
"RateLimiterError", ""
|
|
3899
|
+
) as RateLimiterError;
|
|
3900
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3901
|
+
}
|
|
3257
3902
|
|
|
3258
3903
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3259
3904
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|