orb-billing 1.20.0 → 1.20.1
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/sdk/availability.js +17 -36
- package/dist/sdk/coupon.js +85 -180
- package/dist/sdk/credit.js +102 -216
- package/dist/sdk/creditnote.js +34 -72
- package/dist/sdk/customer.js +221 -468
- package/dist/sdk/event.js +153 -324
- package/dist/sdk/invoice.js +136 -288
- package/dist/sdk/item.js +34 -72
- package/dist/sdk/metric.js +51 -108
- package/dist/sdk/models/errors/fivehundrederror.d.ts +12 -0
- package/dist/sdk/models/errors/fivehundrederror.js +112 -0
- package/dist/sdk/models/errors/fourhundredandoneerror.d.ts +12 -0
- package/dist/sdk/models/errors/fourhundredandoneerror.js +112 -0
- package/dist/sdk/models/errors/fourhundredandtwentynineerror.d.ts +12 -0
- package/dist/sdk/models/errors/fourhundredandtwentynineerror.js +112 -0
- package/dist/sdk/models/errors/index.d.ts +3 -0
- package/dist/sdk/models/errors/index.js +3 -0
- package/dist/sdk/models/operations/addeditpriceintervals.d.ts +0 -28
- package/dist/sdk/models/operations/addeditpriceintervals.js +0 -28
- package/dist/sdk/models/operations/amendevent.d.ts +0 -28
- package/dist/sdk/models/operations/amendevent.js +0 -28
- package/dist/sdk/models/operations/amendusage.d.ts +0 -28
- package/dist/sdk/models/operations/amendusage.js +0 -28
- package/dist/sdk/models/operations/amendusageexternalcustomerid.d.ts +0 -28
- package/dist/sdk/models/operations/amendusageexternalcustomerid.js +0 -28
- package/dist/sdk/models/operations/archivecoupon.d.ts +0 -28
- package/dist/sdk/models/operations/archivecoupon.js +0 -28
- package/dist/sdk/models/operations/cancelsubscription.d.ts +0 -28
- package/dist/sdk/models/operations/cancelsubscription.js +0 -28
- package/dist/sdk/models/operations/closebackfill.d.ts +0 -28
- package/dist/sdk/models/operations/closebackfill.js +0 -28
- package/dist/sdk/models/operations/createbackfill.d.ts +0 -28
- package/dist/sdk/models/operations/createbackfill.js +0 -28
- package/dist/sdk/models/operations/createcoupon.d.ts +0 -28
- package/dist/sdk/models/operations/createcoupon.js +0 -28
- package/dist/sdk/models/operations/createcustomer.d.ts +0 -28
- package/dist/sdk/models/operations/createcustomer.js +0 -28
- package/dist/sdk/models/operations/createcustomerbalancetransaction.d.ts +0 -28
- package/dist/sdk/models/operations/createcustomerbalancetransaction.js +0 -28
- package/dist/sdk/models/operations/createinvoice.d.ts +0 -28
- package/dist/sdk/models/operations/createinvoice.js +0 -28
- package/dist/sdk/models/operations/createinvoicelineitem.d.ts +0 -28
- package/dist/sdk/models/operations/createinvoicelineitem.js +0 -28
- package/dist/sdk/models/operations/createledgerentry.d.ts +0 -29
- package/dist/sdk/models/operations/createledgerentry.js +0 -52
- package/dist/sdk/models/operations/createledgerentryexternalid.d.ts +0 -29
- package/dist/sdk/models/operations/createledgerentryexternalid.js +0 -52
- package/dist/sdk/models/operations/createmetric.d.ts +0 -28
- package/dist/sdk/models/operations/createmetric.js +0 -28
- package/dist/sdk/models/operations/createplan.d.ts +0 -28
- package/dist/sdk/models/operations/createplan.js +0 -28
- package/dist/sdk/models/operations/createprice.d.ts +0 -29
- package/dist/sdk/models/operations/createprice.js +0 -52
- package/dist/sdk/models/operations/createsubscription.d.ts +0 -28
- package/dist/sdk/models/operations/createsubscription.js +0 -28
- package/dist/sdk/models/operations/deletecustomer.d.ts +0 -28
- package/dist/sdk/models/operations/deletecustomer.js +0 -28
- package/dist/sdk/models/operations/deprecateevent.d.ts +0 -28
- package/dist/sdk/models/operations/deprecateevent.js +0 -28
- package/dist/sdk/models/operations/fetchbackfill.d.ts +0 -28
- package/dist/sdk/models/operations/fetchbackfill.js +0 -28
- package/dist/sdk/models/operations/fetchcoupon.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcoupon.js +0 -28
- package/dist/sdk/models/operations/fetchcreditnote.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcreditnote.js +0 -28
- package/dist/sdk/models/operations/fetchcustomer.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomer.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercosts.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercosts.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercredits.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercredits.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsledger.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsledger.js +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchcustomerexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchcustomerexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchinvoice.d.ts +0 -28
- package/dist/sdk/models/operations/fetchinvoice.js +0 -28
- package/dist/sdk/models/operations/fetchitem.d.ts +0 -28
- package/dist/sdk/models/operations/fetchitem.js +0 -28
- package/dist/sdk/models/operations/fetchmetric.d.ts +0 -28
- package/dist/sdk/models/operations/fetchmetric.js +0 -28
- package/dist/sdk/models/operations/fetchplan.d.ts +0 -28
- package/dist/sdk/models/operations/fetchplan.js +0 -28
- package/dist/sdk/models/operations/fetchplanexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/fetchplanexternalid.js +0 -28
- package/dist/sdk/models/operations/fetchprice.d.ts +0 -29
- package/dist/sdk/models/operations/fetchprice.js +0 -52
- package/dist/sdk/models/operations/fetchpriceexternalid.d.ts +0 -29
- package/dist/sdk/models/operations/fetchpriceexternalid.js +0 -52
- package/dist/sdk/models/operations/fetchsubscription.d.ts +0 -28
- package/dist/sdk/models/operations/fetchsubscription.js +0 -28
- package/dist/sdk/models/operations/fetchsubscriptioncosts.d.ts +0 -28
- package/dist/sdk/models/operations/fetchsubscriptioncosts.js +0 -28
- package/dist/sdk/models/operations/fetchsubscriptionschedule.d.ts +0 -28
- package/dist/sdk/models/operations/fetchsubscriptionschedule.js +0 -28
- package/dist/sdk/models/operations/fetchsubscriptionusage.d.ts +0 -29
- package/dist/sdk/models/operations/fetchsubscriptionusage.js +0 -52
- package/dist/sdk/models/operations/fetchupcominginvoice.d.ts +0 -28
- package/dist/sdk/models/operations/fetchupcominginvoice.js +0 -28
- package/dist/sdk/models/operations/ingest.d.ts +0 -28
- package/dist/sdk/models/operations/ingest.js +0 -28
- package/dist/sdk/models/operations/issueinvoice.d.ts +0 -28
- package/dist/sdk/models/operations/issueinvoice.js +0 -28
- package/dist/sdk/models/operations/listbackfills.d.ts +0 -28
- package/dist/sdk/models/operations/listbackfills.js +0 -28
- package/dist/sdk/models/operations/listbalancetransactions.d.ts +0 -28
- package/dist/sdk/models/operations/listbalancetransactions.js +0 -28
- package/dist/sdk/models/operations/listcoupons.d.ts +0 -28
- package/dist/sdk/models/operations/listcoupons.js +0 -28
- package/dist/sdk/models/operations/listcouponsubscriptions.d.ts +0 -28
- package/dist/sdk/models/operations/listcouponsubscriptions.js +0 -28
- package/dist/sdk/models/operations/listcreditnotes.d.ts +0 -28
- package/dist/sdk/models/operations/listcreditnotes.js +0 -28
- package/dist/sdk/models/operations/listcustomers.d.ts +0 -28
- package/dist/sdk/models/operations/listcustomers.js +0 -28
- package/dist/sdk/models/operations/listinvoices.d.ts +0 -28
- package/dist/sdk/models/operations/listinvoices.js +0 -28
- package/dist/sdk/models/operations/listitems.d.ts +0 -28
- package/dist/sdk/models/operations/listitems.js +0 -28
- package/dist/sdk/models/operations/listmetrics.d.ts +0 -28
- package/dist/sdk/models/operations/listmetrics.js +0 -28
- package/dist/sdk/models/operations/listplans.d.ts +0 -28
- package/dist/sdk/models/operations/listplans.js +0 -28
- package/dist/sdk/models/operations/listprices.d.ts +0 -28
- package/dist/sdk/models/operations/listprices.js +0 -28
- package/dist/sdk/models/operations/listsubscriptions.d.ts +0 -28
- package/dist/sdk/models/operations/listsubscriptions.js +0 -28
- package/dist/sdk/models/operations/markinvoiceaspaid.d.ts +0 -28
- package/dist/sdk/models/operations/markinvoiceaspaid.js +0 -28
- package/dist/sdk/models/operations/ping.d.ts +0 -28
- package/dist/sdk/models/operations/ping.js +0 -28
- package/dist/sdk/models/operations/revertbackfill.d.ts +0 -28
- package/dist/sdk/models/operations/revertbackfill.js +0 -28
- package/dist/sdk/models/operations/scheduleplanchange.d.ts +0 -28
- package/dist/sdk/models/operations/scheduleplanchange.js +0 -28
- package/dist/sdk/models/operations/searchevents.d.ts +0 -28
- package/dist/sdk/models/operations/searchevents.js +0 -28
- package/dist/sdk/models/operations/triggerphase.d.ts +0 -28
- package/dist/sdk/models/operations/triggerphase.js +0 -28
- package/dist/sdk/models/operations/unschedulecancellation.d.ts +0 -28
- package/dist/sdk/models/operations/unschedulecancellation.js +0 -28
- package/dist/sdk/models/operations/unschedulefixedfeequantity.d.ts +0 -28
- package/dist/sdk/models/operations/unschedulefixedfeequantity.js +0 -28
- package/dist/sdk/models/operations/unscheduleplanchange.d.ts +0 -28
- package/dist/sdk/models/operations/unscheduleplanchange.js +0 -28
- package/dist/sdk/models/operations/updatecustomer.d.ts +0 -28
- package/dist/sdk/models/operations/updatecustomer.js +0 -28
- package/dist/sdk/models/operations/updatecustomerexternalid.d.ts +0 -28
- package/dist/sdk/models/operations/updatecustomerexternalid.js +0 -28
- package/dist/sdk/models/operations/updatefixedfeequantity.d.ts +0 -28
- package/dist/sdk/models/operations/updatefixedfeequantity.js +0 -28
- package/dist/sdk/models/operations/updateplan.d.ts +0 -28
- package/dist/sdk/models/operations/updateplan.js +0 -28
- package/dist/sdk/models/operations/updateplanexternal.d.ts +0 -28
- package/dist/sdk/models/operations/updateplanexternal.js +0 -28
- package/dist/sdk/models/operations/voidinvoice.d.ts +0 -28
- package/dist/sdk/models/operations/voidinvoice.js +0 -28
- package/dist/sdk/models/shared/fivehundrederror.d.ts +0 -10
- package/dist/sdk/models/shared/fivehundrederror.js +1 -69
- package/dist/sdk/models/shared/fourhundredandoneerror.d.ts +0 -10
- package/dist/sdk/models/shared/fourhundredandoneerror.js +1 -69
- package/dist/sdk/models/shared/fourhundredandtwentynineerror.d.ts +0 -10
- package/dist/sdk/models/shared/fourhundredandtwentynineerror.js +1 -69
- package/dist/sdk/plan.js +102 -216
- package/dist/sdk/price.js +68 -144
- package/dist/sdk/priceinterval.js +17 -36
- package/dist/sdk/sdk.js +2 -2
- package/dist/sdk/subscription.js +221 -468
- package/docs/models/errors/fivehundrederror.md +12 -0
- package/docs/models/errors/fourhundredandoneerror.md +12 -0
- package/docs/models/errors/fourhundredandtwentynineerror.md +12 -0
- package/docs/models/operations/addeditpriceintervalsresponse.md +6 -13
- package/docs/models/operations/amendeventresponse.md +6 -13
- package/docs/models/operations/amendusageexternalcustomeridresponse.md +6 -13
- package/docs/models/operations/amendusageresponse.md +6 -13
- package/docs/models/operations/archivecouponresponse.md +6 -13
- package/docs/models/operations/cancelsubscriptionresponse.md +6 -13
- package/docs/models/operations/closebackfillresponse.md +6 -13
- package/docs/models/operations/createbackfillresponse.md +6 -13
- package/docs/models/operations/createcouponresponse.md +6 -13
- package/docs/models/operations/createcustomerbalancetransactionresponse.md +6 -13
- package/docs/models/operations/createcustomerresponse.md +6 -13
- package/docs/models/operations/createinvoicelineitemresponse.md +6 -13
- package/docs/models/operations/createinvoiceresponse.md +6 -13
- package/docs/models/operations/createledgerentryexternalidresponse.md +6 -13
- package/docs/models/operations/createledgerentryresponse.md +6 -13
- package/docs/models/operations/createmetricresponse.md +6 -13
- package/docs/models/operations/createplanresponse.md +6 -13
- package/docs/models/operations/createpriceresponse.md +6 -13
- package/docs/models/operations/createsubscriptionresponse.md +6 -13
- package/docs/models/operations/deletecustomerresponse.md +6 -13
- package/docs/models/operations/deprecateeventresponse.md +6 -13
- package/docs/models/operations/fetchbackfillresponse.md +6 -13
- package/docs/models/operations/fetchcouponresponse.md +6 -13
- package/docs/models/operations/fetchcreditnoteresponse.md +6 -13
- package/docs/models/operations/fetchcustomercostsexternalidresponse.md +6 -13
- package/docs/models/operations/fetchcustomercostsresponse.md +6 -13
- package/docs/models/operations/fetchcustomercreditsexternalidresponse.md +6 -13
- package/docs/models/operations/fetchcustomercreditsledgerexternalidresponse.md +6 -13
- package/docs/models/operations/fetchcustomercreditsledgerresponse.md +6 -13
- package/docs/models/operations/fetchcustomercreditsresponse.md +6 -13
- package/docs/models/operations/fetchcustomerexternalidresponse.md +6 -13
- package/docs/models/operations/fetchcustomerresponse.md +6 -13
- package/docs/models/operations/fetchinvoiceresponse.md +6 -13
- package/docs/models/operations/fetchitemresponse.md +6 -13
- package/docs/models/operations/fetchmetricresponse.md +6 -13
- package/docs/models/operations/fetchplanexternalidresponse.md +6 -13
- package/docs/models/operations/fetchplanresponse.md +6 -13
- package/docs/models/operations/fetchpriceexternalidresponse.md +6 -13
- package/docs/models/operations/fetchpriceresponse.md +6 -13
- package/docs/models/operations/fetchsubscriptioncostsresponse.md +6 -13
- package/docs/models/operations/fetchsubscriptionresponse.md +6 -13
- package/docs/models/operations/fetchsubscriptionscheduleresponse.md +6 -13
- package/docs/models/operations/fetchsubscriptionusageresponse.md +6 -13
- package/docs/models/operations/fetchupcominginvoiceresponse.md +6 -13
- package/docs/models/operations/ingestresponse.md +6 -13
- package/docs/models/operations/issueinvoiceresponse.md +6 -13
- package/docs/models/operations/listbackfillsresponse.md +6 -13
- package/docs/models/operations/listbalancetransactionsresponse.md +6 -13
- package/docs/models/operations/listcouponsresponse.md +6 -13
- package/docs/models/operations/listcouponsubscriptionsresponse.md +6 -13
- package/docs/models/operations/listcreditnotesresponse.md +6 -13
- package/docs/models/operations/listcustomersresponse.md +6 -13
- package/docs/models/operations/listinvoicesresponse.md +6 -13
- package/docs/models/operations/listitemsresponse.md +6 -13
- package/docs/models/operations/listmetricsresponse.md +6 -13
- package/docs/models/operations/listplansresponse.md +6 -13
- package/docs/models/operations/listpricesresponse.md +6 -13
- package/docs/models/operations/listsubscriptionsresponse.md +6 -13
- package/docs/models/operations/markinvoiceaspaidresponse.md +6 -13
- package/docs/models/operations/pingresponse.md +6 -13
- package/docs/models/operations/revertbackfillresponse.md +6 -13
- package/docs/models/operations/scheduleplanchangeresponse.md +6 -13
- package/docs/models/operations/searcheventsresponse.md +6 -13
- package/docs/models/operations/triggerphaseresponse.md +6 -13
- package/docs/models/operations/unschedulecancellationresponse.md +6 -13
- package/docs/models/operations/unschedulefixedfeequantityresponse.md +6 -13
- package/docs/models/operations/unscheduleplanchangeresponse.md +6 -13
- package/docs/models/operations/updatecustomerexternalidresponse.md +6 -13
- package/docs/models/operations/updatecustomerresponse.md +6 -13
- package/docs/models/operations/updatefixedfeequantityresponse.md +6 -13
- package/docs/models/operations/updateplanexternalresponse.md +6 -13
- package/docs/models/operations/updateplanresponse.md +6 -13
- package/docs/models/operations/voidinvoiceresponse.md +6 -13
- package/package.json +1 -1
- package/docs/models/shared/fivehundrederror.md +0 -12
- package/docs/models/shared/fourhundredandoneerror.md +0 -12
- package/docs/models/shared/fourhundredandtwentynineerror.md +0 -12
- /package/docs/models/{shared → errors}/fivehundrederrorheaders.md +0 -0
- /package/docs/models/{shared → errors}/fourhundredandoneerrorheaders.md +0 -0
- /package/docs/models/{shared → errors}/fourhundredandtwentynineerrorheaders.md +0 -0
package/dist/sdk/event.js
CHANGED
|
@@ -144,7 +144,7 @@ var Event = /** @class */ (function () {
|
|
|
144
144
|
Event.prototype.amend = function (eventId, amendedEvent, config) {
|
|
145
145
|
var _a, _b;
|
|
146
146
|
return __awaiter(this, void 0, void 0, function () {
|
|
147
|
-
var req, baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
147
|
+
var req, baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
148
148
|
var _d;
|
|
149
149
|
return __generator(this, function (_e) {
|
|
150
150
|
switch (_e.label) {
|
|
@@ -201,41 +201,18 @@ var Event = /** @class */ (function () {
|
|
|
201
201
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
202
202
|
}
|
|
203
203
|
break;
|
|
204
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
break;
|
|
204
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
205
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
206
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
207
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
208
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
209
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
210
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
212
211
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
213
212
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
218
|
-
}
|
|
219
|
-
break;
|
|
220
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
221
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
222
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
226
|
-
}
|
|
227
|
-
break;
|
|
228
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
229
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
230
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
234
|
-
}
|
|
235
|
-
break;
|
|
236
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
237
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
238
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
213
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
214
|
+
err.rawResponse = httpRes;
|
|
215
|
+
throw new errors.FourHundredAndOneError(err);
|
|
239
216
|
}
|
|
240
217
|
else {
|
|
241
218
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -243,7 +220,9 @@ var Event = /** @class */ (function () {
|
|
|
243
220
|
break;
|
|
244
221
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
245
222
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
246
|
-
|
|
223
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
224
|
+
err.rawResponse = httpRes;
|
|
225
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
247
226
|
}
|
|
248
227
|
else {
|
|
249
228
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -251,7 +230,9 @@ var Event = /** @class */ (function () {
|
|
|
251
230
|
break;
|
|
252
231
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
253
232
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
254
|
-
|
|
233
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
234
|
+
err.rawResponse = httpRes;
|
|
235
|
+
throw new errors.FiveHundredError(err);
|
|
255
236
|
}
|
|
256
237
|
else {
|
|
257
238
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -274,7 +255,7 @@ var Event = /** @class */ (function () {
|
|
|
274
255
|
Event.prototype.closeBackfill = function (backfillId, config) {
|
|
275
256
|
var _a, _b;
|
|
276
257
|
return __awaiter(this, void 0, void 0, function () {
|
|
277
|
-
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
258
|
+
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
278
259
|
return __generator(this, function (_c) {
|
|
279
260
|
switch (_c.label) {
|
|
280
261
|
case 0:
|
|
@@ -320,41 +301,18 @@ var Event = /** @class */ (function () {
|
|
|
320
301
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
321
302
|
}
|
|
322
303
|
break;
|
|
323
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
break;
|
|
304
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
305
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
306
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
307
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
308
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
309
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
310
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
331
311
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
332
312
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
337
|
-
}
|
|
338
|
-
break;
|
|
339
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
340
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
341
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
342
|
-
}
|
|
343
|
-
else {
|
|
344
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
345
|
-
}
|
|
346
|
-
break;
|
|
347
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
348
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
349
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
350
|
-
}
|
|
351
|
-
else {
|
|
352
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
353
|
-
}
|
|
354
|
-
break;
|
|
355
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
356
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
357
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
313
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
314
|
+
err.rawResponse = httpRes;
|
|
315
|
+
throw new errors.FourHundredAndOneError(err);
|
|
358
316
|
}
|
|
359
317
|
else {
|
|
360
318
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -362,7 +320,9 @@ var Event = /** @class */ (function () {
|
|
|
362
320
|
break;
|
|
363
321
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
364
322
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
365
|
-
|
|
323
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
324
|
+
err.rawResponse = httpRes;
|
|
325
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
366
326
|
}
|
|
367
327
|
else {
|
|
368
328
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -370,7 +330,9 @@ var Event = /** @class */ (function () {
|
|
|
370
330
|
break;
|
|
371
331
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
372
332
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
373
|
-
|
|
333
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
334
|
+
err.rawResponse = httpRes;
|
|
335
|
+
throw new errors.FiveHundredError(err);
|
|
374
336
|
}
|
|
375
337
|
else {
|
|
376
338
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -410,7 +372,7 @@ var Event = /** @class */ (function () {
|
|
|
410
372
|
Event.prototype.create = function (req, config) {
|
|
411
373
|
var _a, _b;
|
|
412
374
|
return __awaiter(this, void 0, void 0, function () {
|
|
413
|
-
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
375
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
414
376
|
var _d;
|
|
415
377
|
return __generator(this, function (_e) {
|
|
416
378
|
switch (_e.label) {
|
|
@@ -466,41 +428,18 @@ var Event = /** @class */ (function () {
|
|
|
466
428
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
467
429
|
}
|
|
468
430
|
break;
|
|
469
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
break;
|
|
431
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
432
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
433
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
434
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
435
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
436
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
437
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
477
438
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
478
439
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
483
|
-
}
|
|
484
|
-
break;
|
|
485
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
486
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
487
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
488
|
-
}
|
|
489
|
-
else {
|
|
490
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
491
|
-
}
|
|
492
|
-
break;
|
|
493
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
494
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
495
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
496
|
-
}
|
|
497
|
-
else {
|
|
498
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
499
|
-
}
|
|
500
|
-
break;
|
|
501
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
502
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
503
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
440
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
441
|
+
err.rawResponse = httpRes;
|
|
442
|
+
throw new errors.FourHundredAndOneError(err);
|
|
504
443
|
}
|
|
505
444
|
else {
|
|
506
445
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -508,7 +447,9 @@ var Event = /** @class */ (function () {
|
|
|
508
447
|
break;
|
|
509
448
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
510
449
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
511
|
-
|
|
450
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
451
|
+
err.rawResponse = httpRes;
|
|
452
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
512
453
|
}
|
|
513
454
|
else {
|
|
514
455
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -516,7 +457,9 @@ var Event = /** @class */ (function () {
|
|
|
516
457
|
break;
|
|
517
458
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
518
459
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
519
|
-
|
|
460
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
461
|
+
err.rawResponse = httpRes;
|
|
462
|
+
throw new errors.FiveHundredError(err);
|
|
520
463
|
}
|
|
521
464
|
else {
|
|
522
465
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -564,7 +507,7 @@ var Event = /** @class */ (function () {
|
|
|
564
507
|
Event.prototype.deprecateEvent = function (eventId, config) {
|
|
565
508
|
var _a, _b;
|
|
566
509
|
return __awaiter(this, void 0, void 0, function () {
|
|
567
|
-
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
510
|
+
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
568
511
|
return __generator(this, function (_c) {
|
|
569
512
|
switch (_c.label) {
|
|
570
513
|
case 0:
|
|
@@ -610,41 +553,18 @@ var Event = /** @class */ (function () {
|
|
|
610
553
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
611
554
|
}
|
|
612
555
|
break;
|
|
613
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
break;
|
|
556
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
557
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
558
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
559
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
560
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
561
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
562
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
621
563
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
622
564
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
627
|
-
}
|
|
628
|
-
break;
|
|
629
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
630
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
631
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
632
|
-
}
|
|
633
|
-
else {
|
|
634
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
635
|
-
}
|
|
636
|
-
break;
|
|
637
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
638
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
639
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
640
|
-
}
|
|
641
|
-
else {
|
|
642
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
643
|
-
}
|
|
644
|
-
break;
|
|
645
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
646
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
647
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
565
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
566
|
+
err.rawResponse = httpRes;
|
|
567
|
+
throw new errors.FourHundredAndOneError(err);
|
|
648
568
|
}
|
|
649
569
|
else {
|
|
650
570
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -652,7 +572,9 @@ var Event = /** @class */ (function () {
|
|
|
652
572
|
break;
|
|
653
573
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
654
574
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
655
|
-
|
|
575
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
576
|
+
err.rawResponse = httpRes;
|
|
577
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
656
578
|
}
|
|
657
579
|
else {
|
|
658
580
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -660,7 +582,9 @@ var Event = /** @class */ (function () {
|
|
|
660
582
|
break;
|
|
661
583
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
662
584
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
663
|
-
|
|
585
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
586
|
+
err.rawResponse = httpRes;
|
|
587
|
+
throw new errors.FiveHundredError(err);
|
|
664
588
|
}
|
|
665
589
|
else {
|
|
666
590
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -681,7 +605,7 @@ var Event = /** @class */ (function () {
|
|
|
681
605
|
Event.prototype.fetch = function (backfillId, config) {
|
|
682
606
|
var _a, _b;
|
|
683
607
|
return __awaiter(this, void 0, void 0, function () {
|
|
684
|
-
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
608
|
+
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
685
609
|
return __generator(this, function (_c) {
|
|
686
610
|
switch (_c.label) {
|
|
687
611
|
case 0:
|
|
@@ -727,41 +651,18 @@ var Event = /** @class */ (function () {
|
|
|
727
651
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
728
652
|
}
|
|
729
653
|
break;
|
|
730
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
break;
|
|
654
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
655
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
656
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
657
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
658
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
659
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
660
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
738
661
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
739
662
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
744
|
-
}
|
|
745
|
-
break;
|
|
746
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
747
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
748
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
749
|
-
}
|
|
750
|
-
else {
|
|
751
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
752
|
-
}
|
|
753
|
-
break;
|
|
754
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
755
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
756
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
757
|
-
}
|
|
758
|
-
else {
|
|
759
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
760
|
-
}
|
|
761
|
-
break;
|
|
762
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
763
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
764
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
663
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
664
|
+
err.rawResponse = httpRes;
|
|
665
|
+
throw new errors.FourHundredAndOneError(err);
|
|
765
666
|
}
|
|
766
667
|
else {
|
|
767
668
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -769,7 +670,9 @@ var Event = /** @class */ (function () {
|
|
|
769
670
|
break;
|
|
770
671
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
771
672
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
772
|
-
|
|
673
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
674
|
+
err.rawResponse = httpRes;
|
|
675
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
773
676
|
}
|
|
774
677
|
else {
|
|
775
678
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -777,7 +680,9 @@ var Event = /** @class */ (function () {
|
|
|
777
680
|
break;
|
|
778
681
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
779
682
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
780
|
-
|
|
683
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
684
|
+
err.rawResponse = httpRes;
|
|
685
|
+
throw new errors.FiveHundredError(err);
|
|
781
686
|
}
|
|
782
687
|
else {
|
|
783
688
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -972,7 +877,7 @@ var Event = /** @class */ (function () {
|
|
|
972
877
|
Event.prototype.ingest = function (ingestRequestBody, backfillId, debug, config) {
|
|
973
878
|
var _a, _b;
|
|
974
879
|
return __awaiter(this, void 0, void 0, function () {
|
|
975
|
-
var req, baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
880
|
+
var req, baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes, err, err, err;
|
|
976
881
|
var _d;
|
|
977
882
|
return __generator(this, function (_e) {
|
|
978
883
|
switch (_e.label) {
|
|
@@ -1031,41 +936,18 @@ var Event = /** @class */ (function () {
|
|
|
1031
936
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1032
937
|
}
|
|
1033
938
|
break;
|
|
1034
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
break;
|
|
939
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
940
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
941
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
942
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
943
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
944
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
945
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
1042
946
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
1043
947
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1048
|
-
}
|
|
1049
|
-
break;
|
|
1050
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
1051
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1052
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
1053
|
-
}
|
|
1054
|
-
else {
|
|
1055
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1056
|
-
}
|
|
1057
|
-
break;
|
|
1058
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
1059
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1060
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
1061
|
-
}
|
|
1062
|
-
else {
|
|
1063
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1064
|
-
}
|
|
1065
|
-
break;
|
|
1066
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
1067
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1068
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
948
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
949
|
+
err.rawResponse = httpRes;
|
|
950
|
+
throw new errors.FourHundredAndOneError(err);
|
|
1069
951
|
}
|
|
1070
952
|
else {
|
|
1071
953
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1073,7 +955,9 @@ var Event = /** @class */ (function () {
|
|
|
1073
955
|
break;
|
|
1074
956
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
1075
957
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1076
|
-
|
|
958
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
959
|
+
err.rawResponse = httpRes;
|
|
960
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
1077
961
|
}
|
|
1078
962
|
else {
|
|
1079
963
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1081,7 +965,9 @@ var Event = /** @class */ (function () {
|
|
|
1081
965
|
break;
|
|
1082
966
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
1083
967
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1084
|
-
|
|
968
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
969
|
+
err.rawResponse = httpRes;
|
|
970
|
+
throw new errors.FiveHundredError(err);
|
|
1085
971
|
}
|
|
1086
972
|
else {
|
|
1087
973
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1106,7 +992,7 @@ var Event = /** @class */ (function () {
|
|
|
1106
992
|
Event.prototype.listBackfills = function (cursor, limit, config) {
|
|
1107
993
|
var _a, _b;
|
|
1108
994
|
return __awaiter(this, void 0, void 0, function () {
|
|
1109
|
-
var req, baseURL, url, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
995
|
+
var req, baseURL, url, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes, err, err, err;
|
|
1110
996
|
return __generator(this, function (_c) {
|
|
1111
997
|
switch (_c.label) {
|
|
1112
998
|
case 0:
|
|
@@ -1154,41 +1040,18 @@ var Event = /** @class */ (function () {
|
|
|
1154
1040
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1155
1041
|
}
|
|
1156
1042
|
break;
|
|
1157
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
break;
|
|
1043
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
1044
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
1045
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
1046
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
1047
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
1048
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
1049
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
1165
1050
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
1166
1051
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1171
|
-
}
|
|
1172
|
-
break;
|
|
1173
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
1174
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1175
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
1176
|
-
}
|
|
1177
|
-
else {
|
|
1178
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1179
|
-
}
|
|
1180
|
-
break;
|
|
1181
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
1182
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1183
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
1184
|
-
}
|
|
1185
|
-
else {
|
|
1186
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1187
|
-
}
|
|
1188
|
-
break;
|
|
1189
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
1190
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1191
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
1052
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
1053
|
+
err.rawResponse = httpRes;
|
|
1054
|
+
throw new errors.FourHundredAndOneError(err);
|
|
1192
1055
|
}
|
|
1193
1056
|
else {
|
|
1194
1057
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1196,7 +1059,9 @@ var Event = /** @class */ (function () {
|
|
|
1196
1059
|
break;
|
|
1197
1060
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
1198
1061
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1199
|
-
|
|
1062
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
1063
|
+
err.rawResponse = httpRes;
|
|
1064
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
1200
1065
|
}
|
|
1201
1066
|
else {
|
|
1202
1067
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1204,7 +1069,9 @@ var Event = /** @class */ (function () {
|
|
|
1204
1069
|
break;
|
|
1205
1070
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
1206
1071
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1207
|
-
|
|
1072
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
1073
|
+
err.rawResponse = httpRes;
|
|
1074
|
+
throw new errors.FiveHundredError(err);
|
|
1208
1075
|
}
|
|
1209
1076
|
else {
|
|
1210
1077
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1230,7 +1097,7 @@ var Event = /** @class */ (function () {
|
|
|
1230
1097
|
Event.prototype.revertBackfill = function (backfillId, config) {
|
|
1231
1098
|
var _a, _b;
|
|
1232
1099
|
return __awaiter(this, void 0, void 0, function () {
|
|
1233
|
-
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
1100
|
+
var req, baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes, err, err, err;
|
|
1234
1101
|
return __generator(this, function (_c) {
|
|
1235
1102
|
switch (_c.label) {
|
|
1236
1103
|
case 0:
|
|
@@ -1276,41 +1143,18 @@ var Event = /** @class */ (function () {
|
|
|
1276
1143
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1277
1144
|
}
|
|
1278
1145
|
break;
|
|
1279
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
break;
|
|
1146
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
1147
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
1148
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
1149
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
1150
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
1151
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
1152
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
1287
1153
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
1288
1154
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1293
|
-
}
|
|
1294
|
-
break;
|
|
1295
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
1296
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1297
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
1298
|
-
}
|
|
1299
|
-
else {
|
|
1300
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1301
|
-
}
|
|
1302
|
-
break;
|
|
1303
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
1304
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1305
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
1306
|
-
}
|
|
1307
|
-
else {
|
|
1308
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1309
|
-
}
|
|
1310
|
-
break;
|
|
1311
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
1312
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1313
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
1155
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
1156
|
+
err.rawResponse = httpRes;
|
|
1157
|
+
throw new errors.FourHundredAndOneError(err);
|
|
1314
1158
|
}
|
|
1315
1159
|
else {
|
|
1316
1160
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1318,7 +1162,9 @@ var Event = /** @class */ (function () {
|
|
|
1318
1162
|
break;
|
|
1319
1163
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
1320
1164
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1321
|
-
|
|
1165
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
1166
|
+
err.rawResponse = httpRes;
|
|
1167
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
1322
1168
|
}
|
|
1323
1169
|
else {
|
|
1324
1170
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1326,7 +1172,9 @@ var Event = /** @class */ (function () {
|
|
|
1326
1172
|
break;
|
|
1327
1173
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
1328
1174
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1329
|
-
|
|
1175
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
1176
|
+
err.rawResponse = httpRes;
|
|
1177
|
+
throw new errors.FiveHundredError(err);
|
|
1330
1178
|
}
|
|
1331
1179
|
else {
|
|
1332
1180
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1361,7 +1209,7 @@ var Event = /** @class */ (function () {
|
|
|
1361
1209
|
Event.prototype.search = function (req, config) {
|
|
1362
1210
|
var _a, _b;
|
|
1363
1211
|
return __awaiter(this, void 0, void 0, function () {
|
|
1364
|
-
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
1212
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes, err, err, err;
|
|
1365
1213
|
var _d;
|
|
1366
1214
|
return __generator(this, function (_e) {
|
|
1367
1215
|
switch (_e.label) {
|
|
@@ -1418,41 +1266,18 @@ var Event = /** @class */ (function () {
|
|
|
1418
1266
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1419
1267
|
}
|
|
1420
1268
|
break;
|
|
1421
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
break;
|
|
1269
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400 ||
|
|
1270
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404 ||
|
|
1271
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409 ||
|
|
1272
|
+
(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413 ||
|
|
1273
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
1274
|
+
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
1275
|
+
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
1429
1276
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
1430
1277
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1435
|
-
}
|
|
1436
|
-
break;
|
|
1437
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
1438
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1439
|
-
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
1440
|
-
}
|
|
1441
|
-
else {
|
|
1442
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1443
|
-
}
|
|
1444
|
-
break;
|
|
1445
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
1446
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1447
|
-
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
1448
|
-
}
|
|
1449
|
-
else {
|
|
1450
|
-
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1451
|
-
}
|
|
1452
|
-
break;
|
|
1453
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
1454
|
-
if (utils.matchContentType(contentType, "application/json")) {
|
|
1455
|
-
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
1278
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndOneError);
|
|
1279
|
+
err.rawResponse = httpRes;
|
|
1280
|
+
throw new errors.FourHundredAndOneError(err);
|
|
1456
1281
|
}
|
|
1457
1282
|
else {
|
|
1458
1283
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1460,7 +1285,9 @@ var Event = /** @class */ (function () {
|
|
|
1460
1285
|
break;
|
|
1461
1286
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
1462
1287
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1463
|
-
|
|
1288
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FourHundredAndTwentyNineError);
|
|
1289
|
+
err.rawResponse = httpRes;
|
|
1290
|
+
throw new errors.FourHundredAndTwentyNineError(err);
|
|
1464
1291
|
}
|
|
1465
1292
|
else {
|
|
1466
1293
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1468,7 +1295,9 @@ var Event = /** @class */ (function () {
|
|
|
1468
1295
|
break;
|
|
1469
1296
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
1470
1297
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
1471
|
-
|
|
1298
|
+
err = utils.objectToClass(JSON.parse(decodedRes), errors.FiveHundredError);
|
|
1299
|
+
err.rawResponse = httpRes;
|
|
1300
|
+
throw new errors.FiveHundredError(err);
|
|
1472
1301
|
}
|
|
1473
1302
|
else {
|
|
1474
1303
|
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|