@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
|
@@ -54,12 +54,23 @@ import {
|
|
|
54
54
|
OrderCustomer$Outbound,
|
|
55
55
|
OrderCustomer$outboundSchema,
|
|
56
56
|
} from "./ordercustomer.js";
|
|
57
|
+
import {
|
|
58
|
+
OrderItemSchema,
|
|
59
|
+
OrderItemSchema$inboundSchema,
|
|
60
|
+
OrderItemSchema$Outbound,
|
|
61
|
+
OrderItemSchema$outboundSchema,
|
|
62
|
+
} from "./orderitemschema.js";
|
|
57
63
|
import {
|
|
58
64
|
OrderProduct,
|
|
59
65
|
OrderProduct$inboundSchema,
|
|
60
66
|
OrderProduct$Outbound,
|
|
61
67
|
OrderProduct$outboundSchema,
|
|
62
68
|
} from "./orderproduct.js";
|
|
69
|
+
import {
|
|
70
|
+
OrderStatus,
|
|
71
|
+
OrderStatus$inboundSchema,
|
|
72
|
+
OrderStatus$outboundSchema,
|
|
73
|
+
} from "./orderstatus.js";
|
|
63
74
|
import {
|
|
64
75
|
OrderSubscription,
|
|
65
76
|
OrderSubscription$inboundSchema,
|
|
@@ -83,6 +94,9 @@ export type OrderMetadata = string | number | boolean;
|
|
|
83
94
|
|
|
84
95
|
export type OrderCustomFieldData = string | number | boolean | Date;
|
|
85
96
|
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
99
|
+
*/
|
|
86
100
|
export type OrderProductPrice = LegacyRecurringProductPrice | ProductPrice;
|
|
87
101
|
|
|
88
102
|
export type OrderDiscount =
|
|
@@ -111,15 +125,43 @@ export type Order = {
|
|
|
111
125
|
customFieldData?:
|
|
112
126
|
| { [k: string]: string | number | boolean | Date | null }
|
|
113
127
|
| undefined;
|
|
114
|
-
status:
|
|
128
|
+
status: OrderStatus;
|
|
129
|
+
/**
|
|
130
|
+
* Whether the order has been paid for.
|
|
131
|
+
*/
|
|
132
|
+
paid: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Amount in cents, before discounts and taxes.
|
|
135
|
+
*/
|
|
136
|
+
subtotalAmount: number;
|
|
137
|
+
/**
|
|
138
|
+
* Discount amount in cents.
|
|
139
|
+
*/
|
|
140
|
+
discountAmount: number;
|
|
141
|
+
/**
|
|
142
|
+
* Amount in cents, after discounts but before taxes.
|
|
143
|
+
*/
|
|
144
|
+
netAmount: number;
|
|
145
|
+
/**
|
|
146
|
+
* Amount in cents, after discounts but before taxes.
|
|
147
|
+
*
|
|
148
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
149
|
+
*/
|
|
115
150
|
amount: number;
|
|
151
|
+
/**
|
|
152
|
+
* Sales tax amount in cents.
|
|
153
|
+
*/
|
|
116
154
|
taxAmount: number;
|
|
117
155
|
/**
|
|
118
|
-
* Amount
|
|
156
|
+
* Amount in cents, after discounts and taxes.
|
|
157
|
+
*/
|
|
158
|
+
totalAmount: number;
|
|
159
|
+
/**
|
|
160
|
+
* Amount refunded in cents.
|
|
119
161
|
*/
|
|
120
162
|
refundedAmount: number;
|
|
121
163
|
/**
|
|
122
|
-
* Sales tax refunded
|
|
164
|
+
* Sales tax refunded in cents.
|
|
123
165
|
*/
|
|
124
166
|
refundedTaxAmount: number;
|
|
125
167
|
currency: string;
|
|
@@ -127,6 +169,9 @@ export type Order = {
|
|
|
127
169
|
billingAddress: Address | null;
|
|
128
170
|
customerId: string;
|
|
129
171
|
productId: string;
|
|
172
|
+
/**
|
|
173
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
174
|
+
*/
|
|
130
175
|
productPriceId: string;
|
|
131
176
|
discountId: string | null;
|
|
132
177
|
subscriptionId: string | null;
|
|
@@ -138,6 +183,9 @@ export type Order = {
|
|
|
138
183
|
userId: string;
|
|
139
184
|
user: OrderUser;
|
|
140
185
|
product: OrderProduct;
|
|
186
|
+
/**
|
|
187
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
188
|
+
*/
|
|
141
189
|
productPrice: LegacyRecurringProductPrice | ProductPrice;
|
|
142
190
|
discount:
|
|
143
191
|
| DiscountPercentageOnceForeverDurationBase
|
|
@@ -146,6 +194,10 @@ export type Order = {
|
|
|
146
194
|
| DiscountFixedRepeatDurationBase
|
|
147
195
|
| null;
|
|
148
196
|
subscription: OrderSubscription | null;
|
|
197
|
+
/**
|
|
198
|
+
* Line items composing the order.
|
|
199
|
+
*/
|
|
200
|
+
items: Array<OrderItemSchema>;
|
|
149
201
|
};
|
|
150
202
|
|
|
151
203
|
/** @internal */
|
|
@@ -385,9 +437,14 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
385
437
|
]),
|
|
386
438
|
),
|
|
387
439
|
).optional(),
|
|
388
|
-
status:
|
|
440
|
+
status: OrderStatus$inboundSchema,
|
|
441
|
+
paid: z.boolean(),
|
|
442
|
+
subtotal_amount: z.number().int(),
|
|
443
|
+
discount_amount: z.number().int(),
|
|
444
|
+
net_amount: z.number().int(),
|
|
389
445
|
amount: z.number().int(),
|
|
390
446
|
tax_amount: z.number().int(),
|
|
447
|
+
total_amount: z.number().int(),
|
|
391
448
|
refunded_amount: z.number().int(),
|
|
392
449
|
refunded_tax_amount: z.number().int(),
|
|
393
450
|
currency: z.string(),
|
|
@@ -416,12 +473,17 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
416
473
|
]),
|
|
417
474
|
),
|
|
418
475
|
subscription: z.nullable(OrderSubscription$inboundSchema),
|
|
476
|
+
items: z.array(OrderItemSchema$inboundSchema),
|
|
419
477
|
}).transform((v) => {
|
|
420
478
|
return remap$(v, {
|
|
421
479
|
"created_at": "createdAt",
|
|
422
480
|
"modified_at": "modifiedAt",
|
|
423
481
|
"custom_field_data": "customFieldData",
|
|
482
|
+
"subtotal_amount": "subtotalAmount",
|
|
483
|
+
"discount_amount": "discountAmount",
|
|
484
|
+
"net_amount": "netAmount",
|
|
424
485
|
"tax_amount": "taxAmount",
|
|
486
|
+
"total_amount": "totalAmount",
|
|
425
487
|
"refunded_amount": "refundedAmount",
|
|
426
488
|
"refunded_tax_amount": "refundedTaxAmount",
|
|
427
489
|
"billing_reason": "billingReason",
|
|
@@ -447,8 +509,13 @@ export type Order$Outbound = {
|
|
|
447
509
|
| { [k: string]: string | number | boolean | string | null }
|
|
448
510
|
| undefined;
|
|
449
511
|
status: string;
|
|
512
|
+
paid: boolean;
|
|
513
|
+
subtotal_amount: number;
|
|
514
|
+
discount_amount: number;
|
|
515
|
+
net_amount: number;
|
|
450
516
|
amount: number;
|
|
451
517
|
tax_amount: number;
|
|
518
|
+
total_amount: number;
|
|
452
519
|
refunded_amount: number;
|
|
453
520
|
refunded_tax_amount: number;
|
|
454
521
|
currency: string;
|
|
@@ -472,6 +539,7 @@ export type Order$Outbound = {
|
|
|
472
539
|
| DiscountFixedRepeatDurationBase$Outbound
|
|
473
540
|
| null;
|
|
474
541
|
subscription: OrderSubscription$Outbound | null;
|
|
542
|
+
items: Array<OrderItemSchema$Outbound>;
|
|
475
543
|
};
|
|
476
544
|
|
|
477
545
|
/** @internal */
|
|
@@ -494,9 +562,14 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
494
562
|
]),
|
|
495
563
|
),
|
|
496
564
|
).optional(),
|
|
497
|
-
status:
|
|
565
|
+
status: OrderStatus$outboundSchema,
|
|
566
|
+
paid: z.boolean(),
|
|
567
|
+
subtotalAmount: z.number().int(),
|
|
568
|
+
discountAmount: z.number().int(),
|
|
569
|
+
netAmount: z.number().int(),
|
|
498
570
|
amount: z.number().int(),
|
|
499
571
|
taxAmount: z.number().int(),
|
|
572
|
+
totalAmount: z.number().int(),
|
|
500
573
|
refundedAmount: z.number().int(),
|
|
501
574
|
refundedTaxAmount: z.number().int(),
|
|
502
575
|
currency: z.string(),
|
|
@@ -525,12 +598,17 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
525
598
|
]),
|
|
526
599
|
),
|
|
527
600
|
subscription: z.nullable(OrderSubscription$outboundSchema),
|
|
601
|
+
items: z.array(OrderItemSchema$outboundSchema),
|
|
528
602
|
}).transform((v) => {
|
|
529
603
|
return remap$(v, {
|
|
530
604
|
createdAt: "created_at",
|
|
531
605
|
modifiedAt: "modified_at",
|
|
532
606
|
customFieldData: "custom_field_data",
|
|
607
|
+
subtotalAmount: "subtotal_amount",
|
|
608
|
+
discountAmount: "discount_amount",
|
|
609
|
+
netAmount: "net_amount",
|
|
533
610
|
taxAmount: "tax_amount",
|
|
611
|
+
totalAmount: "total_amount",
|
|
534
612
|
refundedAmount: "refunded_amount",
|
|
535
613
|
refundedTaxAmount: "refunded_tax_amount",
|
|
536
614
|
billingReason: "billing_reason",
|
|
@@ -59,6 +59,10 @@ export type OrderCustomer = {
|
|
|
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
|
|
|
@@ -179,6 +183,9 @@ export const OrderCustomer$inboundSchema: z.ZodType<
|
|
|
179
183
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$inboundSchema]))),
|
|
180
184
|
),
|
|
181
185
|
organization_id: z.string(),
|
|
186
|
+
deleted_at: z.nullable(
|
|
187
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
188
|
+
),
|
|
182
189
|
avatar_url: z.string(),
|
|
183
190
|
}).transform((v) => {
|
|
184
191
|
return remap$(v, {
|
|
@@ -189,6 +196,7 @@ export const OrderCustomer$inboundSchema: z.ZodType<
|
|
|
189
196
|
"billing_address": "billingAddress",
|
|
190
197
|
"tax_id": "taxId",
|
|
191
198
|
"organization_id": "organizationId",
|
|
199
|
+
"deleted_at": "deletedAt",
|
|
192
200
|
"avatar_url": "avatarUrl",
|
|
193
201
|
});
|
|
194
202
|
});
|
|
@@ -206,6 +214,7 @@ export type OrderCustomer$Outbound = {
|
|
|
206
214
|
billing_address: Address$Outbound | null;
|
|
207
215
|
tax_id: Array<string | string | null> | null;
|
|
208
216
|
organization_id: string;
|
|
217
|
+
deleted_at: string | null;
|
|
209
218
|
avatar_url: string;
|
|
210
219
|
};
|
|
211
220
|
|
|
@@ -228,6 +237,7 @@ export const OrderCustomer$outboundSchema: z.ZodType<
|
|
|
228
237
|
z.array(z.nullable(z.union([z.string(), TaxIDFormat$outboundSchema]))),
|
|
229
238
|
),
|
|
230
239
|
organizationId: z.string(),
|
|
240
|
+
deletedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
231
241
|
avatarUrl: z.string(),
|
|
232
242
|
}).transform((v) => {
|
|
233
243
|
return remap$(v, {
|
|
@@ -238,6 +248,7 @@ export const OrderCustomer$outboundSchema: z.ZodType<
|
|
|
238
248
|
billingAddress: "billing_address",
|
|
239
249
|
taxId: "tax_id",
|
|
240
250
|
organizationId: "organization_id",
|
|
251
|
+
deletedAt: "deleted_at",
|
|
241
252
|
avatarUrl: "avatar_url",
|
|
242
253
|
});
|
|
243
254
|
});
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* An order line item.
|
|
13
|
+
*/
|
|
14
|
+
export type OrderItemSchema = {
|
|
15
|
+
/**
|
|
16
|
+
* Creation timestamp of the object.
|
|
17
|
+
*/
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
/**
|
|
20
|
+
* Last modification timestamp of the object.
|
|
21
|
+
*/
|
|
22
|
+
modifiedAt: Date | null;
|
|
23
|
+
/**
|
|
24
|
+
* The ID of the object.
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* Description of the line item charge.
|
|
29
|
+
*/
|
|
30
|
+
label: string;
|
|
31
|
+
/**
|
|
32
|
+
* Amount in cents, before discounts and taxes.
|
|
33
|
+
*/
|
|
34
|
+
amount: number;
|
|
35
|
+
/**
|
|
36
|
+
* Sales tax amount in cents.
|
|
37
|
+
*/
|
|
38
|
+
taxAmount: number;
|
|
39
|
+
/**
|
|
40
|
+
* Whether this charge is due to a proration.
|
|
41
|
+
*/
|
|
42
|
+
proration: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Associated price ID, if any.
|
|
45
|
+
*/
|
|
46
|
+
productPriceId: string | null;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const OrderItemSchema$inboundSchema: z.ZodType<
|
|
51
|
+
OrderItemSchema,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
56
|
+
modified_at: z.nullable(
|
|
57
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
58
|
+
),
|
|
59
|
+
id: z.string(),
|
|
60
|
+
label: z.string(),
|
|
61
|
+
amount: z.number().int(),
|
|
62
|
+
tax_amount: z.number().int(),
|
|
63
|
+
proration: z.boolean(),
|
|
64
|
+
product_price_id: z.nullable(z.string()),
|
|
65
|
+
}).transform((v) => {
|
|
66
|
+
return remap$(v, {
|
|
67
|
+
"created_at": "createdAt",
|
|
68
|
+
"modified_at": "modifiedAt",
|
|
69
|
+
"tax_amount": "taxAmount",
|
|
70
|
+
"product_price_id": "productPriceId",
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export type OrderItemSchema$Outbound = {
|
|
76
|
+
created_at: string;
|
|
77
|
+
modified_at: string | null;
|
|
78
|
+
id: string;
|
|
79
|
+
label: string;
|
|
80
|
+
amount: number;
|
|
81
|
+
tax_amount: number;
|
|
82
|
+
proration: boolean;
|
|
83
|
+
product_price_id: string | null;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const OrderItemSchema$outboundSchema: z.ZodType<
|
|
88
|
+
OrderItemSchema$Outbound,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
OrderItemSchema
|
|
91
|
+
> = z.object({
|
|
92
|
+
createdAt: z.date().transform(v => v.toISOString()),
|
|
93
|
+
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
94
|
+
id: z.string(),
|
|
95
|
+
label: z.string(),
|
|
96
|
+
amount: z.number().int(),
|
|
97
|
+
taxAmount: z.number().int(),
|
|
98
|
+
proration: z.boolean(),
|
|
99
|
+
productPriceId: z.nullable(z.string()),
|
|
100
|
+
}).transform((v) => {
|
|
101
|
+
return remap$(v, {
|
|
102
|
+
createdAt: "created_at",
|
|
103
|
+
modifiedAt: "modified_at",
|
|
104
|
+
taxAmount: "tax_amount",
|
|
105
|
+
productPriceId: "product_price_id",
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @internal
|
|
111
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
112
|
+
*/
|
|
113
|
+
export namespace OrderItemSchema$ {
|
|
114
|
+
/** @deprecated use `OrderItemSchema$inboundSchema` instead. */
|
|
115
|
+
export const inboundSchema = OrderItemSchema$inboundSchema;
|
|
116
|
+
/** @deprecated use `OrderItemSchema$outboundSchema` instead. */
|
|
117
|
+
export const outboundSchema = OrderItemSchema$outboundSchema;
|
|
118
|
+
/** @deprecated use `OrderItemSchema$Outbound` instead. */
|
|
119
|
+
export type Outbound = OrderItemSchema$Outbound;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function orderItemSchemaToJSON(
|
|
123
|
+
orderItemSchema: OrderItemSchema,
|
|
124
|
+
): string {
|
|
125
|
+
return JSON.stringify(OrderItemSchema$outboundSchema.parse(orderItemSchema));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function orderItemSchemaFromJSON(
|
|
129
|
+
jsonString: string,
|
|
130
|
+
): SafeParseResult<OrderItemSchema, SDKValidationError> {
|
|
131
|
+
return safeParse(
|
|
132
|
+
jsonString,
|
|
133
|
+
(x) => OrderItemSchema$inboundSchema.parse(JSON.parse(x)),
|
|
134
|
+
`Failed to parse 'OrderItemSchema' from JSON`,
|
|
135
|
+
);
|
|
136
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const OrderStatus = {
|
|
9
|
+
Pending: "pending",
|
|
10
|
+
Paid: "paid",
|
|
11
|
+
Refunded: "refunded",
|
|
12
|
+
PartiallyRefunded: "partially_refunded",
|
|
13
|
+
} as const;
|
|
14
|
+
export type OrderStatus = ClosedEnum<typeof OrderStatus>;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const OrderStatus$inboundSchema: z.ZodNativeEnum<typeof OrderStatus> = z
|
|
18
|
+
.nativeEnum(OrderStatus);
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const OrderStatus$outboundSchema: z.ZodNativeEnum<typeof OrderStatus> =
|
|
22
|
+
OrderStatus$inboundSchema;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
27
|
+
*/
|
|
28
|
+
export namespace OrderStatus$ {
|
|
29
|
+
/** @deprecated use `OrderStatus$inboundSchema` instead. */
|
|
30
|
+
export const inboundSchema = OrderStatus$inboundSchema;
|
|
31
|
+
/** @deprecated use `OrderStatus$outboundSchema` instead. */
|
|
32
|
+
export const outboundSchema = OrderStatus$outboundSchema;
|
|
33
|
+
}
|
|
@@ -42,11 +42,11 @@ export type OrderSubscription = {
|
|
|
42
42
|
/**
|
|
43
43
|
* The amount of the subscription.
|
|
44
44
|
*/
|
|
45
|
-
amount: number
|
|
45
|
+
amount: number;
|
|
46
46
|
/**
|
|
47
47
|
* The currency of the subscription.
|
|
48
48
|
*/
|
|
49
|
-
currency: string
|
|
49
|
+
currency: string;
|
|
50
50
|
recurringInterval: SubscriptionRecurringInterval;
|
|
51
51
|
status: SubscriptionStatus;
|
|
52
52
|
/**
|
|
@@ -85,10 +85,6 @@ export type OrderSubscription = {
|
|
|
85
85
|
* The ID of the subscribed product.
|
|
86
86
|
*/
|
|
87
87
|
productId: string;
|
|
88
|
-
/**
|
|
89
|
-
* The ID of the subscribed price.
|
|
90
|
-
*/
|
|
91
|
-
priceId: string;
|
|
92
88
|
/**
|
|
93
89
|
* The ID of the applied discount, if any.
|
|
94
90
|
*/
|
|
@@ -96,6 +92,10 @@ export type OrderSubscription = {
|
|
|
96
92
|
checkoutId: string | null;
|
|
97
93
|
customerCancellationReason: CustomerCancellationReason | null;
|
|
98
94
|
customerCancellationComment: string | null;
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
97
|
+
*/
|
|
98
|
+
priceId: string;
|
|
99
99
|
/**
|
|
100
100
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
101
101
|
*/
|
|
@@ -162,8 +162,8 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
162
162
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
163
163
|
),
|
|
164
164
|
id: z.string(),
|
|
165
|
-
amount: z.
|
|
166
|
-
currency: z.
|
|
165
|
+
amount: z.number().int(),
|
|
166
|
+
currency: z.string(),
|
|
167
167
|
recurring_interval: SubscriptionRecurringInterval$inboundSchema,
|
|
168
168
|
status: SubscriptionStatus$inboundSchema,
|
|
169
169
|
current_period_start: z.string().datetime({ offset: true }).transform(v =>
|
|
@@ -187,13 +187,13 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
187
187
|
),
|
|
188
188
|
customer_id: z.string(),
|
|
189
189
|
product_id: z.string(),
|
|
190
|
-
price_id: z.string(),
|
|
191
190
|
discount_id: z.nullable(z.string()),
|
|
192
191
|
checkout_id: z.nullable(z.string()),
|
|
193
192
|
customer_cancellation_reason: z.nullable(
|
|
194
193
|
CustomerCancellationReason$inboundSchema,
|
|
195
194
|
),
|
|
196
195
|
customer_cancellation_comment: z.nullable(z.string()),
|
|
196
|
+
price_id: z.string(),
|
|
197
197
|
user_id: z.string(),
|
|
198
198
|
}).transform((v) => {
|
|
199
199
|
return remap$(v, {
|
|
@@ -209,11 +209,11 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
209
209
|
"ended_at": "endedAt",
|
|
210
210
|
"customer_id": "customerId",
|
|
211
211
|
"product_id": "productId",
|
|
212
|
-
"price_id": "priceId",
|
|
213
212
|
"discount_id": "discountId",
|
|
214
213
|
"checkout_id": "checkoutId",
|
|
215
214
|
"customer_cancellation_reason": "customerCancellationReason",
|
|
216
215
|
"customer_cancellation_comment": "customerCancellationComment",
|
|
216
|
+
"price_id": "priceId",
|
|
217
217
|
"user_id": "userId",
|
|
218
218
|
});
|
|
219
219
|
});
|
|
@@ -224,8 +224,8 @@ export type OrderSubscription$Outbound = {
|
|
|
224
224
|
created_at: string;
|
|
225
225
|
modified_at: string | null;
|
|
226
226
|
id: string;
|
|
227
|
-
amount: number
|
|
228
|
-
currency: string
|
|
227
|
+
amount: number;
|
|
228
|
+
currency: string;
|
|
229
229
|
recurring_interval: string;
|
|
230
230
|
status: string;
|
|
231
231
|
current_period_start: string;
|
|
@@ -237,11 +237,11 @@ export type OrderSubscription$Outbound = {
|
|
|
237
237
|
ended_at: string | null;
|
|
238
238
|
customer_id: string;
|
|
239
239
|
product_id: string;
|
|
240
|
-
price_id: string;
|
|
241
240
|
discount_id: string | null;
|
|
242
241
|
checkout_id: string | null;
|
|
243
242
|
customer_cancellation_reason: string | null;
|
|
244
243
|
customer_cancellation_comment: string | null;
|
|
244
|
+
price_id: string;
|
|
245
245
|
user_id: string;
|
|
246
246
|
};
|
|
247
247
|
|
|
@@ -255,8 +255,8 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
255
255
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
256
256
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
257
257
|
id: z.string(),
|
|
258
|
-
amount: z.
|
|
259
|
-
currency: z.
|
|
258
|
+
amount: z.number().int(),
|
|
259
|
+
currency: z.string(),
|
|
260
260
|
recurringInterval: SubscriptionRecurringInterval$outboundSchema,
|
|
261
261
|
status: SubscriptionStatus$outboundSchema,
|
|
262
262
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
@@ -268,13 +268,13 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
268
268
|
endedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
269
269
|
customerId: z.string(),
|
|
270
270
|
productId: z.string(),
|
|
271
|
-
priceId: z.string(),
|
|
272
271
|
discountId: z.nullable(z.string()),
|
|
273
272
|
checkoutId: z.nullable(z.string()),
|
|
274
273
|
customerCancellationReason: z.nullable(
|
|
275
274
|
CustomerCancellationReason$outboundSchema,
|
|
276
275
|
),
|
|
277
276
|
customerCancellationComment: z.nullable(z.string()),
|
|
277
|
+
priceId: z.string(),
|
|
278
278
|
userId: z.string(),
|
|
279
279
|
}).transform((v) => {
|
|
280
280
|
return remap$(v, {
|
|
@@ -290,11 +290,11 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
290
290
|
endedAt: "ended_at",
|
|
291
291
|
customerId: "customer_id",
|
|
292
292
|
productId: "product_id",
|
|
293
|
-
priceId: "price_id",
|
|
294
293
|
discountId: "discount_id",
|
|
295
294
|
checkoutId: "checkout_id",
|
|
296
295
|
customerCancellationReason: "customer_cancellation_reason",
|
|
297
296
|
customerCancellationComment: "customer_cancellation_comment",
|
|
297
|
+
priceId: "price_id",
|
|
298
298
|
userId: "user_id",
|
|
299
299
|
});
|
|
300
300
|
});
|