@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
|
@@ -79,6 +79,10 @@ export type CustomerState = {
|
|
|
79
79
|
* The ID of the organization owning the customer.
|
|
80
80
|
*/
|
|
81
81
|
organizationId: string;
|
|
82
|
+
/**
|
|
83
|
+
* Timestamp for when the customer was soft deleted.
|
|
84
|
+
*/
|
|
85
|
+
deletedAt: Date | null;
|
|
82
86
|
/**
|
|
83
87
|
* The customer's active subscriptions.
|
|
84
88
|
*/
|
|
@@ -207,6 +211,9 @@ export const CustomerState$inboundSchema: z.ZodType<
|
|
|
207
211
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$inboundSchema]))),
|
|
208
212
|
),
|
|
209
213
|
organization_id: z.string(),
|
|
214
|
+
deleted_at: z.nullable(
|
|
215
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
216
|
+
),
|
|
210
217
|
active_subscriptions: z.array(CustomerStateSubscription$inboundSchema),
|
|
211
218
|
granted_benefits: z.array(CustomerStateBenefitGrant$inboundSchema),
|
|
212
219
|
avatar_url: z.string(),
|
|
@@ -219,6 +226,7 @@ export const CustomerState$inboundSchema: z.ZodType<
|
|
|
219
226
|
"billing_address": "billingAddress",
|
|
220
227
|
"tax_id": "taxId",
|
|
221
228
|
"organization_id": "organizationId",
|
|
229
|
+
"deleted_at": "deletedAt",
|
|
222
230
|
"active_subscriptions": "activeSubscriptions",
|
|
223
231
|
"granted_benefits": "grantedBenefits",
|
|
224
232
|
"avatar_url": "avatarUrl",
|
|
@@ -238,6 +246,7 @@ export type CustomerState$Outbound = {
|
|
|
238
246
|
billing_address: Address$Outbound | null;
|
|
239
247
|
tax_id: Array<string | string | null> | null;
|
|
240
248
|
organization_id: string;
|
|
249
|
+
deleted_at: string | null;
|
|
241
250
|
active_subscriptions: Array<CustomerStateSubscription$Outbound>;
|
|
242
251
|
granted_benefits: Array<CustomerStateBenefitGrant$Outbound>;
|
|
243
252
|
avatar_url: string;
|
|
@@ -262,6 +271,7 @@ export const CustomerState$outboundSchema: z.ZodType<
|
|
|
262
271
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$outboundSchema]))),
|
|
263
272
|
),
|
|
264
273
|
organizationId: z.string(),
|
|
274
|
+
deletedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
265
275
|
activeSubscriptions: z.array(CustomerStateSubscription$outboundSchema),
|
|
266
276
|
grantedBenefits: z.array(CustomerStateBenefitGrant$outboundSchema),
|
|
267
277
|
avatarUrl: z.string(),
|
|
@@ -274,6 +284,7 @@ export const CustomerState$outboundSchema: z.ZodType<
|
|
|
274
284
|
billingAddress: "billing_address",
|
|
275
285
|
taxId: "tax_id",
|
|
276
286
|
organizationId: "organization_id",
|
|
287
|
+
deletedAt: "deleted_at",
|
|
277
288
|
activeSubscriptions: "active_subscriptions",
|
|
278
289
|
grantedBenefits: "granted_benefits",
|
|
279
290
|
avatarUrl: "avatar_url",
|
|
@@ -48,11 +48,11 @@ export type CustomerStateSubscription = {
|
|
|
48
48
|
/**
|
|
49
49
|
* The amount of the subscription.
|
|
50
50
|
*/
|
|
51
|
-
amount: number
|
|
51
|
+
amount: number;
|
|
52
52
|
/**
|
|
53
53
|
* The currency of the subscription.
|
|
54
54
|
*/
|
|
55
|
-
currency: string
|
|
55
|
+
currency: string;
|
|
56
56
|
recurringInterval: SubscriptionRecurringInterval;
|
|
57
57
|
/**
|
|
58
58
|
* The start timestamp of the current billing period.
|
|
@@ -82,14 +82,14 @@ export type CustomerStateSubscription = {
|
|
|
82
82
|
* The ID of the subscribed product.
|
|
83
83
|
*/
|
|
84
84
|
productId: string;
|
|
85
|
-
/**
|
|
86
|
-
* The ID of the subscribed price.
|
|
87
|
-
*/
|
|
88
|
-
priceId: string;
|
|
89
85
|
/**
|
|
90
86
|
* The ID of the applied discount, if any.
|
|
91
87
|
*/
|
|
92
88
|
discountId: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
91
|
+
*/
|
|
92
|
+
priceId: string;
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
/** @internal */
|
|
@@ -242,8 +242,8 @@ export const CustomerStateSubscription$inboundSchema: z.ZodType<
|
|
|
242
242
|
).optional(),
|
|
243
243
|
metadata: z.record(z.union([z.string(), z.number().int(), z.boolean()])),
|
|
244
244
|
status: z.literal("active").optional(),
|
|
245
|
-
amount: z.
|
|
246
|
-
currency: z.
|
|
245
|
+
amount: z.number().int(),
|
|
246
|
+
currency: z.string(),
|
|
247
247
|
recurring_interval: SubscriptionRecurringInterval$inboundSchema,
|
|
248
248
|
current_period_start: z.string().datetime({ offset: true }).transform(v =>
|
|
249
249
|
new Date(v)
|
|
@@ -262,8 +262,8 @@ export const CustomerStateSubscription$inboundSchema: z.ZodType<
|
|
|
262
262
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
263
263
|
),
|
|
264
264
|
product_id: z.string(),
|
|
265
|
-
price_id: z.string(),
|
|
266
265
|
discount_id: z.nullable(z.string()),
|
|
266
|
+
price_id: z.string(),
|
|
267
267
|
}).transform((v) => {
|
|
268
268
|
return remap$(v, {
|
|
269
269
|
"created_at": "createdAt",
|
|
@@ -277,8 +277,8 @@ export const CustomerStateSubscription$inboundSchema: z.ZodType<
|
|
|
277
277
|
"started_at": "startedAt",
|
|
278
278
|
"ends_at": "endsAt",
|
|
279
279
|
"product_id": "productId",
|
|
280
|
-
"price_id": "priceId",
|
|
281
280
|
"discount_id": "discountId",
|
|
281
|
+
"price_id": "priceId",
|
|
282
282
|
});
|
|
283
283
|
});
|
|
284
284
|
|
|
@@ -292,8 +292,8 @@ export type CustomerStateSubscription$Outbound = {
|
|
|
292
292
|
| undefined;
|
|
293
293
|
metadata: { [k: string]: string | number | boolean };
|
|
294
294
|
status: "active";
|
|
295
|
-
amount: number
|
|
296
|
-
currency: string
|
|
295
|
+
amount: number;
|
|
296
|
+
currency: string;
|
|
297
297
|
recurring_interval: string;
|
|
298
298
|
current_period_start: string;
|
|
299
299
|
current_period_end: string | null;
|
|
@@ -302,8 +302,8 @@ export type CustomerStateSubscription$Outbound = {
|
|
|
302
302
|
started_at: string | null;
|
|
303
303
|
ends_at: string | null;
|
|
304
304
|
product_id: string;
|
|
305
|
-
price_id: string;
|
|
306
305
|
discount_id: string | null;
|
|
306
|
+
price_id: string;
|
|
307
307
|
};
|
|
308
308
|
|
|
309
309
|
/** @internal */
|
|
@@ -327,8 +327,8 @@ export const CustomerStateSubscription$outboundSchema: z.ZodType<
|
|
|
327
327
|
).optional(),
|
|
328
328
|
metadata: z.record(z.union([z.string(), z.number().int(), z.boolean()])),
|
|
329
329
|
status: z.literal("active").default("active" as const),
|
|
330
|
-
amount: z.
|
|
331
|
-
currency: z.
|
|
330
|
+
amount: z.number().int(),
|
|
331
|
+
currency: z.string(),
|
|
332
332
|
recurringInterval: SubscriptionRecurringInterval$outboundSchema,
|
|
333
333
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
334
334
|
currentPeriodEnd: z.nullable(z.date().transform(v => v.toISOString())),
|
|
@@ -337,8 +337,8 @@ export const CustomerStateSubscription$outboundSchema: z.ZodType<
|
|
|
337
337
|
startedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
338
338
|
endsAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
339
339
|
productId: z.string(),
|
|
340
|
-
priceId: z.string(),
|
|
341
340
|
discountId: z.nullable(z.string()),
|
|
341
|
+
priceId: z.string(),
|
|
342
342
|
}).transform((v) => {
|
|
343
343
|
return remap$(v, {
|
|
344
344
|
createdAt: "created_at",
|
|
@@ -352,8 +352,8 @@ export const CustomerStateSubscription$outboundSchema: z.ZodType<
|
|
|
352
352
|
startedAt: "started_at",
|
|
353
353
|
endsAt: "ends_at",
|
|
354
354
|
productId: "product_id",
|
|
355
|
-
priceId: "price_id",
|
|
356
355
|
discountId: "discount_id",
|
|
356
|
+
priceId: "price_id",
|
|
357
357
|
});
|
|
358
358
|
});
|
|
359
359
|
|
|
@@ -41,7 +41,16 @@ import {
|
|
|
41
41
|
SubscriptionStatus$outboundSchema,
|
|
42
42
|
} from "./subscriptionstatus.js";
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
46
|
+
*/
|
|
47
|
+
export type CustomerSubscriptionPrice =
|
|
48
|
+
| LegacyRecurringProductPrice
|
|
49
|
+
| ProductPrice;
|
|
50
|
+
|
|
51
|
+
export type CustomerSubscriptionPrices =
|
|
52
|
+
| LegacyRecurringProductPrice
|
|
53
|
+
| ProductPrice;
|
|
45
54
|
|
|
46
55
|
export type CustomerSubscription = {
|
|
47
56
|
/**
|
|
@@ -59,23 +68,49 @@ export type CustomerSubscription = {
|
|
|
59
68
|
/**
|
|
60
69
|
* The amount of the subscription.
|
|
61
70
|
*/
|
|
62
|
-
amount: number
|
|
71
|
+
amount: number;
|
|
63
72
|
/**
|
|
64
73
|
* The currency of the subscription.
|
|
65
74
|
*/
|
|
66
|
-
currency: string
|
|
75
|
+
currency: string;
|
|
67
76
|
recurringInterval: SubscriptionRecurringInterval;
|
|
68
77
|
status: SubscriptionStatus;
|
|
78
|
+
/**
|
|
79
|
+
* The start timestamp of the current billing period.
|
|
80
|
+
*/
|
|
69
81
|
currentPeriodStart: Date;
|
|
82
|
+
/**
|
|
83
|
+
* The end timestamp of the current billing period.
|
|
84
|
+
*/
|
|
70
85
|
currentPeriodEnd: Date | null;
|
|
86
|
+
/**
|
|
87
|
+
* Whether the subscription will be canceled at the end of the current period.
|
|
88
|
+
*/
|
|
71
89
|
cancelAtPeriodEnd: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.
|
|
92
|
+
*/
|
|
72
93
|
canceledAt: Date | null;
|
|
94
|
+
/**
|
|
95
|
+
* The timestamp when the subscription started.
|
|
96
|
+
*/
|
|
73
97
|
startedAt: Date | null;
|
|
98
|
+
/**
|
|
99
|
+
* The timestamp when the subscription will end.
|
|
100
|
+
*/
|
|
74
101
|
endsAt: Date | null;
|
|
102
|
+
/**
|
|
103
|
+
* The timestamp when the subscription ended.
|
|
104
|
+
*/
|
|
75
105
|
endedAt: Date | null;
|
|
106
|
+
/**
|
|
107
|
+
* The ID of the subscribed customer.
|
|
108
|
+
*/
|
|
76
109
|
customerId: string;
|
|
110
|
+
/**
|
|
111
|
+
* The ID of the subscribed product.
|
|
112
|
+
*/
|
|
77
113
|
productId: string;
|
|
78
|
-
priceId: string;
|
|
79
114
|
/**
|
|
80
115
|
* The ID of the applied discount, if any.
|
|
81
116
|
*/
|
|
@@ -83,31 +118,101 @@ export type CustomerSubscription = {
|
|
|
83
118
|
checkoutId: string | null;
|
|
84
119
|
customerCancellationReason: CustomerCancellationReason | null;
|
|
85
120
|
customerCancellationComment: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
123
|
+
*/
|
|
124
|
+
priceId: string;
|
|
86
125
|
/**
|
|
87
126
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
88
127
|
*/
|
|
89
128
|
userId: string;
|
|
90
129
|
product: CustomerSubscriptionProduct;
|
|
130
|
+
/**
|
|
131
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
132
|
+
*/
|
|
91
133
|
price: LegacyRecurringProductPrice | ProductPrice;
|
|
134
|
+
/**
|
|
135
|
+
* List of enabled prices for the subscription.
|
|
136
|
+
*/
|
|
137
|
+
prices: Array<LegacyRecurringProductPrice | ProductPrice>;
|
|
92
138
|
};
|
|
93
139
|
|
|
94
140
|
/** @internal */
|
|
95
|
-
export const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
141
|
+
export const CustomerSubscriptionPrice$inboundSchema: z.ZodType<
|
|
142
|
+
CustomerSubscriptionPrice,
|
|
143
|
+
z.ZodTypeDef,
|
|
144
|
+
unknown
|
|
145
|
+
> = z.union([
|
|
146
|
+
LegacyRecurringProductPrice$inboundSchema,
|
|
147
|
+
ProductPrice$inboundSchema,
|
|
148
|
+
]);
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export type CustomerSubscriptionPrice$Outbound =
|
|
152
|
+
| LegacyRecurringProductPrice$Outbound
|
|
153
|
+
| ProductPrice$Outbound;
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const CustomerSubscriptionPrice$outboundSchema: z.ZodType<
|
|
157
|
+
CustomerSubscriptionPrice$Outbound,
|
|
158
|
+
z.ZodTypeDef,
|
|
159
|
+
CustomerSubscriptionPrice
|
|
160
|
+
> = z.union([
|
|
161
|
+
LegacyRecurringProductPrice$outboundSchema,
|
|
162
|
+
ProductPrice$outboundSchema,
|
|
163
|
+
]);
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @internal
|
|
167
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
168
|
+
*/
|
|
169
|
+
export namespace CustomerSubscriptionPrice$ {
|
|
170
|
+
/** @deprecated use `CustomerSubscriptionPrice$inboundSchema` instead. */
|
|
171
|
+
export const inboundSchema = CustomerSubscriptionPrice$inboundSchema;
|
|
172
|
+
/** @deprecated use `CustomerSubscriptionPrice$outboundSchema` instead. */
|
|
173
|
+
export const outboundSchema = CustomerSubscriptionPrice$outboundSchema;
|
|
174
|
+
/** @deprecated use `CustomerSubscriptionPrice$Outbound` instead. */
|
|
175
|
+
export type Outbound = CustomerSubscriptionPrice$Outbound;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function customerSubscriptionPriceToJSON(
|
|
179
|
+
customerSubscriptionPrice: CustomerSubscriptionPrice,
|
|
180
|
+
): string {
|
|
181
|
+
return JSON.stringify(
|
|
182
|
+
CustomerSubscriptionPrice$outboundSchema.parse(customerSubscriptionPrice),
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function customerSubscriptionPriceFromJSON(
|
|
187
|
+
jsonString: string,
|
|
188
|
+
): SafeParseResult<CustomerSubscriptionPrice, SDKValidationError> {
|
|
189
|
+
return safeParse(
|
|
190
|
+
jsonString,
|
|
191
|
+
(x) => CustomerSubscriptionPrice$inboundSchema.parse(JSON.parse(x)),
|
|
192
|
+
`Failed to parse 'CustomerSubscriptionPrice' from JSON`,
|
|
193
|
+
);
|
|
194
|
+
}
|
|
100
195
|
|
|
101
196
|
/** @internal */
|
|
102
|
-
export
|
|
197
|
+
export const CustomerSubscriptionPrices$inboundSchema: z.ZodType<
|
|
198
|
+
CustomerSubscriptionPrices,
|
|
199
|
+
z.ZodTypeDef,
|
|
200
|
+
unknown
|
|
201
|
+
> = z.union([
|
|
202
|
+
LegacyRecurringProductPrice$inboundSchema,
|
|
203
|
+
ProductPrice$inboundSchema,
|
|
204
|
+
]);
|
|
205
|
+
|
|
206
|
+
/** @internal */
|
|
207
|
+
export type CustomerSubscriptionPrices$Outbound =
|
|
103
208
|
| LegacyRecurringProductPrice$Outbound
|
|
104
209
|
| ProductPrice$Outbound;
|
|
105
210
|
|
|
106
211
|
/** @internal */
|
|
107
|
-
export const
|
|
108
|
-
|
|
212
|
+
export const CustomerSubscriptionPrices$outboundSchema: z.ZodType<
|
|
213
|
+
CustomerSubscriptionPrices$Outbound,
|
|
109
214
|
z.ZodTypeDef,
|
|
110
|
-
|
|
215
|
+
CustomerSubscriptionPrices
|
|
111
216
|
> = z.union([
|
|
112
217
|
LegacyRecurringProductPrice$outboundSchema,
|
|
113
218
|
ProductPrice$outboundSchema,
|
|
@@ -117,26 +222,30 @@ export const Price$outboundSchema: z.ZodType<
|
|
|
117
222
|
* @internal
|
|
118
223
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
119
224
|
*/
|
|
120
|
-
export namespace
|
|
121
|
-
/** @deprecated use `
|
|
122
|
-
export const inboundSchema =
|
|
123
|
-
/** @deprecated use `
|
|
124
|
-
export const outboundSchema =
|
|
125
|
-
/** @deprecated use `
|
|
126
|
-
export type Outbound =
|
|
225
|
+
export namespace CustomerSubscriptionPrices$ {
|
|
226
|
+
/** @deprecated use `CustomerSubscriptionPrices$inboundSchema` instead. */
|
|
227
|
+
export const inboundSchema = CustomerSubscriptionPrices$inboundSchema;
|
|
228
|
+
/** @deprecated use `CustomerSubscriptionPrices$outboundSchema` instead. */
|
|
229
|
+
export const outboundSchema = CustomerSubscriptionPrices$outboundSchema;
|
|
230
|
+
/** @deprecated use `CustomerSubscriptionPrices$Outbound` instead. */
|
|
231
|
+
export type Outbound = CustomerSubscriptionPrices$Outbound;
|
|
127
232
|
}
|
|
128
233
|
|
|
129
|
-
export function
|
|
130
|
-
|
|
234
|
+
export function customerSubscriptionPricesToJSON(
|
|
235
|
+
customerSubscriptionPrices: CustomerSubscriptionPrices,
|
|
236
|
+
): string {
|
|
237
|
+
return JSON.stringify(
|
|
238
|
+
CustomerSubscriptionPrices$outboundSchema.parse(customerSubscriptionPrices),
|
|
239
|
+
);
|
|
131
240
|
}
|
|
132
241
|
|
|
133
|
-
export function
|
|
242
|
+
export function customerSubscriptionPricesFromJSON(
|
|
134
243
|
jsonString: string,
|
|
135
|
-
): SafeParseResult<
|
|
244
|
+
): SafeParseResult<CustomerSubscriptionPrices, SDKValidationError> {
|
|
136
245
|
return safeParse(
|
|
137
246
|
jsonString,
|
|
138
|
-
(x) =>
|
|
139
|
-
`Failed to parse '
|
|
247
|
+
(x) => CustomerSubscriptionPrices$inboundSchema.parse(JSON.parse(x)),
|
|
248
|
+
`Failed to parse 'CustomerSubscriptionPrices' from JSON`,
|
|
140
249
|
);
|
|
141
250
|
}
|
|
142
251
|
|
|
@@ -151,8 +260,8 @@ export const CustomerSubscription$inboundSchema: z.ZodType<
|
|
|
151
260
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
152
261
|
),
|
|
153
262
|
id: z.string(),
|
|
154
|
-
amount: z.
|
|
155
|
-
currency: z.
|
|
263
|
+
amount: z.number().int(),
|
|
264
|
+
currency: z.string(),
|
|
156
265
|
recurring_interval: SubscriptionRecurringInterval$inboundSchema,
|
|
157
266
|
status: SubscriptionStatus$inboundSchema,
|
|
158
267
|
current_period_start: z.string().datetime({ offset: true }).transform(v =>
|
|
@@ -176,19 +285,25 @@ export const CustomerSubscription$inboundSchema: z.ZodType<
|
|
|
176
285
|
),
|
|
177
286
|
customer_id: z.string(),
|
|
178
287
|
product_id: z.string(),
|
|
179
|
-
price_id: z.string(),
|
|
180
288
|
discount_id: z.nullable(z.string()),
|
|
181
289
|
checkout_id: z.nullable(z.string()),
|
|
182
290
|
customer_cancellation_reason: z.nullable(
|
|
183
291
|
CustomerCancellationReason$inboundSchema,
|
|
184
292
|
),
|
|
185
293
|
customer_cancellation_comment: z.nullable(z.string()),
|
|
294
|
+
price_id: z.string(),
|
|
186
295
|
user_id: z.string(),
|
|
187
296
|
product: CustomerSubscriptionProduct$inboundSchema,
|
|
188
297
|
price: z.union([
|
|
189
298
|
LegacyRecurringProductPrice$inboundSchema,
|
|
190
299
|
ProductPrice$inboundSchema,
|
|
191
300
|
]),
|
|
301
|
+
prices: z.array(
|
|
302
|
+
z.union([
|
|
303
|
+
LegacyRecurringProductPrice$inboundSchema,
|
|
304
|
+
ProductPrice$inboundSchema,
|
|
305
|
+
]),
|
|
306
|
+
),
|
|
192
307
|
}).transform((v) => {
|
|
193
308
|
return remap$(v, {
|
|
194
309
|
"created_at": "createdAt",
|
|
@@ -203,11 +318,11 @@ export const CustomerSubscription$inboundSchema: z.ZodType<
|
|
|
203
318
|
"ended_at": "endedAt",
|
|
204
319
|
"customer_id": "customerId",
|
|
205
320
|
"product_id": "productId",
|
|
206
|
-
"price_id": "priceId",
|
|
207
321
|
"discount_id": "discountId",
|
|
208
322
|
"checkout_id": "checkoutId",
|
|
209
323
|
"customer_cancellation_reason": "customerCancellationReason",
|
|
210
324
|
"customer_cancellation_comment": "customerCancellationComment",
|
|
325
|
+
"price_id": "priceId",
|
|
211
326
|
"user_id": "userId",
|
|
212
327
|
});
|
|
213
328
|
});
|
|
@@ -217,8 +332,8 @@ export type CustomerSubscription$Outbound = {
|
|
|
217
332
|
created_at: string;
|
|
218
333
|
modified_at: string | null;
|
|
219
334
|
id: string;
|
|
220
|
-
amount: number
|
|
221
|
-
currency: string
|
|
335
|
+
amount: number;
|
|
336
|
+
currency: string;
|
|
222
337
|
recurring_interval: string;
|
|
223
338
|
status: string;
|
|
224
339
|
current_period_start: string;
|
|
@@ -230,14 +345,15 @@ export type CustomerSubscription$Outbound = {
|
|
|
230
345
|
ended_at: string | null;
|
|
231
346
|
customer_id: string;
|
|
232
347
|
product_id: string;
|
|
233
|
-
price_id: string;
|
|
234
348
|
discount_id: string | null;
|
|
235
349
|
checkout_id: string | null;
|
|
236
350
|
customer_cancellation_reason: string | null;
|
|
237
351
|
customer_cancellation_comment: string | null;
|
|
352
|
+
price_id: string;
|
|
238
353
|
user_id: string;
|
|
239
354
|
product: CustomerSubscriptionProduct$Outbound;
|
|
240
355
|
price: LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound;
|
|
356
|
+
prices: Array<LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound>;
|
|
241
357
|
};
|
|
242
358
|
|
|
243
359
|
/** @internal */
|
|
@@ -249,8 +365,8 @@ export const CustomerSubscription$outboundSchema: z.ZodType<
|
|
|
249
365
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
250
366
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
251
367
|
id: z.string(),
|
|
252
|
-
amount: z.
|
|
253
|
-
currency: z.
|
|
368
|
+
amount: z.number().int(),
|
|
369
|
+
currency: z.string(),
|
|
254
370
|
recurringInterval: SubscriptionRecurringInterval$outboundSchema,
|
|
255
371
|
status: SubscriptionStatus$outboundSchema,
|
|
256
372
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
@@ -262,19 +378,25 @@ export const CustomerSubscription$outboundSchema: z.ZodType<
|
|
|
262
378
|
endedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
263
379
|
customerId: z.string(),
|
|
264
380
|
productId: z.string(),
|
|
265
|
-
priceId: z.string(),
|
|
266
381
|
discountId: z.nullable(z.string()),
|
|
267
382
|
checkoutId: z.nullable(z.string()),
|
|
268
383
|
customerCancellationReason: z.nullable(
|
|
269
384
|
CustomerCancellationReason$outboundSchema,
|
|
270
385
|
),
|
|
271
386
|
customerCancellationComment: z.nullable(z.string()),
|
|
387
|
+
priceId: z.string(),
|
|
272
388
|
userId: z.string(),
|
|
273
389
|
product: CustomerSubscriptionProduct$outboundSchema,
|
|
274
390
|
price: z.union([
|
|
275
391
|
LegacyRecurringProductPrice$outboundSchema,
|
|
276
392
|
ProductPrice$outboundSchema,
|
|
277
393
|
]),
|
|
394
|
+
prices: z.array(
|
|
395
|
+
z.union([
|
|
396
|
+
LegacyRecurringProductPrice$outboundSchema,
|
|
397
|
+
ProductPrice$outboundSchema,
|
|
398
|
+
]),
|
|
399
|
+
),
|
|
278
400
|
}).transform((v) => {
|
|
279
401
|
return remap$(v, {
|
|
280
402
|
createdAt: "created_at",
|
|
@@ -289,11 +411,11 @@ export const CustomerSubscription$outboundSchema: z.ZodType<
|
|
|
289
411
|
endedAt: "ended_at",
|
|
290
412
|
customerId: "customer_id",
|
|
291
413
|
productId: "product_id",
|
|
292
|
-
priceId: "price_id",
|
|
293
414
|
discountId: "discount_id",
|
|
294
415
|
checkoutId: "checkout_id",
|
|
295
416
|
customerCancellationReason: "customer_cancellation_reason",
|
|
296
417
|
customerCancellationComment: "customer_cancellation_comment",
|
|
418
|
+
priceId: "price_id",
|
|
297
419
|
userId: "user_id",
|
|
298
420
|
});
|
|
299
421
|
});
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
|
|
22
22
|
export type LicenseKeyCustomerMetadata = string | number | boolean;
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type LicenseKeyCustomerTaxId = string | TaxIDFormat;
|
|
25
25
|
|
|
26
26
|
export type LicenseKeyCustomer = {
|
|
27
27
|
/**
|
|
@@ -59,6 +59,10 @@ export type LicenseKeyCustomer = {
|
|
|
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
|
|
|
@@ -111,43 +115,50 @@ export function licenseKeyCustomerMetadataFromJSON(
|
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
/** @internal */
|
|
114
|
-
export const
|
|
115
|
-
|
|
118
|
+
export const LicenseKeyCustomerTaxId$inboundSchema: z.ZodType<
|
|
119
|
+
LicenseKeyCustomerTaxId,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
unknown
|
|
122
|
+
> = z.union([z.string(), TaxIDFormat$inboundSchema]);
|
|
116
123
|
|
|
117
124
|
/** @internal */
|
|
118
|
-
export type
|
|
125
|
+
export type LicenseKeyCustomerTaxId$Outbound = string | string;
|
|
119
126
|
|
|
120
127
|
/** @internal */
|
|
121
|
-
export const
|
|
122
|
-
|
|
128
|
+
export const LicenseKeyCustomerTaxId$outboundSchema: z.ZodType<
|
|
129
|
+
LicenseKeyCustomerTaxId$Outbound,
|
|
123
130
|
z.ZodTypeDef,
|
|
124
|
-
|
|
131
|
+
LicenseKeyCustomerTaxId
|
|
125
132
|
> = z.union([z.string(), TaxIDFormat$outboundSchema]);
|
|
126
133
|
|
|
127
134
|
/**
|
|
128
135
|
* @internal
|
|
129
136
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
130
137
|
*/
|
|
131
|
-
export namespace
|
|
132
|
-
/** @deprecated use `
|
|
133
|
-
export const inboundSchema =
|
|
134
|
-
/** @deprecated use `
|
|
135
|
-
export const outboundSchema =
|
|
136
|
-
/** @deprecated use `
|
|
137
|
-
export type Outbound =
|
|
138
|
+
export namespace LicenseKeyCustomerTaxId$ {
|
|
139
|
+
/** @deprecated use `LicenseKeyCustomerTaxId$inboundSchema` instead. */
|
|
140
|
+
export const inboundSchema = LicenseKeyCustomerTaxId$inboundSchema;
|
|
141
|
+
/** @deprecated use `LicenseKeyCustomerTaxId$outboundSchema` instead. */
|
|
142
|
+
export const outboundSchema = LicenseKeyCustomerTaxId$outboundSchema;
|
|
143
|
+
/** @deprecated use `LicenseKeyCustomerTaxId$Outbound` instead. */
|
|
144
|
+
export type Outbound = LicenseKeyCustomerTaxId$Outbound;
|
|
138
145
|
}
|
|
139
146
|
|
|
140
|
-
export function
|
|
141
|
-
|
|
147
|
+
export function licenseKeyCustomerTaxIdToJSON(
|
|
148
|
+
licenseKeyCustomerTaxId: LicenseKeyCustomerTaxId,
|
|
149
|
+
): string {
|
|
150
|
+
return JSON.stringify(
|
|
151
|
+
LicenseKeyCustomerTaxId$outboundSchema.parse(licenseKeyCustomerTaxId),
|
|
152
|
+
);
|
|
142
153
|
}
|
|
143
154
|
|
|
144
|
-
export function
|
|
155
|
+
export function licenseKeyCustomerTaxIdFromJSON(
|
|
145
156
|
jsonString: string,
|
|
146
|
-
): SafeParseResult<
|
|
157
|
+
): SafeParseResult<LicenseKeyCustomerTaxId, SDKValidationError> {
|
|
147
158
|
return safeParse(
|
|
148
159
|
jsonString,
|
|
149
|
-
(x) =>
|
|
150
|
-
`Failed to parse '
|
|
160
|
+
(x) => LicenseKeyCustomerTaxId$inboundSchema.parse(JSON.parse(x)),
|
|
161
|
+
`Failed to parse 'LicenseKeyCustomerTaxId' from JSON`,
|
|
151
162
|
);
|
|
152
163
|
}
|
|
153
164
|
|
|
@@ -172,6 +183,9 @@ export const LicenseKeyCustomer$inboundSchema: z.ZodType<
|
|
|
172
183
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$inboundSchema]))),
|
|
173
184
|
),
|
|
174
185
|
organization_id: z.string(),
|
|
186
|
+
deleted_at: z.nullable(
|
|
187
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
188
|
+
),
|
|
175
189
|
avatar_url: z.string(),
|
|
176
190
|
}).transform((v) => {
|
|
177
191
|
return remap$(v, {
|
|
@@ -182,6 +196,7 @@ export const LicenseKeyCustomer$inboundSchema: z.ZodType<
|
|
|
182
196
|
"billing_address": "billingAddress",
|
|
183
197
|
"tax_id": "taxId",
|
|
184
198
|
"organization_id": "organizationId",
|
|
199
|
+
"deleted_at": "deletedAt",
|
|
185
200
|
"avatar_url": "avatarUrl",
|
|
186
201
|
});
|
|
187
202
|
});
|
|
@@ -199,6 +214,7 @@ export type LicenseKeyCustomer$Outbound = {
|
|
|
199
214
|
billing_address: Address$Outbound | null;
|
|
200
215
|
tax_id: Array<string | string | null> | null;
|
|
201
216
|
organization_id: string;
|
|
217
|
+
deleted_at: string | null;
|
|
202
218
|
avatar_url: string;
|
|
203
219
|
};
|
|
204
220
|
|
|
@@ -221,6 +237,7 @@ export const LicenseKeyCustomer$outboundSchema: z.ZodType<
|
|
|
221
237
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$outboundSchema]))),
|
|
222
238
|
),
|
|
223
239
|
organizationId: z.string(),
|
|
240
|
+
deletedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
224
241
|
avatarUrl: z.string(),
|
|
225
242
|
}).transform((v) => {
|
|
226
243
|
return remap$(v, {
|
|
@@ -231,6 +248,7 @@ export const LicenseKeyCustomer$outboundSchema: z.ZodType<
|
|
|
231
248
|
billingAddress: "billing_address",
|
|
232
249
|
taxId: "tax_id",
|
|
233
250
|
organizationId: "organization_id",
|
|
251
|
+
deletedAt: "deleted_at",
|
|
234
252
|
avatarUrl: "avatar_url",
|
|
235
253
|
});
|
|
236
254
|
});
|