@polar-sh/sdk 0.32.4 → 0.32.7
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 +90 -299
- package/bin/mcp-server.js +1213 -449
- package/bin/mcp-server.js.map +37 -20
- package/dist/commonjs/funcs/checkoutsClientConfirm.d.ts +2 -1
- package/dist/commonjs/funcs/checkoutsClientConfirm.d.ts.map +1 -1
- package/dist/commonjs/funcs/checkoutsClientConfirm.js +3 -2
- package/dist/commonjs/funcs/checkoutsClientConfirm.js.map +1 -1
- package/dist/commonjs/funcs/checkoutsClientGet.d.ts +2 -1
- package/dist/commonjs/funcs/checkoutsClientGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/checkoutsClientGet.js +3 -2
- package/dist/commonjs/funcs/checkoutsClientGet.js.map +1 -1
- package/dist/commonjs/funcs/checkoutsClientUpdate.d.ts +2 -1
- package/dist/commonjs/funcs/checkoutsClientUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/checkoutsClientUpdate.js +3 -2
- package/dist/commonjs/funcs/checkoutsClientUpdate.js.map +1 -1
- package/dist/commonjs/funcs/customerMetersGet.d.ts +21 -0
- package/dist/commonjs/funcs/customerMetersGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/customerMetersGet.js +115 -0
- package/dist/commonjs/funcs/customerMetersGet.js.map +1 -0
- package/dist/commonjs/funcs/customerMetersList.d.ts +22 -0
- package/dist/commonjs/funcs/customerMetersList.d.ts.map +1 -0
- package/dist/commonjs/funcs/customerMetersList.js +152 -0
- package/dist/commonjs/funcs/customerMetersList.js.map +1 -0
- package/dist/commonjs/funcs/customerPortalBenefitGrantsGet.js +1 -1
- package/dist/commonjs/funcs/customerPortalBenefitGrantsGet.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalBenefitGrantsList.js +1 -1
- package/dist/commonjs/funcs/customerPortalBenefitGrantsList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalBenefitGrantsUpdate.js +1 -1
- package/dist/commonjs/funcs/customerPortalBenefitGrantsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalCustomerMetersGet.d.ts +21 -0
- package/dist/commonjs/funcs/customerPortalCustomerMetersGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/customerPortalCustomerMetersGet.js +119 -0
- package/dist/commonjs/funcs/customerPortalCustomerMetersGet.js.map +1 -0
- package/dist/commonjs/funcs/customerPortalCustomerMetersList.d.ts +22 -0
- package/dist/commonjs/funcs/customerPortalCustomerMetersList.d.ts.map +1 -0
- package/dist/commonjs/funcs/customerPortalCustomerMetersList.js +156 -0
- package/dist/commonjs/funcs/customerPortalCustomerMetersList.js.map +1 -0
- package/dist/commonjs/funcs/customerPortalCustomersAddPaymentMethod.js +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersAddPaymentMethod.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersDeletePaymentMethod.js +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersDeletePaymentMethod.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersGet.js +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersGet.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersGetPaymentMethods.js +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersGetPaymentMethods.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersUpdate.js +1 -1
- package/dist/commonjs/funcs/customerPortalCustomersUpdate.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalDownloadablesList.js +1 -1
- package/dist/commonjs/funcs/customerPortalDownloadablesList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysGet.js +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysGet.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysList.js +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalOrdersGet.js +1 -1
- package/dist/commonjs/funcs/customerPortalOrdersGet.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalOrdersInvoice.js +1 -1
- package/dist/commonjs/funcs/customerPortalOrdersInvoice.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalOrdersList.js +1 -1
- package/dist/commonjs/funcs/customerPortalOrdersList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsCancel.js +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsCancel.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsGet.js +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsGet.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsList.js +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.js +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +2 -0
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/funcs/eventsListNames.d.ts +22 -0
- package/dist/commonjs/funcs/eventsListNames.d.ts.map +1 -0
- package/dist/commonjs/funcs/{metersEvents.js → eventsListNames.js} +18 -20
- package/dist/commonjs/funcs/eventsListNames.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/prompts.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/prompts.js +5 -1
- package/dist/commonjs/mcp-server/prompts.js.map +1 -1
- package/dist/commonjs/mcp-server/resources.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/resources.js +10 -2
- package/dist/commonjs/mcp-server/resources.js.map +1 -1
- package/dist/commonjs/mcp-server/scopes.d.ts +1 -1
- package/dist/commonjs/mcp-server/scopes.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/scopes.js +1 -0
- package/dist/commonjs/mcp-server/scopes.js.map +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +6 -3
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/customerMetersGet.d.ts +7 -0
- package/dist/commonjs/mcp-server/tools/customerMetersGet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/customerMetersGet.js +34 -0
- package/dist/commonjs/mcp-server/tools/customerMetersGet.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/customerMetersList.d.ts +7 -0
- package/dist/commonjs/mcp-server/tools/customerMetersList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/customerMetersList.js +34 -0
- package/dist/commonjs/mcp-server/tools/customerMetersList.js.map +1 -0
- package/dist/commonjs/mcp-server/tools.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools.js +4 -3
- package/dist/commonjs/mcp-server/tools.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantmetercreditproperties.d.ts +33 -0
- package/dist/commonjs/models/components/benefitgrantmetercreditproperties.d.ts.map +1 -0
- package/dist/commonjs/models/components/benefitgrantmetercreditproperties.js +76 -0
- package/dist/commonjs/models/components/benefitgrantmetercreditproperties.js.map +1 -0
- package/dist/commonjs/models/components/benefitmetercreditcreateproperties.d.ts +2 -2
- package/dist/commonjs/models/components/benefitmetercreditcreateproperties.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitmetercreditcreateproperties.js +2 -2
- package/dist/commonjs/models/components/benefitmetercreditcreateproperties.js.map +1 -1
- package/dist/commonjs/models/components/benefitmetercreditproperties.d.ts +2 -2
- package/dist/commonjs/models/components/benefitmetercreditproperties.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitmetercreditproperties.js +2 -2
- package/dist/commonjs/models/components/benefitmetercreditproperties.js.map +1 -1
- package/dist/commonjs/models/components/benefitmetercreditsubscriber.d.ts +73 -0
- package/dist/commonjs/models/components/benefitmetercreditsubscriber.d.ts.map +1 -0
- package/dist/commonjs/models/components/benefitmetercreditsubscriber.js +92 -0
- package/dist/commonjs/models/components/benefitmetercreditsubscriber.js.map +1 -0
- package/dist/commonjs/models/components/benefitmetercreditsubscriberproperties.d.ts +34 -0
- package/dist/commonjs/models/components/benefitmetercreditsubscriberproperties.d.ts.map +1 -0
- package/dist/commonjs/models/components/benefitmetercreditsubscriberproperties.js +70 -0
- package/dist/commonjs/models/components/benefitmetercreditsubscriberproperties.js.map +1 -0
- package/dist/commonjs/models/components/checkout.d.ts +2 -2
- package/dist/commonjs/models/components/checkout.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkout.js +2 -2
- package/dist/commonjs/models/components/checkout.js.map +1 -1
- package/dist/commonjs/models/components/checkoutpublic.d.ts +2 -2
- package/dist/commonjs/models/components/checkoutpublic.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutpublic.js +2 -2
- package/dist/commonjs/models/components/checkoutpublic.js.map +1 -1
- package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts +2 -2
- package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutpublicconfirmed.js +2 -2
- package/dist/commonjs/models/components/checkoutpublicconfirmed.js.map +1 -1
- package/dist/commonjs/models/components/customerbenefitgrant.d.ts +3 -2
- package/dist/commonjs/models/components/customerbenefitgrant.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerbenefitgrant.js +3 -0
- package/dist/commonjs/models/components/customerbenefitgrant.js.map +1 -1
- package/dist/commonjs/models/components/customerbenefitgrantmetercredit.d.ts +67 -0
- package/dist/commonjs/models/components/customerbenefitgrantmetercredit.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerbenefitgrantmetercredit.js +115 -0
- package/dist/commonjs/models/components/customerbenefitgrantmetercredit.js.map +1 -0
- package/dist/commonjs/models/components/customerbenefitgrantmetercreditupdate.d.ts +29 -0
- package/dist/commonjs/models/components/customerbenefitgrantmetercreditupdate.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerbenefitgrantmetercreditupdate.js +68 -0
- package/dist/commonjs/models/components/customerbenefitgrantmetercreditupdate.js.map +1 -0
- package/dist/commonjs/models/components/customerbenefitgrantupdate.d.ts +5 -0
- package/dist/commonjs/models/components/customerbenefitgrantupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerbenefitgrantupdate.js +7 -0
- package/dist/commonjs/models/components/customerbenefitgrantupdate.js.map +1 -1
- package/dist/commonjs/models/components/customercustomermeter.d.ts +70 -0
- package/dist/commonjs/models/components/customercustomermeter.d.ts.map +1 -0
- package/dist/commonjs/models/components/customercustomermeter.js +95 -0
- package/dist/commonjs/models/components/customercustomermeter.js.map +1 -0
- package/dist/commonjs/models/components/customercustomermetermeter.d.ts +47 -0
- package/dist/commonjs/models/components/customercustomermetermeter.d.ts.map +1 -0
- package/dist/commonjs/models/components/customercustomermetermeter.js +76 -0
- package/dist/commonjs/models/components/customercustomermetermeter.js.map +1 -0
- package/dist/commonjs/models/components/customercustomermetersortproperty.d.ts +64 -0
- package/dist/commonjs/models/components/customercustomermetersortproperty.d.ts.map +1 -0
- package/dist/commonjs/models/components/customercustomermetersortproperty.js +62 -0
- package/dist/commonjs/models/components/customercustomermetersortproperty.js.map +1 -0
- package/dist/commonjs/models/components/customermeter.d.ts +79 -0
- package/dist/commonjs/models/components/customermeter.d.ts.map +1 -0
- package/dist/commonjs/models/components/customermeter.js +98 -0
- package/dist/commonjs/models/components/customermeter.js.map +1 -0
- package/dist/commonjs/models/components/customermetersortproperty.d.ts +76 -0
- package/dist/commonjs/models/components/customermetersortproperty.d.ts.map +1 -0
- package/dist/commonjs/models/components/customermetersortproperty.js +66 -0
- package/dist/commonjs/models/components/customermetersortproperty.js.map +1 -0
- package/dist/commonjs/models/components/customerstate.d.ts +8 -1
- package/dist/commonjs/models/components/customerstate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerstate.js +5 -0
- package/dist/commonjs/models/components/customerstate.js.map +1 -1
- package/dist/commonjs/models/components/customerstatemeter.d.ts +60 -0
- package/dist/commonjs/models/components/customerstatemeter.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerstatemeter.js +86 -0
- package/dist/commonjs/models/components/customerstatemeter.js.map +1 -0
- package/dist/commonjs/models/components/eventname.d.ts +47 -0
- package/dist/commonjs/models/components/eventname.d.ts.map +1 -0
- package/dist/commonjs/models/components/eventname.js +76 -0
- package/dist/commonjs/models/components/eventname.js.map +1 -0
- package/dist/commonjs/models/components/eventnamessortproperty.d.ts +46 -0
- package/dist/commonjs/models/components/eventnamessortproperty.d.ts.map +1 -0
- package/dist/commonjs/models/components/eventnamessortproperty.js +56 -0
- package/dist/commonjs/models/components/eventnamessortproperty.js.map +1 -0
- package/dist/commonjs/models/components/listresourcecustomercustomermeter.d.ts +33 -0
- package/dist/commonjs/models/components/listresourcecustomercustomermeter.d.ts.map +1 -0
- package/dist/commonjs/models/components/listresourcecustomercustomermeter.js +63 -0
- package/dist/commonjs/models/components/listresourcecustomercustomermeter.js.map +1 -0
- package/dist/commonjs/models/components/listresourcecustomermeter.d.ts +33 -0
- package/dist/commonjs/models/components/listresourcecustomermeter.d.ts.map +1 -0
- package/dist/commonjs/models/components/listresourcecustomermeter.js +63 -0
- package/dist/commonjs/models/components/listresourcecustomermeter.js.map +1 -0
- package/dist/commonjs/models/components/listresourceeventname.d.ts +33 -0
- package/dist/commonjs/models/components/listresourceeventname.d.ts.map +1 -0
- package/dist/commonjs/models/components/listresourceeventname.js +63 -0
- package/dist/commonjs/models/components/listresourceeventname.js.map +1 -0
- package/dist/commonjs/models/components/meterquantities.d.ts +5 -0
- package/dist/commonjs/models/components/meterquantities.d.ts.map +1 -1
- package/dist/commonjs/models/components/meterquantities.js +2 -0
- package/dist/commonjs/models/components/meterquantities.js.map +1 -1
- package/dist/commonjs/models/components/oauth2client.js +2 -2
- package/dist/commonjs/models/components/oauth2client.js.map +1 -1
- package/dist/commonjs/models/components/oauth2clientconfiguration.js +2 -2
- package/dist/commonjs/models/components/oauth2clientconfiguration.js.map +1 -1
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.js +2 -2
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/dist/commonjs/models/components/productcreate.d.ts +1 -1
- package/dist/commonjs/models/components/productpricemeteredunit.d.ts +2 -2
- package/dist/commonjs/models/components/productpricemeteredunit.js +2 -2
- package/dist/commonjs/models/components/productpricemeteredunit.js.map +1 -1
- package/dist/commonjs/models/components/productpricemeteredunitcreate.d.ts +27 -3
- package/dist/commonjs/models/components/productpricemeteredunitcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/productpricemeteredunitcreate.js +26 -3
- package/dist/commonjs/models/components/productpricemeteredunitcreate.js.map +1 -1
- package/dist/commonjs/models/components/scope.d.ts +9 -0
- package/dist/commonjs/models/components/scope.d.ts.map +1 -1
- package/dist/commonjs/models/components/scope.js +3 -0
- package/dist/commonjs/models/components/scope.js.map +1 -1
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.d.ts +2 -1
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.js.map +1 -1
- package/dist/commonjs/models/errors/expiredcheckouterror.d.ts +34 -0
- package/dist/commonjs/models/errors/expiredcheckouterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/expiredcheckouterror.js +70 -0
- package/dist/commonjs/models/errors/expiredcheckouterror.js.map +1 -0
- package/dist/commonjs/models/operations/customermetersget.d.ts +32 -0
- package/dist/commonjs/models/operations/customermetersget.d.ts.map +1 -0
- package/dist/commonjs/models/operations/customermetersget.js +59 -0
- package/dist/commonjs/models/operations/customermetersget.js.map +1 -0
- package/dist/commonjs/models/operations/customermeterslist.d.ts +185 -0
- package/dist/commonjs/models/operations/customermeterslist.d.ts.map +1 -0
- package/dist/commonjs/models/operations/customermeterslist.js +222 -0
- package/dist/commonjs/models/operations/customermeterslist.js.map +1 -0
- package/dist/commonjs/models/operations/customerportalcustomermetersget.d.ts +57 -0
- package/dist/commonjs/models/operations/customerportalcustomermetersget.d.ts.map +1 -0
- package/dist/commonjs/models/operations/customerportalcustomermetersget.js +95 -0
- package/dist/commonjs/models/operations/customerportalcustomermetersget.js.map +1 -0
- package/dist/commonjs/models/operations/customerportalcustomermeterslist.d.ts +128 -0
- package/dist/commonjs/models/operations/customerportalcustomermeterslist.d.ts.map +1 -0
- package/dist/commonjs/models/operations/customerportalcustomermeterslist.js +173 -0
- package/dist/commonjs/models/operations/customerportalcustomermeterslist.js.map +1 -0
- package/dist/commonjs/models/operations/eventslist.d.ts +34 -0
- package/dist/commonjs/models/operations/eventslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/eventslist.js +30 -1
- package/dist/commonjs/models/operations/eventslist.js.map +1 -1
- package/dist/commonjs/models/operations/eventslistnames.d.ts +161 -0
- package/dist/commonjs/models/operations/eventslistnames.d.ts.map +1 -0
- package/dist/commonjs/models/operations/eventslistnames.js +196 -0
- package/dist/commonjs/models/operations/eventslistnames.js.map +1 -0
- package/dist/commonjs/models/operations/metersquantities.d.ts +13 -13
- package/dist/commonjs/models/operations/metersquantities.d.ts.map +1 -1
- package/dist/commonjs/models/operations/metersquantities.js +16 -16
- package/dist/commonjs/models/operations/metersquantities.js.map +1 -1
- package/dist/commonjs/sdk/customermeters.d.ts +28 -0
- package/dist/commonjs/sdk/customermeters.d.ts.map +1 -0
- package/dist/commonjs/sdk/customermeters.js +37 -0
- package/dist/commonjs/sdk/customermeters.js.map +1 -0
- package/dist/commonjs/sdk/customerportal.d.ts +3 -0
- package/dist/commonjs/sdk/customerportal.d.ts.map +1 -1
- package/dist/commonjs/sdk/customerportal.js +4 -0
- package/dist/commonjs/sdk/customerportal.js.map +1 -1
- package/dist/commonjs/sdk/events.d.ts +12 -0
- package/dist/commonjs/sdk/events.d.ts.map +1 -1
- package/dist/commonjs/sdk/events.js +12 -0
- package/dist/commonjs/sdk/events.js.map +1 -1
- package/dist/commonjs/sdk/meters.d.ts +0 -12
- package/dist/commonjs/sdk/meters.d.ts.map +1 -1
- package/dist/commonjs/sdk/meters.js +0 -12
- package/dist/commonjs/sdk/meters.js.map +1 -1
- package/dist/commonjs/sdk/polarcustomermeters.d.ts +28 -0
- package/dist/commonjs/sdk/polarcustomermeters.d.ts.map +1 -0
- package/dist/commonjs/sdk/polarcustomermeters.js +37 -0
- package/dist/commonjs/sdk/polarcustomermeters.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/checkoutsClientConfirm.d.ts +2 -1
- package/dist/esm/funcs/checkoutsClientConfirm.d.ts.map +1 -1
- package/dist/esm/funcs/checkoutsClientConfirm.js +3 -2
- package/dist/esm/funcs/checkoutsClientConfirm.js.map +1 -1
- package/dist/esm/funcs/checkoutsClientGet.d.ts +2 -1
- package/dist/esm/funcs/checkoutsClientGet.d.ts.map +1 -1
- package/dist/esm/funcs/checkoutsClientGet.js +3 -2
- package/dist/esm/funcs/checkoutsClientGet.js.map +1 -1
- package/dist/esm/funcs/checkoutsClientUpdate.d.ts +2 -1
- package/dist/esm/funcs/checkoutsClientUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/checkoutsClientUpdate.js +3 -2
- package/dist/esm/funcs/checkoutsClientUpdate.js.map +1 -1
- package/dist/esm/funcs/customerMetersGet.d.ts +21 -0
- package/dist/esm/funcs/customerMetersGet.d.ts.map +1 -0
- package/dist/esm/funcs/customerMetersGet.js +89 -0
- package/dist/esm/funcs/customerMetersGet.js.map +1 -0
- package/dist/esm/funcs/customerMetersList.d.ts +22 -0
- package/dist/esm/funcs/customerMetersList.d.ts.map +1 -0
- package/dist/esm/funcs/{metersEvents.js → customerMetersList.js} +18 -20
- package/dist/esm/funcs/customerMetersList.js.map +1 -0
- package/dist/esm/funcs/customerPortalBenefitGrantsGet.js +1 -1
- package/dist/esm/funcs/customerPortalBenefitGrantsGet.js.map +1 -1
- package/dist/esm/funcs/customerPortalBenefitGrantsList.js +1 -1
- package/dist/esm/funcs/customerPortalBenefitGrantsList.js.map +1 -1
- package/dist/esm/funcs/customerPortalBenefitGrantsUpdate.js +1 -1
- package/dist/esm/funcs/customerPortalBenefitGrantsUpdate.js.map +1 -1
- package/dist/esm/funcs/customerPortalCustomerMetersGet.d.ts +21 -0
- package/dist/esm/funcs/customerPortalCustomerMetersGet.d.ts.map +1 -0
- package/dist/esm/funcs/customerPortalCustomerMetersGet.js +93 -0
- package/dist/esm/funcs/customerPortalCustomerMetersGet.js.map +1 -0
- package/dist/esm/funcs/customerPortalCustomerMetersList.d.ts +22 -0
- package/dist/esm/funcs/customerPortalCustomerMetersList.d.ts.map +1 -0
- package/dist/esm/funcs/customerPortalCustomerMetersList.js +130 -0
- package/dist/esm/funcs/customerPortalCustomerMetersList.js.map +1 -0
- package/dist/esm/funcs/customerPortalCustomersAddPaymentMethod.js +1 -1
- package/dist/esm/funcs/customerPortalCustomersAddPaymentMethod.js.map +1 -1
- package/dist/esm/funcs/customerPortalCustomersDeletePaymentMethod.js +1 -1
- package/dist/esm/funcs/customerPortalCustomersDeletePaymentMethod.js.map +1 -1
- package/dist/esm/funcs/customerPortalCustomersGet.js +1 -1
- package/dist/esm/funcs/customerPortalCustomersGet.js.map +1 -1
- package/dist/esm/funcs/customerPortalCustomersGetPaymentMethods.js +1 -1
- package/dist/esm/funcs/customerPortalCustomersGetPaymentMethods.js.map +1 -1
- package/dist/esm/funcs/customerPortalCustomersUpdate.js +1 -1
- package/dist/esm/funcs/customerPortalCustomersUpdate.js.map +1 -1
- package/dist/esm/funcs/customerPortalDownloadablesList.js +1 -1
- package/dist/esm/funcs/customerPortalDownloadablesList.js.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysGet.js +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysGet.js.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysList.js +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysList.js.map +1 -1
- package/dist/esm/funcs/customerPortalOrdersGet.js +1 -1
- package/dist/esm/funcs/customerPortalOrdersGet.js.map +1 -1
- package/dist/esm/funcs/customerPortalOrdersInvoice.js +1 -1
- package/dist/esm/funcs/customerPortalOrdersInvoice.js.map +1 -1
- package/dist/esm/funcs/customerPortalOrdersList.js +1 -1
- package/dist/esm/funcs/customerPortalOrdersList.js.map +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsCancel.js +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsCancel.js.map +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsGet.js +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsGet.js.map +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsList.js +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsList.js.map +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsUpdate.js +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsUpdate.js.map +1 -1
- package/dist/esm/funcs/eventsList.js +2 -0
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/funcs/eventsListNames.d.ts +22 -0
- package/dist/esm/funcs/eventsListNames.d.ts.map +1 -0
- package/dist/esm/funcs/eventsListNames.js +126 -0
- package/dist/esm/funcs/eventsListNames.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/prompts.d.ts.map +1 -1
- package/dist/esm/mcp-server/prompts.js +5 -1
- package/dist/esm/mcp-server/prompts.js.map +1 -1
- package/dist/esm/mcp-server/resources.d.ts.map +1 -1
- package/dist/esm/mcp-server/resources.js +10 -2
- package/dist/esm/mcp-server/resources.js.map +1 -1
- package/dist/esm/mcp-server/scopes.d.ts +1 -1
- package/dist/esm/mcp-server/scopes.d.ts.map +1 -1
- package/dist/esm/mcp-server/scopes.js +1 -0
- package/dist/esm/mcp-server/scopes.js.map +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +6 -3
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/customerMetersGet.d.ts +7 -0
- package/dist/esm/mcp-server/tools/customerMetersGet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/customerMetersGet.js +31 -0
- package/dist/esm/mcp-server/tools/customerMetersGet.js.map +1 -0
- package/dist/esm/mcp-server/tools/customerMetersList.d.ts +7 -0
- package/dist/esm/mcp-server/tools/customerMetersList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/customerMetersList.js +31 -0
- package/dist/esm/mcp-server/tools/customerMetersList.js.map +1 -0
- package/dist/esm/mcp-server/tools.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools.js +4 -3
- package/dist/esm/mcp-server/tools.js.map +1 -1
- package/dist/esm/models/components/benefitgrantmetercreditproperties.d.ts +33 -0
- package/dist/esm/models/components/benefitgrantmetercreditproperties.d.ts.map +1 -0
- package/dist/esm/models/components/benefitgrantmetercreditproperties.js +48 -0
- package/dist/esm/models/components/benefitgrantmetercreditproperties.js.map +1 -0
- package/dist/esm/models/components/benefitmetercreditcreateproperties.d.ts +2 -2
- package/dist/esm/models/components/benefitmetercreditcreateproperties.d.ts.map +1 -1
- package/dist/esm/models/components/benefitmetercreditcreateproperties.js +2 -2
- package/dist/esm/models/components/benefitmetercreditcreateproperties.js.map +1 -1
- package/dist/esm/models/components/benefitmetercreditproperties.d.ts +2 -2
- package/dist/esm/models/components/benefitmetercreditproperties.d.ts.map +1 -1
- package/dist/esm/models/components/benefitmetercreditproperties.js +2 -2
- package/dist/esm/models/components/benefitmetercreditproperties.js.map +1 -1
- package/dist/esm/models/components/benefitmetercreditsubscriber.d.ts +73 -0
- package/dist/esm/models/components/benefitmetercreditsubscriber.d.ts.map +1 -0
- package/dist/esm/models/components/benefitmetercreditsubscriber.js +64 -0
- package/dist/esm/models/components/benefitmetercreditsubscriber.js.map +1 -0
- package/dist/esm/models/components/benefitmetercreditsubscriberproperties.d.ts +34 -0
- package/dist/esm/models/components/benefitmetercreditsubscriberproperties.d.ts.map +1 -0
- package/dist/esm/models/components/benefitmetercreditsubscriberproperties.js +42 -0
- package/dist/esm/models/components/benefitmetercreditsubscriberproperties.js.map +1 -0
- package/dist/esm/models/components/checkout.d.ts +2 -2
- package/dist/esm/models/components/checkout.d.ts.map +1 -1
- package/dist/esm/models/components/checkout.js +2 -2
- package/dist/esm/models/components/checkout.js.map +1 -1
- package/dist/esm/models/components/checkoutpublic.d.ts +2 -2
- package/dist/esm/models/components/checkoutpublic.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutpublic.js +2 -2
- package/dist/esm/models/components/checkoutpublic.js.map +1 -1
- package/dist/esm/models/components/checkoutpublicconfirmed.d.ts +2 -2
- package/dist/esm/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutpublicconfirmed.js +2 -2
- package/dist/esm/models/components/checkoutpublicconfirmed.js.map +1 -1
- package/dist/esm/models/components/customerbenefitgrant.d.ts +3 -2
- package/dist/esm/models/components/customerbenefitgrant.d.ts.map +1 -1
- package/dist/esm/models/components/customerbenefitgrant.js +3 -0
- package/dist/esm/models/components/customerbenefitgrant.js.map +1 -1
- package/dist/esm/models/components/customerbenefitgrantmetercredit.d.ts +67 -0
- package/dist/esm/models/components/customerbenefitgrantmetercredit.d.ts.map +1 -0
- package/dist/esm/models/components/customerbenefitgrantmetercredit.js +87 -0
- package/dist/esm/models/components/customerbenefitgrantmetercredit.js.map +1 -0
- package/dist/esm/models/components/customerbenefitgrantmetercreditupdate.d.ts +29 -0
- package/dist/esm/models/components/customerbenefitgrantmetercreditupdate.d.ts.map +1 -0
- package/dist/esm/models/components/customerbenefitgrantmetercreditupdate.js +40 -0
- package/dist/esm/models/components/customerbenefitgrantmetercreditupdate.js.map +1 -0
- package/dist/esm/models/components/customerbenefitgrantupdate.d.ts +5 -0
- package/dist/esm/models/components/customerbenefitgrantupdate.d.ts.map +1 -1
- package/dist/esm/models/components/customerbenefitgrantupdate.js +7 -0
- package/dist/esm/models/components/customerbenefitgrantupdate.js.map +1 -1
- package/dist/esm/models/components/customercustomermeter.d.ts +70 -0
- package/dist/esm/models/components/customercustomermeter.d.ts.map +1 -0
- package/dist/esm/models/components/customercustomermeter.js +67 -0
- package/dist/esm/models/components/customercustomermeter.js.map +1 -0
- package/dist/esm/models/components/customercustomermetermeter.d.ts +47 -0
- package/dist/esm/models/components/customercustomermetermeter.d.ts.map +1 -0
- package/dist/esm/models/components/customercustomermetermeter.js +48 -0
- package/dist/esm/models/components/customercustomermetermeter.js.map +1 -0
- package/dist/esm/models/components/customercustomermetersortproperty.d.ts +64 -0
- package/dist/esm/models/components/customercustomermetersortproperty.d.ts.map +1 -0
- package/dist/esm/models/components/customercustomermetersortproperty.js +36 -0
- package/dist/esm/models/components/customercustomermetersortproperty.js.map +1 -0
- package/dist/esm/models/components/customermeter.d.ts +79 -0
- package/dist/esm/models/components/customermeter.d.ts.map +1 -0
- package/dist/esm/models/components/customermeter.js +70 -0
- package/dist/esm/models/components/customermeter.js.map +1 -0
- package/dist/esm/models/components/customermetersortproperty.d.ts +76 -0
- package/dist/esm/models/components/customermetersortproperty.d.ts.map +1 -0
- package/dist/esm/models/components/customermetersortproperty.js +40 -0
- package/dist/esm/models/components/customermetersortproperty.js.map +1 -0
- package/dist/esm/models/components/customerstate.d.ts +8 -1
- package/dist/esm/models/components/customerstate.d.ts.map +1 -1
- package/dist/esm/models/components/customerstate.js +5 -0
- package/dist/esm/models/components/customerstate.js.map +1 -1
- package/dist/esm/models/components/customerstatemeter.d.ts +60 -0
- package/dist/esm/models/components/customerstatemeter.d.ts.map +1 -0
- package/dist/esm/models/components/customerstatemeter.js +58 -0
- package/dist/esm/models/components/customerstatemeter.js.map +1 -0
- package/dist/esm/models/components/eventname.d.ts +47 -0
- package/dist/esm/models/components/eventname.d.ts.map +1 -0
- package/dist/esm/models/components/eventname.js +48 -0
- package/dist/esm/models/components/eventname.js.map +1 -0
- package/dist/esm/models/components/eventnamessortproperty.d.ts +46 -0
- package/dist/esm/models/components/eventnamessortproperty.d.ts.map +1 -0
- package/dist/esm/models/components/eventnamessortproperty.js +30 -0
- package/dist/esm/models/components/eventnamessortproperty.js.map +1 -0
- package/dist/esm/models/components/listresourcecustomercustomermeter.d.ts +33 -0
- package/dist/esm/models/components/listresourcecustomercustomermeter.d.ts.map +1 -0
- package/dist/esm/models/components/listresourcecustomercustomermeter.js +35 -0
- package/dist/esm/models/components/listresourcecustomercustomermeter.js.map +1 -0
- package/dist/esm/models/components/listresourcecustomermeter.d.ts +33 -0
- package/dist/esm/models/components/listresourcecustomermeter.d.ts.map +1 -0
- package/dist/esm/models/components/listresourcecustomermeter.js +35 -0
- package/dist/esm/models/components/listresourcecustomermeter.js.map +1 -0
- package/dist/esm/models/components/listresourceeventname.d.ts +33 -0
- package/dist/esm/models/components/listresourceeventname.d.ts.map +1 -0
- package/dist/esm/models/components/listresourceeventname.js +35 -0
- package/dist/esm/models/components/listresourceeventname.js.map +1 -0
- package/dist/esm/models/components/meterquantities.d.ts +5 -0
- package/dist/esm/models/components/meterquantities.d.ts.map +1 -1
- package/dist/esm/models/components/meterquantities.js +2 -0
- package/dist/esm/models/components/meterquantities.js.map +1 -1
- package/dist/esm/models/components/oauth2client.js +2 -2
- package/dist/esm/models/components/oauth2client.js.map +1 -1
- package/dist/esm/models/components/oauth2clientconfiguration.js +2 -2
- package/dist/esm/models/components/oauth2clientconfiguration.js.map +1 -1
- package/dist/esm/models/components/oauth2clientconfigurationupdate.js +2 -2
- package/dist/esm/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/dist/esm/models/components/productcreate.d.ts +1 -1
- package/dist/esm/models/components/productpricemeteredunit.d.ts +2 -2
- package/dist/esm/models/components/productpricemeteredunit.js +2 -2
- package/dist/esm/models/components/productpricemeteredunit.js.map +1 -1
- package/dist/esm/models/components/productpricemeteredunitcreate.d.ts +27 -3
- package/dist/esm/models/components/productpricemeteredunitcreate.d.ts.map +1 -1
- package/dist/esm/models/components/productpricemeteredunitcreate.js +23 -2
- package/dist/esm/models/components/productpricemeteredunitcreate.js.map +1 -1
- package/dist/esm/models/components/scope.d.ts +9 -0
- package/dist/esm/models/components/scope.d.ts.map +1 -1
- package/dist/esm/models/components/scope.js +3 -0
- package/dist/esm/models/components/scope.js.map +1 -1
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.d.ts +2 -1
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.d.ts.map +1 -1
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.js.map +1 -1
- package/dist/esm/models/errors/expiredcheckouterror.d.ts +34 -0
- package/dist/esm/models/errors/expiredcheckouterror.d.ts.map +1 -0
- package/dist/esm/models/errors/expiredcheckouterror.js +43 -0
- package/dist/esm/models/errors/expiredcheckouterror.js.map +1 -0
- package/dist/esm/models/operations/customermetersget.d.ts +32 -0
- package/dist/esm/models/operations/customermetersget.d.ts.map +1 -0
- package/dist/esm/models/operations/customermetersget.js +31 -0
- package/dist/esm/models/operations/customermetersget.js.map +1 -0
- package/dist/esm/models/operations/customermeterslist.d.ts +185 -0
- package/dist/esm/models/operations/customermeterslist.d.ts.map +1 -0
- package/dist/esm/models/operations/customermeterslist.js +184 -0
- package/dist/esm/models/operations/customermeterslist.js.map +1 -0
- package/dist/esm/models/operations/customerportalcustomermetersget.d.ts +57 -0
- package/dist/esm/models/operations/customerportalcustomermetersget.d.ts.map +1 -0
- package/dist/esm/models/operations/customerportalcustomermetersget.js +65 -0
- package/dist/esm/models/operations/customerportalcustomermetersget.js.map +1 -0
- package/dist/esm/models/operations/customerportalcustomermeterslist.d.ts +128 -0
- package/dist/esm/models/operations/customerportalcustomermeterslist.d.ts.map +1 -0
- package/dist/esm/models/operations/customerportalcustomermeterslist.js +139 -0
- package/dist/esm/models/operations/customerportalcustomermeterslist.js.map +1 -0
- package/dist/esm/models/operations/eventslist.d.ts +34 -0
- package/dist/esm/models/operations/eventslist.d.ts.map +1 -1
- package/dist/esm/models/operations/eventslist.js +27 -0
- package/dist/esm/models/operations/eventslist.js.map +1 -1
- package/dist/esm/models/operations/eventslistnames.d.ts +161 -0
- package/dist/esm/models/operations/eventslistnames.d.ts.map +1 -0
- package/dist/esm/models/operations/eventslistnames.js +160 -0
- package/dist/esm/models/operations/eventslistnames.js.map +1 -0
- package/dist/esm/models/operations/metersquantities.d.ts +13 -13
- package/dist/esm/models/operations/metersquantities.d.ts.map +1 -1
- package/dist/esm/models/operations/metersquantities.js +13 -13
- package/dist/esm/models/operations/metersquantities.js.map +1 -1
- package/dist/esm/sdk/customermeters.d.ts +28 -0
- package/dist/esm/sdk/customermeters.d.ts.map +1 -0
- package/dist/esm/sdk/customermeters.js +33 -0
- package/dist/esm/sdk/customermeters.js.map +1 -0
- package/dist/esm/sdk/customerportal.d.ts +3 -0
- package/dist/esm/sdk/customerportal.d.ts.map +1 -1
- package/dist/esm/sdk/customerportal.js +4 -0
- package/dist/esm/sdk/customerportal.js.map +1 -1
- package/dist/esm/sdk/events.d.ts +12 -0
- package/dist/esm/sdk/events.d.ts.map +1 -1
- package/dist/esm/sdk/events.js +12 -0
- package/dist/esm/sdk/events.js.map +1 -1
- package/dist/esm/sdk/meters.d.ts +0 -12
- package/dist/esm/sdk/meters.d.ts.map +1 -1
- package/dist/esm/sdk/meters.js +0 -12
- package/dist/esm/sdk/meters.js.map +1 -1
- package/dist/esm/sdk/polarcustomermeters.d.ts +28 -0
- package/dist/esm/sdk/polarcustomermeters.d.ts.map +1 -0
- package/dist/esm/sdk/polarcustomermeters.js +33 -0
- package/dist/esm/sdk/polarcustomermeters.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/docs/sdks/benefitgrants/README.md +1 -5
- package/docs/sdks/checkouts/README.md +42 -17
- package/docs/sdks/customermeters/README.md +176 -0
- package/docs/sdks/customers/README.md +48 -4
- package/docs/sdks/events/README.md +84 -0
- package/docs/sdks/meters/README.md +0 -85
- package/docs/sdks/polarcustomermeters/README.md +170 -0
- package/docs/sdks/polarcustomers/README.md +10 -2
- package/docs/sdks/products/README.md +7 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/checkoutsClientConfirm.ts +9 -1
- package/src/funcs/checkoutsClientGet.ts +9 -1
- package/src/funcs/checkoutsClientUpdate.ts +9 -1
- package/src/funcs/customerMetersGet.ts +189 -0
- package/src/funcs/{metersEvents.ts → customerMetersList.ts} +27 -38
- package/src/funcs/customerPortalBenefitGrantsGet.ts +1 -1
- package/src/funcs/customerPortalBenefitGrantsList.ts +1 -1
- package/src/funcs/customerPortalBenefitGrantsUpdate.ts +1 -1
- package/src/funcs/customerPortalCustomerMetersGet.ts +200 -0
- package/src/funcs/customerPortalCustomerMetersList.ts +267 -0
- package/src/funcs/customerPortalCustomersAddPaymentMethod.ts +1 -1
- package/src/funcs/customerPortalCustomersDeletePaymentMethod.ts +1 -1
- package/src/funcs/customerPortalCustomersGet.ts +1 -1
- package/src/funcs/customerPortalCustomersGetPaymentMethods.ts +1 -1
- package/src/funcs/customerPortalCustomersUpdate.ts +1 -1
- package/src/funcs/customerPortalDownloadablesList.ts +1 -1
- package/src/funcs/customerPortalLicenseKeysGet.ts +1 -1
- package/src/funcs/customerPortalLicenseKeysList.ts +1 -1
- package/src/funcs/customerPortalOrdersGet.ts +1 -1
- package/src/funcs/customerPortalOrdersInvoice.ts +1 -1
- package/src/funcs/customerPortalOrdersList.ts +1 -1
- package/src/funcs/customerPortalSubscriptionsCancel.ts +1 -1
- package/src/funcs/customerPortalSubscriptionsGet.ts +1 -1
- package/src/funcs/customerPortalSubscriptionsList.ts +1 -1
- package/src/funcs/customerPortalSubscriptionsUpdate.ts +1 -1
- package/src/funcs/eventsList.ts +2 -0
- package/src/funcs/eventsListNames.ts +255 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +8 -1
- package/src/mcp-server/resources.ts +16 -2
- package/src/mcp-server/scopes.ts +1 -0
- package/src/mcp-server/server.ts +7 -3
- package/src/mcp-server/tools/customerMetersGet.ts +40 -0
- package/src/mcp-server/tools/customerMetersList.ts +40 -0
- package/src/mcp-server/tools.ts +6 -3
- package/src/models/components/benefitgrantmetercreditproperties.ts +90 -0
- package/src/models/components/benefitmetercreditcreateproperties.ts +4 -4
- package/src/models/components/benefitmetercreditproperties.ts +4 -4
- package/src/models/components/benefitmetercreditsubscriber.ts +155 -0
- package/src/models/components/benefitmetercreditsubscriberproperties.ts +88 -0
- package/src/models/components/checkout.ts +4 -4
- package/src/models/components/checkoutpublic.ts +4 -4
- package/src/models/components/checkoutpublicconfirmed.ts +4 -4
- package/src/models/components/customerbenefitgrant.ts +12 -2
- package/src/models/components/customerbenefitgrantmetercredit.ts +180 -0
- package/src/models/components/customerbenefitgrantmetercreditupdate.ts +80 -0
- package/src/models/components/customerbenefitgrantupdate.ts +20 -0
- package/src/models/components/customercustomermeter.ts +149 -0
- package/src/models/components/customercustomermetermeter.ts +103 -0
- package/src/models/components/customercustomermetersortproperty.ts +48 -0
- package/src/models/components/customermeter.ts +161 -0
- package/src/models/components/customermetersortproperty.ts +51 -0
- package/src/models/components/customerstate.ts +17 -1
- package/src/models/components/customerstatemeter.ts +126 -0
- package/src/models/components/eventname.ts +97 -0
- package/src/models/components/eventnamessortproperty.ts +39 -0
- package/src/models/components/listresourcecustomercustomermeter.ts +85 -0
- package/src/models/components/listresourcecustomermeter.ts +82 -0
- package/src/models/components/listresourceeventname.ts +82 -0
- package/src/models/components/meterquantities.ts +7 -0
- package/src/models/components/oauth2client.ts +2 -2
- package/src/models/components/oauth2clientconfiguration.ts +2 -2
- package/src/models/components/oauth2clientconfigurationupdate.ts +2 -2
- package/src/models/components/productcreate.ts +1 -1
- package/src/models/components/productpricemeteredunit.ts +4 -4
- package/src/models/components/productpricemeteredunitcreate.ts +54 -5
- package/src/models/components/scope.ts +3 -0
- package/src/models/components/webhookcustomerstatechangedpayload.ts +2 -1
- package/src/models/errors/expiredcheckouterror.ts +77 -0
- package/src/models/operations/customermetersget.ts +69 -0
- package/src/models/operations/customermeterslist.ts +475 -0
- package/src/models/operations/customerportalcustomermetersget.ts +153 -0
- package/src/models/operations/customerportalcustomermeterslist.ts +333 -0
- package/src/models/operations/eventslist.ts +65 -0
- package/src/models/operations/eventslistnames.ts +403 -0
- package/src/models/operations/metersquantities.ts +39 -27
- package/src/sdk/customermeters.ts +55 -0
- package/src/sdk/customerportal.ts +6 -0
- package/src/sdk/events.ts +24 -0
- package/src/sdk/meters.ts +0 -24
- package/src/sdk/polarcustomermeters.ts +65 -0
- package/src/sdk/sdk.ts +6 -0
- package/dist/commonjs/funcs/metersEvents.d.ts +0 -23
- package/dist/commonjs/funcs/metersEvents.d.ts.map +0 -1
- package/dist/commonjs/funcs/metersEvents.js.map +0 -1
- package/dist/commonjs/models/operations/metersevents.d.ts +0 -68
- package/dist/commonjs/models/operations/metersevents.d.ts.map +0 -1
- package/dist/commonjs/models/operations/metersevents.js +0 -100
- package/dist/commonjs/models/operations/metersevents.js.map +0 -1
- package/dist/esm/funcs/metersEvents.d.ts +0 -23
- package/dist/esm/funcs/metersEvents.d.ts.map +0 -1
- package/dist/esm/funcs/metersEvents.js.map +0 -1
- package/dist/esm/models/operations/metersevents.d.ts +0 -68
- package/dist/esm/models/operations/metersevents.d.ts.map +0 -1
- package/dist/esm/models/operations/metersevents.js +0 -70
- package/dist/esm/models/operations/metersevents.js.map +0 -1
- package/src/models/operations/metersevents.ts +0 -156
package/bin/mcp-server.js
CHANGED
|
@@ -4018,9 +4018,9 @@ var init_config = __esm(() => {
|
|
|
4018
4018
|
SDK_METADATA = {
|
|
4019
4019
|
language: "typescript",
|
|
4020
4020
|
openapiDocVersion: "0.1.0",
|
|
4021
|
-
sdkVersion: "0.32.
|
|
4022
|
-
genVersion: "2.
|
|
4023
|
-
userAgent: "speakeasy-sdk/typescript 0.32.
|
|
4021
|
+
sdkVersion: "0.32.7",
|
|
4022
|
+
genVersion: "2.568.2",
|
|
4023
|
+
userAgent: "speakeasy-sdk/typescript 0.32.7 2.568.2 0.1.0 @polar-sh/sdk"
|
|
4024
4024
|
};
|
|
4025
4025
|
});
|
|
4026
4026
|
|
|
@@ -4076,20 +4076,6 @@ var init_console_logger = __esm(() => {
|
|
|
4076
4076
|
];
|
|
4077
4077
|
});
|
|
4078
4078
|
|
|
4079
|
-
// src/mcp-server/scopes.ts
|
|
4080
|
-
var mcpScopes;
|
|
4081
|
-
var init_scopes = __esm(() => {
|
|
4082
|
-
mcpScopes = [
|
|
4083
|
-
"customers",
|
|
4084
|
-
"metrics",
|
|
4085
|
-
"orders",
|
|
4086
|
-
"products",
|
|
4087
|
-
"read",
|
|
4088
|
-
"subscriptions",
|
|
4089
|
-
"write"
|
|
4090
|
-
];
|
|
4091
|
-
});
|
|
4092
|
-
|
|
4093
4079
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
4094
4080
|
var LATEST_PROTOCOL_VERSION = "2024-11-05", SUPPORTED_PROTOCOL_VERSIONS, JSONRPC_VERSION = "2.0", ProgressTokenSchema, CursorSchema, BaseRequestParamsSchema, RequestSchema, BaseNotificationParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, ErrorCode, JSONRPCErrorSchema, JSONRPCMessageSchema, EmptyResultSchema, CancelledNotificationSchema, ImplementationSchema, ClientCapabilitiesSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationSchema, PaginatedRequestSchema, PaginatedResultSchema, ResourceContentsSchema, TextResourceContentsSchema, BlobResourceContentsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, EmbeddedResourceSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, LoggingLevelSchema, SetLevelRequestSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, SamplingMessageSchema, CreateMessageRequestSchema, CreateMessageResultSchema, ResourceReferenceSchema, PromptReferenceSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError;
|
|
4095
4081
|
var init_types = __esm(() => {
|
|
@@ -35008,7 +34994,10 @@ var init_core = __esm(() => {
|
|
|
35008
34994
|
function createRegisterPrompt(logger, server, sdk, allowedScopes) {
|
|
35009
34995
|
return (prompt) => {
|
|
35010
34996
|
const scopes = prompt.scopes ?? [];
|
|
35011
|
-
if (
|
|
34997
|
+
if (allowedScopes.size > 0 && scopes.length === 0) {
|
|
34998
|
+
return;
|
|
34999
|
+
}
|
|
35000
|
+
if (allowedScopes.size > 0 && !scopes.every((s) => allowedScopes.has(s))) {
|
|
35012
35001
|
return;
|
|
35013
35002
|
}
|
|
35014
35003
|
if (prompt.args) {
|
|
@@ -35079,7 +35068,10 @@ var init_shared = __esm(() => {
|
|
|
35079
35068
|
function createRegisterResource(logger, server, sdk, allowedScopes) {
|
|
35080
35069
|
return (resource) => {
|
|
35081
35070
|
const scopes = resource.scopes ?? [];
|
|
35082
|
-
if (
|
|
35071
|
+
if (allowedScopes.size > 0 && scopes.length === 0) {
|
|
35072
|
+
return;
|
|
35073
|
+
}
|
|
35074
|
+
if (allowedScopes.size > 0 && !scopes.every((s) => allowedScopes.has(s))) {
|
|
35083
35075
|
return;
|
|
35084
35076
|
}
|
|
35085
35077
|
const metadata = {
|
|
@@ -35093,7 +35085,10 @@ function createRegisterResource(logger, server, sdk, allowedScopes) {
|
|
|
35093
35085
|
function createRegisterResourceTemplate(logger, server, sdk, allowedScopes) {
|
|
35094
35086
|
return (resource) => {
|
|
35095
35087
|
const scopes = resource.scopes ?? [];
|
|
35096
|
-
if (
|
|
35088
|
+
if (allowedScopes.size > 0 && scopes.length === 0) {
|
|
35089
|
+
return;
|
|
35090
|
+
}
|
|
35091
|
+
if (allowedScopes.size > 0 && !scopes.every((s) => allowedScopes.has(s))) {
|
|
35097
35092
|
return;
|
|
35098
35093
|
}
|
|
35099
35094
|
const metadata = {
|
|
@@ -35151,11 +35146,11 @@ function createRegisterTool(logger, server, sdk, allowedScopes, allowedTools) {
|
|
|
35151
35146
|
if (allowedTools && !allowedTools.has(tool.name)) {
|
|
35152
35147
|
return;
|
|
35153
35148
|
}
|
|
35154
|
-
const
|
|
35155
|
-
if (allowedScopes.size > 0 &&
|
|
35149
|
+
const scopes = tool.scopes ?? [];
|
|
35150
|
+
if (allowedScopes.size > 0 && scopes.length === 0) {
|
|
35156
35151
|
return;
|
|
35157
35152
|
}
|
|
35158
|
-
if (!
|
|
35153
|
+
if (allowedScopes.size > 0 && !scopes.every((s) => allowedScopes.has(s))) {
|
|
35159
35154
|
return;
|
|
35160
35155
|
}
|
|
35161
35156
|
if (tool.args) {
|
|
@@ -35781,61 +35776,290 @@ var init_customer = __esm(() => {
|
|
|
35781
35776
|
})(Customer$ ||= {});
|
|
35782
35777
|
});
|
|
35783
35778
|
|
|
35784
|
-
// src/models/components/
|
|
35785
|
-
var
|
|
35786
|
-
var
|
|
35779
|
+
// src/models/components/countaggregation.ts
|
|
35780
|
+
var CountAggregation$inboundSchema, CountAggregation$outboundSchema, CountAggregation$;
|
|
35781
|
+
var init_countaggregation = __esm(() => {
|
|
35782
|
+
init_lib();
|
|
35783
|
+
CountAggregation$inboundSchema = objectType({
|
|
35784
|
+
func: literalType("count").default("count")
|
|
35785
|
+
});
|
|
35786
|
+
CountAggregation$outboundSchema = objectType({
|
|
35787
|
+
func: literalType("count").default("count")
|
|
35788
|
+
});
|
|
35789
|
+
((CountAggregation$) => {
|
|
35790
|
+
CountAggregation$.inboundSchema = CountAggregation$inboundSchema;
|
|
35791
|
+
CountAggregation$.outboundSchema = CountAggregation$outboundSchema;
|
|
35792
|
+
})(CountAggregation$ ||= {});
|
|
35793
|
+
});
|
|
35794
|
+
|
|
35795
|
+
// src/models/components/filteroperator.ts
|
|
35796
|
+
var FilterOperator, FilterOperator$inboundSchema, FilterOperator$outboundSchema, FilterOperator$;
|
|
35797
|
+
var init_filteroperator = __esm(() => {
|
|
35798
|
+
init_lib();
|
|
35799
|
+
FilterOperator = {
|
|
35800
|
+
Eq: "eq",
|
|
35801
|
+
Ne: "ne",
|
|
35802
|
+
Gt: "gt",
|
|
35803
|
+
Gte: "gte",
|
|
35804
|
+
Lt: "lt",
|
|
35805
|
+
Lte: "lte",
|
|
35806
|
+
Like: "like",
|
|
35807
|
+
NotLike: "not_like"
|
|
35808
|
+
};
|
|
35809
|
+
FilterOperator$inboundSchema = nativeEnumType(FilterOperator);
|
|
35810
|
+
FilterOperator$outboundSchema = FilterOperator$inboundSchema;
|
|
35811
|
+
((FilterOperator$) => {
|
|
35812
|
+
FilterOperator$.inboundSchema = FilterOperator$inboundSchema;
|
|
35813
|
+
FilterOperator$.outboundSchema = FilterOperator$outboundSchema;
|
|
35814
|
+
})(FilterOperator$ ||= {});
|
|
35815
|
+
});
|
|
35816
|
+
|
|
35817
|
+
// src/models/components/filterclause.ts
|
|
35818
|
+
var Value$inboundSchema, Value$outboundSchema, Value$, FilterClause$inboundSchema, FilterClause$outboundSchema, FilterClause$;
|
|
35819
|
+
var init_filterclause = __esm(() => {
|
|
35820
|
+
init_lib();
|
|
35821
|
+
init_filteroperator();
|
|
35822
|
+
Value$inboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
|
|
35823
|
+
Value$outboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
|
|
35824
|
+
((Value$) => {
|
|
35825
|
+
Value$.inboundSchema = Value$inboundSchema;
|
|
35826
|
+
Value$.outboundSchema = Value$outboundSchema;
|
|
35827
|
+
})(Value$ ||= {});
|
|
35828
|
+
FilterClause$inboundSchema = objectType({
|
|
35829
|
+
property: stringType(),
|
|
35830
|
+
operator: FilterOperator$inboundSchema,
|
|
35831
|
+
value: unionType([stringType(), numberType().int(), booleanType()])
|
|
35832
|
+
});
|
|
35833
|
+
FilterClause$outboundSchema = objectType({
|
|
35834
|
+
property: stringType(),
|
|
35835
|
+
operator: FilterOperator$outboundSchema,
|
|
35836
|
+
value: unionType([stringType(), numberType().int(), booleanType()])
|
|
35837
|
+
});
|
|
35838
|
+
((FilterClause$) => {
|
|
35839
|
+
FilterClause$.inboundSchema = FilterClause$inboundSchema;
|
|
35840
|
+
FilterClause$.outboundSchema = FilterClause$outboundSchema;
|
|
35841
|
+
})(FilterClause$ ||= {});
|
|
35842
|
+
});
|
|
35843
|
+
|
|
35844
|
+
// src/models/components/filterconjunction.ts
|
|
35845
|
+
var FilterConjunction, FilterConjunction$inboundSchema, FilterConjunction$outboundSchema, FilterConjunction$;
|
|
35846
|
+
var init_filterconjunction = __esm(() => {
|
|
35847
|
+
init_lib();
|
|
35848
|
+
FilterConjunction = {
|
|
35849
|
+
And: "and",
|
|
35850
|
+
Or: "or"
|
|
35851
|
+
};
|
|
35852
|
+
FilterConjunction$inboundSchema = nativeEnumType(FilterConjunction);
|
|
35853
|
+
FilterConjunction$outboundSchema = FilterConjunction$inboundSchema;
|
|
35854
|
+
((FilterConjunction$) => {
|
|
35855
|
+
FilterConjunction$.inboundSchema = FilterConjunction$inboundSchema;
|
|
35856
|
+
FilterConjunction$.outboundSchema = FilterConjunction$outboundSchema;
|
|
35857
|
+
})(FilterConjunction$ ||= {});
|
|
35858
|
+
});
|
|
35859
|
+
|
|
35860
|
+
// src/models/components/filter.ts
|
|
35861
|
+
var Clauses$inboundSchema, Clauses$outboundSchema, Clauses$, Filter$inboundSchema, Filter$outboundSchema, Filter$;
|
|
35862
|
+
var init_filter = __esm(() => {
|
|
35863
|
+
init_lib();
|
|
35864
|
+
init_filterclause();
|
|
35865
|
+
init_filterconjunction();
|
|
35866
|
+
Clauses$inboundSchema = unionType([lazyType(() => Filter$inboundSchema), FilterClause$inboundSchema]);
|
|
35867
|
+
Clauses$outboundSchema = unionType([lazyType(() => Filter$outboundSchema), FilterClause$outboundSchema]);
|
|
35868
|
+
((Clauses$) => {
|
|
35869
|
+
Clauses$.inboundSchema = Clauses$inboundSchema;
|
|
35870
|
+
Clauses$.outboundSchema = Clauses$outboundSchema;
|
|
35871
|
+
})(Clauses$ ||= {});
|
|
35872
|
+
Filter$inboundSchema = objectType({
|
|
35873
|
+
conjunction: FilterConjunction$inboundSchema,
|
|
35874
|
+
clauses: arrayType(unionType([lazyType(() => Filter$inboundSchema), FilterClause$inboundSchema]))
|
|
35875
|
+
});
|
|
35876
|
+
Filter$outboundSchema = objectType({
|
|
35877
|
+
conjunction: FilterConjunction$outboundSchema,
|
|
35878
|
+
clauses: arrayType(unionType([lazyType(() => Filter$outboundSchema), FilterClause$outboundSchema]))
|
|
35879
|
+
});
|
|
35880
|
+
((Filter$) => {
|
|
35881
|
+
Filter$.inboundSchema = Filter$inboundSchema;
|
|
35882
|
+
Filter$.outboundSchema = Filter$outboundSchema;
|
|
35883
|
+
})(Filter$ ||= {});
|
|
35884
|
+
});
|
|
35885
|
+
|
|
35886
|
+
// src/models/components/propertyaggregation.ts
|
|
35887
|
+
var Func, Func$inboundSchema, Func$outboundSchema, Func$, PropertyAggregation$inboundSchema, PropertyAggregation$outboundSchema, PropertyAggregation$;
|
|
35888
|
+
var init_propertyaggregation = __esm(() => {
|
|
35889
|
+
init_lib();
|
|
35890
|
+
Func = {
|
|
35891
|
+
Sum: "sum",
|
|
35892
|
+
Max: "max",
|
|
35893
|
+
Min: "min",
|
|
35894
|
+
Avg: "avg"
|
|
35895
|
+
};
|
|
35896
|
+
Func$inboundSchema = nativeEnumType(Func);
|
|
35897
|
+
Func$outboundSchema = Func$inboundSchema;
|
|
35898
|
+
((Func$) => {
|
|
35899
|
+
Func$.inboundSchema = Func$inboundSchema;
|
|
35900
|
+
Func$.outboundSchema = Func$outboundSchema;
|
|
35901
|
+
})(Func$ ||= {});
|
|
35902
|
+
PropertyAggregation$inboundSchema = objectType({
|
|
35903
|
+
func: Func$inboundSchema,
|
|
35904
|
+
property: stringType()
|
|
35905
|
+
});
|
|
35906
|
+
PropertyAggregation$outboundSchema = objectType({
|
|
35907
|
+
func: Func$outboundSchema,
|
|
35908
|
+
property: stringType()
|
|
35909
|
+
});
|
|
35910
|
+
((PropertyAggregation$) => {
|
|
35911
|
+
PropertyAggregation$.inboundSchema = PropertyAggregation$inboundSchema;
|
|
35912
|
+
PropertyAggregation$.outboundSchema = PropertyAggregation$outboundSchema;
|
|
35913
|
+
})(PropertyAggregation$ ||= {});
|
|
35914
|
+
});
|
|
35915
|
+
|
|
35916
|
+
// src/models/components/meter.ts
|
|
35917
|
+
var MeterMetadata$inboundSchema, MeterMetadata$outboundSchema, MeterMetadata$, MeterAggregation$inboundSchema, MeterAggregation$outboundSchema, MeterAggregation$, Meter$inboundSchema, Meter$outboundSchema, Meter$;
|
|
35918
|
+
var init_meter = __esm(() => {
|
|
35787
35919
|
init_lib();
|
|
35788
35920
|
init_primitives();
|
|
35789
|
-
|
|
35790
|
-
|
|
35791
|
-
|
|
35792
|
-
|
|
35793
|
-
((
|
|
35794
|
-
|
|
35795
|
-
|
|
35796
|
-
|
|
35797
|
-
|
|
35798
|
-
|
|
35799
|
-
|
|
35800
|
-
|
|
35801
|
-
|
|
35802
|
-
|
|
35803
|
-
|
|
35804
|
-
|
|
35805
|
-
|
|
35806
|
-
|
|
35807
|
-
|
|
35808
|
-
|
|
35809
|
-
|
|
35810
|
-
|
|
35921
|
+
init_countaggregation();
|
|
35922
|
+
init_filter();
|
|
35923
|
+
init_propertyaggregation();
|
|
35924
|
+
MeterMetadata$inboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
|
|
35925
|
+
MeterMetadata$outboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
|
|
35926
|
+
((MeterMetadata$) => {
|
|
35927
|
+
MeterMetadata$.inboundSchema = MeterMetadata$inboundSchema;
|
|
35928
|
+
MeterMetadata$.outboundSchema = MeterMetadata$outboundSchema;
|
|
35929
|
+
})(MeterMetadata$ ||= {});
|
|
35930
|
+
MeterAggregation$inboundSchema = unionType([
|
|
35931
|
+
CountAggregation$inboundSchema.and(objectType({ func: literalType("count") }).transform((v2) => ({ func: v2.func }))),
|
|
35932
|
+
PropertyAggregation$inboundSchema.and(objectType({ func: literalType("avg") }).transform((v2) => ({ func: v2.func }))),
|
|
35933
|
+
PropertyAggregation$inboundSchema.and(objectType({ func: literalType("max") }).transform((v2) => ({ func: v2.func }))),
|
|
35934
|
+
PropertyAggregation$inboundSchema.and(objectType({ func: literalType("min") }).transform((v2) => ({ func: v2.func }))),
|
|
35935
|
+
PropertyAggregation$inboundSchema.and(objectType({ func: literalType("sum") }).transform((v2) => ({ func: v2.func })))
|
|
35936
|
+
]);
|
|
35937
|
+
MeterAggregation$outboundSchema = unionType([
|
|
35938
|
+
CountAggregation$outboundSchema.and(objectType({ func: literalType("count") }).transform((v2) => ({ func: v2.func }))),
|
|
35939
|
+
PropertyAggregation$outboundSchema.and(objectType({ func: literalType("avg") }).transform((v2) => ({ func: v2.func }))),
|
|
35940
|
+
PropertyAggregation$outboundSchema.and(objectType({ func: literalType("max") }).transform((v2) => ({ func: v2.func }))),
|
|
35941
|
+
PropertyAggregation$outboundSchema.and(objectType({ func: literalType("min") }).transform((v2) => ({ func: v2.func }))),
|
|
35942
|
+
PropertyAggregation$outboundSchema.and(objectType({ func: literalType("sum") }).transform((v2) => ({ func: v2.func })))
|
|
35943
|
+
]);
|
|
35944
|
+
((MeterAggregation$) => {
|
|
35945
|
+
MeterAggregation$.inboundSchema = MeterAggregation$inboundSchema;
|
|
35946
|
+
MeterAggregation$.outboundSchema = MeterAggregation$outboundSchema;
|
|
35947
|
+
})(MeterAggregation$ ||= {});
|
|
35948
|
+
Meter$inboundSchema = objectType({
|
|
35949
|
+
metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
|
|
35950
|
+
created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
|
|
35951
|
+
modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
|
|
35952
|
+
id: stringType(),
|
|
35953
|
+
name: stringType(),
|
|
35954
|
+
filter: Filter$inboundSchema,
|
|
35955
|
+
aggregation: unionType([
|
|
35956
|
+
CountAggregation$inboundSchema.and(objectType({ func: literalType("count") }).transform((v2) => ({
|
|
35957
|
+
func: v2.func
|
|
35958
|
+
}))),
|
|
35959
|
+
PropertyAggregation$inboundSchema.and(objectType({ func: literalType("avg") }).transform((v2) => ({
|
|
35960
|
+
func: v2.func
|
|
35961
|
+
}))),
|
|
35962
|
+
PropertyAggregation$inboundSchema.and(objectType({ func: literalType("max") }).transform((v2) => ({
|
|
35963
|
+
func: v2.func
|
|
35964
|
+
}))),
|
|
35965
|
+
PropertyAggregation$inboundSchema.and(objectType({ func: literalType("min") }).transform((v2) => ({
|
|
35966
|
+
func: v2.func
|
|
35967
|
+
}))),
|
|
35968
|
+
PropertyAggregation$inboundSchema.and(objectType({ func: literalType("sum") }).transform((v2) => ({
|
|
35969
|
+
func: v2.func
|
|
35970
|
+
})))
|
|
35971
|
+
]),
|
|
35972
|
+
organization_id: stringType()
|
|
35811
35973
|
}).transform((v2) => {
|
|
35812
35974
|
return remap(v2, {
|
|
35813
|
-
|
|
35814
|
-
|
|
35815
|
-
tax_id: "taxId",
|
|
35975
|
+
created_at: "createdAt",
|
|
35976
|
+
modified_at: "modifiedAt",
|
|
35816
35977
|
organization_id: "organizationId"
|
|
35817
35978
|
});
|
|
35818
35979
|
});
|
|
35819
|
-
|
|
35820
|
-
metadata: recordType(unionType([stringType(), numberType().int(), booleanType()]))
|
|
35821
|
-
|
|
35822
|
-
|
|
35823
|
-
|
|
35824
|
-
|
|
35825
|
-
|
|
35826
|
-
|
|
35980
|
+
Meter$outboundSchema = objectType({
|
|
35981
|
+
metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])),
|
|
35982
|
+
createdAt: dateType().transform((v2) => v2.toISOString()),
|
|
35983
|
+
modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
|
|
35984
|
+
id: stringType(),
|
|
35985
|
+
name: stringType(),
|
|
35986
|
+
filter: Filter$outboundSchema,
|
|
35987
|
+
aggregation: unionType([
|
|
35988
|
+
CountAggregation$outboundSchema.and(objectType({ func: literalType("count") }).transform((v2) => ({
|
|
35989
|
+
func: v2.func
|
|
35990
|
+
}))),
|
|
35991
|
+
PropertyAggregation$outboundSchema.and(objectType({ func: literalType("avg") }).transform((v2) => ({ func: v2.func }))),
|
|
35992
|
+
PropertyAggregation$outboundSchema.and(objectType({ func: literalType("max") }).transform((v2) => ({ func: v2.func }))),
|
|
35993
|
+
PropertyAggregation$outboundSchema.and(objectType({ func: literalType("min") }).transform((v2) => ({ func: v2.func }))),
|
|
35994
|
+
PropertyAggregation$outboundSchema.and(objectType({ func: literalType("sum") }).transform((v2) => ({ func: v2.func })))
|
|
35995
|
+
]),
|
|
35996
|
+
organizationId: stringType()
|
|
35827
35997
|
}).transform((v2) => {
|
|
35828
35998
|
return remap(v2, {
|
|
35829
|
-
|
|
35830
|
-
|
|
35831
|
-
taxId: "tax_id",
|
|
35999
|
+
createdAt: "created_at",
|
|
36000
|
+
modifiedAt: "modified_at",
|
|
35832
36001
|
organizationId: "organization_id"
|
|
35833
36002
|
});
|
|
35834
36003
|
});
|
|
35835
|
-
((
|
|
35836
|
-
|
|
35837
|
-
|
|
35838
|
-
})(
|
|
36004
|
+
((Meter$) => {
|
|
36005
|
+
Meter$.inboundSchema = Meter$inboundSchema;
|
|
36006
|
+
Meter$.outboundSchema = Meter$outboundSchema;
|
|
36007
|
+
})(Meter$ ||= {});
|
|
36008
|
+
});
|
|
36009
|
+
|
|
36010
|
+
// src/models/components/customermeter.ts
|
|
36011
|
+
var CustomerMeter$inboundSchema, CustomerMeter$outboundSchema, CustomerMeter$;
|
|
36012
|
+
var init_customermeter = __esm(() => {
|
|
36013
|
+
init_lib();
|
|
36014
|
+
init_primitives();
|
|
36015
|
+
init_customer();
|
|
36016
|
+
init_meter();
|
|
36017
|
+
CustomerMeter$inboundSchema = objectType({
|
|
36018
|
+
id: stringType(),
|
|
36019
|
+
created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
|
|
36020
|
+
modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
|
|
36021
|
+
customer_id: stringType(),
|
|
36022
|
+
meter_id: stringType(),
|
|
36023
|
+
consumed_units: numberType(),
|
|
36024
|
+
credited_units: numberType().int(),
|
|
36025
|
+
balance: numberType(),
|
|
36026
|
+
customer: Customer$inboundSchema,
|
|
36027
|
+
meter: Meter$inboundSchema
|
|
36028
|
+
}).transform((v2) => {
|
|
36029
|
+
return remap(v2, {
|
|
36030
|
+
created_at: "createdAt",
|
|
36031
|
+
modified_at: "modifiedAt",
|
|
36032
|
+
customer_id: "customerId",
|
|
36033
|
+
meter_id: "meterId",
|
|
36034
|
+
consumed_units: "consumedUnits",
|
|
36035
|
+
credited_units: "creditedUnits"
|
|
36036
|
+
});
|
|
36037
|
+
});
|
|
36038
|
+
CustomerMeter$outboundSchema = objectType({
|
|
36039
|
+
id: stringType(),
|
|
36040
|
+
createdAt: dateType().transform((v2) => v2.toISOString()),
|
|
36041
|
+
modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
|
|
36042
|
+
customerId: stringType(),
|
|
36043
|
+
meterId: stringType(),
|
|
36044
|
+
consumedUnits: numberType(),
|
|
36045
|
+
creditedUnits: numberType().int(),
|
|
36046
|
+
balance: numberType(),
|
|
36047
|
+
customer: Customer$outboundSchema,
|
|
36048
|
+
meter: Meter$outboundSchema
|
|
36049
|
+
}).transform((v2) => {
|
|
36050
|
+
return remap(v2, {
|
|
36051
|
+
createdAt: "created_at",
|
|
36052
|
+
modifiedAt: "modified_at",
|
|
36053
|
+
customerId: "customer_id",
|
|
36054
|
+
meterId: "meter_id",
|
|
36055
|
+
consumedUnits: "consumed_units",
|
|
36056
|
+
creditedUnits: "credited_units"
|
|
36057
|
+
});
|
|
36058
|
+
});
|
|
36059
|
+
((CustomerMeter$) => {
|
|
36060
|
+
CustomerMeter$.inboundSchema = CustomerMeter$inboundSchema;
|
|
36061
|
+
CustomerMeter$.outboundSchema = CustomerMeter$outboundSchema;
|
|
36062
|
+
})(CustomerMeter$ ||= {});
|
|
35839
36063
|
});
|
|
35840
36064
|
|
|
35841
36065
|
// src/models/components/validationerror.ts
|
|
@@ -35895,137 +36119,6 @@ var init_httpvalidationerror = __esm(() => {
|
|
|
35895
36119
|
})(HTTPValidationError$ ||= {});
|
|
35896
36120
|
});
|
|
35897
36121
|
|
|
35898
|
-
// src/types/async.ts
|
|
35899
|
-
var APIPromise;
|
|
35900
|
-
var init_async = __esm(() => {
|
|
35901
|
-
APIPromise = class APIPromise {
|
|
35902
|
-
#promise;
|
|
35903
|
-
#unwrapped;
|
|
35904
|
-
[Symbol.toStringTag] = "APIPromise";
|
|
35905
|
-
constructor(p) {
|
|
35906
|
-
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
35907
|
-
this.#unwrapped = p instanceof Promise ? this.#promise.then(([value]) => value) : Promise.resolve(p[0]);
|
|
35908
|
-
}
|
|
35909
|
-
then(onfulfilled, onrejected) {
|
|
35910
|
-
return this.#promise.then(onfulfilled ? ([value]) => onfulfilled(value) : undefined, onrejected);
|
|
35911
|
-
}
|
|
35912
|
-
catch(onrejected) {
|
|
35913
|
-
return this.#unwrapped.catch(onrejected);
|
|
35914
|
-
}
|
|
35915
|
-
finally(onfinally) {
|
|
35916
|
-
return this.#unwrapped.finally(onfinally);
|
|
35917
|
-
}
|
|
35918
|
-
$inspect() {
|
|
35919
|
-
return this.#promise;
|
|
35920
|
-
}
|
|
35921
|
-
};
|
|
35922
|
-
});
|
|
35923
|
-
|
|
35924
|
-
// src/funcs/customersCreate.ts
|
|
35925
|
-
function customersCreate(client, request, options) {
|
|
35926
|
-
return new APIPromise($do(client, request, options));
|
|
35927
|
-
}
|
|
35928
|
-
async function $do(client, request, options) {
|
|
35929
|
-
const parsed = safeParse(request, (value) => CustomerCreate$outboundSchema.parse(value), "Input validation failed");
|
|
35930
|
-
if (!parsed.ok) {
|
|
35931
|
-
return [parsed, { status: "invalid" }];
|
|
35932
|
-
}
|
|
35933
|
-
const payload = parsed.value;
|
|
35934
|
-
const body = encodeJSON("body", payload, { explode: true });
|
|
35935
|
-
const path = pathToFunc("/v1/customers/")();
|
|
35936
|
-
const headers = new Headers(compactMap({
|
|
35937
|
-
"Content-Type": "application/json",
|
|
35938
|
-
Accept: "application/json"
|
|
35939
|
-
}));
|
|
35940
|
-
const secConfig = await extractSecurity(client._options.accessToken);
|
|
35941
|
-
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
|
35942
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
35943
|
-
const context = {
|
|
35944
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
35945
|
-
operationID: "customers:create",
|
|
35946
|
-
oAuth2Scopes: [],
|
|
35947
|
-
resolvedSecurity: requestSecurity,
|
|
35948
|
-
securitySource: client._options.accessToken,
|
|
35949
|
-
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
35950
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
35951
|
-
};
|
|
35952
|
-
const requestRes = client._createRequest(context, {
|
|
35953
|
-
security: requestSecurity,
|
|
35954
|
-
method: "POST",
|
|
35955
|
-
baseURL: options?.serverURL,
|
|
35956
|
-
path,
|
|
35957
|
-
headers,
|
|
35958
|
-
body,
|
|
35959
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
35960
|
-
}, options);
|
|
35961
|
-
if (!requestRes.ok) {
|
|
35962
|
-
return [requestRes, { status: "invalid" }];
|
|
35963
|
-
}
|
|
35964
|
-
const req = requestRes.value;
|
|
35965
|
-
const doResult = await client._do(req, {
|
|
35966
|
-
context,
|
|
35967
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
35968
|
-
retryConfig: context.retryConfig,
|
|
35969
|
-
retryCodes: context.retryCodes
|
|
35970
|
-
});
|
|
35971
|
-
if (!doResult.ok) {
|
|
35972
|
-
return [doResult, { status: "request-error", request: req }];
|
|
35973
|
-
}
|
|
35974
|
-
const response = doResult.value;
|
|
35975
|
-
const responseFields = {
|
|
35976
|
-
HttpMeta: { Response: response, Request: req }
|
|
35977
|
-
};
|
|
35978
|
-
const [result] = await match(json(201, Customer$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
35979
|
-
if (!result.ok) {
|
|
35980
|
-
return [result, { status: "complete", request: req, response }];
|
|
35981
|
-
}
|
|
35982
|
-
return [result, { status: "complete", request: req, response }];
|
|
35983
|
-
}
|
|
35984
|
-
var init_customersCreate = __esm(() => {
|
|
35985
|
-
init_encodings();
|
|
35986
|
-
init_matchers();
|
|
35987
|
-
init_primitives();
|
|
35988
|
-
init_schemas();
|
|
35989
|
-
init_security();
|
|
35990
|
-
init_url();
|
|
35991
|
-
init_customer();
|
|
35992
|
-
init_customercreate();
|
|
35993
|
-
init_httpvalidationerror();
|
|
35994
|
-
init_async();
|
|
35995
|
-
});
|
|
35996
|
-
|
|
35997
|
-
// src/mcp-server/tools/customersCreate.ts
|
|
35998
|
-
var args, tool$customersCreate;
|
|
35999
|
-
var init_customersCreate2 = __esm(() => {
|
|
36000
|
-
init_customersCreate();
|
|
36001
|
-
init_customercreate();
|
|
36002
|
-
init_tools();
|
|
36003
|
-
args = {
|
|
36004
|
-
request: CustomerCreate$inboundSchema
|
|
36005
|
-
};
|
|
36006
|
-
tool$customersCreate = {
|
|
36007
|
-
name: "customers-create",
|
|
36008
|
-
description: `Create Customer
|
|
36009
|
-
|
|
36010
|
-
Create a customer.
|
|
36011
|
-
|
|
36012
|
-
**Scopes**: \`customers:write\``,
|
|
36013
|
-
scopes: ["write", "customers"],
|
|
36014
|
-
args,
|
|
36015
|
-
tool: async (client, args2, ctx) => {
|
|
36016
|
-
const [result, apiCall] = await customersCreate(client, args2.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
36017
|
-
if (!result.ok) {
|
|
36018
|
-
return {
|
|
36019
|
-
content: [{ type: "text", text: result.error.message }],
|
|
36020
|
-
isError: true
|
|
36021
|
-
};
|
|
36022
|
-
}
|
|
36023
|
-
const value = result.value;
|
|
36024
|
-
return formatResult(value, apiCall);
|
|
36025
|
-
}
|
|
36026
|
-
};
|
|
36027
|
-
});
|
|
36028
|
-
|
|
36029
36122
|
// src/models/errors/resourcenotfound.ts
|
|
36030
36123
|
var ResourceNotFound, ResourceNotFound$inboundSchema, ResourceNotFound$outboundSchema, ResourceNotFound$;
|
|
36031
36124
|
var init_resourcenotfound = __esm(() => {
|
|
@@ -36059,28 +36152,54 @@ var init_resourcenotfound = __esm(() => {
|
|
|
36059
36152
|
})(ResourceNotFound$ ||= {});
|
|
36060
36153
|
});
|
|
36061
36154
|
|
|
36062
|
-
// src/models/operations/
|
|
36063
|
-
var
|
|
36064
|
-
var
|
|
36155
|
+
// src/models/operations/customermetersget.ts
|
|
36156
|
+
var CustomerMetersGetRequest$inboundSchema, CustomerMetersGetRequest$outboundSchema, CustomerMetersGetRequest$;
|
|
36157
|
+
var init_customermetersget = __esm(() => {
|
|
36065
36158
|
init_lib();
|
|
36066
|
-
|
|
36159
|
+
CustomerMetersGetRequest$inboundSchema = objectType({
|
|
36067
36160
|
id: stringType()
|
|
36068
36161
|
});
|
|
36069
|
-
|
|
36162
|
+
CustomerMetersGetRequest$outboundSchema = objectType({
|
|
36070
36163
|
id: stringType()
|
|
36071
36164
|
});
|
|
36072
|
-
((
|
|
36073
|
-
|
|
36074
|
-
|
|
36075
|
-
})(
|
|
36165
|
+
((CustomerMetersGetRequest$) => {
|
|
36166
|
+
CustomerMetersGetRequest$.inboundSchema = CustomerMetersGetRequest$inboundSchema;
|
|
36167
|
+
CustomerMetersGetRequest$.outboundSchema = CustomerMetersGetRequest$outboundSchema;
|
|
36168
|
+
})(CustomerMetersGetRequest$ ||= {});
|
|
36076
36169
|
});
|
|
36077
36170
|
|
|
36078
|
-
// src/
|
|
36079
|
-
|
|
36080
|
-
|
|
36171
|
+
// src/types/async.ts
|
|
36172
|
+
var APIPromise;
|
|
36173
|
+
var init_async = __esm(() => {
|
|
36174
|
+
APIPromise = class APIPromise {
|
|
36175
|
+
#promise;
|
|
36176
|
+
#unwrapped;
|
|
36177
|
+
[Symbol.toStringTag] = "APIPromise";
|
|
36178
|
+
constructor(p) {
|
|
36179
|
+
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
36180
|
+
this.#unwrapped = p instanceof Promise ? this.#promise.then(([value]) => value) : Promise.resolve(p[0]);
|
|
36181
|
+
}
|
|
36182
|
+
then(onfulfilled, onrejected) {
|
|
36183
|
+
return this.#promise.then(onfulfilled ? ([value]) => onfulfilled(value) : undefined, onrejected);
|
|
36184
|
+
}
|
|
36185
|
+
catch(onrejected) {
|
|
36186
|
+
return this.#unwrapped.catch(onrejected);
|
|
36187
|
+
}
|
|
36188
|
+
finally(onfinally) {
|
|
36189
|
+
return this.#unwrapped.finally(onfinally);
|
|
36190
|
+
}
|
|
36191
|
+
$inspect() {
|
|
36192
|
+
return this.#promise;
|
|
36193
|
+
}
|
|
36194
|
+
};
|
|
36195
|
+
});
|
|
36196
|
+
|
|
36197
|
+
// src/funcs/customerMetersGet.ts
|
|
36198
|
+
function customerMetersGet(client, request, options) {
|
|
36199
|
+
return new APIPromise($do(client, request, options));
|
|
36081
36200
|
}
|
|
36082
|
-
async function $
|
|
36083
|
-
const parsed = safeParse(request, (value) =>
|
|
36201
|
+
async function $do(client, request, options) {
|
|
36202
|
+
const parsed = safeParse(request, (value) => CustomerMetersGetRequest$outboundSchema.parse(value), "Input validation failed");
|
|
36084
36203
|
if (!parsed.ok) {
|
|
36085
36204
|
return [parsed, { status: "invalid" }];
|
|
36086
36205
|
}
|
|
@@ -36092,7 +36211,7 @@ async function $do2(client, request, options) {
|
|
|
36092
36211
|
charEncoding: "percent"
|
|
36093
36212
|
})
|
|
36094
36213
|
};
|
|
36095
|
-
const path = pathToFunc("/v1/
|
|
36214
|
+
const path = pathToFunc("/v1/customer-meters/{id}")(pathParams);
|
|
36096
36215
|
const headers = new Headers(compactMap({
|
|
36097
36216
|
Accept: "application/json"
|
|
36098
36217
|
}));
|
|
@@ -36101,7 +36220,7 @@ async function $do2(client, request, options) {
|
|
|
36101
36220
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
36102
36221
|
const context = {
|
|
36103
36222
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
36104
|
-
operationID: "
|
|
36223
|
+
operationID: "customer_meters:get",
|
|
36105
36224
|
oAuth2Scopes: [],
|
|
36106
36225
|
resolvedSecurity: requestSecurity,
|
|
36107
36226
|
securitySource: client._options.accessToken,
|
|
@@ -36110,7 +36229,643 @@ async function $do2(client, request, options) {
|
|
|
36110
36229
|
};
|
|
36111
36230
|
const requestRes = client._createRequest(context, {
|
|
36112
36231
|
security: requestSecurity,
|
|
36113
|
-
method: "
|
|
36232
|
+
method: "GET",
|
|
36233
|
+
baseURL: options?.serverURL,
|
|
36234
|
+
path,
|
|
36235
|
+
headers,
|
|
36236
|
+
body,
|
|
36237
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
36238
|
+
}, options);
|
|
36239
|
+
if (!requestRes.ok) {
|
|
36240
|
+
return [requestRes, { status: "invalid" }];
|
|
36241
|
+
}
|
|
36242
|
+
const req = requestRes.value;
|
|
36243
|
+
const doResult = await client._do(req, {
|
|
36244
|
+
context,
|
|
36245
|
+
errorCodes: ["404", "422", "4XX", "5XX"],
|
|
36246
|
+
retryConfig: context.retryConfig,
|
|
36247
|
+
retryCodes: context.retryCodes
|
|
36248
|
+
});
|
|
36249
|
+
if (!doResult.ok) {
|
|
36250
|
+
return [doResult, { status: "request-error", request: req }];
|
|
36251
|
+
}
|
|
36252
|
+
const response = doResult.value;
|
|
36253
|
+
const responseFields = {
|
|
36254
|
+
HttpMeta: { Response: response, Request: req }
|
|
36255
|
+
};
|
|
36256
|
+
const [result] = await match(json(200, CustomerMeter$inboundSchema), jsonErr(404, ResourceNotFound$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
36257
|
+
if (!result.ok) {
|
|
36258
|
+
return [result, { status: "complete", request: req, response }];
|
|
36259
|
+
}
|
|
36260
|
+
return [result, { status: "complete", request: req, response }];
|
|
36261
|
+
}
|
|
36262
|
+
var init_customerMetersGet = __esm(() => {
|
|
36263
|
+
init_encodings();
|
|
36264
|
+
init_matchers();
|
|
36265
|
+
init_primitives();
|
|
36266
|
+
init_schemas();
|
|
36267
|
+
init_security();
|
|
36268
|
+
init_url();
|
|
36269
|
+
init_customermeter();
|
|
36270
|
+
init_httpvalidationerror();
|
|
36271
|
+
init_resourcenotfound();
|
|
36272
|
+
init_customermetersget();
|
|
36273
|
+
init_async();
|
|
36274
|
+
});
|
|
36275
|
+
|
|
36276
|
+
// src/mcp-server/tools/customerMetersGet.ts
|
|
36277
|
+
var args, tool$customerMetersGet;
|
|
36278
|
+
var init_customerMetersGet2 = __esm(() => {
|
|
36279
|
+
init_customerMetersGet();
|
|
36280
|
+
init_customermetersget();
|
|
36281
|
+
init_tools();
|
|
36282
|
+
args = {
|
|
36283
|
+
request: CustomerMetersGetRequest$inboundSchema
|
|
36284
|
+
};
|
|
36285
|
+
tool$customerMetersGet = {
|
|
36286
|
+
name: "customer-meters-get",
|
|
36287
|
+
description: `Get Customer Meter
|
|
36288
|
+
|
|
36289
|
+
Get a customer meter by ID.
|
|
36290
|
+
|
|
36291
|
+
**Scopes**: \`customer_meters:read\``,
|
|
36292
|
+
scopes: ["read", "customer_meters"],
|
|
36293
|
+
args,
|
|
36294
|
+
tool: async (client, args2, ctx) => {
|
|
36295
|
+
const [result, apiCall] = await customerMetersGet(client, args2.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
36296
|
+
if (!result.ok) {
|
|
36297
|
+
return {
|
|
36298
|
+
content: [{ type: "text", text: result.error.message }],
|
|
36299
|
+
isError: true
|
|
36300
|
+
};
|
|
36301
|
+
}
|
|
36302
|
+
const value = result.value;
|
|
36303
|
+
return formatResult(value, apiCall);
|
|
36304
|
+
}
|
|
36305
|
+
};
|
|
36306
|
+
});
|
|
36307
|
+
|
|
36308
|
+
// src/models/components/customermetersortproperty.ts
|
|
36309
|
+
var CustomerMeterSortProperty, CustomerMeterSortProperty$inboundSchema, CustomerMeterSortProperty$outboundSchema, CustomerMeterSortProperty$;
|
|
36310
|
+
var init_customermetersortproperty = __esm(() => {
|
|
36311
|
+
init_lib();
|
|
36312
|
+
CustomerMeterSortProperty = {
|
|
36313
|
+
CreatedAt: "created_at",
|
|
36314
|
+
MinusCreatedAt: "-created_at",
|
|
36315
|
+
ModifiedAt: "modified_at",
|
|
36316
|
+
MinusModifiedAt: "-modified_at",
|
|
36317
|
+
CustomerId: "customer_id",
|
|
36318
|
+
MinusCustomerId: "-customer_id",
|
|
36319
|
+
CustomerName: "customer_name",
|
|
36320
|
+
MinusCustomerName: "-customer_name",
|
|
36321
|
+
MeterId: "meter_id",
|
|
36322
|
+
MinusMeterId: "-meter_id",
|
|
36323
|
+
MeterName: "meter_name",
|
|
36324
|
+
MinusMeterName: "-meter_name",
|
|
36325
|
+
ConsumedUnits: "consumed_units",
|
|
36326
|
+
MinusConsumedUnits: "-consumed_units",
|
|
36327
|
+
CreditedUnits: "credited_units",
|
|
36328
|
+
MinusCreditedUnits: "-credited_units",
|
|
36329
|
+
Balance: "balance",
|
|
36330
|
+
MinusBalance: "-balance"
|
|
36331
|
+
};
|
|
36332
|
+
CustomerMeterSortProperty$inboundSchema = nativeEnumType(CustomerMeterSortProperty);
|
|
36333
|
+
CustomerMeterSortProperty$outboundSchema = CustomerMeterSortProperty$inboundSchema;
|
|
36334
|
+
((CustomerMeterSortProperty$) => {
|
|
36335
|
+
CustomerMeterSortProperty$.inboundSchema = CustomerMeterSortProperty$inboundSchema;
|
|
36336
|
+
CustomerMeterSortProperty$.outboundSchema = CustomerMeterSortProperty$outboundSchema;
|
|
36337
|
+
})(CustomerMeterSortProperty$ ||= {});
|
|
36338
|
+
});
|
|
36339
|
+
|
|
36340
|
+
// src/models/components/pagination.ts
|
|
36341
|
+
var Pagination$inboundSchema, Pagination$outboundSchema, Pagination$;
|
|
36342
|
+
var init_pagination = __esm(() => {
|
|
36343
|
+
init_lib();
|
|
36344
|
+
init_primitives();
|
|
36345
|
+
Pagination$inboundSchema = objectType({
|
|
36346
|
+
total_count: numberType().int(),
|
|
36347
|
+
max_page: numberType().int()
|
|
36348
|
+
}).transform((v2) => {
|
|
36349
|
+
return remap(v2, {
|
|
36350
|
+
total_count: "totalCount",
|
|
36351
|
+
max_page: "maxPage"
|
|
36352
|
+
});
|
|
36353
|
+
});
|
|
36354
|
+
Pagination$outboundSchema = objectType({
|
|
36355
|
+
totalCount: numberType().int(),
|
|
36356
|
+
maxPage: numberType().int()
|
|
36357
|
+
}).transform((v2) => {
|
|
36358
|
+
return remap(v2, {
|
|
36359
|
+
totalCount: "total_count",
|
|
36360
|
+
maxPage: "max_page"
|
|
36361
|
+
});
|
|
36362
|
+
});
|
|
36363
|
+
((Pagination$) => {
|
|
36364
|
+
Pagination$.inboundSchema = Pagination$inboundSchema;
|
|
36365
|
+
Pagination$.outboundSchema = Pagination$outboundSchema;
|
|
36366
|
+
})(Pagination$ ||= {});
|
|
36367
|
+
});
|
|
36368
|
+
|
|
36369
|
+
// src/models/components/listresourcecustomermeter.ts
|
|
36370
|
+
var ListResourceCustomerMeter$inboundSchema, ListResourceCustomerMeter$outboundSchema, ListResourceCustomerMeter$;
|
|
36371
|
+
var init_listresourcecustomermeter = __esm(() => {
|
|
36372
|
+
init_lib();
|
|
36373
|
+
init_customermeter();
|
|
36374
|
+
init_pagination();
|
|
36375
|
+
ListResourceCustomerMeter$inboundSchema = objectType({
|
|
36376
|
+
items: arrayType(CustomerMeter$inboundSchema),
|
|
36377
|
+
pagination: Pagination$inboundSchema
|
|
36378
|
+
});
|
|
36379
|
+
ListResourceCustomerMeter$outboundSchema = objectType({
|
|
36380
|
+
items: arrayType(CustomerMeter$outboundSchema),
|
|
36381
|
+
pagination: Pagination$outboundSchema
|
|
36382
|
+
});
|
|
36383
|
+
((ListResourceCustomerMeter$) => {
|
|
36384
|
+
ListResourceCustomerMeter$.inboundSchema = ListResourceCustomerMeter$inboundSchema;
|
|
36385
|
+
ListResourceCustomerMeter$.outboundSchema = ListResourceCustomerMeter$outboundSchema;
|
|
36386
|
+
})(ListResourceCustomerMeter$ ||= {});
|
|
36387
|
+
});
|
|
36388
|
+
|
|
36389
|
+
// src/models/operations/customermeterslist.ts
|
|
36390
|
+
var CustomerMetersListQueryParamOrganizationIDFilter$inboundSchema, CustomerMetersListQueryParamOrganizationIDFilter$outboundSchema, CustomerMetersListQueryParamOrganizationIDFilter$, CustomerMetersListQueryParamCustomerIDFilter$inboundSchema, CustomerMetersListQueryParamCustomerIDFilter$outboundSchema, CustomerMetersListQueryParamCustomerIDFilter$, CustomerMetersListQueryParamExternalCustomerIDFilter$inboundSchema, CustomerMetersListQueryParamExternalCustomerIDFilter$outboundSchema, CustomerMetersListQueryParamExternalCustomerIDFilter$, QueryParamMeterIDFilter$inboundSchema, QueryParamMeterIDFilter$outboundSchema, QueryParamMeterIDFilter$, CustomerMetersListRequest$inboundSchema, CustomerMetersListRequest$outboundSchema, CustomerMetersListRequest$, CustomerMetersListResponse$inboundSchema, CustomerMetersListResponse$outboundSchema, CustomerMetersListResponse$;
|
|
36391
|
+
var init_customermeterslist = __esm(() => {
|
|
36392
|
+
init_lib();
|
|
36393
|
+
init_primitives();
|
|
36394
|
+
init_customermetersortproperty();
|
|
36395
|
+
init_listresourcecustomermeter();
|
|
36396
|
+
CustomerMetersListQueryParamOrganizationIDFilter$inboundSchema = unionType([stringType(), arrayType(stringType())]);
|
|
36397
|
+
CustomerMetersListQueryParamOrganizationIDFilter$outboundSchema = unionType([stringType(), arrayType(stringType())]);
|
|
36398
|
+
((CustomerMetersListQueryParamOrganizationIDFilter$) => {
|
|
36399
|
+
CustomerMetersListQueryParamOrganizationIDFilter$.inboundSchema = CustomerMetersListQueryParamOrganizationIDFilter$inboundSchema;
|
|
36400
|
+
CustomerMetersListQueryParamOrganizationIDFilter$.outboundSchema = CustomerMetersListQueryParamOrganizationIDFilter$outboundSchema;
|
|
36401
|
+
})(CustomerMetersListQueryParamOrganizationIDFilter$ ||= {});
|
|
36402
|
+
CustomerMetersListQueryParamCustomerIDFilter$inboundSchema = unionType([stringType(), arrayType(stringType())]);
|
|
36403
|
+
CustomerMetersListQueryParamCustomerIDFilter$outboundSchema = unionType([stringType(), arrayType(stringType())]);
|
|
36404
|
+
((CustomerMetersListQueryParamCustomerIDFilter$) => {
|
|
36405
|
+
CustomerMetersListQueryParamCustomerIDFilter$.inboundSchema = CustomerMetersListQueryParamCustomerIDFilter$inboundSchema;
|
|
36406
|
+
CustomerMetersListQueryParamCustomerIDFilter$.outboundSchema = CustomerMetersListQueryParamCustomerIDFilter$outboundSchema;
|
|
36407
|
+
})(CustomerMetersListQueryParamCustomerIDFilter$ ||= {});
|
|
36408
|
+
CustomerMetersListQueryParamExternalCustomerIDFilter$inboundSchema = unionType([stringType(), arrayType(stringType())]);
|
|
36409
|
+
CustomerMetersListQueryParamExternalCustomerIDFilter$outboundSchema = unionType([stringType(), arrayType(stringType())]);
|
|
36410
|
+
((CustomerMetersListQueryParamExternalCustomerIDFilter$) => {
|
|
36411
|
+
CustomerMetersListQueryParamExternalCustomerIDFilter$.inboundSchema = CustomerMetersListQueryParamExternalCustomerIDFilter$inboundSchema;
|
|
36412
|
+
CustomerMetersListQueryParamExternalCustomerIDFilter$.outboundSchema = CustomerMetersListQueryParamExternalCustomerIDFilter$outboundSchema;
|
|
36413
|
+
})(CustomerMetersListQueryParamExternalCustomerIDFilter$ ||= {});
|
|
36414
|
+
QueryParamMeterIDFilter$inboundSchema = unionType([stringType(), arrayType(stringType())]);
|
|
36415
|
+
QueryParamMeterIDFilter$outboundSchema = unionType([stringType(), arrayType(stringType())]);
|
|
36416
|
+
((QueryParamMeterIDFilter$) => {
|
|
36417
|
+
QueryParamMeterIDFilter$.inboundSchema = QueryParamMeterIDFilter$inboundSchema;
|
|
36418
|
+
QueryParamMeterIDFilter$.outboundSchema = QueryParamMeterIDFilter$outboundSchema;
|
|
36419
|
+
})(QueryParamMeterIDFilter$ ||= {});
|
|
36420
|
+
CustomerMetersListRequest$inboundSchema = objectType({
|
|
36421
|
+
organization_id: nullableType(unionType([stringType(), arrayType(stringType())])).optional(),
|
|
36422
|
+
customer_id: nullableType(unionType([stringType(), arrayType(stringType())])).optional(),
|
|
36423
|
+
external_customer_id: nullableType(unionType([stringType(), arrayType(stringType())])).optional(),
|
|
36424
|
+
meter_id: nullableType(unionType([stringType(), arrayType(stringType())])).optional(),
|
|
36425
|
+
page: numberType().int().default(1),
|
|
36426
|
+
limit: numberType().int().default(10),
|
|
36427
|
+
sorting: nullableType(arrayType(CustomerMeterSortProperty$inboundSchema)).optional()
|
|
36428
|
+
}).transform((v2) => {
|
|
36429
|
+
return remap(v2, {
|
|
36430
|
+
organization_id: "organizationId",
|
|
36431
|
+
customer_id: "customerId",
|
|
36432
|
+
external_customer_id: "externalCustomerId",
|
|
36433
|
+
meter_id: "meterId"
|
|
36434
|
+
});
|
|
36435
|
+
});
|
|
36436
|
+
CustomerMetersListRequest$outboundSchema = objectType({
|
|
36437
|
+
organizationId: nullableType(unionType([stringType(), arrayType(stringType())])).optional(),
|
|
36438
|
+
customerId: nullableType(unionType([stringType(), arrayType(stringType())])).optional(),
|
|
36439
|
+
externalCustomerId: nullableType(unionType([stringType(), arrayType(stringType())])).optional(),
|
|
36440
|
+
meterId: nullableType(unionType([stringType(), arrayType(stringType())])).optional(),
|
|
36441
|
+
page: numberType().int().default(1),
|
|
36442
|
+
limit: numberType().int().default(10),
|
|
36443
|
+
sorting: nullableType(arrayType(CustomerMeterSortProperty$outboundSchema)).optional()
|
|
36444
|
+
}).transform((v2) => {
|
|
36445
|
+
return remap(v2, {
|
|
36446
|
+
organizationId: "organization_id",
|
|
36447
|
+
customerId: "customer_id",
|
|
36448
|
+
externalCustomerId: "external_customer_id",
|
|
36449
|
+
meterId: "meter_id"
|
|
36450
|
+
});
|
|
36451
|
+
});
|
|
36452
|
+
((CustomerMetersListRequest$) => {
|
|
36453
|
+
CustomerMetersListRequest$.inboundSchema = CustomerMetersListRequest$inboundSchema;
|
|
36454
|
+
CustomerMetersListRequest$.outboundSchema = CustomerMetersListRequest$outboundSchema;
|
|
36455
|
+
})(CustomerMetersListRequest$ ||= {});
|
|
36456
|
+
CustomerMetersListResponse$inboundSchema = objectType({
|
|
36457
|
+
Result: ListResourceCustomerMeter$inboundSchema
|
|
36458
|
+
}).transform((v2) => {
|
|
36459
|
+
return remap(v2, {
|
|
36460
|
+
Result: "result"
|
|
36461
|
+
});
|
|
36462
|
+
});
|
|
36463
|
+
CustomerMetersListResponse$outboundSchema = objectType({
|
|
36464
|
+
result: ListResourceCustomerMeter$outboundSchema
|
|
36465
|
+
}).transform((v2) => {
|
|
36466
|
+
return remap(v2, {
|
|
36467
|
+
result: "Result"
|
|
36468
|
+
});
|
|
36469
|
+
});
|
|
36470
|
+
((CustomerMetersListResponse$) => {
|
|
36471
|
+
CustomerMetersListResponse$.inboundSchema = CustomerMetersListResponse$inboundSchema;
|
|
36472
|
+
CustomerMetersListResponse$.outboundSchema = CustomerMetersListResponse$outboundSchema;
|
|
36473
|
+
})(CustomerMetersListResponse$ ||= {});
|
|
36474
|
+
});
|
|
36475
|
+
|
|
36476
|
+
// src/types/operations.ts
|
|
36477
|
+
function createPageIterator(page, halt) {
|
|
36478
|
+
return {
|
|
36479
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
36480
|
+
yield page;
|
|
36481
|
+
if (halt(page)) {
|
|
36482
|
+
return;
|
|
36483
|
+
}
|
|
36484
|
+
let p = page;
|
|
36485
|
+
for (p = await p.next();p != null; p = await p.next()) {
|
|
36486
|
+
yield p;
|
|
36487
|
+
if (halt(p)) {
|
|
36488
|
+
return;
|
|
36489
|
+
}
|
|
36490
|
+
}
|
|
36491
|
+
}
|
|
36492
|
+
};
|
|
36493
|
+
}
|
|
36494
|
+
function haltIterator(v2) {
|
|
36495
|
+
return {
|
|
36496
|
+
...v2,
|
|
36497
|
+
next: () => null,
|
|
36498
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
36499
|
+
yield v2;
|
|
36500
|
+
}
|
|
36501
|
+
};
|
|
36502
|
+
}
|
|
36503
|
+
var URL_OVERRIDE;
|
|
36504
|
+
var init_operations = __esm(() => {
|
|
36505
|
+
URL_OVERRIDE = Symbol("URL_OVERRIDE");
|
|
36506
|
+
});
|
|
36507
|
+
|
|
36508
|
+
// src/funcs/customerMetersList.ts
|
|
36509
|
+
function customerMetersList(client, request, options) {
|
|
36510
|
+
return new APIPromise($do2(client, request, options));
|
|
36511
|
+
}
|
|
36512
|
+
async function $do2(client, request, options) {
|
|
36513
|
+
const parsed = safeParse(request, (value) => CustomerMetersListRequest$outboundSchema.parse(value), "Input validation failed");
|
|
36514
|
+
if (!parsed.ok) {
|
|
36515
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
36516
|
+
}
|
|
36517
|
+
const payload = parsed.value;
|
|
36518
|
+
const body = null;
|
|
36519
|
+
const path = pathToFunc("/v1/customer-meters/")();
|
|
36520
|
+
const query = encodeFormQuery({
|
|
36521
|
+
customer_id: payload.customer_id,
|
|
36522
|
+
external_customer_id: payload.external_customer_id,
|
|
36523
|
+
limit: payload.limit,
|
|
36524
|
+
meter_id: payload.meter_id,
|
|
36525
|
+
organization_id: payload.organization_id,
|
|
36526
|
+
page: payload.page,
|
|
36527
|
+
sorting: payload.sorting
|
|
36528
|
+
});
|
|
36529
|
+
const headers = new Headers(compactMap({
|
|
36530
|
+
Accept: "application/json"
|
|
36531
|
+
}));
|
|
36532
|
+
const secConfig = await extractSecurity(client._options.accessToken);
|
|
36533
|
+
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
|
36534
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
36535
|
+
const context = {
|
|
36536
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
36537
|
+
operationID: "customer_meters:list",
|
|
36538
|
+
oAuth2Scopes: [],
|
|
36539
|
+
resolvedSecurity: requestSecurity,
|
|
36540
|
+
securitySource: client._options.accessToken,
|
|
36541
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
36542
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
36543
|
+
};
|
|
36544
|
+
const requestRes = client._createRequest(context, {
|
|
36545
|
+
security: requestSecurity,
|
|
36546
|
+
method: "GET",
|
|
36547
|
+
baseURL: options?.serverURL,
|
|
36548
|
+
path,
|
|
36549
|
+
headers,
|
|
36550
|
+
query,
|
|
36551
|
+
body,
|
|
36552
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
36553
|
+
}, options);
|
|
36554
|
+
if (!requestRes.ok) {
|
|
36555
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
36556
|
+
}
|
|
36557
|
+
const req = requestRes.value;
|
|
36558
|
+
const doResult = await client._do(req, {
|
|
36559
|
+
context,
|
|
36560
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
36561
|
+
retryConfig: context.retryConfig,
|
|
36562
|
+
retryCodes: context.retryCodes
|
|
36563
|
+
});
|
|
36564
|
+
if (!doResult.ok) {
|
|
36565
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
36566
|
+
}
|
|
36567
|
+
const response = doResult.value;
|
|
36568
|
+
const responseFields = {
|
|
36569
|
+
HttpMeta: { Response: response, Request: req }
|
|
36570
|
+
};
|
|
36571
|
+
const [result, raw] = await match(json(200, CustomerMetersListResponse$inboundSchema, { key: "Result" }), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
36572
|
+
if (!result.ok) {
|
|
36573
|
+
return [haltIterator(result), {
|
|
36574
|
+
status: "complete",
|
|
36575
|
+
request: req,
|
|
36576
|
+
response
|
|
36577
|
+
}];
|
|
36578
|
+
}
|
|
36579
|
+
const nextFunc = (responseData) => {
|
|
36580
|
+
const page2 = request?.page ?? 1;
|
|
36581
|
+
const nextPage = page2 + 1;
|
|
36582
|
+
const numPages = dlv(responseData, "pagination.max_page");
|
|
36583
|
+
if (typeof numPages !== "number" || numPages <= page2) {
|
|
36584
|
+
return { next: () => null };
|
|
36585
|
+
}
|
|
36586
|
+
if (!responseData) {
|
|
36587
|
+
return { next: () => null };
|
|
36588
|
+
}
|
|
36589
|
+
const results = dlv(responseData, "items");
|
|
36590
|
+
if (!Array.isArray(results) || !results.length) {
|
|
36591
|
+
return { next: () => null };
|
|
36592
|
+
}
|
|
36593
|
+
const limit = request?.limit ?? 10;
|
|
36594
|
+
if (results.length < limit) {
|
|
36595
|
+
return { next: () => null };
|
|
36596
|
+
}
|
|
36597
|
+
const nextVal = () => customerMetersList(client, {
|
|
36598
|
+
...request,
|
|
36599
|
+
page: nextPage
|
|
36600
|
+
}, options);
|
|
36601
|
+
return { next: nextVal, "~next": { page: nextPage } };
|
|
36602
|
+
};
|
|
36603
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
36604
|
+
return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
|
|
36605
|
+
status: "complete",
|
|
36606
|
+
request: req,
|
|
36607
|
+
response
|
|
36608
|
+
}];
|
|
36609
|
+
}
|
|
36610
|
+
var init_customerMetersList = __esm(() => {
|
|
36611
|
+
init_encodings();
|
|
36612
|
+
init_matchers();
|
|
36613
|
+
init_primitives();
|
|
36614
|
+
init_schemas();
|
|
36615
|
+
init_security();
|
|
36616
|
+
init_url();
|
|
36617
|
+
init_httpvalidationerror();
|
|
36618
|
+
init_customermeterslist();
|
|
36619
|
+
init_async();
|
|
36620
|
+
init_operations();
|
|
36621
|
+
});
|
|
36622
|
+
|
|
36623
|
+
// src/mcp-server/tools/customerMetersList.ts
|
|
36624
|
+
var args2, tool$customerMetersList;
|
|
36625
|
+
var init_customerMetersList2 = __esm(() => {
|
|
36626
|
+
init_customerMetersList();
|
|
36627
|
+
init_customermeterslist();
|
|
36628
|
+
init_tools();
|
|
36629
|
+
args2 = {
|
|
36630
|
+
request: CustomerMetersListRequest$inboundSchema
|
|
36631
|
+
};
|
|
36632
|
+
tool$customerMetersList = {
|
|
36633
|
+
name: "customer-meters-list",
|
|
36634
|
+
description: `List Customer Meters
|
|
36635
|
+
|
|
36636
|
+
List customer meters.
|
|
36637
|
+
|
|
36638
|
+
**Scopes**: \`customer_meters:read\``,
|
|
36639
|
+
scopes: ["read", "customer_meters"],
|
|
36640
|
+
args: args2,
|
|
36641
|
+
tool: async (client, args3, ctx) => {
|
|
36642
|
+
const [result, apiCall] = await customerMetersList(client, args3.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
36643
|
+
if (!result.ok) {
|
|
36644
|
+
return {
|
|
36645
|
+
content: [{ type: "text", text: result.error.message }],
|
|
36646
|
+
isError: true
|
|
36647
|
+
};
|
|
36648
|
+
}
|
|
36649
|
+
const value = result.value.result;
|
|
36650
|
+
return formatResult(value, apiCall);
|
|
36651
|
+
}
|
|
36652
|
+
};
|
|
36653
|
+
});
|
|
36654
|
+
|
|
36655
|
+
// src/models/components/customercreate.ts
|
|
36656
|
+
var CustomerCreateMetadata$inboundSchema, CustomerCreateMetadata$outboundSchema, CustomerCreateMetadata$, CustomerCreateTaxId$inboundSchema, CustomerCreateTaxId$outboundSchema, CustomerCreateTaxId$, CustomerCreate$inboundSchema, CustomerCreate$outboundSchema, CustomerCreate$;
|
|
36657
|
+
var init_customercreate = __esm(() => {
|
|
36658
|
+
init_lib();
|
|
36659
|
+
init_primitives();
|
|
36660
|
+
init_address();
|
|
36661
|
+
init_taxidformat();
|
|
36662
|
+
CustomerCreateMetadata$inboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
|
|
36663
|
+
CustomerCreateMetadata$outboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
|
|
36664
|
+
((CustomerCreateMetadata$) => {
|
|
36665
|
+
CustomerCreateMetadata$.inboundSchema = CustomerCreateMetadata$inboundSchema;
|
|
36666
|
+
CustomerCreateMetadata$.outboundSchema = CustomerCreateMetadata$outboundSchema;
|
|
36667
|
+
})(CustomerCreateMetadata$ ||= {});
|
|
36668
|
+
CustomerCreateTaxId$inboundSchema = unionType([stringType(), TaxIDFormat$inboundSchema]);
|
|
36669
|
+
CustomerCreateTaxId$outboundSchema = unionType([stringType(), TaxIDFormat$outboundSchema]);
|
|
36670
|
+
((CustomerCreateTaxId$) => {
|
|
36671
|
+
CustomerCreateTaxId$.inboundSchema = CustomerCreateTaxId$inboundSchema;
|
|
36672
|
+
CustomerCreateTaxId$.outboundSchema = CustomerCreateTaxId$outboundSchema;
|
|
36673
|
+
})(CustomerCreateTaxId$ ||= {});
|
|
36674
|
+
CustomerCreate$inboundSchema = objectType({
|
|
36675
|
+
metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])).optional(),
|
|
36676
|
+
external_id: nullableType(stringType()).optional(),
|
|
36677
|
+
email: stringType(),
|
|
36678
|
+
name: nullableType(stringType()).optional(),
|
|
36679
|
+
billing_address: nullableType(Address$inboundSchema).optional(),
|
|
36680
|
+
tax_id: nullableType(arrayType(nullableType(unionType([stringType(), TaxIDFormat$inboundSchema])))).optional(),
|
|
36681
|
+
organization_id: nullableType(stringType()).optional()
|
|
36682
|
+
}).transform((v2) => {
|
|
36683
|
+
return remap(v2, {
|
|
36684
|
+
external_id: "externalId",
|
|
36685
|
+
billing_address: "billingAddress",
|
|
36686
|
+
tax_id: "taxId",
|
|
36687
|
+
organization_id: "organizationId"
|
|
36688
|
+
});
|
|
36689
|
+
});
|
|
36690
|
+
CustomerCreate$outboundSchema = objectType({
|
|
36691
|
+
metadata: recordType(unionType([stringType(), numberType().int(), booleanType()])).optional(),
|
|
36692
|
+
externalId: nullableType(stringType()).optional(),
|
|
36693
|
+
email: stringType(),
|
|
36694
|
+
name: nullableType(stringType()).optional(),
|
|
36695
|
+
billingAddress: nullableType(Address$outboundSchema).optional(),
|
|
36696
|
+
taxId: nullableType(arrayType(nullableType(unionType([stringType(), TaxIDFormat$outboundSchema])))).optional(),
|
|
36697
|
+
organizationId: nullableType(stringType()).optional()
|
|
36698
|
+
}).transform((v2) => {
|
|
36699
|
+
return remap(v2, {
|
|
36700
|
+
externalId: "external_id",
|
|
36701
|
+
billingAddress: "billing_address",
|
|
36702
|
+
taxId: "tax_id",
|
|
36703
|
+
organizationId: "organization_id"
|
|
36704
|
+
});
|
|
36705
|
+
});
|
|
36706
|
+
((CustomerCreate$) => {
|
|
36707
|
+
CustomerCreate$.inboundSchema = CustomerCreate$inboundSchema;
|
|
36708
|
+
CustomerCreate$.outboundSchema = CustomerCreate$outboundSchema;
|
|
36709
|
+
})(CustomerCreate$ ||= {});
|
|
36710
|
+
});
|
|
36711
|
+
|
|
36712
|
+
// src/funcs/customersCreate.ts
|
|
36713
|
+
function customersCreate(client, request, options) {
|
|
36714
|
+
return new APIPromise($do3(client, request, options));
|
|
36715
|
+
}
|
|
36716
|
+
async function $do3(client, request, options) {
|
|
36717
|
+
const parsed = safeParse(request, (value) => CustomerCreate$outboundSchema.parse(value), "Input validation failed");
|
|
36718
|
+
if (!parsed.ok) {
|
|
36719
|
+
return [parsed, { status: "invalid" }];
|
|
36720
|
+
}
|
|
36721
|
+
const payload = parsed.value;
|
|
36722
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
36723
|
+
const path = pathToFunc("/v1/customers/")();
|
|
36724
|
+
const headers = new Headers(compactMap({
|
|
36725
|
+
"Content-Type": "application/json",
|
|
36726
|
+
Accept: "application/json"
|
|
36727
|
+
}));
|
|
36728
|
+
const secConfig = await extractSecurity(client._options.accessToken);
|
|
36729
|
+
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
|
36730
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
36731
|
+
const context = {
|
|
36732
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
36733
|
+
operationID: "customers:create",
|
|
36734
|
+
oAuth2Scopes: [],
|
|
36735
|
+
resolvedSecurity: requestSecurity,
|
|
36736
|
+
securitySource: client._options.accessToken,
|
|
36737
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
36738
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
36739
|
+
};
|
|
36740
|
+
const requestRes = client._createRequest(context, {
|
|
36741
|
+
security: requestSecurity,
|
|
36742
|
+
method: "POST",
|
|
36743
|
+
baseURL: options?.serverURL,
|
|
36744
|
+
path,
|
|
36745
|
+
headers,
|
|
36746
|
+
body,
|
|
36747
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
36748
|
+
}, options);
|
|
36749
|
+
if (!requestRes.ok) {
|
|
36750
|
+
return [requestRes, { status: "invalid" }];
|
|
36751
|
+
}
|
|
36752
|
+
const req = requestRes.value;
|
|
36753
|
+
const doResult = await client._do(req, {
|
|
36754
|
+
context,
|
|
36755
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
36756
|
+
retryConfig: context.retryConfig,
|
|
36757
|
+
retryCodes: context.retryCodes
|
|
36758
|
+
});
|
|
36759
|
+
if (!doResult.ok) {
|
|
36760
|
+
return [doResult, { status: "request-error", request: req }];
|
|
36761
|
+
}
|
|
36762
|
+
const response = doResult.value;
|
|
36763
|
+
const responseFields = {
|
|
36764
|
+
HttpMeta: { Response: response, Request: req }
|
|
36765
|
+
};
|
|
36766
|
+
const [result] = await match(json(201, Customer$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
36767
|
+
if (!result.ok) {
|
|
36768
|
+
return [result, { status: "complete", request: req, response }];
|
|
36769
|
+
}
|
|
36770
|
+
return [result, { status: "complete", request: req, response }];
|
|
36771
|
+
}
|
|
36772
|
+
var init_customersCreate = __esm(() => {
|
|
36773
|
+
init_encodings();
|
|
36774
|
+
init_matchers();
|
|
36775
|
+
init_primitives();
|
|
36776
|
+
init_schemas();
|
|
36777
|
+
init_security();
|
|
36778
|
+
init_url();
|
|
36779
|
+
init_customer();
|
|
36780
|
+
init_customercreate();
|
|
36781
|
+
init_httpvalidationerror();
|
|
36782
|
+
init_async();
|
|
36783
|
+
});
|
|
36784
|
+
|
|
36785
|
+
// src/mcp-server/tools/customersCreate.ts
|
|
36786
|
+
var args3, tool$customersCreate;
|
|
36787
|
+
var init_customersCreate2 = __esm(() => {
|
|
36788
|
+
init_customersCreate();
|
|
36789
|
+
init_customercreate();
|
|
36790
|
+
init_tools();
|
|
36791
|
+
args3 = {
|
|
36792
|
+
request: CustomerCreate$inboundSchema
|
|
36793
|
+
};
|
|
36794
|
+
tool$customersCreate = {
|
|
36795
|
+
name: "customers-create",
|
|
36796
|
+
description: `Create Customer
|
|
36797
|
+
|
|
36798
|
+
Create a customer.
|
|
36799
|
+
|
|
36800
|
+
**Scopes**: \`customers:write\``,
|
|
36801
|
+
scopes: ["write", "customers"],
|
|
36802
|
+
args: args3,
|
|
36803
|
+
tool: async (client, args4, ctx) => {
|
|
36804
|
+
const [result, apiCall] = await customersCreate(client, args4.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
36805
|
+
if (!result.ok) {
|
|
36806
|
+
return {
|
|
36807
|
+
content: [{ type: "text", text: result.error.message }],
|
|
36808
|
+
isError: true
|
|
36809
|
+
};
|
|
36810
|
+
}
|
|
36811
|
+
const value = result.value;
|
|
36812
|
+
return formatResult(value, apiCall);
|
|
36813
|
+
}
|
|
36814
|
+
};
|
|
36815
|
+
});
|
|
36816
|
+
|
|
36817
|
+
// src/models/operations/customersdelete.ts
|
|
36818
|
+
var CustomersDeleteRequest$inboundSchema, CustomersDeleteRequest$outboundSchema, CustomersDeleteRequest$;
|
|
36819
|
+
var init_customersdelete = __esm(() => {
|
|
36820
|
+
init_lib();
|
|
36821
|
+
CustomersDeleteRequest$inboundSchema = objectType({
|
|
36822
|
+
id: stringType()
|
|
36823
|
+
});
|
|
36824
|
+
CustomersDeleteRequest$outboundSchema = objectType({
|
|
36825
|
+
id: stringType()
|
|
36826
|
+
});
|
|
36827
|
+
((CustomersDeleteRequest$) => {
|
|
36828
|
+
CustomersDeleteRequest$.inboundSchema = CustomersDeleteRequest$inboundSchema;
|
|
36829
|
+
CustomersDeleteRequest$.outboundSchema = CustomersDeleteRequest$outboundSchema;
|
|
36830
|
+
})(CustomersDeleteRequest$ ||= {});
|
|
36831
|
+
});
|
|
36832
|
+
|
|
36833
|
+
// src/funcs/customersDelete.ts
|
|
36834
|
+
function customersDelete(client, request, options) {
|
|
36835
|
+
return new APIPromise($do4(client, request, options));
|
|
36836
|
+
}
|
|
36837
|
+
async function $do4(client, request, options) {
|
|
36838
|
+
const parsed = safeParse(request, (value) => CustomersDeleteRequest$outboundSchema.parse(value), "Input validation failed");
|
|
36839
|
+
if (!parsed.ok) {
|
|
36840
|
+
return [parsed, { status: "invalid" }];
|
|
36841
|
+
}
|
|
36842
|
+
const payload = parsed.value;
|
|
36843
|
+
const body = null;
|
|
36844
|
+
const pathParams = {
|
|
36845
|
+
id: encodeSimple("id", payload.id, {
|
|
36846
|
+
explode: false,
|
|
36847
|
+
charEncoding: "percent"
|
|
36848
|
+
})
|
|
36849
|
+
};
|
|
36850
|
+
const path = pathToFunc("/v1/customers/{id}")(pathParams);
|
|
36851
|
+
const headers = new Headers(compactMap({
|
|
36852
|
+
Accept: "application/json"
|
|
36853
|
+
}));
|
|
36854
|
+
const secConfig = await extractSecurity(client._options.accessToken);
|
|
36855
|
+
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
|
36856
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
36857
|
+
const context = {
|
|
36858
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
36859
|
+
operationID: "customers:delete",
|
|
36860
|
+
oAuth2Scopes: [],
|
|
36861
|
+
resolvedSecurity: requestSecurity,
|
|
36862
|
+
securitySource: client._options.accessToken,
|
|
36863
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
36864
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
36865
|
+
};
|
|
36866
|
+
const requestRes = client._createRequest(context, {
|
|
36867
|
+
security: requestSecurity,
|
|
36868
|
+
method: "DELETE",
|
|
36114
36869
|
baseURL: options?.serverURL,
|
|
36115
36870
|
path,
|
|
36116
36871
|
headers,
|
|
@@ -36155,12 +36910,12 @@ var init_customersDelete = __esm(() => {
|
|
|
36155
36910
|
});
|
|
36156
36911
|
|
|
36157
36912
|
// src/mcp-server/tools/customersDelete.ts
|
|
36158
|
-
var
|
|
36913
|
+
var args4, tool$customersDelete;
|
|
36159
36914
|
var init_customersDelete2 = __esm(() => {
|
|
36160
36915
|
init_customersDelete();
|
|
36161
36916
|
init_customersdelete();
|
|
36162
36917
|
init_tools();
|
|
36163
|
-
|
|
36918
|
+
args4 = {
|
|
36164
36919
|
request: CustomersDeleteRequest$inboundSchema
|
|
36165
36920
|
};
|
|
36166
36921
|
tool$customersDelete = {
|
|
@@ -36183,9 +36938,9 @@ orders and subscriptions.
|
|
|
36183
36938
|
|
|
36184
36939
|
**Scopes**: \`customers:write\``,
|
|
36185
36940
|
scopes: ["write", "customers"],
|
|
36186
|
-
args:
|
|
36187
|
-
tool: async (client,
|
|
36188
|
-
const [result, apiCall] = await customersDelete(client,
|
|
36941
|
+
args: args4,
|
|
36942
|
+
tool: async (client, args5, ctx) => {
|
|
36943
|
+
const [result, apiCall] = await customersDelete(client, args5.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
36189
36944
|
if (!result.ok) {
|
|
36190
36945
|
return {
|
|
36191
36946
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -36224,9 +36979,9 @@ var init_customersdeleteexternal = __esm(() => {
|
|
|
36224
36979
|
|
|
36225
36980
|
// src/funcs/customersDeleteExternal.ts
|
|
36226
36981
|
function customersDeleteExternal(client, request, options) {
|
|
36227
|
-
return new APIPromise($
|
|
36982
|
+
return new APIPromise($do5(client, request, options));
|
|
36228
36983
|
}
|
|
36229
|
-
async function $
|
|
36984
|
+
async function $do5(client, request, options) {
|
|
36230
36985
|
const parsed = safeParse(request, (value) => CustomersDeleteExternalRequest$outboundSchema.parse(value), "Input validation failed");
|
|
36231
36986
|
if (!parsed.ok) {
|
|
36232
36987
|
return [parsed, { status: "invalid" }];
|
|
@@ -36302,12 +37057,12 @@ var init_customersDeleteExternal = __esm(() => {
|
|
|
36302
37057
|
});
|
|
36303
37058
|
|
|
36304
37059
|
// src/mcp-server/tools/customersDeleteExternal.ts
|
|
36305
|
-
var
|
|
37060
|
+
var args5, tool$customersDeleteExternal;
|
|
36306
37061
|
var init_customersDeleteExternal2 = __esm(() => {
|
|
36307
37062
|
init_customersDeleteExternal();
|
|
36308
37063
|
init_customersdeleteexternal();
|
|
36309
37064
|
init_tools();
|
|
36310
|
-
|
|
37065
|
+
args5 = {
|
|
36311
37066
|
request: CustomersDeleteExternalRequest$inboundSchema
|
|
36312
37067
|
};
|
|
36313
37068
|
tool$customersDeleteExternal = {
|
|
@@ -36320,9 +37075,9 @@ Immediately cancels any active subscriptions and revokes any active benefits.
|
|
|
36320
37075
|
|
|
36321
37076
|
**Scopes**: \`customers:write\``,
|
|
36322
37077
|
scopes: ["write", "customers"],
|
|
36323
|
-
args:
|
|
36324
|
-
tool: async (client,
|
|
36325
|
-
const [result, apiCall] = await customersDeleteExternal(client,
|
|
37078
|
+
args: args5,
|
|
37079
|
+
tool: async (client, args6, ctx) => {
|
|
37080
|
+
const [result, apiCall] = await customersDeleteExternal(client, args6.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
36326
37081
|
if (!result.ok) {
|
|
36327
37082
|
return {
|
|
36328
37083
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -36352,9 +37107,9 @@ var init_customersget = __esm(() => {
|
|
|
36352
37107
|
|
|
36353
37108
|
// src/funcs/customersGet.ts
|
|
36354
37109
|
function customersGet(client, request, options) {
|
|
36355
|
-
return new APIPromise($
|
|
37110
|
+
return new APIPromise($do6(client, request, options));
|
|
36356
37111
|
}
|
|
36357
|
-
async function $
|
|
37112
|
+
async function $do6(client, request, options) {
|
|
36358
37113
|
const parsed = safeParse(request, (value) => CustomersGetRequest$outboundSchema.parse(value), "Input validation failed");
|
|
36359
37114
|
if (!parsed.ok) {
|
|
36360
37115
|
return [parsed, { status: "invalid" }];
|
|
@@ -36430,12 +37185,12 @@ var init_customersGet = __esm(() => {
|
|
|
36430
37185
|
});
|
|
36431
37186
|
|
|
36432
37187
|
// src/mcp-server/tools/customersGet.ts
|
|
36433
|
-
var
|
|
37188
|
+
var args6, tool$customersGet;
|
|
36434
37189
|
var init_customersGet2 = __esm(() => {
|
|
36435
37190
|
init_customersGet();
|
|
36436
37191
|
init_customersget();
|
|
36437
37192
|
init_tools();
|
|
36438
|
-
|
|
37193
|
+
args6 = {
|
|
36439
37194
|
request: CustomersGetRequest$inboundSchema
|
|
36440
37195
|
};
|
|
36441
37196
|
tool$customersGet = {
|
|
@@ -36446,9 +37201,9 @@ Get a customer by ID.
|
|
|
36446
37201
|
|
|
36447
37202
|
**Scopes**: \`customers:read\` \`customers:write\``,
|
|
36448
37203
|
scopes: ["read", "customers"],
|
|
36449
|
-
args:
|
|
36450
|
-
tool: async (client,
|
|
36451
|
-
const [result, apiCall] = await customersGet(client,
|
|
37204
|
+
args: args6,
|
|
37205
|
+
tool: async (client, args7, ctx) => {
|
|
37206
|
+
const [result, apiCall] = await customersGet(client, args7.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
36452
37207
|
if (!result.ok) {
|
|
36453
37208
|
return {
|
|
36454
37209
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -36488,9 +37243,9 @@ var init_customersgetexternal = __esm(() => {
|
|
|
36488
37243
|
|
|
36489
37244
|
// src/funcs/customersGetExternal.ts
|
|
36490
37245
|
function customersGetExternal(client, request, options) {
|
|
36491
|
-
return new APIPromise($
|
|
37246
|
+
return new APIPromise($do7(client, request, options));
|
|
36492
37247
|
}
|
|
36493
|
-
async function $
|
|
37248
|
+
async function $do7(client, request, options) {
|
|
36494
37249
|
const parsed = safeParse(request, (value) => CustomersGetExternalRequest$outboundSchema.parse(value), "Input validation failed");
|
|
36495
37250
|
if (!parsed.ok) {
|
|
36496
37251
|
return [parsed, { status: "invalid" }];
|
|
@@ -36566,12 +37321,12 @@ var init_customersGetExternal = __esm(() => {
|
|
|
36566
37321
|
});
|
|
36567
37322
|
|
|
36568
37323
|
// src/mcp-server/tools/customersGetExternal.ts
|
|
36569
|
-
var
|
|
37324
|
+
var args7, tool$customersGetExternal;
|
|
36570
37325
|
var init_customersGetExternal2 = __esm(() => {
|
|
36571
37326
|
init_customersGetExternal();
|
|
36572
37327
|
init_customersgetexternal();
|
|
36573
37328
|
init_tools();
|
|
36574
|
-
|
|
37329
|
+
args7 = {
|
|
36575
37330
|
request: CustomersGetExternalRequest$inboundSchema
|
|
36576
37331
|
};
|
|
36577
37332
|
tool$customersGetExternal = {
|
|
@@ -36582,9 +37337,9 @@ Get a customer by external ID.
|
|
|
36582
37337
|
|
|
36583
37338
|
**Scopes**: \`customers:read\` \`customers:write\``,
|
|
36584
37339
|
scopes: ["read", "customers"],
|
|
36585
|
-
args:
|
|
36586
|
-
tool: async (client,
|
|
36587
|
-
const [result, apiCall] = await customersGetExternal(client,
|
|
37340
|
+
args: args7,
|
|
37341
|
+
tool: async (client, args8, ctx) => {
|
|
37342
|
+
const [result, apiCall] = await customersGetExternal(client, args8.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
36588
37343
|
if (!result.ok) {
|
|
36589
37344
|
return {
|
|
36590
37345
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -36836,6 +37591,49 @@ var init_customerstatebenefitgrant = __esm(() => {
|
|
|
36836
37591
|
})(CustomerStateBenefitGrant$ ||= {});
|
|
36837
37592
|
});
|
|
36838
37593
|
|
|
37594
|
+
// src/models/components/customerstatemeter.ts
|
|
37595
|
+
var CustomerStateMeter$inboundSchema, CustomerStateMeter$outboundSchema, CustomerStateMeter$;
|
|
37596
|
+
var init_customerstatemeter = __esm(() => {
|
|
37597
|
+
init_lib();
|
|
37598
|
+
init_primitives();
|
|
37599
|
+
CustomerStateMeter$inboundSchema = objectType({
|
|
37600
|
+
created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
|
|
37601
|
+
modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
|
|
37602
|
+
meter_id: stringType(),
|
|
37603
|
+
consumed_units: numberType(),
|
|
37604
|
+
credited_units: numberType().int(),
|
|
37605
|
+
balance: numberType()
|
|
37606
|
+
}).transform((v2) => {
|
|
37607
|
+
return remap(v2, {
|
|
37608
|
+
created_at: "createdAt",
|
|
37609
|
+
modified_at: "modifiedAt",
|
|
37610
|
+
meter_id: "meterId",
|
|
37611
|
+
consumed_units: "consumedUnits",
|
|
37612
|
+
credited_units: "creditedUnits"
|
|
37613
|
+
});
|
|
37614
|
+
});
|
|
37615
|
+
CustomerStateMeter$outboundSchema = objectType({
|
|
37616
|
+
createdAt: dateType().transform((v2) => v2.toISOString()),
|
|
37617
|
+
modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
|
|
37618
|
+
meterId: stringType(),
|
|
37619
|
+
consumedUnits: numberType(),
|
|
37620
|
+
creditedUnits: numberType().int(),
|
|
37621
|
+
balance: numberType()
|
|
37622
|
+
}).transform((v2) => {
|
|
37623
|
+
return remap(v2, {
|
|
37624
|
+
createdAt: "created_at",
|
|
37625
|
+
modifiedAt: "modified_at",
|
|
37626
|
+
meterId: "meter_id",
|
|
37627
|
+
consumedUnits: "consumed_units",
|
|
37628
|
+
creditedUnits: "credited_units"
|
|
37629
|
+
});
|
|
37630
|
+
});
|
|
37631
|
+
((CustomerStateMeter$) => {
|
|
37632
|
+
CustomerStateMeter$.inboundSchema = CustomerStateMeter$inboundSchema;
|
|
37633
|
+
CustomerStateMeter$.outboundSchema = CustomerStateMeter$outboundSchema;
|
|
37634
|
+
})(CustomerStateMeter$ ||= {});
|
|
37635
|
+
});
|
|
37636
|
+
|
|
36839
37637
|
// src/models/components/subscriptionrecurringinterval.ts
|
|
36840
37638
|
var SubscriptionRecurringInterval, SubscriptionRecurringInterval$inboundSchema, SubscriptionRecurringInterval$outboundSchema, SubscriptionRecurringInterval$;
|
|
36841
37639
|
var init_subscriptionrecurringinterval = __esm(() => {
|
|
@@ -36975,6 +37773,7 @@ var init_customerstate = __esm(() => {
|
|
|
36975
37773
|
init_primitives();
|
|
36976
37774
|
init_address();
|
|
36977
37775
|
init_customerstatebenefitgrant();
|
|
37776
|
+
init_customerstatemeter();
|
|
36978
37777
|
init_customerstatesubscription();
|
|
36979
37778
|
init_taxidformat();
|
|
36980
37779
|
CustomerStateMetadata$inboundSchema = unionType([stringType(), numberType().int(), booleanType()]);
|
|
@@ -37004,6 +37803,7 @@ var init_customerstate = __esm(() => {
|
|
|
37004
37803
|
deleted_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
|
|
37005
37804
|
active_subscriptions: arrayType(CustomerStateSubscription$inboundSchema),
|
|
37006
37805
|
granted_benefits: arrayType(CustomerStateBenefitGrant$inboundSchema),
|
|
37806
|
+
active_meters: arrayType(CustomerStateMeter$inboundSchema),
|
|
37007
37807
|
avatar_url: stringType()
|
|
37008
37808
|
}).transform((v2) => {
|
|
37009
37809
|
return remap(v2, {
|
|
@@ -37017,6 +37817,7 @@ var init_customerstate = __esm(() => {
|
|
|
37017
37817
|
deleted_at: "deletedAt",
|
|
37018
37818
|
active_subscriptions: "activeSubscriptions",
|
|
37019
37819
|
granted_benefits: "grantedBenefits",
|
|
37820
|
+
active_meters: "activeMeters",
|
|
37020
37821
|
avatar_url: "avatarUrl"
|
|
37021
37822
|
});
|
|
37022
37823
|
});
|
|
@@ -37035,6 +37836,7 @@ var init_customerstate = __esm(() => {
|
|
|
37035
37836
|
deletedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
|
|
37036
37837
|
activeSubscriptions: arrayType(CustomerStateSubscription$outboundSchema),
|
|
37037
37838
|
grantedBenefits: arrayType(CustomerStateBenefitGrant$outboundSchema),
|
|
37839
|
+
activeMeters: arrayType(CustomerStateMeter$outboundSchema),
|
|
37038
37840
|
avatarUrl: stringType()
|
|
37039
37841
|
}).transform((v2) => {
|
|
37040
37842
|
return remap(v2, {
|
|
@@ -37048,6 +37850,7 @@ var init_customerstate = __esm(() => {
|
|
|
37048
37850
|
deletedAt: "deleted_at",
|
|
37049
37851
|
activeSubscriptions: "active_subscriptions",
|
|
37050
37852
|
grantedBenefits: "granted_benefits",
|
|
37853
|
+
activeMeters: "active_meters",
|
|
37051
37854
|
avatarUrl: "avatar_url"
|
|
37052
37855
|
});
|
|
37053
37856
|
});
|
|
@@ -37075,9 +37878,9 @@ var init_customersgetstate = __esm(() => {
|
|
|
37075
37878
|
|
|
37076
37879
|
// src/funcs/customersGetState.ts
|
|
37077
37880
|
function customersGetState(client, request, options) {
|
|
37078
|
-
return new APIPromise($
|
|
37881
|
+
return new APIPromise($do8(client, request, options));
|
|
37079
37882
|
}
|
|
37080
|
-
async function $
|
|
37883
|
+
async function $do8(client, request, options) {
|
|
37081
37884
|
const parsed = safeParse(request, (value) => CustomersGetStateRequest$outboundSchema.parse(value), "Input validation failed");
|
|
37082
37885
|
if (!parsed.ok) {
|
|
37083
37886
|
return [parsed, { status: "invalid" }];
|
|
@@ -37153,12 +37956,12 @@ var init_customersGetState = __esm(() => {
|
|
|
37153
37956
|
});
|
|
37154
37957
|
|
|
37155
37958
|
// src/mcp-server/tools/customersGetState.ts
|
|
37156
|
-
var
|
|
37959
|
+
var args8, tool$customersGetState;
|
|
37157
37960
|
var init_customersGetState2 = __esm(() => {
|
|
37158
37961
|
init_customersGetState();
|
|
37159
37962
|
init_customersgetstate();
|
|
37160
37963
|
init_tools();
|
|
37161
|
-
|
|
37964
|
+
args8 = {
|
|
37162
37965
|
request: CustomersGetStateRequest$inboundSchema
|
|
37163
37966
|
};
|
|
37164
37967
|
tool$customersGetState = {
|
|
@@ -37175,9 +37978,9 @@ of a customer's status.
|
|
|
37175
37978
|
|
|
37176
37979
|
**Scopes**: \`customers:read\` \`customers:write\``,
|
|
37177
37980
|
scopes: ["read", "customers"],
|
|
37178
|
-
args:
|
|
37179
|
-
tool: async (client,
|
|
37180
|
-
const [result, apiCall] = await customersGetState(client,
|
|
37981
|
+
args: args8,
|
|
37982
|
+
tool: async (client, args9, ctx) => {
|
|
37983
|
+
const [result, apiCall] = await customersGetState(client, args9.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
37181
37984
|
if (!result.ok) {
|
|
37182
37985
|
return {
|
|
37183
37986
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -37217,9 +38020,9 @@ var init_customersgetstateexternal = __esm(() => {
|
|
|
37217
38020
|
|
|
37218
38021
|
// src/funcs/customersGetStateExternal.ts
|
|
37219
38022
|
function customersGetStateExternal(client, request, options) {
|
|
37220
|
-
return new APIPromise($
|
|
38023
|
+
return new APIPromise($do9(client, request, options));
|
|
37221
38024
|
}
|
|
37222
|
-
async function $
|
|
38025
|
+
async function $do9(client, request, options) {
|
|
37223
38026
|
const parsed = safeParse(request, (value) => CustomersGetStateExternalRequest$outboundSchema.parse(value), "Input validation failed");
|
|
37224
38027
|
if (!parsed.ok) {
|
|
37225
38028
|
return [parsed, { status: "invalid" }];
|
|
@@ -37295,12 +38098,12 @@ var init_customersGetStateExternal = __esm(() => {
|
|
|
37295
38098
|
});
|
|
37296
38099
|
|
|
37297
38100
|
// src/mcp-server/tools/customersGetStateExternal.ts
|
|
37298
|
-
var
|
|
38101
|
+
var args9, tool$customersGetStateExternal;
|
|
37299
38102
|
var init_customersGetStateExternal2 = __esm(() => {
|
|
37300
38103
|
init_customersGetStateExternal();
|
|
37301
38104
|
init_customersgetstateexternal();
|
|
37302
38105
|
init_tools();
|
|
37303
|
-
|
|
38106
|
+
args9 = {
|
|
37304
38107
|
request: CustomersGetStateExternalRequest$inboundSchema
|
|
37305
38108
|
};
|
|
37306
38109
|
tool$customersGetStateExternal = {
|
|
@@ -37317,9 +38120,9 @@ of a customer's status.
|
|
|
37317
38120
|
|
|
37318
38121
|
**Scopes**: \`customers:read\` \`customers:write\``,
|
|
37319
38122
|
scopes: ["read", "customers"],
|
|
37320
|
-
args:
|
|
37321
|
-
tool: async (client,
|
|
37322
|
-
const [result, apiCall] = await customersGetStateExternal(client,
|
|
38123
|
+
args: args9,
|
|
38124
|
+
tool: async (client, args10, ctx) => {
|
|
38125
|
+
const [result, apiCall] = await customersGetStateExternal(client, args10.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
37323
38126
|
if (!result.ok) {
|
|
37324
38127
|
return {
|
|
37325
38128
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -37378,35 +38181,6 @@ var init_customersortproperty = __esm(() => {
|
|
|
37378
38181
|
})(CustomerSortProperty$ ||= {});
|
|
37379
38182
|
});
|
|
37380
38183
|
|
|
37381
|
-
// src/models/components/pagination.ts
|
|
37382
|
-
var Pagination$inboundSchema, Pagination$outboundSchema, Pagination$;
|
|
37383
|
-
var init_pagination = __esm(() => {
|
|
37384
|
-
init_lib();
|
|
37385
|
-
init_primitives();
|
|
37386
|
-
Pagination$inboundSchema = objectType({
|
|
37387
|
-
total_count: numberType().int(),
|
|
37388
|
-
max_page: numberType().int()
|
|
37389
|
-
}).transform((v2) => {
|
|
37390
|
-
return remap(v2, {
|
|
37391
|
-
total_count: "totalCount",
|
|
37392
|
-
max_page: "maxPage"
|
|
37393
|
-
});
|
|
37394
|
-
});
|
|
37395
|
-
Pagination$outboundSchema = objectType({
|
|
37396
|
-
totalCount: numberType().int(),
|
|
37397
|
-
maxPage: numberType().int()
|
|
37398
|
-
}).transform((v2) => {
|
|
37399
|
-
return remap(v2, {
|
|
37400
|
-
totalCount: "total_count",
|
|
37401
|
-
maxPage: "max_page"
|
|
37402
|
-
});
|
|
37403
|
-
});
|
|
37404
|
-
((Pagination$) => {
|
|
37405
|
-
Pagination$.inboundSchema = Pagination$inboundSchema;
|
|
37406
|
-
Pagination$.outboundSchema = Pagination$outboundSchema;
|
|
37407
|
-
})(Pagination$ ||= {});
|
|
37408
|
-
});
|
|
37409
|
-
|
|
37410
38184
|
// src/models/components/listresourcecustomer.ts
|
|
37411
38185
|
var ListResourceCustomer$inboundSchema, ListResourceCustomer$outboundSchema, ListResourceCustomer$;
|
|
37412
38186
|
var init_listresourcecustomer = __esm(() => {
|
|
@@ -37491,43 +38265,11 @@ var init_customerslist2 = __esm(() => {
|
|
|
37491
38265
|
})(CustomersListResponse$ ||= {});
|
|
37492
38266
|
});
|
|
37493
38267
|
|
|
37494
|
-
// src/types/operations.ts
|
|
37495
|
-
function createPageIterator(page, halt) {
|
|
37496
|
-
return {
|
|
37497
|
-
[Symbol.asyncIterator]: async function* paginator() {
|
|
37498
|
-
yield page;
|
|
37499
|
-
if (halt(page)) {
|
|
37500
|
-
return;
|
|
37501
|
-
}
|
|
37502
|
-
let p = page;
|
|
37503
|
-
for (p = await p.next();p != null; p = await p.next()) {
|
|
37504
|
-
yield p;
|
|
37505
|
-
if (halt(p)) {
|
|
37506
|
-
return;
|
|
37507
|
-
}
|
|
37508
|
-
}
|
|
37509
|
-
}
|
|
37510
|
-
};
|
|
37511
|
-
}
|
|
37512
|
-
function haltIterator(v2) {
|
|
37513
|
-
return {
|
|
37514
|
-
...v2,
|
|
37515
|
-
next: () => null,
|
|
37516
|
-
[Symbol.asyncIterator]: async function* paginator() {
|
|
37517
|
-
yield v2;
|
|
37518
|
-
}
|
|
37519
|
-
};
|
|
37520
|
-
}
|
|
37521
|
-
var URL_OVERRIDE;
|
|
37522
|
-
var init_operations = __esm(() => {
|
|
37523
|
-
URL_OVERRIDE = Symbol("URL_OVERRIDE");
|
|
37524
|
-
});
|
|
37525
|
-
|
|
37526
38268
|
// src/funcs/customersList.ts
|
|
37527
38269
|
function customersList(client, request, options) {
|
|
37528
|
-
return new APIPromise($
|
|
38270
|
+
return new APIPromise($do10(client, request, options));
|
|
37529
38271
|
}
|
|
37530
|
-
async function $
|
|
38272
|
+
async function $do10(client, request, options) {
|
|
37531
38273
|
const parsed = safeParse(request, (value) => CustomersListRequest$outboundSchema.parse(value), "Input validation failed");
|
|
37532
38274
|
if (!parsed.ok) {
|
|
37533
38275
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
@@ -37640,12 +38382,12 @@ var init_customersList = __esm(() => {
|
|
|
37640
38382
|
});
|
|
37641
38383
|
|
|
37642
38384
|
// src/mcp-server/tools/customersList.ts
|
|
37643
|
-
var
|
|
38385
|
+
var args10, tool$customersList;
|
|
37644
38386
|
var init_customersList2 = __esm(() => {
|
|
37645
38387
|
init_customersList();
|
|
37646
38388
|
init_customerslist2();
|
|
37647
38389
|
init_tools();
|
|
37648
|
-
|
|
38390
|
+
args10 = {
|
|
37649
38391
|
request: CustomersListRequest$inboundSchema
|
|
37650
38392
|
};
|
|
37651
38393
|
tool$customersList = {
|
|
@@ -37656,9 +38398,9 @@ List customers.
|
|
|
37656
38398
|
|
|
37657
38399
|
**Scopes**: \`customers:read\` \`customers:write\``,
|
|
37658
38400
|
scopes: ["read", "customers"],
|
|
37659
|
-
args:
|
|
37660
|
-
tool: async (client,
|
|
37661
|
-
const [result, apiCall] = await customersList(client,
|
|
38401
|
+
args: args10,
|
|
38402
|
+
tool: async (client, args11, ctx) => {
|
|
38403
|
+
const [result, apiCall] = await customersList(client, args11.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
37662
38404
|
if (!result.ok) {
|
|
37663
38405
|
return {
|
|
37664
38406
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -37754,9 +38496,9 @@ var init_customersupdate = __esm(() => {
|
|
|
37754
38496
|
|
|
37755
38497
|
// src/funcs/customersUpdate.ts
|
|
37756
38498
|
function customersUpdate(client, request, options) {
|
|
37757
|
-
return new APIPromise($
|
|
38499
|
+
return new APIPromise($do11(client, request, options));
|
|
37758
38500
|
}
|
|
37759
|
-
async function $
|
|
38501
|
+
async function $do11(client, request, options) {
|
|
37760
38502
|
const parsed = safeParse(request, (value) => CustomersUpdateRequest$outboundSchema.parse(value), "Input validation failed");
|
|
37761
38503
|
if (!parsed.ok) {
|
|
37762
38504
|
return [parsed, { status: "invalid" }];
|
|
@@ -37833,12 +38575,12 @@ var init_customersUpdate = __esm(() => {
|
|
|
37833
38575
|
});
|
|
37834
38576
|
|
|
37835
38577
|
// src/mcp-server/tools/customersUpdate.ts
|
|
37836
|
-
var
|
|
38578
|
+
var args11, tool$customersUpdate;
|
|
37837
38579
|
var init_customersUpdate2 = __esm(() => {
|
|
37838
38580
|
init_customersUpdate();
|
|
37839
38581
|
init_customersupdate();
|
|
37840
38582
|
init_tools();
|
|
37841
|
-
|
|
38583
|
+
args11 = {
|
|
37842
38584
|
request: CustomersUpdateRequest$inboundSchema
|
|
37843
38585
|
};
|
|
37844
38586
|
tool$customersUpdate = {
|
|
@@ -37849,9 +38591,9 @@ Update a customer.
|
|
|
37849
38591
|
|
|
37850
38592
|
**Scopes**: \`customers:write\``,
|
|
37851
38593
|
scopes: ["write", "customers"],
|
|
37852
|
-
args:
|
|
37853
|
-
tool: async (client,
|
|
37854
|
-
const [result, apiCall] = await customersUpdate(client,
|
|
38594
|
+
args: args11,
|
|
38595
|
+
tool: async (client, args12, ctx) => {
|
|
38596
|
+
const [result, apiCall] = await customersUpdate(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
37855
38597
|
if (!result.ok) {
|
|
37856
38598
|
return {
|
|
37857
38599
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -37896,9 +38638,9 @@ var init_customersupdateexternal = __esm(() => {
|
|
|
37896
38638
|
|
|
37897
38639
|
// src/funcs/customersUpdateExternal.ts
|
|
37898
38640
|
function customersUpdateExternal(client, request, options) {
|
|
37899
|
-
return new APIPromise($
|
|
38641
|
+
return new APIPromise($do12(client, request, options));
|
|
37900
38642
|
}
|
|
37901
|
-
async function $
|
|
38643
|
+
async function $do12(client, request, options) {
|
|
37902
38644
|
const parsed = safeParse(request, (value) => CustomersUpdateExternalRequest$outboundSchema.parse(value), "Input validation failed");
|
|
37903
38645
|
if (!parsed.ok) {
|
|
37904
38646
|
return [parsed, { status: "invalid" }];
|
|
@@ -37975,12 +38717,12 @@ var init_customersUpdateExternal = __esm(() => {
|
|
|
37975
38717
|
});
|
|
37976
38718
|
|
|
37977
38719
|
// src/mcp-server/tools/customersUpdateExternal.ts
|
|
37978
|
-
var
|
|
38720
|
+
var args12, tool$customersUpdateExternal;
|
|
37979
38721
|
var init_customersUpdateExternal2 = __esm(() => {
|
|
37980
38722
|
init_customersUpdateExternal();
|
|
37981
38723
|
init_customersupdateexternal();
|
|
37982
38724
|
init_tools();
|
|
37983
|
-
|
|
38725
|
+
args12 = {
|
|
37984
38726
|
request: CustomersUpdateExternalRequest$inboundSchema
|
|
37985
38727
|
};
|
|
37986
38728
|
tool$customersUpdateExternal = {
|
|
@@ -37991,9 +38733,9 @@ Update a customer by external ID.
|
|
|
37991
38733
|
|
|
37992
38734
|
**Scopes**: \`customers:write\``,
|
|
37993
38735
|
scopes: ["write", "customers"],
|
|
37994
|
-
args:
|
|
37995
|
-
tool: async (client,
|
|
37996
|
-
const [result, apiCall] = await customersUpdateExternal(client,
|
|
38736
|
+
args: args12,
|
|
38737
|
+
tool: async (client, args13, ctx) => {
|
|
38738
|
+
const [result, apiCall] = await customersUpdateExternal(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
37997
38739
|
if (!result.ok) {
|
|
37998
38740
|
return {
|
|
37999
38741
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -38359,9 +39101,9 @@ var init_metricsget = __esm(() => {
|
|
|
38359
39101
|
|
|
38360
39102
|
// src/funcs/metricsGet.ts
|
|
38361
39103
|
function metricsGet(client, request, options) {
|
|
38362
|
-
return new APIPromise($
|
|
39104
|
+
return new APIPromise($do13(client, request, options));
|
|
38363
39105
|
}
|
|
38364
|
-
async function $
|
|
39106
|
+
async function $do13(client, request, options) {
|
|
38365
39107
|
const parsed = safeParse(request, (value) => MetricsGetRequest$outboundSchema.parse(value), "Input validation failed");
|
|
38366
39108
|
if (!parsed.ok) {
|
|
38367
39109
|
return [parsed, { status: "invalid" }];
|
|
@@ -38440,12 +39182,12 @@ var init_metricsGet = __esm(() => {
|
|
|
38440
39182
|
});
|
|
38441
39183
|
|
|
38442
39184
|
// src/mcp-server/tools/metricsGet.ts
|
|
38443
|
-
var
|
|
39185
|
+
var args13, tool$metricsGet;
|
|
38444
39186
|
var init_metricsGet2 = __esm(() => {
|
|
38445
39187
|
init_metricsGet();
|
|
38446
39188
|
init_metricsget();
|
|
38447
39189
|
init_tools();
|
|
38448
|
-
|
|
39190
|
+
args13 = {
|
|
38449
39191
|
request: MetricsGetRequest$inboundSchema
|
|
38450
39192
|
};
|
|
38451
39193
|
tool$metricsGet = {
|
|
@@ -38458,9 +39200,9 @@ Currency values are output in cents.
|
|
|
38458
39200
|
|
|
38459
39201
|
**Scopes**: \`metrics:read\``,
|
|
38460
39202
|
scopes: ["read", "metrics"],
|
|
38461
|
-
args:
|
|
38462
|
-
tool: async (client,
|
|
38463
|
-
const [result, apiCall] = await metricsGet(client,
|
|
39203
|
+
args: args13,
|
|
39204
|
+
tool: async (client, args14, ctx) => {
|
|
39205
|
+
const [result, apiCall] = await metricsGet(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
38464
39206
|
if (!result.ok) {
|
|
38465
39207
|
return {
|
|
38466
39208
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -38554,9 +39296,9 @@ var init_metricslimits = __esm(() => {
|
|
|
38554
39296
|
|
|
38555
39297
|
// src/funcs/metricsLimits.ts
|
|
38556
39298
|
function metricsLimits(client, options) {
|
|
38557
|
-
return new APIPromise($
|
|
39299
|
+
return new APIPromise($do14(client, options));
|
|
38558
39300
|
}
|
|
38559
|
-
async function $
|
|
39301
|
+
async function $do14(client, options) {
|
|
38560
39302
|
const path = pathToFunc("/v1/metrics/limits")();
|
|
38561
39303
|
const headers = new Headers(compactMap({
|
|
38562
39304
|
Accept: "application/json"
|
|
@@ -39818,7 +40560,7 @@ var init_productpricemeteredunit = __esm(() => {
|
|
|
39818
40560
|
type: ProductPriceType$inboundSchema,
|
|
39819
40561
|
recurring_interval: nullableType(SubscriptionRecurringInterval$inboundSchema),
|
|
39820
40562
|
price_currency: stringType(),
|
|
39821
|
-
unit_amount:
|
|
40563
|
+
unit_amount: stringType(),
|
|
39822
40564
|
cap_amount: nullableType(numberType().int()),
|
|
39823
40565
|
meter_id: stringType(),
|
|
39824
40566
|
meter: ProductPriceMeter$inboundSchema
|
|
@@ -39846,7 +40588,7 @@ var init_productpricemeteredunit = __esm(() => {
|
|
|
39846
40588
|
type: ProductPriceType$outboundSchema,
|
|
39847
40589
|
recurringInterval: nullableType(SubscriptionRecurringInterval$outboundSchema),
|
|
39848
40590
|
priceCurrency: stringType(),
|
|
39849
|
-
unitAmount:
|
|
40591
|
+
unitAmount: stringType(),
|
|
39850
40592
|
capAmount: nullableType(numberType().int()),
|
|
39851
40593
|
meterId: stringType(),
|
|
39852
40594
|
meter: ProductPriceMeter$outboundSchema
|
|
@@ -40129,9 +40871,9 @@ var init_ordersget = __esm(() => {
|
|
|
40129
40871
|
|
|
40130
40872
|
// src/funcs/ordersGet.ts
|
|
40131
40873
|
function ordersGet(client, request, options) {
|
|
40132
|
-
return new APIPromise($
|
|
40874
|
+
return new APIPromise($do15(client, request, options));
|
|
40133
40875
|
}
|
|
40134
|
-
async function $
|
|
40876
|
+
async function $do15(client, request, options) {
|
|
40135
40877
|
const parsed = safeParse(request, (value) => OrdersGetRequest$outboundSchema.parse(value), "Input validation failed");
|
|
40136
40878
|
if (!parsed.ok) {
|
|
40137
40879
|
return [parsed, { status: "invalid" }];
|
|
@@ -40207,12 +40949,12 @@ var init_ordersGet = __esm(() => {
|
|
|
40207
40949
|
});
|
|
40208
40950
|
|
|
40209
40951
|
// src/mcp-server/tools/ordersGet.ts
|
|
40210
|
-
var
|
|
40952
|
+
var args14, tool$ordersGet;
|
|
40211
40953
|
var init_ordersGet2 = __esm(() => {
|
|
40212
40954
|
init_ordersGet();
|
|
40213
40955
|
init_ordersget();
|
|
40214
40956
|
init_tools();
|
|
40215
|
-
|
|
40957
|
+
args14 = {
|
|
40216
40958
|
request: OrdersGetRequest$inboundSchema
|
|
40217
40959
|
};
|
|
40218
40960
|
tool$ordersGet = {
|
|
@@ -40223,9 +40965,9 @@ Get an order by ID.
|
|
|
40223
40965
|
|
|
40224
40966
|
**Scopes**: \`orders:read\``,
|
|
40225
40967
|
scopes: ["read", "orders"],
|
|
40226
|
-
args:
|
|
40227
|
-
tool: async (client,
|
|
40228
|
-
const [result, apiCall] = await ordersGet(client,
|
|
40968
|
+
args: args14,
|
|
40969
|
+
tool: async (client, args15, ctx) => {
|
|
40970
|
+
const [result, apiCall] = await ordersGet(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
40229
40971
|
if (!result.ok) {
|
|
40230
40972
|
return {
|
|
40231
40973
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -40272,9 +41014,9 @@ var init_ordersinvoice = __esm(() => {
|
|
|
40272
41014
|
|
|
40273
41015
|
// src/funcs/ordersInvoice.ts
|
|
40274
41016
|
function ordersInvoice(client, request, options) {
|
|
40275
|
-
return new APIPromise($
|
|
41017
|
+
return new APIPromise($do16(client, request, options));
|
|
40276
41018
|
}
|
|
40277
|
-
async function $
|
|
41019
|
+
async function $do16(client, request, options) {
|
|
40278
41020
|
const parsed = safeParse(request, (value) => OrdersInvoiceRequest$outboundSchema.parse(value), "Input validation failed");
|
|
40279
41021
|
if (!parsed.ok) {
|
|
40280
41022
|
return [parsed, { status: "invalid" }];
|
|
@@ -40350,12 +41092,12 @@ var init_ordersInvoice = __esm(() => {
|
|
|
40350
41092
|
});
|
|
40351
41093
|
|
|
40352
41094
|
// src/mcp-server/tools/ordersInvoice.ts
|
|
40353
|
-
var
|
|
41095
|
+
var args15, tool$ordersInvoice;
|
|
40354
41096
|
var init_ordersInvoice2 = __esm(() => {
|
|
40355
41097
|
init_ordersInvoice();
|
|
40356
41098
|
init_ordersinvoice();
|
|
40357
41099
|
init_tools();
|
|
40358
|
-
|
|
41100
|
+
args15 = {
|
|
40359
41101
|
request: OrdersInvoiceRequest$inboundSchema
|
|
40360
41102
|
};
|
|
40361
41103
|
tool$ordersInvoice = {
|
|
@@ -40366,9 +41108,9 @@ Get an order's invoice data.
|
|
|
40366
41108
|
|
|
40367
41109
|
**Scopes**: \`orders:read\``,
|
|
40368
41110
|
scopes: ["read", "orders"],
|
|
40369
|
-
args:
|
|
40370
|
-
tool: async (client,
|
|
40371
|
-
const [result, apiCall] = await ordersInvoice(client,
|
|
41111
|
+
args: args15,
|
|
41112
|
+
tool: async (client, args16, ctx) => {
|
|
41113
|
+
const [result, apiCall] = await ordersInvoice(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
40372
41114
|
if (!result.ok) {
|
|
40373
41115
|
return {
|
|
40374
41116
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -40574,9 +41316,9 @@ var init_orderslist = __esm(() => {
|
|
|
40574
41316
|
|
|
40575
41317
|
// src/funcs/ordersList.ts
|
|
40576
41318
|
function ordersList(client, request, options) {
|
|
40577
|
-
return new APIPromise($
|
|
41319
|
+
return new APIPromise($do17(client, request, options));
|
|
40578
41320
|
}
|
|
40579
|
-
async function $
|
|
41321
|
+
async function $do17(client, request, options) {
|
|
40580
41322
|
const parsed = safeParse(request, (value) => OrdersListRequest$outboundSchema.parse(value), "Input validation failed");
|
|
40581
41323
|
if (!parsed.ok) {
|
|
40582
41324
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
@@ -40691,12 +41433,12 @@ var init_ordersList = __esm(() => {
|
|
|
40691
41433
|
});
|
|
40692
41434
|
|
|
40693
41435
|
// src/mcp-server/tools/ordersList.ts
|
|
40694
|
-
var
|
|
41436
|
+
var args16, tool$ordersList;
|
|
40695
41437
|
var init_ordersList2 = __esm(() => {
|
|
40696
41438
|
init_ordersList();
|
|
40697
41439
|
init_orderslist();
|
|
40698
41440
|
init_tools();
|
|
40699
|
-
|
|
41441
|
+
args16 = {
|
|
40700
41442
|
request: OrdersListRequest$inboundSchema
|
|
40701
41443
|
};
|
|
40702
41444
|
tool$ordersList = {
|
|
@@ -40707,9 +41449,9 @@ List orders.
|
|
|
40707
41449
|
|
|
40708
41450
|
**Scopes**: \`orders:read\``,
|
|
40709
41451
|
scopes: ["read", "orders"],
|
|
40710
|
-
args:
|
|
40711
|
-
tool: async (client,
|
|
40712
|
-
const [result, apiCall] = await ordersList(client,
|
|
41452
|
+
args: args16,
|
|
41453
|
+
tool: async (client, args17, ctx) => {
|
|
41454
|
+
const [result, apiCall] = await ordersList(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
40713
41455
|
if (!result.ok) {
|
|
40714
41456
|
return {
|
|
40715
41457
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -41705,7 +42447,7 @@ var init_benefitmetercreditproperties = __esm(() => {
|
|
|
41705
42447
|
init_lib();
|
|
41706
42448
|
init_primitives();
|
|
41707
42449
|
BenefitMeterCreditProperties$inboundSchema = objectType({
|
|
41708
|
-
|
|
42450
|
+
units: numberType().int(),
|
|
41709
42451
|
meter_id: stringType()
|
|
41710
42452
|
}).transform((v2) => {
|
|
41711
42453
|
return remap(v2, {
|
|
@@ -41713,7 +42455,7 @@ var init_benefitmetercreditproperties = __esm(() => {
|
|
|
41713
42455
|
});
|
|
41714
42456
|
});
|
|
41715
42457
|
BenefitMeterCreditProperties$outboundSchema = objectType({
|
|
41716
|
-
|
|
42458
|
+
units: numberType().int(),
|
|
41717
42459
|
meterId: stringType()
|
|
41718
42460
|
}).transform((v2) => {
|
|
41719
42461
|
return remap(v2, {
|
|
@@ -42101,15 +42843,21 @@ var init_productpricefreecreate = __esm(() => {
|
|
|
42101
42843
|
});
|
|
42102
42844
|
|
|
42103
42845
|
// src/models/components/productpricemeteredunitcreate.ts
|
|
42104
|
-
var ProductPriceMeteredUnitCreate$inboundSchema, ProductPriceMeteredUnitCreate$outboundSchema, ProductPriceMeteredUnitCreate$;
|
|
42846
|
+
var UnitAmount$inboundSchema, UnitAmount$outboundSchema, UnitAmount$, ProductPriceMeteredUnitCreate$inboundSchema, ProductPriceMeteredUnitCreate$outboundSchema, ProductPriceMeteredUnitCreate$;
|
|
42105
42847
|
var init_productpricemeteredunitcreate = __esm(() => {
|
|
42106
42848
|
init_lib();
|
|
42107
42849
|
init_primitives();
|
|
42850
|
+
UnitAmount$inboundSchema = unionType([numberType(), stringType()]);
|
|
42851
|
+
UnitAmount$outboundSchema = unionType([numberType(), stringType()]);
|
|
42852
|
+
((UnitAmount$) => {
|
|
42853
|
+
UnitAmount$.inboundSchema = UnitAmount$inboundSchema;
|
|
42854
|
+
UnitAmount$.outboundSchema = UnitAmount$outboundSchema;
|
|
42855
|
+
})(UnitAmount$ ||= {});
|
|
42108
42856
|
ProductPriceMeteredUnitCreate$inboundSchema = objectType({
|
|
42109
42857
|
amount_type: literalType("metered_unit").optional(),
|
|
42110
42858
|
meter_id: stringType(),
|
|
42111
42859
|
price_currency: stringType().default("usd"),
|
|
42112
|
-
unit_amount: numberType()
|
|
42860
|
+
unit_amount: unionType([numberType(), stringType()]),
|
|
42113
42861
|
cap_amount: nullableType(numberType().int()).optional()
|
|
42114
42862
|
}).transform((v2) => {
|
|
42115
42863
|
return remap(v2, {
|
|
@@ -42124,7 +42872,7 @@ var init_productpricemeteredunitcreate = __esm(() => {
|
|
|
42124
42872
|
amountType: literalType("metered_unit").default("metered_unit"),
|
|
42125
42873
|
meterId: stringType(),
|
|
42126
42874
|
priceCurrency: stringType().default("usd"),
|
|
42127
|
-
unitAmount: numberType()
|
|
42875
|
+
unitAmount: unionType([numberType(), stringType()]),
|
|
42128
42876
|
capAmount: nullableType(numberType().int()).optional()
|
|
42129
42877
|
}).transform((v2) => {
|
|
42130
42878
|
return remap(v2, {
|
|
@@ -42224,9 +42972,9 @@ var init_productcreate = __esm(() => {
|
|
|
42224
42972
|
|
|
42225
42973
|
// src/funcs/productsCreate.ts
|
|
42226
42974
|
function productsCreate(client, request, options) {
|
|
42227
|
-
return new APIPromise($
|
|
42975
|
+
return new APIPromise($do18(client, request, options));
|
|
42228
42976
|
}
|
|
42229
|
-
async function $
|
|
42977
|
+
async function $do18(client, request, options) {
|
|
42230
42978
|
const parsed = safeParse(request, (value) => ProductCreate$outboundSchema.parse(value), "Input validation failed");
|
|
42231
42979
|
if (!parsed.ok) {
|
|
42232
42980
|
return [parsed, { status: "invalid" }];
|
|
@@ -42296,12 +43044,12 @@ var init_productsCreate = __esm(() => {
|
|
|
42296
43044
|
});
|
|
42297
43045
|
|
|
42298
43046
|
// src/mcp-server/tools/productsCreate.ts
|
|
42299
|
-
var
|
|
43047
|
+
var args17, tool$productsCreate;
|
|
42300
43048
|
var init_productsCreate2 = __esm(() => {
|
|
42301
43049
|
init_productsCreate();
|
|
42302
43050
|
init_productcreate();
|
|
42303
43051
|
init_tools();
|
|
42304
|
-
|
|
43052
|
+
args17 = {
|
|
42305
43053
|
request: ProductCreate$inboundSchema
|
|
42306
43054
|
};
|
|
42307
43055
|
tool$productsCreate = {
|
|
@@ -42312,9 +43060,9 @@ Create a product.
|
|
|
42312
43060
|
|
|
42313
43061
|
**Scopes**: \`products:write\``,
|
|
42314
43062
|
scopes: ["write", "products"],
|
|
42315
|
-
args:
|
|
42316
|
-
tool: async (client,
|
|
42317
|
-
const [result, apiCall] = await productsCreate(client,
|
|
43063
|
+
args: args17,
|
|
43064
|
+
tool: async (client, args18, ctx) => {
|
|
43065
|
+
const [result, apiCall] = await productsCreate(client, args18.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
42318
43066
|
if (!result.ok) {
|
|
42319
43067
|
return {
|
|
42320
43068
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -42345,9 +43093,9 @@ var init_productsget = __esm(() => {
|
|
|
42345
43093
|
|
|
42346
43094
|
// src/funcs/productsGet.ts
|
|
42347
43095
|
function productsGet(client, request, options) {
|
|
42348
|
-
return new APIPromise($
|
|
43096
|
+
return new APIPromise($do19(client, request, options));
|
|
42349
43097
|
}
|
|
42350
|
-
async function $
|
|
43098
|
+
async function $do19(client, request, options) {
|
|
42351
43099
|
const parsed = safeParse(request, (value) => ProductsGetRequest$outboundSchema.parse(value), "Input validation failed");
|
|
42352
43100
|
if (!parsed.ok) {
|
|
42353
43101
|
return [parsed, { status: "invalid" }];
|
|
@@ -42423,12 +43171,12 @@ var init_productsGet = __esm(() => {
|
|
|
42423
43171
|
});
|
|
42424
43172
|
|
|
42425
43173
|
// src/mcp-server/tools/productsGet.ts
|
|
42426
|
-
var
|
|
43174
|
+
var args18, tool$productsGet;
|
|
42427
43175
|
var init_productsGet2 = __esm(() => {
|
|
42428
43176
|
init_productsGet();
|
|
42429
43177
|
init_productsget();
|
|
42430
43178
|
init_tools();
|
|
42431
|
-
|
|
43179
|
+
args18 = {
|
|
42432
43180
|
request: ProductsGetRequest$inboundSchema
|
|
42433
43181
|
};
|
|
42434
43182
|
tool$productsGet = {
|
|
@@ -42439,9 +43187,9 @@ Get a product by ID.
|
|
|
42439
43187
|
|
|
42440
43188
|
**Scopes**: \`products:read\` \`products:write\``,
|
|
42441
43189
|
scopes: ["read", "products"],
|
|
42442
|
-
args:
|
|
42443
|
-
tool: async (client,
|
|
42444
|
-
const [result, apiCall] = await productsGet(client,
|
|
43190
|
+
args: args18,
|
|
43191
|
+
tool: async (client, args19, ctx) => {
|
|
43192
|
+
const [result, apiCall] = await productsGet(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
42445
43193
|
if (!result.ok) {
|
|
42446
43194
|
return {
|
|
42447
43195
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -42583,9 +43331,9 @@ var init_productslist = __esm(() => {
|
|
|
42583
43331
|
|
|
42584
43332
|
// src/funcs/productsList.ts
|
|
42585
43333
|
function productsList(client, request, options) {
|
|
42586
|
-
return new APIPromise($
|
|
43334
|
+
return new APIPromise($do20(client, request, options));
|
|
42587
43335
|
}
|
|
42588
|
-
async function $
|
|
43336
|
+
async function $do20(client, request, options) {
|
|
42589
43337
|
const parsed = safeParse(request, (value) => ProductsListRequest$outboundSchema.parse(value), "Input validation failed");
|
|
42590
43338
|
if (!parsed.ok) {
|
|
42591
43339
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
@@ -42699,12 +43447,12 @@ var init_productsList = __esm(() => {
|
|
|
42699
43447
|
});
|
|
42700
43448
|
|
|
42701
43449
|
// src/mcp-server/tools/productsList.ts
|
|
42702
|
-
var
|
|
43450
|
+
var args19, tool$productsList;
|
|
42703
43451
|
var init_productsList2 = __esm(() => {
|
|
42704
43452
|
init_productsList();
|
|
42705
43453
|
init_productslist();
|
|
42706
43454
|
init_tools();
|
|
42707
|
-
|
|
43455
|
+
args19 = {
|
|
42708
43456
|
request: ProductsListRequest$inboundSchema
|
|
42709
43457
|
};
|
|
42710
43458
|
tool$productsList = {
|
|
@@ -42715,9 +43463,9 @@ List products.
|
|
|
42715
43463
|
|
|
42716
43464
|
**Scopes**: \`products:read\` \`products:write\``,
|
|
42717
43465
|
scopes: ["read", "products"],
|
|
42718
|
-
args:
|
|
42719
|
-
tool: async (client,
|
|
42720
|
-
const [result, apiCall] = await productsList(client,
|
|
43466
|
+
args: args19,
|
|
43467
|
+
tool: async (client, args20, ctx) => {
|
|
43468
|
+
const [result, apiCall] = await productsList(client, args20.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
42721
43469
|
if (!result.ok) {
|
|
42722
43470
|
return {
|
|
42723
43471
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -42895,9 +43643,9 @@ var init_productsupdate = __esm(() => {
|
|
|
42895
43643
|
|
|
42896
43644
|
// src/funcs/productsUpdate.ts
|
|
42897
43645
|
function productsUpdate(client, request, options) {
|
|
42898
|
-
return new APIPromise($
|
|
43646
|
+
return new APIPromise($do21(client, request, options));
|
|
42899
43647
|
}
|
|
42900
|
-
async function $
|
|
43648
|
+
async function $do21(client, request, options) {
|
|
42901
43649
|
const parsed = safeParse(request, (value) => ProductsUpdateRequest$outboundSchema.parse(value), "Input validation failed");
|
|
42902
43650
|
if (!parsed.ok) {
|
|
42903
43651
|
return [parsed, { status: "invalid" }];
|
|
@@ -42975,12 +43723,12 @@ var init_productsUpdate = __esm(() => {
|
|
|
42975
43723
|
});
|
|
42976
43724
|
|
|
42977
43725
|
// src/mcp-server/tools/productsUpdate.ts
|
|
42978
|
-
var
|
|
43726
|
+
var args20, tool$productsUpdate;
|
|
42979
43727
|
var init_productsUpdate2 = __esm(() => {
|
|
42980
43728
|
init_productsUpdate();
|
|
42981
43729
|
init_productsupdate();
|
|
42982
43730
|
init_tools();
|
|
42983
|
-
|
|
43731
|
+
args20 = {
|
|
42984
43732
|
request: ProductsUpdateRequest$inboundSchema
|
|
42985
43733
|
};
|
|
42986
43734
|
tool$productsUpdate = {
|
|
@@ -42991,9 +43739,9 @@ Update a product.
|
|
|
42991
43739
|
|
|
42992
43740
|
**Scopes**: \`products:write\``,
|
|
42993
43741
|
scopes: ["write", "products"],
|
|
42994
|
-
args:
|
|
42995
|
-
tool: async (client,
|
|
42996
|
-
const [result, apiCall] = await productsUpdate(client,
|
|
43742
|
+
args: args20,
|
|
43743
|
+
tool: async (client, args21, ctx) => {
|
|
43744
|
+
const [result, apiCall] = await productsUpdate(client, args21.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
42997
43745
|
if (!result.ok) {
|
|
42998
43746
|
return {
|
|
42999
43747
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -43052,9 +43800,9 @@ var init_productsupdatebenefits = __esm(() => {
|
|
|
43052
43800
|
|
|
43053
43801
|
// src/funcs/productsUpdateBenefits.ts
|
|
43054
43802
|
function productsUpdateBenefits(client, request, options) {
|
|
43055
|
-
return new APIPromise($
|
|
43803
|
+
return new APIPromise($do22(client, request, options));
|
|
43056
43804
|
}
|
|
43057
|
-
async function $
|
|
43805
|
+
async function $do22(client, request, options) {
|
|
43058
43806
|
const parsed = safeParse(request, (value) => ProductsUpdateBenefitsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
43059
43807
|
if (!parsed.ok) {
|
|
43060
43808
|
return [parsed, { status: "invalid" }];
|
|
@@ -43134,12 +43882,12 @@ var init_productsUpdateBenefits = __esm(() => {
|
|
|
43134
43882
|
});
|
|
43135
43883
|
|
|
43136
43884
|
// src/mcp-server/tools/productsUpdateBenefits.ts
|
|
43137
|
-
var
|
|
43885
|
+
var args21, tool$productsUpdateBenefits;
|
|
43138
43886
|
var init_productsUpdateBenefits2 = __esm(() => {
|
|
43139
43887
|
init_productsUpdateBenefits();
|
|
43140
43888
|
init_productsupdatebenefits();
|
|
43141
43889
|
init_tools();
|
|
43142
|
-
|
|
43890
|
+
args21 = {
|
|
43143
43891
|
request: ProductsUpdateBenefitsRequest$inboundSchema
|
|
43144
43892
|
};
|
|
43145
43893
|
tool$productsUpdateBenefits = {
|
|
@@ -43150,9 +43898,9 @@ Update benefits granted by a product.
|
|
|
43150
43898
|
|
|
43151
43899
|
**Scopes**: \`products:write\``,
|
|
43152
43900
|
scopes: ["write", "products"],
|
|
43153
|
-
args:
|
|
43154
|
-
tool: async (client,
|
|
43155
|
-
const [result, apiCall] = await productsUpdateBenefits(client,
|
|
43901
|
+
args: args21,
|
|
43902
|
+
tool: async (client, args22, ctx) => {
|
|
43903
|
+
const [result, apiCall] = await productsUpdateBenefits(client, args22.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
43156
43904
|
if (!result.ok) {
|
|
43157
43905
|
return {
|
|
43158
43906
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -43198,9 +43946,9 @@ var init_subscriptionsexport = __esm(() => {
|
|
|
43198
43946
|
|
|
43199
43947
|
// src/funcs/subscriptionsExport.ts
|
|
43200
43948
|
function subscriptionsExport(client, request, options) {
|
|
43201
|
-
return new APIPromise($
|
|
43949
|
+
return new APIPromise($do23(client, request, options));
|
|
43202
43950
|
}
|
|
43203
|
-
async function $
|
|
43951
|
+
async function $do23(client, request, options) {
|
|
43204
43952
|
const parsed = safeParse(request, (value) => SubscriptionsExportRequest$outboundSchema.parse(value), "Input validation failed");
|
|
43205
43953
|
if (!parsed.ok) {
|
|
43206
43954
|
return [parsed, { status: "invalid" }];
|
|
@@ -43273,12 +44021,12 @@ var init_subscriptionsExport = __esm(() => {
|
|
|
43273
44021
|
});
|
|
43274
44022
|
|
|
43275
44023
|
// src/mcp-server/tools/subscriptionsExport.ts
|
|
43276
|
-
var
|
|
44024
|
+
var args22, tool$subscriptionsExport;
|
|
43277
44025
|
var init_subscriptionsExport2 = __esm(() => {
|
|
43278
44026
|
init_subscriptionsExport();
|
|
43279
44027
|
init_subscriptionsexport();
|
|
43280
44028
|
init_tools();
|
|
43281
|
-
|
|
44029
|
+
args22 = {
|
|
43282
44030
|
request: SubscriptionsExportRequest$inboundSchema
|
|
43283
44031
|
};
|
|
43284
44032
|
tool$subscriptionsExport = {
|
|
@@ -43289,9 +44037,9 @@ Export subscriptions as a CSV file.
|
|
|
43289
44037
|
|
|
43290
44038
|
**Scopes**: \`subscriptions:read\` \`subscriptions:write\``,
|
|
43291
44039
|
scopes: ["read", "subscriptions"],
|
|
43292
|
-
args:
|
|
43293
|
-
tool: async (client,
|
|
43294
|
-
const [result, apiCall] = await subscriptionsExport(client,
|
|
44040
|
+
args: args22,
|
|
44041
|
+
tool: async (client, args23, ctx) => {
|
|
44042
|
+
const [result, apiCall] = await subscriptionsExport(client, args23.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
43295
44043
|
if (!result.ok) {
|
|
43296
44044
|
return {
|
|
43297
44045
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -43663,9 +44411,9 @@ var init_subscriptionsget = __esm(() => {
|
|
|
43663
44411
|
|
|
43664
44412
|
// src/funcs/subscriptionsGet.ts
|
|
43665
44413
|
function subscriptionsGet(client, request, options) {
|
|
43666
|
-
return new APIPromise($
|
|
44414
|
+
return new APIPromise($do24(client, request, options));
|
|
43667
44415
|
}
|
|
43668
|
-
async function $
|
|
44416
|
+
async function $do24(client, request, options) {
|
|
43669
44417
|
const parsed = safeParse(request, (value) => SubscriptionsGetRequest$outboundSchema.parse(value), "Input validation failed");
|
|
43670
44418
|
if (!parsed.ok) {
|
|
43671
44419
|
return [parsed, { status: "invalid" }];
|
|
@@ -43741,12 +44489,12 @@ var init_subscriptionsGet = __esm(() => {
|
|
|
43741
44489
|
});
|
|
43742
44490
|
|
|
43743
44491
|
// src/mcp-server/tools/subscriptionsGet.ts
|
|
43744
|
-
var
|
|
44492
|
+
var args23, tool$subscriptionsGet;
|
|
43745
44493
|
var init_subscriptionsGet2 = __esm(() => {
|
|
43746
44494
|
init_subscriptionsGet();
|
|
43747
44495
|
init_subscriptionsget();
|
|
43748
44496
|
init_tools();
|
|
43749
|
-
|
|
44497
|
+
args23 = {
|
|
43750
44498
|
request: SubscriptionsGetRequest$inboundSchema
|
|
43751
44499
|
};
|
|
43752
44500
|
tool$subscriptionsGet = {
|
|
@@ -43757,9 +44505,9 @@ Get a subscription by ID.
|
|
|
43757
44505
|
|
|
43758
44506
|
**Scopes**: \`subscriptions:write\``,
|
|
43759
44507
|
scopes: ["read", "subscriptions"],
|
|
43760
|
-
args:
|
|
43761
|
-
tool: async (client,
|
|
43762
|
-
const [result, apiCall] = await subscriptionsGet(client,
|
|
44508
|
+
args: args23,
|
|
44509
|
+
tool: async (client, args24, ctx) => {
|
|
44510
|
+
const [result, apiCall] = await subscriptionsGet(client, args24.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
43763
44511
|
if (!result.ok) {
|
|
43764
44512
|
return {
|
|
43765
44513
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -43911,9 +44659,9 @@ var init_subscriptionslist = __esm(() => {
|
|
|
43911
44659
|
|
|
43912
44660
|
// src/funcs/subscriptionsList.ts
|
|
43913
44661
|
function subscriptionsList(client, request, options) {
|
|
43914
|
-
return new APIPromise($
|
|
44662
|
+
return new APIPromise($do25(client, request, options));
|
|
43915
44663
|
}
|
|
43916
|
-
async function $
|
|
44664
|
+
async function $do25(client, request, options) {
|
|
43917
44665
|
const parsed = safeParse(request, (value) => SubscriptionsListRequest$outboundSchema.parse(value), "Input validation failed");
|
|
43918
44666
|
if (!parsed.ok) {
|
|
43919
44667
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
@@ -44026,12 +44774,12 @@ var init_subscriptionsList = __esm(() => {
|
|
|
44026
44774
|
});
|
|
44027
44775
|
|
|
44028
44776
|
// src/mcp-server/tools/subscriptionsList.ts
|
|
44029
|
-
var
|
|
44777
|
+
var args24, tool$subscriptionsList;
|
|
44030
44778
|
var init_subscriptionsList2 = __esm(() => {
|
|
44031
44779
|
init_subscriptionsList();
|
|
44032
44780
|
init_subscriptionslist();
|
|
44033
44781
|
init_tools();
|
|
44034
|
-
|
|
44782
|
+
args24 = {
|
|
44035
44783
|
request: SubscriptionsListRequest$inboundSchema
|
|
44036
44784
|
};
|
|
44037
44785
|
tool$subscriptionsList = {
|
|
@@ -44042,9 +44790,9 @@ List subscriptions.
|
|
|
44042
44790
|
|
|
44043
44791
|
**Scopes**: \`subscriptions:read\` \`subscriptions:write\``,
|
|
44044
44792
|
scopes: ["read", "subscriptions"],
|
|
44045
|
-
args:
|
|
44046
|
-
tool: async (client,
|
|
44047
|
-
const [result, apiCall] = await subscriptionsList(client,
|
|
44793
|
+
args: args24,
|
|
44794
|
+
tool: async (client, args25, ctx) => {
|
|
44795
|
+
const [result, apiCall] = await subscriptionsList(client, args25.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
44048
44796
|
if (!result.ok) {
|
|
44049
44797
|
return {
|
|
44050
44798
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -44108,9 +44856,9 @@ var init_subscriptionsrevoke = __esm(() => {
|
|
|
44108
44856
|
|
|
44109
44857
|
// src/funcs/subscriptionsRevoke.ts
|
|
44110
44858
|
function subscriptionsRevoke(client, request, options) {
|
|
44111
|
-
return new APIPromise($
|
|
44859
|
+
return new APIPromise($do26(client, request, options));
|
|
44112
44860
|
}
|
|
44113
|
-
async function $
|
|
44861
|
+
async function $do26(client, request, options) {
|
|
44114
44862
|
const parsed = safeParse(request, (value) => SubscriptionsRevokeRequest$outboundSchema.parse(value), "Input validation failed");
|
|
44115
44863
|
if (!parsed.ok) {
|
|
44116
44864
|
return [parsed, { status: "invalid" }];
|
|
@@ -44187,12 +44935,12 @@ var init_subscriptionsRevoke = __esm(() => {
|
|
|
44187
44935
|
});
|
|
44188
44936
|
|
|
44189
44937
|
// src/mcp-server/tools/subscriptionsRevoke.ts
|
|
44190
|
-
var
|
|
44938
|
+
var args25, tool$subscriptionsRevoke;
|
|
44191
44939
|
var init_subscriptionsRevoke2 = __esm(() => {
|
|
44192
44940
|
init_subscriptionsRevoke();
|
|
44193
44941
|
init_subscriptionsrevoke();
|
|
44194
44942
|
init_tools();
|
|
44195
|
-
|
|
44943
|
+
args25 = {
|
|
44196
44944
|
request: SubscriptionsRevokeRequest$inboundSchema
|
|
44197
44945
|
};
|
|
44198
44946
|
tool$subscriptionsRevoke = {
|
|
@@ -44203,9 +44951,9 @@ Revoke a subscription, i.e cancel immediately.
|
|
|
44203
44951
|
|
|
44204
44952
|
**Scopes**: \`subscriptions:write\``,
|
|
44205
44953
|
scopes: ["write", "subscriptions"],
|
|
44206
|
-
args:
|
|
44207
|
-
tool: async (client,
|
|
44208
|
-
const [result, apiCall] = await subscriptionsRevoke(client,
|
|
44954
|
+
args: args25,
|
|
44955
|
+
tool: async (client, args26, ctx) => {
|
|
44956
|
+
const [result, apiCall] = await subscriptionsRevoke(client, args26.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
44209
44957
|
if (!result.ok) {
|
|
44210
44958
|
return {
|
|
44211
44959
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -44350,9 +45098,9 @@ var init_subscriptionsupdate = __esm(() => {
|
|
|
44350
45098
|
|
|
44351
45099
|
// src/funcs/subscriptionsUpdate.ts
|
|
44352
45100
|
function subscriptionsUpdate(client, request, options) {
|
|
44353
|
-
return new APIPromise($
|
|
45101
|
+
return new APIPromise($do27(client, request, options));
|
|
44354
45102
|
}
|
|
44355
|
-
async function $
|
|
45103
|
+
async function $do27(client, request, options) {
|
|
44356
45104
|
const parsed = safeParse(request, (value) => SubscriptionsUpdateRequest$outboundSchema.parse(value), "Input validation failed");
|
|
44357
45105
|
if (!parsed.ok) {
|
|
44358
45106
|
return [parsed, { status: "invalid" }];
|
|
@@ -44432,12 +45180,12 @@ var init_subscriptionsUpdate = __esm(() => {
|
|
|
44432
45180
|
});
|
|
44433
45181
|
|
|
44434
45182
|
// src/mcp-server/tools/subscriptionsUpdate.ts
|
|
44435
|
-
var
|
|
45183
|
+
var args26, tool$subscriptionsUpdate;
|
|
44436
45184
|
var init_subscriptionsUpdate2 = __esm(() => {
|
|
44437
45185
|
init_subscriptionsUpdate();
|
|
44438
45186
|
init_subscriptionsupdate();
|
|
44439
45187
|
init_tools();
|
|
44440
|
-
|
|
45188
|
+
args26 = {
|
|
44441
45189
|
request: SubscriptionsUpdateRequest$inboundSchema
|
|
44442
45190
|
};
|
|
44443
45191
|
tool$subscriptionsUpdate = {
|
|
@@ -44448,9 +45196,9 @@ Update a subscription.
|
|
|
44448
45196
|
|
|
44449
45197
|
**Scopes**: \`subscriptions:write\``,
|
|
44450
45198
|
scopes: ["write", "subscriptions"],
|
|
44451
|
-
args:
|
|
44452
|
-
tool: async (client,
|
|
44453
|
-
const [result, apiCall] = await subscriptionsUpdate(client,
|
|
45199
|
+
args: args26,
|
|
45200
|
+
tool: async (client, args27, ctx) => {
|
|
45201
|
+
const [result, apiCall] = await subscriptionsUpdate(client, args27.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
44454
45202
|
if (!result.ok) {
|
|
44455
45203
|
return {
|
|
44456
45204
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -44467,14 +45215,14 @@ Update a subscription.
|
|
|
44467
45215
|
function createMCPServer(deps) {
|
|
44468
45216
|
const server = new McpServer({
|
|
44469
45217
|
name: "Polar",
|
|
44470
|
-
version: "0.32.
|
|
45218
|
+
version: "0.32.7"
|
|
44471
45219
|
});
|
|
44472
45220
|
const client = new PolarCore({
|
|
44473
45221
|
accessToken: deps.accessToken,
|
|
44474
45222
|
serverURL: deps.serverURL,
|
|
44475
45223
|
server: deps.server
|
|
44476
45224
|
});
|
|
44477
|
-
const scopes = new Set(deps.scopes
|
|
45225
|
+
const scopes = new Set(deps.scopes);
|
|
44478
45226
|
const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
|
|
44479
45227
|
const tool = createRegisterTool(deps.logger, server, client, scopes, allowedTools);
|
|
44480
45228
|
const resource = createRegisterResource(deps.logger, server, client, scopes);
|
|
@@ -44506,14 +45254,17 @@ function createMCPServer(deps) {
|
|
|
44506
45254
|
tool(tool$customersDeleteExternal);
|
|
44507
45255
|
tool(tool$customersGetState);
|
|
44508
45256
|
tool(tool$customersGetStateExternal);
|
|
45257
|
+
tool(tool$customerMetersList);
|
|
45258
|
+
tool(tool$customerMetersGet);
|
|
44509
45259
|
return server;
|
|
44510
45260
|
}
|
|
44511
45261
|
var init_server2 = __esm(() => {
|
|
44512
45262
|
init_mcp();
|
|
44513
45263
|
init_core();
|
|
44514
45264
|
init_resources();
|
|
44515
|
-
init_scopes();
|
|
44516
45265
|
init_tools();
|
|
45266
|
+
init_customerMetersGet2();
|
|
45267
|
+
init_customerMetersList2();
|
|
44517
45268
|
init_customersCreate2();
|
|
44518
45269
|
init_customersDelete2();
|
|
44519
45270
|
init_customersDeleteExternal2();
|
|
@@ -45624,7 +46375,20 @@ function buildContext(process2) {
|
|
|
45624
46375
|
init_lib();
|
|
45625
46376
|
init_config();
|
|
45626
46377
|
init_console_logger();
|
|
45627
|
-
|
|
46378
|
+
|
|
46379
|
+
// src/mcp-server/scopes.ts
|
|
46380
|
+
var mcpScopes = [
|
|
46381
|
+
"customer_meters",
|
|
46382
|
+
"customers",
|
|
46383
|
+
"metrics",
|
|
46384
|
+
"orders",
|
|
46385
|
+
"products",
|
|
46386
|
+
"read",
|
|
46387
|
+
"subscriptions",
|
|
46388
|
+
"write"
|
|
46389
|
+
];
|
|
46390
|
+
|
|
46391
|
+
// src/mcp-server/cli/start/command.ts
|
|
45628
46392
|
var startCommand = tn({
|
|
45629
46393
|
loader: async () => {
|
|
45630
46394
|
const { main: main2 } = await Promise.resolve().then(() => (init_impl(), exports_impl));
|
|
@@ -45729,7 +46493,7 @@ var routes = rn({
|
|
|
45729
46493
|
var app = Ve(routes, {
|
|
45730
46494
|
name: "mcp",
|
|
45731
46495
|
versionInfo: {
|
|
45732
|
-
currentVersion: "0.32.
|
|
46496
|
+
currentVersion: "0.32.7"
|
|
45733
46497
|
}
|
|
45734
46498
|
});
|
|
45735
46499
|
_t(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -45737,5 +46501,5 @@ export {
|
|
|
45737
46501
|
app
|
|
45738
46502
|
};
|
|
45739
46503
|
|
|
45740
|
-
//# debugId=
|
|
46504
|
+
//# debugId=260FEF7FBB2151A764756E2164756E21
|
|
45741
46505
|
//# sourceMappingURL=mcp-server.js.map
|