@meetkai/mka1 0.54.62 → 0.54.64
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 +325 -304
- package/bin/mcp-server.js +4828 -3578
- package/bin/mcp-server.js.map +28 -10
- package/dist/commonjs/funcs/billingCreateOrganizationBillingPortal.d.ts +14 -0
- package/dist/commonjs/funcs/billingCreateOrganizationBillingPortal.d.ts.map +1 -0
- package/dist/commonjs/funcs/billingCreateOrganizationBillingPortal.js +113 -0
- package/dist/commonjs/funcs/billingCreateOrganizationBillingPortal.js.map +1 -0
- package/dist/commonjs/funcs/billingCreateOrganizationBillingSetup.d.ts +14 -0
- package/dist/commonjs/funcs/billingCreateOrganizationBillingSetup.d.ts.map +1 -0
- package/dist/commonjs/funcs/billingCreateOrganizationBillingSetup.js +113 -0
- package/dist/commonjs/funcs/billingCreateOrganizationBillingSetup.js.map +1 -0
- package/dist/commonjs/funcs/billingGetOrganizationBilling.d.ts +14 -0
- package/dist/commonjs/funcs/billingGetOrganizationBilling.d.ts.map +1 -0
- package/dist/commonjs/funcs/billingGetOrganizationBilling.js +125 -0
- package/dist/commonjs/funcs/billingGetOrganizationBilling.js.map +1 -0
- package/dist/commonjs/funcs/billingListOrganizationBillingInvoices.d.ts +14 -0
- package/dist/commonjs/funcs/billingListOrganizationBillingInvoices.d.ts.map +1 -0
- package/dist/commonjs/funcs/billingListOrganizationBillingInvoices.js +125 -0
- package/dist/commonjs/funcs/billingListOrganizationBillingInvoices.js.map +1 -0
- package/dist/commonjs/funcs/billingSetOrganizationBillingEnabled.d.ts +14 -0
- package/dist/commonjs/funcs/billingSetOrganizationBillingEnabled.d.ts.map +1 -0
- package/dist/commonjs/funcs/billingSetOrganizationBillingEnabled.js +126 -0
- package/dist/commonjs/funcs/billingSetOrganizationBillingEnabled.js.map +1 -0
- package/dist/commonjs/funcs/billingUpdateOrganizationBillingProfile.d.ts +14 -0
- package/dist/commonjs/funcs/billingUpdateOrganizationBillingProfile.d.ts.map +1 -0
- package/dist/commonjs/funcs/billingUpdateOrganizationBillingProfile.js +123 -0
- package/dist/commonjs/funcs/billingUpdateOrganizationBillingProfile.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +13 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingPortal.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingPortal.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingPortal.js +62 -0
- package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingPortal.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingSetup.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingSetup.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingSetup.js +62 -0
- package/dist/commonjs/mcp-server/tools/billingCreateOrganizationBillingSetup.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingGetOrganizationBilling.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/billingGetOrganizationBilling.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingGetOrganizationBilling.js +62 -0
- package/dist/commonjs/mcp-server/tools/billingGetOrganizationBilling.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingListOrganizationBillingInvoices.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/billingListOrganizationBillingInvoices.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingListOrganizationBillingInvoices.js +62 -0
- package/dist/commonjs/mcp-server/tools/billingListOrganizationBillingInvoices.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingSetOrganizationBillingEnabled.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/billingSetOrganizationBillingEnabled.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingSetOrganizationBillingEnabled.js +62 -0
- package/dist/commonjs/mcp-server/tools/billingSetOrganizationBillingEnabled.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingUpdateOrganizationBillingProfile.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/billingUpdateOrganizationBillingProfile.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/billingUpdateOrganizationBillingProfile.js +62 -0
- package/dist/commonjs/mcp-server/tools/billingUpdateOrganizationBillingProfile.js.map +1 -0
- package/dist/commonjs/models/components/computescalinginput.d.ts +5 -2
- package/dist/commonjs/models/components/computescalinginput.d.ts.map +1 -1
- package/dist/commonjs/models/components/computescalinginput.js +2 -2
- package/dist/commonjs/models/components/computescalinginput.js.map +1 -1
- package/dist/commonjs/models/operations/createorganizationbillingportal.d.ts +29 -0
- package/dist/commonjs/models/operations/createorganizationbillingportal.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createorganizationbillingportal.js +70 -0
- package/dist/commonjs/models/operations/createorganizationbillingportal.js.map +1 -0
- package/dist/commonjs/models/operations/createorganizationbillingsetup.d.ts +29 -0
- package/dist/commonjs/models/operations/createorganizationbillingsetup.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createorganizationbillingsetup.js +70 -0
- package/dist/commonjs/models/operations/createorganizationbillingsetup.js.map +1 -0
- package/dist/commonjs/models/operations/getmodel.d.ts +5 -0
- package/dist/commonjs/models/operations/getmodel.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodel.js +4 -0
- package/dist/commonjs/models/operations/getmodel.js.map +1 -1
- package/dist/commonjs/models/operations/getorganizationbilling.d.ts +136 -0
- package/dist/commonjs/models/operations/getorganizationbilling.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorganizationbilling.js +239 -0
- package/dist/commonjs/models/operations/getorganizationbilling.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +6 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +6 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listmodels.d.ts +5 -0
- package/dist/commonjs/models/operations/listmodels.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listmodels.js +4 -0
- package/dist/commonjs/models/operations/listmodels.js.map +1 -1
- package/dist/commonjs/models/operations/listorganizationbillinginvoices.d.ts +62 -0
- package/dist/commonjs/models/operations/listorganizationbillinginvoices.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listorganizationbillinginvoices.js +133 -0
- package/dist/commonjs/models/operations/listorganizationbillinginvoices.js.map +1 -0
- package/dist/commonjs/models/operations/setorganizationbillingenabled.d.ts +153 -0
- package/dist/commonjs/models/operations/setorganizationbillingenabled.d.ts.map +1 -0
- package/dist/commonjs/models/operations/setorganizationbillingenabled.js +261 -0
- package/dist/commonjs/models/operations/setorganizationbillingenabled.js.map +1 -0
- package/dist/commonjs/models/operations/updateorganizationbillingprofile.d.ts +163 -0
- package/dist/commonjs/models/operations/updateorganizationbillingprofile.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updateorganizationbillingprofile.js +279 -0
- package/dist/commonjs/models/operations/updateorganizationbillingprofile.js.map +1 -0
- package/dist/commonjs/react-query/billingCreateOrganizationBillingPortal.d.ts +22 -0
- package/dist/commonjs/react-query/billingCreateOrganizationBillingPortal.d.ts.map +1 -0
- package/dist/commonjs/react-query/billingCreateOrganizationBillingPortal.js +41 -0
- package/dist/commonjs/react-query/billingCreateOrganizationBillingPortal.js.map +1 -0
- package/dist/commonjs/react-query/billingCreateOrganizationBillingSetup.d.ts +22 -0
- package/dist/commonjs/react-query/billingCreateOrganizationBillingSetup.d.ts.map +1 -0
- package/dist/commonjs/react-query/billingCreateOrganizationBillingSetup.js +41 -0
- package/dist/commonjs/react-query/billingCreateOrganizationBillingSetup.js.map +1 -0
- package/dist/commonjs/react-query/billingGetOrganizationBilling.core.d.ts +14 -0
- package/dist/commonjs/react-query/billingGetOrganizationBilling.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/billingGetOrganizationBilling.core.js +34 -0
- package/dist/commonjs/react-query/billingGetOrganizationBilling.core.js.map +1 -0
- package/dist/commonjs/react-query/billingGetOrganizationBilling.d.ts +20 -0
- package/dist/commonjs/react-query/billingGetOrganizationBilling.d.ts.map +1 -0
- package/dist/commonjs/react-query/billingGetOrganizationBilling.js +53 -0
- package/dist/commonjs/react-query/billingGetOrganizationBilling.js.map +1 -0
- package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.core.d.ts +14 -0
- package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.core.js +41 -0
- package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.core.js.map +1 -0
- package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.d.ts +20 -0
- package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.d.ts.map +1 -0
- package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.js +53 -0
- package/dist/commonjs/react-query/billingListOrganizationBillingInvoices.js.map +1 -0
- package/dist/commonjs/react-query/billingSetOrganizationBillingEnabled.d.ts +22 -0
- package/dist/commonjs/react-query/billingSetOrganizationBillingEnabled.d.ts.map +1 -0
- package/dist/commonjs/react-query/billingSetOrganizationBillingEnabled.js +41 -0
- package/dist/commonjs/react-query/billingSetOrganizationBillingEnabled.js.map +1 -0
- package/dist/commonjs/react-query/billingUpdateOrganizationBillingProfile.d.ts +22 -0
- package/dist/commonjs/react-query/billingUpdateOrganizationBillingProfile.d.ts.map +1 -0
- package/dist/commonjs/react-query/billingUpdateOrganizationBillingProfile.js +41 -0
- package/dist/commonjs/react-query/billingUpdateOrganizationBillingProfile.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +6 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +6 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/sdk/billing.d.ts +11 -0
- package/dist/commonjs/sdk/billing.d.ts.map +1 -0
- package/dist/commonjs/sdk/billing.js +36 -0
- package/dist/commonjs/sdk/billing.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/billingCreateOrganizationBillingPortal.d.ts +14 -0
- package/dist/esm/funcs/billingCreateOrganizationBillingPortal.d.ts.map +1 -0
- package/dist/esm/funcs/billingCreateOrganizationBillingPortal.js +77 -0
- package/dist/esm/funcs/billingCreateOrganizationBillingPortal.js.map +1 -0
- package/dist/esm/funcs/billingCreateOrganizationBillingSetup.d.ts +14 -0
- package/dist/esm/funcs/billingCreateOrganizationBillingSetup.d.ts.map +1 -0
- package/dist/esm/funcs/billingCreateOrganizationBillingSetup.js +77 -0
- package/dist/esm/funcs/billingCreateOrganizationBillingSetup.js.map +1 -0
- package/dist/esm/funcs/billingGetOrganizationBilling.d.ts +14 -0
- package/dist/esm/funcs/billingGetOrganizationBilling.d.ts.map +1 -0
- package/dist/esm/funcs/billingGetOrganizationBilling.js +89 -0
- package/dist/esm/funcs/billingGetOrganizationBilling.js.map +1 -0
- package/dist/esm/funcs/billingListOrganizationBillingInvoices.d.ts +14 -0
- package/dist/esm/funcs/billingListOrganizationBillingInvoices.d.ts.map +1 -0
- package/dist/esm/funcs/billingListOrganizationBillingInvoices.js +89 -0
- package/dist/esm/funcs/billingListOrganizationBillingInvoices.js.map +1 -0
- package/dist/esm/funcs/billingSetOrganizationBillingEnabled.d.ts +14 -0
- package/dist/esm/funcs/billingSetOrganizationBillingEnabled.d.ts.map +1 -0
- package/dist/esm/funcs/billingSetOrganizationBillingEnabled.js +90 -0
- package/dist/esm/funcs/billingSetOrganizationBillingEnabled.js.map +1 -0
- package/dist/esm/funcs/billingUpdateOrganizationBillingProfile.d.ts +14 -0
- package/dist/esm/funcs/billingUpdateOrganizationBillingProfile.d.ts.map +1 -0
- package/dist/esm/funcs/billingUpdateOrganizationBillingProfile.js +87 -0
- package/dist/esm/funcs/billingUpdateOrganizationBillingProfile.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +13 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingPortal.d.ts +8 -0
- package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingPortal.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingPortal.js +26 -0
- package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingPortal.js.map +1 -0
- package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingSetup.d.ts +8 -0
- package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingSetup.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingSetup.js +26 -0
- package/dist/esm/mcp-server/tools/billingCreateOrganizationBillingSetup.js.map +1 -0
- package/dist/esm/mcp-server/tools/billingGetOrganizationBilling.d.ts +8 -0
- package/dist/esm/mcp-server/tools/billingGetOrganizationBilling.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/billingGetOrganizationBilling.js +26 -0
- package/dist/esm/mcp-server/tools/billingGetOrganizationBilling.js.map +1 -0
- package/dist/esm/mcp-server/tools/billingListOrganizationBillingInvoices.d.ts +8 -0
- package/dist/esm/mcp-server/tools/billingListOrganizationBillingInvoices.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/billingListOrganizationBillingInvoices.js +26 -0
- package/dist/esm/mcp-server/tools/billingListOrganizationBillingInvoices.js.map +1 -0
- package/dist/esm/mcp-server/tools/billingSetOrganizationBillingEnabled.d.ts +8 -0
- package/dist/esm/mcp-server/tools/billingSetOrganizationBillingEnabled.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/billingSetOrganizationBillingEnabled.js +26 -0
- package/dist/esm/mcp-server/tools/billingSetOrganizationBillingEnabled.js.map +1 -0
- package/dist/esm/mcp-server/tools/billingUpdateOrganizationBillingProfile.d.ts +8 -0
- package/dist/esm/mcp-server/tools/billingUpdateOrganizationBillingProfile.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/billingUpdateOrganizationBillingProfile.js +26 -0
- package/dist/esm/mcp-server/tools/billingUpdateOrganizationBillingProfile.js.map +1 -0
- package/dist/esm/models/components/computescalinginput.d.ts +5 -2
- package/dist/esm/models/components/computescalinginput.d.ts.map +1 -1
- package/dist/esm/models/components/computescalinginput.js +2 -2
- package/dist/esm/models/components/computescalinginput.js.map +1 -1
- package/dist/esm/models/operations/createorganizationbillingportal.d.ts +29 -0
- package/dist/esm/models/operations/createorganizationbillingportal.d.ts.map +1 -0
- package/dist/esm/models/operations/createorganizationbillingportal.js +30 -0
- package/dist/esm/models/operations/createorganizationbillingportal.js.map +1 -0
- package/dist/esm/models/operations/createorganizationbillingsetup.d.ts +29 -0
- package/dist/esm/models/operations/createorganizationbillingsetup.d.ts.map +1 -0
- package/dist/esm/models/operations/createorganizationbillingsetup.js +30 -0
- package/dist/esm/models/operations/createorganizationbillingsetup.js.map +1 -0
- package/dist/esm/models/operations/getmodel.d.ts +5 -0
- package/dist/esm/models/operations/getmodel.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodel.js +4 -0
- package/dist/esm/models/operations/getmodel.js.map +1 -1
- package/dist/esm/models/operations/getorganizationbilling.d.ts +136 -0
- package/dist/esm/models/operations/getorganizationbilling.d.ts.map +1 -0
- package/dist/esm/models/operations/getorganizationbilling.js +193 -0
- package/dist/esm/models/operations/getorganizationbilling.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +6 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +6 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listmodels.d.ts +5 -0
- package/dist/esm/models/operations/listmodels.d.ts.map +1 -1
- package/dist/esm/models/operations/listmodels.js +4 -0
- package/dist/esm/models/operations/listmodels.js.map +1 -1
- package/dist/esm/models/operations/listorganizationbillinginvoices.d.ts +62 -0
- package/dist/esm/models/operations/listorganizationbillinginvoices.d.ts.map +1 -0
- package/dist/esm/models/operations/listorganizationbillinginvoices.js +91 -0
- package/dist/esm/models/operations/listorganizationbillinginvoices.js.map +1 -0
- package/dist/esm/models/operations/setorganizationbillingenabled.d.ts +153 -0
- package/dist/esm/models/operations/setorganizationbillingenabled.d.ts.map +1 -0
- package/dist/esm/models/operations/setorganizationbillingenabled.js +213 -0
- package/dist/esm/models/operations/setorganizationbillingenabled.js.map +1 -0
- package/dist/esm/models/operations/updateorganizationbillingprofile.d.ts +163 -0
- package/dist/esm/models/operations/updateorganizationbillingprofile.d.ts.map +1 -0
- package/dist/esm/models/operations/updateorganizationbillingprofile.js +231 -0
- package/dist/esm/models/operations/updateorganizationbillingprofile.js.map +1 -0
- package/dist/esm/react-query/billingCreateOrganizationBillingPortal.d.ts +22 -0
- package/dist/esm/react-query/billingCreateOrganizationBillingPortal.d.ts.map +1 -0
- package/dist/esm/react-query/billingCreateOrganizationBillingPortal.js +36 -0
- package/dist/esm/react-query/billingCreateOrganizationBillingPortal.js.map +1 -0
- package/dist/esm/react-query/billingCreateOrganizationBillingSetup.d.ts +22 -0
- package/dist/esm/react-query/billingCreateOrganizationBillingSetup.d.ts.map +1 -0
- package/dist/esm/react-query/billingCreateOrganizationBillingSetup.js +36 -0
- package/dist/esm/react-query/billingCreateOrganizationBillingSetup.js.map +1 -0
- package/dist/esm/react-query/billingGetOrganizationBilling.core.d.ts +14 -0
- package/dist/esm/react-query/billingGetOrganizationBilling.core.d.ts.map +1 -0
- package/dist/esm/react-query/billingGetOrganizationBilling.core.js +29 -0
- package/dist/esm/react-query/billingGetOrganizationBilling.core.js.map +1 -0
- package/dist/esm/react-query/billingGetOrganizationBilling.d.ts +20 -0
- package/dist/esm/react-query/billingGetOrganizationBilling.d.ts.map +1 -0
- package/dist/esm/react-query/billingGetOrganizationBilling.js +43 -0
- package/dist/esm/react-query/billingGetOrganizationBilling.js.map +1 -0
- package/dist/esm/react-query/billingListOrganizationBillingInvoices.core.d.ts +14 -0
- package/dist/esm/react-query/billingListOrganizationBillingInvoices.core.d.ts.map +1 -0
- package/dist/esm/react-query/billingListOrganizationBillingInvoices.core.js +36 -0
- package/dist/esm/react-query/billingListOrganizationBillingInvoices.core.js.map +1 -0
- package/dist/esm/react-query/billingListOrganizationBillingInvoices.d.ts +20 -0
- package/dist/esm/react-query/billingListOrganizationBillingInvoices.d.ts.map +1 -0
- package/dist/esm/react-query/billingListOrganizationBillingInvoices.js +43 -0
- package/dist/esm/react-query/billingListOrganizationBillingInvoices.js.map +1 -0
- package/dist/esm/react-query/billingSetOrganizationBillingEnabled.d.ts +22 -0
- package/dist/esm/react-query/billingSetOrganizationBillingEnabled.d.ts.map +1 -0
- package/dist/esm/react-query/billingSetOrganizationBillingEnabled.js +36 -0
- package/dist/esm/react-query/billingSetOrganizationBillingEnabled.js.map +1 -0
- package/dist/esm/react-query/billingUpdateOrganizationBillingProfile.d.ts +22 -0
- package/dist/esm/react-query/billingUpdateOrganizationBillingProfile.d.ts.map +1 -0
- package/dist/esm/react-query/billingUpdateOrganizationBillingProfile.js +36 -0
- package/dist/esm/react-query/billingUpdateOrganizationBillingProfile.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +6 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +6 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/sdk/billing.d.ts +11 -0
- package/dist/esm/sdk/billing.d.ts.map +1 -0
- package/dist/esm/sdk/billing.js +32 -0
- package/dist/esm/sdk/billing.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/billingCreateOrganizationBillingPortal.ts +158 -0
- package/src/funcs/billingCreateOrganizationBillingSetup.ts +158 -0
- package/src/funcs/billingGetOrganizationBilling.ts +174 -0
- package/src/funcs/billingListOrganizationBillingInvoices.ts +179 -0
- package/src/funcs/billingSetOrganizationBillingEnabled.ts +180 -0
- package/src/funcs/billingUpdateOrganizationBillingProfile.ts +174 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +13 -1
- package/src/mcp-server/tools/billingCreateOrganizationBillingPortal.ts +37 -0
- package/src/mcp-server/tools/billingCreateOrganizationBillingSetup.ts +37 -0
- package/src/mcp-server/tools/billingGetOrganizationBilling.ts +35 -0
- package/src/mcp-server/tools/billingListOrganizationBillingInvoices.ts +37 -0
- package/src/mcp-server/tools/billingSetOrganizationBillingEnabled.ts +37 -0
- package/src/mcp-server/tools/billingUpdateOrganizationBillingProfile.ts +37 -0
- package/src/models/components/computescalinginput.ts +7 -4
- package/src/models/operations/createorganizationbillingportal.ts +108 -0
- package/src/models/operations/createorganizationbillingsetup.ts +107 -0
- package/src/models/operations/getmodel.ts +9 -0
- package/src/models/operations/getorganizationbilling.ts +408 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/listmodels.ts +9 -0
- package/src/models/operations/listorganizationbillinginvoices.ts +227 -0
- package/src/models/operations/setorganizationbillingenabled.ts +510 -0
- package/src/models/operations/updateorganizationbillingprofile.ts +543 -0
- package/src/react-query/billingCreateOrganizationBillingPortal.ts +103 -0
- package/src/react-query/billingCreateOrganizationBillingSetup.ts +103 -0
- package/src/react-query/billingGetOrganizationBilling.core.ts +73 -0
- package/src/react-query/billingGetOrganizationBilling.ts +129 -0
- package/src/react-query/billingListOrganizationBillingInvoices.core.ts +80 -0
- package/src/react-query/billingListOrganizationBillingInvoices.ts +132 -0
- package/src/react-query/billingSetOrganizationBillingEnabled.ts +103 -0
- package/src/react-query/billingUpdateOrganizationBillingProfile.ts +103 -0
- package/src/react-query/index.ts +6 -0
- package/src/sdk/billing.ts +81 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
21
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
28
|
+
*/
|
|
29
|
+
export function billingCreateOrganizationBillingPortal(
|
|
30
|
+
client: SDKCore,
|
|
31
|
+
_request: operations.CreateOrganizationBillingPortalRequestBody,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): APIPromise<
|
|
34
|
+
Result<
|
|
35
|
+
operations.CreateOrganizationBillingPortalResponseBody,
|
|
36
|
+
| SDKError
|
|
37
|
+
| ResponseValidationError
|
|
38
|
+
| ConnectionError
|
|
39
|
+
| RequestAbortedError
|
|
40
|
+
| RequestTimeoutError
|
|
41
|
+
| InvalidRequestError
|
|
42
|
+
| UnexpectedClientError
|
|
43
|
+
| SDKValidationError
|
|
44
|
+
>
|
|
45
|
+
> {
|
|
46
|
+
return new APIPromise($do(
|
|
47
|
+
client,
|
|
48
|
+
_request,
|
|
49
|
+
options,
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function $do(
|
|
54
|
+
client: SDKCore,
|
|
55
|
+
_request: operations.CreateOrganizationBillingPortalRequestBody,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<
|
|
58
|
+
[
|
|
59
|
+
Result<
|
|
60
|
+
operations.CreateOrganizationBillingPortalResponseBody,
|
|
61
|
+
| SDKError
|
|
62
|
+
| ResponseValidationError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
| RequestAbortedError
|
|
65
|
+
| RequestTimeoutError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
>,
|
|
70
|
+
APICall,
|
|
71
|
+
]
|
|
72
|
+
> {
|
|
73
|
+
const path = pathToFunc("/api/v1/budgeting/billing/org/portal-session")();
|
|
74
|
+
|
|
75
|
+
const headers = new Headers(compactMap({
|
|
76
|
+
"Content-Type": "application/json",
|
|
77
|
+
Accept: "application/json",
|
|
78
|
+
}));
|
|
79
|
+
|
|
80
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
81
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
82
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
83
|
+
|
|
84
|
+
const context = {
|
|
85
|
+
options: client._options,
|
|
86
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
87
|
+
operationID: "createOrganizationBillingPortal",
|
|
88
|
+
oAuth2Scopes: null,
|
|
89
|
+
|
|
90
|
+
resolvedSecurity: requestSecurity,
|
|
91
|
+
|
|
92
|
+
securitySource: client._options.bearerAuth,
|
|
93
|
+
retryConfig: options?.retries
|
|
94
|
+
|| client._options.retryConfig
|
|
95
|
+
|| {
|
|
96
|
+
strategy: "backoff",
|
|
97
|
+
backoff: {
|
|
98
|
+
initialInterval: 500,
|
|
99
|
+
maxInterval: 5000,
|
|
100
|
+
exponent: 1.5,
|
|
101
|
+
maxElapsedTime: 15000,
|
|
102
|
+
},
|
|
103
|
+
retryConnectionErrors: true,
|
|
104
|
+
}
|
|
105
|
+
|| { strategy: "none" },
|
|
106
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const requestRes = client._createRequest(context, {
|
|
110
|
+
security: requestSecurity,
|
|
111
|
+
method: "POST",
|
|
112
|
+
baseURL: options?.serverURL,
|
|
113
|
+
path: path,
|
|
114
|
+
headers: headers,
|
|
115
|
+
userAgent: client._options.userAgent,
|
|
116
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
117
|
+
}, options);
|
|
118
|
+
if (!requestRes.ok) {
|
|
119
|
+
return [requestRes, { status: "invalid" }];
|
|
120
|
+
}
|
|
121
|
+
const req = requestRes.value;
|
|
122
|
+
|
|
123
|
+
const doResult = await client._do(req, {
|
|
124
|
+
context,
|
|
125
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
126
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
127
|
+
retryConfig: context.retryConfig,
|
|
128
|
+
retryCodes: context.retryCodes,
|
|
129
|
+
});
|
|
130
|
+
if (!doResult.ok) {
|
|
131
|
+
return [doResult, { status: "request-error", request: req }];
|
|
132
|
+
}
|
|
133
|
+
const response = doResult.value;
|
|
134
|
+
|
|
135
|
+
const [result] = await M.match<
|
|
136
|
+
operations.CreateOrganizationBillingPortalResponseBody,
|
|
137
|
+
| SDKError
|
|
138
|
+
| ResponseValidationError
|
|
139
|
+
| ConnectionError
|
|
140
|
+
| RequestAbortedError
|
|
141
|
+
| RequestTimeoutError
|
|
142
|
+
| InvalidRequestError
|
|
143
|
+
| UnexpectedClientError
|
|
144
|
+
| SDKValidationError
|
|
145
|
+
>(
|
|
146
|
+
M.json(
|
|
147
|
+
200,
|
|
148
|
+
operations.CreateOrganizationBillingPortalResponseBody$inboundSchema,
|
|
149
|
+
),
|
|
150
|
+
M.fail("4XX"),
|
|
151
|
+
M.fail("5XX"),
|
|
152
|
+
)(response, req);
|
|
153
|
+
if (!result.ok) {
|
|
154
|
+
return [result, { status: "complete", request: req, response }];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return [result, { status: "complete", request: req, response }];
|
|
158
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
21
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
28
|
+
*/
|
|
29
|
+
export function billingCreateOrganizationBillingSetup(
|
|
30
|
+
client: SDKCore,
|
|
31
|
+
_request: operations.CreateOrganizationBillingSetupRequestBody,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): APIPromise<
|
|
34
|
+
Result<
|
|
35
|
+
operations.CreateOrganizationBillingSetupResponseBody,
|
|
36
|
+
| SDKError
|
|
37
|
+
| ResponseValidationError
|
|
38
|
+
| ConnectionError
|
|
39
|
+
| RequestAbortedError
|
|
40
|
+
| RequestTimeoutError
|
|
41
|
+
| InvalidRequestError
|
|
42
|
+
| UnexpectedClientError
|
|
43
|
+
| SDKValidationError
|
|
44
|
+
>
|
|
45
|
+
> {
|
|
46
|
+
return new APIPromise($do(
|
|
47
|
+
client,
|
|
48
|
+
_request,
|
|
49
|
+
options,
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function $do(
|
|
54
|
+
client: SDKCore,
|
|
55
|
+
_request: operations.CreateOrganizationBillingSetupRequestBody,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<
|
|
58
|
+
[
|
|
59
|
+
Result<
|
|
60
|
+
operations.CreateOrganizationBillingSetupResponseBody,
|
|
61
|
+
| SDKError
|
|
62
|
+
| ResponseValidationError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
| RequestAbortedError
|
|
65
|
+
| RequestTimeoutError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
>,
|
|
70
|
+
APICall,
|
|
71
|
+
]
|
|
72
|
+
> {
|
|
73
|
+
const path = pathToFunc("/api/v1/budgeting/billing/org/setup-session")();
|
|
74
|
+
|
|
75
|
+
const headers = new Headers(compactMap({
|
|
76
|
+
"Content-Type": "application/json",
|
|
77
|
+
Accept: "application/json",
|
|
78
|
+
}));
|
|
79
|
+
|
|
80
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
81
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
82
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
83
|
+
|
|
84
|
+
const context = {
|
|
85
|
+
options: client._options,
|
|
86
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
87
|
+
operationID: "createOrganizationBillingSetup",
|
|
88
|
+
oAuth2Scopes: null,
|
|
89
|
+
|
|
90
|
+
resolvedSecurity: requestSecurity,
|
|
91
|
+
|
|
92
|
+
securitySource: client._options.bearerAuth,
|
|
93
|
+
retryConfig: options?.retries
|
|
94
|
+
|| client._options.retryConfig
|
|
95
|
+
|| {
|
|
96
|
+
strategy: "backoff",
|
|
97
|
+
backoff: {
|
|
98
|
+
initialInterval: 500,
|
|
99
|
+
maxInterval: 5000,
|
|
100
|
+
exponent: 1.5,
|
|
101
|
+
maxElapsedTime: 15000,
|
|
102
|
+
},
|
|
103
|
+
retryConnectionErrors: true,
|
|
104
|
+
}
|
|
105
|
+
|| { strategy: "none" },
|
|
106
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const requestRes = client._createRequest(context, {
|
|
110
|
+
security: requestSecurity,
|
|
111
|
+
method: "POST",
|
|
112
|
+
baseURL: options?.serverURL,
|
|
113
|
+
path: path,
|
|
114
|
+
headers: headers,
|
|
115
|
+
userAgent: client._options.userAgent,
|
|
116
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
117
|
+
}, options);
|
|
118
|
+
if (!requestRes.ok) {
|
|
119
|
+
return [requestRes, { status: "invalid" }];
|
|
120
|
+
}
|
|
121
|
+
const req = requestRes.value;
|
|
122
|
+
|
|
123
|
+
const doResult = await client._do(req, {
|
|
124
|
+
context,
|
|
125
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
126
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
127
|
+
retryConfig: context.retryConfig,
|
|
128
|
+
retryCodes: context.retryCodes,
|
|
129
|
+
});
|
|
130
|
+
if (!doResult.ok) {
|
|
131
|
+
return [doResult, { status: "request-error", request: req }];
|
|
132
|
+
}
|
|
133
|
+
const response = doResult.value;
|
|
134
|
+
|
|
135
|
+
const [result] = await M.match<
|
|
136
|
+
operations.CreateOrganizationBillingSetupResponseBody,
|
|
137
|
+
| SDKError
|
|
138
|
+
| ResponseValidationError
|
|
139
|
+
| ConnectionError
|
|
140
|
+
| RequestAbortedError
|
|
141
|
+
| RequestTimeoutError
|
|
142
|
+
| InvalidRequestError
|
|
143
|
+
| UnexpectedClientError
|
|
144
|
+
| SDKValidationError
|
|
145
|
+
>(
|
|
146
|
+
M.json(
|
|
147
|
+
200,
|
|
148
|
+
operations.CreateOrganizationBillingSetupResponseBody$inboundSchema,
|
|
149
|
+
),
|
|
150
|
+
M.fail("4XX"),
|
|
151
|
+
M.fail("5XX"),
|
|
152
|
+
)(response, req);
|
|
153
|
+
if (!result.ok) {
|
|
154
|
+
return [result, { status: "complete", request: req, response }];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return [result, { status: "complete", request: req, response }];
|
|
158
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
30
|
+
*/
|
|
31
|
+
export function billingGetOrganizationBilling(
|
|
32
|
+
client: SDKCore,
|
|
33
|
+
request: operations.GetOrganizationBillingRequest,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
operations.GetOrganizationBillingResponseBody,
|
|
38
|
+
| SDKError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: SDKCore,
|
|
57
|
+
request: operations.GetOrganizationBillingRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.GetOrganizationBillingResponseBody,
|
|
63
|
+
| SDKError
|
|
64
|
+
| ResponseValidationError
|
|
65
|
+
| ConnectionError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
>,
|
|
72
|
+
APICall,
|
|
73
|
+
]
|
|
74
|
+
> {
|
|
75
|
+
const parsed = safeParse(
|
|
76
|
+
request,
|
|
77
|
+
(value) =>
|
|
78
|
+
operations.GetOrganizationBillingRequest$outboundSchema.parse(value),
|
|
79
|
+
"Input validation failed",
|
|
80
|
+
);
|
|
81
|
+
if (!parsed.ok) {
|
|
82
|
+
return [parsed, { status: "invalid" }];
|
|
83
|
+
}
|
|
84
|
+
const payload = parsed.value;
|
|
85
|
+
const body = null;
|
|
86
|
+
|
|
87
|
+
const path = pathToFunc("/api/v1/budgeting/billing/org")();
|
|
88
|
+
|
|
89
|
+
const query = encodeFormQuery({
|
|
90
|
+
"org_id": payload.org_id,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
const headers = new Headers(compactMap({
|
|
94
|
+
Accept: "application/json",
|
|
95
|
+
}));
|
|
96
|
+
|
|
97
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
98
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
99
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
100
|
+
|
|
101
|
+
const context = {
|
|
102
|
+
options: client._options,
|
|
103
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
104
|
+
operationID: "getOrganizationBilling",
|
|
105
|
+
oAuth2Scopes: null,
|
|
106
|
+
|
|
107
|
+
resolvedSecurity: requestSecurity,
|
|
108
|
+
|
|
109
|
+
securitySource: client._options.bearerAuth,
|
|
110
|
+
retryConfig: options?.retries
|
|
111
|
+
|| client._options.retryConfig
|
|
112
|
+
|| {
|
|
113
|
+
strategy: "backoff",
|
|
114
|
+
backoff: {
|
|
115
|
+
initialInterval: 500,
|
|
116
|
+
maxInterval: 5000,
|
|
117
|
+
exponent: 1.5,
|
|
118
|
+
maxElapsedTime: 15000,
|
|
119
|
+
},
|
|
120
|
+
retryConnectionErrors: true,
|
|
121
|
+
}
|
|
122
|
+
|| { strategy: "none" },
|
|
123
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const requestRes = client._createRequest(context, {
|
|
127
|
+
security: requestSecurity,
|
|
128
|
+
method: "GET",
|
|
129
|
+
baseURL: options?.serverURL,
|
|
130
|
+
path: path,
|
|
131
|
+
headers: headers,
|
|
132
|
+
query: query,
|
|
133
|
+
body: body,
|
|
134
|
+
userAgent: client._options.userAgent,
|
|
135
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
136
|
+
}, options);
|
|
137
|
+
if (!requestRes.ok) {
|
|
138
|
+
return [requestRes, { status: "invalid" }];
|
|
139
|
+
}
|
|
140
|
+
const req = requestRes.value;
|
|
141
|
+
|
|
142
|
+
const doResult = await client._do(req, {
|
|
143
|
+
context,
|
|
144
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
145
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
146
|
+
retryConfig: context.retryConfig,
|
|
147
|
+
retryCodes: context.retryCodes,
|
|
148
|
+
});
|
|
149
|
+
if (!doResult.ok) {
|
|
150
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
|
+
}
|
|
152
|
+
const response = doResult.value;
|
|
153
|
+
|
|
154
|
+
const [result] = await M.match<
|
|
155
|
+
operations.GetOrganizationBillingResponseBody,
|
|
156
|
+
| SDKError
|
|
157
|
+
| ResponseValidationError
|
|
158
|
+
| ConnectionError
|
|
159
|
+
| RequestAbortedError
|
|
160
|
+
| RequestTimeoutError
|
|
161
|
+
| InvalidRequestError
|
|
162
|
+
| UnexpectedClientError
|
|
163
|
+
| SDKValidationError
|
|
164
|
+
>(
|
|
165
|
+
M.json(200, operations.GetOrganizationBillingResponseBody$inboundSchema),
|
|
166
|
+
M.fail("4XX"),
|
|
167
|
+
M.fail("5XX"),
|
|
168
|
+
)(response, req);
|
|
169
|
+
if (!result.ok) {
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return [result, { status: "complete", request: req, response }];
|
|
174
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
30
|
+
*/
|
|
31
|
+
export function billingListOrganizationBillingInvoices(
|
|
32
|
+
client: SDKCore,
|
|
33
|
+
request: operations.ListOrganizationBillingInvoicesRequest,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
operations.ListOrganizationBillingInvoicesResponseBody,
|
|
38
|
+
| SDKError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: SDKCore,
|
|
57
|
+
request: operations.ListOrganizationBillingInvoicesRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.ListOrganizationBillingInvoicesResponseBody,
|
|
63
|
+
| SDKError
|
|
64
|
+
| ResponseValidationError
|
|
65
|
+
| ConnectionError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
>,
|
|
72
|
+
APICall,
|
|
73
|
+
]
|
|
74
|
+
> {
|
|
75
|
+
const parsed = safeParse(
|
|
76
|
+
request,
|
|
77
|
+
(value) =>
|
|
78
|
+
operations.ListOrganizationBillingInvoicesRequest$outboundSchema.parse(
|
|
79
|
+
value,
|
|
80
|
+
),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = null;
|
|
88
|
+
|
|
89
|
+
const path = pathToFunc("/api/v1/budgeting/billing/org/invoices")();
|
|
90
|
+
|
|
91
|
+
const query = encodeFormQuery({
|
|
92
|
+
"org_id": payload.org_id,
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
const headers = new Headers(compactMap({
|
|
96
|
+
Accept: "application/json",
|
|
97
|
+
}));
|
|
98
|
+
|
|
99
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
100
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
101
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
102
|
+
|
|
103
|
+
const context = {
|
|
104
|
+
options: client._options,
|
|
105
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
106
|
+
operationID: "listOrganizationBillingInvoices",
|
|
107
|
+
oAuth2Scopes: null,
|
|
108
|
+
|
|
109
|
+
resolvedSecurity: requestSecurity,
|
|
110
|
+
|
|
111
|
+
securitySource: client._options.bearerAuth,
|
|
112
|
+
retryConfig: options?.retries
|
|
113
|
+
|| client._options.retryConfig
|
|
114
|
+
|| {
|
|
115
|
+
strategy: "backoff",
|
|
116
|
+
backoff: {
|
|
117
|
+
initialInterval: 500,
|
|
118
|
+
maxInterval: 5000,
|
|
119
|
+
exponent: 1.5,
|
|
120
|
+
maxElapsedTime: 15000,
|
|
121
|
+
},
|
|
122
|
+
retryConnectionErrors: true,
|
|
123
|
+
}
|
|
124
|
+
|| { strategy: "none" },
|
|
125
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const requestRes = client._createRequest(context, {
|
|
129
|
+
security: requestSecurity,
|
|
130
|
+
method: "GET",
|
|
131
|
+
baseURL: options?.serverURL,
|
|
132
|
+
path: path,
|
|
133
|
+
headers: headers,
|
|
134
|
+
query: query,
|
|
135
|
+
body: body,
|
|
136
|
+
userAgent: client._options.userAgent,
|
|
137
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
138
|
+
}, options);
|
|
139
|
+
if (!requestRes.ok) {
|
|
140
|
+
return [requestRes, { status: "invalid" }];
|
|
141
|
+
}
|
|
142
|
+
const req = requestRes.value;
|
|
143
|
+
|
|
144
|
+
const doResult = await client._do(req, {
|
|
145
|
+
context,
|
|
146
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
147
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
148
|
+
retryConfig: context.retryConfig,
|
|
149
|
+
retryCodes: context.retryCodes,
|
|
150
|
+
});
|
|
151
|
+
if (!doResult.ok) {
|
|
152
|
+
return [doResult, { status: "request-error", request: req }];
|
|
153
|
+
}
|
|
154
|
+
const response = doResult.value;
|
|
155
|
+
|
|
156
|
+
const [result] = await M.match<
|
|
157
|
+
operations.ListOrganizationBillingInvoicesResponseBody,
|
|
158
|
+
| SDKError
|
|
159
|
+
| ResponseValidationError
|
|
160
|
+
| ConnectionError
|
|
161
|
+
| RequestAbortedError
|
|
162
|
+
| RequestTimeoutError
|
|
163
|
+
| InvalidRequestError
|
|
164
|
+
| UnexpectedClientError
|
|
165
|
+
| SDKValidationError
|
|
166
|
+
>(
|
|
167
|
+
M.json(
|
|
168
|
+
200,
|
|
169
|
+
operations.ListOrganizationBillingInvoicesResponseBody$inboundSchema,
|
|
170
|
+
),
|
|
171
|
+
M.fail("4XX"),
|
|
172
|
+
M.fail("5XX"),
|
|
173
|
+
)(response, req);
|
|
174
|
+
if (!result.ok) {
|
|
175
|
+
return [result, { status: "complete", request: req, response }];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return [result, { status: "complete", request: req, response }];
|
|
179
|
+
}
|