@polar-sh/sdk 0.46.2 → 0.46.4
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 +2 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.d.ts +2 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.js +3 -2
- package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsUpdate.d.ts +2 -1
- package/dist/commonjs/funcs/subscriptionsUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/subscriptionsUpdate.js +3 -2
- package/dist/commonjs/funcs/subscriptionsUpdate.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/checkoutdiscountfixedonceforeverduration.d.ts +15 -0
- package/dist/commonjs/models/components/checkoutdiscountfixedonceforeverduration.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutdiscountfixedonceforeverduration.js +2 -0
- package/dist/commonjs/models/components/checkoutdiscountfixedonceforeverduration.js.map +1 -1
- package/dist/commonjs/models/components/checkoutdiscountfixedrepeatduration.d.ts +15 -0
- package/dist/commonjs/models/components/checkoutdiscountfixedrepeatduration.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutdiscountfixedrepeatduration.js +2 -0
- package/dist/commonjs/models/components/checkoutdiscountfixedrepeatduration.js.map +1 -1
- package/dist/commonjs/models/components/customercreate.d.ts +2 -9
- package/dist/commonjs/models/components/customercreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customercreate.js +2 -9
- package/dist/commonjs/models/components/customercreate.js.map +1 -1
- package/dist/commonjs/models/components/customersubscription.d.ts +5 -0
- package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customersubscription.js +3 -0
- package/dist/commonjs/models/components/customersubscription.js.map +1 -1
- package/dist/commonjs/models/components/customerupdate.d.ts +2 -9
- package/dist/commonjs/models/components/customerupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerupdate.js +2 -9
- package/dist/commonjs/models/components/customerupdate.js.map +1 -1
- package/dist/commonjs/models/components/customerupdateexternalid.d.ts +2 -9
- package/dist/commonjs/models/components/customerupdateexternalid.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerupdateexternalid.js +2 -9
- package/dist/commonjs/models/components/customerupdateexternalid.js.map +1 -1
- package/dist/commonjs/models/components/discountcreate.d.ts +2 -2
- package/dist/commonjs/models/components/discountcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountcreate.js +2 -2
- package/dist/commonjs/models/components/discountcreate.js.map +1 -1
- package/dist/commonjs/models/components/discountfixedonceforeverduration.d.ts +12 -0
- package/dist/commonjs/models/components/discountfixedonceforeverduration.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountfixedonceforeverduration.js +1 -0
- package/dist/commonjs/models/components/discountfixedonceforeverduration.js.map +1 -1
- package/dist/commonjs/models/components/discountfixedonceforeverdurationbase.d.ts +15 -0
- package/dist/commonjs/models/components/discountfixedonceforeverdurationbase.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountfixedonceforeverdurationbase.js +2 -0
- package/dist/commonjs/models/components/discountfixedonceforeverdurationbase.js.map +1 -1
- package/dist/commonjs/models/components/discountfixedonceforeverdurationcreate.d.ts +14 -5
- package/dist/commonjs/models/components/discountfixedonceforeverdurationcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountfixedonceforeverdurationcreate.js +3 -2
- package/dist/commonjs/models/components/discountfixedonceforeverdurationcreate.js.map +1 -1
- package/dist/commonjs/models/components/discountfixedrepeatduration.d.ts +12 -0
- package/dist/commonjs/models/components/discountfixedrepeatduration.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountfixedrepeatduration.js +1 -0
- package/dist/commonjs/models/components/discountfixedrepeatduration.js.map +1 -1
- package/dist/commonjs/models/components/discountfixedrepeatdurationbase.d.ts +15 -0
- package/dist/commonjs/models/components/discountfixedrepeatdurationbase.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountfixedrepeatdurationbase.js +2 -0
- package/dist/commonjs/models/components/discountfixedrepeatdurationbase.js.map +1 -1
- package/dist/commonjs/models/components/discountfixedrepeatdurationcreate.d.ts +14 -5
- package/dist/commonjs/models/components/discountfixedrepeatdurationcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountfixedrepeatdurationcreate.js +3 -2
- package/dist/commonjs/models/components/discountfixedrepeatdurationcreate.js.map +1 -1
- package/dist/commonjs/models/components/discountsortproperty.d.ts +2 -0
- package/dist/commonjs/models/components/discountsortproperty.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountsortproperty.js +2 -0
- package/dist/commonjs/models/components/discountsortproperty.js.map +1 -1
- package/dist/commonjs/models/components/discountupdate.d.ts +12 -0
- package/dist/commonjs/models/components/discountupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/discountupdate.js +1 -0
- package/dist/commonjs/models/components/discountupdate.js.map +1 -1
- package/dist/commonjs/models/components/metricperiod.d.ts +5 -5
- package/dist/commonjs/models/components/metricperiod.d.ts.map +1 -1
- package/dist/commonjs/models/components/metricperiod.js +9 -9
- package/dist/commonjs/models/components/metricperiod.js.map +1 -1
- package/dist/commonjs/models/components/metrics.d.ts +1 -1
- package/dist/commonjs/models/components/metrics.d.ts.map +1 -1
- package/dist/commonjs/models/components/metrics.js +2 -2
- package/dist/commonjs/models/components/metrics.js.map +1 -1
- package/dist/commonjs/models/components/metricstotals.d.ts +5 -5
- package/dist/commonjs/models/components/metricstotals.d.ts.map +1 -1
- package/dist/commonjs/models/components/metricstotals.js +9 -9
- package/dist/commonjs/models/components/metricstotals.js.map +1 -1
- package/dist/commonjs/models/components/organizationcustomeremailsettings.d.ts +4 -0
- package/dist/commonjs/models/components/organizationcustomeremailsettings.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationcustomeremailsettings.js +8 -0
- package/dist/commonjs/models/components/organizationcustomeremailsettings.js.map +1 -1
- package/dist/commonjs/models/components/pendingsubscriptionupdate.d.ts +48 -0
- package/dist/commonjs/models/components/pendingsubscriptionupdate.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendingsubscriptionupdate.js +83 -0
- package/dist/commonjs/models/components/pendingsubscriptionupdate.js.map +1 -0
- package/dist/commonjs/models/components/subscription.d.ts +6 -0
- package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscription.js +5 -0
- package/dist/commonjs/models/components/subscription.js.map +1 -1
- package/dist/commonjs/models/components/subscriptionprorationbehavior.d.ts +1 -0
- package/dist/commonjs/models/components/subscriptionprorationbehavior.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptionprorationbehavior.js +1 -0
- package/dist/commonjs/models/components/subscriptionprorationbehavior.js.map +1 -1
- package/dist/commonjs/models/components/subscriptionupdatedbillingperiodmetadata.d.ts +11 -0
- package/dist/commonjs/models/components/subscriptionupdatedbillingperiodmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedbillingperiodmetadata.js +57 -0
- package/dist/commonjs/models/components/subscriptionupdatedbillingperiodmetadata.js.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdateddiscountmetadata.d.ts +11 -0
- package/dist/commonjs/models/components/subscriptionupdateddiscountmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdateddiscountmetadata.js +57 -0
- package/dist/commonjs/models/components/subscriptionupdateddiscountmetadata.js.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedevent.d.ts +75 -0
- package/dist/commonjs/models/components/subscriptionupdatedevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedevent.js +99 -0
- package/dist/commonjs/models/components/subscriptionupdatedevent.js.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedproductmetadata.d.ts +13 -0
- package/dist/commonjs/models/components/subscriptionupdatedproductmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedproductmetadata.js +60 -0
- package/dist/commonjs/models/components/subscriptionupdatedproductmetadata.js.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedseatsmetadata.d.ts +13 -0
- package/dist/commonjs/models/components/subscriptionupdatedseatsmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedseatsmetadata.js +59 -0
- package/dist/commonjs/models/components/subscriptionupdatedseatsmetadata.js.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedtrialmetadata.d.ts +11 -0
- package/dist/commonjs/models/components/subscriptionupdatedtrialmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/subscriptionupdatedtrialmetadata.js +57 -0
- package/dist/commonjs/models/components/subscriptionupdatedtrialmetadata.js.map +1 -0
- package/dist/commonjs/models/components/systemevent.d.ts +2 -1
- package/dist/commonjs/models/components/systemevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/systemevent.js +2 -0
- package/dist/commonjs/models/components/systemevent.js.map +1 -1
- package/dist/commonjs/models/components/tokenresponse.d.ts +2 -2
- package/dist/commonjs/models/components/tokenresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/tokenresponse.js +2 -2
- package/dist/commonjs/models/components/tokenresponse.js.map +1 -1
- package/dist/commonjs/models/errors/paymentfailed.d.ts +20 -0
- package/dist/commonjs/models/errors/paymentfailed.d.ts.map +1 -0
- package/dist/commonjs/models/errors/paymentfailed.js +69 -0
- package/dist/commonjs/models/errors/paymentfailed.js.map +1 -0
- package/dist/commonjs/webhooks.d.ts +1 -1
- package/dist/commonjs/webhooks.d.ts.map +1 -1
- package/dist/commonjs/webhooks.js +15 -0
- package/dist/commonjs/webhooks.js.map +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsUpdate.d.ts +2 -1
- package/dist/esm/funcs/customerPortalSubscriptionsUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsUpdate.js +3 -2
- package/dist/esm/funcs/customerPortalSubscriptionsUpdate.js.map +1 -1
- package/dist/esm/funcs/subscriptionsUpdate.d.ts +2 -1
- package/dist/esm/funcs/subscriptionsUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/subscriptionsUpdate.js +3 -2
- package/dist/esm/funcs/subscriptionsUpdate.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/checkoutdiscountfixedonceforeverduration.d.ts +15 -0
- package/dist/esm/models/components/checkoutdiscountfixedonceforeverduration.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutdiscountfixedonceforeverduration.js +2 -0
- package/dist/esm/models/components/checkoutdiscountfixedonceforeverduration.js.map +1 -1
- package/dist/esm/models/components/checkoutdiscountfixedrepeatduration.d.ts +15 -0
- package/dist/esm/models/components/checkoutdiscountfixedrepeatduration.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutdiscountfixedrepeatduration.js +2 -0
- package/dist/esm/models/components/checkoutdiscountfixedrepeatduration.js.map +1 -1
- package/dist/esm/models/components/customercreate.d.ts +2 -9
- package/dist/esm/models/components/customercreate.d.ts.map +1 -1
- package/dist/esm/models/components/customercreate.js +1 -7
- package/dist/esm/models/components/customercreate.js.map +1 -1
- package/dist/esm/models/components/customersubscription.d.ts +5 -0
- package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customersubscription.js +3 -0
- package/dist/esm/models/components/customersubscription.js.map +1 -1
- package/dist/esm/models/components/customerupdate.d.ts +2 -9
- package/dist/esm/models/components/customerupdate.d.ts.map +1 -1
- package/dist/esm/models/components/customerupdate.js +1 -7
- package/dist/esm/models/components/customerupdate.js.map +1 -1
- package/dist/esm/models/components/customerupdateexternalid.d.ts +2 -9
- package/dist/esm/models/components/customerupdateexternalid.d.ts.map +1 -1
- package/dist/esm/models/components/customerupdateexternalid.js +1 -7
- package/dist/esm/models/components/customerupdateexternalid.js.map +1 -1
- package/dist/esm/models/components/discountcreate.d.ts +2 -2
- package/dist/esm/models/components/discountcreate.d.ts.map +1 -1
- package/dist/esm/models/components/discountcreate.js +2 -2
- package/dist/esm/models/components/discountcreate.js.map +1 -1
- package/dist/esm/models/components/discountfixedonceforeverduration.d.ts +12 -0
- package/dist/esm/models/components/discountfixedonceforeverduration.d.ts.map +1 -1
- package/dist/esm/models/components/discountfixedonceforeverduration.js +1 -0
- package/dist/esm/models/components/discountfixedonceforeverduration.js.map +1 -1
- package/dist/esm/models/components/discountfixedonceforeverdurationbase.d.ts +15 -0
- package/dist/esm/models/components/discountfixedonceforeverdurationbase.d.ts.map +1 -1
- package/dist/esm/models/components/discountfixedonceforeverdurationbase.js +2 -0
- package/dist/esm/models/components/discountfixedonceforeverdurationbase.js.map +1 -1
- package/dist/esm/models/components/discountfixedonceforeverdurationcreate.d.ts +14 -5
- package/dist/esm/models/components/discountfixedonceforeverdurationcreate.d.ts.map +1 -1
- package/dist/esm/models/components/discountfixedonceforeverdurationcreate.js +3 -2
- package/dist/esm/models/components/discountfixedonceforeverdurationcreate.js.map +1 -1
- package/dist/esm/models/components/discountfixedrepeatduration.d.ts +12 -0
- package/dist/esm/models/components/discountfixedrepeatduration.d.ts.map +1 -1
- package/dist/esm/models/components/discountfixedrepeatduration.js +1 -0
- package/dist/esm/models/components/discountfixedrepeatduration.js.map +1 -1
- package/dist/esm/models/components/discountfixedrepeatdurationbase.d.ts +15 -0
- package/dist/esm/models/components/discountfixedrepeatdurationbase.d.ts.map +1 -1
- package/dist/esm/models/components/discountfixedrepeatdurationbase.js +2 -0
- package/dist/esm/models/components/discountfixedrepeatdurationbase.js.map +1 -1
- package/dist/esm/models/components/discountfixedrepeatdurationcreate.d.ts +14 -5
- package/dist/esm/models/components/discountfixedrepeatdurationcreate.d.ts.map +1 -1
- package/dist/esm/models/components/discountfixedrepeatdurationcreate.js +3 -2
- package/dist/esm/models/components/discountfixedrepeatdurationcreate.js.map +1 -1
- package/dist/esm/models/components/discountsortproperty.d.ts +2 -0
- package/dist/esm/models/components/discountsortproperty.d.ts.map +1 -1
- package/dist/esm/models/components/discountsortproperty.js +2 -0
- package/dist/esm/models/components/discountsortproperty.js.map +1 -1
- package/dist/esm/models/components/discountupdate.d.ts +12 -0
- package/dist/esm/models/components/discountupdate.d.ts.map +1 -1
- package/dist/esm/models/components/discountupdate.js +1 -0
- package/dist/esm/models/components/discountupdate.js.map +1 -1
- package/dist/esm/models/components/metricperiod.d.ts +5 -5
- package/dist/esm/models/components/metricperiod.d.ts.map +1 -1
- package/dist/esm/models/components/metricperiod.js +7 -7
- package/dist/esm/models/components/metricperiod.js.map +1 -1
- package/dist/esm/models/components/metrics.d.ts +1 -1
- package/dist/esm/models/components/metrics.d.ts.map +1 -1
- package/dist/esm/models/components/metrics.js +2 -2
- package/dist/esm/models/components/metrics.js.map +1 -1
- package/dist/esm/models/components/metricstotals.d.ts +5 -5
- package/dist/esm/models/components/metricstotals.d.ts.map +1 -1
- package/dist/esm/models/components/metricstotals.js +7 -7
- package/dist/esm/models/components/metricstotals.js.map +1 -1
- package/dist/esm/models/components/organizationcustomeremailsettings.d.ts +4 -0
- package/dist/esm/models/components/organizationcustomeremailsettings.d.ts.map +1 -1
- package/dist/esm/models/components/organizationcustomeremailsettings.js +8 -0
- package/dist/esm/models/components/organizationcustomeremailsettings.js.map +1 -1
- package/dist/esm/models/components/pendingsubscriptionupdate.d.ts +48 -0
- package/dist/esm/models/components/pendingsubscriptionupdate.d.ts.map +1 -0
- package/dist/esm/models/components/pendingsubscriptionupdate.js +45 -0
- package/dist/esm/models/components/pendingsubscriptionupdate.js.map +1 -0
- package/dist/esm/models/components/subscription.d.ts +6 -0
- package/dist/esm/models/components/subscription.d.ts.map +1 -1
- package/dist/esm/models/components/subscription.js +5 -0
- package/dist/esm/models/components/subscription.js.map +1 -1
- package/dist/esm/models/components/subscriptionprorationbehavior.d.ts +1 -0
- package/dist/esm/models/components/subscriptionprorationbehavior.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptionprorationbehavior.js +1 -0
- package/dist/esm/models/components/subscriptionprorationbehavior.js.map +1 -1
- package/dist/esm/models/components/subscriptionupdatedbillingperiodmetadata.d.ts +11 -0
- package/dist/esm/models/components/subscriptionupdatedbillingperiodmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedbillingperiodmetadata.js +20 -0
- package/dist/esm/models/components/subscriptionupdatedbillingperiodmetadata.js.map +1 -0
- package/dist/esm/models/components/subscriptionupdateddiscountmetadata.d.ts +11 -0
- package/dist/esm/models/components/subscriptionupdateddiscountmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/subscriptionupdateddiscountmetadata.js +20 -0
- package/dist/esm/models/components/subscriptionupdateddiscountmetadata.js.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedevent.d.ts +75 -0
- package/dist/esm/models/components/subscriptionupdatedevent.d.ts.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedevent.js +61 -0
- package/dist/esm/models/components/subscriptionupdatedevent.js.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedproductmetadata.d.ts +13 -0
- package/dist/esm/models/components/subscriptionupdatedproductmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedproductmetadata.js +23 -0
- package/dist/esm/models/components/subscriptionupdatedproductmetadata.js.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedseatsmetadata.d.ts +13 -0
- package/dist/esm/models/components/subscriptionupdatedseatsmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedseatsmetadata.js +22 -0
- package/dist/esm/models/components/subscriptionupdatedseatsmetadata.js.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedtrialmetadata.d.ts +11 -0
- package/dist/esm/models/components/subscriptionupdatedtrialmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/subscriptionupdatedtrialmetadata.js +20 -0
- package/dist/esm/models/components/subscriptionupdatedtrialmetadata.js.map +1 -0
- package/dist/esm/models/components/systemevent.d.ts +2 -1
- package/dist/esm/models/components/systemevent.d.ts.map +1 -1
- package/dist/esm/models/components/systemevent.js +2 -0
- package/dist/esm/models/components/systemevent.js.map +1 -1
- package/dist/esm/models/components/tokenresponse.d.ts +2 -2
- package/dist/esm/models/components/tokenresponse.d.ts.map +1 -1
- package/dist/esm/models/components/tokenresponse.js +2 -2
- package/dist/esm/models/components/tokenresponse.js.map +1 -1
- package/dist/esm/models/errors/paymentfailed.d.ts +20 -0
- package/dist/esm/models/errors/paymentfailed.d.ts.map +1 -0
- package/dist/esm/models/errors/paymentfailed.js +32 -0
- package/dist/esm/models/errors/paymentfailed.js.map +1 -0
- package/dist/esm/webhooks.d.ts +1 -1
- package/dist/esm/webhooks.d.ts.map +1 -1
- package/dist/esm/webhooks.js +15 -0
- package/dist/esm/webhooks.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customerPortalSubscriptionsUpdate.ts +9 -1
- package/src/funcs/subscriptionsUpdate.ts +9 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/checkoutdiscountfixedonceforeverduration.ts +13 -0
- package/src/models/components/checkoutdiscountfixedrepeatduration.ts +13 -0
- package/src/models/components/customercreate.ts +3 -29
- package/src/models/components/customersubscription.ts +10 -0
- package/src/models/components/customerupdate.ts +3 -29
- package/src/models/components/customerupdateexternalid.ts +3 -31
- package/src/models/components/discountcreate.ts +8 -8
- package/src/models/components/discountfixedonceforeverduration.ts +11 -0
- package/src/models/components/discountfixedonceforeverdurationbase.ts +13 -0
- package/src/models/components/discountfixedonceforeverdurationcreate.ts +13 -7
- package/src/models/components/discountfixedrepeatduration.ts +11 -0
- package/src/models/components/discountfixedrepeatdurationbase.ts +13 -0
- package/src/models/components/discountfixedrepeatdurationcreate.ts +13 -7
- package/src/models/components/discountsortproperty.ts +2 -0
- package/src/models/components/discountupdate.ts +9 -0
- package/src/models/components/metricperiod.ts +23 -23
- package/src/models/components/metrics.ts +3 -3
- package/src/models/components/metricstotals.ts +23 -23
- package/src/models/components/organizationcustomeremailsettings.ts +14 -0
- package/src/models/components/pendingsubscriptionupdate.ts +119 -0
- package/src/models/components/subscription.ts +15 -0
- package/src/models/components/subscriptionprorationbehavior.ts +1 -0
- package/src/models/components/subscriptionupdatedbillingperiodmetadata.ts +45 -0
- package/src/models/components/subscriptionupdateddiscountmetadata.ts +42 -0
- package/src/models/components/subscriptionupdatedevent.ts +177 -0
- package/src/models/components/subscriptionupdatedproductmetadata.ts +49 -0
- package/src/models/components/subscriptionupdatedseatsmetadata.ts +47 -0
- package/src/models/components/subscriptionupdatedtrialmetadata.ts +41 -0
- package/src/models/components/systemevent.ts +7 -1
- package/src/models/components/tokenresponse.ts +4 -4
- package/src/models/errors/paymentfailed.ts +55 -0
- package/src/webhooks.ts +15 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
SubscriptionProrationBehavior,
|
|
12
|
+
SubscriptionProrationBehavior$inboundSchema,
|
|
13
|
+
} from "./subscriptionprorationbehavior.js";
|
|
14
|
+
|
|
15
|
+
export type SubscriptionUpdatedSeatsMetadata = {
|
|
16
|
+
subscriptionId: string;
|
|
17
|
+
seats: number;
|
|
18
|
+
prorationBehavior: SubscriptionProrationBehavior;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const SubscriptionUpdatedSeatsMetadata$inboundSchema: z.ZodMiniType<
|
|
23
|
+
SubscriptionUpdatedSeatsMetadata,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.pipe(
|
|
26
|
+
z.object({
|
|
27
|
+
subscription_id: z.string(),
|
|
28
|
+
seats: z.int(),
|
|
29
|
+
proration_behavior: SubscriptionProrationBehavior$inboundSchema,
|
|
30
|
+
}),
|
|
31
|
+
z.transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"subscription_id": "subscriptionId",
|
|
34
|
+
"proration_behavior": "prorationBehavior",
|
|
35
|
+
});
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export function subscriptionUpdatedSeatsMetadataFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<SubscriptionUpdatedSeatsMetadata, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => SubscriptionUpdatedSeatsMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'SubscriptionUpdatedSeatsMetadata' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type SubscriptionUpdatedTrialMetadata = {
|
|
12
|
+
subscriptionId: string;
|
|
13
|
+
trialEnd: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const SubscriptionUpdatedTrialMetadata$inboundSchema: z.ZodMiniType<
|
|
18
|
+
SubscriptionUpdatedTrialMetadata,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.pipe(
|
|
21
|
+
z.object({
|
|
22
|
+
subscription_id: z.string(),
|
|
23
|
+
trial_end: z.string(),
|
|
24
|
+
}),
|
|
25
|
+
z.transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"subscription_id": "subscriptionId",
|
|
28
|
+
"trial_end": "trialEnd",
|
|
29
|
+
});
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export function subscriptionUpdatedTrialMetadataFromJSON(
|
|
34
|
+
jsonString: string,
|
|
35
|
+
): SafeParseResult<SubscriptionUpdatedTrialMetadata, SDKValidationError> {
|
|
36
|
+
return safeParse(
|
|
37
|
+
jsonString,
|
|
38
|
+
(x) => SubscriptionUpdatedTrialMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
39
|
+
`Failed to parse 'SubscriptionUpdatedTrialMetadata' from JSON`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -110,6 +110,10 @@ import {
|
|
|
110
110
|
SubscriptionUncanceledEvent,
|
|
111
111
|
SubscriptionUncanceledEvent$inboundSchema,
|
|
112
112
|
} from "./subscriptionuncanceledevent.js";
|
|
113
|
+
import {
|
|
114
|
+
SubscriptionUpdatedEvent,
|
|
115
|
+
SubscriptionUpdatedEvent$inboundSchema,
|
|
116
|
+
} from "./subscriptionupdatedevent.js";
|
|
113
117
|
|
|
114
118
|
export type SystemEvent =
|
|
115
119
|
| BalanceCreditOrderEvent
|
|
@@ -137,7 +141,8 @@ export type SystemEvent =
|
|
|
137
141
|
| SubscriptionProductUpdatedEvent
|
|
138
142
|
| SubscriptionRevokedEvent
|
|
139
143
|
| SubscriptionSeatsUpdatedEvent
|
|
140
|
-
| SubscriptionUncanceledEvent
|
|
144
|
+
| SubscriptionUncanceledEvent
|
|
145
|
+
| SubscriptionUpdatedEvent;
|
|
141
146
|
|
|
142
147
|
/** @internal */
|
|
143
148
|
export const SystemEvent$inboundSchema: z.ZodMiniType<SystemEvent, unknown> = z
|
|
@@ -168,6 +173,7 @@ export const SystemEvent$inboundSchema: z.ZodMiniType<SystemEvent, unknown> = z
|
|
|
168
173
|
SubscriptionRevokedEvent$inboundSchema,
|
|
169
174
|
SubscriptionSeatsUpdatedEvent$inboundSchema,
|
|
170
175
|
SubscriptionUncanceledEvent$inboundSchema,
|
|
176
|
+
SubscriptionUpdatedEvent$inboundSchema,
|
|
171
177
|
]);
|
|
172
178
|
|
|
173
179
|
export function systemEventFromJSON(
|
|
@@ -12,9 +12,9 @@ export type TokenResponse = {
|
|
|
12
12
|
accessToken: string;
|
|
13
13
|
tokenType: "Bearer";
|
|
14
14
|
expiresIn: number;
|
|
15
|
-
refreshToken
|
|
15
|
+
refreshToken?: string | null | undefined;
|
|
16
16
|
scope: string;
|
|
17
|
-
idToken
|
|
17
|
+
idToken?: string | null | undefined;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/** @internal */
|
|
@@ -26,9 +26,9 @@ export const TokenResponse$inboundSchema: z.ZodMiniType<
|
|
|
26
26
|
access_token: z.string(),
|
|
27
27
|
token_type: z.literal("Bearer"),
|
|
28
28
|
expires_in: z.int(),
|
|
29
|
-
refresh_token: z.nullable(z.string()),
|
|
29
|
+
refresh_token: z.optional(z.nullable(z.string())),
|
|
30
30
|
scope: z.string(),
|
|
31
|
-
id_token: z.string(),
|
|
31
|
+
id_token: z.optional(z.nullable(z.string())),
|
|
32
32
|
}),
|
|
33
33
|
z.transform((v) => {
|
|
34
34
|
return remap$(v, {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { PolarError } from "./polarerror.js";
|
|
7
|
+
|
|
8
|
+
export type PaymentFailedData = {
|
|
9
|
+
error: "PaymentFailed";
|
|
10
|
+
detail: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export class PaymentFailed extends PolarError {
|
|
14
|
+
error: "PaymentFailed";
|
|
15
|
+
detail: string;
|
|
16
|
+
|
|
17
|
+
/** The original data that was passed to this error instance. */
|
|
18
|
+
data$: PaymentFailedData;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
err: PaymentFailedData,
|
|
22
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
23
|
+
) {
|
|
24
|
+
const message = "message" in err && typeof err.message === "string"
|
|
25
|
+
? err.message
|
|
26
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
27
|
+
super(message, httpMeta);
|
|
28
|
+
this.data$ = err;
|
|
29
|
+
this.error = err.error;
|
|
30
|
+
this.detail = err.detail;
|
|
31
|
+
|
|
32
|
+
this.name = "PaymentFailed";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const PaymentFailed$inboundSchema: z.ZodMiniType<
|
|
38
|
+
PaymentFailed,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.pipe(
|
|
41
|
+
z.object({
|
|
42
|
+
error: z.literal("PaymentFailed"),
|
|
43
|
+
detail: z.string(),
|
|
44
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
45
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
46
|
+
body$: z.string(),
|
|
47
|
+
}),
|
|
48
|
+
z.transform((v) => {
|
|
49
|
+
return new PaymentFailed(v, {
|
|
50
|
+
request: v.request$,
|
|
51
|
+
response: v.response$,
|
|
52
|
+
body: v.body$,
|
|
53
|
+
});
|
|
54
|
+
}),
|
|
55
|
+
);
|
package/src/webhooks.ts
CHANGED
|
@@ -33,6 +33,11 @@ import { WebhookCustomerStateChangedPayload$inboundSchema } from "./models/compo
|
|
|
33
33
|
import { WebhookCustomerSeatAssignedPayload$inboundSchema } from "./models/components/webhookcustomerseatassignedpayload.js";
|
|
34
34
|
import { WebhookCustomerSeatClaimedPayload$inboundSchema } from "./models/components/webhookcustomerseatclaimedpayload.js";
|
|
35
35
|
import { WebhookCustomerSeatRevokedPayload$inboundSchema } from "./models/components/webhookcustomerseatrevokedpayload.js";
|
|
36
|
+
import { WebhookMemberCreatedPayload$inboundSchema } from "./models/components/webhookmembercreatedpayload.js";
|
|
37
|
+
import { WebhookMemberUpdatedPayload$inboundSchema } from "./models/components/webhookmemberupdatedpayload.js";
|
|
38
|
+
import { WebhookMemberDeletedPayload$inboundSchema } from "./models/components/webhookmemberdeletedpayload.js";
|
|
39
|
+
import { WebhookCheckoutExpiredPayload$inboundSchema } from "./models/components/webhookcheckoutexpiredpayload.js";
|
|
40
|
+
import { WebhookSubscriptionPastDuePayload$inboundSchema } from "./models/components/webhooksubscriptionpastduepayload.js";
|
|
36
41
|
import { SDKValidationError } from "./models/errors/sdkvalidationerror.js";
|
|
37
42
|
|
|
38
43
|
class WebhookVerificationError extends Error {
|
|
@@ -59,6 +64,12 @@ const parseEvent = (parsed: any) => {
|
|
|
59
64
|
return WebhookCustomerSeatClaimedPayload$inboundSchema.parse(parsed);
|
|
60
65
|
case "customer_seat.revoked":
|
|
61
66
|
return WebhookCustomerSeatRevokedPayload$inboundSchema.parse(parsed);
|
|
67
|
+
case "member.created":
|
|
68
|
+
return WebhookMemberCreatedPayload$inboundSchema.parse(parsed);
|
|
69
|
+
case "member.updated":
|
|
70
|
+
return WebhookMemberUpdatedPayload$inboundSchema.parse(parsed);
|
|
71
|
+
case "member.deleted":
|
|
72
|
+
return WebhookMemberDeletedPayload$inboundSchema.parse(parsed);
|
|
62
73
|
case "benefit.created":
|
|
63
74
|
return WebhookBenefitCreatedPayload$inboundSchema.parse(parsed);
|
|
64
75
|
case "benefit_grant.created":
|
|
@@ -75,6 +86,8 @@ const parseEvent = (parsed: any) => {
|
|
|
75
86
|
return WebhookCheckoutCreatedPayload$inboundSchema.parse(parsed);
|
|
76
87
|
case "checkout.updated":
|
|
77
88
|
return WebhookCheckoutUpdatedPayload$inboundSchema.parse(parsed);
|
|
89
|
+
case "checkout.expired":
|
|
90
|
+
return WebhookCheckoutExpiredPayload$inboundSchema.parse(parsed);
|
|
78
91
|
case "order.created":
|
|
79
92
|
return WebhookOrderCreatedPayload$inboundSchema.parse(parsed);
|
|
80
93
|
case "order.paid":
|
|
@@ -105,6 +118,8 @@ const parseEvent = (parsed: any) => {
|
|
|
105
118
|
return WebhookSubscriptionUncanceledPayload$inboundSchema.parse(parsed);
|
|
106
119
|
case "subscription.updated":
|
|
107
120
|
return WebhookSubscriptionUpdatedPayload$inboundSchema.parse(parsed);
|
|
121
|
+
case "subscription.past_due":
|
|
122
|
+
return WebhookSubscriptionPastDuePayload$inboundSchema.parse(parsed);
|
|
108
123
|
default:
|
|
109
124
|
throw new SDKValidationError(
|
|
110
125
|
`Unknown event type: ${parsed.type}`,
|