@paygentic/sdk 0.9.15 → 0.9.16
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 +34 -6
- package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.d.ts +18 -0
- package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.js +125 -0
- package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.js.map +1 -0
- package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.d.ts +27 -0
- package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.js +133 -0
- package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.js.map +1 -0
- package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.d.ts +40 -0
- package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.js +157 -0
- package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.js.map +1 -0
- package/dist/commonjs/funcs/merchantsReset.d.ts +22 -0
- package/dist/commonjs/funcs/merchantsReset.d.ts.map +1 -0
- package/dist/commonjs/funcs/merchantsReset.js +129 -0
- package/dist/commonjs/funcs/merchantsReset.js.map +1 -0
- package/dist/commonjs/funcs/profitabilityGetProfitability.d.ts +1 -1
- package/dist/commonjs/funcs/profitabilityGetProfitability.js +1 -1
- package/dist/commonjs/funcs/revenueGet.d.ts +1 -1
- package/dist/commonjs/funcs/revenueGet.js +1 -1
- package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.d.ts +19 -0
- package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.d.ts.map +1 -0
- package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.js +127 -0
- package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.js.map +1 -0
- package/dist/commonjs/funcs/webhooksDisable.d.ts +18 -0
- package/dist/commonjs/funcs/webhooksDisable.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksDisable.js +122 -0
- package/dist/commonjs/funcs/webhooksDisable.js.map +1 -0
- package/dist/commonjs/funcs/webhooksEnable.d.ts +19 -0
- package/dist/commonjs/funcs/webhooksEnable.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksEnable.js +122 -0
- package/dist/commonjs/funcs/webhooksEnable.js.map +1 -0
- package/dist/commonjs/funcs/webhooksGet.d.ts +19 -0
- package/dist/commonjs/funcs/webhooksGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksGet.js +122 -0
- package/dist/commonjs/funcs/webhooksGet.js.map +1 -0
- package/dist/commonjs/funcs/webhooksGetPortal.d.ts +19 -0
- package/dist/commonjs/funcs/webhooksGetPortal.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksGetPortal.js +122 -0
- package/dist/commonjs/funcs/webhooksGetPortal.js.map +1 -0
- package/dist/commonjs/funcs/webhooksUpdate.d.ts +19 -0
- package/dist/commonjs/funcs/webhooksUpdate.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksUpdate.js +123 -0
- package/dist/commonjs/funcs/webhooksUpdate.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/currencybreakdownentry.d.ts +1 -1
- package/dist/commonjs/models/elapsedperiodbilling.d.ts +16 -0
- package/dist/commonjs/models/elapsedperiodbilling.d.ts.map +1 -0
- package/dist/commonjs/models/elapsedperiodbilling.js +50 -0
- package/dist/commonjs/models/elapsedperiodbilling.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +2 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +2 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/recordinvoicepayment.d.ts +55 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.d.ts.map +1 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.js +76 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.js.map +1 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.d.ts +63 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.js +81 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.js.map +1 -0
- package/dist/commonjs/models/grouptrendentry.d.ts +5 -1
- package/dist/commonjs/models/grouptrendentry.d.ts.map +1 -1
- package/dist/commonjs/models/grouptrendentry.js +1 -0
- package/dist/commonjs/models/grouptrendentry.js.map +1 -1
- package/dist/commonjs/models/hostedlinkpaymentresult.d.ts +28 -0
- package/dist/commonjs/models/hostedlinkpaymentresult.d.ts.map +1 -0
- package/dist/commonjs/models/hostedlinkpaymentresult.js +56 -0
- package/dist/commonjs/models/hostedlinkpaymentresult.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +14 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +14 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoice.d.ts +4 -3
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +2 -1
- package/dist/commonjs/models/invoice.js.map +1 -1
- package/dist/commonjs/models/invoicepaymentlinkerrorcode.d.ts +17 -0
- package/dist/commonjs/models/invoicepaymentlinkerrorcode.d.ts.map +1 -0
- package/dist/commonjs/models/invoicepaymentlinkerrorcode.js +51 -0
- package/dist/commonjs/models/invoicepaymentlinkerrorcode.js.map +1 -0
- package/dist/commonjs/models/invoicepaymentmethod.d.ts +16 -0
- package/dist/commonjs/models/invoicepaymentmethod.d.ts.map +1 -0
- package/dist/commonjs/models/invoicepaymentmethod.js +50 -0
- package/dist/commonjs/models/invoicepaymentmethod.js.map +1 -0
- package/dist/commonjs/models/invoicepaymentprovider.d.ts +16 -0
- package/dist/commonjs/models/invoicepaymentprovider.d.ts.map +1 -0
- package/dist/commonjs/models/invoicepaymentprovider.js +50 -0
- package/dist/commonjs/models/invoicepaymentprovider.js.map +1 -0
- package/dist/commonjs/models/merchantreset.d.ts +41 -0
- package/dist/commonjs/models/merchantreset.d.ts.map +1 -0
- package/dist/commonjs/models/merchantreset.js +68 -0
- package/dist/commonjs/models/merchantreset.js.map +1 -0
- package/dist/commonjs/models/migratesubscriptionversionrequest.d.ts +37 -0
- package/dist/commonjs/models/migratesubscriptionversionrequest.d.ts.map +1 -0
- package/dist/commonjs/models/migratesubscriptionversionrequest.js +60 -0
- package/dist/commonjs/models/migratesubscriptionversionrequest.js.map +1 -0
- package/dist/commonjs/models/migratesubscriptionversionresponse.d.ts +47 -0
- package/dist/commonjs/models/migratesubscriptionversionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/migratesubscriptionversionresponse.js +73 -0
- package/dist/commonjs/models/migratesubscriptionversionresponse.js.map +1 -0
- package/dist/commonjs/models/operations/createplan.d.ts +5 -0
- package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createplan.js +1 -0
- package/dist/commonjs/models/operations/createplan.js.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.d.ts +5 -0
- package/dist/commonjs/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.js +1 -0
- package/dist/commonjs/models/operations/createsubscription.js.map +1 -1
- package/dist/commonjs/models/operations/createwebhooks.d.ts +15 -0
- package/dist/commonjs/models/operations/createwebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createwebhooks.js +49 -0
- package/dist/commonjs/models/operations/createwebhooks.js.map +1 -0
- package/dist/commonjs/models/operations/deletewebhooks.d.ts +15 -0
- package/dist/commonjs/models/operations/deletewebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletewebhooks.js +49 -0
- package/dist/commonjs/models/operations/deletewebhooks.js.map +1 -0
- package/dist/commonjs/models/operations/getwebhookportal.d.ts +15 -0
- package/dist/commonjs/models/operations/getwebhookportal.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getwebhookportal.js +49 -0
- package/dist/commonjs/models/operations/getwebhookportal.js.map +1 -0
- package/dist/commonjs/models/operations/getwebhooks.d.ts +15 -0
- package/dist/commonjs/models/operations/getwebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getwebhooks.js +49 -0
- package/dist/commonjs/models/operations/getwebhooks.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +10 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +10 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listprojectedinvoices.d.ts +59 -0
- package/dist/commonjs/models/operations/listprojectedinvoices.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listprojectedinvoices.js +70 -0
- package/dist/commonjs/models/operations/listprojectedinvoices.js.map +1 -0
- package/dist/commonjs/models/operations/migratesubscriptionversion.d.ts +18 -0
- package/dist/commonjs/models/operations/migratesubscriptionversion.d.ts.map +1 -0
- package/dist/commonjs/models/operations/migratesubscriptionversion.js +56 -0
- package/dist/commonjs/models/operations/migratesubscriptionversion.js.map +1 -0
- package/dist/commonjs/models/operations/recordinvoicepayment.d.ts +45 -0
- package/dist/commonjs/models/operations/recordinvoicepayment.d.ts.map +1 -0
- package/dist/commonjs/models/operations/recordinvoicepayment.js +75 -0
- package/dist/commonjs/models/operations/recordinvoicepayment.js.map +1 -0
- package/dist/commonjs/models/operations/resetmerchant.d.ts +15 -0
- package/dist/commonjs/models/operations/resetmerchant.d.ts.map +1 -0
- package/dist/commonjs/models/operations/resetmerchant.js +56 -0
- package/dist/commonjs/models/operations/resetmerchant.js.map +1 -0
- package/dist/commonjs/models/operations/retryinvoicepayment.d.ts +30 -0
- package/dist/commonjs/models/operations/retryinvoicepayment.d.ts.map +1 -0
- package/dist/commonjs/models/operations/retryinvoicepayment.js +64 -0
- package/dist/commonjs/models/operations/retryinvoicepayment.js.map +1 -0
- package/dist/commonjs/models/operations/updateplan.d.ts +5 -0
- package/dist/commonjs/models/operations/updateplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateplan.js +1 -0
- package/dist/commonjs/models/operations/updateplan.js.map +1 -1
- package/dist/commonjs/models/operations/updatewebhooks.d.ts +30 -0
- package/dist/commonjs/models/operations/updatewebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatewebhooks.js +63 -0
- package/dist/commonjs/models/operations/updatewebhooks.js.map +1 -0
- package/dist/commonjs/models/outofbandpaymentresult.d.ts +15 -0
- package/dist/commonjs/models/outofbandpaymentresult.d.ts.map +1 -0
- package/dist/commonjs/models/outofbandpaymentresult.js +52 -0
- package/dist/commonjs/models/outofbandpaymentresult.js.map +1 -0
- package/dist/commonjs/models/plan.d.ts +5 -0
- package/dist/commonjs/models/plan.d.ts.map +1 -1
- package/dist/commonjs/models/plan.js +2 -0
- package/dist/commonjs/models/plan.js.map +1 -1
- package/dist/commonjs/models/profitabilityrow.d.ts +23 -4
- package/dist/commonjs/models/profitabilityrow.d.ts.map +1 -1
- package/dist/commonjs/models/profitabilityrow.js +13 -1
- package/dist/commonjs/models/profitabilityrow.js.map +1 -1
- package/dist/commonjs/models/profitabilitysummaryresponse.d.ts +1 -1
- package/dist/commonjs/models/retrypaymenterror.d.ts +28 -0
- package/dist/commonjs/models/retrypaymenterror.d.ts.map +1 -0
- package/dist/commonjs/models/retrypaymenterror.js +53 -0
- package/dist/commonjs/models/retrypaymenterror.js.map +1 -0
- package/dist/commonjs/models/retrypaymentresponse.d.ts +46 -0
- package/dist/commonjs/models/retrypaymentresponse.d.ts.map +1 -0
- package/dist/commonjs/models/retrypaymentresponse.js +63 -0
- package/dist/commonjs/models/retrypaymentresponse.js.map +1 -0
- package/dist/commonjs/models/revenuesummaryresponse.d.ts +1 -1
- package/dist/commonjs/models/revenuetrendbucket.d.ts +6 -2
- package/dist/commonjs/models/revenuetrendbucket.d.ts.map +1 -1
- package/dist/commonjs/models/revenuetrendbucket.js +1 -0
- package/dist/commonjs/models/revenuetrendbucket.js.map +1 -1
- package/dist/commonjs/models/subscription.d.ts +29 -0
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js +14 -1
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/models/subscriptionintervaladdop.d.ts +1 -1
- package/dist/commonjs/models/versiontransition.d.ts +58 -0
- package/dist/commonjs/models/versiontransition.d.ts.map +1 -0
- package/dist/commonjs/models/versiontransition.js +82 -0
- package/dist/commonjs/models/versiontransition.js.map +1 -0
- package/dist/commonjs/models/webhookportal.d.ts +34 -0
- package/dist/commonjs/models/webhookportal.d.ts.map +1 -0
- package/dist/commonjs/models/webhookportal.js +60 -0
- package/dist/commonjs/models/webhookportal.js.map +1 -0
- package/dist/commonjs/models/webhooks.d.ts +46 -0
- package/dist/commonjs/models/webhooks.d.ts.map +1 -0
- package/dist/commonjs/models/webhooks.js +63 -0
- package/dist/commonjs/models/webhooks.js.map +1 -0
- package/dist/commonjs/sdk/invoicesv2.d.ts +51 -0
- package/dist/commonjs/sdk/invoicesv2.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoicesv2.js +60 -0
- package/dist/commonjs/sdk/invoicesv2.js.map +1 -1
- package/dist/commonjs/sdk/merchants.d.ts +16 -0
- package/dist/commonjs/sdk/merchants.d.ts.map +1 -0
- package/dist/commonjs/sdk/merchants.js +26 -0
- package/dist/commonjs/sdk/merchants.js.map +1 -0
- package/dist/commonjs/sdk/profitability.d.ts +1 -1
- package/dist/commonjs/sdk/profitability.js +1 -1
- package/dist/commonjs/sdk/revenue.d.ts +1 -1
- package/dist/commonjs/sdk/revenue.js +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +6 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +8 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/subscriptions.d.ts +7 -0
- package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
- package/dist/commonjs/sdk/subscriptions.js +10 -0
- package/dist/commonjs/sdk/subscriptions.js.map +1 -1
- package/dist/commonjs/sdk/webhooks.d.ts +41 -0
- package/dist/commonjs/sdk/webhooks.d.ts.map +1 -0
- package/dist/commonjs/sdk/webhooks.js +62 -0
- package/dist/commonjs/sdk/webhooks.js.map +1 -0
- package/dist/esm/funcs/invoicesV2ListProjectedInvoices.d.ts +18 -0
- package/dist/esm/funcs/invoicesV2ListProjectedInvoices.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesV2ListProjectedInvoices.js +89 -0
- package/dist/esm/funcs/invoicesV2ListProjectedInvoices.js.map +1 -0
- package/dist/esm/funcs/invoicesV2RecordInvoicePayment.d.ts +27 -0
- package/dist/esm/funcs/invoicesV2RecordInvoicePayment.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesV2RecordInvoicePayment.js +97 -0
- package/dist/esm/funcs/invoicesV2RecordInvoicePayment.js.map +1 -0
- package/dist/esm/funcs/invoicesV2RetryInvoicePayment.d.ts +40 -0
- package/dist/esm/funcs/invoicesV2RetryInvoicePayment.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesV2RetryInvoicePayment.js +121 -0
- package/dist/esm/funcs/invoicesV2RetryInvoicePayment.js.map +1 -0
- package/dist/esm/funcs/merchantsReset.d.ts +22 -0
- package/dist/esm/funcs/merchantsReset.d.ts.map +1 -0
- package/dist/esm/funcs/merchantsReset.js +93 -0
- package/dist/esm/funcs/merchantsReset.js.map +1 -0
- package/dist/esm/funcs/profitabilityGetProfitability.d.ts +1 -1
- package/dist/esm/funcs/profitabilityGetProfitability.js +1 -1
- package/dist/esm/funcs/revenueGet.d.ts +1 -1
- package/dist/esm/funcs/revenueGet.js +1 -1
- package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.d.ts +19 -0
- package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.d.ts.map +1 -0
- package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.js +91 -0
- package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.js.map +1 -0
- package/dist/esm/funcs/webhooksDisable.d.ts +18 -0
- package/dist/esm/funcs/webhooksDisable.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksDisable.js +86 -0
- package/dist/esm/funcs/webhooksDisable.js.map +1 -0
- package/dist/esm/funcs/webhooksEnable.d.ts +19 -0
- package/dist/esm/funcs/webhooksEnable.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksEnable.js +86 -0
- package/dist/esm/funcs/webhooksEnable.js.map +1 -0
- package/dist/esm/funcs/webhooksGet.d.ts +19 -0
- package/dist/esm/funcs/webhooksGet.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksGet.js +86 -0
- package/dist/esm/funcs/webhooksGet.js.map +1 -0
- package/dist/esm/funcs/webhooksGetPortal.d.ts +19 -0
- package/dist/esm/funcs/webhooksGetPortal.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksGetPortal.js +86 -0
- package/dist/esm/funcs/webhooksGetPortal.js.map +1 -0
- package/dist/esm/funcs/webhooksUpdate.d.ts +19 -0
- package/dist/esm/funcs/webhooksUpdate.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksUpdate.js +87 -0
- package/dist/esm/funcs/webhooksUpdate.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/currencybreakdownentry.d.ts +1 -1
- package/dist/esm/models/elapsedperiodbilling.d.ts +16 -0
- package/dist/esm/models/elapsedperiodbilling.d.ts.map +1 -0
- package/dist/esm/models/elapsedperiodbilling.js +14 -0
- package/dist/esm/models/elapsedperiodbilling.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +2 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +2 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/recordinvoicepayment.d.ts +55 -0
- package/dist/esm/models/errors/recordinvoicepayment.d.ts.map +1 -0
- package/dist/esm/models/errors/recordinvoicepayment.js +39 -0
- package/dist/esm/models/errors/recordinvoicepayment.js.map +1 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.d.ts +63 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.d.ts.map +1 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.js +44 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.js.map +1 -0
- package/dist/esm/models/grouptrendentry.d.ts +5 -1
- package/dist/esm/models/grouptrendentry.d.ts.map +1 -1
- package/dist/esm/models/grouptrendentry.js +1 -0
- package/dist/esm/models/grouptrendentry.js.map +1 -1
- package/dist/esm/models/hostedlinkpaymentresult.d.ts +28 -0
- package/dist/esm/models/hostedlinkpaymentresult.d.ts.map +1 -0
- package/dist/esm/models/hostedlinkpaymentresult.js +19 -0
- package/dist/esm/models/hostedlinkpaymentresult.js.map +1 -0
- package/dist/esm/models/index.d.ts +14 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +14 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoice.d.ts +4 -3
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +2 -1
- package/dist/esm/models/invoice.js.map +1 -1
- package/dist/esm/models/invoicepaymentlinkerrorcode.d.ts +17 -0
- package/dist/esm/models/invoicepaymentlinkerrorcode.d.ts.map +1 -0
- package/dist/esm/models/invoicepaymentlinkerrorcode.js +15 -0
- package/dist/esm/models/invoicepaymentlinkerrorcode.js.map +1 -0
- package/dist/esm/models/invoicepaymentmethod.d.ts +16 -0
- package/dist/esm/models/invoicepaymentmethod.d.ts.map +1 -0
- package/dist/esm/models/invoicepaymentmethod.js +14 -0
- package/dist/esm/models/invoicepaymentmethod.js.map +1 -0
- package/dist/esm/models/invoicepaymentprovider.d.ts +16 -0
- package/dist/esm/models/invoicepaymentprovider.d.ts.map +1 -0
- package/dist/esm/models/invoicepaymentprovider.js +14 -0
- package/dist/esm/models/invoicepaymentprovider.js.map +1 -0
- package/dist/esm/models/merchantreset.d.ts +41 -0
- package/dist/esm/models/merchantreset.d.ts.map +1 -0
- package/dist/esm/models/merchantreset.js +29 -0
- package/dist/esm/models/merchantreset.js.map +1 -0
- package/dist/esm/models/migratesubscriptionversionrequest.d.ts +37 -0
- package/dist/esm/models/migratesubscriptionversionrequest.d.ts.map +1 -0
- package/dist/esm/models/migratesubscriptionversionrequest.js +23 -0
- package/dist/esm/models/migratesubscriptionversionrequest.js.map +1 -0
- package/dist/esm/models/migratesubscriptionversionresponse.d.ts +47 -0
- package/dist/esm/models/migratesubscriptionversionresponse.d.ts.map +1 -0
- package/dist/esm/models/migratesubscriptionversionresponse.js +34 -0
- package/dist/esm/models/migratesubscriptionversionresponse.js.map +1 -0
- package/dist/esm/models/operations/createplan.d.ts +5 -0
- package/dist/esm/models/operations/createplan.d.ts.map +1 -1
- package/dist/esm/models/operations/createplan.js +1 -0
- package/dist/esm/models/operations/createplan.js.map +1 -1
- package/dist/esm/models/operations/createsubscription.d.ts +5 -0
- package/dist/esm/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/createsubscription.js +1 -0
- package/dist/esm/models/operations/createsubscription.js.map +1 -1
- package/dist/esm/models/operations/createwebhooks.d.ts +15 -0
- package/dist/esm/models/operations/createwebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/createwebhooks.js +12 -0
- package/dist/esm/models/operations/createwebhooks.js.map +1 -0
- package/dist/esm/models/operations/deletewebhooks.d.ts +15 -0
- package/dist/esm/models/operations/deletewebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/deletewebhooks.js +12 -0
- package/dist/esm/models/operations/deletewebhooks.js.map +1 -0
- package/dist/esm/models/operations/getwebhookportal.d.ts +15 -0
- package/dist/esm/models/operations/getwebhookportal.d.ts.map +1 -0
- package/dist/esm/models/operations/getwebhookportal.js +12 -0
- package/dist/esm/models/operations/getwebhookportal.js.map +1 -0
- package/dist/esm/models/operations/getwebhooks.d.ts +15 -0
- package/dist/esm/models/operations/getwebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/getwebhooks.js +12 -0
- package/dist/esm/models/operations/getwebhooks.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +10 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +10 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listprojectedinvoices.d.ts +59 -0
- package/dist/esm/models/operations/listprojectedinvoices.d.ts.map +1 -0
- package/dist/esm/models/operations/listprojectedinvoices.js +32 -0
- package/dist/esm/models/operations/listprojectedinvoices.js.map +1 -0
- package/dist/esm/models/operations/migratesubscriptionversion.d.ts +18 -0
- package/dist/esm/models/operations/migratesubscriptionversion.d.ts.map +1 -0
- package/dist/esm/models/operations/migratesubscriptionversion.js +19 -0
- package/dist/esm/models/operations/migratesubscriptionversion.js.map +1 -0
- package/dist/esm/models/operations/recordinvoicepayment.d.ts +45 -0
- package/dist/esm/models/operations/recordinvoicepayment.d.ts.map +1 -0
- package/dist/esm/models/operations/recordinvoicepayment.js +36 -0
- package/dist/esm/models/operations/recordinvoicepayment.js.map +1 -0
- package/dist/esm/models/operations/resetmerchant.d.ts +15 -0
- package/dist/esm/models/operations/resetmerchant.d.ts.map +1 -0
- package/dist/esm/models/operations/resetmerchant.js +19 -0
- package/dist/esm/models/operations/resetmerchant.js.map +1 -0
- package/dist/esm/models/operations/retryinvoicepayment.d.ts +30 -0
- package/dist/esm/models/operations/retryinvoicepayment.d.ts.map +1 -0
- package/dist/esm/models/operations/retryinvoicepayment.js +26 -0
- package/dist/esm/models/operations/retryinvoicepayment.js.map +1 -0
- package/dist/esm/models/operations/updateplan.d.ts +5 -0
- package/dist/esm/models/operations/updateplan.d.ts.map +1 -1
- package/dist/esm/models/operations/updateplan.js +1 -0
- package/dist/esm/models/operations/updateplan.js.map +1 -1
- package/dist/esm/models/operations/updatewebhooks.d.ts +30 -0
- package/dist/esm/models/operations/updatewebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/updatewebhooks.js +25 -0
- package/dist/esm/models/operations/updatewebhooks.js.map +1 -0
- package/dist/esm/models/outofbandpaymentresult.d.ts +15 -0
- package/dist/esm/models/outofbandpaymentresult.d.ts.map +1 -0
- package/dist/esm/models/outofbandpaymentresult.js +15 -0
- package/dist/esm/models/outofbandpaymentresult.js.map +1 -0
- package/dist/esm/models/plan.d.ts +5 -0
- package/dist/esm/models/plan.d.ts.map +1 -1
- package/dist/esm/models/plan.js +2 -0
- package/dist/esm/models/plan.js.map +1 -1
- package/dist/esm/models/profitabilityrow.d.ts +23 -4
- package/dist/esm/models/profitabilityrow.d.ts.map +1 -1
- package/dist/esm/models/profitabilityrow.js +12 -0
- package/dist/esm/models/profitabilityrow.js.map +1 -1
- package/dist/esm/models/profitabilitysummaryresponse.d.ts +1 -1
- package/dist/esm/models/retrypaymenterror.d.ts +28 -0
- package/dist/esm/models/retrypaymenterror.d.ts.map +1 -0
- package/dist/esm/models/retrypaymenterror.js +16 -0
- package/dist/esm/models/retrypaymenterror.js.map +1 -0
- package/dist/esm/models/retrypaymentresponse.d.ts +46 -0
- package/dist/esm/models/retrypaymentresponse.d.ts.map +1 -0
- package/dist/esm/models/retrypaymentresponse.js +26 -0
- package/dist/esm/models/retrypaymentresponse.js.map +1 -0
- package/dist/esm/models/revenuesummaryresponse.d.ts +1 -1
- package/dist/esm/models/revenuetrendbucket.d.ts +6 -2
- package/dist/esm/models/revenuetrendbucket.d.ts.map +1 -1
- package/dist/esm/models/revenuetrendbucket.js +1 -0
- package/dist/esm/models/revenuetrendbucket.js.map +1 -1
- package/dist/esm/models/subscription.d.ts +29 -0
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js +13 -0
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/models/subscriptionintervaladdop.d.ts +1 -1
- package/dist/esm/models/versiontransition.d.ts +58 -0
- package/dist/esm/models/versiontransition.d.ts.map +1 -0
- package/dist/esm/models/versiontransition.js +44 -0
- package/dist/esm/models/versiontransition.js.map +1 -0
- package/dist/esm/models/webhookportal.d.ts +34 -0
- package/dist/esm/models/webhookportal.d.ts.map +1 -0
- package/dist/esm/models/webhookportal.js +23 -0
- package/dist/esm/models/webhookportal.js.map +1 -0
- package/dist/esm/models/webhooks.d.ts +46 -0
- package/dist/esm/models/webhooks.d.ts.map +1 -0
- package/dist/esm/models/webhooks.js +26 -0
- package/dist/esm/models/webhooks.js.map +1 -0
- package/dist/esm/sdk/invoicesv2.d.ts +51 -0
- package/dist/esm/sdk/invoicesv2.d.ts.map +1 -1
- package/dist/esm/sdk/invoicesv2.js +60 -0
- package/dist/esm/sdk/invoicesv2.js.map +1 -1
- package/dist/esm/sdk/merchants.d.ts +16 -0
- package/dist/esm/sdk/merchants.d.ts.map +1 -0
- package/dist/esm/sdk/merchants.js +22 -0
- package/dist/esm/sdk/merchants.js.map +1 -0
- package/dist/esm/sdk/profitability.d.ts +1 -1
- package/dist/esm/sdk/profitability.js +1 -1
- package/dist/esm/sdk/revenue.d.ts +1 -1
- package/dist/esm/sdk/revenue.js +1 -1
- package/dist/esm/sdk/sdk.d.ts +6 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +8 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/subscriptions.d.ts +7 -0
- package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
- package/dist/esm/sdk/subscriptions.js +10 -0
- package/dist/esm/sdk/subscriptions.js.map +1 -1
- package/dist/esm/sdk/webhooks.d.ts +41 -0
- package/dist/esm/sdk/webhooks.d.ts.map +1 -0
- package/dist/esm/sdk/webhooks.js +58 -0
- package/dist/esm/sdk/webhooks.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/invoicesV2ListProjectedInvoices.ts +183 -0
- package/src/funcs/invoicesV2RecordInvoicePayment.ts +194 -0
- package/src/funcs/invoicesV2RetryInvoicePayment.ts +219 -0
- package/src/funcs/merchantsReset.ts +185 -0
- package/src/funcs/profitabilityGetProfitability.ts +1 -1
- package/src/funcs/revenueGet.ts +1 -1
- package/src/funcs/subscriptionsMigrateSubscriptionVersion.ts +186 -0
- package/src/funcs/webhooksDisable.ts +175 -0
- package/src/funcs/webhooksEnable.ts +179 -0
- package/src/funcs/webhooksGet.ts +175 -0
- package/src/funcs/webhooksGetPortal.ts +175 -0
- package/src/funcs/webhooksUpdate.ts +179 -0
- package/src/lib/config.ts +2 -2
- package/src/models/currencybreakdownentry.ts +1 -1
- package/src/models/elapsedperiodbilling.ts +23 -0
- package/src/models/errors/index.ts +2 -0
- package/src/models/errors/recordinvoicepayment.ts +86 -0
- package/src/models/errors/retrypaymentresponseerror.ts +102 -0
- package/src/models/grouptrendentry.ts +6 -1
- package/src/models/hostedlinkpaymentresult.ts +56 -0
- package/src/models/index.ts +14 -0
- package/src/models/invoice.ts +4 -3
- package/src/models/invoicepaymentlinkerrorcode.ts +26 -0
- package/src/models/invoicepaymentmethod.ts +23 -0
- package/src/models/invoicepaymentprovider.ts +23 -0
- package/src/models/merchantreset.ts +85 -0
- package/src/models/migratesubscriptionversionrequest.ts +62 -0
- package/src/models/migratesubscriptionversionresponse.ts +122 -0
- package/src/models/operations/createplan.ts +6 -0
- package/src/models/operations/createsubscription.ts +8 -0
- package/src/models/operations/createwebhooks.ts +34 -0
- package/src/models/operations/deletewebhooks.ts +34 -0
- package/src/models/operations/getwebhookportal.ts +34 -0
- package/src/models/operations/getwebhooks.ts +34 -0
- package/src/models/operations/index.ts +10 -0
- package/src/models/operations/listprojectedinvoices.ts +110 -0
- package/src/models/operations/migratesubscriptionversion.ts +47 -0
- package/src/models/operations/recordinvoicepayment.ts +112 -0
- package/src/models/operations/resetmerchant.ts +40 -0
- package/src/models/operations/retryinvoicepayment.ts +74 -0
- package/src/models/operations/updateplan.ts +6 -0
- package/src/models/operations/updatewebhooks.ts +71 -0
- package/src/models/outofbandpaymentresult.ts +37 -0
- package/src/models/plan.ts +9 -0
- package/src/models/profitabilityrow.ts +27 -4
- package/src/models/profitabilitysummaryresponse.ts +1 -1
- package/src/models/retrypaymenterror.ts +52 -0
- package/src/models/retrypaymentresponse.ts +80 -0
- package/src/models/revenuesummaryresponse.ts +1 -1
- package/src/models/revenuetrendbucket.ts +7 -2
- package/src/models/subscription.ts +45 -0
- package/src/models/subscriptionintervaladdop.ts +1 -1
- package/src/models/versiontransition.ts +104 -0
- package/src/models/webhookportal.ts +61 -0
- package/src/models/webhooks.ts +76 -0
- package/src/sdk/invoicesv2.ts +84 -0
- package/src/sdk/merchants.ts +31 -0
- package/src/sdk/profitability.ts +1 -1
- package/src/sdk/revenue.ts +1 -1
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/subscriptions.ts +18 -0
- package/src/sdk/webhooks.ts +100 -0
|
@@ -107,6 +107,20 @@ export type PaymentUnion =
|
|
|
107
107
|
| PaymentPaid
|
|
108
108
|
| PaymentAwaitingApproval;
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Whether this subscription's backdated start bills its elapsed periods, as chosen at creation. `null` for a subscription created before the choice existed. `null` is listed in the enum as well as via `nullable` because the response validator checks the enum independently.
|
|
112
|
+
*/
|
|
113
|
+
export const SubscriptionElapsedPeriodBilling = {
|
|
114
|
+
None: "none",
|
|
115
|
+
PerPeriod: "per_period",
|
|
116
|
+
} as const;
|
|
117
|
+
/**
|
|
118
|
+
* Whether this subscription's backdated start bills its elapsed periods, as chosen at creation. `null` for a subscription created before the choice existed. `null` is listed in the enum as well as via `nullable` because the response validator checks the enum independently.
|
|
119
|
+
*/
|
|
120
|
+
export type SubscriptionElapsedPeriodBilling = ClosedEnum<
|
|
121
|
+
typeof SubscriptionElapsedPeriodBilling
|
|
122
|
+
>;
|
|
123
|
+
|
|
110
124
|
export const SubscriptionStatusEnum = {
|
|
111
125
|
PendingPayment: "pending_payment",
|
|
112
126
|
Active: "active",
|
|
@@ -209,6 +223,22 @@ export type Subscription = {
|
|
|
209
223
|
*/
|
|
210
224
|
minimumAccountBalance?: string | undefined;
|
|
211
225
|
startedAt: Date;
|
|
226
|
+
/**
|
|
227
|
+
* Whether this subscription's backdated start bills its elapsed periods, as chosen at creation. `null` for a subscription created before the choice existed. `null` is listed in the enum as well as via `nullable` because the response validator checks the enum independently.
|
|
228
|
+
*/
|
|
229
|
+
elapsedPeriodBilling: SubscriptionElapsedPeriodBilling | null;
|
|
230
|
+
/**
|
|
231
|
+
* The billing start: a charge is billed only if it falls due at or after this moment. Fixed at creation and never changed. It is `startedAt`, unless the start was backdated with `elapsedPeriodBilling` of `none`, in which case it is the moment of creation.
|
|
232
|
+
*/
|
|
233
|
+
billingStartsAt: Date | null;
|
|
234
|
+
/**
|
|
235
|
+
* The instant the subscription's billing periods are anchored on: its billing anchor, else its start. Every recurring period boundary is this instant plus a whole number of cadences.
|
|
236
|
+
*/
|
|
237
|
+
billingAnchor: Date;
|
|
238
|
+
/**
|
|
239
|
+
* The ISO-8601 duration the subscription's billing periods step by where no price sets its own: the subscription's cadence, else its plan's.
|
|
240
|
+
*/
|
|
241
|
+
billingCadence: string;
|
|
212
242
|
status: SubscriptionStatusEnum;
|
|
213
243
|
terminatedAt?: Date | undefined;
|
|
214
244
|
/**
|
|
@@ -372,6 +402,11 @@ export function paymentUnionFromJSON(
|
|
|
372
402
|
);
|
|
373
403
|
}
|
|
374
404
|
|
|
405
|
+
/** @internal */
|
|
406
|
+
export const SubscriptionElapsedPeriodBilling$inboundSchema: z.ZodNativeEnum<
|
|
407
|
+
typeof SubscriptionElapsedPeriodBilling
|
|
408
|
+
> = z.nativeEnum(SubscriptionElapsedPeriodBilling);
|
|
409
|
+
|
|
375
410
|
/** @internal */
|
|
376
411
|
export const SubscriptionStatusEnum$inboundSchema: z.ZodNativeEnum<
|
|
377
412
|
typeof SubscriptionStatusEnum
|
|
@@ -477,6 +512,16 @@ export const Subscription$inboundSchema: z.ZodType<
|
|
|
477
512
|
prefundAmount: z.string().optional(),
|
|
478
513
|
minimumAccountBalance: z.string().optional(),
|
|
479
514
|
startedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
515
|
+
elapsedPeriodBilling: z.nullable(
|
|
516
|
+
SubscriptionElapsedPeriodBilling$inboundSchema,
|
|
517
|
+
),
|
|
518
|
+
billingStartsAt: z.nullable(
|
|
519
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
520
|
+
),
|
|
521
|
+
billingAnchor: z.string().datetime({ offset: true }).transform(v =>
|
|
522
|
+
new Date(v)
|
|
523
|
+
),
|
|
524
|
+
billingCadence: z.string(),
|
|
480
525
|
status: SubscriptionStatusEnum$inboundSchema,
|
|
481
526
|
terminatedAt: z.string().datetime({ offset: true }).transform(v =>
|
|
482
527
|
new Date(v)
|
|
@@ -22,7 +22,7 @@ export type SubscriptionIntervalAddOpBillingMode = ClosedEnum<
|
|
|
22
22
|
>;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Adds an interval. If the plan version has a line with this priceKey, the interval overrides that line. If not, send priceId. The interval then belongs to this subscription only and keeps the rate that you write. A plan version change
|
|
25
|
+
* Adds an interval. If the plan version has a line with this priceKey, the interval overrides that line. If not, send priceId. The interval then belongs to this subscription only and keeps the rate that you write. A plan version change keeps it: it continues to bill after the subscription moves to another plan version. If a later plan version adds the same priceKey, the change is refused until the plan drops the key or the interval ends on or before the boundary.
|
|
26
26
|
*/
|
|
27
27
|
export type SubscriptionIntervalAddOp = {
|
|
28
28
|
/**
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* When the move takes effect.
|
|
13
|
+
*/
|
|
14
|
+
export const EffectiveDate = {
|
|
15
|
+
EndOfCurrentPeriod: "end_of_current_period",
|
|
16
|
+
Immediate: "immediate",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* When the move takes effect.
|
|
20
|
+
*/
|
|
21
|
+
export type EffectiveDate = ClosedEnum<typeof EffectiveDate>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* How the current period is split. Only `none` is supported.
|
|
25
|
+
*/
|
|
26
|
+
export const Proration = {
|
|
27
|
+
None: "none",
|
|
28
|
+
} as const;
|
|
29
|
+
/**
|
|
30
|
+
* How the current period is split. Only `none` is supported.
|
|
31
|
+
*/
|
|
32
|
+
export type Proration = ClosedEnum<typeof Proration>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* When a move to a new plan version takes effect for this plan's subscriptions. `end_of_current_period` (the default) moves everything at the end of the current billing period. `immediate` changes entitlements at the move, in-arrears prices for the whole current period, and in-advance prices from the next period. Neither prorates.
|
|
36
|
+
*/
|
|
37
|
+
export type VersionTransition = {
|
|
38
|
+
/**
|
|
39
|
+
* When the move takes effect.
|
|
40
|
+
*/
|
|
41
|
+
effectiveDate: EffectiveDate;
|
|
42
|
+
/**
|
|
43
|
+
* How the current period is split. Only `none` is supported.
|
|
44
|
+
*/
|
|
45
|
+
proration: Proration;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const EffectiveDate$inboundSchema: z.ZodNativeEnum<
|
|
50
|
+
typeof EffectiveDate
|
|
51
|
+
> = z.nativeEnum(EffectiveDate);
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const EffectiveDate$outboundSchema: z.ZodNativeEnum<
|
|
54
|
+
typeof EffectiveDate
|
|
55
|
+
> = EffectiveDate$inboundSchema;
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const Proration$inboundSchema: z.ZodNativeEnum<typeof Proration> = z
|
|
59
|
+
.nativeEnum(Proration);
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const Proration$outboundSchema: z.ZodNativeEnum<typeof Proration> =
|
|
62
|
+
Proration$inboundSchema;
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const VersionTransition$inboundSchema: z.ZodType<
|
|
66
|
+
VersionTransition,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
unknown
|
|
69
|
+
> = z.object({
|
|
70
|
+
effectiveDate: EffectiveDate$inboundSchema,
|
|
71
|
+
proration: Proration$inboundSchema,
|
|
72
|
+
});
|
|
73
|
+
/** @internal */
|
|
74
|
+
export type VersionTransition$Outbound = {
|
|
75
|
+
effectiveDate: string;
|
|
76
|
+
proration: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const VersionTransition$outboundSchema: z.ZodType<
|
|
81
|
+
VersionTransition$Outbound,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
VersionTransition
|
|
84
|
+
> = z.object({
|
|
85
|
+
effectiveDate: EffectiveDate$outboundSchema,
|
|
86
|
+
proration: Proration$outboundSchema,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export function versionTransitionToJSON(
|
|
90
|
+
versionTransition: VersionTransition,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
VersionTransition$outboundSchema.parse(versionTransition),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export function versionTransitionFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<VersionTransition, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => VersionTransition$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'VersionTransition' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Object type identifier
|
|
13
|
+
*/
|
|
14
|
+
export const WebhookPortalObject = {
|
|
15
|
+
WebhookPortal: "webhookPortal",
|
|
16
|
+
} as const;
|
|
17
|
+
/**
|
|
18
|
+
* Object type identifier
|
|
19
|
+
*/
|
|
20
|
+
export type WebhookPortalObject = ClosedEnum<typeof WebhookPortalObject>;
|
|
21
|
+
|
|
22
|
+
export type WebhookPortal = {
|
|
23
|
+
/**
|
|
24
|
+
* Object type identifier
|
|
25
|
+
*/
|
|
26
|
+
object: WebhookPortalObject;
|
|
27
|
+
/**
|
|
28
|
+
* When the portal link expires
|
|
29
|
+
*/
|
|
30
|
+
expiresAt: Date;
|
|
31
|
+
/**
|
|
32
|
+
* Magic link URL to access the webhook portal
|
|
33
|
+
*/
|
|
34
|
+
url: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const WebhookPortalObject$inboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof WebhookPortalObject
|
|
40
|
+
> = z.nativeEnum(WebhookPortalObject);
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const WebhookPortal$inboundSchema: z.ZodType<
|
|
44
|
+
WebhookPortal,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
object: WebhookPortalObject$inboundSchema,
|
|
49
|
+
expiresAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
50
|
+
url: z.string(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function webhookPortalFromJSON(
|
|
54
|
+
jsonString: string,
|
|
55
|
+
): SafeParseResult<WebhookPortal, SDKValidationError> {
|
|
56
|
+
return safeParse(
|
|
57
|
+
jsonString,
|
|
58
|
+
(x) => WebhookPortal$inboundSchema.parse(JSON.parse(x)),
|
|
59
|
+
`Failed to parse 'WebhookPortal' from JSON`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Object type identifier
|
|
13
|
+
*/
|
|
14
|
+
export const WebhooksObject = {
|
|
15
|
+
Webhooks: "webhooks",
|
|
16
|
+
} as const;
|
|
17
|
+
/**
|
|
18
|
+
* Object type identifier
|
|
19
|
+
*/
|
|
20
|
+
export type WebhooksObject = ClosedEnum<typeof WebhooksObject>;
|
|
21
|
+
|
|
22
|
+
export type Webhooks = {
|
|
23
|
+
/**
|
|
24
|
+
* Object type identifier
|
|
25
|
+
*/
|
|
26
|
+
object: WebhooksObject;
|
|
27
|
+
/**
|
|
28
|
+
* Svix application identifier
|
|
29
|
+
*/
|
|
30
|
+
applicationId: string;
|
|
31
|
+
/**
|
|
32
|
+
* When webhooks were first enabled
|
|
33
|
+
*/
|
|
34
|
+
createdAt: Date;
|
|
35
|
+
/**
|
|
36
|
+
* Whether webhooks are enabled
|
|
37
|
+
*/
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Merchant identifier
|
|
41
|
+
*/
|
|
42
|
+
merchantId: string;
|
|
43
|
+
/**
|
|
44
|
+
* When webhooks were last updated
|
|
45
|
+
*/
|
|
46
|
+
updatedAt: Date;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const WebhooksObject$inboundSchema: z.ZodNativeEnum<
|
|
51
|
+
typeof WebhooksObject
|
|
52
|
+
> = z.nativeEnum(WebhooksObject);
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const Webhooks$inboundSchema: z.ZodType<
|
|
56
|
+
Webhooks,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
object: WebhooksObject$inboundSchema,
|
|
61
|
+
applicationId: z.string(),
|
|
62
|
+
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
63
|
+
enabled: z.boolean(),
|
|
64
|
+
merchantId: z.string(),
|
|
65
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export function webhooksFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<Webhooks, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => Webhooks$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'Webhooks' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
package/src/sdk/invoicesv2.ts
CHANGED
|
@@ -10,6 +10,9 @@ import { invoicesV2GetLineItems } from "../funcs/invoicesV2GetLineItems.js";
|
|
|
10
10
|
import { invoicesV2List } from "../funcs/invoicesV2List.js";
|
|
11
11
|
import { invoicesV2ListInvoiceRefunds } from "../funcs/invoicesV2ListInvoiceRefunds.js";
|
|
12
12
|
import { invoicesV2ListLineItems } from "../funcs/invoicesV2ListLineItems.js";
|
|
13
|
+
import { invoicesV2ListProjectedInvoices } from "../funcs/invoicesV2ListProjectedInvoices.js";
|
|
14
|
+
import { invoicesV2RecordInvoicePayment } from "../funcs/invoicesV2RecordInvoicePayment.js";
|
|
15
|
+
import { invoicesV2RetryInvoicePayment } from "../funcs/invoicesV2RetryInvoicePayment.js";
|
|
13
16
|
import { invoicesV2VoidInvoiceRefund } from "../funcs/invoicesV2VoidInvoiceRefund.js";
|
|
14
17
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
15
18
|
import * as models from "../models/index.js";
|
|
@@ -68,6 +71,23 @@ export class InvoicesV2 extends ClientSDK {
|
|
|
68
71
|
));
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
/**
|
|
75
|
+
* List projected
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* List the invoices a subscription will issue in a range of invoice moments, one projected invoice for each distinct invoice moment. Projected invoices are derived on each read and never stored. Each has status PROJECTED, and its id is stable between reads, but GET /v2/invoices/{id} returns 404 for it. Totals EXCLUDE usage: metered charges are not projected, and an invoice moment that has only metered charges is omitted. Tax and sequenceNumber are estimates. The range filters on the invoice moment (invoiceAt) in [from, to). A from before now is treated as now. to must be after from and at most one year after now; now is the subscription's test-clock time when it has a test clock. A terminated subscription returns an empty list. Each invoice carries its lines in lineItems. Authorization is the same as listing invoices.
|
|
79
|
+
*/
|
|
80
|
+
async listProjectedInvoices(
|
|
81
|
+
request: operations.ListProjectedInvoicesRequest,
|
|
82
|
+
options?: RequestOptions,
|
|
83
|
+
): Promise<operations.ListProjectedInvoicesResponse> {
|
|
84
|
+
return unwrapAsync(invoicesV2ListProjectedInvoices(
|
|
85
|
+
this,
|
|
86
|
+
request,
|
|
87
|
+
options,
|
|
88
|
+
));
|
|
89
|
+
}
|
|
90
|
+
|
|
71
91
|
/**
|
|
72
92
|
* Get
|
|
73
93
|
*
|
|
@@ -119,6 +139,32 @@ export class InvoicesV2 extends ClientSDK {
|
|
|
119
139
|
));
|
|
120
140
|
}
|
|
121
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Settle Invoice Payment
|
|
144
|
+
*
|
|
145
|
+
* @remarks
|
|
146
|
+
* Settle an unpaid invoice in status `ISSUED` or `PAYMENT_FAILED`. The `method` field selects how.
|
|
147
|
+
*
|
|
148
|
+
* - `hosted_link`: create a new hosted payment link and email it to the customer. The invoice stays unpaid until the customer pays on the link. Each call replaces the previous link. A payment link expires after 30 days; to collect an invoice whose link has expired, call this method again.
|
|
149
|
+
* - `out_of_band`: record a payment that you collected outside Paygentic. The invoice changes to `PAID` immediately. A second call returns 409.
|
|
150
|
+
*
|
|
151
|
+
* For `hosted_link`, an invoice that does not exist returns 403, the same as an invoice of another merchant.
|
|
152
|
+
*
|
|
153
|
+
* Paygentic selects the payment provider from your connected payment account. The response reports the provider.
|
|
154
|
+
*
|
|
155
|
+
* **Warning:** each `hosted_link` call creates a new link and sends the customer a new email. Do not retry a `hosted_link` call after a timeout: first read the invoice to see if a new link exists.
|
|
156
|
+
*/
|
|
157
|
+
async recordInvoicePayment(
|
|
158
|
+
request: operations.RecordInvoicePaymentRequest,
|
|
159
|
+
options?: RequestOptions,
|
|
160
|
+
): Promise<operations.RecordInvoicePaymentResponse> {
|
|
161
|
+
return unwrapAsync(invoicesV2RecordInvoicePayment(
|
|
162
|
+
this,
|
|
163
|
+
request,
|
|
164
|
+
options,
|
|
165
|
+
));
|
|
166
|
+
}
|
|
167
|
+
|
|
122
168
|
/**
|
|
123
169
|
* Refund Invoice
|
|
124
170
|
*
|
|
@@ -169,4 +215,42 @@ export class InvoicesV2 extends ClientSDK {
|
|
|
169
215
|
options,
|
|
170
216
|
));
|
|
171
217
|
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Retry Payment
|
|
221
|
+
*
|
|
222
|
+
* @remarks
|
|
223
|
+
* Charge the customer's saved payment method again for an unpaid invoice.
|
|
224
|
+
*
|
|
225
|
+
* The invoice must be in status `ISSUED` or `PAYMENT_FAILED`, auto-charge must be on for its subscription, and the invoice must have a payment session. If not, the response is 400.
|
|
226
|
+
*
|
|
227
|
+
* The response status tells you the result. Only 200 means that the charge succeeded. Every other response from this operation that has a `retry_payment_result` body has `success: false`, and `error.code` gives the reason:
|
|
228
|
+
*
|
|
229
|
+
* | Status | `error.code` | Meaning |
|
|
230
|
+
* | --- | --- | --- |
|
|
231
|
+
* | 200 | — | The charge succeeded, the provider had already collected it, or no amount is unpaid. |
|
|
232
|
+
* | 202 | `processing` | The provider accepted the charge. It settles later (for example, a bank debit). |
|
|
233
|
+
* | 402 | a decline code, for example `card_declined`, `insufficient_funds`, `do_not_honor`, `authentication_required` | The provider declined the payment method. |
|
|
234
|
+
* | 409 | `concurrent_attempt` | Another payment attempt for this invoice is in progress. |
|
|
235
|
+
* | 409 | `PAYMENT_SESSION_EXPIRED` | The payment link expired (after 30 days). Create a new link with `POST /v2/invoices/{id}/payment` and `method: hosted_link`, then retry. If the customer also has no usable saved payment method, the response is 422 instead. |
|
|
236
|
+
* | 409 | another value, or no `code` | The payment session cannot be charged in its current state (for example `session_unusable`, `non_confirmable`, `PAYMENT_PROCESSING`, `PAYMENT_ALREADY_COMPLETED`). Read `error.message` for the cause. |
|
|
237
|
+
* | 422 | `no_payment_method` | The customer has no usable saved payment method. Send a payment link instead. |
|
|
238
|
+
* | 502 | `provider_unavailable` or none | The payment provider did not answer, or the provider failed the charge for a reason that is not known. Retry later. |
|
|
239
|
+
*
|
|
240
|
+
* A 500 response has the standard error body, not `retry_payment_result`. It is an internal error, and a retry does not fix it.
|
|
241
|
+
*
|
|
242
|
+
* An invoice that does not exist returns 403, the same as an invoice of another merchant.
|
|
243
|
+
*
|
|
244
|
+
* This operation is rate limited to one call each minute for each invoice.
|
|
245
|
+
*/
|
|
246
|
+
async retryInvoicePayment(
|
|
247
|
+
request: operations.RetryInvoicePaymentRequest,
|
|
248
|
+
options?: RequestOptions,
|
|
249
|
+
): Promise<models.RetryPaymentResponse> {
|
|
250
|
+
return unwrapAsync(invoicesV2RetryInvoicePayment(
|
|
251
|
+
this,
|
|
252
|
+
request,
|
|
253
|
+
options,
|
|
254
|
+
));
|
|
255
|
+
}
|
|
172
256
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { merchantsReset } from "../funcs/merchantsReset.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Merchants extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Reset a merchant's data
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* With `scope: merchant`, deletes the merchant's customers and everything attached to them: subscriptions, invoices, line items, payments, entitlements, grants, orders, test clocks, usage events, invoice documents and, when tax is enabled, the documents in the merchant's Quaderno sandbox account. `keepCatalog: true` keeps the catalog (products, plans, prices, fees, features, billable metrics), and `keepCatalog: false` deletes it too; the merchant's configuration is always kept. With `scope: customer`, deletes one customer and what is attached to it; test clocks and the Quaderno account's documents are kept, since they belong to no single customer.
|
|
16
|
+
*
|
|
17
|
+
* A `204` means every delete is done or scheduled: usage events and Quaderno documents finish in the background, and usage events still being ingested while it runs can survive it. A `502` means a store outside Postgres failed; the customers are already out of the API, and calling again with the same body finishes the reset. Calling again is always safe. While a customer waits for that, its external id is free for a new customer to take; a retry then deletes usage events by customer id only.
|
|
18
|
+
*
|
|
19
|
+
* Not available in production.
|
|
20
|
+
*/
|
|
21
|
+
async reset(
|
|
22
|
+
request: operations.ResetMerchantRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<void> {
|
|
25
|
+
return unwrapAsync(merchantsReset(
|
|
26
|
+
this,
|
|
27
|
+
request,
|
|
28
|
+
options,
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/sdk/profitability.ts
CHANGED
|
@@ -13,7 +13,7 @@ export class Profitability extends ClientSDK {
|
|
|
13
13
|
* Get profitability summary
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (
|
|
16
|
+
* Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant's customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single 'deleted' row, which always comes last, after 'Other', and takes no top-N slot.
|
|
17
17
|
*/
|
|
18
18
|
async getProfitability(
|
|
19
19
|
request: operations.GetProfitabilityRequest,
|
package/src/sdk/revenue.ts
CHANGED
|
@@ -13,7 +13,7 @@ export class Revenue extends ClientSDK {
|
|
|
13
13
|
* Get revenue summary
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Returns revenue summary with invoice and payment breakdowns (outstanding/paid/writtenOff), plus a time-series trend. Revenue is
|
|
16
|
+
* Returns revenue summary with invoice and payment breakdowns (outstanding/paid/writtenOff), plus a time-series trend. Revenue is what was billed in the period (by default, invoices issued in it; see periodBasis), whatever their status since, less refunds, both excluding tax; completed payments are reported under payments, never in revenue.
|
|
17
17
|
*/
|
|
18
18
|
async get(
|
|
19
19
|
request: operations.GetRevenueRequest,
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { Fees } from "./fees.js";
|
|
|
16
16
|
import { InvoicesV2 } from "./invoicesv2.js";
|
|
17
17
|
import { Items } from "./items.js";
|
|
18
18
|
import { MerchantIntegrations } from "./merchantintegrations.js";
|
|
19
|
+
import { Merchants } from "./merchants.js";
|
|
19
20
|
import { Orders } from "./orders.js";
|
|
20
21
|
import { Payments } from "./payments.js";
|
|
21
22
|
import { PaymentSessions } from "./paymentsessions.js";
|
|
@@ -29,6 +30,7 @@ import { Sources } from "./sources.js";
|
|
|
29
30
|
import { Subscriptions } from "./subscriptions.js";
|
|
30
31
|
import { TestClocks } from "./testclocks.js";
|
|
31
32
|
import { Users } from "./users.js";
|
|
33
|
+
import { Webhooks } from "./webhooks.js";
|
|
32
34
|
|
|
33
35
|
export class Paygentic extends ClientSDK {
|
|
34
36
|
private _billableMetrics?: BillableMetrics;
|
|
@@ -126,6 +128,11 @@ export class Paygentic extends ClientSDK {
|
|
|
126
128
|
return (this._testClocks ??= new TestClocks(this._options));
|
|
127
129
|
}
|
|
128
130
|
|
|
131
|
+
private _merchants?: Merchants;
|
|
132
|
+
get merchants(): Merchants {
|
|
133
|
+
return (this._merchants ??= new Merchants(this._options));
|
|
134
|
+
}
|
|
135
|
+
|
|
129
136
|
private _externalReferences?: ExternalReferences;
|
|
130
137
|
get externalReferences(): ExternalReferences {
|
|
131
138
|
return (this._externalReferences ??= new ExternalReferences(this._options));
|
|
@@ -162,4 +169,9 @@ export class Paygentic extends ClientSDK {
|
|
|
162
169
|
get approvals(): Approvals {
|
|
163
170
|
return (this._approvals ??= new Approvals(this._options));
|
|
164
171
|
}
|
|
172
|
+
|
|
173
|
+
private _webhooks?: Webhooks;
|
|
174
|
+
get webhooks(): Webhooks {
|
|
175
|
+
return (this._webhooks ??= new Webhooks(this._options));
|
|
176
|
+
}
|
|
165
177
|
}
|
package/src/sdk/subscriptions.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { subscriptionsList } from "../funcs/subscriptionsList.js";
|
|
|
13
13
|
import { subscriptionsListIntervalChanges } from "../funcs/subscriptionsListIntervalChanges.js";
|
|
14
14
|
import { subscriptionsListSubscriptionAdjustments } from "../funcs/subscriptionsListSubscriptionAdjustments.js";
|
|
15
15
|
import { subscriptionsListSubscriptionIntervalChanges } from "../funcs/subscriptionsListSubscriptionIntervalChanges.js";
|
|
16
|
+
import { subscriptionsMigrateSubscriptionVersion } from "../funcs/subscriptionsMigrateSubscriptionVersion.js";
|
|
16
17
|
import { subscriptionsReconcileSubscriptionFeatures } from "../funcs/subscriptionsReconcileSubscriptionFeatures.js";
|
|
17
18
|
import { subscriptionsTerminate } from "../funcs/subscriptionsTerminate.js";
|
|
18
19
|
import { subscriptionsUpdateSubscription } from "../funcs/subscriptionsUpdateSubscription.js";
|
|
@@ -115,6 +116,23 @@ export class Subscriptions extends ClientSDK {
|
|
|
115
116
|
));
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Migrate To A Plan Version
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* Moves the subscription to a named version of its plan. By default the move follows the plan's versionTransition. With timing next_period, the move takes effect at the end of the current billing period: the current period bills as before, and each period that starts at or after that boundary bills from the target version. With timing immediate, entitlements change at once, in-arrears prices bill the whole current period at the target version, and in-advance prices change at the end of the current period, with no proration. The target can be an older or a newer published version. A migration always sets versionPolicy to pinned, so a later change of the plan's default version does not move the subscription. To follow the plan default again, call PATCH /v0/subscriptions/{id} with versionPolicy: 'floating'. A second migration before the boundary replaces the first. Migrating to the version the subscription is already on changes nothing except that it pins a floating subscription, so it is safe to repeat. A version number that does not exist on the plan and an archived version both return 404. The request is refused with 409 and a code when: the subscription is not live; the subscription ends at or before the boundary; a kept override has a rate that would mean something else on the new price; a feature's reset period, metric or pricing unit changes; or the new version sells a price that a continuing interval already covers.
|
|
124
|
+
*/
|
|
125
|
+
async migrateSubscriptionVersion(
|
|
126
|
+
request: operations.MigrateSubscriptionVersionRequest,
|
|
127
|
+
options?: RequestOptions,
|
|
128
|
+
): Promise<models.MigrateSubscriptionVersionResponse> {
|
|
129
|
+
return unwrapAsync(subscriptionsMigrateSubscriptionVersion(
|
|
130
|
+
this,
|
|
131
|
+
request,
|
|
132
|
+
options,
|
|
133
|
+
));
|
|
134
|
+
}
|
|
135
|
+
|
|
118
136
|
/**
|
|
119
137
|
* List Interval Changes
|
|
120
138
|
*
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { webhooksDisable } from "../funcs/webhooksDisable.js";
|
|
6
|
+
import { webhooksEnable } from "../funcs/webhooksEnable.js";
|
|
7
|
+
import { webhooksGet } from "../funcs/webhooksGet.js";
|
|
8
|
+
import { webhooksGetPortal } from "../funcs/webhooksGetPortal.js";
|
|
9
|
+
import { webhooksUpdate } from "../funcs/webhooksUpdate.js";
|
|
10
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import * as models from "../models/index.js";
|
|
12
|
+
import * as operations from "../models/operations/index.js";
|
|
13
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
14
|
+
|
|
15
|
+
export class Webhooks extends ClientSDK {
|
|
16
|
+
/**
|
|
17
|
+
* Get
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Returns the webhook configuration for your account. Returns 404 if webhooks have never been enabled.
|
|
21
|
+
*/
|
|
22
|
+
async get(
|
|
23
|
+
request?: operations.GetWebhooksRequest | undefined,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<models.Webhooks> {
|
|
26
|
+
return unwrapAsync(webhooksGet(
|
|
27
|
+
this,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Enable
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Turns on webhook delivery for your account. Call it once: when a configuration already exists, enabled or disabled, the response is 400 with code `DUPLICATE_RESOURCE`. Use the update operation to turn delivery on or off after that. Endpoint URLs, event subscriptions and the signing secret are managed in the webhook portal.
|
|
38
|
+
*/
|
|
39
|
+
async enable(
|
|
40
|
+
request?: operations.CreateWebhooksRequest | undefined,
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): Promise<models.Webhooks> {
|
|
43
|
+
return unwrapAsync(webhooksEnable(
|
|
44
|
+
this,
|
|
45
|
+
request,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Update
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Turns webhook delivery on or off. Set `enabled` to `false` to pause delivery and to `true` to resume it. Endpoints and their event subscriptions are kept. Returns 404 if webhooks have never been enabled.
|
|
55
|
+
*/
|
|
56
|
+
async update(
|
|
57
|
+
request: operations.UpdateWebhooksRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<models.Webhooks> {
|
|
60
|
+
return unwrapAsync(webhooksUpdate(
|
|
61
|
+
this,
|
|
62
|
+
request,
|
|
63
|
+
options,
|
|
64
|
+
));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Disable
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* Pauses webhook delivery. This has the same effect as the update operation with `enabled: false`: it does not delete the configuration, the endpoints or their event subscriptions. Use the update operation with `enabled: true` to resume delivery. Returns 404 if webhooks have never been enabled.
|
|
72
|
+
*/
|
|
73
|
+
async disable(
|
|
74
|
+
request?: operations.DeleteWebhooksRequest | undefined,
|
|
75
|
+
options?: RequestOptions,
|
|
76
|
+
): Promise<void> {
|
|
77
|
+
return unwrapAsync(webhooksDisable(
|
|
78
|
+
this,
|
|
79
|
+
request,
|
|
80
|
+
options,
|
|
81
|
+
));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Get Portal Access
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* Returns a link to the webhook portal, where you add endpoints, choose event types, read the signing secret and inspect deliveries. The link opens without a login and expires one hour after it is issued, at `expiresAt`. Treat it as a secret. Returns 404 unless webhooks are enabled.
|
|
89
|
+
*/
|
|
90
|
+
async getPortal(
|
|
91
|
+
request?: operations.GetWebhookPortalRequest | undefined,
|
|
92
|
+
options?: RequestOptions,
|
|
93
|
+
): Promise<models.WebhookPortal> {
|
|
94
|
+
return unwrapAsync(webhooksGetPortal(
|
|
95
|
+
this,
|
|
96
|
+
request,
|
|
97
|
+
options,
|
|
98
|
+
));
|
|
99
|
+
}
|
|
100
|
+
}
|