@polar-sh/sdk 0.30.0 → 0.32.0
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 +40 -7
- package/bin/mcp-server.js +304 -141
- package/bin/mcp-server.js.map +51 -48
- package/dist/commonjs/funcs/benefitsList.js +1 -0
- package/dist/commonjs/funcs/benefitsList.js.map +1 -1
- package/dist/commonjs/funcs/customersDelete.d.ts +11 -1
- package/dist/commonjs/funcs/customersDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/customersDelete.js +11 -1
- package/dist/commonjs/funcs/customersDelete.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +2 -8
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +4 -3
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +6 -1
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/mcp-server/extensions.d.ts +2 -0
- package/dist/commonjs/mcp-server/extensions.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/prompts.d.ts +26 -0
- package/dist/commonjs/mcp-server/prompts.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/prompts.js +47 -0
- package/dist/commonjs/mcp-server/prompts.js.map +1 -0
- package/dist/commonjs/mcp-server/resources.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/resources.js +1 -0
- package/dist/commonjs/mcp-server/resources.js.map +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +4 -2
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/customersCreate.js +1 -1
- package/dist/commonjs/mcp-server/tools/customersDelete.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/customersDelete.js +12 -2
- package/dist/commonjs/mcp-server/tools/customersDelete.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/customersDeleteExternal.js +1 -1
- package/dist/commonjs/mcp-server/tools/customersGet.js +1 -1
- package/dist/commonjs/mcp-server/tools/customersGetExternal.js +1 -1
- package/dist/commonjs/mcp-server/tools/customersGetState.js +1 -1
- package/dist/commonjs/mcp-server/tools/customersGetStateExternal.js +1 -1
- package/dist/commonjs/mcp-server/tools/customersList.js +1 -1
- package/dist/commonjs/mcp-server/tools/customersUpdate.js +1 -1
- package/dist/commonjs/mcp-server/tools/customersUpdateExternal.js +1 -1
- package/dist/commonjs/mcp-server/tools/metricsGet.js +1 -1
- package/dist/commonjs/mcp-server/tools/metricsLimits.js +1 -1
- package/dist/commonjs/mcp-server/tools/ordersGet.js +1 -1
- package/dist/commonjs/mcp-server/tools/ordersInvoice.js +1 -1
- package/dist/commonjs/mcp-server/tools/ordersList.js +1 -1
- package/dist/commonjs/mcp-server/tools/productsCreate.js +1 -1
- package/dist/commonjs/mcp-server/tools/productsGet.js +1 -1
- package/dist/commonjs/mcp-server/tools/productsList.js +1 -1
- package/dist/commonjs/mcp-server/tools/productsUpdate.js +1 -1
- package/dist/commonjs/mcp-server/tools/productsUpdateBenefits.js +1 -1
- package/dist/commonjs/mcp-server/tools/subscriptionsExport.js +1 -1
- package/dist/commonjs/mcp-server/tools/subscriptionsGet.js +1 -1
- package/dist/commonjs/mcp-server/tools/subscriptionsList.js +1 -1
- package/dist/commonjs/mcp-server/tools/subscriptionsRevoke.js +1 -1
- package/dist/commonjs/mcp-server/tools/subscriptionsUpdate.js +1 -1
- package/dist/commonjs/mcp-server/tools.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools.js +4 -0
- package/dist/commonjs/mcp-server/tools.js.map +1 -1
- package/dist/commonjs/models/components/benefitgithubrepositorycreateproperties.d.ts +8 -8
- package/dist/commonjs/models/components/benefitgithubrepositorycreateproperties.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgithubrepositorycreateproperties.js +14 -14
- package/dist/commonjs/models/components/benefitgithubrepositorycreateproperties.js.map +1 -1
- package/dist/commonjs/models/components/benefitgithubrepositoryproperties.d.ts +8 -8
- package/dist/commonjs/models/components/benefitgithubrepositoryproperties.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgithubrepositoryproperties.js +14 -14
- package/dist/commonjs/models/components/benefitgithubrepositoryproperties.js.map +1 -1
- package/dist/commonjs/models/components/checkout.d.ts +13 -13
- package/dist/commonjs/models/components/checkout.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkout.js +16 -16
- package/dist/commonjs/models/components/checkout.js.map +1 -1
- package/dist/commonjs/models/components/checkoutproductscreate.d.ts +26 -26
- package/dist/commonjs/models/components/checkoutproductscreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutproductscreate.js +31 -31
- package/dist/commonjs/models/components/checkoutproductscreate.js.map +1 -1
- package/dist/commonjs/models/components/customer.d.ts +5 -0
- package/dist/commonjs/models/components/customer.d.ts.map +1 -1
- package/dist/commonjs/models/components/customer.js +4 -0
- package/dist/commonjs/models/components/customer.js.map +1 -1
- package/dist/commonjs/models/components/customerorder.d.ts +61 -0
- package/dist/commonjs/models/components/customerorder.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerorder.js +32 -0
- package/dist/commonjs/models/components/customerorder.js.map +1 -1
- package/dist/commonjs/models/components/customerordersortproperty.d.ts +6 -6
- package/dist/commonjs/models/components/customerordersortproperty.js +2 -2
- package/dist/commonjs/models/components/customerordersortproperty.js.map +1 -1
- package/dist/commonjs/models/components/customerordersubscription.d.ts +9 -9
- package/dist/commonjs/models/components/customerordersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerordersubscription.js +8 -8
- package/dist/commonjs/models/components/customerordersubscription.js.map +1 -1
- package/dist/commonjs/models/components/customerstate.d.ts +5 -0
- package/dist/commonjs/models/components/customerstate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerstate.js +4 -0
- package/dist/commonjs/models/components/customerstate.js.map +1 -1
- package/dist/commonjs/models/components/customerstatesubscription.d.ts +9 -9
- package/dist/commonjs/models/components/customerstatesubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerstatesubscription.js +8 -8
- package/dist/commonjs/models/components/customerstatesubscription.js.map +1 -1
- package/dist/commonjs/models/components/customersubscription.d.ts +81 -19
- package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customersubscription.js +61 -25
- package/dist/commonjs/models/components/customersubscription.js.map +1 -1
- package/dist/commonjs/models/components/licensekeycustomer.d.ts +16 -11
- package/dist/commonjs/models/components/licensekeycustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/licensekeycustomer.js +20 -17
- package/dist/commonjs/models/components/licensekeycustomer.js.map +1 -1
- package/dist/commonjs/models/components/order.d.ts +52 -3
- package/dist/commonjs/models/components/order.d.ts.map +1 -1
- package/dist/commonjs/models/components/order.js +24 -2
- package/dist/commonjs/models/components/order.js.map +1 -1
- package/dist/commonjs/models/components/ordercustomer.d.ts +5 -0
- package/dist/commonjs/models/components/ordercustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/ordercustomer.js +4 -0
- package/dist/commonjs/models/components/ordercustomer.js.map +1 -1
- package/dist/commonjs/models/components/orderitemschema.d.ts +70 -0
- package/dist/commonjs/models/components/orderitemschema.d.ts.map +1 -0
- package/dist/commonjs/models/components/orderitemschema.js +88 -0
- package/dist/commonjs/models/components/orderitemschema.js.map +1 -0
- package/dist/commonjs/models/components/ordersortproperty.d.ts +6 -0
- package/dist/commonjs/models/components/ordersortproperty.d.ts.map +1 -1
- package/dist/commonjs/models/components/ordersortproperty.js +2 -0
- package/dist/commonjs/models/components/ordersortproperty.js.map +1 -1
- package/dist/commonjs/models/components/orderstatus.d.ts +34 -0
- package/dist/commonjs/models/components/orderstatus.d.ts.map +1 -0
- package/dist/commonjs/models/components/orderstatus.js +53 -0
- package/dist/commonjs/models/components/orderstatus.js.map +1 -0
- package/dist/commonjs/models/components/ordersubscription.d.ts +9 -9
- package/dist/commonjs/models/components/ordersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/ordersubscription.js +8 -8
- package/dist/commonjs/models/components/ordersubscription.js.map +1 -1
- package/dist/commonjs/models/components/organization.d.ts +63 -9
- package/dist/commonjs/models/components/organization.d.ts.map +1 -1
- package/dist/commonjs/models/components/organization.js +19 -10
- package/dist/commonjs/models/components/organization.js.map +1 -1
- package/dist/commonjs/models/components/organizationcreate.d.ts +22 -0
- package/dist/commonjs/models/components/organizationcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationcreate.js +11 -0
- package/dist/commonjs/models/components/organizationcreate.js.map +1 -1
- package/dist/commonjs/models/components/organizationdetails.d.ts +102 -0
- package/dist/commonjs/models/components/organizationdetails.d.ts.map +1 -0
- package/dist/commonjs/models/components/organizationdetails.js +114 -0
- package/dist/commonjs/models/components/organizationdetails.js.map +1 -0
- package/dist/commonjs/models/components/organizationsociallink.d.ts +35 -0
- package/dist/commonjs/models/components/organizationsociallink.d.ts.map +1 -0
- package/dist/commonjs/models/components/organizationsociallink.js +62 -0
- package/dist/commonjs/models/components/organizationsociallink.js.map +1 -0
- package/dist/commonjs/models/components/organizationsocialplatforms.d.ts +46 -0
- package/dist/commonjs/models/components/organizationsocialplatforms.d.ts.map +1 -0
- package/dist/commonjs/models/components/organizationsocialplatforms.js +56 -0
- package/dist/commonjs/models/components/organizationsocialplatforms.js.map +1 -0
- package/dist/commonjs/models/components/organizationupdate.d.ts +50 -4
- package/dist/commonjs/models/components/organizationupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationupdate.js +21 -10
- package/dist/commonjs/models/components/organizationupdate.js.map +1 -1
- package/dist/commonjs/models/components/product.d.ts +13 -13
- package/dist/commonjs/models/components/product.d.ts.map +1 -1
- package/dist/commonjs/models/components/product.js +17 -16
- package/dist/commonjs/models/components/product.js.map +1 -1
- package/dist/commonjs/models/components/productcreate.d.ts +26 -26
- package/dist/commonjs/models/components/productcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/productcreate.js +31 -32
- package/dist/commonjs/models/components/productcreate.js.map +1 -1
- package/dist/commonjs/models/components/refundcreate.d.ts +3 -0
- package/dist/commonjs/models/components/refundcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/refundcreate.js.map +1 -1
- package/dist/commonjs/models/components/subscription.d.ts +90 -58
- package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscription.js +114 -76
- package/dist/commonjs/models/components/subscription.js.map +1 -1
- package/dist/commonjs/models/components/subscriptioncustomer.d.ts +16 -11
- package/dist/commonjs/models/components/subscriptioncustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptioncustomer.js +21 -16
- package/dist/commonjs/models/components/subscriptioncustomer.js.map +1 -1
- package/dist/commonjs/models/components/webhookordercreatedpayload.d.ts +3 -1
- package/dist/commonjs/models/components/webhookordercreatedpayload.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookordercreatedpayload.js.map +1 -1
- package/dist/commonjs/models/components/webhookorderpaidpayload.d.ts +41 -0
- package/dist/commonjs/models/components/webhookorderpaidpayload.d.ts.map +1 -0
- package/dist/commonjs/models/components/webhookorderpaidpayload.js +62 -0
- package/dist/commonjs/models/components/webhookorderpaidpayload.js.map +1 -0
- package/dist/commonjs/models/components/webhookorderupdatedpayload.d.ts +44 -0
- package/dist/commonjs/models/components/webhookorderupdatedpayload.d.ts.map +1 -0
- package/dist/commonjs/models/components/webhookorderupdatedpayload.js +62 -0
- package/dist/commonjs/models/components/webhookorderupdatedpayload.js.map +1 -0
- package/dist/commonjs/models/operations/benefitslist.d.ts +5 -0
- package/dist/commonjs/models/operations/benefitslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/benefitslist.js +2 -0
- package/dist/commonjs/models/operations/benefitslist.js.map +1 -1
- package/dist/commonjs/sdk/customers.d.ts +11 -1
- package/dist/commonjs/sdk/customers.d.ts.map +1 -1
- package/dist/commonjs/sdk/customers.js +11 -1
- package/dist/commonjs/sdk/customers.js.map +1 -1
- package/dist/commonjs/webhooks.d.ts +1 -1
- package/dist/commonjs/webhooks.d.ts.map +1 -1
- package/dist/commonjs/webhooks.js +6 -0
- package/dist/commonjs/webhooks.js.map +1 -1
- package/dist/esm/funcs/benefitsList.js +1 -0
- package/dist/esm/funcs/benefitsList.js.map +1 -1
- package/dist/esm/funcs/customersDelete.d.ts +11 -1
- package/dist/esm/funcs/customersDelete.d.ts.map +1 -1
- package/dist/esm/funcs/customersDelete.js +11 -1
- package/dist/esm/funcs/customersDelete.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +2 -8
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/lib/security.d.ts +4 -3
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +6 -1
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/mcp-server/extensions.d.ts +2 -0
- package/dist/esm/mcp-server/extensions.d.ts.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/prompts.d.ts +26 -0
- package/dist/esm/mcp-server/prompts.d.ts.map +1 -0
- package/dist/esm/mcp-server/prompts.js +43 -0
- package/dist/esm/mcp-server/prompts.js.map +1 -0
- package/dist/esm/mcp-server/resources.d.ts.map +1 -1
- package/dist/esm/mcp-server/resources.js +1 -0
- package/dist/esm/mcp-server/resources.js.map +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +4 -2
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/customersCreate.js +1 -1
- package/dist/esm/mcp-server/tools/customersDelete.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/customersDelete.js +12 -2
- package/dist/esm/mcp-server/tools/customersDelete.js.map +1 -1
- package/dist/esm/mcp-server/tools/customersDeleteExternal.js +1 -1
- package/dist/esm/mcp-server/tools/customersGet.js +1 -1
- package/dist/esm/mcp-server/tools/customersGetExternal.js +1 -1
- package/dist/esm/mcp-server/tools/customersGetState.js +1 -1
- package/dist/esm/mcp-server/tools/customersGetStateExternal.js +1 -1
- package/dist/esm/mcp-server/tools/customersList.js +1 -1
- package/dist/esm/mcp-server/tools/customersUpdate.js +1 -1
- package/dist/esm/mcp-server/tools/customersUpdateExternal.js +1 -1
- package/dist/esm/mcp-server/tools/metricsGet.js +1 -1
- package/dist/esm/mcp-server/tools/metricsLimits.js +1 -1
- package/dist/esm/mcp-server/tools/ordersGet.js +1 -1
- package/dist/esm/mcp-server/tools/ordersInvoice.js +1 -1
- package/dist/esm/mcp-server/tools/ordersList.js +1 -1
- package/dist/esm/mcp-server/tools/productsCreate.js +1 -1
- package/dist/esm/mcp-server/tools/productsGet.js +1 -1
- package/dist/esm/mcp-server/tools/productsList.js +1 -1
- package/dist/esm/mcp-server/tools/productsUpdate.js +1 -1
- package/dist/esm/mcp-server/tools/productsUpdateBenefits.js +1 -1
- package/dist/esm/mcp-server/tools/subscriptionsExport.js +1 -1
- package/dist/esm/mcp-server/tools/subscriptionsGet.js +1 -1
- package/dist/esm/mcp-server/tools/subscriptionsList.js +1 -1
- package/dist/esm/mcp-server/tools/subscriptionsRevoke.js +1 -1
- package/dist/esm/mcp-server/tools/subscriptionsUpdate.js +1 -1
- package/dist/esm/mcp-server/tools.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools.js +4 -0
- package/dist/esm/mcp-server/tools.js.map +1 -1
- package/dist/esm/models/components/benefitgithubrepositorycreateproperties.d.ts +8 -8
- package/dist/esm/models/components/benefitgithubrepositorycreateproperties.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgithubrepositorycreateproperties.js +13 -13
- package/dist/esm/models/components/benefitgithubrepositorycreateproperties.js.map +1 -1
- package/dist/esm/models/components/benefitgithubrepositoryproperties.d.ts +8 -8
- package/dist/esm/models/components/benefitgithubrepositoryproperties.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgithubrepositoryproperties.js +13 -13
- package/dist/esm/models/components/benefitgithubrepositoryproperties.js.map +1 -1
- package/dist/esm/models/components/checkout.d.ts +13 -13
- package/dist/esm/models/components/checkout.d.ts.map +1 -1
- package/dist/esm/models/components/checkout.js +13 -13
- package/dist/esm/models/components/checkout.js.map +1 -1
- package/dist/esm/models/components/checkoutproductscreate.d.ts +26 -26
- package/dist/esm/models/components/checkoutproductscreate.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutproductscreate.js +26 -26
- package/dist/esm/models/components/checkoutproductscreate.js.map +1 -1
- package/dist/esm/models/components/customer.d.ts +5 -0
- package/dist/esm/models/components/customer.d.ts.map +1 -1
- package/dist/esm/models/components/customer.js +4 -0
- package/dist/esm/models/components/customer.js.map +1 -1
- package/dist/esm/models/components/customerorder.d.ts +61 -0
- package/dist/esm/models/components/customerorder.d.ts.map +1 -1
- package/dist/esm/models/components/customerorder.js +32 -0
- package/dist/esm/models/components/customerorder.js.map +1 -1
- package/dist/esm/models/components/customerordersortproperty.d.ts +6 -6
- package/dist/esm/models/components/customerordersortproperty.js +2 -2
- package/dist/esm/models/components/customerordersortproperty.js.map +1 -1
- package/dist/esm/models/components/customerordersubscription.d.ts +9 -9
- package/dist/esm/models/components/customerordersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customerordersubscription.js +8 -8
- package/dist/esm/models/components/customerordersubscription.js.map +1 -1
- package/dist/esm/models/components/customerstate.d.ts +5 -0
- package/dist/esm/models/components/customerstate.d.ts.map +1 -1
- package/dist/esm/models/components/customerstate.js +4 -0
- package/dist/esm/models/components/customerstate.js.map +1 -1
- package/dist/esm/models/components/customerstatesubscription.d.ts +9 -9
- package/dist/esm/models/components/customerstatesubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customerstatesubscription.js +8 -8
- package/dist/esm/models/components/customerstatesubscription.js.map +1 -1
- package/dist/esm/models/components/customersubscription.d.ts +81 -19
- package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customersubscription.js +56 -22
- package/dist/esm/models/components/customersubscription.js.map +1 -1
- package/dist/esm/models/components/licensekeycustomer.d.ts +16 -11
- package/dist/esm/models/components/licensekeycustomer.d.ts.map +1 -1
- package/dist/esm/models/components/licensekeycustomer.js +17 -14
- package/dist/esm/models/components/licensekeycustomer.js.map +1 -1
- package/dist/esm/models/components/order.d.ts +52 -3
- package/dist/esm/models/components/order.d.ts.map +1 -1
- package/dist/esm/models/components/order.js +24 -2
- package/dist/esm/models/components/order.js.map +1 -1
- package/dist/esm/models/components/ordercustomer.d.ts +5 -0
- package/dist/esm/models/components/ordercustomer.d.ts.map +1 -1
- package/dist/esm/models/components/ordercustomer.js +4 -0
- package/dist/esm/models/components/ordercustomer.js.map +1 -1
- package/dist/esm/models/components/orderitemschema.d.ts +70 -0
- package/dist/esm/models/components/orderitemschema.d.ts.map +1 -0
- package/dist/esm/models/components/orderitemschema.js +60 -0
- package/dist/esm/models/components/orderitemschema.js.map +1 -0
- package/dist/esm/models/components/ordersortproperty.d.ts +6 -0
- package/dist/esm/models/components/ordersortproperty.d.ts.map +1 -1
- package/dist/esm/models/components/ordersortproperty.js +2 -0
- package/dist/esm/models/components/ordersortproperty.js.map +1 -1
- package/dist/esm/models/components/orderstatus.d.ts +34 -0
- package/dist/esm/models/components/orderstatus.d.ts.map +1 -0
- package/dist/esm/models/components/orderstatus.js +27 -0
- package/dist/esm/models/components/orderstatus.js.map +1 -0
- package/dist/esm/models/components/ordersubscription.d.ts +9 -9
- package/dist/esm/models/components/ordersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/ordersubscription.js +8 -8
- package/dist/esm/models/components/ordersubscription.js.map +1 -1
- package/dist/esm/models/components/organization.d.ts +63 -9
- package/dist/esm/models/components/organization.d.ts.map +1 -1
- package/dist/esm/models/components/organization.js +19 -10
- package/dist/esm/models/components/organization.js.map +1 -1
- package/dist/esm/models/components/organizationcreate.d.ts +22 -0
- package/dist/esm/models/components/organizationcreate.d.ts.map +1 -1
- package/dist/esm/models/components/organizationcreate.js +11 -0
- package/dist/esm/models/components/organizationcreate.js.map +1 -1
- package/dist/esm/models/components/organizationdetails.d.ts +102 -0
- package/dist/esm/models/components/organizationdetails.d.ts.map +1 -0
- package/dist/esm/models/components/organizationdetails.js +86 -0
- package/dist/esm/models/components/organizationdetails.js.map +1 -0
- package/dist/esm/models/components/organizationsociallink.d.ts +35 -0
- package/dist/esm/models/components/organizationsociallink.d.ts.map +1 -0
- package/dist/esm/models/components/organizationsociallink.js +34 -0
- package/dist/esm/models/components/organizationsociallink.js.map +1 -0
- package/dist/esm/models/components/organizationsocialplatforms.d.ts +46 -0
- package/dist/esm/models/components/organizationsocialplatforms.d.ts.map +1 -0
- package/dist/esm/models/components/organizationsocialplatforms.js +30 -0
- package/dist/esm/models/components/organizationsocialplatforms.js.map +1 -0
- package/dist/esm/models/components/organizationupdate.d.ts +50 -4
- package/dist/esm/models/components/organizationupdate.d.ts.map +1 -1
- package/dist/esm/models/components/organizationupdate.js +21 -10
- package/dist/esm/models/components/organizationupdate.js.map +1 -1
- package/dist/esm/models/components/product.d.ts +13 -13
- package/dist/esm/models/components/product.d.ts.map +1 -1
- package/dist/esm/models/components/product.js +14 -13
- package/dist/esm/models/components/product.js.map +1 -1
- package/dist/esm/models/components/productcreate.d.ts +26 -26
- package/dist/esm/models/components/productcreate.d.ts.map +1 -1
- package/dist/esm/models/components/productcreate.js +26 -27
- package/dist/esm/models/components/productcreate.js.map +1 -1
- package/dist/esm/models/components/refundcreate.d.ts +3 -0
- package/dist/esm/models/components/refundcreate.d.ts.map +1 -1
- package/dist/esm/models/components/refundcreate.js.map +1 -1
- package/dist/esm/models/components/subscription.d.ts +90 -58
- package/dist/esm/models/components/subscription.d.ts.map +1 -1
- package/dist/esm/models/components/subscription.js +105 -69
- package/dist/esm/models/components/subscription.js.map +1 -1
- package/dist/esm/models/components/subscriptioncustomer.d.ts +16 -11
- package/dist/esm/models/components/subscriptioncustomer.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptioncustomer.js +18 -13
- package/dist/esm/models/components/subscriptioncustomer.js.map +1 -1
- package/dist/esm/models/components/webhookordercreatedpayload.d.ts +3 -1
- package/dist/esm/models/components/webhookordercreatedpayload.d.ts.map +1 -1
- package/dist/esm/models/components/webhookordercreatedpayload.js.map +1 -1
- package/dist/esm/models/components/webhookorderpaidpayload.d.ts +41 -0
- package/dist/esm/models/components/webhookorderpaidpayload.d.ts.map +1 -0
- package/dist/esm/models/components/webhookorderpaidpayload.js +34 -0
- package/dist/esm/models/components/webhookorderpaidpayload.js.map +1 -0
- package/dist/esm/models/components/webhookorderupdatedpayload.d.ts +44 -0
- package/dist/esm/models/components/webhookorderupdatedpayload.d.ts.map +1 -0
- package/dist/esm/models/components/webhookorderupdatedpayload.js +34 -0
- package/dist/esm/models/components/webhookorderupdatedpayload.js.map +1 -0
- package/dist/esm/models/operations/benefitslist.d.ts +5 -0
- package/dist/esm/models/operations/benefitslist.d.ts.map +1 -1
- package/dist/esm/models/operations/benefitslist.js +2 -0
- package/dist/esm/models/operations/benefitslist.js.map +1 -1
- package/dist/esm/sdk/customers.d.ts +11 -1
- package/dist/esm/sdk/customers.d.ts.map +1 -1
- package/dist/esm/sdk/customers.js +11 -1
- package/dist/esm/sdk/customers.js.map +1 -1
- package/dist/esm/webhooks.d.ts +1 -1
- package/dist/esm/webhooks.d.ts.map +1 -1
- package/dist/esm/webhooks.js +6 -0
- package/dist/esm/webhooks.js.map +1 -1
- package/docs/sdks/customers/README.md +11 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/benefitsList.ts +1 -0
- package/src/funcs/customersDelete.ts +11 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +2 -7
- package/src/lib/security.ts +11 -3
- package/src/mcp-server/extensions.ts +4 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +110 -0
- package/src/mcp-server/resources.ts +1 -0
- package/src/mcp-server/server.ts +4 -2
- package/src/mcp-server/tools/customersCreate.ts +1 -1
- package/src/mcp-server/tools/customersDelete.ts +12 -2
- package/src/mcp-server/tools/customersDeleteExternal.ts +1 -1
- package/src/mcp-server/tools/customersGet.ts +1 -1
- package/src/mcp-server/tools/customersGetExternal.ts +1 -1
- package/src/mcp-server/tools/customersGetState.ts +1 -1
- package/src/mcp-server/tools/customersGetStateExternal.ts +1 -1
- package/src/mcp-server/tools/customersList.ts +1 -1
- package/src/mcp-server/tools/customersUpdate.ts +1 -1
- package/src/mcp-server/tools/customersUpdateExternal.ts +1 -1
- package/src/mcp-server/tools/metricsGet.ts +1 -1
- package/src/mcp-server/tools/metricsLimits.ts +1 -1
- package/src/mcp-server/tools/ordersGet.ts +1 -1
- package/src/mcp-server/tools/ordersInvoice.ts +1 -1
- package/src/mcp-server/tools/ordersList.ts +1 -1
- package/src/mcp-server/tools/productsCreate.ts +1 -1
- package/src/mcp-server/tools/productsGet.ts +1 -1
- package/src/mcp-server/tools/productsList.ts +1 -1
- package/src/mcp-server/tools/productsUpdate.ts +1 -1
- package/src/mcp-server/tools/productsUpdateBenefits.ts +1 -1
- package/src/mcp-server/tools/subscriptionsExport.ts +1 -1
- package/src/mcp-server/tools/subscriptionsGet.ts +1 -1
- package/src/mcp-server/tools/subscriptionsList.ts +1 -1
- package/src/mcp-server/tools/subscriptionsRevoke.ts +1 -1
- package/src/mcp-server/tools/subscriptionsUpdate.ts +1 -1
- package/src/mcp-server/tools.ts +5 -0
- package/src/models/components/benefitgithubrepositorycreateproperties.ts +20 -14
- package/src/models/components/benefitgithubrepositoryproperties.ts +14 -20
- package/src/models/components/checkout.ts +21 -21
- package/src/models/components/checkoutproductscreate.ts +66 -42
- package/src/models/components/customer.ts +11 -0
- package/src/models/components/customerorder.ts +100 -0
- package/src/models/components/customerordersortproperty.ts +2 -2
- package/src/models/components/customerordersubscription.ts +17 -17
- package/src/models/components/customerstate.ts +11 -0
- package/src/models/components/customerstatesubscription.ts +17 -17
- package/src/models/components/customersubscription.ts +159 -37
- package/src/models/components/licensekeycustomer.ts +38 -20
- package/src/models/components/order.ts +83 -5
- package/src/models/components/ordercustomer.ts +11 -0
- package/src/models/components/orderitemschema.ts +136 -0
- package/src/models/components/ordersortproperty.ts +2 -0
- package/src/models/components/orderstatus.ts +33 -0
- package/src/models/components/ordersubscription.ts +17 -17
- package/src/models/components/organization.ts +88 -19
- package/src/models/components/organizationcreate.ts +41 -0
- package/src/models/components/organizationdetails.ts +168 -0
- package/src/models/components/organizationsociallink.ts +78 -0
- package/src/models/components/organizationsocialplatforms.ts +41 -0
- package/src/models/components/organizationupdate.ts +86 -21
- package/src/models/components/product.ts +23 -26
- package/src/models/components/productcreate.ts +55 -44
- package/src/models/components/refundcreate.ts +3 -0
- package/src/models/components/subscription.ts +200 -138
- package/src/models/components/subscriptioncustomer.ts +31 -27
- package/src/models/components/webhookordercreatedpayload.ts +3 -1
- package/src/models/components/webhookorderpaidpayload.ts +85 -0
- package/src/models/components/webhookorderupdatedpayload.ts +88 -0
- package/src/models/operations/benefitslist.ts +7 -0
- package/src/sdk/customers.ts +11 -1
- package/src/webhooks.ts +6 -0
|
@@ -77,11 +77,9 @@ import {
|
|
|
77
77
|
SubscriptionUser$outboundSchema,
|
|
78
78
|
} from "./subscriptionuser.js";
|
|
79
79
|
|
|
80
|
-
export type
|
|
80
|
+
export type Metadata = string | number | boolean;
|
|
81
81
|
|
|
82
|
-
export type
|
|
83
|
-
|
|
84
|
-
export type SubscriptionPrice = LegacyRecurringProductPrice | ProductPrice;
|
|
82
|
+
export type CustomFieldData = string | number | boolean | Date;
|
|
85
83
|
|
|
86
84
|
export type SubscriptionDiscount =
|
|
87
85
|
| DiscountPercentageOnceForeverDurationBase
|
|
@@ -89,6 +87,13 @@ export type SubscriptionDiscount =
|
|
|
89
87
|
| DiscountPercentageRepeatDurationBase
|
|
90
88
|
| DiscountFixedRepeatDurationBase;
|
|
91
89
|
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
92
|
+
*/
|
|
93
|
+
export type Price = LegacyRecurringProductPrice | ProductPrice;
|
|
94
|
+
|
|
95
|
+
export type SubscriptionPrices = LegacyRecurringProductPrice | ProductPrice;
|
|
96
|
+
|
|
92
97
|
export type Subscription = {
|
|
93
98
|
/**
|
|
94
99
|
* Creation timestamp of the object.
|
|
@@ -105,11 +110,11 @@ export type Subscription = {
|
|
|
105
110
|
/**
|
|
106
111
|
* The amount of the subscription.
|
|
107
112
|
*/
|
|
108
|
-
amount: number
|
|
113
|
+
amount: number;
|
|
109
114
|
/**
|
|
110
115
|
* The currency of the subscription.
|
|
111
116
|
*/
|
|
112
|
-
currency: string
|
|
117
|
+
currency: string;
|
|
113
118
|
recurringInterval: SubscriptionRecurringInterval;
|
|
114
119
|
status: SubscriptionStatus;
|
|
115
120
|
/**
|
|
@@ -148,10 +153,6 @@ export type Subscription = {
|
|
|
148
153
|
* The ID of the subscribed product.
|
|
149
154
|
*/
|
|
150
155
|
productId: string;
|
|
151
|
-
/**
|
|
152
|
-
* The ID of the subscribed price.
|
|
153
|
-
*/
|
|
154
|
-
priceId: string;
|
|
155
156
|
/**
|
|
156
157
|
* The ID of the applied discount, if any.
|
|
157
158
|
*/
|
|
@@ -159,6 +160,10 @@ export type Subscription = {
|
|
|
159
160
|
checkoutId: string | null;
|
|
160
161
|
customerCancellationReason: CustomerCancellationReason | null;
|
|
161
162
|
customerCancellationComment: string | null;
|
|
163
|
+
/**
|
|
164
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
165
|
+
*/
|
|
166
|
+
priceId: string;
|
|
162
167
|
metadata: { [k: string]: string | number | boolean };
|
|
163
168
|
/**
|
|
164
169
|
* Key-value object storing custom field values.
|
|
@@ -176,66 +181,69 @@ export type Subscription = {
|
|
|
176
181
|
* A product.
|
|
177
182
|
*/
|
|
178
183
|
product: Product;
|
|
179
|
-
price: LegacyRecurringProductPrice | ProductPrice;
|
|
180
184
|
discount:
|
|
181
185
|
| DiscountPercentageOnceForeverDurationBase
|
|
182
186
|
| DiscountFixedOnceForeverDurationBase
|
|
183
187
|
| DiscountPercentageRepeatDurationBase
|
|
184
188
|
| DiscountFixedRepeatDurationBase
|
|
185
189
|
| null;
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
192
|
+
*/
|
|
193
|
+
price: LegacyRecurringProductPrice | ProductPrice;
|
|
194
|
+
/**
|
|
195
|
+
* List of enabled prices for the subscription.
|
|
196
|
+
*/
|
|
197
|
+
prices: Array<LegacyRecurringProductPrice | ProductPrice>;
|
|
186
198
|
};
|
|
187
199
|
|
|
188
200
|
/** @internal */
|
|
189
|
-
export const
|
|
190
|
-
|
|
201
|
+
export const Metadata$inboundSchema: z.ZodType<
|
|
202
|
+
Metadata,
|
|
191
203
|
z.ZodTypeDef,
|
|
192
204
|
unknown
|
|
193
205
|
> = z.union([z.string(), z.number().int(), z.boolean()]);
|
|
194
206
|
|
|
195
207
|
/** @internal */
|
|
196
|
-
export type
|
|
208
|
+
export type Metadata$Outbound = string | number | boolean;
|
|
197
209
|
|
|
198
210
|
/** @internal */
|
|
199
|
-
export const
|
|
200
|
-
|
|
211
|
+
export const Metadata$outboundSchema: z.ZodType<
|
|
212
|
+
Metadata$Outbound,
|
|
201
213
|
z.ZodTypeDef,
|
|
202
|
-
|
|
214
|
+
Metadata
|
|
203
215
|
> = z.union([z.string(), z.number().int(), z.boolean()]);
|
|
204
216
|
|
|
205
217
|
/**
|
|
206
218
|
* @internal
|
|
207
219
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
208
220
|
*/
|
|
209
|
-
export namespace
|
|
210
|
-
/** @deprecated use `
|
|
211
|
-
export const inboundSchema =
|
|
212
|
-
/** @deprecated use `
|
|
213
|
-
export const outboundSchema =
|
|
214
|
-
/** @deprecated use `
|
|
215
|
-
export type Outbound =
|
|
221
|
+
export namespace Metadata$ {
|
|
222
|
+
/** @deprecated use `Metadata$inboundSchema` instead. */
|
|
223
|
+
export const inboundSchema = Metadata$inboundSchema;
|
|
224
|
+
/** @deprecated use `Metadata$outboundSchema` instead. */
|
|
225
|
+
export const outboundSchema = Metadata$outboundSchema;
|
|
226
|
+
/** @deprecated use `Metadata$Outbound` instead. */
|
|
227
|
+
export type Outbound = Metadata$Outbound;
|
|
216
228
|
}
|
|
217
229
|
|
|
218
|
-
export function
|
|
219
|
-
|
|
220
|
-
): string {
|
|
221
|
-
return JSON.stringify(
|
|
222
|
-
SubscriptionMetadata$outboundSchema.parse(subscriptionMetadata),
|
|
223
|
-
);
|
|
230
|
+
export function metadataToJSON(metadata: Metadata): string {
|
|
231
|
+
return JSON.stringify(Metadata$outboundSchema.parse(metadata));
|
|
224
232
|
}
|
|
225
233
|
|
|
226
|
-
export function
|
|
234
|
+
export function metadataFromJSON(
|
|
227
235
|
jsonString: string,
|
|
228
|
-
): SafeParseResult<
|
|
236
|
+
): SafeParseResult<Metadata, SDKValidationError> {
|
|
229
237
|
return safeParse(
|
|
230
238
|
jsonString,
|
|
231
|
-
(x) =>
|
|
232
|
-
`Failed to parse '
|
|
239
|
+
(x) => Metadata$inboundSchema.parse(JSON.parse(x)),
|
|
240
|
+
`Failed to parse 'Metadata' from JSON`,
|
|
233
241
|
);
|
|
234
242
|
}
|
|
235
243
|
|
|
236
244
|
/** @internal */
|
|
237
|
-
export const
|
|
238
|
-
|
|
245
|
+
export const CustomFieldData$inboundSchema: z.ZodType<
|
|
246
|
+
CustomFieldData,
|
|
239
247
|
z.ZodTypeDef,
|
|
240
248
|
unknown
|
|
241
249
|
> = z.union([
|
|
@@ -246,17 +254,13 @@ export const SubscriptionCustomFieldData$inboundSchema: z.ZodType<
|
|
|
246
254
|
]);
|
|
247
255
|
|
|
248
256
|
/** @internal */
|
|
249
|
-
export type
|
|
250
|
-
| string
|
|
251
|
-
| number
|
|
252
|
-
| boolean
|
|
253
|
-
| string;
|
|
257
|
+
export type CustomFieldData$Outbound = string | number | boolean | string;
|
|
254
258
|
|
|
255
259
|
/** @internal */
|
|
256
|
-
export const
|
|
257
|
-
|
|
260
|
+
export const CustomFieldData$outboundSchema: z.ZodType<
|
|
261
|
+
CustomFieldData$Outbound,
|
|
258
262
|
z.ZodTypeDef,
|
|
259
|
-
|
|
263
|
+
CustomFieldData
|
|
260
264
|
> = z.union([
|
|
261
265
|
z.string(),
|
|
262
266
|
z.number().int(),
|
|
@@ -268,88 +272,28 @@ export const SubscriptionCustomFieldData$outboundSchema: z.ZodType<
|
|
|
268
272
|
* @internal
|
|
269
273
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
270
274
|
*/
|
|
271
|
-
export namespace
|
|
272
|
-
/** @deprecated use `
|
|
273
|
-
export const inboundSchema =
|
|
274
|
-
/** @deprecated use `
|
|
275
|
-
export const outboundSchema =
|
|
276
|
-
/** @deprecated use `
|
|
277
|
-
export type Outbound =
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export function subscriptionCustomFieldDataToJSON(
|
|
281
|
-
subscriptionCustomFieldData: SubscriptionCustomFieldData,
|
|
282
|
-
): string {
|
|
283
|
-
return JSON.stringify(
|
|
284
|
-
SubscriptionCustomFieldData$outboundSchema.parse(
|
|
285
|
-
subscriptionCustomFieldData,
|
|
286
|
-
),
|
|
287
|
-
);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export function subscriptionCustomFieldDataFromJSON(
|
|
291
|
-
jsonString: string,
|
|
292
|
-
): SafeParseResult<SubscriptionCustomFieldData, SDKValidationError> {
|
|
293
|
-
return safeParse(
|
|
294
|
-
jsonString,
|
|
295
|
-
(x) => SubscriptionCustomFieldData$inboundSchema.parse(JSON.parse(x)),
|
|
296
|
-
`Failed to parse 'SubscriptionCustomFieldData' from JSON`,
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/** @internal */
|
|
301
|
-
export const SubscriptionPrice$inboundSchema: z.ZodType<
|
|
302
|
-
SubscriptionPrice,
|
|
303
|
-
z.ZodTypeDef,
|
|
304
|
-
unknown
|
|
305
|
-
> = z.union([
|
|
306
|
-
LegacyRecurringProductPrice$inboundSchema,
|
|
307
|
-
ProductPrice$inboundSchema,
|
|
308
|
-
]);
|
|
309
|
-
|
|
310
|
-
/** @internal */
|
|
311
|
-
export type SubscriptionPrice$Outbound =
|
|
312
|
-
| LegacyRecurringProductPrice$Outbound
|
|
313
|
-
| ProductPrice$Outbound;
|
|
314
|
-
|
|
315
|
-
/** @internal */
|
|
316
|
-
export const SubscriptionPrice$outboundSchema: z.ZodType<
|
|
317
|
-
SubscriptionPrice$Outbound,
|
|
318
|
-
z.ZodTypeDef,
|
|
319
|
-
SubscriptionPrice
|
|
320
|
-
> = z.union([
|
|
321
|
-
LegacyRecurringProductPrice$outboundSchema,
|
|
322
|
-
ProductPrice$outboundSchema,
|
|
323
|
-
]);
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* @internal
|
|
327
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
328
|
-
*/
|
|
329
|
-
export namespace SubscriptionPrice$ {
|
|
330
|
-
/** @deprecated use `SubscriptionPrice$inboundSchema` instead. */
|
|
331
|
-
export const inboundSchema = SubscriptionPrice$inboundSchema;
|
|
332
|
-
/** @deprecated use `SubscriptionPrice$outboundSchema` instead. */
|
|
333
|
-
export const outboundSchema = SubscriptionPrice$outboundSchema;
|
|
334
|
-
/** @deprecated use `SubscriptionPrice$Outbound` instead. */
|
|
335
|
-
export type Outbound = SubscriptionPrice$Outbound;
|
|
275
|
+
export namespace CustomFieldData$ {
|
|
276
|
+
/** @deprecated use `CustomFieldData$inboundSchema` instead. */
|
|
277
|
+
export const inboundSchema = CustomFieldData$inboundSchema;
|
|
278
|
+
/** @deprecated use `CustomFieldData$outboundSchema` instead. */
|
|
279
|
+
export const outboundSchema = CustomFieldData$outboundSchema;
|
|
280
|
+
/** @deprecated use `CustomFieldData$Outbound` instead. */
|
|
281
|
+
export type Outbound = CustomFieldData$Outbound;
|
|
336
282
|
}
|
|
337
283
|
|
|
338
|
-
export function
|
|
339
|
-
|
|
284
|
+
export function customFieldDataToJSON(
|
|
285
|
+
customFieldData: CustomFieldData,
|
|
340
286
|
): string {
|
|
341
|
-
return JSON.stringify(
|
|
342
|
-
SubscriptionPrice$outboundSchema.parse(subscriptionPrice),
|
|
343
|
-
);
|
|
287
|
+
return JSON.stringify(CustomFieldData$outboundSchema.parse(customFieldData));
|
|
344
288
|
}
|
|
345
289
|
|
|
346
|
-
export function
|
|
290
|
+
export function customFieldDataFromJSON(
|
|
347
291
|
jsonString: string,
|
|
348
|
-
): SafeParseResult<
|
|
292
|
+
): SafeParseResult<CustomFieldData, SDKValidationError> {
|
|
349
293
|
return safeParse(
|
|
350
294
|
jsonString,
|
|
351
|
-
(x) =>
|
|
352
|
-
`Failed to parse '
|
|
295
|
+
(x) => CustomFieldData$inboundSchema.parse(JSON.parse(x)),
|
|
296
|
+
`Failed to parse 'CustomFieldData' from JSON`,
|
|
353
297
|
);
|
|
354
298
|
}
|
|
355
299
|
|
|
@@ -415,6 +359,111 @@ export function subscriptionDiscountFromJSON(
|
|
|
415
359
|
);
|
|
416
360
|
}
|
|
417
361
|
|
|
362
|
+
/** @internal */
|
|
363
|
+
export const Price$inboundSchema: z.ZodType<Price, z.ZodTypeDef, unknown> = z
|
|
364
|
+
.union([
|
|
365
|
+
LegacyRecurringProductPrice$inboundSchema,
|
|
366
|
+
ProductPrice$inboundSchema,
|
|
367
|
+
]);
|
|
368
|
+
|
|
369
|
+
/** @internal */
|
|
370
|
+
export type Price$Outbound =
|
|
371
|
+
| LegacyRecurringProductPrice$Outbound
|
|
372
|
+
| ProductPrice$Outbound;
|
|
373
|
+
|
|
374
|
+
/** @internal */
|
|
375
|
+
export const Price$outboundSchema: z.ZodType<
|
|
376
|
+
Price$Outbound,
|
|
377
|
+
z.ZodTypeDef,
|
|
378
|
+
Price
|
|
379
|
+
> = z.union([
|
|
380
|
+
LegacyRecurringProductPrice$outboundSchema,
|
|
381
|
+
ProductPrice$outboundSchema,
|
|
382
|
+
]);
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* @internal
|
|
386
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
387
|
+
*/
|
|
388
|
+
export namespace Price$ {
|
|
389
|
+
/** @deprecated use `Price$inboundSchema` instead. */
|
|
390
|
+
export const inboundSchema = Price$inboundSchema;
|
|
391
|
+
/** @deprecated use `Price$outboundSchema` instead. */
|
|
392
|
+
export const outboundSchema = Price$outboundSchema;
|
|
393
|
+
/** @deprecated use `Price$Outbound` instead. */
|
|
394
|
+
export type Outbound = Price$Outbound;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export function priceToJSON(price: Price): string {
|
|
398
|
+
return JSON.stringify(Price$outboundSchema.parse(price));
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export function priceFromJSON(
|
|
402
|
+
jsonString: string,
|
|
403
|
+
): SafeParseResult<Price, SDKValidationError> {
|
|
404
|
+
return safeParse(
|
|
405
|
+
jsonString,
|
|
406
|
+
(x) => Price$inboundSchema.parse(JSON.parse(x)),
|
|
407
|
+
`Failed to parse 'Price' from JSON`,
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/** @internal */
|
|
412
|
+
export const SubscriptionPrices$inboundSchema: z.ZodType<
|
|
413
|
+
SubscriptionPrices,
|
|
414
|
+
z.ZodTypeDef,
|
|
415
|
+
unknown
|
|
416
|
+
> = z.union([
|
|
417
|
+
LegacyRecurringProductPrice$inboundSchema,
|
|
418
|
+
ProductPrice$inboundSchema,
|
|
419
|
+
]);
|
|
420
|
+
|
|
421
|
+
/** @internal */
|
|
422
|
+
export type SubscriptionPrices$Outbound =
|
|
423
|
+
| LegacyRecurringProductPrice$Outbound
|
|
424
|
+
| ProductPrice$Outbound;
|
|
425
|
+
|
|
426
|
+
/** @internal */
|
|
427
|
+
export const SubscriptionPrices$outboundSchema: z.ZodType<
|
|
428
|
+
SubscriptionPrices$Outbound,
|
|
429
|
+
z.ZodTypeDef,
|
|
430
|
+
SubscriptionPrices
|
|
431
|
+
> = z.union([
|
|
432
|
+
LegacyRecurringProductPrice$outboundSchema,
|
|
433
|
+
ProductPrice$outboundSchema,
|
|
434
|
+
]);
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* @internal
|
|
438
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
439
|
+
*/
|
|
440
|
+
export namespace SubscriptionPrices$ {
|
|
441
|
+
/** @deprecated use `SubscriptionPrices$inboundSchema` instead. */
|
|
442
|
+
export const inboundSchema = SubscriptionPrices$inboundSchema;
|
|
443
|
+
/** @deprecated use `SubscriptionPrices$outboundSchema` instead. */
|
|
444
|
+
export const outboundSchema = SubscriptionPrices$outboundSchema;
|
|
445
|
+
/** @deprecated use `SubscriptionPrices$Outbound` instead. */
|
|
446
|
+
export type Outbound = SubscriptionPrices$Outbound;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export function subscriptionPricesToJSON(
|
|
450
|
+
subscriptionPrices: SubscriptionPrices,
|
|
451
|
+
): string {
|
|
452
|
+
return JSON.stringify(
|
|
453
|
+
SubscriptionPrices$outboundSchema.parse(subscriptionPrices),
|
|
454
|
+
);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export function subscriptionPricesFromJSON(
|
|
458
|
+
jsonString: string,
|
|
459
|
+
): SafeParseResult<SubscriptionPrices, SDKValidationError> {
|
|
460
|
+
return safeParse(
|
|
461
|
+
jsonString,
|
|
462
|
+
(x) => SubscriptionPrices$inboundSchema.parse(JSON.parse(x)),
|
|
463
|
+
`Failed to parse 'SubscriptionPrices' from JSON`,
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
418
467
|
/** @internal */
|
|
419
468
|
export const Subscription$inboundSchema: z.ZodType<
|
|
420
469
|
Subscription,
|
|
@@ -426,8 +475,8 @@ export const Subscription$inboundSchema: z.ZodType<
|
|
|
426
475
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
427
476
|
),
|
|
428
477
|
id: z.string(),
|
|
429
|
-
amount: z.
|
|
430
|
-
currency: z.
|
|
478
|
+
amount: z.number().int(),
|
|
479
|
+
currency: z.string(),
|
|
431
480
|
recurring_interval: SubscriptionRecurringInterval$inboundSchema,
|
|
432
481
|
status: SubscriptionStatus$inboundSchema,
|
|
433
482
|
current_period_start: z.string().datetime({ offset: true }).transform(v =>
|
|
@@ -451,13 +500,13 @@ export const Subscription$inboundSchema: z.ZodType<
|
|
|
451
500
|
),
|
|
452
501
|
customer_id: z.string(),
|
|
453
502
|
product_id: z.string(),
|
|
454
|
-
price_id: z.string(),
|
|
455
503
|
discount_id: z.nullable(z.string()),
|
|
456
504
|
checkout_id: z.nullable(z.string()),
|
|
457
505
|
customer_cancellation_reason: z.nullable(
|
|
458
506
|
CustomerCancellationReason$inboundSchema,
|
|
459
507
|
),
|
|
460
508
|
customer_cancellation_comment: z.nullable(z.string()),
|
|
509
|
+
price_id: z.string(),
|
|
461
510
|
metadata: z.record(z.union([z.string(), z.number().int(), z.boolean()])),
|
|
462
511
|
custom_field_data: z.record(
|
|
463
512
|
z.nullable(
|
|
@@ -473,10 +522,6 @@ export const Subscription$inboundSchema: z.ZodType<
|
|
|
473
522
|
user_id: z.string(),
|
|
474
523
|
user: SubscriptionUser$inboundSchema,
|
|
475
524
|
product: Product$inboundSchema,
|
|
476
|
-
price: z.union([
|
|
477
|
-
LegacyRecurringProductPrice$inboundSchema,
|
|
478
|
-
ProductPrice$inboundSchema,
|
|
479
|
-
]),
|
|
480
525
|
discount: z.nullable(
|
|
481
526
|
z.union([
|
|
482
527
|
DiscountPercentageOnceForeverDurationBase$inboundSchema,
|
|
@@ -485,6 +530,16 @@ export const Subscription$inboundSchema: z.ZodType<
|
|
|
485
530
|
DiscountFixedRepeatDurationBase$inboundSchema,
|
|
486
531
|
]),
|
|
487
532
|
),
|
|
533
|
+
price: z.union([
|
|
534
|
+
LegacyRecurringProductPrice$inboundSchema,
|
|
535
|
+
ProductPrice$inboundSchema,
|
|
536
|
+
]),
|
|
537
|
+
prices: z.array(
|
|
538
|
+
z.union([
|
|
539
|
+
LegacyRecurringProductPrice$inboundSchema,
|
|
540
|
+
ProductPrice$inboundSchema,
|
|
541
|
+
]),
|
|
542
|
+
),
|
|
488
543
|
}).transform((v) => {
|
|
489
544
|
return remap$(v, {
|
|
490
545
|
"created_at": "createdAt",
|
|
@@ -499,11 +554,11 @@ export const Subscription$inboundSchema: z.ZodType<
|
|
|
499
554
|
"ended_at": "endedAt",
|
|
500
555
|
"customer_id": "customerId",
|
|
501
556
|
"product_id": "productId",
|
|
502
|
-
"price_id": "priceId",
|
|
503
557
|
"discount_id": "discountId",
|
|
504
558
|
"checkout_id": "checkoutId",
|
|
505
559
|
"customer_cancellation_reason": "customerCancellationReason",
|
|
506
560
|
"customer_cancellation_comment": "customerCancellationComment",
|
|
561
|
+
"price_id": "priceId",
|
|
507
562
|
"custom_field_data": "customFieldData",
|
|
508
563
|
"user_id": "userId",
|
|
509
564
|
});
|
|
@@ -514,8 +569,8 @@ export type Subscription$Outbound = {
|
|
|
514
569
|
created_at: string;
|
|
515
570
|
modified_at: string | null;
|
|
516
571
|
id: string;
|
|
517
|
-
amount: number
|
|
518
|
-
currency: string
|
|
572
|
+
amount: number;
|
|
573
|
+
currency: string;
|
|
519
574
|
recurring_interval: string;
|
|
520
575
|
status: string;
|
|
521
576
|
current_period_start: string;
|
|
@@ -527,11 +582,11 @@ export type Subscription$Outbound = {
|
|
|
527
582
|
ended_at: string | null;
|
|
528
583
|
customer_id: string;
|
|
529
584
|
product_id: string;
|
|
530
|
-
price_id: string;
|
|
531
585
|
discount_id: string | null;
|
|
532
586
|
checkout_id: string | null;
|
|
533
587
|
customer_cancellation_reason: string | null;
|
|
534
588
|
customer_cancellation_comment: string | null;
|
|
589
|
+
price_id: string;
|
|
535
590
|
metadata: { [k: string]: string | number | boolean };
|
|
536
591
|
custom_field_data?:
|
|
537
592
|
| { [k: string]: string | number | boolean | string | null }
|
|
@@ -540,13 +595,14 @@ export type Subscription$Outbound = {
|
|
|
540
595
|
user_id: string;
|
|
541
596
|
user: SubscriptionUser$Outbound;
|
|
542
597
|
product: Product$Outbound;
|
|
543
|
-
price: LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound;
|
|
544
598
|
discount:
|
|
545
599
|
| DiscountPercentageOnceForeverDurationBase$Outbound
|
|
546
600
|
| DiscountFixedOnceForeverDurationBase$Outbound
|
|
547
601
|
| DiscountPercentageRepeatDurationBase$Outbound
|
|
548
602
|
| DiscountFixedRepeatDurationBase$Outbound
|
|
549
603
|
| null;
|
|
604
|
+
price: LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound;
|
|
605
|
+
prices: Array<LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound>;
|
|
550
606
|
};
|
|
551
607
|
|
|
552
608
|
/** @internal */
|
|
@@ -558,8 +614,8 @@ export const Subscription$outboundSchema: z.ZodType<
|
|
|
558
614
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
559
615
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
560
616
|
id: z.string(),
|
|
561
|
-
amount: z.
|
|
562
|
-
currency: z.
|
|
617
|
+
amount: z.number().int(),
|
|
618
|
+
currency: z.string(),
|
|
563
619
|
recurringInterval: SubscriptionRecurringInterval$outboundSchema,
|
|
564
620
|
status: SubscriptionStatus$outboundSchema,
|
|
565
621
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
@@ -571,13 +627,13 @@ export const Subscription$outboundSchema: z.ZodType<
|
|
|
571
627
|
endedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
572
628
|
customerId: z.string(),
|
|
573
629
|
productId: z.string(),
|
|
574
|
-
priceId: z.string(),
|
|
575
630
|
discountId: z.nullable(z.string()),
|
|
576
631
|
checkoutId: z.nullable(z.string()),
|
|
577
632
|
customerCancellationReason: z.nullable(
|
|
578
633
|
CustomerCancellationReason$outboundSchema,
|
|
579
634
|
),
|
|
580
635
|
customerCancellationComment: z.nullable(z.string()),
|
|
636
|
+
priceId: z.string(),
|
|
581
637
|
metadata: z.record(z.union([z.string(), z.number().int(), z.boolean()])),
|
|
582
638
|
customFieldData: z.record(
|
|
583
639
|
z.nullable(
|
|
@@ -593,10 +649,6 @@ export const Subscription$outboundSchema: z.ZodType<
|
|
|
593
649
|
userId: z.string(),
|
|
594
650
|
user: SubscriptionUser$outboundSchema,
|
|
595
651
|
product: Product$outboundSchema,
|
|
596
|
-
price: z.union([
|
|
597
|
-
LegacyRecurringProductPrice$outboundSchema,
|
|
598
|
-
ProductPrice$outboundSchema,
|
|
599
|
-
]),
|
|
600
652
|
discount: z.nullable(
|
|
601
653
|
z.union([
|
|
602
654
|
DiscountPercentageOnceForeverDurationBase$outboundSchema,
|
|
@@ -605,6 +657,16 @@ export const Subscription$outboundSchema: z.ZodType<
|
|
|
605
657
|
DiscountFixedRepeatDurationBase$outboundSchema,
|
|
606
658
|
]),
|
|
607
659
|
),
|
|
660
|
+
price: z.union([
|
|
661
|
+
LegacyRecurringProductPrice$outboundSchema,
|
|
662
|
+
ProductPrice$outboundSchema,
|
|
663
|
+
]),
|
|
664
|
+
prices: z.array(
|
|
665
|
+
z.union([
|
|
666
|
+
LegacyRecurringProductPrice$outboundSchema,
|
|
667
|
+
ProductPrice$outboundSchema,
|
|
668
|
+
]),
|
|
669
|
+
),
|
|
608
670
|
}).transform((v) => {
|
|
609
671
|
return remap$(v, {
|
|
610
672
|
createdAt: "created_at",
|
|
@@ -619,11 +681,11 @@ export const Subscription$outboundSchema: z.ZodType<
|
|
|
619
681
|
endedAt: "ended_at",
|
|
620
682
|
customerId: "customer_id",
|
|
621
683
|
productId: "product_id",
|
|
622
|
-
priceId: "price_id",
|
|
623
684
|
discountId: "discount_id",
|
|
624
685
|
checkoutId: "checkout_id",
|
|
625
686
|
customerCancellationReason: "customer_cancellation_reason",
|
|
626
687
|
customerCancellationComment: "customer_cancellation_comment",
|
|
688
|
+
priceId: "price_id",
|
|
627
689
|
customFieldData: "custom_field_data",
|
|
628
690
|
userId: "user_id",
|
|
629
691
|
});
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
|
|
22
22
|
export type SubscriptionCustomerMetadata = string | number | boolean;
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type TaxId = string | TaxIDFormat;
|
|
25
25
|
|
|
26
26
|
export type SubscriptionCustomer = {
|
|
27
27
|
/**
|
|
@@ -59,6 +59,10 @@ export type SubscriptionCustomer = {
|
|
|
59
59
|
* The ID of the organization owning the customer.
|
|
60
60
|
*/
|
|
61
61
|
organizationId: string;
|
|
62
|
+
/**
|
|
63
|
+
* Timestamp for when the customer was soft deleted.
|
|
64
|
+
*/
|
|
65
|
+
deletedAt: Date | null;
|
|
62
66
|
avatarUrl: string;
|
|
63
67
|
};
|
|
64
68
|
|
|
@@ -113,50 +117,43 @@ export function subscriptionCustomerMetadataFromJSON(
|
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
/** @internal */
|
|
116
|
-
export const
|
|
117
|
-
|
|
118
|
-
z.ZodTypeDef,
|
|
119
|
-
unknown
|
|
120
|
-
> = z.union([z.string(), TaxIDFormat$inboundSchema]);
|
|
120
|
+
export const TaxId$inboundSchema: z.ZodType<TaxId, z.ZodTypeDef, unknown> = z
|
|
121
|
+
.union([z.string(), TaxIDFormat$inboundSchema]);
|
|
121
122
|
|
|
122
123
|
/** @internal */
|
|
123
|
-
export type
|
|
124
|
+
export type TaxId$Outbound = string | string;
|
|
124
125
|
|
|
125
126
|
/** @internal */
|
|
126
|
-
export const
|
|
127
|
-
|
|
127
|
+
export const TaxId$outboundSchema: z.ZodType<
|
|
128
|
+
TaxId$Outbound,
|
|
128
129
|
z.ZodTypeDef,
|
|
129
|
-
|
|
130
|
+
TaxId
|
|
130
131
|
> = z.union([z.string(), TaxIDFormat$outboundSchema]);
|
|
131
132
|
|
|
132
133
|
/**
|
|
133
134
|
* @internal
|
|
134
135
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
135
136
|
*/
|
|
136
|
-
export namespace
|
|
137
|
-
/** @deprecated use `
|
|
138
|
-
export const inboundSchema =
|
|
139
|
-
/** @deprecated use `
|
|
140
|
-
export const outboundSchema =
|
|
141
|
-
/** @deprecated use `
|
|
142
|
-
export type Outbound =
|
|
137
|
+
export namespace TaxId$ {
|
|
138
|
+
/** @deprecated use `TaxId$inboundSchema` instead. */
|
|
139
|
+
export const inboundSchema = TaxId$inboundSchema;
|
|
140
|
+
/** @deprecated use `TaxId$outboundSchema` instead. */
|
|
141
|
+
export const outboundSchema = TaxId$outboundSchema;
|
|
142
|
+
/** @deprecated use `TaxId$Outbound` instead. */
|
|
143
|
+
export type Outbound = TaxId$Outbound;
|
|
143
144
|
}
|
|
144
145
|
|
|
145
|
-
export function
|
|
146
|
-
|
|
147
|
-
): string {
|
|
148
|
-
return JSON.stringify(
|
|
149
|
-
SubscriptionCustomerTaxId$outboundSchema.parse(subscriptionCustomerTaxId),
|
|
150
|
-
);
|
|
146
|
+
export function taxIdToJSON(taxId: TaxId): string {
|
|
147
|
+
return JSON.stringify(TaxId$outboundSchema.parse(taxId));
|
|
151
148
|
}
|
|
152
149
|
|
|
153
|
-
export function
|
|
150
|
+
export function taxIdFromJSON(
|
|
154
151
|
jsonString: string,
|
|
155
|
-
): SafeParseResult<
|
|
152
|
+
): SafeParseResult<TaxId, SDKValidationError> {
|
|
156
153
|
return safeParse(
|
|
157
154
|
jsonString,
|
|
158
|
-
(x) =>
|
|
159
|
-
`Failed to parse '
|
|
155
|
+
(x) => TaxId$inboundSchema.parse(JSON.parse(x)),
|
|
156
|
+
`Failed to parse 'TaxId' from JSON`,
|
|
160
157
|
);
|
|
161
158
|
}
|
|
162
159
|
|
|
@@ -181,6 +178,9 @@ export const SubscriptionCustomer$inboundSchema: z.ZodType<
|
|
|
181
178
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$inboundSchema]))),
|
|
182
179
|
),
|
|
183
180
|
organization_id: z.string(),
|
|
181
|
+
deleted_at: z.nullable(
|
|
182
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
183
|
+
),
|
|
184
184
|
avatar_url: z.string(),
|
|
185
185
|
}).transform((v) => {
|
|
186
186
|
return remap$(v, {
|
|
@@ -191,6 +191,7 @@ export const SubscriptionCustomer$inboundSchema: z.ZodType<
|
|
|
191
191
|
"billing_address": "billingAddress",
|
|
192
192
|
"tax_id": "taxId",
|
|
193
193
|
"organization_id": "organizationId",
|
|
194
|
+
"deleted_at": "deletedAt",
|
|
194
195
|
"avatar_url": "avatarUrl",
|
|
195
196
|
});
|
|
196
197
|
});
|
|
@@ -208,6 +209,7 @@ export type SubscriptionCustomer$Outbound = {
|
|
|
208
209
|
billing_address: Address$Outbound | null;
|
|
209
210
|
tax_id: Array<string | string | null> | null;
|
|
210
211
|
organization_id: string;
|
|
212
|
+
deleted_at: string | null;
|
|
211
213
|
avatar_url: string;
|
|
212
214
|
};
|
|
213
215
|
|
|
@@ -230,6 +232,7 @@ export const SubscriptionCustomer$outboundSchema: z.ZodType<
|
|
|
230
232
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$outboundSchema]))),
|
|
231
233
|
),
|
|
232
234
|
organizationId: z.string(),
|
|
235
|
+
deletedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
233
236
|
avatarUrl: z.string(),
|
|
234
237
|
}).transform((v) => {
|
|
235
238
|
return remap$(v, {
|
|
@@ -240,6 +243,7 @@ export const SubscriptionCustomer$outboundSchema: z.ZodType<
|
|
|
240
243
|
billingAddress: "billing_address",
|
|
241
244
|
taxId: "tax_id",
|
|
242
245
|
organizationId: "organization_id",
|
|
246
|
+
deletedAt: "deleted_at",
|
|
243
247
|
avatarUrl: "avatar_url",
|
|
244
248
|
});
|
|
245
249
|
});
|