@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
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
|
+
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
7
|
+
import { GetPromptResult } from "@modelcontextprotocol/sdk/types.js";
|
|
8
|
+
import {
|
|
9
|
+
objectOutputType,
|
|
10
|
+
ZodOptional,
|
|
11
|
+
ZodType,
|
|
12
|
+
ZodTypeAny,
|
|
13
|
+
ZodTypeDef,
|
|
14
|
+
} from "zod";
|
|
15
|
+
import { PolarCore } from "../core.js";
|
|
16
|
+
import { ConsoleLogger } from "./console-logger.js";
|
|
17
|
+
import { MCPScope } from "./scopes.js";
|
|
18
|
+
|
|
19
|
+
// '@modelcontextprotocol/sdk' currently does not export this type
|
|
20
|
+
export type PromptArgsRawShape = {
|
|
21
|
+
[k: string]:
|
|
22
|
+
| ZodType<string, ZodTypeDef, string>
|
|
23
|
+
| ZodOptional<ZodType<string, ZodTypeDef, string>>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type PromptDefinition<
|
|
27
|
+
Args extends undefined | PromptArgsRawShape = undefined,
|
|
28
|
+
> = Args extends PromptArgsRawShape ? {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
scopes?: MCPScope[];
|
|
32
|
+
args: Args;
|
|
33
|
+
prompt: (
|
|
34
|
+
client: PolarCore,
|
|
35
|
+
args: objectOutputType<Args, ZodTypeAny>,
|
|
36
|
+
extra: RequestHandlerExtra,
|
|
37
|
+
) => GetPromptResult | Promise<GetPromptResult>;
|
|
38
|
+
}
|
|
39
|
+
: {
|
|
40
|
+
name: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
scopes?: MCPScope[];
|
|
43
|
+
args?: undefined;
|
|
44
|
+
prompt: (
|
|
45
|
+
client: PolarCore,
|
|
46
|
+
extra: RequestHandlerExtra,
|
|
47
|
+
) => GetPromptResult | Promise<GetPromptResult>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Optional function to assist with formatting prompt results
|
|
51
|
+
export async function formatResult(value: string): Promise<GetPromptResult> {
|
|
52
|
+
return {
|
|
53
|
+
messages: [
|
|
54
|
+
{
|
|
55
|
+
role: "user",
|
|
56
|
+
content: {
|
|
57
|
+
type: "text",
|
|
58
|
+
text: value,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function createRegisterPrompt(
|
|
66
|
+
logger: ConsoleLogger,
|
|
67
|
+
server: McpServer,
|
|
68
|
+
sdk: PolarCore,
|
|
69
|
+
allowedScopes: Set<MCPScope>,
|
|
70
|
+
): <A extends PromptArgsRawShape | undefined>(
|
|
71
|
+
prompt: PromptDefinition<A>,
|
|
72
|
+
) => void {
|
|
73
|
+
return <A extends PromptArgsRawShape | undefined>(
|
|
74
|
+
prompt: PromptDefinition<A>,
|
|
75
|
+
): void => {
|
|
76
|
+
const scopes = prompt.scopes ?? [];
|
|
77
|
+
if (!scopes.every((s: MCPScope) => allowedScopes.has(s))) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (prompt.args) {
|
|
82
|
+
if (prompt.description) {
|
|
83
|
+
server.prompt(
|
|
84
|
+
prompt.name,
|
|
85
|
+
prompt.description,
|
|
86
|
+
prompt.args,
|
|
87
|
+
async (args, ctx) => prompt.prompt(sdk, args, ctx),
|
|
88
|
+
);
|
|
89
|
+
} else {
|
|
90
|
+
server.prompt(
|
|
91
|
+
prompt.name,
|
|
92
|
+
prompt.args,
|
|
93
|
+
async (args, ctx) => prompt.prompt(sdk, args, ctx),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
if (prompt.description) {
|
|
98
|
+
server.prompt(
|
|
99
|
+
prompt.name,
|
|
100
|
+
prompt.description,
|
|
101
|
+
async (ctx) => prompt.prompt(sdk, ctx),
|
|
102
|
+
);
|
|
103
|
+
} else {
|
|
104
|
+
server.prompt(prompt.name, async (ctx) => prompt.prompt(sdk, ctx));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
logger.debug("Registered prompt", { name: prompt.name });
|
|
109
|
+
};
|
|
110
|
+
}
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
6
6
|
import { PolarCore } from "../core.js";
|
|
7
7
|
import { SDKOptions } from "../lib/config.js";
|
|
8
8
|
import type { ConsoleLogger } from "./console-logger.js";
|
|
9
|
+
import { createRegisterPrompt } from "./prompts.js";
|
|
9
10
|
import {
|
|
10
11
|
createRegisterResource,
|
|
11
12
|
createRegisterResourceTemplate,
|
|
@@ -48,7 +49,7 @@ export function createMCPServer(deps: {
|
|
|
48
49
|
}) {
|
|
49
50
|
const server = new McpServer({
|
|
50
51
|
name: "Polar",
|
|
51
|
-
version: "0.
|
|
52
|
+
version: "0.32.0",
|
|
52
53
|
});
|
|
53
54
|
|
|
54
55
|
const client = new PolarCore({
|
|
@@ -74,7 +75,8 @@ export function createMCPServer(deps: {
|
|
|
74
75
|
client,
|
|
75
76
|
scopes,
|
|
76
77
|
);
|
|
77
|
-
const
|
|
78
|
+
const prompt = createRegisterPrompt(deps.logger, server, client, scopes);
|
|
79
|
+
const register = { tool, resource, resourceTemplate, prompt };
|
|
78
80
|
void register; // suppress unused warnings
|
|
79
81
|
|
|
80
82
|
tool(tool$subscriptionsList);
|
|
@@ -11,12 +11,22 @@ const args = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const tool$customersDelete: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "
|
|
14
|
+
name: "customers-delete",
|
|
15
15
|
description: `Delete Customer
|
|
16
16
|
|
|
17
17
|
Delete a customer.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
This action cannot be undone and will immediately:
|
|
20
|
+
- Cancel any active subscriptions for the customer
|
|
21
|
+
- Revoke all their benefits
|
|
22
|
+
- Clear any \`external_id\`
|
|
23
|
+
|
|
24
|
+
Use it only in the context of deleting a user within your
|
|
25
|
+
own service. Otherwise, use more granular API endpoints to cancel
|
|
26
|
+
a specific subscription or revoke certain benefits.
|
|
27
|
+
|
|
28
|
+
Note: The customers information will nonetheless be retained for historic
|
|
29
|
+
orders and subscriptions.
|
|
20
30
|
|
|
21
31
|
**Scopes**: \`customers:write\``,
|
|
22
32
|
scopes: ["write", "customers"],
|
|
@@ -11,7 +11,7 @@ const args = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const tool$customersDeleteExternal: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "
|
|
14
|
+
name: "customers-delete-external",
|
|
15
15
|
description: `Delete Customer by External ID
|
|
16
16
|
|
|
17
17
|
Delete a customer by external ID.
|
|
@@ -11,7 +11,7 @@ const args = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const tool$customersGetStateExternal: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "
|
|
14
|
+
name: "customers-get-state-external",
|
|
15
15
|
description: `Get Customer State by External ID
|
|
16
16
|
|
|
17
17
|
Get a customer state by external ID.
|
|
@@ -11,7 +11,7 @@ const args = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const tool$customersUpdateExternal: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "
|
|
14
|
+
name: "customers-update-external",
|
|
15
15
|
description: `Update Customer by External ID
|
|
16
16
|
|
|
17
17
|
Update a customer by external ID.
|
|
@@ -6,7 +6,7 @@ import { metricsLimits } from "../../funcs/metricsLimits.js";
|
|
|
6
6
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
7
|
|
|
8
8
|
export const tool$metricsLimits: ToolDefinition = {
|
|
9
|
-
name: "
|
|
9
|
+
name: "metrics-limits",
|
|
10
10
|
description: `Get Metrics Limits
|
|
11
11
|
|
|
12
12
|
Get the interval limits for the metrics endpoint.
|
package/src/mcp-server/tools.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type ToolDefinition<Args extends undefined | ZodRawShape = undefined> =
|
|
|
34
34
|
) => CallToolResult | Promise<CallToolResult>;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
// Optional function to assist with formatting tool results
|
|
37
38
|
export async function formatResult(
|
|
38
39
|
value: unknown,
|
|
39
40
|
init: { response?: Response | undefined },
|
|
@@ -102,6 +103,10 @@ export function createRegisterTool(
|
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
const toolScopes = tool.scopes ?? [];
|
|
106
|
+
if (allowedScopes.size > 0 && toolScopes.length === 0) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
105
110
|
if (!toolScopes.every((s) => allowedScopes.has(s))) {
|
|
106
111
|
return;
|
|
107
112
|
}
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
15
|
+
export const BenefitGitHubRepositoryCreatePropertiesPermission = {
|
|
16
16
|
Pull: "pull",
|
|
17
17
|
Triage: "triage",
|
|
18
18
|
Push: "push",
|
|
@@ -22,7 +22,9 @@ export const Permission = {
|
|
|
22
22
|
/**
|
|
23
23
|
* The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
|
|
24
24
|
*/
|
|
25
|
-
export type
|
|
25
|
+
export type BenefitGitHubRepositoryCreatePropertiesPermission = ClosedEnum<
|
|
26
|
+
typeof BenefitGitHubRepositoryCreatePropertiesPermission
|
|
27
|
+
>;
|
|
26
28
|
|
|
27
29
|
/**
|
|
28
30
|
* Properties to create a benefit of type `github_repository`.
|
|
@@ -39,26 +41,30 @@ export type BenefitGitHubRepositoryCreateProperties = {
|
|
|
39
41
|
/**
|
|
40
42
|
* The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
|
|
41
43
|
*/
|
|
42
|
-
permission:
|
|
44
|
+
permission: BenefitGitHubRepositoryCreatePropertiesPermission;
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
/** @internal */
|
|
46
|
-
export const
|
|
47
|
-
.
|
|
48
|
+
export const BenefitGitHubRepositoryCreatePropertiesPermission$inboundSchema:
|
|
49
|
+
z.ZodNativeEnum<typeof BenefitGitHubRepositoryCreatePropertiesPermission> = z
|
|
50
|
+
.nativeEnum(BenefitGitHubRepositoryCreatePropertiesPermission);
|
|
48
51
|
|
|
49
52
|
/** @internal */
|
|
50
|
-
export const
|
|
51
|
-
|
|
53
|
+
export const BenefitGitHubRepositoryCreatePropertiesPermission$outboundSchema:
|
|
54
|
+
z.ZodNativeEnum<typeof BenefitGitHubRepositoryCreatePropertiesPermission> =
|
|
55
|
+
BenefitGitHubRepositoryCreatePropertiesPermission$inboundSchema;
|
|
52
56
|
|
|
53
57
|
/**
|
|
54
58
|
* @internal
|
|
55
59
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
60
|
*/
|
|
57
|
-
export namespace
|
|
58
|
-
/** @deprecated use `
|
|
59
|
-
export const inboundSchema =
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
export namespace BenefitGitHubRepositoryCreatePropertiesPermission$ {
|
|
62
|
+
/** @deprecated use `BenefitGitHubRepositoryCreatePropertiesPermission$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema =
|
|
64
|
+
BenefitGitHubRepositoryCreatePropertiesPermission$inboundSchema;
|
|
65
|
+
/** @deprecated use `BenefitGitHubRepositoryCreatePropertiesPermission$outboundSchema` instead. */
|
|
66
|
+
export const outboundSchema =
|
|
67
|
+
BenefitGitHubRepositoryCreatePropertiesPermission$outboundSchema;
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
/** @internal */
|
|
@@ -69,7 +75,7 @@ export const BenefitGitHubRepositoryCreateProperties$inboundSchema: z.ZodType<
|
|
|
69
75
|
> = z.object({
|
|
70
76
|
repository_owner: z.string(),
|
|
71
77
|
repository_name: z.string(),
|
|
72
|
-
permission:
|
|
78
|
+
permission: BenefitGitHubRepositoryCreatePropertiesPermission$inboundSchema,
|
|
73
79
|
}).transform((v) => {
|
|
74
80
|
return remap$(v, {
|
|
75
81
|
"repository_owner": "repositoryOwner",
|
|
@@ -92,7 +98,7 @@ export const BenefitGitHubRepositoryCreateProperties$outboundSchema: z.ZodType<
|
|
|
92
98
|
> = z.object({
|
|
93
99
|
repositoryOwner: z.string(),
|
|
94
100
|
repositoryName: z.string(),
|
|
95
|
-
permission:
|
|
101
|
+
permission: BenefitGitHubRepositoryCreatePropertiesPermission$outboundSchema,
|
|
96
102
|
}).transform((v) => {
|
|
97
103
|
return remap$(v, {
|
|
98
104
|
repositoryOwner: "repository_owner",
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
15
|
+
export const Permission = {
|
|
16
16
|
Pull: "pull",
|
|
17
17
|
Triage: "triage",
|
|
18
18
|
Push: "push",
|
|
@@ -22,9 +22,7 @@ export const BenefitGitHubRepositoryPropertiesPermission = {
|
|
|
22
22
|
/**
|
|
23
23
|
* The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
|
|
24
24
|
*/
|
|
25
|
-
export type
|
|
26
|
-
typeof BenefitGitHubRepositoryPropertiesPermission
|
|
27
|
-
>;
|
|
25
|
+
export type Permission = ClosedEnum<typeof Permission>;
|
|
28
26
|
|
|
29
27
|
/**
|
|
30
28
|
* Properties for a benefit of type `github_repository`.
|
|
@@ -41,7 +39,7 @@ export type BenefitGitHubRepositoryProperties = {
|
|
|
41
39
|
/**
|
|
42
40
|
* The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
|
|
43
41
|
*/
|
|
44
|
-
permission:
|
|
42
|
+
permission: Permission;
|
|
45
43
|
/**
|
|
46
44
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
47
45
|
*/
|
|
@@ -49,26 +47,22 @@ export type BenefitGitHubRepositoryProperties = {
|
|
|
49
47
|
};
|
|
50
48
|
|
|
51
49
|
/** @internal */
|
|
52
|
-
export const
|
|
53
|
-
|
|
54
|
-
.nativeEnum(BenefitGitHubRepositoryPropertiesPermission);
|
|
50
|
+
export const Permission$inboundSchema: z.ZodNativeEnum<typeof Permission> = z
|
|
51
|
+
.nativeEnum(Permission);
|
|
55
52
|
|
|
56
53
|
/** @internal */
|
|
57
|
-
export const
|
|
58
|
-
|
|
59
|
-
BenefitGitHubRepositoryPropertiesPermission$inboundSchema;
|
|
54
|
+
export const Permission$outboundSchema: z.ZodNativeEnum<typeof Permission> =
|
|
55
|
+
Permission$inboundSchema;
|
|
60
56
|
|
|
61
57
|
/**
|
|
62
58
|
* @internal
|
|
63
59
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
64
60
|
*/
|
|
65
|
-
export namespace
|
|
66
|
-
/** @deprecated use `
|
|
67
|
-
export const inboundSchema =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
export const outboundSchema =
|
|
71
|
-
BenefitGitHubRepositoryPropertiesPermission$outboundSchema;
|
|
61
|
+
export namespace Permission$ {
|
|
62
|
+
/** @deprecated use `Permission$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema = Permission$inboundSchema;
|
|
64
|
+
/** @deprecated use `Permission$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema = Permission$outboundSchema;
|
|
72
66
|
}
|
|
73
67
|
|
|
74
68
|
/** @internal */
|
|
@@ -79,7 +73,7 @@ export const BenefitGitHubRepositoryProperties$inboundSchema: z.ZodType<
|
|
|
79
73
|
> = z.object({
|
|
80
74
|
repository_owner: z.string(),
|
|
81
75
|
repository_name: z.string(),
|
|
82
|
-
permission:
|
|
76
|
+
permission: Permission$inboundSchema,
|
|
83
77
|
repository_id: z.nullable(z.string()).optional(),
|
|
84
78
|
}).transform((v) => {
|
|
85
79
|
return remap$(v, {
|
|
@@ -105,7 +99,7 @@ export const BenefitGitHubRepositoryProperties$outboundSchema: z.ZodType<
|
|
|
105
99
|
> = z.object({
|
|
106
100
|
repositoryOwner: z.string(),
|
|
107
101
|
repositoryName: z.string(),
|
|
108
|
-
permission:
|
|
102
|
+
permission: Permission$outboundSchema,
|
|
109
103
|
repositoryId: z.nullable(z.string()).optional(),
|
|
110
104
|
}).transform((v) => {
|
|
111
105
|
return remap$(v, {
|