@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
|
@@ -87,7 +87,7 @@ export type CheckoutDiscount =
|
|
|
87
87
|
| CheckoutDiscountPercentageRepeatDuration
|
|
88
88
|
| CheckoutDiscountFixedRepeatDuration;
|
|
89
89
|
|
|
90
|
-
export type
|
|
90
|
+
export type CustomerMetadata = string | number | boolean;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Checkout session data retrieved using an access token.
|
|
@@ -456,50 +456,50 @@ export function checkoutDiscountFromJSON(
|
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
/** @internal */
|
|
459
|
-
export const
|
|
460
|
-
|
|
459
|
+
export const CustomerMetadata$inboundSchema: z.ZodType<
|
|
460
|
+
CustomerMetadata,
|
|
461
461
|
z.ZodTypeDef,
|
|
462
462
|
unknown
|
|
463
463
|
> = z.union([z.string(), z.number().int(), z.boolean()]);
|
|
464
464
|
|
|
465
465
|
/** @internal */
|
|
466
|
-
export type
|
|
466
|
+
export type CustomerMetadata$Outbound = string | number | boolean;
|
|
467
467
|
|
|
468
468
|
/** @internal */
|
|
469
|
-
export const
|
|
470
|
-
|
|
469
|
+
export const CustomerMetadata$outboundSchema: z.ZodType<
|
|
470
|
+
CustomerMetadata$Outbound,
|
|
471
471
|
z.ZodTypeDef,
|
|
472
|
-
|
|
472
|
+
CustomerMetadata
|
|
473
473
|
> = z.union([z.string(), z.number().int(), z.boolean()]);
|
|
474
474
|
|
|
475
475
|
/**
|
|
476
476
|
* @internal
|
|
477
477
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
478
478
|
*/
|
|
479
|
-
export namespace
|
|
480
|
-
/** @deprecated use `
|
|
481
|
-
export const inboundSchema =
|
|
482
|
-
/** @deprecated use `
|
|
483
|
-
export const outboundSchema =
|
|
484
|
-
/** @deprecated use `
|
|
485
|
-
export type Outbound =
|
|
479
|
+
export namespace CustomerMetadata$ {
|
|
480
|
+
/** @deprecated use `CustomerMetadata$inboundSchema` instead. */
|
|
481
|
+
export const inboundSchema = CustomerMetadata$inboundSchema;
|
|
482
|
+
/** @deprecated use `CustomerMetadata$outboundSchema` instead. */
|
|
483
|
+
export const outboundSchema = CustomerMetadata$outboundSchema;
|
|
484
|
+
/** @deprecated use `CustomerMetadata$Outbound` instead. */
|
|
485
|
+
export type Outbound = CustomerMetadata$Outbound;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
export function
|
|
489
|
-
|
|
488
|
+
export function customerMetadataToJSON(
|
|
489
|
+
customerMetadata: CustomerMetadata,
|
|
490
490
|
): string {
|
|
491
491
|
return JSON.stringify(
|
|
492
|
-
|
|
492
|
+
CustomerMetadata$outboundSchema.parse(customerMetadata),
|
|
493
493
|
);
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
export function
|
|
496
|
+
export function customerMetadataFromJSON(
|
|
497
497
|
jsonString: string,
|
|
498
|
-
): SafeParseResult<
|
|
498
|
+
): SafeParseResult<CustomerMetadata, SDKValidationError> {
|
|
499
499
|
return safeParse(
|
|
500
500
|
jsonString,
|
|
501
|
-
(x) =>
|
|
502
|
-
`Failed to parse '
|
|
501
|
+
(x) => CustomerMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
502
|
+
`Failed to parse 'CustomerMetadata' from JSON`,
|
|
503
503
|
);
|
|
504
504
|
}
|
|
505
505
|
|
|
@@ -16,9 +16,13 @@ import {
|
|
|
16
16
|
|
|
17
17
|
export type CheckoutProductsCreateMetadata = string | number | boolean;
|
|
18
18
|
|
|
19
|
-
export type
|
|
19
|
+
export type CheckoutProductsCreateCustomFieldData =
|
|
20
|
+
| string
|
|
21
|
+
| number
|
|
22
|
+
| boolean
|
|
23
|
+
| Date;
|
|
20
24
|
|
|
21
|
-
export type
|
|
25
|
+
export type CheckoutProductsCreateCustomerMetadata = string | number | boolean;
|
|
22
26
|
|
|
23
27
|
/**
|
|
24
28
|
* Create a new checkout session from a list of products.
|
|
@@ -157,8 +161,8 @@ export function checkoutProductsCreateMetadataFromJSON(
|
|
|
157
161
|
}
|
|
158
162
|
|
|
159
163
|
/** @internal */
|
|
160
|
-
export const
|
|
161
|
-
|
|
164
|
+
export const CheckoutProductsCreateCustomFieldData$inboundSchema: z.ZodType<
|
|
165
|
+
CheckoutProductsCreateCustomFieldData,
|
|
162
166
|
z.ZodTypeDef,
|
|
163
167
|
unknown
|
|
164
168
|
> = z.union([
|
|
@@ -169,13 +173,17 @@ export const CustomFieldData$inboundSchema: z.ZodType<
|
|
|
169
173
|
]);
|
|
170
174
|
|
|
171
175
|
/** @internal */
|
|
172
|
-
export type
|
|
176
|
+
export type CheckoutProductsCreateCustomFieldData$Outbound =
|
|
177
|
+
| string
|
|
178
|
+
| number
|
|
179
|
+
| boolean
|
|
180
|
+
| string;
|
|
173
181
|
|
|
174
182
|
/** @internal */
|
|
175
|
-
export const
|
|
176
|
-
|
|
183
|
+
export const CheckoutProductsCreateCustomFieldData$outboundSchema: z.ZodType<
|
|
184
|
+
CheckoutProductsCreateCustomFieldData$Outbound,
|
|
177
185
|
z.ZodTypeDef,
|
|
178
|
-
|
|
186
|
+
CheckoutProductsCreateCustomFieldData
|
|
179
187
|
> = z.union([
|
|
180
188
|
z.string(),
|
|
181
189
|
z.number().int(),
|
|
@@ -187,76 +195,92 @@ export const CustomFieldData$outboundSchema: z.ZodType<
|
|
|
187
195
|
* @internal
|
|
188
196
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
189
197
|
*/
|
|
190
|
-
export namespace
|
|
191
|
-
/** @deprecated use `
|
|
192
|
-
export const inboundSchema =
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
198
|
+
export namespace CheckoutProductsCreateCustomFieldData$ {
|
|
199
|
+
/** @deprecated use `CheckoutProductsCreateCustomFieldData$inboundSchema` instead. */
|
|
200
|
+
export const inboundSchema =
|
|
201
|
+
CheckoutProductsCreateCustomFieldData$inboundSchema;
|
|
202
|
+
/** @deprecated use `CheckoutProductsCreateCustomFieldData$outboundSchema` instead. */
|
|
203
|
+
export const outboundSchema =
|
|
204
|
+
CheckoutProductsCreateCustomFieldData$outboundSchema;
|
|
205
|
+
/** @deprecated use `CheckoutProductsCreateCustomFieldData$Outbound` instead. */
|
|
206
|
+
export type Outbound = CheckoutProductsCreateCustomFieldData$Outbound;
|
|
197
207
|
}
|
|
198
208
|
|
|
199
|
-
export function
|
|
200
|
-
|
|
209
|
+
export function checkoutProductsCreateCustomFieldDataToJSON(
|
|
210
|
+
checkoutProductsCreateCustomFieldData: CheckoutProductsCreateCustomFieldData,
|
|
201
211
|
): string {
|
|
202
|
-
return JSON.stringify(
|
|
212
|
+
return JSON.stringify(
|
|
213
|
+
CheckoutProductsCreateCustomFieldData$outboundSchema.parse(
|
|
214
|
+
checkoutProductsCreateCustomFieldData,
|
|
215
|
+
),
|
|
216
|
+
);
|
|
203
217
|
}
|
|
204
218
|
|
|
205
|
-
export function
|
|
219
|
+
export function checkoutProductsCreateCustomFieldDataFromJSON(
|
|
206
220
|
jsonString: string,
|
|
207
|
-
): SafeParseResult<
|
|
221
|
+
): SafeParseResult<CheckoutProductsCreateCustomFieldData, SDKValidationError> {
|
|
208
222
|
return safeParse(
|
|
209
223
|
jsonString,
|
|
210
|
-
(x) =>
|
|
211
|
-
|
|
224
|
+
(x) =>
|
|
225
|
+
CheckoutProductsCreateCustomFieldData$inboundSchema.parse(JSON.parse(x)),
|
|
226
|
+
`Failed to parse 'CheckoutProductsCreateCustomFieldData' from JSON`,
|
|
212
227
|
);
|
|
213
228
|
}
|
|
214
229
|
|
|
215
230
|
/** @internal */
|
|
216
|
-
export const
|
|
217
|
-
|
|
231
|
+
export const CheckoutProductsCreateCustomerMetadata$inboundSchema: z.ZodType<
|
|
232
|
+
CheckoutProductsCreateCustomerMetadata,
|
|
218
233
|
z.ZodTypeDef,
|
|
219
234
|
unknown
|
|
220
235
|
> = z.union([z.string(), z.number().int(), z.boolean()]);
|
|
221
236
|
|
|
222
237
|
/** @internal */
|
|
223
|
-
export type
|
|
238
|
+
export type CheckoutProductsCreateCustomerMetadata$Outbound =
|
|
239
|
+
| string
|
|
240
|
+
| number
|
|
241
|
+
| boolean;
|
|
224
242
|
|
|
225
243
|
/** @internal */
|
|
226
|
-
export const
|
|
227
|
-
|
|
244
|
+
export const CheckoutProductsCreateCustomerMetadata$outboundSchema: z.ZodType<
|
|
245
|
+
CheckoutProductsCreateCustomerMetadata$Outbound,
|
|
228
246
|
z.ZodTypeDef,
|
|
229
|
-
|
|
247
|
+
CheckoutProductsCreateCustomerMetadata
|
|
230
248
|
> = z.union([z.string(), z.number().int(), z.boolean()]);
|
|
231
249
|
|
|
232
250
|
/**
|
|
233
251
|
* @internal
|
|
234
252
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
235
253
|
*/
|
|
236
|
-
export namespace
|
|
237
|
-
/** @deprecated use `
|
|
238
|
-
export const inboundSchema =
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
254
|
+
export namespace CheckoutProductsCreateCustomerMetadata$ {
|
|
255
|
+
/** @deprecated use `CheckoutProductsCreateCustomerMetadata$inboundSchema` instead. */
|
|
256
|
+
export const inboundSchema =
|
|
257
|
+
CheckoutProductsCreateCustomerMetadata$inboundSchema;
|
|
258
|
+
/** @deprecated use `CheckoutProductsCreateCustomerMetadata$outboundSchema` instead. */
|
|
259
|
+
export const outboundSchema =
|
|
260
|
+
CheckoutProductsCreateCustomerMetadata$outboundSchema;
|
|
261
|
+
/** @deprecated use `CheckoutProductsCreateCustomerMetadata$Outbound` instead. */
|
|
262
|
+
export type Outbound = CheckoutProductsCreateCustomerMetadata$Outbound;
|
|
243
263
|
}
|
|
244
264
|
|
|
245
|
-
export function
|
|
246
|
-
|
|
265
|
+
export function checkoutProductsCreateCustomerMetadataToJSON(
|
|
266
|
+
checkoutProductsCreateCustomerMetadata:
|
|
267
|
+
CheckoutProductsCreateCustomerMetadata,
|
|
247
268
|
): string {
|
|
248
269
|
return JSON.stringify(
|
|
249
|
-
|
|
270
|
+
CheckoutProductsCreateCustomerMetadata$outboundSchema.parse(
|
|
271
|
+
checkoutProductsCreateCustomerMetadata,
|
|
272
|
+
),
|
|
250
273
|
);
|
|
251
274
|
}
|
|
252
275
|
|
|
253
|
-
export function
|
|
276
|
+
export function checkoutProductsCreateCustomerMetadataFromJSON(
|
|
254
277
|
jsonString: string,
|
|
255
|
-
): SafeParseResult<
|
|
278
|
+
): SafeParseResult<CheckoutProductsCreateCustomerMetadata, SDKValidationError> {
|
|
256
279
|
return safeParse(
|
|
257
280
|
jsonString,
|
|
258
|
-
(x) =>
|
|
259
|
-
|
|
281
|
+
(x) =>
|
|
282
|
+
CheckoutProductsCreateCustomerMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
283
|
+
`Failed to parse 'CheckoutProductsCreateCustomerMetadata' from JSON`,
|
|
260
284
|
);
|
|
261
285
|
}
|
|
262
286
|
|
|
@@ -62,6 +62,10 @@ export type Customer = {
|
|
|
62
62
|
* The ID of the organization owning the customer.
|
|
63
63
|
*/
|
|
64
64
|
organizationId: string;
|
|
65
|
+
/**
|
|
66
|
+
* Timestamp for when the customer was soft deleted.
|
|
67
|
+
*/
|
|
68
|
+
deletedAt: Date | null;
|
|
65
69
|
avatarUrl: string;
|
|
66
70
|
};
|
|
67
71
|
|
|
@@ -178,6 +182,9 @@ export const Customer$inboundSchema: z.ZodType<
|
|
|
178
182
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$inboundSchema]))),
|
|
179
183
|
),
|
|
180
184
|
organization_id: z.string(),
|
|
185
|
+
deleted_at: z.nullable(
|
|
186
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
187
|
+
),
|
|
181
188
|
avatar_url: z.string(),
|
|
182
189
|
}).transform((v) => {
|
|
183
190
|
return remap$(v, {
|
|
@@ -188,6 +195,7 @@ export const Customer$inboundSchema: z.ZodType<
|
|
|
188
195
|
"billing_address": "billingAddress",
|
|
189
196
|
"tax_id": "taxId",
|
|
190
197
|
"organization_id": "organizationId",
|
|
198
|
+
"deleted_at": "deletedAt",
|
|
191
199
|
"avatar_url": "avatarUrl",
|
|
192
200
|
});
|
|
193
201
|
});
|
|
@@ -205,6 +213,7 @@ export type Customer$Outbound = {
|
|
|
205
213
|
billing_address: Address$Outbound | null;
|
|
206
214
|
tax_id: Array<string | string | null> | null;
|
|
207
215
|
organization_id: string;
|
|
216
|
+
deleted_at: string | null;
|
|
208
217
|
avatar_url: string;
|
|
209
218
|
};
|
|
210
219
|
|
|
@@ -227,6 +236,7 @@ export const Customer$outboundSchema: z.ZodType<
|
|
|
227
236
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$outboundSchema]))),
|
|
228
237
|
),
|
|
229
238
|
organizationId: z.string(),
|
|
239
|
+
deletedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
230
240
|
avatarUrl: z.string(),
|
|
231
241
|
}).transform((v) => {
|
|
232
242
|
return remap$(v, {
|
|
@@ -237,6 +247,7 @@ export const Customer$outboundSchema: z.ZodType<
|
|
|
237
247
|
billingAddress: "billing_address",
|
|
238
248
|
taxId: "tax_id",
|
|
239
249
|
organizationId: "organization_id",
|
|
250
|
+
deletedAt: "deleted_at",
|
|
240
251
|
avatarUrl: "avatar_url",
|
|
241
252
|
});
|
|
242
253
|
});
|
|
@@ -25,6 +25,17 @@ import {
|
|
|
25
25
|
LegacyRecurringProductPrice$Outbound,
|
|
26
26
|
LegacyRecurringProductPrice$outboundSchema,
|
|
27
27
|
} from "./legacyrecurringproductprice.js";
|
|
28
|
+
import {
|
|
29
|
+
OrderItemSchema,
|
|
30
|
+
OrderItemSchema$inboundSchema,
|
|
31
|
+
OrderItemSchema$Outbound,
|
|
32
|
+
OrderItemSchema$outboundSchema,
|
|
33
|
+
} from "./orderitemschema.js";
|
|
34
|
+
import {
|
|
35
|
+
OrderStatus,
|
|
36
|
+
OrderStatus$inboundSchema,
|
|
37
|
+
OrderStatus$outboundSchema,
|
|
38
|
+
} from "./orderstatus.js";
|
|
28
39
|
import {
|
|
29
40
|
ProductPrice,
|
|
30
41
|
ProductPrice$inboundSchema,
|
|
@@ -32,6 +43,9 @@ import {
|
|
|
32
43
|
ProductPrice$outboundSchema,
|
|
33
44
|
} from "./productprice.js";
|
|
34
45
|
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
48
|
+
*/
|
|
35
49
|
export type CustomerOrderProductPrice =
|
|
36
50
|
| LegacyRecurringProductPrice
|
|
37
51
|
| ProductPrice;
|
|
@@ -46,11 +60,51 @@ export type CustomerOrder = {
|
|
|
46
60
|
*/
|
|
47
61
|
modifiedAt: Date | null;
|
|
48
62
|
id: string;
|
|
63
|
+
status: OrderStatus;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the order has been paid for.
|
|
66
|
+
*/
|
|
67
|
+
paid: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Amount in cents, before discounts and taxes.
|
|
70
|
+
*/
|
|
71
|
+
subtotalAmount: number;
|
|
72
|
+
/**
|
|
73
|
+
* Discount amount in cents.
|
|
74
|
+
*/
|
|
75
|
+
discountAmount: number;
|
|
76
|
+
/**
|
|
77
|
+
* Amount in cents, after discounts but before taxes.
|
|
78
|
+
*/
|
|
79
|
+
netAmount: number;
|
|
80
|
+
/**
|
|
81
|
+
* Amount in cents, after discounts but before taxes.
|
|
82
|
+
*
|
|
83
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
84
|
+
*/
|
|
49
85
|
amount: number;
|
|
86
|
+
/**
|
|
87
|
+
* Sales tax amount in cents.
|
|
88
|
+
*/
|
|
50
89
|
taxAmount: number;
|
|
90
|
+
/**
|
|
91
|
+
* Amount in cents, after discounts and taxes.
|
|
92
|
+
*/
|
|
93
|
+
totalAmount: number;
|
|
94
|
+
/**
|
|
95
|
+
* Amount refunded in cents.
|
|
96
|
+
*/
|
|
97
|
+
refundedAmount: number;
|
|
98
|
+
/**
|
|
99
|
+
* Sales tax refunded in cents.
|
|
100
|
+
*/
|
|
101
|
+
refundedTaxAmount: number;
|
|
51
102
|
currency: string;
|
|
52
103
|
customerId: string;
|
|
53
104
|
productId: string;
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
107
|
+
*/
|
|
54
108
|
productPriceId: string;
|
|
55
109
|
subscriptionId: string | null;
|
|
56
110
|
/**
|
|
@@ -58,8 +112,15 @@ export type CustomerOrder = {
|
|
|
58
112
|
*/
|
|
59
113
|
userId: string;
|
|
60
114
|
product: CustomerOrderProduct;
|
|
115
|
+
/**
|
|
116
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
117
|
+
*/
|
|
61
118
|
productPrice: LegacyRecurringProductPrice | ProductPrice;
|
|
62
119
|
subscription: CustomerOrderSubscription | null;
|
|
120
|
+
/**
|
|
121
|
+
* Line items composing the order.
|
|
122
|
+
*/
|
|
123
|
+
items: Array<OrderItemSchema>;
|
|
63
124
|
};
|
|
64
125
|
|
|
65
126
|
/** @internal */
|
|
@@ -129,8 +190,16 @@ export const CustomerOrder$inboundSchema: z.ZodType<
|
|
|
129
190
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
130
191
|
),
|
|
131
192
|
id: z.string(),
|
|
193
|
+
status: OrderStatus$inboundSchema,
|
|
194
|
+
paid: z.boolean(),
|
|
195
|
+
subtotal_amount: z.number().int(),
|
|
196
|
+
discount_amount: z.number().int(),
|
|
197
|
+
net_amount: z.number().int(),
|
|
132
198
|
amount: z.number().int(),
|
|
133
199
|
tax_amount: z.number().int(),
|
|
200
|
+
total_amount: z.number().int(),
|
|
201
|
+
refunded_amount: z.number().int(),
|
|
202
|
+
refunded_tax_amount: z.number().int(),
|
|
134
203
|
currency: z.string(),
|
|
135
204
|
customer_id: z.string(),
|
|
136
205
|
product_id: z.string(),
|
|
@@ -143,11 +212,18 @@ export const CustomerOrder$inboundSchema: z.ZodType<
|
|
|
143
212
|
ProductPrice$inboundSchema,
|
|
144
213
|
]),
|
|
145
214
|
subscription: z.nullable(CustomerOrderSubscription$inboundSchema),
|
|
215
|
+
items: z.array(OrderItemSchema$inboundSchema),
|
|
146
216
|
}).transform((v) => {
|
|
147
217
|
return remap$(v, {
|
|
148
218
|
"created_at": "createdAt",
|
|
149
219
|
"modified_at": "modifiedAt",
|
|
220
|
+
"subtotal_amount": "subtotalAmount",
|
|
221
|
+
"discount_amount": "discountAmount",
|
|
222
|
+
"net_amount": "netAmount",
|
|
150
223
|
"tax_amount": "taxAmount",
|
|
224
|
+
"total_amount": "totalAmount",
|
|
225
|
+
"refunded_amount": "refundedAmount",
|
|
226
|
+
"refunded_tax_amount": "refundedTaxAmount",
|
|
151
227
|
"customer_id": "customerId",
|
|
152
228
|
"product_id": "productId",
|
|
153
229
|
"product_price_id": "productPriceId",
|
|
@@ -162,8 +238,16 @@ export type CustomerOrder$Outbound = {
|
|
|
162
238
|
created_at: string;
|
|
163
239
|
modified_at: string | null;
|
|
164
240
|
id: string;
|
|
241
|
+
status: string;
|
|
242
|
+
paid: boolean;
|
|
243
|
+
subtotal_amount: number;
|
|
244
|
+
discount_amount: number;
|
|
245
|
+
net_amount: number;
|
|
165
246
|
amount: number;
|
|
166
247
|
tax_amount: number;
|
|
248
|
+
total_amount: number;
|
|
249
|
+
refunded_amount: number;
|
|
250
|
+
refunded_tax_amount: number;
|
|
167
251
|
currency: string;
|
|
168
252
|
customer_id: string;
|
|
169
253
|
product_id: string;
|
|
@@ -173,6 +257,7 @@ export type CustomerOrder$Outbound = {
|
|
|
173
257
|
product: CustomerOrderProduct$Outbound;
|
|
174
258
|
product_price: LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound;
|
|
175
259
|
subscription: CustomerOrderSubscription$Outbound | null;
|
|
260
|
+
items: Array<OrderItemSchema$Outbound>;
|
|
176
261
|
};
|
|
177
262
|
|
|
178
263
|
/** @internal */
|
|
@@ -184,8 +269,16 @@ export const CustomerOrder$outboundSchema: z.ZodType<
|
|
|
184
269
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
185
270
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
186
271
|
id: z.string(),
|
|
272
|
+
status: OrderStatus$outboundSchema,
|
|
273
|
+
paid: z.boolean(),
|
|
274
|
+
subtotalAmount: z.number().int(),
|
|
275
|
+
discountAmount: z.number().int(),
|
|
276
|
+
netAmount: z.number().int(),
|
|
187
277
|
amount: z.number().int(),
|
|
188
278
|
taxAmount: z.number().int(),
|
|
279
|
+
totalAmount: z.number().int(),
|
|
280
|
+
refundedAmount: z.number().int(),
|
|
281
|
+
refundedTaxAmount: z.number().int(),
|
|
189
282
|
currency: z.string(),
|
|
190
283
|
customerId: z.string(),
|
|
191
284
|
productId: z.string(),
|
|
@@ -198,11 +291,18 @@ export const CustomerOrder$outboundSchema: z.ZodType<
|
|
|
198
291
|
ProductPrice$outboundSchema,
|
|
199
292
|
]),
|
|
200
293
|
subscription: z.nullable(CustomerOrderSubscription$outboundSchema),
|
|
294
|
+
items: z.array(OrderItemSchema$outboundSchema),
|
|
201
295
|
}).transform((v) => {
|
|
202
296
|
return remap$(v, {
|
|
203
297
|
createdAt: "created_at",
|
|
204
298
|
modifiedAt: "modified_at",
|
|
299
|
+
subtotalAmount: "subtotal_amount",
|
|
300
|
+
discountAmount: "discount_amount",
|
|
301
|
+
netAmount: "net_amount",
|
|
205
302
|
taxAmount: "tax_amount",
|
|
303
|
+
totalAmount: "total_amount",
|
|
304
|
+
refundedAmount: "refunded_amount",
|
|
305
|
+
refundedTaxAmount: "refunded_tax_amount",
|
|
206
306
|
customerId: "customer_id",
|
|
207
307
|
productId: "product_id",
|
|
208
308
|
productPriceId: "product_price_id",
|
|
@@ -10,8 +10,8 @@ export const CustomerOrderSortProperty = {
|
|
|
10
10
|
MinusCreatedAt: "-created_at",
|
|
11
11
|
Amount: "amount",
|
|
12
12
|
MinusAmount: "-amount",
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
NetAmount: "net_amount",
|
|
14
|
+
MinusNetAmount: "-net_amount",
|
|
15
15
|
Product: "product",
|
|
16
16
|
MinusProduct: "-product",
|
|
17
17
|
Subscription: "subscription",
|
|
@@ -39,11 +39,11 @@ export type CustomerOrderSubscription = {
|
|
|
39
39
|
/**
|
|
40
40
|
* The amount of the subscription.
|
|
41
41
|
*/
|
|
42
|
-
amount: number
|
|
42
|
+
amount: number;
|
|
43
43
|
/**
|
|
44
44
|
* The currency of the subscription.
|
|
45
45
|
*/
|
|
46
|
-
currency: string
|
|
46
|
+
currency: string;
|
|
47
47
|
recurringInterval: SubscriptionRecurringInterval;
|
|
48
48
|
status: SubscriptionStatus;
|
|
49
49
|
/**
|
|
@@ -82,10 +82,6 @@ export type CustomerOrderSubscription = {
|
|
|
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
|
*/
|
|
@@ -93,6 +89,10 @@ export type CustomerOrderSubscription = {
|
|
|
93
89
|
checkoutId: string | null;
|
|
94
90
|
customerCancellationReason: CustomerCancellationReason | null;
|
|
95
91
|
customerCancellationComment: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
94
|
+
*/
|
|
95
|
+
priceId: string;
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
/** @internal */
|
|
@@ -106,8 +106,8 @@ export const CustomerOrderSubscription$inboundSchema: z.ZodType<
|
|
|
106
106
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
107
107
|
),
|
|
108
108
|
id: z.string(),
|
|
109
|
-
amount: z.
|
|
110
|
-
currency: z.
|
|
109
|
+
amount: z.number().int(),
|
|
110
|
+
currency: z.string(),
|
|
111
111
|
recurring_interval: SubscriptionRecurringInterval$inboundSchema,
|
|
112
112
|
status: SubscriptionStatus$inboundSchema,
|
|
113
113
|
current_period_start: z.string().datetime({ offset: true }).transform(v =>
|
|
@@ -131,13 +131,13 @@ export const CustomerOrderSubscription$inboundSchema: z.ZodType<
|
|
|
131
131
|
),
|
|
132
132
|
customer_id: z.string(),
|
|
133
133
|
product_id: z.string(),
|
|
134
|
-
price_id: z.string(),
|
|
135
134
|
discount_id: z.nullable(z.string()),
|
|
136
135
|
checkout_id: z.nullable(z.string()),
|
|
137
136
|
customer_cancellation_reason: z.nullable(
|
|
138
137
|
CustomerCancellationReason$inboundSchema,
|
|
139
138
|
),
|
|
140
139
|
customer_cancellation_comment: z.nullable(z.string()),
|
|
140
|
+
price_id: z.string(),
|
|
141
141
|
}).transform((v) => {
|
|
142
142
|
return remap$(v, {
|
|
143
143
|
"created_at": "createdAt",
|
|
@@ -152,11 +152,11 @@ export const CustomerOrderSubscription$inboundSchema: z.ZodType<
|
|
|
152
152
|
"ended_at": "endedAt",
|
|
153
153
|
"customer_id": "customerId",
|
|
154
154
|
"product_id": "productId",
|
|
155
|
-
"price_id": "priceId",
|
|
156
155
|
"discount_id": "discountId",
|
|
157
156
|
"checkout_id": "checkoutId",
|
|
158
157
|
"customer_cancellation_reason": "customerCancellationReason",
|
|
159
158
|
"customer_cancellation_comment": "customerCancellationComment",
|
|
159
|
+
"price_id": "priceId",
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
|
|
@@ -165,8 +165,8 @@ export type CustomerOrderSubscription$Outbound = {
|
|
|
165
165
|
created_at: string;
|
|
166
166
|
modified_at: string | null;
|
|
167
167
|
id: string;
|
|
168
|
-
amount: number
|
|
169
|
-
currency: string
|
|
168
|
+
amount: number;
|
|
169
|
+
currency: string;
|
|
170
170
|
recurring_interval: string;
|
|
171
171
|
status: string;
|
|
172
172
|
current_period_start: string;
|
|
@@ -178,11 +178,11 @@ export type CustomerOrderSubscription$Outbound = {
|
|
|
178
178
|
ended_at: string | null;
|
|
179
179
|
customer_id: string;
|
|
180
180
|
product_id: string;
|
|
181
|
-
price_id: string;
|
|
182
181
|
discount_id: string | null;
|
|
183
182
|
checkout_id: string | null;
|
|
184
183
|
customer_cancellation_reason: string | null;
|
|
185
184
|
customer_cancellation_comment: string | null;
|
|
185
|
+
price_id: string;
|
|
186
186
|
};
|
|
187
187
|
|
|
188
188
|
/** @internal */
|
|
@@ -194,8 +194,8 @@ export const CustomerOrderSubscription$outboundSchema: z.ZodType<
|
|
|
194
194
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
195
195
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
196
196
|
id: z.string(),
|
|
197
|
-
amount: z.
|
|
198
|
-
currency: z.
|
|
197
|
+
amount: z.number().int(),
|
|
198
|
+
currency: z.string(),
|
|
199
199
|
recurringInterval: SubscriptionRecurringInterval$outboundSchema,
|
|
200
200
|
status: SubscriptionStatus$outboundSchema,
|
|
201
201
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
@@ -207,13 +207,13 @@ export const CustomerOrderSubscription$outboundSchema: z.ZodType<
|
|
|
207
207
|
endedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
208
208
|
customerId: z.string(),
|
|
209
209
|
productId: z.string(),
|
|
210
|
-
priceId: z.string(),
|
|
211
210
|
discountId: z.nullable(z.string()),
|
|
212
211
|
checkoutId: z.nullable(z.string()),
|
|
213
212
|
customerCancellationReason: z.nullable(
|
|
214
213
|
CustomerCancellationReason$outboundSchema,
|
|
215
214
|
),
|
|
216
215
|
customerCancellationComment: z.nullable(z.string()),
|
|
216
|
+
priceId: z.string(),
|
|
217
217
|
}).transform((v) => {
|
|
218
218
|
return remap$(v, {
|
|
219
219
|
createdAt: "created_at",
|
|
@@ -228,11 +228,11 @@ export const CustomerOrderSubscription$outboundSchema: z.ZodType<
|
|
|
228
228
|
endedAt: "ended_at",
|
|
229
229
|
customerId: "customer_id",
|
|
230
230
|
productId: "product_id",
|
|
231
|
-
priceId: "price_id",
|
|
232
231
|
discountId: "discount_id",
|
|
233
232
|
checkoutId: "checkout_id",
|
|
234
233
|
customerCancellationReason: "customer_cancellation_reason",
|
|
235
234
|
customerCancellationComment: "customer_cancellation_comment",
|
|
235
|
+
priceId: "price_id",
|
|
236
236
|
});
|
|
237
237
|
});
|
|
238
238
|
|