@onesignal/node-onesignal 2.0.1-beta1 → 2.0.1-beta2
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 +126 -4
- package/apis/DefaultApi.ts +623 -95
- package/dist/apis/DefaultApi.d.ts +3 -0
- package/dist/apis/DefaultApi.js +1063 -415
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/models/{BadRequestError.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/{CreateSegmentBadRequestResponse.d.ts → GenericError.d.ts} +3 -3
- 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/ObjectSerializer.d.ts +4 -3
- package/dist/models/ObjectSerializer.js +12 -9
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/{DeletePlayerBadRequestResponse.d.ts → RateLimiterError.d.ts} +3 -2
- package/dist/models/RateLimiterError.js +22 -0
- package/dist/models/RateLimiterError.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/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/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.d.ts +0 -17
- 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.d.ts +0 -17
- 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';
|
|
@@ -795,9 +796,59 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
795
796
|
return requestContext;
|
|
796
797
|
}
|
|
797
798
|
|
|
799
|
+
/**
|
|
800
|
+
* 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.
|
|
801
|
+
* Export CSV of Events
|
|
802
|
+
* @param notificationId The ID of the notification to export events from.
|
|
803
|
+
* @param appId The ID of the app that the notification belongs to.
|
|
804
|
+
*/
|
|
805
|
+
public async exportEvents(notificationId: string, appId: string, _options?: Configuration): Promise<RequestContext> {
|
|
806
|
+
let _config = _options || this.configuration;
|
|
807
|
+
|
|
808
|
+
// verify required parameter 'notificationId' is not null or undefined
|
|
809
|
+
if (notificationId === null || notificationId === undefined) {
|
|
810
|
+
throw new RequiredError("DefaultApi", "exportEvents", "notificationId");
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
// verify required parameter 'appId' is not null or undefined
|
|
815
|
+
if (appId === null || appId === undefined) {
|
|
816
|
+
throw new RequiredError("DefaultApi", "exportEvents", "appId");
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
// Path Params
|
|
821
|
+
const localVarPath = '/notifications/{notification_id}/export_events?app_id={app_id}'
|
|
822
|
+
.replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
|
|
823
|
+
|
|
824
|
+
// Make Request Context
|
|
825
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
826
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
827
|
+
|
|
828
|
+
// Query Params
|
|
829
|
+
if (appId !== undefined) {
|
|
830
|
+
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
835
|
+
// Apply auth methods
|
|
836
|
+
authMethod = _config.authMethods["app_key"]
|
|
837
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
838
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
842
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
843
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
return requestContext;
|
|
847
|
+
}
|
|
848
|
+
|
|
798
849
|
/**
|
|
799
850
|
* 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
|
|
851
|
+
* Export CSV of Players
|
|
801
852
|
* @param appId The app ID that you want to export devices from
|
|
802
853
|
* @param exportPlayersRequestBody
|
|
803
854
|
*/
|
|
@@ -2053,11 +2104,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2053
2104
|
return;
|
|
2054
2105
|
}
|
|
2055
2106
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2056
|
-
const body:
|
|
2107
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2057
2108
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2058
|
-
"
|
|
2059
|
-
) as
|
|
2060
|
-
throw new ApiException<
|
|
2109
|
+
"GenericError", ""
|
|
2110
|
+
) as GenericError;
|
|
2111
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2112
|
+
}
|
|
2113
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2114
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2115
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2116
|
+
"RateLimiterError", ""
|
|
2117
|
+
) as RateLimiterError;
|
|
2118
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2061
2119
|
}
|
|
2062
2120
|
|
|
2063
2121
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2089,11 +2147,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2089
2147
|
return body;
|
|
2090
2148
|
}
|
|
2091
2149
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2092
|
-
const body:
|
|
2150
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2151
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2152
|
+
"GenericError", ""
|
|
2153
|
+
) as GenericError;
|
|
2154
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2155
|
+
}
|
|
2156
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2157
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2093
2158
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2094
|
-
"
|
|
2095
|
-
) as
|
|
2096
|
-
throw new ApiException<
|
|
2159
|
+
"RateLimiterError", ""
|
|
2160
|
+
) as RateLimiterError;
|
|
2161
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2097
2162
|
}
|
|
2098
2163
|
|
|
2099
2164
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2125,11 +2190,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2125
2190
|
return body;
|
|
2126
2191
|
}
|
|
2127
2192
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2128
|
-
const body:
|
|
2193
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2129
2194
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2130
|
-
"
|
|
2131
|
-
) as
|
|
2132
|
-
throw new ApiException<
|
|
2195
|
+
"GenericError", ""
|
|
2196
|
+
) as GenericError;
|
|
2197
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2198
|
+
}
|
|
2199
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2200
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2201
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2202
|
+
"RateLimiterError", ""
|
|
2203
|
+
) as RateLimiterError;
|
|
2204
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2133
2205
|
}
|
|
2134
2206
|
|
|
2135
2207
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2161,11 +2233,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2161
2233
|
return body;
|
|
2162
2234
|
}
|
|
2163
2235
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2164
|
-
const body:
|
|
2236
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2237
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2238
|
+
"GenericError", ""
|
|
2239
|
+
) as GenericError;
|
|
2240
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2241
|
+
}
|
|
2242
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2243
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2165
2244
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2166
|
-
"
|
|
2167
|
-
) as
|
|
2168
|
-
throw new ApiException<
|
|
2245
|
+
"RateLimiterError", ""
|
|
2246
|
+
) as RateLimiterError;
|
|
2247
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2169
2248
|
}
|
|
2170
2249
|
|
|
2171
2250
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2197,11 +2276,25 @@ export class DefaultApiResponseProcessor {
|
|
|
2197
2276
|
return body;
|
|
2198
2277
|
}
|
|
2199
2278
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2200
|
-
const body:
|
|
2279
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2280
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2281
|
+
"GenericError", ""
|
|
2282
|
+
) as GenericError;
|
|
2283
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2284
|
+
}
|
|
2285
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2286
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2201
2287
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2202
|
-
"
|
|
2203
|
-
) as
|
|
2204
|
-
throw new ApiException<
|
|
2288
|
+
"GenericError", ""
|
|
2289
|
+
) as GenericError;
|
|
2290
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
2291
|
+
}
|
|
2292
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2293
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2294
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2295
|
+
"RateLimiterError", ""
|
|
2296
|
+
) as RateLimiterError;
|
|
2297
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2205
2298
|
}
|
|
2206
2299
|
|
|
2207
2300
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2233,11 +2326,11 @@ export class DefaultApiResponseProcessor {
|
|
|
2233
2326
|
return body;
|
|
2234
2327
|
}
|
|
2235
2328
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2236
|
-
const body:
|
|
2329
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2237
2330
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2238
|
-
"
|
|
2239
|
-
) as
|
|
2240
|
-
throw new ApiException<
|
|
2331
|
+
"GenericError", ""
|
|
2332
|
+
) as GenericError;
|
|
2333
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2241
2334
|
}
|
|
2242
2335
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2243
2336
|
const body: CreateSegmentConflictResponse = ObjectSerializer.deserialize(
|
|
@@ -2246,6 +2339,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2246
2339
|
) as CreateSegmentConflictResponse;
|
|
2247
2340
|
throw new ApiException<CreateSegmentConflictResponse>(409, "Conflict", body, response.headers);
|
|
2248
2341
|
}
|
|
2342
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2343
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2344
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2345
|
+
"RateLimiterError", ""
|
|
2346
|
+
) as RateLimiterError;
|
|
2347
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2348
|
+
}
|
|
2249
2349
|
|
|
2250
2350
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2251
2351
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2282,6 +2382,27 @@ export class DefaultApiResponseProcessor {
|
|
|
2282
2382
|
) as InlineResponse201;
|
|
2283
2383
|
return body;
|
|
2284
2384
|
}
|
|
2385
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2386
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2387
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2388
|
+
"GenericError", ""
|
|
2389
|
+
) as GenericError;
|
|
2390
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2391
|
+
}
|
|
2392
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2393
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2394
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2395
|
+
"GenericError", ""
|
|
2396
|
+
) as GenericError;
|
|
2397
|
+
throw new ApiException<GenericError>(409, "Operation is not permitted due to user having the maximum number of subscriptions assigned", body, response.headers);
|
|
2398
|
+
}
|
|
2399
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2400
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2401
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2402
|
+
"RateLimiterError", ""
|
|
2403
|
+
) as RateLimiterError;
|
|
2404
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2405
|
+
}
|
|
2285
2406
|
|
|
2286
2407
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2287
2408
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2304,6 +2425,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2304
2425
|
*/
|
|
2305
2426
|
public async createUser(response: ResponseContext): Promise<User > {
|
|
2306
2427
|
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2428
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2429
|
+
const body: User = ObjectSerializer.deserialize(
|
|
2430
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2431
|
+
"User", ""
|
|
2432
|
+
) as User;
|
|
2433
|
+
return body;
|
|
2434
|
+
}
|
|
2307
2435
|
if (isCodeInRange("201", response.httpStatusCode)) {
|
|
2308
2436
|
const body: User = ObjectSerializer.deserialize(
|
|
2309
2437
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
@@ -2318,6 +2446,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2318
2446
|
) as User;
|
|
2319
2447
|
return body;
|
|
2320
2448
|
}
|
|
2449
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2450
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2451
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2452
|
+
"GenericError", ""
|
|
2453
|
+
) as GenericError;
|
|
2454
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2455
|
+
}
|
|
2321
2456
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2322
2457
|
const body: CreateUserConflictResponse = ObjectSerializer.deserialize(
|
|
2323
2458
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
@@ -2325,6 +2460,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2325
2460
|
) as CreateUserConflictResponse;
|
|
2326
2461
|
throw new ApiException<CreateUserConflictResponse>(409, "Multiple User Identity Conflict", body, response.headers);
|
|
2327
2462
|
}
|
|
2463
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2464
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2465
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2466
|
+
"RateLimiterError", ""
|
|
2467
|
+
) as RateLimiterError;
|
|
2468
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2469
|
+
}
|
|
2328
2470
|
|
|
2329
2471
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2330
2472
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2354,6 +2496,27 @@ export class DefaultApiResponseProcessor {
|
|
|
2354
2496
|
) as InlineResponse200;
|
|
2355
2497
|
return body;
|
|
2356
2498
|
}
|
|
2499
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2500
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2501
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2502
|
+
"GenericError", ""
|
|
2503
|
+
) as GenericError;
|
|
2504
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2505
|
+
}
|
|
2506
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2507
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2508
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2509
|
+
"GenericError", ""
|
|
2510
|
+
) as GenericError;
|
|
2511
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
2512
|
+
}
|
|
2513
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2514
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2515
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2516
|
+
"RateLimiterError", ""
|
|
2517
|
+
) as RateLimiterError;
|
|
2518
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2519
|
+
}
|
|
2357
2520
|
|
|
2358
2521
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2359
2522
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2384,11 +2547,11 @@ export class DefaultApiResponseProcessor {
|
|
|
2384
2547
|
return body;
|
|
2385
2548
|
}
|
|
2386
2549
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2387
|
-
const body:
|
|
2550
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2388
2551
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2389
|
-
"
|
|
2390
|
-
) as
|
|
2391
|
-
throw new ApiException<
|
|
2552
|
+
"GenericError", ""
|
|
2553
|
+
) as GenericError;
|
|
2554
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2392
2555
|
}
|
|
2393
2556
|
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
2394
2557
|
const body: DeletePlayerNotFoundResponse = ObjectSerializer.deserialize(
|
|
@@ -2397,6 +2560,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2397
2560
|
) as DeletePlayerNotFoundResponse;
|
|
2398
2561
|
throw new ApiException<DeletePlayerNotFoundResponse>(404, "Not Found", body, response.headers);
|
|
2399
2562
|
}
|
|
2563
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2564
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2565
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2566
|
+
"RateLimiterError", ""
|
|
2567
|
+
) as RateLimiterError;
|
|
2568
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2569
|
+
}
|
|
2400
2570
|
|
|
2401
2571
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2402
2572
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2427,11 +2597,11 @@ export class DefaultApiResponseProcessor {
|
|
|
2427
2597
|
return body;
|
|
2428
2598
|
}
|
|
2429
2599
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2430
|
-
const body:
|
|
2600
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2431
2601
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2432
|
-
"
|
|
2433
|
-
) as
|
|
2434
|
-
throw new ApiException<
|
|
2602
|
+
"GenericError", ""
|
|
2603
|
+
) as GenericError;
|
|
2604
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2435
2605
|
}
|
|
2436
2606
|
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
2437
2607
|
const body: DeleteSegmentNotFoundResponse = ObjectSerializer.deserialize(
|
|
@@ -2440,6 +2610,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2440
2610
|
) as DeleteSegmentNotFoundResponse;
|
|
2441
2611
|
throw new ApiException<DeleteSegmentNotFoundResponse>(404, "Not Found", body, response.headers);
|
|
2442
2612
|
}
|
|
2613
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2614
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2615
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2616
|
+
"RateLimiterError", ""
|
|
2617
|
+
) as RateLimiterError;
|
|
2618
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2619
|
+
}
|
|
2443
2620
|
|
|
2444
2621
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2445
2622
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2465,6 +2642,27 @@ export class DefaultApiResponseProcessor {
|
|
|
2465
2642
|
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
2466
2643
|
return;
|
|
2467
2644
|
}
|
|
2645
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2646
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2647
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2648
|
+
"GenericError", ""
|
|
2649
|
+
) as GenericError;
|
|
2650
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2651
|
+
}
|
|
2652
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2653
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2654
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2655
|
+
"GenericError", ""
|
|
2656
|
+
) as GenericError;
|
|
2657
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
2658
|
+
}
|
|
2659
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2660
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2661
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2662
|
+
"RateLimiterError", ""
|
|
2663
|
+
) as RateLimiterError;
|
|
2664
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2665
|
+
}
|
|
2468
2666
|
|
|
2469
2667
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2470
2668
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2490,6 +2688,27 @@ export class DefaultApiResponseProcessor {
|
|
|
2490
2688
|
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2491
2689
|
return;
|
|
2492
2690
|
}
|
|
2691
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2692
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2693
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2694
|
+
"GenericError", ""
|
|
2695
|
+
) as GenericError;
|
|
2696
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2697
|
+
}
|
|
2698
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2699
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2700
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2701
|
+
"GenericError", ""
|
|
2702
|
+
) as GenericError;
|
|
2703
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
2704
|
+
}
|
|
2705
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2706
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2707
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2708
|
+
"RateLimiterError", ""
|
|
2709
|
+
) as RateLimiterError;
|
|
2710
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2711
|
+
}
|
|
2493
2712
|
|
|
2494
2713
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2495
2714
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2516,11 +2735,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2516
2735
|
return;
|
|
2517
2736
|
}
|
|
2518
2737
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2519
|
-
const body:
|
|
2738
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2520
2739
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2521
|
-
"
|
|
2522
|
-
) as
|
|
2523
|
-
throw new ApiException<
|
|
2740
|
+
"GenericError", ""
|
|
2741
|
+
) as GenericError;
|
|
2742
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2743
|
+
}
|
|
2744
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2745
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2746
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2747
|
+
"RateLimiterError", ""
|
|
2748
|
+
) as RateLimiterError;
|
|
2749
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2524
2750
|
}
|
|
2525
2751
|
|
|
2526
2752
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2535,6 +2761,56 @@ export class DefaultApiResponseProcessor {
|
|
|
2535
2761
|
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2536
2762
|
}
|
|
2537
2763
|
|
|
2764
|
+
/**
|
|
2765
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2766
|
+
* to the expected objects
|
|
2767
|
+
*
|
|
2768
|
+
* @params response Response returned by the server for a request to exportEvents
|
|
2769
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2770
|
+
*/
|
|
2771
|
+
public async exportEvents(response: ResponseContext): Promise<ExportEventsSuccessResponse > {
|
|
2772
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2773
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2774
|
+
const body: ExportEventsSuccessResponse = ObjectSerializer.deserialize(
|
|
2775
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2776
|
+
"ExportEventsSuccessResponse", ""
|
|
2777
|
+
) as ExportEventsSuccessResponse;
|
|
2778
|
+
return body;
|
|
2779
|
+
}
|
|
2780
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2781
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2782
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2783
|
+
"GenericError", ""
|
|
2784
|
+
) as GenericError;
|
|
2785
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2786
|
+
}
|
|
2787
|
+
if (isCodeInRange("404", response.httpStatusCode)) {
|
|
2788
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2789
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2790
|
+
"GenericError", ""
|
|
2791
|
+
) as GenericError;
|
|
2792
|
+
throw new ApiException<GenericError>(404, "Not Found", body, response.headers);
|
|
2793
|
+
}
|
|
2794
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2795
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2796
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2797
|
+
"RateLimiterError", ""
|
|
2798
|
+
) as RateLimiterError;
|
|
2799
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2803
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2804
|
+
const body: ExportEventsSuccessResponse = ObjectSerializer.deserialize(
|
|
2805
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2806
|
+
"ExportEventsSuccessResponse", ""
|
|
2807
|
+
) as ExportEventsSuccessResponse;
|
|
2808
|
+
return body;
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2538
2814
|
/**
|
|
2539
2815
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2540
2816
|
* to the expected objects
|
|
@@ -2552,11 +2828,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2552
2828
|
return body;
|
|
2553
2829
|
}
|
|
2554
2830
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2555
|
-
const body:
|
|
2831
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2556
2832
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2557
|
-
"
|
|
2558
|
-
) as
|
|
2559
|
-
throw new ApiException<
|
|
2833
|
+
"GenericError", ""
|
|
2834
|
+
) as GenericError;
|
|
2835
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2836
|
+
}
|
|
2837
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2838
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2839
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2840
|
+
"RateLimiterError", ""
|
|
2841
|
+
) as RateLimiterError;
|
|
2842
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2560
2843
|
}
|
|
2561
2844
|
|
|
2562
2845
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2587,6 +2870,13 @@ export class DefaultApiResponseProcessor {
|
|
|
2587
2870
|
) as UserIdentityResponse;
|
|
2588
2871
|
return body;
|
|
2589
2872
|
}
|
|
2873
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2874
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2875
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2876
|
+
"GenericError", ""
|
|
2877
|
+
) as GenericError;
|
|
2878
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2879
|
+
}
|
|
2590
2880
|
|
|
2591
2881
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2592
2882
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2616,6 +2906,20 @@ export class DefaultApiResponseProcessor {
|
|
|
2616
2906
|
) as User;
|
|
2617
2907
|
return body;
|
|
2618
2908
|
}
|
|
2909
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2910
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2911
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2912
|
+
"GenericError", ""
|
|
2913
|
+
) as GenericError;
|
|
2914
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2915
|
+
}
|
|
2916
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2917
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2918
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2919
|
+
"RateLimiterError", ""
|
|
2920
|
+
) as RateLimiterError;
|
|
2921
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2922
|
+
}
|
|
2619
2923
|
|
|
2620
2924
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2621
2925
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2645,6 +2949,20 @@ export class DefaultApiResponseProcessor {
|
|
|
2645
2949
|
) as InlineResponse200;
|
|
2646
2950
|
return body;
|
|
2647
2951
|
}
|
|
2952
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2953
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2954
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2955
|
+
"GenericError", ""
|
|
2956
|
+
) as GenericError;
|
|
2957
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
2958
|
+
}
|
|
2959
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
2960
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2961
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2962
|
+
"RateLimiterError", ""
|
|
2963
|
+
) as RateLimiterError;
|
|
2964
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2965
|
+
}
|
|
2648
2966
|
|
|
2649
2967
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2650
2968
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2675,11 +2993,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2675
2993
|
return body;
|
|
2676
2994
|
}
|
|
2677
2995
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2678
|
-
const body:
|
|
2996
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2679
2997
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2680
|
-
"
|
|
2681
|
-
) as
|
|
2682
|
-
throw new ApiException<
|
|
2998
|
+
"GenericError", ""
|
|
2999
|
+
) as GenericError;
|
|
3000
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3001
|
+
}
|
|
3002
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3003
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3004
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3005
|
+
"RateLimiterError", ""
|
|
3006
|
+
) as RateLimiterError;
|
|
3007
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2683
3008
|
}
|
|
2684
3009
|
|
|
2685
3010
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2711,11 +3036,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2711
3036
|
return body;
|
|
2712
3037
|
}
|
|
2713
3038
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2714
|
-
const body:
|
|
3039
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3040
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3041
|
+
"GenericError", ""
|
|
3042
|
+
) as GenericError;
|
|
3043
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3044
|
+
}
|
|
3045
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3046
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2715
3047
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2716
|
-
"
|
|
2717
|
-
) as
|
|
2718
|
-
throw new ApiException<
|
|
3048
|
+
"RateLimiterError", ""
|
|
3049
|
+
) as RateLimiterError;
|
|
3050
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2719
3051
|
}
|
|
2720
3052
|
|
|
2721
3053
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2746,6 +3078,20 @@ export class DefaultApiResponseProcessor {
|
|
|
2746
3078
|
) as InlineResponse2003;
|
|
2747
3079
|
return body;
|
|
2748
3080
|
}
|
|
3081
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3082
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3083
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3084
|
+
"GenericError", ""
|
|
3085
|
+
) as GenericError;
|
|
3086
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3087
|
+
}
|
|
3088
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3089
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3090
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3091
|
+
"RateLimiterError", ""
|
|
3092
|
+
) as RateLimiterError;
|
|
3093
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3094
|
+
}
|
|
2749
3095
|
|
|
2750
3096
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2751
3097
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2776,11 +3122,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2776
3122
|
return body;
|
|
2777
3123
|
}
|
|
2778
3124
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2779
|
-
const body:
|
|
3125
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3126
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3127
|
+
"GenericError", ""
|
|
3128
|
+
) as GenericError;
|
|
3129
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3130
|
+
}
|
|
3131
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3132
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2780
3133
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2781
|
-
"
|
|
2782
|
-
) as
|
|
2783
|
-
throw new ApiException<
|
|
3134
|
+
"RateLimiterError", ""
|
|
3135
|
+
) as RateLimiterError;
|
|
3136
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2784
3137
|
}
|
|
2785
3138
|
|
|
2786
3139
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2812,11 +3165,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2812
3165
|
return body;
|
|
2813
3166
|
}
|
|
2814
3167
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2815
|
-
const body:
|
|
3168
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3169
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3170
|
+
"GenericError", ""
|
|
3171
|
+
) as GenericError;
|
|
3172
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3173
|
+
}
|
|
3174
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3175
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2816
3176
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2817
|
-
"
|
|
2818
|
-
) as
|
|
2819
|
-
throw new ApiException<
|
|
3177
|
+
"RateLimiterError", ""
|
|
3178
|
+
) as RateLimiterError;
|
|
3179
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2820
3180
|
}
|
|
2821
3181
|
|
|
2822
3182
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2848,11 +3208,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2848
3208
|
return body;
|
|
2849
3209
|
}
|
|
2850
3210
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2851
|
-
const body:
|
|
3211
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2852
3212
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2853
|
-
"
|
|
2854
|
-
) as
|
|
2855
|
-
throw new ApiException<
|
|
3213
|
+
"GenericError", ""
|
|
3214
|
+
) as GenericError;
|
|
3215
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3216
|
+
}
|
|
3217
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3218
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3219
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3220
|
+
"RateLimiterError", ""
|
|
3221
|
+
) as RateLimiterError;
|
|
3222
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2856
3223
|
}
|
|
2857
3224
|
|
|
2858
3225
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2884,11 +3251,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2884
3251
|
return body;
|
|
2885
3252
|
}
|
|
2886
3253
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2887
|
-
const body:
|
|
3254
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3255
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3256
|
+
"GenericError", ""
|
|
3257
|
+
) as GenericError;
|
|
3258
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3259
|
+
}
|
|
3260
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3261
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2888
3262
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2889
|
-
"
|
|
2890
|
-
) as
|
|
2891
|
-
throw new ApiException<
|
|
3263
|
+
"RateLimiterError", ""
|
|
3264
|
+
) as RateLimiterError;
|
|
3265
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2892
3266
|
}
|
|
2893
3267
|
|
|
2894
3268
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2920,11 +3294,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2920
3294
|
return body;
|
|
2921
3295
|
}
|
|
2922
3296
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2923
|
-
const body:
|
|
3297
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2924
3298
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2925
|
-
"
|
|
2926
|
-
) as
|
|
2927
|
-
throw new ApiException<
|
|
3299
|
+
"GenericError", ""
|
|
3300
|
+
) as GenericError;
|
|
3301
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3302
|
+
}
|
|
3303
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3304
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3305
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3306
|
+
"RateLimiterError", ""
|
|
3307
|
+
) as RateLimiterError;
|
|
3308
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2928
3309
|
}
|
|
2929
3310
|
|
|
2930
3311
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2956,11 +3337,18 @@ export class DefaultApiResponseProcessor {
|
|
|
2956
3337
|
return body;
|
|
2957
3338
|
}
|
|
2958
3339
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2959
|
-
const body:
|
|
3340
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3341
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3342
|
+
"GenericError", ""
|
|
3343
|
+
) as GenericError;
|
|
3344
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3345
|
+
}
|
|
3346
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3347
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
2960
3348
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2961
|
-
"
|
|
2962
|
-
) as
|
|
2963
|
-
throw new ApiException<
|
|
3349
|
+
"RateLimiterError", ""
|
|
3350
|
+
) as RateLimiterError;
|
|
3351
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
2964
3352
|
}
|
|
2965
3353
|
|
|
2966
3354
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -2991,12 +3379,26 @@ export class DefaultApiResponseProcessor {
|
|
|
2991
3379
|
) as InlineResponse200;
|
|
2992
3380
|
return body;
|
|
2993
3381
|
}
|
|
3382
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3383
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3384
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3385
|
+
"GenericError", ""
|
|
3386
|
+
) as GenericError;
|
|
3387
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3388
|
+
}
|
|
2994
3389
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2995
|
-
const body:
|
|
3390
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
2996
3391
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2997
|
-
"
|
|
2998
|
-
) as
|
|
2999
|
-
throw new ApiException<
|
|
3392
|
+
"GenericError", ""
|
|
3393
|
+
) as GenericError;
|
|
3394
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3395
|
+
}
|
|
3396
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3397
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3398
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3399
|
+
"RateLimiterError", ""
|
|
3400
|
+
) as RateLimiterError;
|
|
3401
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3000
3402
|
}
|
|
3001
3403
|
|
|
3002
3404
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3027,12 +3429,26 @@ export class DefaultApiResponseProcessor {
|
|
|
3027
3429
|
) as UserIdentityResponse;
|
|
3028
3430
|
return body;
|
|
3029
3431
|
}
|
|
3432
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3433
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3434
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3435
|
+
"GenericError", ""
|
|
3436
|
+
) as GenericError;
|
|
3437
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3438
|
+
}
|
|
3030
3439
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3031
|
-
const body:
|
|
3440
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3441
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3442
|
+
"GenericError", ""
|
|
3443
|
+
) as GenericError;
|
|
3444
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3445
|
+
}
|
|
3446
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3447
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3032
3448
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3033
|
-
"
|
|
3034
|
-
) as
|
|
3035
|
-
throw new ApiException<
|
|
3449
|
+
"RateLimiterError", ""
|
|
3450
|
+
) as RateLimiterError;
|
|
3451
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3036
3452
|
}
|
|
3037
3453
|
|
|
3038
3454
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3063,6 +3479,27 @@ export class DefaultApiResponseProcessor {
|
|
|
3063
3479
|
) as UserIdentityResponse;
|
|
3064
3480
|
return body;
|
|
3065
3481
|
}
|
|
3482
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3483
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3484
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3485
|
+
"GenericError", ""
|
|
3486
|
+
) as GenericError;
|
|
3487
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3488
|
+
}
|
|
3489
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3490
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3491
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3492
|
+
"GenericError", ""
|
|
3493
|
+
) as GenericError;
|
|
3494
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3495
|
+
}
|
|
3496
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3497
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3498
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3499
|
+
"RateLimiterError", ""
|
|
3500
|
+
) as RateLimiterError;
|
|
3501
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3502
|
+
}
|
|
3066
3503
|
|
|
3067
3504
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3068
3505
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -3093,11 +3530,18 @@ export class DefaultApiResponseProcessor {
|
|
|
3093
3530
|
return body;
|
|
3094
3531
|
}
|
|
3095
3532
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3096
|
-
const body:
|
|
3533
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3534
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3535
|
+
"GenericError", ""
|
|
3536
|
+
) as GenericError;
|
|
3537
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3538
|
+
}
|
|
3539
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3540
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3097
3541
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3098
|
-
"
|
|
3099
|
-
) as
|
|
3100
|
-
throw new ApiException<
|
|
3542
|
+
"RateLimiterError", ""
|
|
3543
|
+
) as RateLimiterError;
|
|
3544
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3101
3545
|
}
|
|
3102
3546
|
|
|
3103
3547
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3129,11 +3573,18 @@ export class DefaultApiResponseProcessor {
|
|
|
3129
3573
|
return body;
|
|
3130
3574
|
}
|
|
3131
3575
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3132
|
-
const body:
|
|
3576
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3133
3577
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3134
|
-
"
|
|
3135
|
-
) as
|
|
3136
|
-
throw new ApiException<
|
|
3578
|
+
"GenericError", ""
|
|
3579
|
+
) as GenericError;
|
|
3580
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3581
|
+
}
|
|
3582
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3583
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3584
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3585
|
+
"RateLimiterError", ""
|
|
3586
|
+
) as RateLimiterError;
|
|
3587
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3137
3588
|
}
|
|
3138
3589
|
|
|
3139
3590
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3165,11 +3616,25 @@ export class DefaultApiResponseProcessor {
|
|
|
3165
3616
|
return body;
|
|
3166
3617
|
}
|
|
3167
3618
|
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3168
|
-
const body:
|
|
3619
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3169
3620
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3170
|
-
"
|
|
3171
|
-
) as
|
|
3172
|
-
throw new ApiException<
|
|
3621
|
+
"GenericError", ""
|
|
3622
|
+
) as GenericError;
|
|
3623
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3624
|
+
}
|
|
3625
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3626
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3627
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3628
|
+
"GenericError", ""
|
|
3629
|
+
) as GenericError;
|
|
3630
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3631
|
+
}
|
|
3632
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3633
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3634
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3635
|
+
"RateLimiterError", ""
|
|
3636
|
+
) as RateLimiterError;
|
|
3637
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3173
3638
|
}
|
|
3174
3639
|
|
|
3175
3640
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
@@ -3200,6 +3665,27 @@ export class DefaultApiResponseProcessor {
|
|
|
3200
3665
|
) as UpdatePlayerTagsSuccessResponse;
|
|
3201
3666
|
return body;
|
|
3202
3667
|
}
|
|
3668
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3669
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3670
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3671
|
+
"GenericError", ""
|
|
3672
|
+
) as GenericError;
|
|
3673
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3674
|
+
}
|
|
3675
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3676
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3677
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3678
|
+
"GenericError", ""
|
|
3679
|
+
) as GenericError;
|
|
3680
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3681
|
+
}
|
|
3682
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3683
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3684
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3685
|
+
"RateLimiterError", ""
|
|
3686
|
+
) as RateLimiterError;
|
|
3687
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3688
|
+
}
|
|
3203
3689
|
|
|
3204
3690
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3205
3691
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -3225,6 +3711,27 @@ export class DefaultApiResponseProcessor {
|
|
|
3225
3711
|
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
3226
3712
|
return;
|
|
3227
3713
|
}
|
|
3714
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3715
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3716
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3717
|
+
"GenericError", ""
|
|
3718
|
+
) as GenericError;
|
|
3719
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3720
|
+
}
|
|
3721
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3722
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3723
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3724
|
+
"GenericError", ""
|
|
3725
|
+
) as GenericError;
|
|
3726
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3727
|
+
}
|
|
3728
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3729
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3730
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3731
|
+
"RateLimiterError", ""
|
|
3732
|
+
) as RateLimiterError;
|
|
3733
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3734
|
+
}
|
|
3228
3735
|
|
|
3229
3736
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3230
3737
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -3254,6 +3761,27 @@ export class DefaultApiResponseProcessor {
|
|
|
3254
3761
|
) as InlineResponse202;
|
|
3255
3762
|
return body;
|
|
3256
3763
|
}
|
|
3764
|
+
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
3765
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3766
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3767
|
+
"GenericError", ""
|
|
3768
|
+
) as GenericError;
|
|
3769
|
+
throw new ApiException<GenericError>(400, "Bad Request", body, response.headers);
|
|
3770
|
+
}
|
|
3771
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3772
|
+
const body: GenericError = ObjectSerializer.deserialize(
|
|
3773
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3774
|
+
"GenericError", ""
|
|
3775
|
+
) as GenericError;
|
|
3776
|
+
throw new ApiException<GenericError>(409, "Conflict", body, response.headers);
|
|
3777
|
+
}
|
|
3778
|
+
if (isCodeInRange("429", response.httpStatusCode)) {
|
|
3779
|
+
const body: RateLimiterError = ObjectSerializer.deserialize(
|
|
3780
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3781
|
+
"RateLimiterError", ""
|
|
3782
|
+
) as RateLimiterError;
|
|
3783
|
+
throw new ApiException<RateLimiterError>(429, "Rate Limit Exceeded", body, response.headers);
|
|
3784
|
+
}
|
|
3257
3785
|
|
|
3258
3786
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3259
3787
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|