orb-billing 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +169 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +20 -0
- package/dist/internal/utils/contenttype.d.ts +1 -0
- package/dist/internal/utils/contenttype.js +33 -0
- package/dist/internal/utils/headers.d.ts +4 -0
- package/dist/internal/utils/headers.js +92 -0
- package/dist/internal/utils/index.d.ts +8 -0
- package/dist/internal/utils/index.js +27 -0
- package/dist/internal/utils/pathparams.d.ts +2 -0
- package/dist/internal/utils/pathparams.js +53 -0
- package/dist/internal/utils/queryparams.d.ts +2 -0
- package/dist/internal/utils/queryparams.js +178 -0
- package/dist/internal/utils/requestbody.d.ts +2 -0
- package/dist/internal/utils/requestbody.js +318 -0
- package/dist/internal/utils/retries.d.ts +20 -0
- package/dist/internal/utils/retries.js +250 -0
- package/dist/internal/utils/security.d.ts +2 -0
- package/dist/internal/utils/security.js +188 -0
- package/dist/internal/utils/utils.d.ts +37 -0
- package/dist/internal/utils/utils.js +370 -0
- package/dist/sdk/availability.d.ts +19 -0
- package/dist/sdk/availability.js +135 -0
- package/dist/sdk/coupon.d.ts +53 -0
- package/dist/sdk/coupon.js +358 -0
- package/dist/sdk/credit.d.ts +142 -0
- package/dist/sdk/credit.js +501 -0
- package/dist/sdk/creditnote.d.ts +26 -0
- package/dist/sdk/creditnote.js +186 -0
- package/dist/sdk/customer.d.ts +264 -0
- package/dist/sdk/customer.js +958 -0
- package/dist/sdk/event.d.ts +258 -0
- package/dist/sdk/event.js +732 -0
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.js +20 -0
- package/dist/sdk/invoice.d.ts +60 -0
- package/dist/sdk/invoice.js +416 -0
- package/dist/sdk/models/operations/addledgerentryexternalid.d.ts +16 -0
- package/dist/sdk/models/operations/addledgerentryexternalid.js +95 -0
- package/dist/sdk/models/operations/amendevent.d.ts +23 -0
- package/dist/sdk/models/operations/amendevent.js +99 -0
- package/dist/sdk/models/operations/amendusage.d.ts +34 -0
- package/dist/sdk/models/operations/amendusage.js +122 -0
- package/dist/sdk/models/operations/amendusageexternalcustomerid.d.ts +34 -0
- package/dist/sdk/models/operations/amendusageexternalcustomerid.js +122 -0
- package/dist/sdk/models/operations/archivecoupon.d.ts +15 -0
- package/dist/sdk/models/operations/archivecoupon.js +91 -0
- package/dist/sdk/models/operations/cancelsubscription.d.ts +16 -0
- package/dist/sdk/models/operations/cancelsubscription.js +95 -0
- package/dist/sdk/models/operations/closebackfill.d.ts +15 -0
- package/dist/sdk/models/operations/closebackfill.js +91 -0
- package/dist/sdk/models/operations/createbackfill.d.ts +12 -0
- package/dist/sdk/models/operations/createbackfill.js +79 -0
- package/dist/sdk/models/operations/createcoupon.d.ts +12 -0
- package/dist/sdk/models/operations/createcoupon.js +79 -0
- package/dist/sdk/models/operations/createcustomer.d.ts +12 -0
- package/dist/sdk/models/operations/createcustomer.js +79 -0
- package/dist/sdk/models/operations/createcustomerbalancetransaction.d.ts +16 -0
- package/dist/sdk/models/operations/createcustomerbalancetransaction.js +95 -0
- package/dist/sdk/models/operations/createinvoicelineitem.d.ts +12 -0
- package/dist/sdk/models/operations/createinvoicelineitem.js +79 -0
- package/dist/sdk/models/operations/createledgerentry.d.ts +16 -0
- package/dist/sdk/models/operations/createledgerentry.js +95 -0
- package/dist/sdk/models/operations/createsubscription.d.ts +12 -0
- package/dist/sdk/models/operations/createsubscription.js +79 -0
- package/dist/sdk/models/operations/deletecustomer.d.ts +22 -0
- package/dist/sdk/models/operations/deletecustomer.js +78 -0
- package/dist/sdk/models/operations/deprecateevent.d.ts +22 -0
- package/dist/sdk/models/operations/deprecateevent.js +95 -0
- package/dist/sdk/models/operations/fetchcoupon.d.ts +15 -0
- package/dist/sdk/models/operations/fetchcoupon.js +91 -0
- package/dist/sdk/models/operations/fetchcreditnote.d.ts +18 -0
- package/dist/sdk/models/operations/fetchcreditnote.js +91 -0
- package/dist/sdk/models/operations/fetchcustomer.d.ts +18 -0
- package/dist/sdk/models/operations/fetchcustomer.js +91 -0
- package/dist/sdk/models/operations/fetchcustomercosts.d.ts +34 -0
- package/dist/sdk/models/operations/fetchcustomercosts.js +107 -0
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.d.ts +31 -0
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.js +107 -0
- package/dist/sdk/models/operations/fetchcustomercredits.d.ts +26 -0
- package/dist/sdk/models/operations/fetchcustomercredits.js +99 -0
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.d.ts +23 -0
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.js +99 -0
- package/dist/sdk/models/operations/fetchcustomercreditsledger.d.ts +35 -0
- package/dist/sdk/models/operations/fetchcustomercreditsledger.js +111 -0
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.d.ts +35 -0
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.js +111 -0
- package/dist/sdk/models/operations/fetchcustomerexternalid.d.ts +15 -0
- package/dist/sdk/models/operations/fetchcustomerexternalid.js +91 -0
- package/dist/sdk/models/operations/fetchinvoice.d.ts +15 -0
- package/dist/sdk/models/operations/fetchinvoice.js +91 -0
- package/dist/sdk/models/operations/fetchplan.d.ts +15 -0
- package/dist/sdk/models/operations/fetchplan.js +91 -0
- package/dist/sdk/models/operations/fetchplanexternalid.d.ts +15 -0
- package/dist/sdk/models/operations/fetchplanexternalid.js +91 -0
- package/dist/sdk/models/operations/fetchsubscription.d.ts +15 -0
- package/dist/sdk/models/operations/fetchsubscription.js +91 -0
- package/dist/sdk/models/operations/fetchsubscriptioncosts.d.ts +31 -0
- package/dist/sdk/models/operations/fetchsubscriptioncosts.js +107 -0
- package/dist/sdk/models/operations/fetchsubscriptionschedule.d.ts +23 -0
- package/dist/sdk/models/operations/fetchsubscriptionschedule.js +99 -0
- package/dist/sdk/models/operations/fetchsubscriptionusage.d.ts +39 -0
- package/dist/sdk/models/operations/fetchsubscriptionusage.js +115 -0
- package/dist/sdk/models/operations/fetchupcominginvoice.d.ts +15 -0
- package/dist/sdk/models/operations/fetchupcominginvoice.js +91 -0
- package/dist/sdk/models/operations/index.d.ts +55 -0
- package/dist/sdk/models/operations/index.js +74 -0
- package/dist/sdk/models/operations/ingest.d.ts +30 -0
- package/dist/sdk/models/operations/ingest.js +118 -0
- package/dist/sdk/models/operations/issueinvoice.d.ts +19 -0
- package/dist/sdk/models/operations/issueinvoice.js +95 -0
- package/dist/sdk/models/operations/listbackfills.d.ts +22 -0
- package/dist/sdk/models/operations/listbackfills.js +95 -0
- package/dist/sdk/models/operations/listbalancetransactions.d.ts +23 -0
- package/dist/sdk/models/operations/listbalancetransactions.js +99 -0
- package/dist/sdk/models/operations/listcoupons.d.ts +30 -0
- package/dist/sdk/models/operations/listcoupons.js +103 -0
- package/dist/sdk/models/operations/listcouponsubscriptions.d.ts +15 -0
- package/dist/sdk/models/operations/listcouponsubscriptions.js +91 -0
- package/dist/sdk/models/operations/listcreditnote.d.ts +34 -0
- package/dist/sdk/models/operations/listcreditnote.js +107 -0
- package/dist/sdk/models/operations/listcustomers.d.ts +22 -0
- package/dist/sdk/models/operations/listcustomers.js +95 -0
- package/dist/sdk/models/operations/listinvoices.d.ts +38 -0
- package/dist/sdk/models/operations/listinvoices.js +111 -0
- package/dist/sdk/models/operations/listplans.d.ts +22 -0
- package/dist/sdk/models/operations/listplans.js +95 -0
- package/dist/sdk/models/operations/listsubscriptions.d.ts +24 -0
- package/dist/sdk/models/operations/listsubscriptions.js +103 -0
- package/dist/sdk/models/operations/ping.d.ts +12 -0
- package/dist/sdk/models/operations/ping.js +79 -0
- package/dist/sdk/models/operations/revertbackfill.d.ts +15 -0
- package/dist/sdk/models/operations/revertbackfill.js +91 -0
- package/dist/sdk/models/operations/scheduleplanchange.d.ts +16 -0
- package/dist/sdk/models/operations/scheduleplanchange.js +95 -0
- package/dist/sdk/models/operations/searchevents.d.ts +23 -0
- package/dist/sdk/models/operations/searchevents.js +99 -0
- package/dist/sdk/models/operations/unschedulecancellation.d.ts +15 -0
- package/dist/sdk/models/operations/unschedulecancellation.js +91 -0
- package/dist/sdk/models/operations/unscheduleplanchange.d.ts +15 -0
- package/dist/sdk/models/operations/unscheduleplanchange.js +91 -0
- package/dist/sdk/models/operations/updatecustomer.d.ts +19 -0
- package/dist/sdk/models/operations/updatecustomer.js +95 -0
- package/dist/sdk/models/operations/updatecustomerexternalid.d.ts +16 -0
- package/dist/sdk/models/operations/updatecustomerexternalid.js +95 -0
- package/dist/sdk/models/operations/updatefixedfeequantity.d.ts +16 -0
- package/dist/sdk/models/operations/updatefixedfeequantity.js +95 -0
- package/dist/sdk/models/operations/voidinvoice.d.ts +19 -0
- package/dist/sdk/models/operations/voidinvoice.js +95 -0
- package/dist/sdk/models/shared/action.d.ts +8 -0
- package/dist/sdk/models/shared/action.js +15 -0
- package/dist/sdk/models/shared/amendedevent.d.ts +28 -0
- package/dist/sdk/models/shared/amendedevent.js +81 -0
- package/dist/sdk/models/shared/amendedusage.d.ts +16 -0
- package/dist/sdk/models/shared/amendedusage.js +62 -0
- package/dist/sdk/models/shared/amendeventresult.d.ts +10 -0
- package/dist/sdk/models/shared/amendeventresult.js +48 -0
- package/dist/sdk/models/shared/autocollection.d.ts +18 -0
- package/dist/sdk/models/shared/autocollection.js +66 -0
- package/dist/sdk/models/shared/availability.d.ts +7 -0
- package/dist/sdk/models/shared/availability.js +48 -0
- package/dist/sdk/models/shared/backfill.d.ts +27 -0
- package/dist/sdk/models/shared/backfill.js +104 -0
- package/dist/sdk/models/shared/backfills.d.ts +10 -0
- package/dist/sdk/models/shared/backfills.js +57 -0
- package/dist/sdk/models/shared/backfillstatus.d.ts +9 -0
- package/dist/sdk/models/shared/backfillstatus.js +16 -0
- package/dist/sdk/models/shared/billablemetric.d.ts +4 -0
- package/dist/sdk/models/shared/billablemetric.js +45 -0
- package/dist/sdk/models/shared/billablemetricminified.d.ts +5 -0
- package/dist/sdk/models/shared/billablemetricminified.js +50 -0
- package/dist/sdk/models/shared/bpsconfig.d.ts +8 -0
- package/dist/sdk/models/shared/bpsconfig.js +53 -0
- package/dist/sdk/models/shared/bpspriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/bpspriceoverride.js +74 -0
- package/dist/sdk/models/shared/bpstier.d.ts +7 -0
- package/dist/sdk/models/shared/bpstier.js +60 -0
- package/dist/sdk/models/shared/bulkbpsconfig.d.ts +8 -0
- package/dist/sdk/models/shared/bulkbpsconfig.js +50 -0
- package/dist/sdk/models/shared/bulkbpspriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/bulkbpspriceoverride.js +74 -0
- package/dist/sdk/models/shared/bulkbpstier.d.ts +6 -0
- package/dist/sdk/models/shared/bulkbpstier.js +55 -0
- package/dist/sdk/models/shared/bulkconfig.d.ts +8 -0
- package/dist/sdk/models/shared/bulkconfig.js +50 -0
- package/dist/sdk/models/shared/bulkpriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/bulkpriceoverride.js +74 -0
- package/dist/sdk/models/shared/bulktier.d.ts +5 -0
- package/dist/sdk/models/shared/bulktier.js +50 -0
- package/dist/sdk/models/shared/cadence.d.ts +5 -0
- package/dist/sdk/models/shared/cadence.js +12 -0
- package/dist/sdk/models/shared/canceloption.d.ts +8 -0
- package/dist/sdk/models/shared/canceloption.js +15 -0
- package/dist/sdk/models/shared/changeoption.d.ts +8 -0
- package/dist/sdk/models/shared/changeoption.js +15 -0
- package/dist/sdk/models/shared/changeoption1.d.ts +8 -0
- package/dist/sdk/models/shared/changeoption1.js +15 -0
- package/dist/sdk/models/shared/coupon.d.ts +36 -0
- package/dist/sdk/models/shared/coupon.js +88 -0
- package/dist/sdk/models/shared/coupons.d.ts +10 -0
- package/dist/sdk/models/shared/coupons.js +57 -0
- package/dist/sdk/models/shared/credit.d.ts +16 -0
- package/dist/sdk/models/shared/credit.js +64 -0
- package/dist/sdk/models/shared/creditblock.d.ts +15 -0
- package/dist/sdk/models/shared/creditblock.js +58 -0
- package/dist/sdk/models/shared/creditledgerentries.d.ts +10 -0
- package/dist/sdk/models/shared/creditledgerentries.js +57 -0
- package/dist/sdk/models/shared/creditledgerentry.d.ts +58 -0
- package/dist/sdk/models/shared/creditledgerentry.js +144 -0
- package/dist/sdk/models/shared/creditnote.d.ts +71 -0
- package/dist/sdk/models/shared/creditnote.js +134 -0
- package/dist/sdk/models/shared/creditnotelineitem.d.ts +38 -0
- package/dist/sdk/models/shared/creditnotelineitem.js +86 -0
- package/dist/sdk/models/shared/creditnotes.d.ts +10 -0
- package/dist/sdk/models/shared/creditnotes.js +57 -0
- package/dist/sdk/models/shared/creditnotesummary.d.ts +9 -0
- package/dist/sdk/models/shared/creditnotesummary.js +74 -0
- package/dist/sdk/models/shared/creditnotetype.d.ts +7 -0
- package/dist/sdk/models/shared/creditnotetype.js +14 -0
- package/dist/sdk/models/shared/credits.d.ts +10 -0
- package/dist/sdk/models/shared/credits.js +57 -0
- package/dist/sdk/models/shared/customer.d.ts +227 -0
- package/dist/sdk/models/shared/customer.js +364 -0
- package/dist/sdk/models/shared/customerbalancetransaction.d.ts +57 -0
- package/dist/sdk/models/shared/customerbalancetransaction.js +133 -0
- package/dist/sdk/models/shared/customercost.d.ts +15 -0
- package/dist/sdk/models/shared/customercost.js +75 -0
- package/dist/sdk/models/shared/customercosts.d.ts +8 -0
- package/dist/sdk/models/shared/customercosts.js +50 -0
- package/dist/sdk/models/shared/customerminified.d.ts +8 -0
- package/dist/sdk/models/shared/customerminified.js +53 -0
- package/dist/sdk/models/shared/customers.d.ts +10 -0
- package/dist/sdk/models/shared/customers.js +57 -0
- package/dist/sdk/models/shared/debug.d.ts +8 -0
- package/dist/sdk/models/shared/debug.js +53 -0
- package/dist/sdk/models/shared/deprecatedeventresult.d.ts +10 -0
- package/dist/sdk/models/shared/deprecatedeventresult.js +48 -0
- package/dist/sdk/models/shared/discount.d.ts +25 -0
- package/dist/sdk/models/shared/discount.js +71 -0
- package/dist/sdk/models/shared/discounttype.d.ts +6 -0
- package/dist/sdk/models/shared/discounttype.js +13 -0
- package/dist/sdk/models/shared/durationunit.d.ts +8 -0
- package/dist/sdk/models/shared/durationunit.js +15 -0
- package/dist/sdk/models/shared/entrystatus.d.ts +7 -0
- package/dist/sdk/models/shared/entrystatus.js +14 -0
- package/dist/sdk/models/shared/entrytype.d.ts +9 -0
- package/dist/sdk/models/shared/entrytype.js +16 -0
- package/dist/sdk/models/shared/event.d.ts +32 -0
- package/dist/sdk/models/shared/event.js +82 -0
- package/dist/sdk/models/shared/eventsearchcriteria.d.ts +11 -0
- package/dist/sdk/models/shared/eventsearchcriteria.js +50 -0
- package/dist/sdk/models/shared/eventsearchresults.d.ts +10 -0
- package/dist/sdk/models/shared/eventsearchresults.js +57 -0
- package/dist/sdk/models/shared/externalmarketplace.d.ts +8 -0
- package/dist/sdk/models/shared/externalmarketplace.js +15 -0
- package/dist/sdk/models/shared/fixedfeequantitychange.d.ts +18 -0
- package/dist/sdk/models/shared/fixedfeequantitychange.js +66 -0
- package/dist/sdk/models/shared/fixedfeequantityschedule.d.ts +7 -0
- package/dist/sdk/models/shared/fixedfeequantityschedule.js +68 -0
- package/dist/sdk/models/shared/granularity.d.ts +6 -0
- package/dist/sdk/models/shared/granularity.js +13 -0
- package/dist/sdk/models/shared/grouping.d.ts +8 -0
- package/dist/sdk/models/shared/grouping.js +53 -0
- package/dist/sdk/models/shared/index.d.ts +125 -0
- package/dist/sdk/models/shared/index.js +144 -0
- package/dist/sdk/models/shared/ingestionresponse.d.ts +13 -0
- package/dist/sdk/models/shared/ingestionresponse.js +57 -0
- package/dist/sdk/models/shared/invoice.d.ts +274 -0
- package/dist/sdk/models/shared/invoice.js +460 -0
- package/dist/sdk/models/shared/invoicelineitem.d.ts +207 -0
- package/dist/sdk/models/shared/invoicelineitem.js +416 -0
- package/dist/sdk/models/shared/invoices.d.ts +10 -0
- package/dist/sdk/models/shared/invoices.js +57 -0
- package/dist/sdk/models/shared/invoicesettings.d.ts +18 -0
- package/dist/sdk/models/shared/invoicesettings.js +58 -0
- package/dist/sdk/models/shared/invoicestatus.d.ts +10 -0
- package/dist/sdk/models/shared/invoicestatus.js +17 -0
- package/dist/sdk/models/shared/lineitem.d.ts +58 -0
- package/dist/sdk/models/shared/lineitem.js +147 -0
- package/dist/sdk/models/shared/matrixconfig.d.ts +13 -0
- package/dist/sdk/models/shared/matrixconfig.js +60 -0
- package/dist/sdk/models/shared/matrixconfig1.d.ts +10 -0
- package/dist/sdk/models/shared/matrixconfig1.js +48 -0
- package/dist/sdk/models/shared/matrixvalue.d.ts +8 -0
- package/dist/sdk/models/shared/matrixvalue.js +50 -0
- package/dist/sdk/models/shared/modeltype.d.ts +10 -0
- package/dist/sdk/models/shared/modeltype.js +17 -0
- package/dist/sdk/models/shared/newbackfill.d.ts +27 -0
- package/dist/sdk/models/shared/newbackfill.js +82 -0
- package/dist/sdk/models/shared/newcoupon.d.ts +24 -0
- package/dist/sdk/models/shared/newcoupon.js +69 -0
- package/dist/sdk/models/shared/newcreditledgerentry.d.ts +44 -0
- package/dist/sdk/models/shared/newcreditledgerentry.js +109 -0
- package/dist/sdk/models/shared/newcustomer.d.ts +202 -0
- package/dist/sdk/models/shared/newcustomer.js +324 -0
- package/dist/sdk/models/shared/newinvoicelineitem.d.ts +28 -0
- package/dist/sdk/models/shared/newinvoicelineitem.js +79 -0
- package/dist/sdk/models/shared/newsubscription.d.ts +79 -0
- package/dist/sdk/models/shared/newsubscription.js +145 -0
- package/dist/sdk/models/shared/newtransaction.d.ts +10 -0
- package/dist/sdk/models/shared/newtransaction.js +56 -0
- package/dist/sdk/models/shared/packageconfig.d.ts +8 -0
- package/dist/sdk/models/shared/packageconfig.js +53 -0
- package/dist/sdk/models/shared/packagepriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/packagepriceoverride.js +74 -0
- package/dist/sdk/models/shared/paginationmetadata.d.ts +5 -0
- package/dist/sdk/models/shared/paginationmetadata.js +50 -0
- package/dist/sdk/models/shared/perpricecost.d.ts +24 -0
- package/dist/sdk/models/shared/perpricecost.js +67 -0
- package/dist/sdk/models/shared/phaseoverride.d.ts +40 -0
- package/dist/sdk/models/shared/phaseoverride.js +100 -0
- package/dist/sdk/models/shared/plan.d.ts +101 -0
- package/dist/sdk/models/shared/plan.js +250 -0
- package/dist/sdk/models/shared/planminified.d.ts +5 -0
- package/dist/sdk/models/shared/planminified.js +50 -0
- package/dist/sdk/models/shared/planphase.d.ts +68 -0
- package/dist/sdk/models/shared/planphase.js +162 -0
- package/dist/sdk/models/shared/plans.d.ts +10 -0
- package/dist/sdk/models/shared/plans.js +57 -0
- package/dist/sdk/models/shared/price.d.ts +114 -0
- package/dist/sdk/models/shared/price.js +245 -0
- package/dist/sdk/models/shared/pricegroup.d.ts +17 -0
- package/dist/sdk/models/shared/pricegroup.js +65 -0
- package/dist/sdk/models/shared/product.d.ts +6 -0
- package/dist/sdk/models/shared/product.js +59 -0
- package/dist/sdk/models/shared/reason.d.ts +9 -0
- package/dist/sdk/models/shared/reason.js +16 -0
- package/dist/sdk/models/shared/requestvalidationerror.d.ts +20 -0
- package/dist/sdk/models/shared/requestvalidationerror.js +65 -0
- package/dist/sdk/models/shared/security.d.ts +4 -0
- package/dist/sdk/models/shared/security.js +45 -0
- package/dist/sdk/models/shared/sublineitem.d.ts +32 -0
- package/dist/sdk/models/shared/sublineitem.js +102 -0
- package/dist/sdk/models/shared/sublineitem1.d.ts +24 -0
- package/dist/sdk/models/shared/sublineitem1.js +75 -0
- package/dist/sdk/models/shared/sublineitem2.d.ts +6 -0
- package/dist/sdk/models/shared/sublineitem2.js +55 -0
- package/dist/sdk/models/shared/subscription.d.ts +95 -0
- package/dist/sdk/models/shared/subscription.js +207 -0
- package/dist/sdk/models/shared/subscriptioncancellation.d.ts +12 -0
- package/dist/sdk/models/shared/subscriptioncancellation.js +55 -0
- package/dist/sdk/models/shared/subscriptioncost.d.ts +15 -0
- package/dist/sdk/models/shared/subscriptioncost.js +75 -0
- package/dist/sdk/models/shared/subscriptioncosts.d.ts +8 -0
- package/dist/sdk/models/shared/subscriptioncosts.js +50 -0
- package/dist/sdk/models/shared/subscriptionminified.d.ts +7 -0
- package/dist/sdk/models/shared/subscriptionminified.js +48 -0
- package/dist/sdk/models/shared/subscriptionplanchange.d.ts +54 -0
- package/dist/sdk/models/shared/subscriptionplanchange.js +104 -0
- package/dist/sdk/models/shared/subscriptions.d.ts +10 -0
- package/dist/sdk/models/shared/subscriptions.js +57 -0
- package/dist/sdk/models/shared/subscriptionschedule.d.ts +10 -0
- package/dist/sdk/models/shared/subscriptionschedule.js +57 -0
- package/dist/sdk/models/shared/subscriptionscheduleitem.d.ts +7 -0
- package/dist/sdk/models/shared/subscriptionscheduleitem.js +65 -0
- package/dist/sdk/models/shared/subscriptionstatus.d.ts +5 -0
- package/dist/sdk/models/shared/subscriptionstatus.js +12 -0
- package/dist/sdk/models/shared/subscriptionusage.d.ts +8 -0
- package/dist/sdk/models/shared/subscriptionusage.js +50 -0
- package/dist/sdk/models/shared/taxamount.d.ts +15 -0
- package/dist/sdk/models/shared/taxamount.js +55 -0
- package/dist/sdk/models/shared/tier.d.ts +6 -0
- package/dist/sdk/models/shared/tier.js +55 -0
- package/dist/sdk/models/shared/tier7.d.ts +7 -0
- package/dist/sdk/models/shared/tier7.js +60 -0
- package/dist/sdk/models/shared/tierconfig.d.ts +9 -0
- package/dist/sdk/models/shared/tierconfig.js +58 -0
- package/dist/sdk/models/shared/tieredbpsconfig.d.ts +8 -0
- package/dist/sdk/models/shared/tieredbpsconfig.js +50 -0
- package/dist/sdk/models/shared/tieredbpsconfig1.d.ts +5 -0
- package/dist/sdk/models/shared/tieredbpsconfig1.js +47 -0
- package/dist/sdk/models/shared/tieredbpspriceoverride.d.ts +21 -0
- package/dist/sdk/models/shared/tieredbpspriceoverride.js +74 -0
- package/dist/sdk/models/shared/tieredconfig.d.ts +8 -0
- package/dist/sdk/models/shared/tieredconfig.js +50 -0
- package/dist/sdk/models/shared/tieredpriceoverride.d.ts +27 -0
- package/dist/sdk/models/shared/tieredpriceoverride.js +74 -0
- package/dist/sdk/models/shared/transactions.d.ts +10 -0
- package/dist/sdk/models/shared/transactions.js +57 -0
- package/dist/sdk/models/shared/transactiontype.d.ts +4 -0
- package/dist/sdk/models/shared/transactiontype.js +11 -0
- package/dist/sdk/models/shared/trialconfig.d.ts +8 -0
- package/dist/sdk/models/shared/trialconfig.js +54 -0
- package/dist/sdk/models/shared/type.d.ts +7 -0
- package/dist/sdk/models/shared/type.js +14 -0
- package/dist/sdk/models/shared/unitconfig.d.ts +7 -0
- package/dist/sdk/models/shared/unitconfig.js +48 -0
- package/dist/sdk/models/shared/unitpriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/unitpriceoverride.js +74 -0
- package/dist/sdk/models/shared/upcominginvoice.d.ts +95 -0
- package/dist/sdk/models/shared/upcominginvoice.js +193 -0
- package/dist/sdk/models/shared/updateevent.d.ts +28 -0
- package/dist/sdk/models/shared/updateevent.js +77 -0
- package/dist/sdk/models/shared/usage.d.ts +13 -0
- package/dist/sdk/models/shared/usage.js +69 -0
- package/dist/sdk/models/shared/usageitem.d.ts +6 -0
- package/dist/sdk/models/shared/usageitem.js +63 -0
- package/dist/sdk/models/shared/validationerrors.d.ts +13 -0
- package/dist/sdk/models/shared/validationerrors.js +59 -0
- package/dist/sdk/models/shared/viewmode.d.ts +7 -0
- package/dist/sdk/models/shared/viewmode.js +14 -0
- package/dist/sdk/plan.d.ts +222 -0
- package/dist/sdk/plan.js +422 -0
- package/dist/sdk/sdk.d.ts +298 -0
- package/dist/sdk/sdk.js +110 -0
- package/dist/sdk/subscription.d.ts +614 -0
- package/dist/sdk/subscription.js +1192 -0
- package/dist/sdk/types/index.d.ts +1 -0
- package/dist/sdk/types/index.js +20 -0
- package/dist/sdk/types/rfcdate.d.ts +9 -0
- package/dist/sdk/types/rfcdate.js +59 -0
- package/package.json +33 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
6
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
7
|
+
if (!m) return o;
|
|
8
|
+
var i = m.call(o), r, ar = [], e;
|
|
9
|
+
try {
|
|
10
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
11
|
+
}
|
|
12
|
+
catch (error) { e = { error: error }; }
|
|
13
|
+
finally {
|
|
14
|
+
try {
|
|
15
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
16
|
+
}
|
|
17
|
+
finally { if (e) throw e.error; }
|
|
18
|
+
}
|
|
19
|
+
return ar;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.createSecurityClient = void 0;
|
|
23
|
+
var securityMetadataKey = "security";
|
|
24
|
+
function createSecurityClient(client, security) {
|
|
25
|
+
return parseSecurityClass(client, security);
|
|
26
|
+
}
|
|
27
|
+
exports.createSecurityClient = createSecurityClient;
|
|
28
|
+
function parseSecurityDecorator(securityAnn) {
|
|
29
|
+
// scheme=true;type=apiKey;subtype=header"
|
|
30
|
+
var option = false;
|
|
31
|
+
var scheme = false;
|
|
32
|
+
var name = "";
|
|
33
|
+
var securityType = "";
|
|
34
|
+
var securitySubType = "";
|
|
35
|
+
securityAnn.split(";").forEach(function (securityAnnPart) {
|
|
36
|
+
var _a = __read(securityAnnPart.split("="), 2), sKey = _a[0], sVal = _a[1];
|
|
37
|
+
switch (sKey) {
|
|
38
|
+
case "name":
|
|
39
|
+
name = sVal;
|
|
40
|
+
break;
|
|
41
|
+
case "type":
|
|
42
|
+
securityType = sVal;
|
|
43
|
+
break;
|
|
44
|
+
case "subtype":
|
|
45
|
+
securitySubType = sVal;
|
|
46
|
+
break;
|
|
47
|
+
case "option":
|
|
48
|
+
option = sVal == "true";
|
|
49
|
+
break;
|
|
50
|
+
case "scheme":
|
|
51
|
+
scheme = sVal == "true";
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return new SecurityDecorator(name, securityType, option, scheme, securitySubType);
|
|
55
|
+
}
|
|
56
|
+
function parseSecurityClass(client, security) {
|
|
57
|
+
var fieldNames = Object.getOwnPropertyNames(security);
|
|
58
|
+
fieldNames.forEach(function (fname) {
|
|
59
|
+
var securityAnn = Reflect.getMetadata(securityMetadataKey, security, fname);
|
|
60
|
+
if (securityAnn == null)
|
|
61
|
+
return;
|
|
62
|
+
var securityDecorator = parseSecurityDecorator(securityAnn);
|
|
63
|
+
if (securityDecorator == null)
|
|
64
|
+
return;
|
|
65
|
+
var value = security[fname];
|
|
66
|
+
if (securityDecorator.Option) {
|
|
67
|
+
return parseSecurityOption(client, value);
|
|
68
|
+
}
|
|
69
|
+
else if (securityDecorator.Scheme) {
|
|
70
|
+
if (securityDecorator.SubType === "basic" && value !== Object(value)) {
|
|
71
|
+
return parseSecurityScheme(client, securityDecorator, security);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
client = parseSecurityScheme(client, securityDecorator, value);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return client;
|
|
79
|
+
}
|
|
80
|
+
function parseSecurityOption(client, optionType) {
|
|
81
|
+
var fieldNames = Object.getOwnPropertyNames(optionType);
|
|
82
|
+
fieldNames.forEach(function (fname) {
|
|
83
|
+
var securityAnn = Reflect.getMetadata(securityMetadataKey, optionType, fname);
|
|
84
|
+
if (securityAnn == null)
|
|
85
|
+
return;
|
|
86
|
+
var securityDecorator = parseSecurityDecorator(securityAnn);
|
|
87
|
+
if (securityDecorator == null || !securityDecorator.Scheme)
|
|
88
|
+
return;
|
|
89
|
+
return parseSecurityScheme(client, securityDecorator, optionType[fname]);
|
|
90
|
+
});
|
|
91
|
+
return client;
|
|
92
|
+
}
|
|
93
|
+
function parseSecurityScheme(client, schemeDecorator, scheme) {
|
|
94
|
+
if (scheme === Object(scheme)) {
|
|
95
|
+
if (schemeDecorator.Type === "http" &&
|
|
96
|
+
schemeDecorator.SubType === "basic") {
|
|
97
|
+
return parseBasicAuthScheme(client, scheme);
|
|
98
|
+
}
|
|
99
|
+
var fieldNames = Object.getOwnPropertyNames(scheme);
|
|
100
|
+
fieldNames.forEach(function (fname) {
|
|
101
|
+
var securityAnn = Reflect.getMetadata(securityMetadataKey, scheme, fname);
|
|
102
|
+
if (securityAnn == null)
|
|
103
|
+
return;
|
|
104
|
+
var securityDecorator = parseSecurityDecorator(securityAnn);
|
|
105
|
+
if (securityDecorator == null || securityDecorator.Name === "")
|
|
106
|
+
return;
|
|
107
|
+
client = parseSecuritySchemeValue(client, schemeDecorator, securityDecorator, scheme[fname]);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
client = parseSecuritySchemeValue(client, schemeDecorator, schemeDecorator, scheme);
|
|
112
|
+
}
|
|
113
|
+
return client;
|
|
114
|
+
}
|
|
115
|
+
function parseSecuritySchemeValue(client, schemeDecorator, securityDecorator, value) {
|
|
116
|
+
switch (schemeDecorator.Type) {
|
|
117
|
+
case "apiKey":
|
|
118
|
+
switch (schemeDecorator.SubType) {
|
|
119
|
+
case "header":
|
|
120
|
+
client.defaults.headers.common[securityDecorator.Name] = value;
|
|
121
|
+
break;
|
|
122
|
+
case "query":
|
|
123
|
+
client.defaults.params[securityDecorator.Name] = value;
|
|
124
|
+
break;
|
|
125
|
+
case "cookie": {
|
|
126
|
+
var securityDecoratorName = securityDecorator.Name;
|
|
127
|
+
var val = value;
|
|
128
|
+
client.defaults.headers.common["Cookie"] = "".concat(securityDecoratorName, "=").concat(val);
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
default:
|
|
132
|
+
throw new Error("not supported");
|
|
133
|
+
}
|
|
134
|
+
break;
|
|
135
|
+
case "openIdConnect":
|
|
136
|
+
client.defaults.headers.common[securityDecorator.Name] = value;
|
|
137
|
+
break;
|
|
138
|
+
case "oauth2":
|
|
139
|
+
client.defaults.headers.common[securityDecorator.Name] = value;
|
|
140
|
+
break;
|
|
141
|
+
case "http":
|
|
142
|
+
switch (schemeDecorator.SubType) {
|
|
143
|
+
case "basic":
|
|
144
|
+
break;
|
|
145
|
+
case "bearer":
|
|
146
|
+
client.defaults.headers.common[securityDecorator.Name] = value.toLowerCase().startsWith("bearer ") ? value : "Bearer ".concat(value);
|
|
147
|
+
break;
|
|
148
|
+
default:
|
|
149
|
+
throw new Error("not supported");
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
default:
|
|
153
|
+
throw new Error("not supported");
|
|
154
|
+
}
|
|
155
|
+
return client;
|
|
156
|
+
}
|
|
157
|
+
function parseBasicAuthScheme(client, scheme) {
|
|
158
|
+
var username, password = "";
|
|
159
|
+
var fieldNames = Object.getOwnPropertyNames(scheme);
|
|
160
|
+
fieldNames.forEach(function (fname) {
|
|
161
|
+
var securityAnn = Reflect.getMetadata(securityMetadataKey, scheme, fname);
|
|
162
|
+
if (securityAnn == null)
|
|
163
|
+
return;
|
|
164
|
+
var securityDecorator = parseSecurityDecorator(securityAnn);
|
|
165
|
+
if (securityDecorator == null || securityDecorator.Name === "")
|
|
166
|
+
return;
|
|
167
|
+
switch (securityDecorator.Name) {
|
|
168
|
+
case "username":
|
|
169
|
+
username = scheme[fname];
|
|
170
|
+
break;
|
|
171
|
+
case "password":
|
|
172
|
+
password = scheme[fname];
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
client.defaults.headers.common["Authorization"] = "Basic ".concat(Buffer.from("".concat(username, ":").concat(password)).toString("base64"));
|
|
177
|
+
return client;
|
|
178
|
+
}
|
|
179
|
+
var SecurityDecorator = /** @class */ (function () {
|
|
180
|
+
function SecurityDecorator(Name, Type, Option, Scheme, SubType) {
|
|
181
|
+
this.Name = Name;
|
|
182
|
+
this.Type = Type;
|
|
183
|
+
this.Option = Option;
|
|
184
|
+
this.Scheme = Scheme;
|
|
185
|
+
this.SubType = SubType;
|
|
186
|
+
}
|
|
187
|
+
return SecurityDecorator;
|
|
188
|
+
}());
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
export declare const SerializationMethodToContentType: Record<string, string>;
|
|
3
|
+
export interface PropInfo {
|
|
4
|
+
key: string | symbol;
|
|
5
|
+
type: any;
|
|
6
|
+
elemType: any;
|
|
7
|
+
elemDepth: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class SpeakeasyBase {
|
|
10
|
+
constructor(payload?: Record<string | symbol, unknown>);
|
|
11
|
+
}
|
|
12
|
+
export declare class ParamDecorator {
|
|
13
|
+
Style: string;
|
|
14
|
+
Explode: boolean;
|
|
15
|
+
ParamName: string;
|
|
16
|
+
Serialization?: string;
|
|
17
|
+
constructor(Style: string, Explode: boolean, ParamName: string, Serialization?: string);
|
|
18
|
+
}
|
|
19
|
+
export declare function SpeakeasyMetadata<T extends SpeakeasyBase = Record<string | symbol, unknown>>(params?: {
|
|
20
|
+
data?: string;
|
|
21
|
+
elemType?: {
|
|
22
|
+
new (): T;
|
|
23
|
+
};
|
|
24
|
+
elemDepth?: number;
|
|
25
|
+
}): PropertyDecorator;
|
|
26
|
+
export declare function templateUrl(stringWithParams: string, params: Record<string, string>): string;
|
|
27
|
+
export declare function generateURL(serverURL: string, path: string, pathParams: any, globals?: any): string;
|
|
28
|
+
export declare function parseParamDecorator(ann: string, fName: string, defaultStyle: string, defaultExplode: boolean): ParamDecorator;
|
|
29
|
+
export declare function isStringRecord(obj: any): obj is Record<string, string>;
|
|
30
|
+
export declare function isNumberRecord(obj: any): obj is Record<string, number>;
|
|
31
|
+
export declare function isBooleanRecord(obj: any): obj is Record<string, boolean>;
|
|
32
|
+
export declare function isEmpty(value: any): boolean;
|
|
33
|
+
export declare function objectToClass<T>(value: T, klass?: any, elemDepth?: number): any;
|
|
34
|
+
export declare function getResFieldDepth(res: any): number;
|
|
35
|
+
export declare function populateFromGlobals(value: any, fieldName: string, paramType: string, globals: any): any;
|
|
36
|
+
export declare function valToString(value: any): string;
|
|
37
|
+
export declare function shouldQueryParamSerialize(value: any): boolean;
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __values = (this && this.__values) || function(o) {
|
|
6
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
7
|
+
if (m) return m.call(o);
|
|
8
|
+
if (o && typeof o.length === "number") return {
|
|
9
|
+
next: function () {
|
|
10
|
+
if (o && i >= o.length) o = void 0;
|
|
11
|
+
return { value: o && o[i++], done: !o };
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
15
|
+
};
|
|
16
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
17
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
18
|
+
if (!m) return o;
|
|
19
|
+
var i = m.call(o), r, ar = [], e;
|
|
20
|
+
try {
|
|
21
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
22
|
+
}
|
|
23
|
+
catch (error) { e = { error: error }; }
|
|
24
|
+
finally {
|
|
25
|
+
try {
|
|
26
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
27
|
+
}
|
|
28
|
+
finally { if (e) throw e.error; }
|
|
29
|
+
}
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.shouldQueryParamSerialize = exports.valToString = exports.populateFromGlobals = exports.getResFieldDepth = exports.objectToClass = exports.isEmpty = exports.isBooleanRecord = exports.isNumberRecord = exports.isStringRecord = exports.parseParamDecorator = exports.generateURL = exports.templateUrl = exports.SpeakeasyMetadata = exports.ParamDecorator = exports.SpeakeasyBase = exports.SerializationMethodToContentType = void 0;
|
|
34
|
+
require("reflect-metadata");
|
|
35
|
+
var pathparams_1 = require("./pathparams");
|
|
36
|
+
var class_transformer_1 = require("class-transformer");
|
|
37
|
+
var types_1 = require("../../sdk/types");
|
|
38
|
+
var requestbody_1 = require("./requestbody");
|
|
39
|
+
exports.SerializationMethodToContentType = {
|
|
40
|
+
json: "application/json",
|
|
41
|
+
form: "application/x-www-form-urlencoded",
|
|
42
|
+
multipart: "multipart/form-data",
|
|
43
|
+
raw: "application/octet-stream",
|
|
44
|
+
string: "text/plain",
|
|
45
|
+
};
|
|
46
|
+
function isSpeakeasyBase(type) {
|
|
47
|
+
var _a;
|
|
48
|
+
return type && ((_a = Object.getPrototypeOf(type)) === null || _a === void 0 ? void 0 : _a.name) == SpeakeasyBase.name;
|
|
49
|
+
}
|
|
50
|
+
function handleArray(value, elemType, elemDepth) {
|
|
51
|
+
if (!Array.isArray(value)) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
if (elemDepth == 1) {
|
|
55
|
+
return value.map(function (v) { return new elemType(v); });
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return value.map(function (v) {
|
|
59
|
+
if (Array.isArray(v)) {
|
|
60
|
+
return handleArray(v, elemType, elemDepth - 1);
|
|
61
|
+
}
|
|
62
|
+
else if (typeof v == "object") {
|
|
63
|
+
return handleObject(v, elemType, elemDepth - 1);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
return v;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function handleObject(value, elemType, elemDepth) {
|
|
72
|
+
if (typeof value != "object") {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
if (elemDepth == 1) {
|
|
76
|
+
return Object.keys(value).reduce(function (acc, key) {
|
|
77
|
+
acc[key] = new elemType(value[key]);
|
|
78
|
+
return acc;
|
|
79
|
+
}, {});
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return Object.keys(value).reduce(function (acc, key) {
|
|
83
|
+
var v = value[key];
|
|
84
|
+
if (Array.isArray(v)) {
|
|
85
|
+
acc[key] = handleArray(v, elemType, elemDepth - 1);
|
|
86
|
+
}
|
|
87
|
+
else if (typeof v == "object") {
|
|
88
|
+
acc[key] = handleObject(v, elemType, elemDepth - 1);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
acc[key] = v;
|
|
92
|
+
}
|
|
93
|
+
return acc;
|
|
94
|
+
}, {});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
var SpeakeasyBase = /** @class */ (function () {
|
|
98
|
+
function SpeakeasyBase(payload) {
|
|
99
|
+
var e_1, _a;
|
|
100
|
+
var props = this["__props__"];
|
|
101
|
+
if (props) {
|
|
102
|
+
try {
|
|
103
|
+
for (var props_1 = __values(props), props_1_1 = props_1.next(); !props_1_1.done; props_1_1 = props_1.next()) {
|
|
104
|
+
var prop = props_1_1.value;
|
|
105
|
+
if (payload && payload.hasOwnProperty(prop.key)) {
|
|
106
|
+
var value = payload[prop.key];
|
|
107
|
+
if (isSpeakeasyBase(prop.type)) {
|
|
108
|
+
this[prop.key] = new prop.type(value);
|
|
109
|
+
}
|
|
110
|
+
else if (prop.type.name == "Array" &&
|
|
111
|
+
isSpeakeasyBase(prop.elemType)) {
|
|
112
|
+
this[prop.key] = handleArray(value, prop.elemType, prop.elemDepth);
|
|
113
|
+
}
|
|
114
|
+
else if (prop.type.name == "Object" &&
|
|
115
|
+
isSpeakeasyBase(prop.elemType)) {
|
|
116
|
+
this[prop.key] = handleObject(value, prop.elemType, prop.elemDepth);
|
|
117
|
+
}
|
|
118
|
+
else if (prop.type.name == "RFCDate") {
|
|
119
|
+
if (value instanceof Date) {
|
|
120
|
+
this[prop.key] = new types_1.RFCDate(value);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
this[prop.key] = value;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
this[prop.key] = value;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
133
|
+
finally {
|
|
134
|
+
try {
|
|
135
|
+
if (props_1_1 && !props_1_1.done && (_a = props_1.return)) _a.call(props_1);
|
|
136
|
+
}
|
|
137
|
+
finally { if (e_1) throw e_1.error; }
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return SpeakeasyBase;
|
|
142
|
+
}());
|
|
143
|
+
exports.SpeakeasyBase = SpeakeasyBase;
|
|
144
|
+
var ParamDecorator = /** @class */ (function () {
|
|
145
|
+
function ParamDecorator(Style, Explode, ParamName, Serialization) {
|
|
146
|
+
this.Style = Style;
|
|
147
|
+
this.Explode = Explode;
|
|
148
|
+
this.ParamName = ParamName;
|
|
149
|
+
this.Serialization = Serialization;
|
|
150
|
+
}
|
|
151
|
+
return ParamDecorator;
|
|
152
|
+
}());
|
|
153
|
+
exports.ParamDecorator = ParamDecorator;
|
|
154
|
+
function SpeakeasyMetadata(params) {
|
|
155
|
+
return function (target, propertyKey) {
|
|
156
|
+
if (params === null || params === void 0 ? void 0 : params.data) {
|
|
157
|
+
var annsArr = params.data.split(", ");
|
|
158
|
+
for (var i = 0; i < annsArr.length; i += 2) {
|
|
159
|
+
Reflect.defineMetadata(annsArr[i], annsArr[i + 1], target, propertyKey);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
var props;
|
|
163
|
+
if (target.hasOwnProperty("__props__")) {
|
|
164
|
+
props = target["__props__"];
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
props = target["__props__"] = [];
|
|
168
|
+
}
|
|
169
|
+
var prop = {
|
|
170
|
+
key: propertyKey,
|
|
171
|
+
type: Reflect.getMetadata("design:type", target, propertyKey),
|
|
172
|
+
};
|
|
173
|
+
if (params === null || params === void 0 ? void 0 : params.elemType) {
|
|
174
|
+
prop.elemType = params.elemType;
|
|
175
|
+
prop.elemDepth = params.elemDepth || 1;
|
|
176
|
+
}
|
|
177
|
+
props.push(prop);
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
exports.SpeakeasyMetadata = SpeakeasyMetadata;
|
|
181
|
+
function templateUrl(stringWithParams, params) {
|
|
182
|
+
var res = stringWithParams;
|
|
183
|
+
if (params) {
|
|
184
|
+
Object.entries(params).forEach(function (_a) {
|
|
185
|
+
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
186
|
+
var match = "{" + key + "}";
|
|
187
|
+
res = res.replaceAll(match, value);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
return res;
|
|
191
|
+
}
|
|
192
|
+
exports.templateUrl = templateUrl;
|
|
193
|
+
function generateURL(serverURL, path, pathParams, globals) {
|
|
194
|
+
var url = serverURL.replace(/\/$/, "") + path;
|
|
195
|
+
var parsedParameters = {};
|
|
196
|
+
var fieldNames = "__props__" in pathParams
|
|
197
|
+
? pathParams["__props__"].map(function (prop) { return prop.key; })
|
|
198
|
+
: Object.getOwnPropertyNames(pathParams);
|
|
199
|
+
fieldNames.forEach(function (fname) {
|
|
200
|
+
var requestBodyAnn = Reflect.getMetadata(requestbody_1.requestMetadataKey, pathParams, fname);
|
|
201
|
+
if (requestBodyAnn)
|
|
202
|
+
return;
|
|
203
|
+
var ppAnn = Reflect.getMetadata(pathparams_1.ppMetadataKey, pathParams, fname);
|
|
204
|
+
if (ppAnn == null)
|
|
205
|
+
return;
|
|
206
|
+
var ppDecorator = parseParamDecorator(ppAnn, fname, "simple", false);
|
|
207
|
+
if (ppDecorator == null)
|
|
208
|
+
return;
|
|
209
|
+
var value = pathParams[fname];
|
|
210
|
+
value = populateFromGlobals(value, fname, "pathParam", globals);
|
|
211
|
+
if (ppDecorator.Serialization) {
|
|
212
|
+
switch (ppDecorator.Serialization) {
|
|
213
|
+
case "json":
|
|
214
|
+
parsedParameters[ppDecorator.ParamName] = encodeURIComponent(JSON.stringify(value));
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
switch (ppDecorator.Style) {
|
|
220
|
+
case "simple": {
|
|
221
|
+
var simpleParams = (0, pathparams_1.getSimplePathParams)(ppDecorator.ParamName, value, ppDecorator.Explode);
|
|
222
|
+
simpleParams.forEach(function (value, key) {
|
|
223
|
+
parsedParameters[key] = value;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
return templateUrl(url, parsedParameters);
|
|
230
|
+
}
|
|
231
|
+
exports.generateURL = generateURL;
|
|
232
|
+
function parseParamDecorator(ann, fName, defaultStyle, defaultExplode) {
|
|
233
|
+
// style=simple;explode=false;name=apiID
|
|
234
|
+
var decorator = new ParamDecorator(defaultStyle, defaultExplode, fName.toLowerCase());
|
|
235
|
+
if (ann == null)
|
|
236
|
+
return decorator;
|
|
237
|
+
ann.split(";").forEach(function (annPart) {
|
|
238
|
+
var _a = __read(annPart.split("="), 2), paramKey = _a[0], paramVal = _a[1];
|
|
239
|
+
switch (paramKey) {
|
|
240
|
+
case "style":
|
|
241
|
+
decorator.Style = paramVal;
|
|
242
|
+
break;
|
|
243
|
+
case "explode":
|
|
244
|
+
decorator.Explode = paramVal == "true";
|
|
245
|
+
break;
|
|
246
|
+
case "name":
|
|
247
|
+
decorator.ParamName = paramVal;
|
|
248
|
+
break;
|
|
249
|
+
case "serialization":
|
|
250
|
+
decorator.Serialization = paramVal;
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
return decorator;
|
|
255
|
+
}
|
|
256
|
+
exports.parseParamDecorator = parseParamDecorator;
|
|
257
|
+
function isStringRecord(obj) {
|
|
258
|
+
if (typeof obj !== "object")
|
|
259
|
+
return false;
|
|
260
|
+
if (Object.getOwnPropertySymbols(obj).length > 0)
|
|
261
|
+
return false;
|
|
262
|
+
return Object.getOwnPropertyNames(obj).every(function (prop) { return typeof obj[prop] === "string"; });
|
|
263
|
+
}
|
|
264
|
+
exports.isStringRecord = isStringRecord;
|
|
265
|
+
function isNumberRecord(obj) {
|
|
266
|
+
if (typeof obj !== "object")
|
|
267
|
+
return false;
|
|
268
|
+
if (Object.getOwnPropertySymbols(obj).length > 0)
|
|
269
|
+
return false;
|
|
270
|
+
return Object.getOwnPropertyNames(obj).every(function (prop) { return typeof obj[prop] === "number"; });
|
|
271
|
+
}
|
|
272
|
+
exports.isNumberRecord = isNumberRecord;
|
|
273
|
+
function isBooleanRecord(obj) {
|
|
274
|
+
if (typeof obj !== "object")
|
|
275
|
+
return false;
|
|
276
|
+
if (Object.getOwnPropertySymbols(obj).length > 0)
|
|
277
|
+
return false;
|
|
278
|
+
return Object.getOwnPropertyNames(obj).every(function (prop) { return typeof obj[prop] === "boolean"; });
|
|
279
|
+
}
|
|
280
|
+
exports.isBooleanRecord = isBooleanRecord;
|
|
281
|
+
function isEmpty(value) {
|
|
282
|
+
// check for undefined, null, and NaN
|
|
283
|
+
var res = false;
|
|
284
|
+
if (typeof value === "number")
|
|
285
|
+
res = Number.isNaN(value);
|
|
286
|
+
else if (typeof value === "string")
|
|
287
|
+
res = value === "";
|
|
288
|
+
return res || value == null;
|
|
289
|
+
}
|
|
290
|
+
exports.isEmpty = isEmpty;
|
|
291
|
+
function objectToClass(value, klass, elemDepth) {
|
|
292
|
+
if (elemDepth === void 0) { elemDepth = 0; }
|
|
293
|
+
if (value !== Object(value)) {
|
|
294
|
+
return value;
|
|
295
|
+
}
|
|
296
|
+
if (elemDepth === 0 && klass != null) {
|
|
297
|
+
return (0, class_transformer_1.plainToInstance)(klass, value, {
|
|
298
|
+
excludeExtraneousValues: true,
|
|
299
|
+
exposeUnsetFields: false,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
if (Array.isArray(value)) {
|
|
303
|
+
return value.map(function (v) { return objectToClass(v, klass, elemDepth - 1); });
|
|
304
|
+
}
|
|
305
|
+
if (typeof value === "object" && value != null) {
|
|
306
|
+
var copiedRecord = {};
|
|
307
|
+
for (var key in value) {
|
|
308
|
+
copiedRecord[key] = objectToClass(value[key], klass, elemDepth - 1);
|
|
309
|
+
}
|
|
310
|
+
return copiedRecord;
|
|
311
|
+
}
|
|
312
|
+
return (0, class_transformer_1.plainToInstance)(klass, value, {
|
|
313
|
+
excludeExtraneousValues: true,
|
|
314
|
+
exposeUnsetFields: false,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
exports.objectToClass = objectToClass;
|
|
318
|
+
function getResFieldDepth(res) {
|
|
319
|
+
var e_2, _a;
|
|
320
|
+
var props = res["__props__"];
|
|
321
|
+
var resFieldDepth = 1;
|
|
322
|
+
if (props) {
|
|
323
|
+
try {
|
|
324
|
+
for (var props_2 = __values(props), props_2_1 = props_2.next(); !props_2_1.done; props_2_1 = props_2.next()) {
|
|
325
|
+
var prop = props_2_1.value;
|
|
326
|
+
if (res && res.hasOwnProperty(prop.key)) {
|
|
327
|
+
if ((prop.type.name == "Array" || prop.type.name == "Object") &&
|
|
328
|
+
isSpeakeasyBase(prop.elemType)) {
|
|
329
|
+
if (prop.elemDepth > resFieldDepth) {
|
|
330
|
+
resFieldDepth = prop.elemDepth;
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
338
|
+
finally {
|
|
339
|
+
try {
|
|
340
|
+
if (props_2_1 && !props_2_1.done && (_a = props_2.return)) _a.call(props_2);
|
|
341
|
+
}
|
|
342
|
+
finally { if (e_2) throw e_2.error; }
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return resFieldDepth;
|
|
346
|
+
}
|
|
347
|
+
exports.getResFieldDepth = getResFieldDepth;
|
|
348
|
+
function populateFromGlobals(value, fieldName, paramType, globals) {
|
|
349
|
+
if (globals && value === undefined) {
|
|
350
|
+
if ("parameters" in globals && paramType in globals.parameters) {
|
|
351
|
+
var globalValue = globals.parameters[paramType][fieldName];
|
|
352
|
+
if (globalValue !== undefined) {
|
|
353
|
+
value = globalValue;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return value;
|
|
358
|
+
}
|
|
359
|
+
exports.populateFromGlobals = populateFromGlobals;
|
|
360
|
+
function valToString(value) {
|
|
361
|
+
if (value instanceof Date) {
|
|
362
|
+
return value.toISOString();
|
|
363
|
+
}
|
|
364
|
+
return value.toString();
|
|
365
|
+
}
|
|
366
|
+
exports.valToString = valToString;
|
|
367
|
+
function shouldQueryParamSerialize(value) {
|
|
368
|
+
return !(value === undefined || value === null || value === "");
|
|
369
|
+
}
|
|
370
|
+
exports.shouldQueryParamSerialize = shouldQueryParamSerialize;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as operations from "./models/operations";
|
|
2
|
+
import { SDKConfiguration } from "./sdk";
|
|
3
|
+
import { AxiosRequestConfig } from "axios";
|
|
4
|
+
/**
|
|
5
|
+
* The Availability resource represents a customer's availability. Availability is created when a customer's invoice is paid, and is updated when a customer's transaction is refunded.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Availability {
|
|
8
|
+
private sdkConfiguration;
|
|
9
|
+
constructor(sdkConfig: SDKConfiguration);
|
|
10
|
+
/**
|
|
11
|
+
* Check availability
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* This endpoint allows you to test your connection to the Orb API and check the validity of your API key, passed in the `Authorization` header. This is particularly useful for checking that your environment is set up properly, and is a great choice for connectors and integrations.
|
|
15
|
+
*
|
|
16
|
+
* This API does not have any side-effects or return any Orb resources.
|
|
17
|
+
*/
|
|
18
|
+
ping(config?: AxiosRequestConfig): Promise<operations.PingResponse>;
|
|
19
|
+
}
|