vayu-ts 0.3.4 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi/apis/AuthApi.js +8 -4
- package/dist/openapi/apis/CatalogProductsApi.js +46 -23
- package/dist/openapi/apis/CloudUsageSubmissionApi.js +8 -4
- package/dist/openapi/apis/ContractsApi.js +48 -22
- package/dist/openapi/apis/CreditsApi.js +24 -12
- package/dist/openapi/apis/CustomFieldsApi.d.ts +89 -0
- package/dist/openapi/apis/CustomFieldsApi.js +377 -0
- package/dist/openapi/apis/CustomersApi.js +124 -52
- package/dist/openapi/apis/EventsApi.d.ts +116 -1
- package/dist/openapi/apis/EventsApi.js +605 -25
- package/dist/openapi/apis/InvoicesApi.js +26 -13
- package/dist/openapi/apis/MeasurementsApi.js +36 -18
- package/dist/openapi/apis/MetersApi.js +38 -19
- package/dist/openapi/apis/PlansApi.d.ts +56 -0
- package/dist/openapi/apis/PlansApi.js +225 -0
- package/dist/openapi/apis/ProductConsumptionsApi.js +12 -4
- package/dist/openapi/apis/WebhooksApi.js +12 -4
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +3 -1
- package/dist/openapi/models/BillingInterval.d.ts +18 -0
- package/dist/openapi/models/BillingInterval.js +22 -0
- package/dist/openapi/models/ConflictErrorResponse.d.ts +42 -0
- package/dist/openapi/models/ConflictErrorResponse.js +52 -0
- package/dist/openapi/models/Contact.js +1 -1
- package/dist/openapi/models/CreateContractRequest.d.ts +6 -0
- package/dist/openapi/models/CreateContractRequest.js +12 -0
- package/dist/openapi/models/CreateCustomFieldRequest.d.ts +71 -0
- package/dist/openapi/models/CreateCustomFieldRequest.js +90 -0
- package/dist/openapi/models/CreateCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/CreateCustomFieldResponse.js +32 -0
- package/dist/openapi/models/CreateCustomFieldResponseCustomField.d.ts +74 -0
- package/dist/openapi/models/CreateCustomFieldResponseCustomField.js +108 -0
- package/dist/openapi/models/CreateCustomerRequest.d.ts +20 -0
- package/dist/openapi/models/CreateCustomerRequest.js +30 -0
- package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/CreateCustomerResponseCustomer.js +30 -0
- package/dist/openapi/models/CustomFieldEntities.d.ts +20 -0
- package/dist/openapi/models/CustomFieldEntities.js +24 -0
- package/dist/openapi/models/CustomFieldValueTypes.d.ts +2 -1
- package/dist/openapi/models/CustomFieldValueTypes.js +1 -0
- package/dist/openapi/models/DeleteContractResponseContract.d.ts +6 -0
- package/dist/openapi/models/DeleteContractResponseContract.js +12 -0
- package/dist/openapi/models/DeleteCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/DeleteCustomFieldResponse.js +32 -0
- package/dist/openapi/models/DeleteCustomFieldResponseCustomField.d.ts +75 -0
- package/dist/openapi/models/DeleteCustomFieldResponseCustomField.js +114 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/DeleteCustomerResponseCustomer.js +30 -0
- package/dist/openapi/models/DeletePlanResponse.d.ts +32 -0
- package/dist/openapi/models/DeletePlanResponse.js +32 -0
- package/dist/openapi/models/DeletePlanResponsePlan.d.ts +42 -0
- package/dist/openapi/models/DeletePlanResponsePlan.js +68 -0
- package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +1 -1
- package/dist/openapi/models/GetContractResponseContract.d.ts +6 -0
- package/dist/openapi/models/GetContractResponseContract.js +12 -0
- package/dist/openapi/models/GetCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/GetCustomFieldResponse.js +32 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.d.ts +20 -0
- package/dist/openapi/models/GetCustomerByNameResponseCustomer.js +30 -0
- package/dist/openapi/models/GetPlanResponse.d.ts +32 -0
- package/dist/openapi/models/GetPlanResponse.js +32 -0
- package/dist/openapi/models/GetPlanResponsePlan.d.ts +41 -0
- package/dist/openapi/models/GetPlanResponsePlan.js +62 -0
- package/dist/openapi/models/InternalServerErrorResponse.d.ts +42 -0
- package/dist/openapi/models/InternalServerErrorResponse.js +52 -0
- package/dist/openapi/models/ListCustomFieldsResponse.d.ts +35 -0
- package/dist/openapi/models/ListCustomFieldsResponse.js +50 -0
- package/dist/openapi/models/ListPlansResponse.d.ts +35 -0
- package/dist/openapi/models/ListPlansResponse.js +50 -0
- package/dist/openapi/models/NotFoundErrorResponse.d.ts +42 -0
- package/dist/openapi/models/NotFoundErrorResponse.js +52 -0
- package/dist/openapi/models/NotificationEventType.d.ts +5 -1
- package/dist/openapi/models/NotificationEventType.js +4 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +51 -0
- package/dist/openapi/models/ObjectSerializer.js +176 -0
- package/dist/openapi/models/PlanBillingData.d.ts +41 -0
- package/dist/openapi/models/PlanBillingData.js +59 -0
- package/dist/openapi/models/PlanDuration.d.ts +30 -0
- package/dist/openapi/models/PlanDuration.js +25 -0
- package/dist/openapi/models/PlanStatus.d.ts +19 -0
- package/dist/openapi/models/PlanStatus.js +23 -0
- package/dist/openapi/models/ProductGroupCommitment.d.ts +8 -0
- package/dist/openapi/models/ProductGroupCommitment.js +12 -1
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.d.ts +8 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitment.js +12 -1
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.d.ts +4 -4
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.js +2 -2
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.d.ts +41 -0
- package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricing.d.ts +3 -1
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.d.ts +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.js +12 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.d.ts +2 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.js +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.d.ts +2 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.js +6 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.d.ts +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.d.ts +42 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.js +48 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.d.ts +53 -0
- package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.js +58 -0
- package/dist/openapi/models/QueryEventsResponse.d.ts +3 -3
- package/dist/openapi/models/QueryEventsResponse.js +18 -0
- package/dist/openapi/models/RateLimitErrorResponse.d.ts +42 -0
- package/dist/openapi/models/RateLimitErrorResponse.js +52 -0
- package/dist/openapi/models/RequestTooLongErrorResponse.d.ts +42 -0
- package/dist/openapi/models/RequestTooLongErrorResponse.js +52 -0
- package/dist/openapi/models/UnauthorizedErrorResponse.d.ts +42 -0
- package/dist/openapi/models/UnauthorizedErrorResponse.js +52 -0
- package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
- package/dist/openapi/models/UnlimitedDuration.js +18 -0
- package/dist/openapi/models/UpdateCustomFieldRequest.d.ts +71 -0
- package/dist/openapi/models/UpdateCustomFieldRequest.js +90 -0
- package/dist/openapi/models/UpdateCustomFieldResponse.d.ts +32 -0
- package/dist/openapi/models/UpdateCustomFieldResponse.js +32 -0
- package/dist/openapi/models/UpdateCustomerRequest.d.ts +20 -0
- package/dist/openapi/models/UpdateCustomerRequest.js +30 -0
- package/dist/openapi/models/V2DeleteEventResponse.d.ts +32 -0
- package/dist/openapi/models/V2DeleteEventResponse.js +32 -0
- package/dist/openapi/models/V2DeleteEventsByRefsRequest.d.ts +31 -0
- package/dist/openapi/models/V2DeleteEventsByRefsRequest.js +32 -0
- package/dist/openapi/models/V2DeleteEventsByRefsResponse.d.ts +35 -0
- package/dist/openapi/models/V2DeleteEventsByRefsResponse.js +32 -0
- package/dist/openapi/models/V2EventsDryRunRequest.d.ts +32 -0
- package/dist/openapi/models/V2EventsDryRunRequest.js +32 -0
- package/dist/openapi/models/V2EventsDryRunResponse.d.ts +32 -0
- package/dist/openapi/models/V2EventsDryRunResponse.js +32 -0
- package/dist/openapi/models/V2GetEventResponse.d.ts +32 -0
- package/dist/openapi/models/V2GetEventResponse.js +32 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequest.d.ts +45 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequest.js +70 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.d.ts +39 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.js +62 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.d.ts +35 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.js +44 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.d.ts +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.js +45 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.d.ts +43 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.js +54 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.d.ts +30 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.js +25 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.d.ts +34 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.js +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.d.ts +32 -0
- package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.js +38 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponse.d.ts +42 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponse.js +52 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.d.ts +34 -0
- package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.js +38 -0
- package/dist/openapi/models/V2QueryEventsResponse.d.ts +35 -0
- package/dist/openapi/models/V2QueryEventsResponse.js +50 -0
- package/dist/openapi/models/V2SendEventsRequest.d.ts +32 -0
- package/dist/openapi/models/V2SendEventsRequest.js +32 -0
- package/dist/openapi/models/V2SendEventsResponse.d.ts +40 -0
- package/dist/openapi/models/V2SendEventsResponse.js +38 -0
- package/dist/openapi/models/ValidationErrorResponse.d.ts +51 -0
- package/dist/openapi/models/ValidationErrorResponse.js +60 -0
- package/dist/openapi/models/ValidationErrorResponseParamsInner.d.ts +38 -0
- package/dist/openapi/models/ValidationErrorResponseParamsInner.js +38 -0
- package/dist/openapi/models/WebhookSubscribeRequest.d.ts +1 -0
- package/dist/openapi/models/WebhookSubscribeRequest.js +6 -0
- package/dist/openapi/models/all.d.ts +51 -0
- package/dist/openapi/models/all.js +51 -0
- package/dist/openapi/types/ObservableAPI.d.ts +235 -2
- package/dist/openapi/types/ObservableAPI.js +476 -5
- package/dist/openapi/types/PromiseAPI.d.ts +231 -2
- package/dist/openapi/types/PromiseAPI.js +320 -18
- package/dist/sdk/clients/EventsClient.js +1 -1
- package/dist/sdk/clients/WebhooksClient.d.ts +2 -0
- package/dist/sdk/clients/WebhooksClient.js +14 -0
- package/package.json +1 -1
|
@@ -57,16 +57,20 @@ class AuthApiResponseProcessor {
|
|
|
57
57
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
58
58
|
}
|
|
59
59
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
60
|
-
|
|
60
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
61
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
61
62
|
}
|
|
62
63
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
63
|
-
|
|
64
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
65
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
64
66
|
}
|
|
65
67
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
66
|
-
|
|
68
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
69
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
67
70
|
}
|
|
68
71
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
69
|
-
|
|
72
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
73
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
70
74
|
}
|
|
71
75
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
72
76
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -195,16 +195,20 @@ class CatalogProductsApiResponseProcessor {
|
|
|
195
195
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
196
196
|
}
|
|
197
197
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
198
|
-
|
|
198
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
199
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
199
200
|
}
|
|
200
201
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
201
|
-
|
|
202
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
203
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
202
204
|
}
|
|
203
205
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
204
|
-
|
|
206
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
207
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
205
208
|
}
|
|
206
209
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
207
|
-
|
|
210
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
211
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
208
212
|
}
|
|
209
213
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
210
214
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -227,19 +231,24 @@ class CatalogProductsApiResponseProcessor {
|
|
|
227
231
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
228
232
|
}
|
|
229
233
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
230
|
-
|
|
234
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
235
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
231
236
|
}
|
|
232
237
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
233
|
-
|
|
238
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
239
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
234
240
|
}
|
|
235
241
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
236
|
-
|
|
242
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
243
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
237
244
|
}
|
|
238
245
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
239
|
-
|
|
246
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
247
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
240
248
|
}
|
|
241
249
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
242
|
-
|
|
250
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
251
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
243
252
|
}
|
|
244
253
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
245
254
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -262,19 +271,24 @@ class CatalogProductsApiResponseProcessor {
|
|
|
262
271
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
263
272
|
}
|
|
264
273
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
265
|
-
|
|
274
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
275
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
266
276
|
}
|
|
267
277
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
268
|
-
|
|
278
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
279
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
269
280
|
}
|
|
270
281
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
271
|
-
|
|
282
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
283
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
272
284
|
}
|
|
273
285
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
274
|
-
|
|
286
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
287
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
275
288
|
}
|
|
276
289
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
277
|
-
|
|
290
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
291
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
278
292
|
}
|
|
279
293
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
280
294
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -297,16 +311,20 @@ class CatalogProductsApiResponseProcessor {
|
|
|
297
311
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
298
312
|
}
|
|
299
313
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
300
|
-
|
|
314
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
315
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
301
316
|
}
|
|
302
317
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
303
|
-
|
|
318
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
319
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
304
320
|
}
|
|
305
321
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
306
|
-
|
|
322
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
323
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
307
324
|
}
|
|
308
325
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
309
|
-
|
|
326
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
327
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
310
328
|
}
|
|
311
329
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
312
330
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -329,19 +347,24 @@ class CatalogProductsApiResponseProcessor {
|
|
|
329
347
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
330
348
|
}
|
|
331
349
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
332
|
-
|
|
350
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
351
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
333
352
|
}
|
|
334
353
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
335
|
-
|
|
354
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
355
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
336
356
|
}
|
|
337
357
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
338
|
-
|
|
358
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
359
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
339
360
|
}
|
|
340
361
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
341
|
-
|
|
362
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
363
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
342
364
|
}
|
|
343
365
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
344
|
-
|
|
366
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
367
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
345
368
|
}
|
|
346
369
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
347
370
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -63,16 +63,20 @@ class CloudUsageSubmissionApiResponseProcessor {
|
|
|
63
63
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
64
64
|
}
|
|
65
65
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
66
|
-
|
|
66
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
67
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
67
68
|
}
|
|
68
69
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
69
|
-
|
|
70
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
71
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
70
72
|
}
|
|
71
73
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
72
|
-
|
|
74
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
75
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
73
76
|
}
|
|
74
77
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
75
|
-
|
|
78
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
79
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
76
80
|
}
|
|
77
81
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
78
82
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -194,16 +194,20 @@ class ContractsApiResponseProcessor {
|
|
|
194
194
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
195
195
|
}
|
|
196
196
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
197
|
-
|
|
197
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
198
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
198
199
|
}
|
|
199
200
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
200
|
-
|
|
201
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
202
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
201
203
|
}
|
|
202
204
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
203
|
-
|
|
205
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
206
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
204
207
|
}
|
|
205
208
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
206
|
-
|
|
209
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
210
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
207
211
|
}
|
|
208
212
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
209
213
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -226,19 +230,24 @@ class ContractsApiResponseProcessor {
|
|
|
226
230
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
227
231
|
}
|
|
228
232
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
229
|
-
|
|
233
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
234
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
230
235
|
}
|
|
231
236
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
232
|
-
|
|
237
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
238
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
233
239
|
}
|
|
234
240
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
235
|
-
|
|
241
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
242
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
236
243
|
}
|
|
237
244
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
238
|
-
|
|
245
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
246
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
239
247
|
}
|
|
240
248
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
241
|
-
|
|
249
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
250
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
242
251
|
}
|
|
243
252
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
244
253
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -261,19 +270,24 @@ class ContractsApiResponseProcessor {
|
|
|
261
270
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
262
271
|
}
|
|
263
272
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
264
|
-
|
|
273
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
274
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
265
275
|
}
|
|
266
276
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
267
|
-
|
|
277
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
278
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
268
279
|
}
|
|
269
280
|
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
270
|
-
|
|
281
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
282
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
271
283
|
}
|
|
272
284
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
273
|
-
|
|
285
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
286
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
274
287
|
}
|
|
275
288
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
276
|
-
|
|
289
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
290
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
277
291
|
}
|
|
278
292
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
279
293
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -296,16 +310,24 @@ class ContractsApiResponseProcessor {
|
|
|
296
310
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
297
311
|
}
|
|
298
312
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
299
|
-
|
|
313
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
314
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
300
315
|
}
|
|
301
316
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
302
|
-
|
|
317
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
318
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
319
|
+
}
|
|
320
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
321
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
|
|
322
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
|
|
303
323
|
}
|
|
304
324
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
305
|
-
|
|
325
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
326
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
306
327
|
}
|
|
307
328
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
308
|
-
|
|
329
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
330
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
309
331
|
}
|
|
310
332
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
311
333
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -328,16 +350,20 @@ class ContractsApiResponseProcessor {
|
|
|
328
350
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
329
351
|
}
|
|
330
352
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
331
|
-
|
|
353
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
354
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
332
355
|
}
|
|
333
356
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
334
|
-
|
|
357
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
358
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
335
359
|
}
|
|
336
360
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
337
|
-
|
|
361
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
362
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
338
363
|
}
|
|
339
364
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
340
|
-
|
|
365
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
366
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
341
367
|
}
|
|
342
368
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
343
369
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -139,16 +139,20 @@ class CreditsApiResponseProcessor {
|
|
|
139
139
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
140
140
|
}
|
|
141
141
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
142
|
-
|
|
142
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
143
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
143
144
|
}
|
|
144
145
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
145
|
-
|
|
146
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
147
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
146
148
|
}
|
|
147
149
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
148
|
-
|
|
150
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
151
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
149
152
|
}
|
|
150
153
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
151
|
-
|
|
154
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
155
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
152
156
|
}
|
|
153
157
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
154
158
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -170,16 +174,20 @@ class CreditsApiResponseProcessor {
|
|
|
170
174
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
171
175
|
}
|
|
172
176
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
173
|
-
|
|
177
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
178
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
174
179
|
}
|
|
175
180
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
176
|
-
|
|
181
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
182
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
177
183
|
}
|
|
178
184
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
179
|
-
|
|
185
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
186
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
180
187
|
}
|
|
181
188
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
182
|
-
|
|
189
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
190
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
183
191
|
}
|
|
184
192
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
185
193
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -202,16 +210,20 @@ class CreditsApiResponseProcessor {
|
|
|
202
210
|
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
203
211
|
}
|
|
204
212
|
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
205
|
-
|
|
213
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
|
|
214
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
|
|
206
215
|
}
|
|
207
216
|
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
208
|
-
|
|
217
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
|
|
218
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
|
|
209
219
|
}
|
|
210
220
|
if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
|
|
211
|
-
|
|
221
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
|
|
222
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
|
|
212
223
|
}
|
|
213
224
|
if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
|
|
214
|
-
|
|
225
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
|
|
226
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
|
|
215
227
|
}
|
|
216
228
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
217
229
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
+
import { Configuration } from '../configuration';
|
|
3
|
+
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
+
import { CreateCustomFieldRequest } from '../models/CreateCustomFieldRequest';
|
|
5
|
+
import { CreateCustomFieldResponse } from '../models/CreateCustomFieldResponse';
|
|
6
|
+
import { DeleteCustomFieldResponse } from '../models/DeleteCustomFieldResponse';
|
|
7
|
+
import { GetCustomFieldResponse } from '../models/GetCustomFieldResponse';
|
|
8
|
+
import { ListCustomFieldsResponse } from '../models/ListCustomFieldsResponse';
|
|
9
|
+
import { UpdateCustomFieldRequest } from '../models/UpdateCustomFieldRequest';
|
|
10
|
+
import { UpdateCustomFieldResponse } from '../models/UpdateCustomFieldResponse';
|
|
11
|
+
/**
|
|
12
|
+
* no description
|
|
13
|
+
*/
|
|
14
|
+
export declare class CustomFieldsApiRequestFactory extends BaseAPIRequestFactory {
|
|
15
|
+
/**
|
|
16
|
+
* Create a new Custom field.
|
|
17
|
+
* Create Custom field
|
|
18
|
+
* @param createCustomFieldRequest
|
|
19
|
+
*/
|
|
20
|
+
createCustomField(createCustomFieldRequest: CreateCustomFieldRequest, _options?: Configuration): Promise<RequestContext>;
|
|
21
|
+
/**
|
|
22
|
+
* Delete a Custom field by id.
|
|
23
|
+
* Delete Custom field
|
|
24
|
+
* @param customFieldId
|
|
25
|
+
*/
|
|
26
|
+
deleteCustomField(customFieldId: string, _options?: Configuration): Promise<RequestContext>;
|
|
27
|
+
/**
|
|
28
|
+
* Get a Custom field by id.
|
|
29
|
+
* Get Custom field
|
|
30
|
+
* @param customFieldId
|
|
31
|
+
*/
|
|
32
|
+
getCustomField(customFieldId: string, _options?: Configuration): Promise<RequestContext>;
|
|
33
|
+
/**
|
|
34
|
+
* Get a list of Custom fields.
|
|
35
|
+
* List Custom fields
|
|
36
|
+
* @param limit
|
|
37
|
+
* @param cursor
|
|
38
|
+
*/
|
|
39
|
+
listCustomFields(limit?: number, cursor?: string, _options?: Configuration): Promise<RequestContext>;
|
|
40
|
+
/**
|
|
41
|
+
* Update a Custom field by id.
|
|
42
|
+
* Update Custom field
|
|
43
|
+
* @param updateCustomFieldRequest
|
|
44
|
+
* @param customFieldId
|
|
45
|
+
*/
|
|
46
|
+
updateCustomField(updateCustomFieldRequest: UpdateCustomFieldRequest, customFieldId: string, _options?: Configuration): Promise<RequestContext>;
|
|
47
|
+
}
|
|
48
|
+
export declare class CustomFieldsApiResponseProcessor {
|
|
49
|
+
/**
|
|
50
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
51
|
+
* to the expected objects
|
|
52
|
+
*
|
|
53
|
+
* @params response Response returned by the server for a request to createCustomField
|
|
54
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
55
|
+
*/
|
|
56
|
+
createCustomFieldWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateCustomFieldResponse>>;
|
|
57
|
+
/**
|
|
58
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
59
|
+
* to the expected objects
|
|
60
|
+
*
|
|
61
|
+
* @params response Response returned by the server for a request to deleteCustomField
|
|
62
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
63
|
+
*/
|
|
64
|
+
deleteCustomFieldWithHttpInfo(response: ResponseContext): Promise<HttpInfo<DeleteCustomFieldResponse>>;
|
|
65
|
+
/**
|
|
66
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
67
|
+
* to the expected objects
|
|
68
|
+
*
|
|
69
|
+
* @params response Response returned by the server for a request to getCustomField
|
|
70
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
71
|
+
*/
|
|
72
|
+
getCustomFieldWithHttpInfo(response: ResponseContext): Promise<HttpInfo<GetCustomFieldResponse>>;
|
|
73
|
+
/**
|
|
74
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
75
|
+
* to the expected objects
|
|
76
|
+
*
|
|
77
|
+
* @params response Response returned by the server for a request to listCustomFields
|
|
78
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
79
|
+
*/
|
|
80
|
+
listCustomFieldsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListCustomFieldsResponse>>;
|
|
81
|
+
/**
|
|
82
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
83
|
+
* to the expected objects
|
|
84
|
+
*
|
|
85
|
+
* @params response Response returned by the server for a request to updateCustomField
|
|
86
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
87
|
+
*/
|
|
88
|
+
updateCustomFieldWithHttpInfo(response: ResponseContext): Promise<HttpInfo<UpdateCustomFieldResponse>>;
|
|
89
|
+
}
|