orb-billing 1.0.1 → 1.19.2
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/README.md +61 -41
- package/dist/internal/utils/requestbody.d.ts +1 -1
- package/dist/internal/utils/requestbody.js +1 -1
- package/dist/internal/utils/retries.d.ts +2 -2
- package/dist/internal/utils/security.d.ts +5 -2
- package/dist/internal/utils/security.js +28 -28
- package/dist/sdk/availability.d.ts +3 -4
- package/dist/sdk/availability.js +80 -10
- package/dist/sdk/coupon.d.ts +16 -7
- package/dist/sdk/coupon.js +396 -35
- package/dist/sdk/credit.d.ts +111 -87
- package/dist/sdk/credit.js +573 -128
- package/dist/sdk/creditnote.d.ts +8 -5
- package/dist/sdk/creditnote.js +160 -16
- package/dist/sdk/customer.d.ts +358 -93
- package/dist/sdk/customer.js +1351 -189
- package/dist/sdk/event.d.ts +198 -103
- package/dist/sdk/event.js +906 -157
- package/dist/sdk/invoice.d.ts +39 -10
- package/dist/sdk/invoice.js +727 -47
- package/dist/sdk/item.d.ts +27 -0
- package/dist/sdk/item.js +328 -0
- package/dist/sdk/metric.d.ts +39 -0
- package/dist/sdk/metric.js +475 -0
- package/dist/sdk/models/errors/index.d.ts +1 -0
- package/dist/sdk/models/errors/index.js +20 -0
- package/dist/sdk/models/errors/sdkerror.d.ts +7 -0
- package/dist/sdk/models/errors/sdkerror.js +40 -0
- package/dist/sdk/models/operations/addeditpriceintervals.d.ts +53 -0
- package/dist/sdk/models/operations/addeditpriceintervals.js +123 -0
- package/dist/sdk/models/operations/amendevent.d.ts +35 -5
- package/dist/sdk/models/operations/amendevent.js +28 -4
- package/dist/sdk/models/operations/amendusage.d.ts +36 -15
- package/dist/sdk/models/operations/amendusage.js +31 -22
- package/dist/sdk/models/operations/amendusageexternalcustomerid.d.ts +36 -15
- package/dist/sdk/models/operations/amendusageexternalcustomerid.js +31 -22
- package/dist/sdk/models/operations/archivecoupon.d.ts +37 -0
- package/dist/sdk/models/operations/archivecoupon.js +28 -0
- package/dist/sdk/models/operations/cancelsubscription.d.ts +38 -1
- package/dist/sdk/models/operations/cancelsubscription.js +30 -2
- package/dist/sdk/models/operations/closebackfill.d.ts +37 -0
- package/dist/sdk/models/operations/closebackfill.js +28 -0
- package/dist/sdk/models/operations/createbackfill.d.ts +37 -0
- package/dist/sdk/models/operations/createbackfill.js +28 -0
- package/dist/sdk/models/operations/createcoupon.d.ts +38 -1
- package/dist/sdk/models/operations/createcoupon.js +28 -0
- package/dist/sdk/models/operations/createcustomer.d.ts +37 -0
- package/dist/sdk/models/operations/createcustomer.js +28 -0
- package/dist/sdk/models/operations/createcustomerbalancetransaction.d.ts +38 -1
- package/dist/sdk/models/operations/createcustomerbalancetransaction.js +30 -2
- package/dist/sdk/models/operations/createinvoice.d.ts +49 -0
- package/dist/sdk/models/operations/createinvoice.js +107 -0
- package/dist/sdk/models/operations/createinvoicelineitem.d.ts +37 -0
- package/dist/sdk/models/operations/createinvoicelineitem.js +28 -0
- package/dist/sdk/models/operations/createledgerentry.d.ts +40 -3
- package/dist/sdk/models/operations/createledgerentry.js +31 -3
- package/dist/sdk/models/operations/createledgerentryexternalid.d.ts +53 -0
- package/dist/sdk/models/operations/createledgerentryexternalid.js +123 -0
- package/dist/sdk/models/operations/createmetric.d.ts +49 -0
- package/dist/sdk/models/operations/createmetric.js +107 -0
- package/dist/sdk/models/operations/createplan.d.ts +49 -0
- package/dist/sdk/models/operations/createplan.js +107 -0
- package/dist/sdk/models/operations/createprice.d.ts +49 -0
- package/dist/sdk/models/operations/{addledgerentryexternalid.js → createprice.js} +37 -25
- package/dist/sdk/models/operations/createsubscription.d.ts +38 -1
- package/dist/sdk/models/operations/createsubscription.js +28 -0
- package/dist/sdk/models/operations/deletecustomer.d.ts +41 -11
- package/dist/sdk/models/operations/deletecustomer.js +57 -16
- package/dist/sdk/models/operations/deprecateevent.d.ts +35 -5
- package/dist/sdk/models/operations/deprecateevent.js +28 -4
- package/dist/sdk/models/operations/fetchbackfill.d.ts +52 -0
- package/dist/sdk/models/operations/fetchbackfill.js +119 -0
- package/dist/sdk/models/operations/fetchcoupon.d.ts +37 -0
- package/dist/sdk/models/operations/fetchcoupon.js +28 -0
- package/dist/sdk/models/operations/fetchcreditnote.d.ts +37 -3
- package/dist/sdk/models/operations/fetchcreditnote.js +28 -0
- package/dist/sdk/models/operations/fetchcustomer.d.ts +38 -4
- package/dist/sdk/models/operations/fetchcustomer.js +28 -0
- package/dist/sdk/models/operations/fetchcustomercosts.d.ts +44 -12
- package/dist/sdk/models/operations/fetchcustomercosts.js +37 -1
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.d.ts +45 -10
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.js +37 -1
- package/dist/sdk/models/operations/fetchcustomercredits.d.ts +37 -9
- package/dist/sdk/models/operations/fetchcustomercredits.js +31 -3
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.d.ts +39 -8
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.js +31 -3
- package/dist/sdk/models/operations/fetchcustomercreditsledger.d.ts +53 -13
- package/dist/sdk/models/operations/fetchcustomercreditsledger.js +66 -3
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.d.ts +53 -13
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.js +66 -3
- package/dist/sdk/models/operations/fetchcustomerexternalid.d.ts +37 -0
- package/dist/sdk/models/operations/fetchcustomerexternalid.js +28 -0
- package/dist/sdk/models/operations/fetchinvoice.d.ts +37 -0
- package/dist/sdk/models/operations/fetchinvoice.js +28 -0
- package/dist/sdk/models/operations/fetchitem.d.ts +52 -0
- package/dist/sdk/models/operations/fetchitem.js +119 -0
- package/dist/sdk/models/operations/fetchmetric.d.ts +52 -0
- package/dist/sdk/models/operations/fetchmetric.js +119 -0
- package/dist/sdk/models/operations/fetchplan.d.ts +37 -0
- package/dist/sdk/models/operations/fetchplan.js +28 -0
- package/dist/sdk/models/operations/fetchplanexternalid.d.ts +37 -0
- package/dist/sdk/models/operations/fetchplanexternalid.js +28 -0
- package/dist/sdk/models/operations/fetchprice.d.ts +52 -0
- package/dist/sdk/models/operations/fetchprice.js +119 -0
- package/dist/sdk/models/operations/fetchpriceexternalid.d.ts +52 -0
- package/dist/sdk/models/operations/fetchpriceexternalid.js +119 -0
- package/dist/sdk/models/operations/fetchsubscription.d.ts +37 -0
- package/dist/sdk/models/operations/fetchsubscription.js +28 -0
- package/dist/sdk/models/operations/fetchsubscriptioncosts.d.ts +45 -10
- package/dist/sdk/models/operations/fetchsubscriptioncosts.js +37 -1
- package/dist/sdk/models/operations/fetchsubscriptionschedule.d.ts +43 -8
- package/dist/sdk/models/operations/fetchsubscriptionschedule.js +47 -3
- package/dist/sdk/models/operations/fetchsubscriptionusage.d.ts +60 -16
- package/dist/sdk/models/operations/fetchsubscriptionusage.js +69 -2
- package/dist/sdk/models/operations/fetchupcominginvoice.d.ts +38 -1
- package/dist/sdk/models/operations/fetchupcominginvoice.js +28 -0
- package/dist/sdk/models/operations/index.d.ts +20 -2
- package/dist/sdk/models/operations/index.js +20 -2
- package/dist/sdk/models/operations/ingest.d.ts +36 -12
- package/dist/sdk/models/operations/ingest.js +31 -22
- package/dist/sdk/models/operations/issueinvoice.d.ts +35 -2
- package/dist/sdk/models/operations/issueinvoice.js +28 -4
- package/dist/sdk/models/operations/listbackfills.d.ts +37 -6
- package/dist/sdk/models/operations/listbackfills.js +29 -1
- package/dist/sdk/models/operations/listbalancetransactions.d.ts +45 -10
- package/dist/sdk/models/operations/listbalancetransactions.js +49 -5
- package/dist/sdk/models/operations/listcoupons.d.ts +35 -10
- package/dist/sdk/models/operations/listcoupons.js +29 -1
- package/dist/sdk/models/operations/listcouponsubscriptions.d.ts +39 -0
- package/dist/sdk/models/operations/listcouponsubscriptions.js +36 -0
- package/dist/sdk/models/operations/listcreditnotes.d.ts +53 -0
- package/dist/sdk/models/operations/listcreditnotes.js +123 -0
- package/dist/sdk/models/operations/listcustomers.d.ts +41 -6
- package/dist/sdk/models/operations/listcustomers.js +45 -1
- package/dist/sdk/models/operations/listinvoices.d.ts +66 -14
- package/dist/sdk/models/operations/listinvoices.js +109 -3
- package/dist/sdk/models/operations/listitems.d.ts +53 -0
- package/dist/sdk/models/operations/{listcreditnote.js → listitems.js} +46 -30
- package/dist/sdk/models/operations/listmetrics.d.ts +57 -0
- package/dist/sdk/models/operations/listmetrics.js +139 -0
- package/dist/sdk/models/operations/listplans.d.ts +53 -6
- package/dist/sdk/models/operations/listplans.js +59 -2
- package/dist/sdk/models/operations/listprices.d.ts +53 -0
- package/dist/sdk/models/operations/listprices.js +123 -0
- package/dist/sdk/models/operations/listsubscriptions.d.ts +48 -7
- package/dist/sdk/models/operations/listsubscriptions.js +56 -2
- package/dist/sdk/models/operations/markinvoiceaspaid.d.ts +53 -0
- package/dist/sdk/models/operations/markinvoiceaspaid.js +123 -0
- package/dist/sdk/models/operations/ping.d.ts +39 -2
- package/dist/sdk/models/operations/ping.js +30 -2
- package/dist/sdk/models/operations/revertbackfill.d.ts +37 -0
- package/dist/sdk/models/operations/revertbackfill.js +28 -0
- package/dist/sdk/models/operations/scheduleplanchange.d.ts +37 -0
- package/dist/sdk/models/operations/scheduleplanchange.js +28 -0
- package/dist/sdk/models/operations/searchevents.d.ts +42 -7
- package/dist/sdk/models/operations/searchevents.js +47 -3
- package/dist/sdk/models/operations/triggerphase.d.ts +53 -0
- package/dist/sdk/models/operations/triggerphase.js +123 -0
- package/dist/sdk/models/operations/unschedulecancellation.d.ts +37 -0
- package/dist/sdk/models/operations/unschedulecancellation.js +28 -0
- package/dist/sdk/models/operations/unschedulefixedfeequantity.d.ts +53 -0
- package/dist/sdk/models/operations/unschedulefixedfeequantity.js +123 -0
- package/dist/sdk/models/operations/unscheduleplanchange.d.ts +37 -0
- package/dist/sdk/models/operations/unscheduleplanchange.js +28 -0
- package/dist/sdk/models/operations/updatecustomer.d.ts +38 -4
- package/dist/sdk/models/operations/updatecustomer.js +30 -2
- package/dist/sdk/models/operations/updatecustomerexternalid.d.ts +38 -1
- package/dist/sdk/models/operations/updatecustomerexternalid.js +30 -2
- package/dist/sdk/models/operations/updatefixedfeequantity.d.ts +37 -0
- package/dist/sdk/models/operations/updatefixedfeequantity.js +28 -0
- package/dist/sdk/models/operations/updateplan.d.ts +53 -0
- package/dist/sdk/models/operations/updateplan.js +123 -0
- package/dist/sdk/models/operations/updateplanexternal.d.ts +53 -0
- package/dist/sdk/models/operations/updateplanexternal.js +123 -0
- package/dist/sdk/models/operations/voidinvoice.d.ts +36 -3
- package/dist/sdk/models/operations/voidinvoice.js +28 -4
- package/dist/sdk/models/shared/accountingprovider.d.ts +9 -0
- package/dist/sdk/models/shared/accountingprovider.js +55 -0
- package/dist/sdk/models/shared/accountingproviderconfig.d.ts +5 -0
- package/dist/sdk/models/shared/{creditblock.js → accountingproviderconfig.js} +10 -18
- package/dist/sdk/models/shared/accountingsyncconfiguration.d.ts +6 -0
- package/dist/sdk/models/shared/accountingsyncconfiguration.js +52 -0
- package/dist/sdk/models/shared/adddecrementcreditledgerentryrequestparams.d.ts +24 -0
- package/dist/sdk/models/shared/adddecrementcreditledgerentryrequestparams.js +76 -0
- package/dist/sdk/models/shared/addeditpriceintervalparams.d.ts +13 -0
- package/dist/sdk/models/shared/addeditpriceintervalparams.js +54 -0
- package/dist/sdk/models/shared/addexpirationchangecreditledgerentryrequestparams.d.ts +37 -0
- package/dist/sdk/models/shared/{newcreditledgerentry.js → addexpirationchangecreditledgerentryrequestparams.js} +25 -34
- package/dist/sdk/models/shared/addincrementcreditledgerentryrequestparams.d.ts +42 -0
- package/dist/sdk/models/shared/addincrementcreditledgerentryrequestparams.js +107 -0
- package/dist/sdk/models/shared/addpriceintervalparams.d.ts +54 -0
- package/dist/sdk/models/shared/addpriceintervalparams.js +103 -0
- package/dist/sdk/models/shared/address.d.ts +9 -0
- package/dist/sdk/models/shared/address.js +70 -0
- package/dist/sdk/models/shared/addressinput.d.ts +9 -0
- package/dist/sdk/models/shared/addressinput.js +70 -0
- package/dist/sdk/models/shared/addvoidcreditledgerentryrequestparams.d.ts +34 -0
- package/dist/sdk/models/shared/addvoidcreditledgerentryrequestparams.js +88 -0
- package/dist/sdk/models/shared/affectedblock.d.ts +6 -0
- package/dist/sdk/models/shared/{credit.js → affectedblock.js} +9 -14
- package/dist/sdk/models/shared/{subscriptioncost.d.ts → aggregatedcost.d.ts} +1 -1
- package/dist/sdk/models/shared/{customercost.js → aggregatedcost.js} +11 -11
- package/dist/sdk/models/shared/amendedusage.d.ts +2 -7
- package/dist/sdk/models/shared/amendedusage.js +2 -14
- package/dist/sdk/models/shared/amendeventresult.d.ts +1 -4
- package/dist/sdk/models/shared/amendeventresult.js +0 -3
- package/dist/sdk/models/shared/amendmentledgerentry.d.ts +27 -0
- package/dist/sdk/models/shared/amendmentledgerentry.js +120 -0
- package/dist/sdk/models/shared/amountdiscount.d.ts +15 -0
- package/dist/sdk/models/shared/amountdiscount.js +59 -0
- package/dist/sdk/models/shared/amountdiscountcreationparams.d.ts +11 -0
- package/dist/sdk/models/shared/amountdiscountcreationparams.js +54 -0
- package/dist/sdk/models/shared/amountdiscountinterval.d.ts +27 -0
- package/dist/sdk/models/shared/amountdiscountinterval.js +82 -0
- package/dist/sdk/models/shared/autocollection.d.ts +3 -6
- package/dist/sdk/models/shared/autocollection.js +0 -3
- package/dist/sdk/models/shared/backfill.d.ts +2 -2
- package/dist/sdk/models/shared/backfills.d.ts +2 -5
- package/dist/sdk/models/shared/backfills.js +0 -3
- package/dist/sdk/models/shared/billablemetric.d.ts +24 -1
- package/dist/sdk/models/shared/billablemetric.js +40 -1
- package/dist/sdk/models/shared/billablemetrics.d.ts +7 -0
- package/dist/sdk/models/shared/billablemetrics.js +54 -0
- package/dist/sdk/models/shared/billablemetricsimple.d.ts +5 -0
- package/dist/sdk/models/shared/{billablemetricminified.js → billablemetricsimple.js} +8 -8
- package/dist/sdk/models/shared/billablemetrictiny.d.ts +4 -0
- package/dist/sdk/models/shared/billablemetrictiny.js +45 -0
- package/dist/sdk/models/shared/billingcyclealignment.d.ts +8 -0
- package/dist/sdk/models/shared/billingcyclealignment.js +15 -0
- package/dist/sdk/models/shared/bpsconfig.d.ts +7 -4
- package/dist/sdk/models/shared/bpsconfig.js +1 -4
- package/dist/sdk/models/shared/bpsprice.d.ts +242 -0
- package/dist/sdk/models/shared/bpsprice.js +363 -0
- package/dist/sdk/models/shared/bpstier.d.ts +15 -3
- package/dist/sdk/models/shared/bpstier.js +1 -1
- package/dist/sdk/models/shared/bulkbpsconfig.d.ts +4 -4
- package/dist/sdk/models/shared/bulkbpsconfig.js +0 -3
- package/dist/sdk/models/shared/bulkbpsprice.d.ts +242 -0
- package/dist/sdk/models/shared/bulkbpsprice.js +363 -0
- package/dist/sdk/models/shared/bulkbpstier.d.ts +10 -1
- package/dist/sdk/models/shared/bulkbpstier.js +1 -1
- package/dist/sdk/models/shared/bulkconfig.d.ts +4 -4
- package/dist/sdk/models/shared/bulkconfig.js +0 -3
- package/dist/sdk/models/shared/bulkprice.d.ts +242 -0
- package/dist/sdk/models/shared/bulkprice.js +363 -0
- package/dist/sdk/models/shared/bulktier.d.ts +7 -1
- package/dist/sdk/models/shared/bulktier.js +1 -1
- package/dist/sdk/models/shared/cancelsubscriptionparams.d.ts +19 -0
- package/dist/sdk/models/shared/cancelsubscriptionparams.js +63 -0
- package/dist/sdk/models/shared/changeoption.d.ts +0 -3
- package/dist/sdk/models/shared/changeoption.js +0 -3
- package/dist/sdk/models/shared/coupon.d.ts +14 -10
- package/dist/sdk/models/shared/coupon.js +16 -6
- package/dist/sdk/models/shared/couponredemption.d.ts +6 -0
- package/dist/sdk/models/shared/{usageitem.js → couponredemption.js} +12 -12
- package/dist/sdk/models/shared/coupons.d.ts +2 -5
- package/dist/sdk/models/shared/coupons.js +0 -3
- package/dist/sdk/models/shared/{newinvoicelineitem.d.ts → createinvoicelineitemparams.d.ts} +5 -5
- package/dist/sdk/models/shared/{newinvoicelineitem.js → createinvoicelineitemparams.js} +13 -13
- package/dist/sdk/models/shared/createoneoffinvoiceparams.d.ts +33 -0
- package/dist/sdk/models/shared/createoneoffinvoiceparams.js +86 -0
- package/dist/sdk/models/shared/creditblockexpiryledgerentry.d.ts +27 -0
- package/dist/sdk/models/shared/creditblockexpiryledgerentry.js +120 -0
- package/dist/sdk/models/shared/creditledgerentries.d.ts +1 -5
- package/dist/sdk/models/shared/creditledgerentries.js +1 -6
- package/dist/sdk/models/shared/creditnote.d.ts +34 -22
- package/dist/sdk/models/shared/creditnote.js +44 -7
- package/dist/sdk/models/shared/creditnotelineitem.d.ts +12 -10
- package/dist/sdk/models/shared/creditnotelineitem.js +24 -10
- package/dist/sdk/models/shared/creditnoteminified.d.ts +7 -0
- package/dist/sdk/models/shared/creditnoteminified.js +45 -0
- package/dist/sdk/models/shared/creditnotes.d.ts +2 -5
- package/dist/sdk/models/shared/creditnotes.js +0 -3
- package/dist/sdk/models/shared/{sublineitem2.d.ts → creditnotesublineitem.d.ts} +1 -1
- package/dist/sdk/models/shared/{sublineitem2.js → creditnotesublineitem.js} +9 -9
- package/dist/sdk/models/shared/creditnotesummary.d.ts +9 -6
- package/dist/sdk/models/shared/customer.d.ts +30 -181
- package/dist/sdk/models/shared/customer.js +41 -223
- package/dist/sdk/models/shared/customerbalancetransaction.d.ts +13 -28
- package/dist/sdk/models/shared/customerbalancetransaction.js +18 -42
- package/dist/sdk/models/shared/{transactions.d.ts → customerbalancetransactions.d.ts} +3 -6
- package/dist/sdk/models/shared/{transactions.js → customerbalancetransactions.js} +8 -11
- package/dist/sdk/models/shared/customercosts.d.ts +2 -5
- package/dist/sdk/models/shared/customercosts.js +3 -6
- package/dist/sdk/models/shared/customercreditbalance.d.ts +7 -0
- package/dist/sdk/models/shared/customercreditbalance.js +64 -0
- package/dist/sdk/models/shared/customercreditbalances.d.ts +7 -0
- package/dist/sdk/models/shared/customercreditbalances.js +54 -0
- package/dist/sdk/models/shared/customerminified.d.ts +0 -3
- package/dist/sdk/models/shared/customerminified.js +0 -3
- package/dist/sdk/models/shared/customers.d.ts +0 -3
- package/dist/sdk/models/shared/customers.js +0 -3
- package/dist/sdk/models/shared/customertaxid.d.ts +6 -0
- package/dist/sdk/models/shared/{newtransaction.js → customertaxid.js} +12 -13
- package/dist/sdk/models/shared/debug.d.ts +2 -2
- package/dist/sdk/models/shared/decrementledgerentry.d.ts +30 -0
- package/dist/sdk/models/shared/{creditledgerentry.js → decrementledgerentry.js} +42 -51
- package/dist/sdk/models/shared/deletecustomerresponse.d.ts +3 -0
- package/dist/sdk/models/shared/deletecustomerresponse.js +30 -0
- package/dist/sdk/models/shared/deprecatedeventresult.d.ts +1 -4
- package/dist/sdk/models/shared/deprecatedeventresult.js +0 -3
- package/dist/sdk/models/shared/discount.d.ts +13 -5
- package/dist/sdk/models/shared/discount.js +13 -4
- package/dist/sdk/models/shared/duplicateconstraintviolationerror.d.ts +16 -0
- package/dist/sdk/models/shared/duplicateconstraintviolationerror.js +82 -0
- package/dist/sdk/models/shared/duplicateresourcecreationerror.d.ts +16 -0
- package/dist/sdk/models/shared/duplicateresourcecreationerror.js +82 -0
- package/dist/sdk/models/shared/editcustomer.d.ts +72 -0
- package/dist/sdk/models/shared/editcustomer.js +151 -0
- package/dist/sdk/models/shared/editplan.d.ts +10 -0
- package/dist/sdk/models/shared/editplan.js +59 -0
- package/dist/sdk/models/shared/editpriceintervalparams.d.ts +34 -0
- package/dist/sdk/models/shared/editpriceintervalparams.js +78 -0
- package/dist/sdk/models/shared/event.d.ts +11 -4
- package/dist/sdk/models/shared/event.js +14 -3
- package/dist/sdk/models/shared/{credits.d.ts → events.d.ts} +3 -6
- package/dist/sdk/models/shared/{eventsearchresults.js → events.js} +8 -11
- package/dist/sdk/models/shared/expirationchangeledgerentry.d.ts +28 -0
- package/dist/sdk/models/shared/expirationchangeledgerentry.js +129 -0
- package/dist/sdk/models/shared/featurenotavailableerror.d.ts +16 -0
- package/dist/sdk/models/shared/featurenotavailableerror.js +82 -0
- package/dist/sdk/models/shared/fivehundrederror.d.ts +13 -0
- package/dist/sdk/models/shared/fivehundrederror.js +78 -0
- package/dist/sdk/models/shared/fivetranexampleprice.d.ts +241 -0
- package/dist/sdk/models/shared/fivetranexampleprice.js +361 -0
- package/dist/sdk/models/shared/fixedfeequantitychange.d.ts +12 -5
- package/dist/sdk/models/shared/fixedfeequantitychange.js +11 -3
- package/dist/sdk/models/shared/fixedfeequantityscheduleentry.d.ts +7 -0
- package/dist/sdk/models/shared/{fixedfeequantityschedule.js → fixedfeequantityscheduleentry.js} +10 -10
- package/dist/sdk/models/shared/fixedfeequantitytransition.d.ts +6 -0
- package/dist/sdk/models/shared/fixedfeequantitytransition.js +59 -0
- package/dist/sdk/models/shared/fourhundredandoneerror.d.ts +16 -0
- package/dist/sdk/models/shared/fourhundredandoneerror.js +82 -0
- package/dist/sdk/models/shared/fourhundredandtwentynineerror.d.ts +16 -0
- package/dist/sdk/models/shared/fourhundredandtwentynineerror.js +82 -0
- package/dist/sdk/models/shared/groupedsubscriptionusage.d.ts +7 -0
- package/dist/sdk/models/shared/groupedsubscriptionusage.js +54 -0
- package/dist/sdk/models/shared/groupedsubscriptionusagerecord.d.ts +14 -0
- package/dist/sdk/models/shared/groupedsubscriptionusagerecord.js +71 -0
- package/dist/sdk/models/shared/idempotencyconflict.d.ts +16 -0
- package/dist/sdk/models/shared/idempotencyconflict.js +82 -0
- package/dist/sdk/models/shared/idempotencykeyvalidationerror.d.ts +17 -0
- package/dist/sdk/models/shared/idempotencykeyvalidationerror.js +87 -0
- package/dist/sdk/models/shared/idempotencyrequestmismatch.d.ts +16 -0
- package/dist/sdk/models/shared/idempotencyrequestmismatch.js +82 -0
- package/dist/sdk/models/shared/{invoicesettings.d.ts → incrementcreditledgerentryinvoicesettings.d.ts} +2 -2
- package/dist/sdk/models/shared/{invoicesettings.js → incrementcreditledgerentryinvoicesettings.js} +10 -10
- package/dist/sdk/models/shared/incrementledgerentry.d.ts +27 -0
- package/dist/sdk/models/shared/incrementledgerentry.js +120 -0
- package/dist/sdk/models/shared/index.d.ts +143 -54
- package/dist/sdk/models/shared/index.js +143 -54
- package/dist/sdk/models/shared/ingestevent.d.ts +32 -0
- package/dist/sdk/models/shared/ingestevent.js +86 -0
- package/dist/sdk/models/shared/ingestionresponse.d.ts +5 -5
- package/dist/sdk/models/shared/ingestionresponse.js +3 -6
- package/dist/sdk/models/shared/ingestrequestbody.d.ts +5 -0
- package/dist/sdk/models/shared/{tieredbpsconfig1.js → ingestrequestbody.js} +11 -11
- package/dist/sdk/models/shared/invoice.d.ts +46 -182
- package/dist/sdk/models/shared/invoice.js +70 -201
- package/dist/sdk/models/shared/invoicelineitem.d.ts +10 -168
- package/dist/sdk/models/shared/invoicelineitem.js +21 -303
- package/dist/sdk/models/shared/invoicelineitemparams.d.ts +27 -0
- package/dist/sdk/models/shared/invoicelineitemparams.js +90 -0
- package/dist/sdk/models/shared/invoiceminified.d.ts +7 -0
- package/dist/sdk/models/shared/invoiceminified.js +45 -0
- package/dist/sdk/models/shared/invoices.d.ts +2 -5
- package/dist/sdk/models/shared/invoices.js +0 -3
- package/dist/sdk/models/shared/item.d.ts +14 -0
- package/dist/sdk/models/shared/item.js +72 -0
- package/dist/sdk/models/shared/itemexternalconnection.d.ts +16 -0
- package/dist/sdk/models/shared/itemexternalconnection.js +63 -0
- package/dist/sdk/models/shared/items.d.ts +7 -0
- package/dist/sdk/models/shared/{credits.js → items.js} +11 -14
- package/dist/sdk/models/shared/itemslim.d.ts +5 -0
- package/dist/sdk/models/shared/itemslim.js +50 -0
- package/dist/sdk/models/shared/markaspaidrequestparams.d.ts +16 -0
- package/dist/sdk/models/shared/markaspaidrequestparams.js +60 -0
- package/dist/sdk/models/shared/matrixconfig.d.ts +12 -5
- package/dist/sdk/models/shared/matrixconfig.js +5 -3
- package/dist/sdk/models/shared/matrixprice.d.ts +242 -0
- package/dist/sdk/models/shared/matrixprice.js +363 -0
- package/dist/sdk/models/shared/matrixsublineitem.d.ts +17 -0
- package/dist/sdk/models/shared/matrixsublineitem.js +78 -0
- package/dist/sdk/models/shared/matrixvalue.d.ts +8 -1
- package/dist/sdk/models/shared/matrixvalue.js +5 -0
- package/dist/sdk/models/shared/maximum.d.ts +11 -0
- package/dist/sdk/models/shared/{subscriptionusage.js → maximum.js} +14 -14
- package/dist/sdk/models/shared/maximuminterval.d.ts +23 -0
- package/dist/sdk/models/shared/{subscriptioncost.js → maximuminterval.js} +21 -23
- package/dist/sdk/models/shared/metricgroup.d.ts +5 -0
- package/dist/sdk/models/shared/metricgroup.js +50 -0
- package/dist/sdk/models/shared/minimum.d.ts +11 -0
- package/dist/sdk/models/shared/minimum.js +50 -0
- package/dist/sdk/models/shared/minimuminterval.d.ts +23 -0
- package/dist/sdk/models/shared/minimuminterval.js +73 -0
- package/dist/sdk/models/shared/newaccountingsyncconfiguration.d.ts +6 -0
- package/dist/sdk/models/shared/newaccountingsyncconfiguration.js +52 -0
- package/dist/sdk/models/shared/newbackfill.d.ts +1 -1
- package/dist/sdk/models/shared/newbillablemetric.d.ts +28 -0
- package/dist/sdk/models/shared/newbillablemetric.js +77 -0
- package/dist/sdk/models/shared/newbpsprice.d.ts +53 -0
- package/dist/sdk/models/shared/newbpsprice.js +110 -0
- package/dist/sdk/models/shared/newbulkbpsprice.d.ts +53 -0
- package/dist/sdk/models/shared/newbulkbpsprice.js +110 -0
- package/dist/sdk/models/shared/newbulkprice.d.ts +53 -0
- package/dist/sdk/models/shared/newbulkprice.js +110 -0
- package/dist/sdk/models/shared/newcoupon.d.ts +4 -10
- package/dist/sdk/models/shared/newcoupon.js +11 -11
- package/dist/sdk/models/shared/newcustomer.d.ts +20 -154
- package/dist/sdk/models/shared/newcustomer.js +34 -206
- package/dist/sdk/models/shared/newcustomerbalancetransaction.d.ts +13 -0
- package/dist/sdk/models/shared/newcustomerbalancetransaction.js +60 -0
- package/dist/sdk/models/shared/newmatrixprice.d.ts +53 -0
- package/dist/sdk/models/shared/{sublineitem.js → newmatrixprice.js} +51 -43
- package/dist/sdk/models/shared/newpackageprice.d.ts +53 -0
- package/dist/sdk/models/shared/newpackageprice.js +110 -0
- package/dist/sdk/models/shared/newpackagewithallocationprice.d.ts +52 -0
- package/dist/sdk/models/shared/newpackagewithallocationprice.js +108 -0
- package/dist/sdk/models/shared/newplan.d.ts +26 -0
- package/dist/sdk/models/shared/newplan.js +93 -0
- package/dist/sdk/models/shared/newreportingconfiguration.d.ts +4 -0
- package/dist/sdk/models/shared/newreportingconfiguration.js +45 -0
- package/dist/sdk/models/shared/newsubscription.d.ts +18 -43
- package/dist/sdk/models/shared/newsubscription.js +50 -8
- package/dist/sdk/models/shared/newthresholdtotalamountprice.d.ts +52 -0
- package/dist/sdk/models/shared/newthresholdtotalamountprice.js +108 -0
- package/dist/sdk/models/shared/newtieredbpsprice.d.ts +53 -0
- package/dist/sdk/models/shared/newtieredbpsprice.js +110 -0
- package/dist/sdk/models/shared/newtieredpackageprice.d.ts +52 -0
- package/dist/sdk/models/shared/newtieredpackageprice.js +108 -0
- package/dist/sdk/models/shared/newtieredprice.d.ts +53 -0
- package/dist/sdk/models/shared/newtieredprice.js +110 -0
- package/dist/sdk/models/shared/newtieredwithminimumprice.d.ts +52 -0
- package/dist/sdk/models/shared/newtieredwithminimumprice.js +108 -0
- package/dist/sdk/models/shared/newunitprice.d.ts +53 -0
- package/dist/sdk/models/shared/newunitprice.js +110 -0
- package/dist/sdk/models/shared/othersublineitem.d.ts +15 -0
- package/dist/sdk/models/shared/othersublineitem.js +71 -0
- package/dist/sdk/models/shared/overridebpsprice.d.ts +27 -0
- package/dist/sdk/models/shared/{bpspriceoverride.js → overridebpsprice.js} +27 -18
- package/dist/sdk/models/shared/overridebulkbpsprice.d.ts +27 -0
- package/dist/sdk/models/shared/{bulkbpspriceoverride.js → overridebulkbpsprice.js} +27 -18
- package/dist/sdk/models/shared/overridebulkprice.d.ts +27 -0
- package/dist/sdk/models/shared/{bulkpriceoverride.js → overridebulkprice.js} +27 -18
- package/dist/sdk/models/shared/overridefivetranexampleprice.d.ts +26 -0
- package/dist/sdk/models/shared/overridefivetranexampleprice.js +81 -0
- package/dist/sdk/models/shared/overridematrixprice.d.ts +27 -0
- package/dist/sdk/models/shared/overridematrixprice.js +83 -0
- package/dist/sdk/models/shared/overridepackageprice.d.ts +27 -0
- package/dist/sdk/models/shared/{packagepriceoverride.js → overridepackageprice.js} +27 -18
- package/dist/sdk/models/shared/overridepackagewithallocationprice.d.ts +26 -0
- package/dist/sdk/models/shared/overridepackagewithallocationprice.js +81 -0
- package/dist/sdk/models/shared/overridetestratingfunctionprice.d.ts +26 -0
- package/dist/sdk/models/shared/overridetestratingfunctionprice.js +81 -0
- package/dist/sdk/models/shared/overridethresholdtotalamountprice.d.ts +26 -0
- package/dist/sdk/models/shared/overridethresholdtotalamountprice.js +81 -0
- package/dist/sdk/models/shared/overridetieredbpsprice.d.ts +27 -0
- package/dist/sdk/models/shared/{tieredbpspriceoverride.js → overridetieredbpsprice.js} +30 -21
- package/dist/sdk/models/shared/overridetieredpackageprice.d.ts +26 -0
- package/dist/sdk/models/shared/overridetieredpackageprice.js +81 -0
- package/dist/sdk/models/shared/overridetieredprice.d.ts +27 -0
- package/dist/sdk/models/shared/{tieredpriceoverride.js → overridetieredprice.js} +27 -18
- package/dist/sdk/models/shared/overridetieredwithminimumprice.d.ts +26 -0
- package/dist/sdk/models/shared/overridetieredwithminimumprice.js +81 -0
- package/dist/sdk/models/shared/overrideunitprice.d.ts +27 -0
- package/dist/sdk/models/shared/{unitpriceoverride.js → overrideunitprice.js} +27 -18
- package/dist/sdk/models/shared/packageconfig.d.ts +7 -4
- package/dist/sdk/models/shared/packageconfig.js +0 -3
- package/dist/sdk/models/shared/packageprice.d.ts +242 -0
- package/dist/sdk/models/shared/packageprice.js +363 -0
- package/dist/sdk/models/shared/packagewithallocationprice.d.ts +241 -0
- package/dist/sdk/models/shared/packagewithallocationprice.js +361 -0
- package/dist/sdk/models/shared/percentagediscount.d.ts +15 -0
- package/dist/sdk/models/shared/percentagediscount.js +59 -0
- package/dist/sdk/models/shared/percentagediscountcreationparams.d.ts +11 -0
- package/dist/sdk/models/shared/percentagediscountcreationparams.js +54 -0
- package/dist/sdk/models/shared/percentagediscountinterval.d.ts +27 -0
- package/dist/sdk/models/shared/percentagediscountinterval.js +82 -0
- package/dist/sdk/models/shared/perpricecost.d.ts +206 -6
- package/dist/sdk/models/shared/perpricecost.js +6 -6
- package/dist/sdk/models/shared/phaseoverride.d.ts +7 -30
- package/dist/sdk/models/shared/phaseoverride.js +4 -42
- package/dist/sdk/models/shared/{availability.d.ts → pingresponse.d.ts} +1 -4
- package/dist/sdk/models/shared/{availability.js → pingresponse.js} +7 -10
- package/dist/sdk/models/shared/plan.d.ts +29 -62
- package/dist/sdk/models/shared/plan.js +55 -108
- package/dist/sdk/models/shared/planminified.d.ts +6 -2
- package/dist/sdk/models/shared/planminified.js +5 -0
- package/dist/sdk/models/shared/planphase.d.ts +18 -58
- package/dist/sdk/models/shared/planphase.js +30 -86
- package/dist/sdk/models/shared/plans.d.ts +2 -5
- package/dist/sdk/models/shared/plans.js +0 -3
- package/dist/sdk/models/shared/pricegroup.d.ts +2 -2
- package/dist/sdk/models/shared/priceinterval.d.ts +239 -0
- package/dist/sdk/models/shared/priceinterval.js +104 -0
- package/dist/sdk/models/shared/priceintervalfixedfeequantitytransitionparams.d.ts +11 -0
- package/dist/sdk/models/shared/priceintervalfixedfeequantitytransitionparams.js +54 -0
- package/dist/sdk/models/shared/prices.d.ts +6 -0
- package/dist/sdk/models/shared/prices.js +52 -0
- package/dist/sdk/models/shared/reportingconfiguration.d.ts +4 -0
- package/dist/sdk/models/shared/reportingconfiguration.js +45 -0
- package/dist/sdk/models/shared/requesttoolargeerror.d.ts +16 -0
- package/dist/sdk/models/shared/requesttoolargeerror.js +82 -0
- package/dist/sdk/models/shared/requestvalidationerror.d.ts +14 -17
- package/dist/sdk/models/shared/requestvalidationerror.js +29 -7
- package/dist/sdk/models/shared/resourcenotfounderror.d.ts +16 -0
- package/dist/sdk/models/shared/resourcenotfounderror.js +82 -0
- package/dist/sdk/models/shared/resourcetoolargeerror.d.ts +16 -0
- package/dist/sdk/models/shared/resourcetoolargeerror.js +82 -0
- package/dist/sdk/models/shared/sublineitemgrouping.d.ts +8 -0
- package/dist/sdk/models/shared/{grouping.js → sublineitemgrouping.js} +8 -11
- package/dist/sdk/models/shared/sublineitemmatrixconfig.d.ts +7 -0
- package/dist/sdk/models/shared/{matrixconfig1.js → sublineitemmatrixconfig.js} +7 -10
- package/dist/sdk/models/shared/subscription.d.ts +64 -31
- package/dist/sdk/models/shared/subscription.js +61 -42
- package/dist/sdk/models/shared/subscriptioncosts.d.ts +2 -5
- package/dist/sdk/models/shared/subscriptioncosts.js +3 -6
- package/dist/sdk/models/shared/subscriptionminified.d.ts +0 -3
- package/dist/sdk/models/shared/subscriptionminified.js +0 -3
- package/dist/sdk/models/shared/subscriptionplanchange.d.ts +20 -15
- package/dist/sdk/models/shared/subscriptionplanchange.js +37 -15
- package/dist/sdk/models/shared/subscriptions.d.ts +2 -5
- package/dist/sdk/models/shared/subscriptions.js +0 -3
- package/dist/sdk/models/shared/subscriptionscheduleitem.d.ts +3 -3
- package/dist/sdk/models/shared/{subscriptionschedule.d.ts → subscriptionscheduleitems.d.ts} +3 -6
- package/dist/sdk/models/shared/{subscriptionschedule.js → subscriptionscheduleitems.js} +8 -11
- package/dist/sdk/models/shared/subscriptiontrialinfo.d.ts +4 -0
- package/dist/sdk/models/shared/{subscriptioncancellation.js → subscriptiontrialinfo.js} +8 -14
- package/dist/sdk/models/shared/testratingfunctionprice.d.ts +241 -0
- package/dist/sdk/models/shared/testratingfunctionprice.js +361 -0
- package/dist/sdk/models/shared/thresholdtotalamountprice.d.ts +241 -0
- package/dist/sdk/models/shared/thresholdtotalamountprice.js +361 -0
- package/dist/sdk/models/shared/tier.d.ts +11 -2
- package/dist/sdk/models/shared/tier.js +2 -2
- package/dist/sdk/models/shared/tierconfig.d.ts +2 -5
- package/dist/sdk/models/shared/tierconfig.js +2 -5
- package/dist/sdk/models/shared/tieredbpsconfig.d.ts +4 -4
- package/dist/sdk/models/shared/tieredbpsconfig.js +0 -3
- package/dist/sdk/models/shared/tieredbpsprice.d.ts +242 -0
- package/dist/sdk/models/shared/tieredbpsprice.js +363 -0
- package/dist/sdk/models/shared/tieredconfig.d.ts +4 -4
- package/dist/sdk/models/shared/tieredconfig.js +0 -3
- package/dist/sdk/models/shared/tieredpackageprice.d.ts +241 -0
- package/dist/sdk/models/shared/tieredpackageprice.js +361 -0
- package/dist/sdk/models/shared/tieredprice.d.ts +242 -0
- package/dist/sdk/models/shared/tieredprice.js +363 -0
- package/dist/sdk/models/shared/tieredwithminimumprice.d.ts +241 -0
- package/dist/sdk/models/shared/tieredwithminimumprice.js +361 -0
- package/dist/sdk/models/shared/tiersublineitem.d.ts +17 -0
- package/dist/sdk/models/shared/{sublineitem1.js → tiersublineitem.js} +21 -18
- package/dist/sdk/models/shared/trialconfig.d.ts +1 -1
- package/dist/sdk/models/shared/trialdiscount.d.ts +19 -0
- package/dist/sdk/models/shared/trialdiscount.js +64 -0
- package/dist/sdk/models/shared/triggersubscriptionphaseparams.d.ts +8 -0
- package/dist/sdk/models/shared/triggersubscriptionphaseparams.js +50 -0
- package/dist/sdk/models/shared/ungroupedsubscriptionusage.d.ts +5 -0
- package/dist/sdk/models/shared/ungroupedsubscriptionusage.js +47 -0
- package/dist/sdk/models/shared/ungroupedsubscriptionusagerecord.d.ts +12 -0
- package/dist/sdk/models/shared/ungroupedsubscriptionusagerecord.js +64 -0
- package/dist/sdk/models/shared/unitconfig.d.ts +8 -4
- package/dist/sdk/models/shared/unitconfig.js +5 -3
- package/dist/sdk/models/shared/unitprice.d.ts +242 -0
- package/dist/sdk/models/shared/unitprice.js +363 -0
- package/dist/sdk/models/shared/unschedulefixedfeequantitychangeparams.d.ts +7 -0
- package/dist/sdk/models/shared/unschedulefixedfeequantitychangeparams.js +45 -0
- package/dist/sdk/models/shared/upcominginvoice.d.ts +89 -54
- package/dist/sdk/models/shared/upcominginvoice.js +216 -88
- package/dist/sdk/models/shared/updateevent.d.ts +1 -1
- package/dist/sdk/models/shared/updateevent.js +5 -1
- package/dist/sdk/models/shared/urlnotfound.d.ts +16 -0
- package/dist/sdk/models/shared/urlnotfound.js +82 -0
- package/dist/sdk/models/shared/usage.d.ts +3 -10
- package/dist/sdk/models/shared/usage.js +18 -24
- package/dist/sdk/models/shared/usagediscount.d.ts +15 -0
- package/dist/sdk/models/shared/{tier7.js → usagediscount.js} +18 -19
- package/dist/sdk/models/shared/usagediscountcreationparams.d.ts +11 -0
- package/dist/sdk/models/shared/usagediscountcreationparams.js +54 -0
- package/dist/sdk/models/shared/usagediscountinterval.d.ts +27 -0
- package/dist/sdk/models/shared/usagediscountinterval.js +82 -0
- package/dist/sdk/models/shared/validationerror.d.ts +11 -0
- package/dist/sdk/models/shared/validationerror.js +50 -0
- package/dist/sdk/models/shared/voidinitiatedledgerentry.d.ts +30 -0
- package/dist/sdk/models/shared/voidinitiatedledgerentry.js +139 -0
- package/dist/sdk/models/shared/voidledgerentry.d.ts +29 -0
- package/dist/sdk/models/shared/voidledgerentry.js +130 -0
- package/dist/sdk/plan.d.ts +54 -186
- package/dist/sdk/plan.js +656 -202
- package/dist/sdk/price.d.ts +246 -0
- package/dist/sdk/price.js +790 -0
- package/dist/sdk/priceinterval.d.ts +65 -0
- package/dist/sdk/priceinterval.js +281 -0
- package/dist/sdk/sdk.d.ts +149 -58
- package/dist/sdk/sdk.js +23 -40
- package/dist/sdk/subscription.d.ts +435 -280
- package/dist/sdk/subscription.js +1516 -350
- package/docs/models/operations/addeditpriceintervalsrequest.md +9 -0
- package/docs/models/operations/addeditpriceintervalsresponse.md +18 -0
- package/docs/models/operations/amendeventrequest.md +9 -0
- package/docs/models/operations/amendeventresponse.md +18 -0
- package/docs/models/operations/amendusageexternalcustomeridrequest.md +11 -0
- package/docs/models/operations/amendusageexternalcustomeridresponse.md +18 -0
- package/docs/models/operations/amendusagerequest.md +11 -0
- package/docs/models/operations/amendusageresponse.md +18 -0
- package/docs/models/operations/archivecouponrequest.md +8 -0
- package/docs/models/operations/archivecouponresponse.md +18 -0
- package/docs/models/operations/cancelsubscriptionrequest.md +9 -0
- package/docs/models/operations/cancelsubscriptionresponse.md +18 -0
- package/docs/models/operations/closebackfillrequest.md +8 -0
- package/docs/models/operations/closebackfillresponse.md +18 -0
- package/docs/models/operations/createbackfillresponse.md +18 -0
- package/docs/models/operations/createcouponresponse.md +18 -0
- package/docs/models/operations/createcustomerbalancetransactionrequest.md +9 -0
- package/docs/models/operations/createcustomerbalancetransactionresponse.md +18 -0
- package/docs/models/operations/createcustomerresponse.md +18 -0
- package/docs/models/operations/createinvoicelineitemresponse.md +18 -0
- package/docs/models/operations/createinvoiceresponse.md +18 -0
- package/docs/models/operations/createledgerentryexternalidrequest.md +9 -0
- package/docs/models/operations/createledgerentryexternalidresponse.md +18 -0
- package/docs/models/operations/createledgerentryrequest.md +9 -0
- package/docs/models/operations/createledgerentryresponse.md +18 -0
- package/docs/models/operations/createmetricresponse.md +18 -0
- package/docs/models/operations/createplanresponse.md +18 -0
- package/docs/models/operations/createpriceresponse.md +18 -0
- package/docs/models/operations/createsubscriptionresponse.md +18 -0
- package/docs/models/operations/deletecustomerrequest.md +8 -0
- package/docs/models/operations/deletecustomerresponse.md +18 -0
- package/docs/models/operations/deprecateeventrequest.md +8 -0
- package/docs/models/operations/deprecateeventresponse.md +18 -0
- package/docs/models/operations/fetchbackfillrequest.md +8 -0
- package/docs/models/operations/fetchbackfillresponse.md +18 -0
- package/docs/models/operations/fetchcouponrequest.md +8 -0
- package/docs/models/operations/fetchcouponresponse.md +18 -0
- package/docs/models/operations/fetchcreditnoterequest.md +8 -0
- package/docs/models/operations/fetchcreditnoteresponse.md +18 -0
- package/docs/models/operations/fetchcustomercostsexternalidrequest.md +12 -0
- package/docs/models/operations/fetchcustomercostsexternalidresponse.md +18 -0
- package/docs/models/operations/fetchcustomercostsexternalidviewmodeviewmode.md +11 -0
- package/docs/models/operations/fetchcustomercostsrequest.md +12 -0
- package/docs/models/operations/fetchcustomercostsresponse.md +18 -0
- package/docs/models/operations/fetchcustomercostsviewmodeviewmode.md +11 -0
- package/docs/models/operations/fetchcustomercreditsexternalidrequest.md +10 -0
- package/docs/models/operations/fetchcustomercreditsexternalidresponse.md +18 -0
- package/docs/models/operations/fetchcustomercreditsledgerentrystatusentrystatus.md +9 -0
- package/docs/models/operations/fetchcustomercreditsledgerentrytypeentrytype.md +14 -0
- package/docs/models/operations/fetchcustomercreditsledgerexternalidentrystatusentrystatus.md +9 -0
- package/docs/models/operations/fetchcustomercreditsledgerexternalidentrytypeentrytype.md +14 -0
- package/docs/models/operations/fetchcustomercreditsledgerexternalidrequest.md +18 -0
- package/docs/models/operations/fetchcustomercreditsledgerexternalidresponse.md +18 -0
- package/docs/models/operations/fetchcustomercreditsledgerrequest.md +18 -0
- package/docs/models/operations/fetchcustomercreditsledgerresponse.md +18 -0
- package/docs/models/operations/fetchcustomercreditsrequest.md +10 -0
- package/docs/models/operations/fetchcustomercreditsresponse.md +18 -0
- package/docs/models/operations/fetchcustomerexternalidrequest.md +8 -0
- package/docs/models/operations/fetchcustomerexternalidresponse.md +18 -0
- package/docs/models/operations/fetchcustomerrequest.md +8 -0
- package/docs/models/operations/fetchcustomerresponse.md +18 -0
- package/docs/models/operations/fetchinvoicerequest.md +8 -0
- package/docs/models/operations/fetchinvoiceresponse.md +18 -0
- package/docs/models/operations/fetchitemrequest.md +8 -0
- package/docs/models/operations/fetchitemresponse.md +18 -0
- package/docs/models/operations/fetchmetricrequest.md +8 -0
- package/docs/models/operations/fetchmetricresponse.md +18 -0
- package/docs/models/operations/fetchplanexternalidrequest.md +8 -0
- package/docs/models/operations/fetchplanexternalidresponse.md +18 -0
- package/docs/models/operations/fetchplanrequest.md +8 -0
- package/docs/models/operations/fetchplanresponse.md +18 -0
- package/docs/models/operations/fetchpriceexternalidrequest.md +8 -0
- package/docs/models/operations/fetchpriceexternalidresponse.md +18 -0
- package/docs/models/operations/fetchpricerequest.md +8 -0
- package/docs/models/operations/fetchpriceresponse.md +18 -0
- package/docs/models/operations/fetchsubscriptioncostsrequest.md +12 -0
- package/docs/models/operations/fetchsubscriptioncostsresponse.md +18 -0
- package/docs/models/operations/fetchsubscriptioncostsviewmodeviewmode.md +11 -0
- package/docs/models/operations/fetchsubscriptionrequest.md +8 -0
- package/docs/models/operations/fetchsubscriptionresponse.md +18 -0
- package/docs/models/operations/fetchsubscriptionschedulerequest.md +14 -0
- package/docs/models/operations/fetchsubscriptionscheduleresponse.md +18 -0
- package/docs/models/operations/fetchsubscriptionusagegranularitygranularity.md +10 -0
- package/docs/models/operations/fetchsubscriptionusagerequest.md +20 -0
- package/docs/models/operations/fetchsubscriptionusageresponse.md +18 -0
- package/docs/models/operations/fetchsubscriptionusageviewmodeviewmode.md +11 -0
- package/docs/models/operations/fetchupcominginvoicerequest.md +8 -0
- package/docs/models/operations/fetchupcominginvoiceresponse.md +18 -0
- package/docs/models/operations/ingestrequest.md +10 -0
- package/docs/models/operations/ingestresponse.md +18 -0
- package/docs/models/operations/issueinvoicerequest.md +8 -0
- package/docs/models/operations/issueinvoiceresponse.md +18 -0
- package/docs/models/operations/listbackfillsrequest.md +9 -0
- package/docs/models/operations/listbackfillsresponse.md +18 -0
- package/docs/models/operations/listbalancetransactionsrequest.md +14 -0
- package/docs/models/operations/listbalancetransactionsresponse.md +18 -0
- package/docs/models/operations/listcouponsrequest.md +11 -0
- package/docs/models/operations/listcouponsresponse.md +18 -0
- package/docs/models/operations/listcouponsubscriptionsrequest.md +10 -0
- package/docs/models/operations/listcouponsubscriptionsresponse.md +18 -0
- package/docs/models/operations/listcreditnotesrequest.md +9 -0
- package/docs/models/operations/listcreditnotesresponse.md +18 -0
- package/docs/models/operations/listcustomersrequest.md +13 -0
- package/docs/models/operations/listcustomersresponse.md +18 -0
- package/docs/models/operations/listinvoicesdatetypedatetype.md +9 -0
- package/docs/models/operations/listinvoicesrequest.md +27 -0
- package/docs/models/operations/listinvoicesresponse.md +18 -0
- package/docs/models/operations/listinvoicesstatus.md +12 -0
- package/docs/models/operations/listinvoicesstatusstatus.md +12 -0
- package/docs/models/operations/listitemsrequest.md +9 -0
- package/docs/models/operations/listitemsresponse.md +18 -0
- package/docs/models/operations/listmetricsrequest.md +13 -0
- package/docs/models/operations/listmetricsresponse.md +18 -0
- package/docs/models/operations/listplansrequest.md +14 -0
- package/docs/models/operations/listplansresponse.md +18 -0
- package/docs/models/operations/listplansstatusstatus.md +12 -0
- package/docs/models/operations/listpricesrequest.md +9 -0
- package/docs/models/operations/listpricesresponse.md +18 -0
- package/docs/models/operations/listsubscriptionsrequest.md +16 -0
- package/docs/models/operations/listsubscriptionsresponse.md +18 -0
- package/docs/models/operations/listsubscriptionsstatusstatus.md +10 -0
- package/docs/models/operations/markinvoiceaspaidrequest.md +9 -0
- package/docs/models/operations/markinvoiceaspaidresponse.md +18 -0
- package/docs/models/operations/pingresponse.md +18 -0
- package/docs/models/operations/revertbackfillrequest.md +8 -0
- package/docs/models/operations/revertbackfillresponse.md +18 -0
- package/docs/models/operations/scheduleplanchangerequest.md +9 -0
- package/docs/models/operations/scheduleplanchangeresponse.md +18 -0
- package/docs/models/operations/searcheventsrequest.md +14 -0
- package/docs/models/operations/searcheventsresponse.md +18 -0
- package/docs/models/operations/triggerphaserequest.md +9 -0
- package/docs/models/operations/triggerphaseresponse.md +18 -0
- package/docs/models/operations/unschedulecancellationrequest.md +8 -0
- package/docs/models/operations/unschedulecancellationresponse.md +18 -0
- package/docs/models/operations/unschedulefixedfeequantityrequest.md +9 -0
- package/docs/models/operations/unschedulefixedfeequantityresponse.md +18 -0
- package/docs/models/operations/unscheduleplanchangerequest.md +8 -0
- package/docs/models/operations/unscheduleplanchangeresponse.md +18 -0
- package/docs/models/operations/updatecustomerexternalidrequest.md +9 -0
- package/docs/models/operations/updatecustomerexternalidresponse.md +18 -0
- package/docs/models/operations/updatecustomerrequest.md +9 -0
- package/docs/models/operations/updatecustomerresponse.md +18 -0
- package/docs/models/operations/updatefixedfeequantityrequest.md +9 -0
- package/docs/models/operations/updatefixedfeequantityresponse.md +18 -0
- package/docs/models/operations/updateplanexternalrequest.md +9 -0
- package/docs/models/operations/updateplanexternalresponse.md +18 -0
- package/docs/models/operations/updateplanrequest.md +9 -0
- package/docs/models/operations/updateplanresponse.md +18 -0
- package/docs/models/operations/voidinvoicerequest.md +8 -0
- package/docs/models/operations/voidinvoiceresponse.md +18 -0
- package/docs/models/shared/accountingprovider.md +9 -0
- package/docs/models/shared/accountingproviderconfig.md +9 -0
- package/docs/models/shared/accountingproviderprovidertype.md +9 -0
- package/docs/models/shared/accountingsyncconfiguration.md +9 -0
- package/docs/models/shared/adddecrementcreditledgerentryrequestparams.md +11 -0
- package/docs/models/shared/adddecrementcreditledgerentryrequestparamsentrytype.md +8 -0
- package/docs/models/shared/adddecrementcreditledgerentryrequestparamsmetadata.md +9 -0
- package/docs/models/shared/addeditpriceintervalparams.md +9 -0
- package/docs/models/shared/addexpirationchangecreditledgerentryrequestparams.md +14 -0
- package/docs/models/shared/addexpirationchangecreditledgerentryrequestparamsentrytype.md +8 -0
- package/docs/models/shared/addexpirationchangecreditledgerentryrequestparamsmetadata.md +9 -0
- package/docs/models/shared/addincrementcreditledgerentryrequestparams.md +15 -0
- package/docs/models/shared/addincrementcreditledgerentryrequestparamsentrytype.md +8 -0
- package/docs/models/shared/addincrementcreditledgerentryrequestparamsmetadata.md +9 -0
- package/docs/models/shared/addpriceintervalparams.md +16 -0
- package/docs/models/shared/addpriceintervalparamsenddateenddate.md +11 -0
- package/docs/models/shared/addpriceintervalparamsstartdatestartdate.md +11 -0
- package/docs/models/shared/address.md +13 -0
- package/docs/models/shared/addressinput.md +13 -0
- package/docs/models/shared/addvoidcreditledgerentryrequestparams.md +12 -0
- package/docs/models/shared/addvoidcreditledgerentryrequestparamsentrytype.md +8 -0
- package/docs/models/shared/addvoidcreditledgerentryrequestparamsmetadata.md +9 -0
- package/docs/models/shared/addvoidcreditledgerentryrequestparamsvoidreason.md +10 -0
- package/docs/models/shared/affectedblock.md +10 -0
- package/docs/models/shared/aggregatedcost.md +12 -0
- package/docs/models/shared/amendedevent.md +12 -0
- package/docs/models/shared/amendedeventproperties.md +9 -0
- package/docs/models/shared/amendedusage.md +9 -0
- package/docs/models/shared/amendeventresult.md +8 -0
- package/docs/models/shared/amendmentledgerentry.md +21 -0
- package/docs/models/shared/amendmentledgerentryentrystatus.md +9 -0
- package/docs/models/shared/amendmentledgerentryentrytype.md +8 -0
- package/docs/models/shared/amountdiscount.md +10 -0
- package/docs/models/shared/amountdiscountcreationparams.md +9 -0
- package/docs/models/shared/amountdiscountcreationparamsdiscounttype.md +8 -0
- package/docs/models/shared/amountdiscountdiscounttype.md +8 -0
- package/docs/models/shared/amountdiscountinterval.md +13 -0
- package/docs/models/shared/amountdiscountintervaldiscounttype.md +8 -0
- package/docs/models/shared/autocollection.md +10 -0
- package/docs/models/shared/backfill.md +17 -0
- package/docs/models/shared/backfills.md +9 -0
- package/docs/models/shared/backfillstatus.md +13 -0
- package/docs/models/shared/billablemetric.md +16 -0
- package/docs/models/shared/billablemetrics.md +9 -0
- package/docs/models/shared/billablemetricsimple.md +9 -0
- package/docs/models/shared/billablemetricstatus.md +10 -0
- package/docs/models/shared/billablemetrictiny.md +8 -0
- package/docs/models/shared/billingcyclealignment.md +12 -0
- package/docs/models/shared/bpsconfig.md +9 -0
- package/docs/models/shared/bpsprice.md +225 -0
- package/docs/models/shared/bpspricecadence.md +11 -0
- package/docs/models/shared/bpspricemodeltype.md +8 -0
- package/docs/models/shared/bpspricepricetype.md +9 -0
- package/docs/models/shared/bpstier.md +11 -0
- package/docs/models/shared/bulkbpsconfig.md +8 -0
- package/docs/models/shared/bulkbpsprice.md +225 -0
- package/docs/models/shared/bulkbpspricecadence.md +11 -0
- package/docs/models/shared/bulkbpspricemodeltype.md +8 -0
- package/docs/models/shared/bulkbpspricepricetype.md +9 -0
- package/docs/models/shared/bulkbpstier.md +10 -0
- package/docs/models/shared/bulkconfig.md +8 -0
- package/docs/models/shared/bulkprice.md +225 -0
- package/docs/models/shared/bulkpricecadence.md +11 -0
- package/docs/models/shared/bulkpricemodeltype.md +8 -0
- package/docs/models/shared/bulkpricepricetype.md +9 -0
- package/docs/models/shared/bulktier.md +9 -0
- package/docs/models/shared/cancelsubscriptionparams.md +9 -0
- package/docs/models/shared/cancelsubscriptionparamscanceloption.md +12 -0
- package/docs/models/shared/changeoption.md +10 -0
- package/docs/models/shared/coupon.md +21 -0
- package/docs/models/shared/coupondiscount.md +7 -0
- package/docs/models/shared/couponredemption.md +10 -0
- package/docs/models/shared/coupons.md +9 -0
- package/docs/models/shared/createinvoicelineitemparams.md +13 -0
- package/docs/models/shared/createoneoffinvoiceparams.md +15 -0
- package/docs/models/shared/creditblockexpiryledgerentry.md +21 -0
- package/docs/models/shared/creditblockexpiryledgerentryentrystatus.md +9 -0
- package/docs/models/shared/creditblockexpiryledgerentryentrytype.md +8 -0
- package/docs/models/shared/creditledgerentries.md +9 -0
- package/docs/models/shared/creditnote.md +26 -0
- package/docs/models/shared/creditnotediscounts.md +7 -0
- package/docs/models/shared/creditnotelineitem.md +15 -0
- package/docs/models/shared/creditnotelineitemdiscounts.md +7 -0
- package/docs/models/shared/creditnotelineitemtaxamounts.md +7 -0
- package/docs/models/shared/creditnotemaximumamountadjustment.md +9 -0
- package/docs/models/shared/creditnoteminified.md +8 -0
- package/docs/models/shared/creditnotereason.md +11 -0
- package/docs/models/shared/creditnotes.md +9 -0
- package/docs/models/shared/creditnotesublineitem.md +10 -0
- package/docs/models/shared/creditnotesummary.md +13 -0
- package/docs/models/shared/creditnotetype.md +9 -0
- package/docs/models/shared/customer.md +42 -0
- package/docs/models/shared/customerbalancetransaction.md +17 -0
- package/docs/models/shared/customerbalancetransactionaction.md +10 -0
- package/docs/models/shared/customerbalancetransactions.md +9 -0
- package/docs/models/shared/customerbalancetransactiontype.md +9 -0
- package/docs/models/shared/customercosts.md +8 -0
- package/docs/models/shared/customercreditbalance.md +11 -0
- package/docs/models/shared/customercreditbalances.md +9 -0
- package/docs/models/shared/customerminified.md +9 -0
- package/docs/models/shared/customerpaymentprovider.md +14 -0
- package/docs/models/shared/customers.md +9 -0
- package/docs/models/shared/customertaxid.md +10 -0
- package/docs/models/shared/debug.md +11 -0
- package/docs/models/shared/decrementledgerentry.md +24 -0
- package/docs/models/shared/decrementledgerentryentrystatus.md +9 -0
- package/docs/models/shared/decrementledgerentryentrytype.md +8 -0
- package/docs/models/shared/deletecustomerresponse.md +7 -0
- package/docs/models/shared/deprecatedeventresult.md +8 -0
- package/docs/models/shared/discount.md +15 -0
- package/docs/models/shared/discountdiscounttype.md +11 -0
- package/docs/models/shared/duplicateconstraintviolationerror.md +12 -0
- package/docs/models/shared/duplicateconstraintviolationerrorheaders.md +7 -0
- package/docs/models/shared/duplicateconstraintviolationerrorstatus.md +8 -0
- package/docs/models/shared/duplicateconstraintviolationerrortype.md +8 -0
- package/docs/models/shared/duplicateresourcecreationerror.md +12 -0
- package/docs/models/shared/duplicateresourcecreationerrorheaders.md +7 -0
- package/docs/models/shared/duplicateresourcecreationerrorstatus.md +8 -0
- package/docs/models/shared/duplicateresourcecreationerrortype.md +8 -0
- package/docs/models/shared/editcustomer.md +22 -0
- package/docs/models/shared/editcustomermetadata.md +9 -0
- package/docs/models/shared/editcustomerpaymentprovider.md +16 -0
- package/docs/models/shared/editplan.md +9 -0
- package/docs/models/shared/editplanmetadata.md +7 -0
- package/docs/models/shared/editpriceintervalparams.md +11 -0
- package/docs/models/shared/editpriceintervalparamsenddateenddate.md +11 -0
- package/docs/models/shared/editpriceintervalparamsstartdatestartdate.md +11 -0
- package/docs/models/shared/event.md +17 -0
- package/docs/models/shared/eventproperties.md +9 -0
- package/docs/models/shared/events.md +9 -0
- package/docs/models/shared/eventsearchcriteria.md +9 -0
- package/docs/models/shared/expirationchangeledgerentry.md +22 -0
- package/docs/models/shared/expirationchangeledgerentryentrystatus.md +9 -0
- package/docs/models/shared/expirationchangeledgerentryentrytype.md +8 -0
- package/docs/models/shared/featurenotavailableerror.md +12 -0
- package/docs/models/shared/featurenotavailableerrorheaders.md +7 -0
- package/docs/models/shared/featurenotavailableerrorstatus.md +8 -0
- package/docs/models/shared/featurenotavailableerrortype.md +8 -0
- package/docs/models/shared/fivehundrederror.md +12 -0
- package/docs/models/shared/fivehundrederrorheaders.md +7 -0
- package/docs/models/shared/fivehundrederrortype.md +8 -0
- package/docs/models/shared/fivetranexampleprice.md +225 -0
- package/docs/models/shared/fivetranexamplepricecadence.md +11 -0
- package/docs/models/shared/fivetranexamplepricemodeltype.md +8 -0
- package/docs/models/shared/fivetranexamplepricepricetype.md +9 -0
- package/docs/models/shared/fixedfeequantitychange.md +11 -0
- package/docs/models/shared/fixedfeequantitychangechangeoption.md +12 -0
- package/docs/models/shared/fixedfeequantityscheduleentry.md +11 -0
- package/docs/models/shared/fixedfeequantitytransition.md +10 -0
- package/docs/models/shared/fourhundredandoneerror.md +12 -0
- package/docs/models/shared/fourhundredandoneerrorheaders.md +7 -0
- package/docs/models/shared/fourhundredandoneerrorstatus.md +8 -0
- package/docs/models/shared/fourhundredandoneerrortype.md +8 -0
- package/docs/models/shared/fourhundredandtwentynineerror.md +12 -0
- package/docs/models/shared/fourhundredandtwentynineerrorheaders.md +7 -0
- package/docs/models/shared/fourhundredandtwentynineerrorstatus.md +8 -0
- package/docs/models/shared/fourhundredandtwentynineerrortype.md +8 -0
- package/docs/models/shared/groupedsubscriptionusage.md +9 -0
- package/docs/models/shared/groupedsubscriptionusagerecord.md +11 -0
- package/docs/models/shared/groupedsubscriptionusagerecordviewmode.md +9 -0
- package/docs/models/shared/idempotencyconflict.md +12 -0
- package/docs/models/shared/idempotencyconflictheaders.md +7 -0
- package/docs/models/shared/idempotencyconflictstatus.md +8 -0
- package/docs/models/shared/idempotencyconflicttype.md +8 -0
- package/docs/models/shared/idempotencykeyvalidationerror.md +13 -0
- package/docs/models/shared/idempotencykeyvalidationerrorheaders.md +7 -0
- package/docs/models/shared/idempotencykeyvalidationerrorstatus.md +8 -0
- package/docs/models/shared/idempotencykeyvalidationerrortype.md +8 -0
- package/docs/models/shared/idempotencyrequestmismatch.md +12 -0
- package/docs/models/shared/idempotencyrequestmismatchheaders.md +7 -0
- package/docs/models/shared/idempotencyrequestmismatchstatus.md +8 -0
- package/docs/models/shared/idempotencyrequestmismatchtype.md +8 -0
- package/docs/models/shared/incrementcreditledgerentryinvoicesettings.md +12 -0
- package/docs/models/shared/incrementledgerentry.md +21 -0
- package/docs/models/shared/incrementledgerentryentrystatus.md +9 -0
- package/docs/models/shared/incrementledgerentryentrytype.md +8 -0
- package/docs/models/shared/ingestevent.md +13 -0
- package/docs/models/shared/ingesteventproperties.md +9 -0
- package/docs/models/shared/ingestionresponse.md +9 -0
- package/docs/models/shared/ingestrequestbody.md +8 -0
- package/docs/models/shared/invoice.md +51 -0
- package/docs/models/shared/invoicelineitem.md +23 -0
- package/docs/models/shared/invoicelineitemparams.md +14 -0
- package/docs/models/shared/invoicelineitemparamsmodeltype.md +8 -0
- package/docs/models/shared/invoicemetadata.md +7 -0
- package/docs/models/shared/invoiceminified.md +8 -0
- package/docs/models/shared/invoices.md +9 -0
- package/docs/models/shared/invoicestatus.md +12 -0
- package/docs/models/shared/item.md +14 -0
- package/docs/models/shared/itemexternalconnection.md +9 -0
- package/docs/models/shared/itemexternalconnectionexternalconnectionnameexternalconnectionname.md +11 -0
- package/docs/models/shared/itemexternalconnectionexternalconnectionnameexternalconnectionname1.md +10 -0
- package/docs/models/shared/items.md +9 -0
- package/docs/models/shared/itemslim.md +9 -0
- package/docs/models/shared/markaspaidrequestparams.md +10 -0
- package/docs/models/shared/matrixconfig.md +11 -0
- package/docs/models/shared/matrixprice.md +225 -0
- package/docs/models/shared/matrixpricecadence.md +11 -0
- package/docs/models/shared/matrixpricemodeltype.md +8 -0
- package/docs/models/shared/matrixpricepricetype.md +9 -0
- package/docs/models/shared/matrixsublineitem.md +13 -0
- package/docs/models/shared/matrixsublineitemtype.md +8 -0
- package/docs/models/shared/matrixvalue.md +10 -0
- package/docs/models/shared/maximum.md +9 -0
- package/docs/models/shared/maximuminterval.md +12 -0
- package/docs/models/shared/metricgroup.md +9 -0
- package/docs/models/shared/minimum.md +9 -0
- package/docs/models/shared/minimuminterval.md +12 -0
- package/docs/models/shared/newaccountingsyncconfiguration.md +9 -0
- package/docs/models/shared/newbackfill.md +13 -0
- package/docs/models/shared/newbillablemetric.md +12 -0
- package/docs/models/shared/newbillablemetricmetadata.md +9 -0
- package/docs/models/shared/newbpsprice.md +18 -0
- package/docs/models/shared/newbpspricecadence.md +12 -0
- package/docs/models/shared/newbpspricemodeltype.md +8 -0
- package/docs/models/shared/newbulkbpsprice.md +18 -0
- package/docs/models/shared/newbulkbpspricecadence.md +12 -0
- package/docs/models/shared/newbulkbpspricemodeltype.md +8 -0
- package/docs/models/shared/newbulkprice.md +18 -0
- package/docs/models/shared/newbulkpricecadence.md +12 -0
- package/docs/models/shared/newbulkpricemodeltype.md +8 -0
- package/docs/models/shared/newcoupon.md +11 -0
- package/docs/models/shared/newcoupondiscount.md +7 -0
- package/docs/models/shared/newcustomer.md +23 -0
- package/docs/models/shared/newcustomerbalancetransaction.md +10 -0
- package/docs/models/shared/newcustomerbalancetransactiontype.md +9 -0
- package/docs/models/shared/newcustomermetadata.md +9 -0
- package/docs/models/shared/newcustomerpaymentprovider.md +14 -0
- package/docs/models/shared/newmatrixprice.md +18 -0
- package/docs/models/shared/newmatrixpricecadence.md +12 -0
- package/docs/models/shared/newmatrixpricemodeltype.md +8 -0
- package/docs/models/shared/newpackageprice.md +18 -0
- package/docs/models/shared/newpackagepricecadence.md +12 -0
- package/docs/models/shared/newpackagepricemodeltype.md +8 -0
- package/docs/models/shared/newpackagewithallocationprice.md +18 -0
- package/docs/models/shared/newpackagewithallocationpricecadence.md +12 -0
- package/docs/models/shared/newpackagewithallocationpricemodeltype.md +8 -0
- package/docs/models/shared/newplan.md +14 -0
- package/docs/models/shared/newplanmetadata.md +7 -0
- package/docs/models/shared/newplanprices.md +7 -0
- package/docs/models/shared/newreportingconfiguration.md +8 -0
- package/docs/models/shared/newsubscription.md +31 -0
- package/docs/models/shared/newsubscriptionexternalmarketplace.md +10 -0
- package/docs/models/shared/newsubscriptionmetadata.md +7 -0
- package/docs/models/shared/newthresholdtotalamountprice.md +18 -0
- package/docs/models/shared/newthresholdtotalamountpricecadence.md +12 -0
- package/docs/models/shared/newthresholdtotalamountpricemodeltype.md +8 -0
- package/docs/models/shared/newtieredbpsprice.md +18 -0
- package/docs/models/shared/newtieredbpspricecadence.md +12 -0
- package/docs/models/shared/newtieredbpspricemodeltype.md +8 -0
- package/docs/models/shared/newtieredpackageprice.md +18 -0
- package/docs/models/shared/newtieredpackagepricecadence.md +12 -0
- package/docs/models/shared/newtieredpackagepricemodeltype.md +8 -0
- package/docs/models/shared/newtieredprice.md +18 -0
- package/docs/models/shared/newtieredpricecadence.md +12 -0
- package/docs/models/shared/newtieredpricemodeltype.md +8 -0
- package/docs/models/shared/newtieredwithminimumprice.md +18 -0
- package/docs/models/shared/newtieredwithminimumpricecadence.md +12 -0
- package/docs/models/shared/newtieredwithminimumpricemodeltype.md +8 -0
- package/docs/models/shared/newunitprice.md +18 -0
- package/docs/models/shared/newunitpricecadence.md +12 -0
- package/docs/models/shared/newunitpricemodeltype.md +8 -0
- package/docs/models/shared/othersublineitem.md +12 -0
- package/docs/models/shared/othersublineitemtype.md +8 -0
- package/docs/models/shared/overridebpsprice.md +14 -0
- package/docs/models/shared/overridebpspricemodeltype.md +8 -0
- package/docs/models/shared/overridebulkbpsprice.md +14 -0
- package/docs/models/shared/overridebulkbpspricemodeltype.md +8 -0
- package/docs/models/shared/overridebulkprice.md +14 -0
- package/docs/models/shared/overridebulkpricemodeltype.md +8 -0
- package/docs/models/shared/overridefivetranexampleprice.md +14 -0
- package/docs/models/shared/overridefivetranexamplepricemodeltype.md +8 -0
- package/docs/models/shared/overridematrixprice.md +14 -0
- package/docs/models/shared/overridematrixpricemodeltype.md +8 -0
- package/docs/models/shared/overridepackageprice.md +14 -0
- package/docs/models/shared/overridepackagepricemodeltype.md +8 -0
- package/docs/models/shared/overridepackagewithallocationprice.md +14 -0
- package/docs/models/shared/overridepackagewithallocationpricemodeltype.md +8 -0
- package/docs/models/shared/overridetestratingfunctionprice.md +14 -0
- package/docs/models/shared/overridetestratingfunctionpricemodeltype.md +8 -0
- package/docs/models/shared/overridethresholdtotalamountprice.md +14 -0
- package/docs/models/shared/overridethresholdtotalamountpricemodeltype.md +8 -0
- package/docs/models/shared/overridetieredbpsprice.md +14 -0
- package/docs/models/shared/overridetieredbpspricemodeltype.md +8 -0
- package/docs/models/shared/overridetieredpackageprice.md +14 -0
- package/docs/models/shared/overridetieredpackagepricemodeltype.md +8 -0
- package/docs/models/shared/overridetieredprice.md +14 -0
- package/docs/models/shared/overridetieredpricemodeltype.md +8 -0
- package/docs/models/shared/overridetieredwithminimumprice.md +14 -0
- package/docs/models/shared/overridetieredwithminimumpricemodeltype.md +8 -0
- package/docs/models/shared/overrideunitprice.md +14 -0
- package/docs/models/shared/overrideunitpricemodeltype.md +8 -0
- package/docs/models/shared/packageconfig.md +9 -0
- package/docs/models/shared/packageprice.md +225 -0
- package/docs/models/shared/packagepricecadence.md +11 -0
- package/docs/models/shared/packagepricemodeltype.md +8 -0
- package/docs/models/shared/packagepricepricetype.md +9 -0
- package/docs/models/shared/packagewithallocationprice.md +225 -0
- package/docs/models/shared/packagewithallocationpricecadence.md +11 -0
- package/docs/models/shared/packagewithallocationpricemodeltype.md +8 -0
- package/docs/models/shared/packagewithallocationpricepricetype.md +9 -0
- package/docs/models/shared/paginationmetadata.md +9 -0
- package/docs/models/shared/percentagediscount.md +10 -0
- package/docs/models/shared/percentagediscountcreationparams.md +9 -0
- package/docs/models/shared/percentagediscountcreationparamsdiscounttype.md +8 -0
- package/docs/models/shared/percentagediscountdiscounttype.md +8 -0
- package/docs/models/shared/percentagediscountinterval.md +13 -0
- package/docs/models/shared/percentagediscountintervaldiscounttype.md +8 -0
- package/docs/models/shared/perpricecost.md +12 -0
- package/docs/models/shared/phaseoverride.md +11 -0
- package/docs/models/shared/pingresponse.md +8 -0
- package/docs/models/shared/plan.md +33 -0
- package/docs/models/shared/planmetadata.md +7 -0
- package/docs/models/shared/planminified.md +10 -0
- package/docs/models/shared/planphase.md +18 -0
- package/docs/models/shared/planphasedurationunit.md +11 -0
- package/docs/models/shared/planprices.md +7 -0
- package/docs/models/shared/plans.md +9 -0
- package/docs/models/shared/planstatus.md +10 -0
- package/docs/models/shared/pricegroup.md +12 -0
- package/docs/models/shared/priceinterval.md +18 -0
- package/docs/models/shared/priceintervalfixedfeequantitytransitionparams.md +9 -0
- package/docs/models/shared/prices.md +9 -0
- package/docs/models/shared/product.md +10 -0
- package/docs/models/shared/reportingconfiguration.md +8 -0
- package/docs/models/shared/requesttoolargeerror.md +12 -0
- package/docs/models/shared/requesttoolargeerrorheaders.md +7 -0
- package/docs/models/shared/requesttoolargeerrorstatus.md +8 -0
- package/docs/models/shared/requesttoolargeerrortype.md +8 -0
- package/docs/models/shared/requestvalidationerror.md +13 -0
- package/docs/models/shared/requestvalidationerrorheaders.md +7 -0
- package/docs/models/shared/requestvalidationerrorstatus.md +8 -0
- package/docs/models/shared/requestvalidationerrortype.md +8 -0
- package/docs/models/shared/resourcenotfounderror.md +12 -0
- package/docs/models/shared/resourcenotfounderrorheaders.md +7 -0
- package/docs/models/shared/resourcenotfounderrorstatus.md +8 -0
- package/docs/models/shared/resourcenotfounderrortype.md +8 -0
- package/docs/models/shared/resourcetoolargeerror.md +12 -0
- package/docs/models/shared/resourcetoolargeerrorheaders.md +7 -0
- package/docs/models/shared/resourcetoolargeerrorstatus.md +8 -0
- package/docs/models/shared/resourcetoolargeerrortype.md +8 -0
- package/docs/models/shared/security.md +8 -0
- package/docs/models/shared/sublineitemgrouping.md +9 -0
- package/docs/models/shared/sublineitemmatrixconfig.md +8 -0
- package/docs/models/shared/subscription.md +44 -0
- package/docs/models/shared/subscriptioncosts.md +8 -0
- package/docs/models/shared/subscriptionmetadata.md +9 -0
- package/docs/models/shared/subscriptionminified.md +8 -0
- package/docs/models/shared/subscriptionplanchange.md +23 -0
- package/docs/models/shared/subscriptions.md +9 -0
- package/docs/models/shared/subscriptionscheduleitem.md +10 -0
- package/docs/models/shared/subscriptionscheduleitems.md +9 -0
- package/docs/models/shared/subscriptionstatus.md +10 -0
- package/docs/models/shared/subscriptiontrialinfo.md +8 -0
- package/docs/models/shared/taxamount.md +10 -0
- package/docs/models/shared/testratingfunctionprice.md +225 -0
- package/docs/models/shared/testratingfunctionpricecadence.md +11 -0
- package/docs/models/shared/testratingfunctionpricemodeltype.md +8 -0
- package/docs/models/shared/testratingfunctionpricepricetype.md +9 -0
- package/docs/models/shared/thresholdtotalamountprice.md +225 -0
- package/docs/models/shared/thresholdtotalamountpricecadence.md +11 -0
- package/docs/models/shared/thresholdtotalamountpricemodeltype.md +8 -0
- package/docs/models/shared/thresholdtotalamountpricepricetype.md +9 -0
- package/docs/models/shared/tier.md +10 -0
- package/docs/models/shared/tierconfig.md +10 -0
- package/docs/models/shared/tieredbpsconfig.md +8 -0
- package/docs/models/shared/tieredbpsprice.md +225 -0
- package/docs/models/shared/tieredbpspricecadence.md +11 -0
- package/docs/models/shared/tieredbpspricemodeltype.md +8 -0
- package/docs/models/shared/tieredbpspricepricetype.md +9 -0
- package/docs/models/shared/tieredconfig.md +8 -0
- package/docs/models/shared/tieredpackageprice.md +225 -0
- package/docs/models/shared/tieredpackagepricecadence.md +11 -0
- package/docs/models/shared/tieredpackagepricemodeltype.md +8 -0
- package/docs/models/shared/tieredpackagepricepricetype.md +9 -0
- package/docs/models/shared/tieredprice.md +225 -0
- package/docs/models/shared/tieredpricecadence.md +11 -0
- package/docs/models/shared/tieredpricemodeltype.md +8 -0
- package/docs/models/shared/tieredpricepricetype.md +9 -0
- package/docs/models/shared/tieredwithminimumprice.md +225 -0
- package/docs/models/shared/tieredwithminimumpricecadence.md +11 -0
- package/docs/models/shared/tieredwithminimumpricemodeltype.md +8 -0
- package/docs/models/shared/tieredwithminimumpricepricetype.md +9 -0
- package/docs/models/shared/tiersublineitem.md +13 -0
- package/docs/models/shared/tiersublineitemtype.md +8 -0
- package/docs/models/shared/trialconfig.md +9 -0
- package/docs/models/shared/trialconfigtrialperiodunit.md +8 -0
- package/docs/models/shared/trialdiscount.md +11 -0
- package/docs/models/shared/trialdiscountdiscounttype.md +8 -0
- package/docs/models/shared/triggersubscriptionphaseparams.md +8 -0
- package/docs/models/shared/ungroupedsubscriptionusage.md +8 -0
- package/docs/models/shared/ungroupedsubscriptionusagerecord.md +10 -0
- package/docs/models/shared/ungroupedsubscriptionusagerecordviewmode.md +9 -0
- package/docs/models/shared/unitconfig.md +9 -0
- package/docs/models/shared/unitprice.md +225 -0
- package/docs/models/shared/unitpricecadence.md +11 -0
- package/docs/models/shared/unitpricemodeltype.md +8 -0
- package/docs/models/shared/unitpricepricetype.md +9 -0
- package/docs/models/shared/unschedulefixedfeequantitychangeparams.md +8 -0
- package/docs/models/shared/upcominginvoice.md +46 -0
- package/docs/models/shared/upcominginvoicemetadata.md +7 -0
- package/docs/models/shared/upcominginvoicestatus.md +12 -0
- package/docs/models/shared/updateevent.md +12 -0
- package/docs/models/shared/updateeventproperties.md +9 -0
- package/docs/models/shared/urlnotfound.md +12 -0
- package/docs/models/shared/urlnotfoundheaders.md +7 -0
- package/docs/models/shared/urlnotfoundstatus.md +8 -0
- package/docs/models/shared/urlnotfoundtype.md +8 -0
- package/docs/models/shared/usage.md +10 -0
- package/docs/models/shared/usagediscount.md +10 -0
- package/docs/models/shared/usagediscountcreationparams.md +9 -0
- package/docs/models/shared/usagediscountcreationparamsdiscounttype.md +8 -0
- package/docs/models/shared/usagediscountdiscounttype.md +8 -0
- package/docs/models/shared/usagediscountinterval.md +13 -0
- package/docs/models/shared/usagediscountintervaldiscounttype.md +8 -0
- package/docs/models/shared/validationerror.md +9 -0
- package/docs/models/shared/voidinitiatedledgerentry.md +24 -0
- package/docs/models/shared/voidinitiatedledgerentryentrystatus.md +9 -0
- package/docs/models/shared/voidinitiatedledgerentryentrytype.md +8 -0
- package/docs/models/shared/voidledgerentry.md +23 -0
- package/docs/models/shared/voidledgerentryentrystatus.md +9 -0
- package/docs/models/shared/voidledgerentryentrytype.md +8 -0
- package/docs/sdks/availability/README.md +45 -0
- package/docs/sdks/coupon/README.md +226 -0
- package/docs/sdks/credit/README.md +424 -0
- package/docs/sdks/creditnote/README.md +91 -0
- package/docs/sdks/customer/README.md +1129 -0
- package/docs/sdks/event/README.md +674 -0
- package/docs/sdks/invoice/README.md +402 -0
- package/docs/sdks/item/README.md +89 -0
- package/docs/sdks/metric/README.md +140 -0
- package/docs/sdks/orb/README.md +21 -0
- package/docs/sdks/plan/README.md +300 -0
- package/docs/sdks/price/README.md +411 -0
- package/docs/sdks/priceinterval/README.md +180 -0
- package/docs/sdks/subscription/README.md +1412 -0
- package/docs/types/rfcdate.md +11 -0
- package/package.json +2 -1
- package/dist/sdk/models/operations/addledgerentryexternalid.d.ts +0 -16
- package/dist/sdk/models/operations/listcreditnote.d.ts +0 -34
- package/dist/sdk/models/shared/action.d.ts +0 -8
- package/dist/sdk/models/shared/action.js +0 -15
- package/dist/sdk/models/shared/billablemetricminified.d.ts +0 -5
- package/dist/sdk/models/shared/bpspriceoverride.d.ts +0 -24
- package/dist/sdk/models/shared/bulkbpspriceoverride.d.ts +0 -24
- package/dist/sdk/models/shared/bulkpriceoverride.d.ts +0 -24
- package/dist/sdk/models/shared/cadence.d.ts +0 -5
- package/dist/sdk/models/shared/cadence.js +0 -12
- package/dist/sdk/models/shared/canceloption.d.ts +0 -8
- package/dist/sdk/models/shared/canceloption.js +0 -15
- package/dist/sdk/models/shared/changeoption1.d.ts +0 -8
- package/dist/sdk/models/shared/changeoption1.js +0 -15
- package/dist/sdk/models/shared/credit.d.ts +0 -16
- package/dist/sdk/models/shared/creditblock.d.ts +0 -15
- package/dist/sdk/models/shared/creditledgerentry.d.ts +0 -58
- package/dist/sdk/models/shared/creditnotetype.d.ts +0 -7
- package/dist/sdk/models/shared/creditnotetype.js +0 -14
- package/dist/sdk/models/shared/customercost.d.ts +0 -15
- package/dist/sdk/models/shared/discounttype.d.ts +0 -6
- package/dist/sdk/models/shared/discounttype.js +0 -13
- package/dist/sdk/models/shared/durationunit.d.ts +0 -8
- package/dist/sdk/models/shared/durationunit.js +0 -15
- package/dist/sdk/models/shared/entrystatus.d.ts +0 -7
- package/dist/sdk/models/shared/entrystatus.js +0 -14
- package/dist/sdk/models/shared/entrytype.d.ts +0 -9
- package/dist/sdk/models/shared/entrytype.js +0 -16
- package/dist/sdk/models/shared/eventsearchresults.d.ts +0 -10
- package/dist/sdk/models/shared/externalmarketplace.d.ts +0 -8
- package/dist/sdk/models/shared/externalmarketplace.js +0 -15
- package/dist/sdk/models/shared/fixedfeequantityschedule.d.ts +0 -7
- package/dist/sdk/models/shared/granularity.d.ts +0 -6
- package/dist/sdk/models/shared/granularity.js +0 -13
- package/dist/sdk/models/shared/grouping.d.ts +0 -8
- package/dist/sdk/models/shared/invoicestatus.d.ts +0 -10
- package/dist/sdk/models/shared/invoicestatus.js +0 -17
- package/dist/sdk/models/shared/lineitem.d.ts +0 -58
- package/dist/sdk/models/shared/lineitem.js +0 -147
- package/dist/sdk/models/shared/matrixconfig1.d.ts +0 -10
- package/dist/sdk/models/shared/modeltype.d.ts +0 -10
- package/dist/sdk/models/shared/modeltype.js +0 -17
- package/dist/sdk/models/shared/newcreditledgerentry.d.ts +0 -44
- package/dist/sdk/models/shared/newtransaction.d.ts +0 -10
- package/dist/sdk/models/shared/packagepriceoverride.d.ts +0 -24
- package/dist/sdk/models/shared/price.d.ts +0 -114
- package/dist/sdk/models/shared/price.js +0 -245
- package/dist/sdk/models/shared/reason.d.ts +0 -9
- package/dist/sdk/models/shared/reason.js +0 -16
- package/dist/sdk/models/shared/sublineitem.d.ts +0 -32
- package/dist/sdk/models/shared/sublineitem1.d.ts +0 -24
- package/dist/sdk/models/shared/subscriptioncancellation.d.ts +0 -12
- package/dist/sdk/models/shared/subscriptionstatus.d.ts +0 -5
- package/dist/sdk/models/shared/subscriptionstatus.js +0 -12
- package/dist/sdk/models/shared/subscriptionusage.d.ts +0 -8
- package/dist/sdk/models/shared/tier7.d.ts +0 -7
- package/dist/sdk/models/shared/tieredbpsconfig1.d.ts +0 -5
- package/dist/sdk/models/shared/tieredbpspriceoverride.d.ts +0 -21
- package/dist/sdk/models/shared/tieredpriceoverride.d.ts +0 -27
- package/dist/sdk/models/shared/transactiontype.d.ts +0 -4
- package/dist/sdk/models/shared/transactiontype.js +0 -11
- package/dist/sdk/models/shared/type.d.ts +0 -7
- package/dist/sdk/models/shared/type.js +0 -14
- package/dist/sdk/models/shared/unitpriceoverride.d.ts +0 -24
- package/dist/sdk/models/shared/usageitem.d.ts +0 -6
- package/dist/sdk/models/shared/validationerrors.d.ts +0 -13
- package/dist/sdk/models/shared/validationerrors.js +0 -59
- package/dist/sdk/models/shared/viewmode.d.ts +0 -7
- package/dist/sdk/models/shared/viewmode.js +0 -14
package/dist/sdk/event.js
CHANGED
|
@@ -91,10 +91,15 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
91
91
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
92
92
|
exports.Event = void 0;
|
|
93
93
|
var utils = __importStar(require("../internal/utils"));
|
|
94
|
+
var errors = __importStar(require("./models/errors"));
|
|
94
95
|
var operations = __importStar(require("./models/operations"));
|
|
95
96
|
var shared = __importStar(require("./models/shared"));
|
|
96
97
|
/**
|
|
97
|
-
* The [Event](../guides/core-concepts.mdx#event) resource represents
|
|
98
|
+
* The [Event](../guides/core-concepts.mdx#event) resource represents a usage event that has been created for a
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for
|
|
102
|
+
* a given billing period.
|
|
98
103
|
*/
|
|
99
104
|
var Event = /** @class */ (function () {
|
|
100
105
|
function Event(sdkConfig) {
|
|
@@ -104,26 +109,42 @@ var Event = /** @class */ (function () {
|
|
|
104
109
|
* Amend event
|
|
105
110
|
*
|
|
106
111
|
* @remarks
|
|
107
|
-
* This endpoint is used to amend a single usage event with a given `event_id`. `event_id` refers to the
|
|
112
|
+
* This endpoint is used to amend a single usage event with a given `event_id`. `event_id` refers to the
|
|
113
|
+
* `idempotency_key` passed in during ingestion. The event will maintain its existing `event_id` after the amendment.
|
|
108
114
|
*
|
|
109
|
-
* This endpoint will mark the existing event as ignored, and Orb will only use the new event passed in the body of
|
|
115
|
+
* This endpoint will mark the existing event as ignored, and Orb will only use the new event passed in the body of
|
|
116
|
+
* this request as the source of truth for that `event_id`. Note that a single event can be amended any number of
|
|
117
|
+
* times, so the same event can be overwritten in subsequent calls to this endpoint, or overwritten using the
|
|
118
|
+
* [Amend customer usage](amend-usage) endpoint. Only a single event with a given `event_id` will be considered the
|
|
119
|
+
* source of truth at any given time.
|
|
110
120
|
*
|
|
111
121
|
* This is a powerful and audit-safe mechanism to retroactively update a single event in cases where you need to:
|
|
112
122
|
* * update an event with new metadata as you iterate on your pricing model
|
|
113
123
|
* * update an event based on the result of an external API call (ex. call to a payment gateway succeeded or failed)
|
|
114
124
|
*
|
|
115
|
-
* This amendment API is always audit-safe. The process will still retain the original event, though it will be
|
|
125
|
+
* This amendment API is always audit-safe. The process will still retain the original event, though it will be
|
|
126
|
+
* ignored for billing calculations. For auditing and data fidelity purposes, Orb never overwrites or permanently
|
|
127
|
+
* deletes ingested usage data.
|
|
116
128
|
*
|
|
117
129
|
* ## Request validation
|
|
118
|
-
* * The `timestamp` of the new event must match the `timestamp` of the existing event already ingested. As with
|
|
119
|
-
*
|
|
120
|
-
* *
|
|
121
|
-
*
|
|
130
|
+
* * The `timestamp` of the new event must match the `timestamp` of the existing event already ingested. As with
|
|
131
|
+
* ingestion, all timestamps must be sent in ISO8601 format with UTC timezone offset.
|
|
132
|
+
* * The `customer_id` or `external_customer_id` of the new event must match the `customer_id` or
|
|
133
|
+
* `external_customer_id` of the existing event already ingested. Exactly one of `customer_id` and
|
|
134
|
+
* `external_customer_id` should be specified, and similar to ingestion, the ID must identify a Customer resource
|
|
135
|
+
* within Orb. Unlike ingestion, for event amendment, we strictly enforce that the Customer must be in the Orb
|
|
136
|
+
* system, even during the initial integration period. We do not allow updating the `Customer` an event is
|
|
137
|
+
* associated with.
|
|
138
|
+
* * Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design
|
|
139
|
+
* idempotent. On retryable errors, you should retry the request and assume the amendment operation has not
|
|
140
|
+
* succeeded until receipt of a 2xx.
|
|
141
|
+
* * The event's `timestamp` must fall within the customer's current subscription's billing period, or within the
|
|
142
|
+
* grace period of the customer's current subscription's previous billing period.
|
|
122
143
|
*/
|
|
123
144
|
Event.prototype.amend = function (req, config) {
|
|
124
145
|
var _a, _b;
|
|
125
146
|
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
-
var baseURL, url, _c, reqBodyHeaders, reqBody, client, headers, httpRes, contentType, res, decodedRes;
|
|
147
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
127
148
|
var _d;
|
|
128
149
|
return __generator(this, function (_e) {
|
|
129
150
|
switch (_e.label) {
|
|
@@ -133,7 +154,7 @@ var Event = /** @class */ (function () {
|
|
|
133
154
|
}
|
|
134
155
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
135
156
|
url = utils.generateURL(baseURL, "/events/{event_id}", req);
|
|
136
|
-
_c = __read([{},
|
|
157
|
+
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
137
158
|
try {
|
|
138
159
|
_d = __read(utils.serializeRequestBody(req, "amendedEvent", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
139
160
|
}
|
|
@@ -142,12 +163,23 @@ var Event = /** @class */ (function () {
|
|
|
142
163
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
143
164
|
}
|
|
144
165
|
}
|
|
145
|
-
client = this.sdkConfiguration.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
166
|
+
client = this.sdkConfiguration.defaultClient;
|
|
167
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
168
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
169
|
+
return [4 /*yield*/, globalSecurity()];
|
|
150
170
|
case 1:
|
|
171
|
+
globalSecurity = _e.sent();
|
|
172
|
+
_e.label = 2;
|
|
173
|
+
case 2:
|
|
174
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
175
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
176
|
+
}
|
|
177
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
178
|
+
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
179
|
+
headers["Accept"] = "application/json";
|
|
180
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
181
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
182
|
+
case 3:
|
|
151
183
|
httpRes = _e.sent();
|
|
152
184
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
153
185
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -164,10 +196,64 @@ var Event = /** @class */ (function () {
|
|
|
164
196
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
165
197
|
res.amendEventResult = utils.objectToClass(JSON.parse(decodedRes), shared.AmendEventResult);
|
|
166
198
|
}
|
|
199
|
+
else {
|
|
200
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
201
|
+
}
|
|
167
202
|
break;
|
|
168
203
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
169
204
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
170
|
-
res.
|
|
205
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
212
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
213
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
220
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
221
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
225
|
+
}
|
|
226
|
+
break;
|
|
227
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
228
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
229
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
233
|
+
}
|
|
234
|
+
break;
|
|
235
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
236
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
237
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
241
|
+
}
|
|
242
|
+
break;
|
|
243
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
244
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
245
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
249
|
+
}
|
|
250
|
+
break;
|
|
251
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
252
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
253
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
171
257
|
}
|
|
172
258
|
break;
|
|
173
259
|
}
|
|
@@ -180,14 +266,14 @@ var Event = /** @class */ (function () {
|
|
|
180
266
|
* Close backfill
|
|
181
267
|
*
|
|
182
268
|
* @remarks
|
|
183
|
-
* Closing a backfill makes the updated usage visible in Orb. Upon closing a backfill, Orb will asynchronously reflect
|
|
184
|
-
*
|
|
185
|
-
*
|
|
269
|
+
* Closing a backfill makes the updated usage visible in Orb. Upon closing a backfill, Orb will asynchronously reflect
|
|
270
|
+
* the updated usage in invoice amounts and usage graphs. Once all of the updates are complete, the backfill's status
|
|
271
|
+
* will transition to `reflected`.
|
|
186
272
|
*/
|
|
187
273
|
Event.prototype.closeBackfill = function (req, config) {
|
|
188
274
|
var _a, _b;
|
|
189
275
|
return __awaiter(this, void 0, void 0, function () {
|
|
190
|
-
var baseURL, url, client, headers, httpRes, contentType, res, decodedRes;
|
|
276
|
+
var baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
191
277
|
return __generator(this, function (_c) {
|
|
192
278
|
switch (_c.label) {
|
|
193
279
|
case 0:
|
|
@@ -196,12 +282,23 @@ var Event = /** @class */ (function () {
|
|
|
196
282
|
}
|
|
197
283
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
198
284
|
url = utils.generateURL(baseURL, "/events/backfills/{backfill_id}/close", req);
|
|
199
|
-
client = this.sdkConfiguration.
|
|
200
|
-
|
|
285
|
+
client = this.sdkConfiguration.defaultClient;
|
|
286
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
287
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
288
|
+
return [4 /*yield*/, globalSecurity()];
|
|
289
|
+
case 1:
|
|
290
|
+
globalSecurity = _c.sent();
|
|
291
|
+
_c.label = 2;
|
|
292
|
+
case 2:
|
|
293
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
294
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
295
|
+
}
|
|
296
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
297
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
201
298
|
headers["Accept"] = "application/json";
|
|
202
|
-
headers["user-agent"] =
|
|
299
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
203
300
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer" }, config))];
|
|
204
|
-
case
|
|
301
|
+
case 3:
|
|
205
302
|
httpRes = _c.sent();
|
|
206
303
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
207
304
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -218,6 +315,65 @@ var Event = /** @class */ (function () {
|
|
|
218
315
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
219
316
|
res.backfill = utils.objectToClass(JSON.parse(decodedRes), shared.Backfill);
|
|
220
317
|
}
|
|
318
|
+
else {
|
|
319
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
320
|
+
}
|
|
321
|
+
break;
|
|
322
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
323
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
324
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
328
|
+
}
|
|
329
|
+
break;
|
|
330
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
331
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
332
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
336
|
+
}
|
|
337
|
+
break;
|
|
338
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
339
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
340
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
344
|
+
}
|
|
345
|
+
break;
|
|
346
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
347
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
348
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
352
|
+
}
|
|
353
|
+
break;
|
|
354
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
355
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
356
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
360
|
+
}
|
|
361
|
+
break;
|
|
362
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
363
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
364
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
368
|
+
}
|
|
369
|
+
break;
|
|
370
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
371
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
372
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
376
|
+
}
|
|
221
377
|
break;
|
|
222
378
|
}
|
|
223
379
|
return [2 /*return*/, res];
|
|
@@ -229,22 +385,31 @@ var Event = /** @class */ (function () {
|
|
|
229
385
|
* Create backfill
|
|
230
386
|
*
|
|
231
387
|
* @remarks
|
|
232
|
-
* Creating the backfill enables adding or replacing past events, even those that are older than the ingestion grace
|
|
388
|
+
* Creating the backfill enables adding or replacing past events, even those that are older than the ingestion grace
|
|
389
|
+
* period. Performing a backfill in Orb involves 3 steps:
|
|
233
390
|
*
|
|
234
391
|
* 1. Create the backfill, specifying its parameters.
|
|
235
392
|
* 2. [Ingest](ingest) usage events, referencing the backfill (query parameter `backfill_id`).
|
|
236
|
-
* 3. [Close](close-backfill) the
|
|
393
|
+
* 3. [Close](close-backfill) the
|
|
394
|
+
* backfill, propagating the update in past usage throughout Orb.
|
|
237
395
|
*
|
|
238
|
-
* Changes from a backfill are not reflected until the
|
|
396
|
+
* Changes from a backfill are not reflected until the
|
|
397
|
+
* backfill is closed, so you won’t need to worry about your customers seeing partially updated usage data. Backfills are
|
|
398
|
+
* also reversible, so you’ll be able to revert a backfill if you’ve made a mistake.
|
|
239
399
|
*
|
|
240
|
-
* This endpoint will return a
|
|
400
|
+
* This endpoint will return a
|
|
401
|
+
* backfill object, which contains an `id`. That `id` can then be used as the `backfill_id` query parameter to the event
|
|
402
|
+
* ingestion endpoint to associate ingested events with this backfill. The effects (e.g. updated usage graphs) of this
|
|
403
|
+
* backfill will not take place until the backfill is closed.
|
|
241
404
|
*
|
|
242
|
-
* If the `replace_existing_events` is `true`, existing
|
|
405
|
+
* If the `replace_existing_events` is `true`, existing
|
|
406
|
+
* events in the backfill's timeframe will be replaced with the newly ingested events associated with the backfill. If
|
|
407
|
+
* `false`, newly ingested events will be added to the existing events.
|
|
243
408
|
*/
|
|
244
409
|
Event.prototype.create = function (req, config) {
|
|
245
410
|
var _a, _b;
|
|
246
411
|
return __awaiter(this, void 0, void 0, function () {
|
|
247
|
-
var baseURL, url, _c, reqBodyHeaders, reqBody, client, headers, httpRes, contentType, res, decodedRes;
|
|
412
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
248
413
|
var _d;
|
|
249
414
|
return __generator(this, function (_e) {
|
|
250
415
|
switch (_e.label) {
|
|
@@ -254,7 +419,7 @@ var Event = /** @class */ (function () {
|
|
|
254
419
|
}
|
|
255
420
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
256
421
|
url = baseURL.replace(/\/$/, "") + "/events/backfills";
|
|
257
|
-
_c = __read([{},
|
|
422
|
+
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
258
423
|
try {
|
|
259
424
|
_d = __read(utils.serializeRequestBody(req, "request", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
260
425
|
}
|
|
@@ -263,12 +428,23 @@ var Event = /** @class */ (function () {
|
|
|
263
428
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
264
429
|
}
|
|
265
430
|
}
|
|
266
|
-
client = this.sdkConfiguration.
|
|
267
|
-
|
|
431
|
+
client = this.sdkConfiguration.defaultClient;
|
|
432
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
433
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
434
|
+
return [4 /*yield*/, globalSecurity()];
|
|
435
|
+
case 1:
|
|
436
|
+
globalSecurity = _e.sent();
|
|
437
|
+
_e.label = 2;
|
|
438
|
+
case 2:
|
|
439
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
440
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
441
|
+
}
|
|
442
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
443
|
+
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
268
444
|
headers["Accept"] = "application/json";
|
|
269
|
-
headers["user-agent"] =
|
|
445
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
270
446
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
271
|
-
case
|
|
447
|
+
case 3:
|
|
272
448
|
httpRes = _e.sent();
|
|
273
449
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
274
450
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -285,6 +461,65 @@ var Event = /** @class */ (function () {
|
|
|
285
461
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
286
462
|
res.backfill = utils.objectToClass(JSON.parse(decodedRes), shared.Backfill);
|
|
287
463
|
}
|
|
464
|
+
else {
|
|
465
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
466
|
+
}
|
|
467
|
+
break;
|
|
468
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
469
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
470
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
474
|
+
}
|
|
475
|
+
break;
|
|
476
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
477
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
478
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
482
|
+
}
|
|
483
|
+
break;
|
|
484
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
485
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
486
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
490
|
+
}
|
|
491
|
+
break;
|
|
492
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
493
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
494
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
498
|
+
}
|
|
499
|
+
break;
|
|
500
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
501
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
502
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
503
|
+
}
|
|
504
|
+
else {
|
|
505
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
506
|
+
}
|
|
507
|
+
break;
|
|
508
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
509
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
510
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
514
|
+
}
|
|
515
|
+
break;
|
|
516
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
517
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
518
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
522
|
+
}
|
|
288
523
|
break;
|
|
289
524
|
}
|
|
290
525
|
return [2 /*return*/, res];
|
|
@@ -296,27 +531,39 @@ var Event = /** @class */ (function () {
|
|
|
296
531
|
* Deprecate event
|
|
297
532
|
*
|
|
298
533
|
* @remarks
|
|
299
|
-
* This endpoint is used to deprecate a single usage event with a given `event_id`. `event_id` refers to the
|
|
534
|
+
* This endpoint is used to deprecate a single usage event with a given `event_id`. `event_id` refers to the
|
|
535
|
+
* `idempotency_key` passed in during ingestion.
|
|
300
536
|
*
|
|
301
|
-
* This endpoint will mark the existing event as ignored. Note that if you attempt to re-ingest an event with the same
|
|
537
|
+
* This endpoint will mark the existing event as ignored. Note that if you attempt to re-ingest an event with the same
|
|
538
|
+
* `event_id` as a deprecated event, Orb will return an error.
|
|
302
539
|
*
|
|
303
540
|
* This is a powerful and audit-safe mechanism to retroactively deprecate a single event in cases where you need to:
|
|
304
541
|
* * no longer bill for an event that was improperly reported
|
|
305
|
-
* * no longer bill for an event based on the result of an external API call (ex. call to a payment gateway failed and
|
|
542
|
+
* * no longer bill for an event based on the result of an external API call (ex. call to a payment gateway failed and
|
|
543
|
+
* the user should not be billed)
|
|
306
544
|
*
|
|
307
|
-
* If you want to only change specific properties of an event, but keep the event as part of the billing calculation,
|
|
545
|
+
* If you want to only change specific properties of an event, but keep the event as part of the billing calculation,
|
|
546
|
+
* use the [Amend single event](amend-event) endpoint instead.
|
|
308
547
|
*
|
|
309
|
-
* This API is always audit-safe. The process will still retain the deprecated event, though it will be ignored for
|
|
548
|
+
* This API is always audit-safe. The process will still retain the deprecated event, though it will be ignored for
|
|
549
|
+
* billing calculations. For auditing and data fidelity purposes, Orb never overwrites or permanently deletes ingested
|
|
550
|
+
* usage data.
|
|
310
551
|
*
|
|
311
552
|
* ## Request validation
|
|
312
|
-
* * Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design
|
|
313
|
-
*
|
|
314
|
-
*
|
|
553
|
+
* * Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design
|
|
554
|
+
* idempotent. On retryable errors, you should retry the request and assume the deprecation operation has not
|
|
555
|
+
* succeeded until receipt of a 2xx.
|
|
556
|
+
* * The event's `timestamp` must fall within the customer's current subscription's billing period, or within the
|
|
557
|
+
* grace period of the customer's current subscription's previous billing period. Orb does not allow deprecating
|
|
558
|
+
* events for billing periods that have already invoiced customers.
|
|
559
|
+
* * The `customer_id` or the `external_customer_id` of the original event ingestion request must identify a Customer
|
|
560
|
+
* resource within Orb, even if this event was ingested during the initial integration period. We do not allow
|
|
561
|
+
* deprecating events for customers not in the Orb system.
|
|
315
562
|
*/
|
|
316
563
|
Event.prototype.deprecateEvent = function (req, config) {
|
|
317
564
|
var _a, _b;
|
|
318
565
|
return __awaiter(this, void 0, void 0, function () {
|
|
319
|
-
var baseURL, url, client, headers, httpRes, contentType, res, decodedRes;
|
|
566
|
+
var baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
320
567
|
return __generator(this, function (_c) {
|
|
321
568
|
switch (_c.label) {
|
|
322
569
|
case 0:
|
|
@@ -325,12 +572,23 @@ var Event = /** @class */ (function () {
|
|
|
325
572
|
}
|
|
326
573
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
327
574
|
url = utils.generateURL(baseURL, "/events/{event_id}/deprecate", req);
|
|
328
|
-
client = this.sdkConfiguration.
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "put", headers: headers, responseType: "arraybuffer" }, config))];
|
|
575
|
+
client = this.sdkConfiguration.defaultClient;
|
|
576
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
577
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
578
|
+
return [4 /*yield*/, globalSecurity()];
|
|
333
579
|
case 1:
|
|
580
|
+
globalSecurity = _c.sent();
|
|
581
|
+
_c.label = 2;
|
|
582
|
+
case 2:
|
|
583
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
584
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
585
|
+
}
|
|
586
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
587
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
588
|
+
headers["Accept"] = "application/json";
|
|
589
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
590
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "put", headers: headers, responseType: "arraybuffer" }, config))];
|
|
591
|
+
case 3:
|
|
334
592
|
httpRes = _c.sent();
|
|
335
593
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
336
594
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -347,10 +605,181 @@ var Event = /** @class */ (function () {
|
|
|
347
605
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
348
606
|
res.deprecatedEventResult = utils.objectToClass(JSON.parse(decodedRes), shared.DeprecatedEventResult);
|
|
349
607
|
}
|
|
608
|
+
else {
|
|
609
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
610
|
+
}
|
|
611
|
+
break;
|
|
612
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
613
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
614
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
615
|
+
}
|
|
616
|
+
else {
|
|
617
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
618
|
+
}
|
|
619
|
+
break;
|
|
620
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
621
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
622
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
623
|
+
}
|
|
624
|
+
else {
|
|
625
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
626
|
+
}
|
|
627
|
+
break;
|
|
628
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
629
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
630
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
634
|
+
}
|
|
635
|
+
break;
|
|
636
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
637
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
638
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
642
|
+
}
|
|
643
|
+
break;
|
|
644
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
645
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
646
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
647
|
+
}
|
|
648
|
+
else {
|
|
649
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
650
|
+
}
|
|
651
|
+
break;
|
|
652
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
653
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
654
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
658
|
+
}
|
|
659
|
+
break;
|
|
660
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
661
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
662
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
666
|
+
}
|
|
667
|
+
break;
|
|
668
|
+
}
|
|
669
|
+
return [2 /*return*/, res];
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
});
|
|
673
|
+
};
|
|
674
|
+
/**
|
|
675
|
+
* Fetch backfill
|
|
676
|
+
*
|
|
677
|
+
* @remarks
|
|
678
|
+
* This endpoint is used to fetch a backfill given an identifier.
|
|
679
|
+
*/
|
|
680
|
+
Event.prototype.fetch = function (req, config) {
|
|
681
|
+
var _a, _b;
|
|
682
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
683
|
+
var baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
684
|
+
return __generator(this, function (_c) {
|
|
685
|
+
switch (_c.label) {
|
|
686
|
+
case 0:
|
|
687
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
688
|
+
req = new operations.FetchBackfillRequest(req);
|
|
689
|
+
}
|
|
690
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
691
|
+
url = utils.generateURL(baseURL, "/events/backfills/{backfill_id}", req);
|
|
692
|
+
client = this.sdkConfiguration.defaultClient;
|
|
693
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
694
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
695
|
+
return [4 /*yield*/, globalSecurity()];
|
|
696
|
+
case 1:
|
|
697
|
+
globalSecurity = _c.sent();
|
|
698
|
+
_c.label = 2;
|
|
699
|
+
case 2:
|
|
700
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
701
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
702
|
+
}
|
|
703
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
704
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
705
|
+
headers["Accept"] = "application/json";
|
|
706
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
707
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
708
|
+
case 3:
|
|
709
|
+
httpRes = _c.sent();
|
|
710
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
711
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
712
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
713
|
+
}
|
|
714
|
+
res = new operations.FetchBackfillResponse({
|
|
715
|
+
statusCode: httpRes.status,
|
|
716
|
+
contentType: contentType,
|
|
717
|
+
rawResponse: httpRes,
|
|
718
|
+
});
|
|
719
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
720
|
+
switch (true) {
|
|
721
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
722
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
723
|
+
res.backfill = utils.objectToClass(JSON.parse(decodedRes), shared.Backfill);
|
|
724
|
+
}
|
|
725
|
+
else {
|
|
726
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
727
|
+
}
|
|
350
728
|
break;
|
|
351
729
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
352
730
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
353
|
-
res.
|
|
731
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
732
|
+
}
|
|
733
|
+
else {
|
|
734
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
735
|
+
}
|
|
736
|
+
break;
|
|
737
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
738
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
739
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
740
|
+
}
|
|
741
|
+
else {
|
|
742
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
743
|
+
}
|
|
744
|
+
break;
|
|
745
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
746
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
747
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
748
|
+
}
|
|
749
|
+
else {
|
|
750
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
751
|
+
}
|
|
752
|
+
break;
|
|
753
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
754
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
755
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
756
|
+
}
|
|
757
|
+
else {
|
|
758
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
759
|
+
}
|
|
760
|
+
break;
|
|
761
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
762
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
763
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
764
|
+
}
|
|
765
|
+
else {
|
|
766
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
767
|
+
}
|
|
768
|
+
break;
|
|
769
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
770
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
771
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
772
|
+
}
|
|
773
|
+
else {
|
|
774
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
775
|
+
}
|
|
776
|
+
break;
|
|
777
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
778
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
779
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
354
783
|
}
|
|
355
784
|
break;
|
|
356
785
|
}
|
|
@@ -365,8 +794,10 @@ var Event = /** @class */ (function () {
|
|
|
365
794
|
* @remarks
|
|
366
795
|
* Orb's event ingestion model and API is designed around two core principles:
|
|
367
796
|
*
|
|
368
|
-
* 1. **Data fidelity**: The accuracy of your billing model depends on a robust foundation of events. Orb's API protocol
|
|
369
|
-
*
|
|
797
|
+
* 1. **Data fidelity**: The accuracy of your billing model depends on a robust foundation of events. Orb's API protocol
|
|
798
|
+
* encourages usage patterns that ensure that your data is consistently complete and correct.
|
|
799
|
+
* 2. **Fast integration**: Sending events into Orb requires no tedious setup steps or explicit field schema for your event
|
|
800
|
+
* shape, making it instant to start streaming in usage in real-time.
|
|
370
801
|
*
|
|
371
802
|
*
|
|
372
803
|
* ## Event shape
|
|
@@ -375,121 +806,157 @@ var Event = /** @class */ (function () {
|
|
|
375
806
|
*
|
|
376
807
|
* ```json
|
|
377
808
|
* {
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
809
|
+
* // customer_id and external_customer_id are used to
|
|
810
|
+
* // attribute usage to a given Customer. Exactly one of these
|
|
811
|
+
* // should be specified in a given ingestion event.
|
|
812
|
+
*
|
|
813
|
+
* // `customer_id` is the Orb generated identifier for the Customer,
|
|
814
|
+
* // which is returned from the Create customer API call.
|
|
815
|
+
* customer_id: string,
|
|
816
|
+
*
|
|
817
|
+
* // external_customer_id is an alternate identifier which is associated
|
|
818
|
+
* // with a Customer at creation time. This is treated as an alias for
|
|
819
|
+
* // customer_id, and is usually set to an identifier native to your system.
|
|
820
|
+
* external_customer_id: string,
|
|
821
|
+
*
|
|
822
|
+
* // A string name identifying the event, usually a usage
|
|
823
|
+
* // action. By convention, this should not contain any whitespace.
|
|
824
|
+
* event_name: string,
|
|
825
|
+
*
|
|
826
|
+
* // An ISO 8601 format date with no timezone offset.
|
|
827
|
+
* // This should represent the time that usage occurred
|
|
828
|
+
* // and is important to attribute usage to a given
|
|
829
|
+
* // billing period. See the notes below on determining the timestamp.
|
|
830
|
+
* // e.g. 2020-12-09T16:09:53Z
|
|
831
|
+
* timestamp: string,
|
|
832
|
+
*
|
|
833
|
+
* // A unique value, generated by the client, that is
|
|
834
|
+
* // used to de-duplicate events.
|
|
835
|
+
* // Exactly one event with a given
|
|
836
|
+
* // idempotency key will be ingested, which allows for
|
|
837
|
+
* // safe request retries.
|
|
838
|
+
* idempotency_key: string
|
|
839
|
+
*
|
|
840
|
+
* // Optional custom metadata to attach to the event.
|
|
841
|
+
* // This might include a numeric value used for aggregation,
|
|
842
|
+
* // or a string/boolean value used for filtering.
|
|
843
|
+
* // The schema of this dictionary need not be pre-declared, and
|
|
844
|
+
* // properties can be added at any time.
|
|
845
|
+
* properties: {
|
|
846
|
+
* [key: string]?: string | number | boolean,
|
|
847
|
+
* },
|
|
417
848
|
* }
|
|
418
849
|
* ```
|
|
419
850
|
*
|
|
420
851
|
* ## Required fields
|
|
421
|
-
* Because events streamed to Orb are meant to be as flexible as possible, there are only a few required fields in every
|
|
852
|
+
* Because events streamed to Orb are meant to be as flexible as possible, there are only a few required fields in every
|
|
853
|
+
* event.
|
|
422
854
|
*
|
|
423
|
-
* - We recommend that `idempotency_key` are unique strings that you generated with V4 UUIDs, but only require that they
|
|
424
|
-
*
|
|
855
|
+
* - We recommend that `idempotency_key` are unique strings that you generated with V4 UUIDs, but only require that they
|
|
856
|
+
* uniquely identify an event (i.e. don’t collide).
|
|
857
|
+
* - The `timestamp` field in the event body will be used to determine which billable period a given event falls into. For
|
|
858
|
+
* example, with a monthly billing cycle starting from the first of December, Orb will calculate metrics based on events
|
|
859
|
+
* that fall into the range `12-01 00:00:00 <= timestamp < 01-01 00:00:00`.
|
|
425
860
|
*
|
|
426
861
|
* ## Logging metadata
|
|
427
862
|
*
|
|
428
|
-
* Orb allows tagging events with metadata using a flexible properties dictionary. Since Orb does not enforce a rigid
|
|
863
|
+
* Orb allows tagging events with metadata using a flexible properties dictionary. Since Orb does not enforce a rigid
|
|
864
|
+
* schema for this field-set, key-value pairs can be added dynamically as your events evolve.
|
|
429
865
|
*
|
|
430
866
|
* This dictionary can be helpful for a wide variety of use cases:
|
|
431
867
|
*
|
|
432
|
-
* - Numeric properties on events like `compute_time_ms` can later be inputs to our flexible query engine to determine
|
|
868
|
+
* - Numeric properties on events like `compute_time_ms` can later be inputs to our flexible query engine to determine
|
|
869
|
+
* usage.
|
|
433
870
|
* - Logging a region or cluster with each event can help you provide customers more granular visibility into their usage.
|
|
434
871
|
*
|
|
435
|
-
* We encourage logging this metadata with an eye towards future use cases to ensure full coverage for historical data. The
|
|
872
|
+
* We encourage logging this metadata with an eye towards future use cases to ensure full coverage for historical data. The
|
|
873
|
+
* datatype of the value in the properties dictionary is important for metric creation from an event source. Values that
|
|
874
|
+
* you wish to numerically aggregate should be of numeric type in the event.
|
|
436
875
|
*
|
|
437
876
|
*
|
|
438
877
|
* ## Determining event timestamp
|
|
439
|
-
* For cases where usage is being reported in real time as it is occurring, timestamp should correspond to the time that
|
|
878
|
+
* For cases where usage is being reported in real time as it is occurring, timestamp should correspond to the time that
|
|
879
|
+
* usage occurred.
|
|
440
880
|
*
|
|
441
|
-
* In cases where usage is reported in aggregate for a historical timeframe at a regular interval, we recommend setting the
|
|
881
|
+
* In cases where usage is reported in aggregate for a historical timeframe at a regular interval, we recommend setting the
|
|
882
|
+
* event `timestamp` to the midpoint of the interval. As an example, if you have an hourly reporter that sends data once an
|
|
883
|
+
* hour for the previous hour of usage, setting the `timestamp` to the half-hour mark will ensure that the usage is counted
|
|
884
|
+
* within the correct period.
|
|
442
885
|
*
|
|
443
886
|
* Note that other time-related fields (e.g. time elapsed) can be added to the properties dictionary as necessary.
|
|
444
887
|
*
|
|
445
|
-
* In cases where usage is reported in aggregate for a historical timeframe, the timestamp must be within the grace period
|
|
888
|
+
* In cases where usage is reported in aggregate for a historical timeframe, the timestamp must be within the grace period
|
|
889
|
+
* set for your account. Events with `timestamp < current_time - grace_period` will not be accepted as a valid event, and
|
|
890
|
+
* will throw validation errors. Enforcing the grace period enables Orb to accurately map usage to the correct billing
|
|
891
|
+
* cycle and ensure that all usage is billed for in the corresponding billing period.
|
|
446
892
|
*
|
|
447
893
|
* ## Event validation
|
|
448
894
|
*
|
|
449
|
-
* Orb’s validation ensures that you recognize errors in your events as quickly as possible, and the API provides
|
|
895
|
+
* Orb’s validation ensures that you recognize errors in your events as quickly as possible, and the API provides
|
|
896
|
+
* informative error messages to help you fix problems quickly.
|
|
450
897
|
*
|
|
451
898
|
* We validate the following:
|
|
452
899
|
*
|
|
453
900
|
* - Exactly one of `customer_id` and `external_customer_id` should be specified.
|
|
454
|
-
* - If specified, `customer_id` must identify a Customer resource within Orb. We do not support sending events for
|
|
455
|
-
*
|
|
901
|
+
* - If specified, `customer_id` must identify a Customer resource within Orb. We do not support sending events for
|
|
902
|
+
* customers that have not been provisioned. Similarly, if specified, `external_customer_id` must be an identifier that is
|
|
903
|
+
* associated with an Orb Customer resource. Note: During our initial integration period, this enforcement will be
|
|
904
|
+
* temporarily turned into a warning to ensure smooth customer migration.
|
|
905
|
+
* - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour in the future. This timestamp should be
|
|
906
|
+
* sent in UTC timezone (no timezone offset).
|
|
456
907
|
*
|
|
457
908
|
* ## Idempotency and retry semantics
|
|
458
909
|
*
|
|
459
|
-
* Orb's idempotency guarantees allow you to implement safe retry logic in the event of network or machine failures,
|
|
910
|
+
* Orb's idempotency guarantees allow you to implement safe retry logic in the event of network or machine failures,
|
|
911
|
+
* ensuring data fidelity. Each event in the request payload is associated with an idempotency key, and Orb guarantees that
|
|
912
|
+
* a single idempotency key will be successfully ingested at most once.
|
|
460
913
|
*
|
|
461
|
-
* - Successful responses return a 200 HTTP status code. The response contains information about previously processed
|
|
462
|
-
*
|
|
463
|
-
* - Requests that return a `
|
|
914
|
+
* - Successful responses return a 200 HTTP status code. The response contains information about previously processed
|
|
915
|
+
* events.
|
|
916
|
+
* - Requests that return a `4xx` HTTP status code indicate a payload error and contain at least one event with a
|
|
917
|
+
* validation failure. An event with a validation failure can be re-sent to the ingestion endpoint (after the payload is
|
|
918
|
+
* fixed) with the original idempotency key since that key is not marked as processed.
|
|
919
|
+
* - Requests that return a `5xx` HTTP status code indicate a server-side failure. These requests should be retried in
|
|
920
|
+
* their entirety.
|
|
464
921
|
*
|
|
465
922
|
*
|
|
466
923
|
* ## API usage and limits
|
|
467
|
-
* The ingestion API is designed made for real-time streaming ingestion and architected for high throughput. Even if events
|
|
924
|
+
* The ingestion API is designed made for real-time streaming ingestion and architected for high throughput. Even if events
|
|
925
|
+
* are later deemed unnecessary or filtered out, we encourage you to log them to Orb if they may be relevant to billing
|
|
926
|
+
* calculations in the future.
|
|
468
927
|
*
|
|
469
|
-
* To take advantage of the real-time features of the Orb platform and avoid any chance of dropped events by producers, we
|
|
928
|
+
* To take advantage of the real-time features of the Orb platform and avoid any chance of dropped events by producers, we
|
|
929
|
+
* recommend reporting events to Orb frequently. Optionally, events can also be briefly aggregated at the source, as this
|
|
930
|
+
* API accepts an array of event bodies.
|
|
470
931
|
*
|
|
471
|
-
* Orb does not currently enforce a hard rate-limit for API usage or a maximum request payload size, but please give us a
|
|
932
|
+
* Orb does not currently enforce a hard rate-limit for API usage or a maximum request payload size, but please give us a
|
|
933
|
+
* heads up if you’re changing either of these factors by an order of magnitude from initial setup.
|
|
472
934
|
*
|
|
473
935
|
* ## Testing in debug mode
|
|
474
|
-
* The ingestion API supports a debug mode, which returns additional verbose output to indicate which event idempotency
|
|
936
|
+
* The ingestion API supports a debug mode, which returns additional verbose output to indicate which event idempotency
|
|
937
|
+
* keys were newly ingested or duplicates from previous requests. To enable this mode, mark `debug=true` as a query
|
|
938
|
+
* parameter.
|
|
475
939
|
*
|
|
476
|
-
* If `debug=true` is not specified, the response will only contain `validation_failed`. Orb will still honor the
|
|
940
|
+
* If `debug=true` is not specified, the response will only contain `validation_failed`. Orb will still honor the
|
|
941
|
+
* idempotency guarantees set [here](../guides/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all
|
|
942
|
+
* cases.
|
|
477
943
|
*
|
|
478
|
-
* We strongly recommend that you only use debug mode as part of testing your initial Orb integration. Once you're ready to
|
|
944
|
+
* We strongly recommend that you only use debug mode as part of testing your initial Orb integration. Once you're ready to
|
|
945
|
+
* switch to production, disable debug mode to take advantage of improved performance and maximal throughput.
|
|
479
946
|
*
|
|
480
947
|
* #### Example: ingestion response with `debug=true`
|
|
481
948
|
*
|
|
482
949
|
* ```json
|
|
483
950
|
* {
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
951
|
+
* "debug": {
|
|
952
|
+
* "duplicate": [],
|
|
953
|
+
* "ingested": [
|
|
954
|
+
* "B7E83HDMfJPAunXW",
|
|
955
|
+
* "SJs5DQJ3TnwSqEZE",
|
|
956
|
+
* "8SivfDsNKwCeAXim"
|
|
957
|
+
* ]
|
|
958
|
+
* },
|
|
959
|
+
* "validation_failed": []
|
|
493
960
|
* }
|
|
494
961
|
* ```
|
|
495
962
|
*
|
|
@@ -497,14 +964,14 @@ var Event = /** @class */ (function () {
|
|
|
497
964
|
*
|
|
498
965
|
* ```json
|
|
499
966
|
* {
|
|
500
|
-
*
|
|
967
|
+
* "validation_failed": []
|
|
501
968
|
* }
|
|
502
969
|
* ```
|
|
503
970
|
*/
|
|
504
971
|
Event.prototype.ingest = function (req, config) {
|
|
505
972
|
var _a, _b;
|
|
506
973
|
return __awaiter(this, void 0, void 0, function () {
|
|
507
|
-
var baseURL, url, _c, reqBodyHeaders, reqBody, client, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
974
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
508
975
|
var _d;
|
|
509
976
|
return __generator(this, function (_e) {
|
|
510
977
|
switch (_e.label) {
|
|
@@ -514,24 +981,33 @@ var Event = /** @class */ (function () {
|
|
|
514
981
|
}
|
|
515
982
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
516
983
|
url = baseURL.replace(/\/$/, "") + "/ingest";
|
|
517
|
-
_c = __read([{},
|
|
984
|
+
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
518
985
|
try {
|
|
519
|
-
_d = __read(utils.serializeRequestBody(req, "
|
|
986
|
+
_d = __read(utils.serializeRequestBody(req, "ingestRequestBody", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
520
987
|
}
|
|
521
988
|
catch (e) {
|
|
522
989
|
if (e instanceof Error) {
|
|
523
990
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
524
991
|
}
|
|
525
992
|
}
|
|
526
|
-
client = this.sdkConfiguration.
|
|
527
|
-
|
|
993
|
+
client = this.sdkConfiguration.defaultClient;
|
|
994
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
995
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
996
|
+
return [4 /*yield*/, globalSecurity()];
|
|
997
|
+
case 1:
|
|
998
|
+
globalSecurity = _e.sent();
|
|
999
|
+
_e.label = 2;
|
|
1000
|
+
case 2:
|
|
1001
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1002
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1003
|
+
}
|
|
1004
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1005
|
+
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
528
1006
|
queryParams = utils.serializeQueryParams(req);
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
headers["Accept"] = "application/json;q=1, application/json;q=0";
|
|
532
|
-
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
1007
|
+
headers["Accept"] = "application/json";
|
|
1008
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
533
1009
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
534
|
-
case
|
|
1010
|
+
case 3:
|
|
535
1011
|
httpRes = _e.sent();
|
|
536
1012
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
537
1013
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -548,10 +1024,64 @@ var Event = /** @class */ (function () {
|
|
|
548
1024
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
549
1025
|
res.ingestionResponse = utils.objectToClass(JSON.parse(decodedRes), shared.IngestionResponse);
|
|
550
1026
|
}
|
|
1027
|
+
else {
|
|
1028
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1029
|
+
}
|
|
551
1030
|
break;
|
|
552
1031
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
553
1032
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
554
|
-
res.
|
|
1033
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
1034
|
+
}
|
|
1035
|
+
else {
|
|
1036
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1037
|
+
}
|
|
1038
|
+
break;
|
|
1039
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
1040
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1041
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
1042
|
+
}
|
|
1043
|
+
else {
|
|
1044
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1045
|
+
}
|
|
1046
|
+
break;
|
|
1047
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
1048
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1049
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
1050
|
+
}
|
|
1051
|
+
else {
|
|
1052
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1053
|
+
}
|
|
1054
|
+
break;
|
|
1055
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
1056
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1057
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
1058
|
+
}
|
|
1059
|
+
else {
|
|
1060
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1061
|
+
}
|
|
1062
|
+
break;
|
|
1063
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
1064
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1065
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
1066
|
+
}
|
|
1067
|
+
else {
|
|
1068
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1069
|
+
}
|
|
1070
|
+
break;
|
|
1071
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
1072
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1073
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
1074
|
+
}
|
|
1075
|
+
else {
|
|
1076
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1077
|
+
}
|
|
1078
|
+
break;
|
|
1079
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
1080
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1081
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
1082
|
+
}
|
|
1083
|
+
else {
|
|
1084
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
555
1085
|
}
|
|
556
1086
|
break;
|
|
557
1087
|
}
|
|
@@ -566,12 +1096,14 @@ var Event = /** @class */ (function () {
|
|
|
566
1096
|
* @remarks
|
|
567
1097
|
* This endpoint returns a list of all backfills in a list format.
|
|
568
1098
|
*
|
|
569
|
-
* The list of backfills is ordered starting from the most recently created backfill. The response also includes
|
|
1099
|
+
* The list of backfills is ordered starting from the most recently created backfill. The response also includes
|
|
1100
|
+
* [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they
|
|
1101
|
+
* exist. More information about pagination can be found in the [Pagination-metadata schema](pagination).
|
|
570
1102
|
*/
|
|
571
1103
|
Event.prototype.listBackfills = function (req, config) {
|
|
572
1104
|
var _a, _b;
|
|
573
1105
|
return __awaiter(this, void 0, void 0, function () {
|
|
574
|
-
var baseURL, url, client, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
1106
|
+
var baseURL, url, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
575
1107
|
return __generator(this, function (_c) {
|
|
576
1108
|
switch (_c.label) {
|
|
577
1109
|
case 0:
|
|
@@ -580,13 +1112,24 @@ var Event = /** @class */ (function () {
|
|
|
580
1112
|
}
|
|
581
1113
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
582
1114
|
url = baseURL.replace(/\/$/, "") + "/events/backfills";
|
|
583
|
-
client = this.sdkConfiguration.
|
|
584
|
-
|
|
1115
|
+
client = this.sdkConfiguration.defaultClient;
|
|
1116
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1117
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1118
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1119
|
+
case 1:
|
|
1120
|
+
globalSecurity = _c.sent();
|
|
1121
|
+
_c.label = 2;
|
|
1122
|
+
case 2:
|
|
1123
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1124
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1125
|
+
}
|
|
1126
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1127
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
585
1128
|
queryParams = utils.serializeQueryParams(req);
|
|
586
1129
|
headers["Accept"] = "application/json";
|
|
587
|
-
headers["user-agent"] =
|
|
1130
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
588
1131
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
589
|
-
case
|
|
1132
|
+
case 3:
|
|
590
1133
|
httpRes = _c.sent();
|
|
591
1134
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
592
1135
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -603,6 +1146,65 @@ var Event = /** @class */ (function () {
|
|
|
603
1146
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
604
1147
|
res.backfills = utils.objectToClass(JSON.parse(decodedRes), shared.Backfills);
|
|
605
1148
|
}
|
|
1149
|
+
else {
|
|
1150
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1151
|
+
}
|
|
1152
|
+
break;
|
|
1153
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
1154
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1155
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
1156
|
+
}
|
|
1157
|
+
else {
|
|
1158
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1159
|
+
}
|
|
1160
|
+
break;
|
|
1161
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
1162
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1163
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
1164
|
+
}
|
|
1165
|
+
else {
|
|
1166
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1167
|
+
}
|
|
1168
|
+
break;
|
|
1169
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
1170
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1171
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
1172
|
+
}
|
|
1173
|
+
else {
|
|
1174
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1175
|
+
}
|
|
1176
|
+
break;
|
|
1177
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
1178
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1179
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
1180
|
+
}
|
|
1181
|
+
else {
|
|
1182
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1183
|
+
}
|
|
1184
|
+
break;
|
|
1185
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
1186
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1187
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
1188
|
+
}
|
|
1189
|
+
else {
|
|
1190
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1191
|
+
}
|
|
1192
|
+
break;
|
|
1193
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
1194
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1195
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
1196
|
+
}
|
|
1197
|
+
else {
|
|
1198
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1199
|
+
}
|
|
1200
|
+
break;
|
|
1201
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
1202
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1203
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
1204
|
+
}
|
|
1205
|
+
else {
|
|
1206
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1207
|
+
}
|
|
606
1208
|
break;
|
|
607
1209
|
}
|
|
608
1210
|
return [2 /*return*/, res];
|
|
@@ -614,14 +1216,17 @@ var Event = /** @class */ (function () {
|
|
|
614
1216
|
* Revert backfill
|
|
615
1217
|
*
|
|
616
1218
|
* @remarks
|
|
617
|
-
* Reverting a backfill undoes all the effects of closing the backfill. If the backfill is reflected, the status will
|
|
1219
|
+
* Reverting a backfill undoes all the effects of closing the backfill. If the backfill is reflected, the status will
|
|
1220
|
+
* transition to `pending_revert` while the effects of the backfill are undone. Once all effects are undone, the
|
|
1221
|
+
* backfill will transition to `reverted`.
|
|
618
1222
|
*
|
|
619
|
-
* If a backfill is reverted before its closed, no usage will be updated as a result of the backfill and it will
|
|
1223
|
+
* If a backfill is reverted before its closed, no usage will be updated as a result of the backfill and it will
|
|
1224
|
+
* immediately transition to `reverted`.
|
|
620
1225
|
*/
|
|
621
1226
|
Event.prototype.revertBackfill = function (req, config) {
|
|
622
1227
|
var _a, _b;
|
|
623
1228
|
return __awaiter(this, void 0, void 0, function () {
|
|
624
|
-
var baseURL, url, client, headers, httpRes, contentType, res, decodedRes;
|
|
1229
|
+
var baseURL, url, client, globalSecurity, properties, headers, httpRes, contentType, res, decodedRes;
|
|
625
1230
|
return __generator(this, function (_c) {
|
|
626
1231
|
switch (_c.label) {
|
|
627
1232
|
case 0:
|
|
@@ -630,12 +1235,23 @@ var Event = /** @class */ (function () {
|
|
|
630
1235
|
}
|
|
631
1236
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
632
1237
|
url = utils.generateURL(baseURL, "/events/backfills/{backfill_id}/revert", req);
|
|
633
|
-
client = this.sdkConfiguration.
|
|
634
|
-
|
|
1238
|
+
client = this.sdkConfiguration.defaultClient;
|
|
1239
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1240
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1241
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1242
|
+
case 1:
|
|
1243
|
+
globalSecurity = _c.sent();
|
|
1244
|
+
_c.label = 2;
|
|
1245
|
+
case 2:
|
|
1246
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1247
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1248
|
+
}
|
|
1249
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1250
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
635
1251
|
headers["Accept"] = "application/json";
|
|
636
|
-
headers["user-agent"] =
|
|
1252
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
637
1253
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer" }, config))];
|
|
638
|
-
case
|
|
1254
|
+
case 3:
|
|
639
1255
|
httpRes = _c.sent();
|
|
640
1256
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
641
1257
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -652,6 +1268,65 @@ var Event = /** @class */ (function () {
|
|
|
652
1268
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
653
1269
|
res.backfill = utils.objectToClass(JSON.parse(decodedRes), shared.Backfill);
|
|
654
1270
|
}
|
|
1271
|
+
else {
|
|
1272
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1273
|
+
}
|
|
1274
|
+
break;
|
|
1275
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
1276
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1277
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
1278
|
+
}
|
|
1279
|
+
else {
|
|
1280
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1281
|
+
}
|
|
1282
|
+
break;
|
|
1283
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
1284
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1285
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
1286
|
+
}
|
|
1287
|
+
else {
|
|
1288
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1289
|
+
}
|
|
1290
|
+
break;
|
|
1291
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
1292
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1293
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
1294
|
+
}
|
|
1295
|
+
else {
|
|
1296
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1297
|
+
}
|
|
1298
|
+
break;
|
|
1299
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
1300
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1301
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
1302
|
+
}
|
|
1303
|
+
else {
|
|
1304
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1305
|
+
}
|
|
1306
|
+
break;
|
|
1307
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
1308
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1309
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
1310
|
+
}
|
|
1311
|
+
else {
|
|
1312
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1313
|
+
}
|
|
1314
|
+
break;
|
|
1315
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
1316
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1317
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
1318
|
+
}
|
|
1319
|
+
else {
|
|
1320
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1321
|
+
}
|
|
1322
|
+
break;
|
|
1323
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
1324
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1325
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
1326
|
+
}
|
|
1327
|
+
else {
|
|
1328
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1329
|
+
}
|
|
655
1330
|
break;
|
|
656
1331
|
}
|
|
657
1332
|
return [2 /*return*/, res];
|
|
@@ -665,11 +1340,15 @@ var Event = /** @class */ (function () {
|
|
|
665
1340
|
* @remarks
|
|
666
1341
|
* This endpoint returns a filtered set of events for an account in a [paginated list format](../reference/pagination).
|
|
667
1342
|
*
|
|
668
|
-
* Note that this is a `POST` endpoint rather than a `GET` endpoint because it employs a JSON body for search criteria
|
|
1343
|
+
* Note that this is a `POST` endpoint rather than a `GET` endpoint because it employs a JSON body for search criteria
|
|
1344
|
+
* rather than query parameters, allowing for a more flexible search syntax.
|
|
669
1345
|
*
|
|
670
1346
|
* Note that a search criteria _must_ be specified. Currently, Orb supports the following criteria:
|
|
671
|
-
* - `event_ids`: This is an explicit array of IDs to filter by. Note that an event's ID is the `idempotency_key` that
|
|
672
|
-
*
|
|
1347
|
+
* - `event_ids`: This is an explicit array of IDs to filter by. Note that an event's ID is the `idempotency_key` that
|
|
1348
|
+
* was originally used for ingestion.
|
|
1349
|
+
* - `invoice_id`: This is an issued Orb invoice ID (see also [List Invoices](list-invoices)). Orb will fetch all
|
|
1350
|
+
* events that were used to calculate the invoice. In the common case, this will be a list of events whose
|
|
1351
|
+
* `timestamp` property falls within the billing period specified by the invoice.
|
|
673
1352
|
*
|
|
674
1353
|
* By default, Orb does not return _deprecated_ events in this endpoint.
|
|
675
1354
|
*
|
|
@@ -678,7 +1357,7 @@ var Event = /** @class */ (function () {
|
|
|
678
1357
|
Event.prototype.search = function (req, config) {
|
|
679
1358
|
var _a, _b;
|
|
680
1359
|
return __awaiter(this, void 0, void 0, function () {
|
|
681
|
-
var baseURL, url, _c, reqBodyHeaders, reqBody, client, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
1360
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
682
1361
|
var _d;
|
|
683
1362
|
return __generator(this, function (_e) {
|
|
684
1363
|
switch (_e.label) {
|
|
@@ -688,7 +1367,7 @@ var Event = /** @class */ (function () {
|
|
|
688
1367
|
}
|
|
689
1368
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
690
1369
|
url = baseURL.replace(/\/$/, "") + "/events/search";
|
|
691
|
-
_c = __read([{},
|
|
1370
|
+
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
692
1371
|
try {
|
|
693
1372
|
_d = __read(utils.serializeRequestBody(req, "eventSearchCriteria", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
694
1373
|
}
|
|
@@ -697,13 +1376,24 @@ var Event = /** @class */ (function () {
|
|
|
697
1376
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
698
1377
|
}
|
|
699
1378
|
}
|
|
700
|
-
client = this.sdkConfiguration.
|
|
701
|
-
|
|
1379
|
+
client = this.sdkConfiguration.defaultClient;
|
|
1380
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1381
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1382
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1383
|
+
case 1:
|
|
1384
|
+
globalSecurity = _e.sent();
|
|
1385
|
+
_e.label = 2;
|
|
1386
|
+
case 2:
|
|
1387
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1388
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1389
|
+
}
|
|
1390
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1391
|
+
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
702
1392
|
queryParams = utils.serializeQueryParams(req);
|
|
703
1393
|
headers["Accept"] = "application/json";
|
|
704
|
-
headers["user-agent"] =
|
|
1394
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
705
1395
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
706
|
-
case
|
|
1396
|
+
case 3:
|
|
707
1397
|
httpRes = _e.sent();
|
|
708
1398
|
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
709
1399
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -718,7 +1408,66 @@ var Event = /** @class */ (function () {
|
|
|
718
1408
|
switch (true) {
|
|
719
1409
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
720
1410
|
if (utils.matchContentType(contentType, "application/json")) {
|
|
721
|
-
res.
|
|
1411
|
+
res.events = utils.objectToClass(JSON.parse(decodedRes), shared.Events);
|
|
1412
|
+
}
|
|
1413
|
+
else {
|
|
1414
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1415
|
+
}
|
|
1416
|
+
break;
|
|
1417
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
1418
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1419
|
+
res.fourHundredError = JSON.parse(decodedRes);
|
|
1420
|
+
}
|
|
1421
|
+
else {
|
|
1422
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1423
|
+
}
|
|
1424
|
+
break;
|
|
1425
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 401:
|
|
1426
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1427
|
+
res.fourHundredAndOneError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndOneError);
|
|
1428
|
+
}
|
|
1429
|
+
else {
|
|
1430
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1431
|
+
}
|
|
1432
|
+
break;
|
|
1433
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
|
|
1434
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1435
|
+
res.fourHundredAndFourError = JSON.parse(decodedRes);
|
|
1436
|
+
}
|
|
1437
|
+
else {
|
|
1438
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1439
|
+
}
|
|
1440
|
+
break;
|
|
1441
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 409:
|
|
1442
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1443
|
+
res.fourHundredAndNineError = JSON.parse(decodedRes);
|
|
1444
|
+
}
|
|
1445
|
+
else {
|
|
1446
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1447
|
+
}
|
|
1448
|
+
break;
|
|
1449
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 413:
|
|
1450
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1451
|
+
res.fourHundredAndThirteenError = JSON.parse(decodedRes);
|
|
1452
|
+
}
|
|
1453
|
+
else {
|
|
1454
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1455
|
+
}
|
|
1456
|
+
break;
|
|
1457
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 429:
|
|
1458
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1459
|
+
res.fourHundredAndTwentyNineError = utils.objectToClass(JSON.parse(decodedRes), shared.FourHundredAndTwentyNineError);
|
|
1460
|
+
}
|
|
1461
|
+
else {
|
|
1462
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
1463
|
+
}
|
|
1464
|
+
break;
|
|
1465
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
|
|
1466
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
1467
|
+
res.fiveHundredError = utils.objectToClass(JSON.parse(decodedRes), shared.FiveHundredError);
|
|
1468
|
+
}
|
|
1469
|
+
else {
|
|
1470
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
722
1471
|
}
|
|
723
1472
|
break;
|
|
724
1473
|
}
|