@rhinosaas/rebillia-mcp-server 1.0.6
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/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +415 -0
- package/dist/client.d.ts +45 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +130 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +93 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +2 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +3 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/api-docs.d.ts +31 -0
- package/dist/resources/api-docs.d.ts.map +1 -0
- package/dist/resources/api-docs.js +425 -0
- package/dist/resources/api-docs.js.map +1 -0
- package/dist/resources/index.d.ts +22 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +31 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/services/billRunServices.d.ts +26 -0
- package/dist/services/billRunServices.d.ts.map +1 -0
- package/dist/services/billRunServices.js +51 -0
- package/dist/services/billRunServices.js.map +1 -0
- package/dist/services/countryResolverService.d.ts +28 -0
- package/dist/services/countryResolverService.d.ts.map +1 -0
- package/dist/services/countryResolverService.js +121 -0
- package/dist/services/countryResolverService.js.map +1 -0
- package/dist/services/currencyServices.d.ts +43 -0
- package/dist/services/currencyServices.d.ts.map +1 -0
- package/dist/services/currencyServices.js +41 -0
- package/dist/services/currencyServices.js.map +1 -0
- package/dist/services/customerServices.d.ts +156 -0
- package/dist/services/customerServices.d.ts.map +1 -0
- package/dist/services/customerServices.js +181 -0
- package/dist/services/customerServices.js.map +1 -0
- package/dist/services/filterServices.d.ts +33 -0
- package/dist/services/filterServices.d.ts.map +1 -0
- package/dist/services/filterServices.js +27 -0
- package/dist/services/filterServices.js.map +1 -0
- package/dist/services/gatewayServices.d.ts +50 -0
- package/dist/services/gatewayServices.d.ts.map +1 -0
- package/dist/services/gatewayServices.js +53 -0
- package/dist/services/gatewayServices.js.map +1 -0
- package/dist/services/globalGatewayService.d.ts +22 -0
- package/dist/services/globalGatewayService.d.ts.map +1 -0
- package/dist/services/globalGatewayService.js +74 -0
- package/dist/services/globalGatewayService.js.map +1 -0
- package/dist/services/integrationServices.d.ts +40 -0
- package/dist/services/integrationServices.d.ts.map +1 -0
- package/dist/services/integrationServices.js +59 -0
- package/dist/services/integrationServices.js.map +1 -0
- package/dist/services/invoiceServices.d.ts +99 -0
- package/dist/services/invoiceServices.d.ts.map +1 -0
- package/dist/services/invoiceServices.js +59 -0
- package/dist/services/invoiceServices.js.map +1 -0
- package/dist/services/productRatePlanChargeServices.d.ts +94 -0
- package/dist/services/productRatePlanChargeServices.d.ts.map +1 -0
- package/dist/services/productRatePlanChargeServices.js +125 -0
- package/dist/services/productRatePlanChargeServices.js.map +1 -0
- package/dist/services/productRatePlanServices.d.ts +57 -0
- package/dist/services/productRatePlanServices.d.ts.map +1 -0
- package/dist/services/productRatePlanServices.js +49 -0
- package/dist/services/productRatePlanServices.js.map +1 -0
- package/dist/services/productServices.d.ts +60 -0
- package/dist/services/productServices.d.ts.map +1 -0
- package/dist/services/productServices.js +64 -0
- package/dist/services/productServices.js.map +1 -0
- package/dist/services/shippingServices.d.ts +34 -0
- package/dist/services/shippingServices.d.ts.map +1 -0
- package/dist/services/shippingServices.js +15 -0
- package/dist/services/shippingServices.js.map +1 -0
- package/dist/services/subscriptionServices.d.ts +193 -0
- package/dist/services/subscriptionServices.d.ts.map +1 -0
- package/dist/services/subscriptionServices.js +169 -0
- package/dist/services/subscriptionServices.js.map +1 -0
- package/dist/services/transactionServices.d.ts +20 -0
- package/dist/services/transactionServices.d.ts.map +1 -0
- package/dist/services/transactionServices.js +33 -0
- package/dist/services/transactionServices.js.map +1 -0
- package/dist/tools/bill_runs/getBillRun.d.ts +3 -0
- package/dist/tools/bill_runs/getBillRun.d.ts.map +1 -0
- package/dist/tools/bill_runs/getBillRun.js +29 -0
- package/dist/tools/bill_runs/getBillRun.js.map +1 -0
- package/dist/tools/bill_runs/getBillRunInvoices.d.ts +3 -0
- package/dist/tools/bill_runs/getBillRunInvoices.d.ts.map +1 -0
- package/dist/tools/bill_runs/getBillRunInvoices.js +29 -0
- package/dist/tools/bill_runs/getBillRunInvoices.js.map +1 -0
- package/dist/tools/bill_runs/helpers.d.ts +6 -0
- package/dist/tools/bill_runs/helpers.d.ts.map +1 -0
- package/dist/tools/bill_runs/helpers.js +22 -0
- package/dist/tools/bill_runs/helpers.js.map +1 -0
- package/dist/tools/bill_runs/index.d.ts +11 -0
- package/dist/tools/bill_runs/index.d.ts.map +1 -0
- package/dist/tools/bill_runs/index.js +21 -0
- package/dist/tools/bill_runs/index.js.map +1 -0
- package/dist/tools/bill_runs/listBillRuns.d.ts +3 -0
- package/dist/tools/bill_runs/listBillRuns.d.ts.map +1 -0
- package/dist/tools/bill_runs/listBillRuns.js +43 -0
- package/dist/tools/bill_runs/listBillRuns.js.map +1 -0
- package/dist/tools/bill_runs/updateBillRun.d.ts +3 -0
- package/dist/tools/bill_runs/updateBillRun.d.ts.map +1 -0
- package/dist/tools/bill_runs/updateBillRun.js +35 -0
- package/dist/tools/bill_runs/updateBillRun.js.map +1 -0
- package/dist/tools/currencies/createCurrency.d.ts +3 -0
- package/dist/tools/currencies/createCurrency.d.ts.map +1 -0
- package/dist/tools/currencies/createCurrency.js +33 -0
- package/dist/tools/currencies/createCurrency.js.map +1 -0
- package/dist/tools/currencies/deleteCurrency.d.ts +3 -0
- package/dist/tools/currencies/deleteCurrency.d.ts.map +1 -0
- package/dist/tools/currencies/deleteCurrency.js +29 -0
- package/dist/tools/currencies/deleteCurrency.js.map +1 -0
- package/dist/tools/currencies/getCurrency.d.ts +3 -0
- package/dist/tools/currencies/getCurrency.d.ts.map +1 -0
- package/dist/tools/currencies/getCurrency.js +29 -0
- package/dist/tools/currencies/getCurrency.js.map +1 -0
- package/dist/tools/currencies/getDefaultCurrency.d.ts +3 -0
- package/dist/tools/currencies/getDefaultCurrency.d.ts.map +1 -0
- package/dist/tools/currencies/getDefaultCurrency.js +19 -0
- package/dist/tools/currencies/getDefaultCurrency.js.map +1 -0
- package/dist/tools/currencies/helpers.d.ts +6 -0
- package/dist/tools/currencies/helpers.d.ts.map +1 -0
- package/dist/tools/currencies/helpers.js +22 -0
- package/dist/tools/currencies/helpers.js.map +1 -0
- package/dist/tools/currencies/index.d.ts +14 -0
- package/dist/tools/currencies/index.d.ts.map +1 -0
- package/dist/tools/currencies/index.js +30 -0
- package/dist/tools/currencies/index.js.map +1 -0
- package/dist/tools/currencies/listCurrencies.d.ts +3 -0
- package/dist/tools/currencies/listCurrencies.d.ts.map +1 -0
- package/dist/tools/currencies/listCurrencies.js +33 -0
- package/dist/tools/currencies/listCurrencies.js.map +1 -0
- package/dist/tools/currencies/setDefaultCurrency.d.ts +3 -0
- package/dist/tools/currencies/setDefaultCurrency.d.ts.map +1 -0
- package/dist/tools/currencies/setDefaultCurrency.js +29 -0
- package/dist/tools/currencies/setDefaultCurrency.js.map +1 -0
- package/dist/tools/currencies/updateCurrency.d.ts +3 -0
- package/dist/tools/currencies/updateCurrency.d.ts.map +1 -0
- package/dist/tools/currencies/updateCurrency.js +34 -0
- package/dist/tools/currencies/updateCurrency.js.map +1 -0
- package/dist/tools/customers/createCustomer.d.ts +3 -0
- package/dist/tools/customers/createCustomer.d.ts.map +1 -0
- package/dist/tools/customers/createCustomer.js +45 -0
- package/dist/tools/customers/createCustomer.js.map +1 -0
- package/dist/tools/customers/createCustomerAddress.d.ts +3 -0
- package/dist/tools/customers/createCustomerAddress.d.ts.map +1 -0
- package/dist/tools/customers/createCustomerAddress.js +68 -0
- package/dist/tools/customers/createCustomerAddress.js.map +1 -0
- package/dist/tools/customers/createCustomerChargeCredit.d.ts +3 -0
- package/dist/tools/customers/createCustomerChargeCredit.d.ts.map +1 -0
- package/dist/tools/customers/createCustomerChargeCredit.js +74 -0
- package/dist/tools/customers/createCustomerChargeCredit.js.map +1 -0
- package/dist/tools/customers/createCustomerPaymentMethod.d.ts +3 -0
- package/dist/tools/customers/createCustomerPaymentMethod.d.ts.map +1 -0
- package/dist/tools/customers/createCustomerPaymentMethod.js +80 -0
- package/dist/tools/customers/createCustomerPaymentMethod.js.map +1 -0
- package/dist/tools/customers/deleteCustomer.d.ts +3 -0
- package/dist/tools/customers/deleteCustomer.d.ts.map +1 -0
- package/dist/tools/customers/deleteCustomer.js +29 -0
- package/dist/tools/customers/deleteCustomer.js.map +1 -0
- package/dist/tools/customers/deleteCustomerAddress.d.ts +3 -0
- package/dist/tools/customers/deleteCustomerAddress.d.ts.map +1 -0
- package/dist/tools/customers/deleteCustomerAddress.js +32 -0
- package/dist/tools/customers/deleteCustomerAddress.js.map +1 -0
- package/dist/tools/customers/deleteCustomerChargeCredit.d.ts +3 -0
- package/dist/tools/customers/deleteCustomerChargeCredit.d.ts.map +1 -0
- package/dist/tools/customers/deleteCustomerChargeCredit.js +32 -0
- package/dist/tools/customers/deleteCustomerChargeCredit.js.map +1 -0
- package/dist/tools/customers/deleteCustomerPaymentMethod.d.ts +3 -0
- package/dist/tools/customers/deleteCustomerPaymentMethod.d.ts.map +1 -0
- package/dist/tools/customers/deleteCustomerPaymentMethod.js +32 -0
- package/dist/tools/customers/deleteCustomerPaymentMethod.js.map +1 -0
- package/dist/tools/customers/getCustomer.d.ts +3 -0
- package/dist/tools/customers/getCustomer.d.ts.map +1 -0
- package/dist/tools/customers/getCustomer.js +34 -0
- package/dist/tools/customers/getCustomer.js.map +1 -0
- package/dist/tools/customers/getCustomerAddress.d.ts +3 -0
- package/dist/tools/customers/getCustomerAddress.d.ts.map +1 -0
- package/dist/tools/customers/getCustomerAddress.js +32 -0
- package/dist/tools/customers/getCustomerAddress.js.map +1 -0
- package/dist/tools/customers/getCustomerInvoices.d.ts +3 -0
- package/dist/tools/customers/getCustomerInvoices.d.ts.map +1 -0
- package/dist/tools/customers/getCustomerInvoices.js +36 -0
- package/dist/tools/customers/getCustomerInvoices.js.map +1 -0
- package/dist/tools/customers/getCustomerLogs.d.ts +3 -0
- package/dist/tools/customers/getCustomerLogs.d.ts.map +1 -0
- package/dist/tools/customers/getCustomerLogs.js +34 -0
- package/dist/tools/customers/getCustomerLogs.js.map +1 -0
- package/dist/tools/customers/getCustomerPaymentMethod.d.ts +3 -0
- package/dist/tools/customers/getCustomerPaymentMethod.d.ts.map +1 -0
- package/dist/tools/customers/getCustomerPaymentMethod.js +32 -0
- package/dist/tools/customers/getCustomerPaymentMethod.js.map +1 -0
- package/dist/tools/customers/getCustomerSubscriptions.d.ts +3 -0
- package/dist/tools/customers/getCustomerSubscriptions.d.ts.map +1 -0
- package/dist/tools/customers/getCustomerSubscriptions.js +36 -0
- package/dist/tools/customers/getCustomerSubscriptions.js.map +1 -0
- package/dist/tools/customers/helpers.d.ts +6 -0
- package/dist/tools/customers/helpers.d.ts.map +1 -0
- package/dist/tools/customers/helpers.js +27 -0
- package/dist/tools/customers/helpers.js.map +1 -0
- package/dist/tools/customers/index.d.ts +29 -0
- package/dist/tools/customers/index.d.ts.map +1 -0
- package/dist/tools/customers/index.js +73 -0
- package/dist/tools/customers/index.js.map +1 -0
- package/dist/tools/customers/listCustomerAddresses.d.ts +3 -0
- package/dist/tools/customers/listCustomerAddresses.d.ts.map +1 -0
- package/dist/tools/customers/listCustomerAddresses.js +30 -0
- package/dist/tools/customers/listCustomerAddresses.js.map +1 -0
- package/dist/tools/customers/listCustomerChargesCredits.d.ts +3 -0
- package/dist/tools/customers/listCustomerChargesCredits.d.ts.map +1 -0
- package/dist/tools/customers/listCustomerChargesCredits.js +43 -0
- package/dist/tools/customers/listCustomerChargesCredits.js.map +1 -0
- package/dist/tools/customers/listCustomerPaymentMethods.d.ts +3 -0
- package/dist/tools/customers/listCustomerPaymentMethods.d.ts.map +1 -0
- package/dist/tools/customers/listCustomerPaymentMethods.js +30 -0
- package/dist/tools/customers/listCustomerPaymentMethods.js.map +1 -0
- package/dist/tools/customers/listCustomers.d.ts +3 -0
- package/dist/tools/customers/listCustomers.d.ts.map +1 -0
- package/dist/tools/customers/listCustomers.js +50 -0
- package/dist/tools/customers/listCustomers.js.map +1 -0
- package/dist/tools/customers/updateCustomer.d.ts +3 -0
- package/dist/tools/customers/updateCustomer.d.ts.map +1 -0
- package/dist/tools/customers/updateCustomer.js +50 -0
- package/dist/tools/customers/updateCustomer.js.map +1 -0
- package/dist/tools/customers/updateCustomerAddress.d.ts +3 -0
- package/dist/tools/customers/updateCustomerAddress.d.ts.map +1 -0
- package/dist/tools/customers/updateCustomerAddress.js +78 -0
- package/dist/tools/customers/updateCustomerAddress.js.map +1 -0
- package/dist/tools/customers/updateCustomerPaymentMethod.d.ts +3 -0
- package/dist/tools/customers/updateCustomerPaymentMethod.d.ts.map +1 -0
- package/dist/tools/customers/updateCustomerPaymentMethod.js +59 -0
- package/dist/tools/customers/updateCustomerPaymentMethod.js.map +1 -0
- package/dist/tools/docs/getApiDocs.d.ts +3 -0
- package/dist/tools/docs/getApiDocs.d.ts.map +1 -0
- package/dist/tools/docs/getApiDocs.js +39 -0
- package/dist/tools/docs/getApiDocs.js.map +1 -0
- package/dist/tools/docs/helpers.d.ts +4 -0
- package/dist/tools/docs/helpers.d.ts.map +1 -0
- package/dist/tools/docs/helpers.js +7 -0
- package/dist/tools/docs/helpers.js.map +1 -0
- package/dist/tools/docs/index.d.ts +8 -0
- package/dist/tools/docs/index.d.ts.map +1 -0
- package/dist/tools/docs/index.js +10 -0
- package/dist/tools/docs/index.js.map +1 -0
- package/dist/tools/filters/constants.d.ts +7 -0
- package/dist/tools/filters/constants.d.ts.map +1 -0
- package/dist/tools/filters/constants.js +64 -0
- package/dist/tools/filters/constants.js.map +1 -0
- package/dist/tools/filters/createFilter.d.ts +3 -0
- package/dist/tools/filters/createFilter.d.ts.map +1 -0
- package/dist/tools/filters/createFilter.js +65 -0
- package/dist/tools/filters/createFilter.js.map +1 -0
- package/dist/tools/filters/helpers.d.ts +6 -0
- package/dist/tools/filters/helpers.d.ts.map +1 -0
- package/dist/tools/filters/helpers.js +22 -0
- package/dist/tools/filters/helpers.js.map +1 -0
- package/dist/tools/filters/index.d.ts +12 -0
- package/dist/tools/filters/index.d.ts.map +1 -0
- package/dist/tools/filters/index.js +17 -0
- package/dist/tools/filters/index.js.map +1 -0
- package/dist/tools/filters/listFilterFields.d.ts +3 -0
- package/dist/tools/filters/listFilterFields.d.ts.map +1 -0
- package/dist/tools/filters/listFilterFields.js +35 -0
- package/dist/tools/filters/listFilterFields.js.map +1 -0
- package/dist/tools/filters/listFilters.d.ts +3 -0
- package/dist/tools/filters/listFilters.d.ts.map +1 -0
- package/dist/tools/filters/listFilters.js +35 -0
- package/dist/tools/filters/listFilters.js.map +1 -0
- package/dist/tools/filters/removeFilter.d.ts +3 -0
- package/dist/tools/filters/removeFilter.d.ts.map +1 -0
- package/dist/tools/filters/removeFilter.js +32 -0
- package/dist/tools/filters/removeFilter.js.map +1 -0
- package/dist/tools/gateways/createGateway.d.ts +3 -0
- package/dist/tools/gateways/createGateway.d.ts.map +1 -0
- package/dist/tools/gateways/createGateway.js +55 -0
- package/dist/tools/gateways/createGateway.js.map +1 -0
- package/dist/tools/gateways/createSetupIntent.d.ts +3 -0
- package/dist/tools/gateways/createSetupIntent.d.ts.map +1 -0
- package/dist/tools/gateways/createSetupIntent.js +32 -0
- package/dist/tools/gateways/createSetupIntent.js.map +1 -0
- package/dist/tools/gateways/deleteGateway.d.ts +3 -0
- package/dist/tools/gateways/deleteGateway.d.ts.map +1 -0
- package/dist/tools/gateways/deleteGateway.js +29 -0
- package/dist/tools/gateways/deleteGateway.js.map +1 -0
- package/dist/tools/gateways/getClientToken.d.ts +3 -0
- package/dist/tools/gateways/getClientToken.d.ts.map +1 -0
- package/dist/tools/gateways/getClientToken.js +38 -0
- package/dist/tools/gateways/getClientToken.js.map +1 -0
- package/dist/tools/gateways/getGateway.d.ts +3 -0
- package/dist/tools/gateways/getGateway.d.ts.map +1 -0
- package/dist/tools/gateways/getGateway.js +29 -0
- package/dist/tools/gateways/getGateway.js.map +1 -0
- package/dist/tools/gateways/helpers.d.ts +6 -0
- package/dist/tools/gateways/helpers.d.ts.map +1 -0
- package/dist/tools/gateways/helpers.js +22 -0
- package/dist/tools/gateways/helpers.js.map +1 -0
- package/dist/tools/gateways/index.d.ts +16 -0
- package/dist/tools/gateways/index.d.ts.map +1 -0
- package/dist/tools/gateways/index.js +36 -0
- package/dist/tools/gateways/index.js.map +1 -0
- package/dist/tools/gateways/listGateways.d.ts +3 -0
- package/dist/tools/gateways/listGateways.d.ts.map +1 -0
- package/dist/tools/gateways/listGateways.js +33 -0
- package/dist/tools/gateways/listGateways.js.map +1 -0
- package/dist/tools/gateways/listGlobalGateways.d.ts +3 -0
- package/dist/tools/gateways/listGlobalGateways.d.ts.map +1 -0
- package/dist/tools/gateways/listGlobalGateways.js +19 -0
- package/dist/tools/gateways/listGlobalGateways.js.map +1 -0
- package/dist/tools/gateways/testGateway.d.ts +3 -0
- package/dist/tools/gateways/testGateway.d.ts.map +1 -0
- package/dist/tools/gateways/testGateway.js +29 -0
- package/dist/tools/gateways/testGateway.js.map +1 -0
- package/dist/tools/gateways/updateGateway.d.ts +3 -0
- package/dist/tools/gateways/updateGateway.d.ts.map +1 -0
- package/dist/tools/gateways/updateGateway.js +39 -0
- package/dist/tools/gateways/updateGateway.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +48 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/integrations/constants.d.ts +7 -0
- package/dist/tools/integrations/constants.d.ts.map +1 -0
- package/dist/tools/integrations/constants.js +42 -0
- package/dist/tools/integrations/constants.js.map +1 -0
- package/dist/tools/integrations/getExternalProduct.d.ts +3 -0
- package/dist/tools/integrations/getExternalProduct.d.ts.map +1 -0
- package/dist/tools/integrations/getExternalProduct.js +35 -0
- package/dist/tools/integrations/getExternalProduct.js.map +1 -0
- package/dist/tools/integrations/getIntegrationByKey.d.ts +3 -0
- package/dist/tools/integrations/getIntegrationByKey.d.ts.map +1 -0
- package/dist/tools/integrations/getIntegrationByKey.js +36 -0
- package/dist/tools/integrations/getIntegrationByKey.js.map +1 -0
- package/dist/tools/integrations/getIntegrationConfig.d.ts +3 -0
- package/dist/tools/integrations/getIntegrationConfig.d.ts.map +1 -0
- package/dist/tools/integrations/getIntegrationConfig.js +29 -0
- package/dist/tools/integrations/getIntegrationConfig.js.map +1 -0
- package/dist/tools/integrations/helpers.d.ts +6 -0
- package/dist/tools/integrations/helpers.d.ts.map +1 -0
- package/dist/tools/integrations/helpers.js +22 -0
- package/dist/tools/integrations/helpers.js.map +1 -0
- package/dist/tools/integrations/index.d.ts +16 -0
- package/dist/tools/integrations/index.d.ts.map +1 -0
- package/dist/tools/integrations/index.js +34 -0
- package/dist/tools/integrations/index.js.map +1 -0
- package/dist/tools/integrations/listExternalInvoices.d.ts +3 -0
- package/dist/tools/integrations/listExternalInvoices.d.ts.map +1 -0
- package/dist/tools/integrations/listExternalInvoices.js +40 -0
- package/dist/tools/integrations/listExternalInvoices.js.map +1 -0
- package/dist/tools/integrations/listExternalProducts.d.ts +3 -0
- package/dist/tools/integrations/listExternalProducts.d.ts.map +1 -0
- package/dist/tools/integrations/listExternalProducts.js +32 -0
- package/dist/tools/integrations/listExternalProducts.js.map +1 -0
- package/dist/tools/integrations/listIntegrations.d.ts +3 -0
- package/dist/tools/integrations/listIntegrations.d.ts.map +1 -0
- package/dist/tools/integrations/listIntegrations.js +39 -0
- package/dist/tools/integrations/listIntegrations.js.map +1 -0
- package/dist/tools/integrations/listIntegrationsByKey.d.ts +3 -0
- package/dist/tools/integrations/listIntegrationsByKey.d.ts.map +1 -0
- package/dist/tools/integrations/listIntegrationsByKey.js +36 -0
- package/dist/tools/integrations/listIntegrationsByKey.js.map +1 -0
- package/dist/tools/integrations/listOrderStatuses.d.ts +3 -0
- package/dist/tools/integrations/listOrderStatuses.d.ts.map +1 -0
- package/dist/tools/integrations/listOrderStatuses.js +29 -0
- package/dist/tools/integrations/listOrderStatuses.js.map +1 -0
- package/dist/tools/invoices/chargeInvoice.d.ts +3 -0
- package/dist/tools/invoices/chargeInvoice.d.ts.map +1 -0
- package/dist/tools/invoices/chargeInvoice.js +41 -0
- package/dist/tools/invoices/chargeInvoice.js.map +1 -0
- package/dist/tools/invoices/chargeInvoiceExternal.d.ts +3 -0
- package/dist/tools/invoices/chargeInvoiceExternal.d.ts.map +1 -0
- package/dist/tools/invoices/chargeInvoiceExternal.js +35 -0
- package/dist/tools/invoices/chargeInvoiceExternal.js.map +1 -0
- package/dist/tools/invoices/createInvoice.d.ts +3 -0
- package/dist/tools/invoices/createInvoice.d.ts.map +1 -0
- package/dist/tools/invoices/createInvoice.js +188 -0
- package/dist/tools/invoices/createInvoice.js.map +1 -0
- package/dist/tools/invoices/deleteInvoice.d.ts +3 -0
- package/dist/tools/invoices/deleteInvoice.d.ts.map +1 -0
- package/dist/tools/invoices/deleteInvoice.js +29 -0
- package/dist/tools/invoices/deleteInvoice.js.map +1 -0
- package/dist/tools/invoices/getInvoice.d.ts +3 -0
- package/dist/tools/invoices/getInvoice.d.ts.map +1 -0
- package/dist/tools/invoices/getInvoice.js +32 -0
- package/dist/tools/invoices/getInvoice.js.map +1 -0
- package/dist/tools/invoices/helpers.d.ts +6 -0
- package/dist/tools/invoices/helpers.d.ts.map +1 -0
- package/dist/tools/invoices/helpers.js +22 -0
- package/dist/tools/invoices/helpers.js.map +1 -0
- package/dist/tools/invoices/index.d.ts +15 -0
- package/dist/tools/invoices/index.d.ts.map +1 -0
- package/dist/tools/invoices/index.js +33 -0
- package/dist/tools/invoices/index.js.map +1 -0
- package/dist/tools/invoices/listInvoices.d.ts +3 -0
- package/dist/tools/invoices/listInvoices.d.ts.map +1 -0
- package/dist/tools/invoices/listInvoices.js +43 -0
- package/dist/tools/invoices/listInvoices.js.map +1 -0
- package/dist/tools/invoices/updateInvoice.d.ts +3 -0
- package/dist/tools/invoices/updateInvoice.d.ts.map +1 -0
- package/dist/tools/invoices/updateInvoice.js +137 -0
- package/dist/tools/invoices/updateInvoice.js.map +1 -0
- package/dist/tools/invoices/voidInvoice.d.ts +3 -0
- package/dist/tools/invoices/voidInvoice.d.ts.map +1 -0
- package/dist/tools/invoices/voidInvoice.js +29 -0
- package/dist/tools/invoices/voidInvoice.js.map +1 -0
- package/dist/tools/product_rate_plan_charges/createRatePlanCharge.d.ts +3 -0
- package/dist/tools/product_rate_plan_charges/createRatePlanCharge.d.ts.map +1 -0
- package/dist/tools/product_rate_plan_charges/createRatePlanCharge.js +132 -0
- package/dist/tools/product_rate_plan_charges/createRatePlanCharge.js.map +1 -0
- package/dist/tools/product_rate_plan_charges/deleteRatePlanCharge.d.ts +3 -0
- package/dist/tools/product_rate_plan_charges/deleteRatePlanCharge.d.ts.map +1 -0
- package/dist/tools/product_rate_plan_charges/deleteRatePlanCharge.js +29 -0
- package/dist/tools/product_rate_plan_charges/deleteRatePlanCharge.js.map +1 -0
- package/dist/tools/product_rate_plan_charges/getRatePlanCharge.d.ts +3 -0
- package/dist/tools/product_rate_plan_charges/getRatePlanCharge.d.ts.map +1 -0
- package/dist/tools/product_rate_plan_charges/getRatePlanCharge.js +32 -0
- package/dist/tools/product_rate_plan_charges/getRatePlanCharge.js.map +1 -0
- package/dist/tools/product_rate_plan_charges/helpers.d.ts +6 -0
- package/dist/tools/product_rate_plan_charges/helpers.d.ts.map +1 -0
- package/dist/tools/product_rate_plan_charges/helpers.js +24 -0
- package/dist/tools/product_rate_plan_charges/helpers.js.map +1 -0
- package/dist/tools/product_rate_plan_charges/index.d.ts +12 -0
- package/dist/tools/product_rate_plan_charges/index.d.ts.map +1 -0
- package/dist/tools/product_rate_plan_charges/index.js +24 -0
- package/dist/tools/product_rate_plan_charges/index.js.map +1 -0
- package/dist/tools/product_rate_plan_charges/listRatePlanCharges.d.ts +3 -0
- package/dist/tools/product_rate_plan_charges/listRatePlanCharges.d.ts.map +1 -0
- package/dist/tools/product_rate_plan_charges/listRatePlanCharges.js +40 -0
- package/dist/tools/product_rate_plan_charges/listRatePlanCharges.js.map +1 -0
- package/dist/tools/product_rate_plan_charges/updateRatePlanCharge.d.ts +3 -0
- package/dist/tools/product_rate_plan_charges/updateRatePlanCharge.d.ts.map +1 -0
- package/dist/tools/product_rate_plan_charges/updateRatePlanCharge.js +279 -0
- package/dist/tools/product_rate_plan_charges/updateRatePlanCharge.js.map +1 -0
- package/dist/tools/product_rate_plans/createRatePlan.d.ts +3 -0
- package/dist/tools/product_rate_plans/createRatePlan.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/createRatePlan.js +53 -0
- package/dist/tools/product_rate_plans/createRatePlan.js.map +1 -0
- package/dist/tools/product_rate_plans/deleteRatePlan.d.ts +3 -0
- package/dist/tools/product_rate_plans/deleteRatePlan.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/deleteRatePlan.js +29 -0
- package/dist/tools/product_rate_plans/deleteRatePlan.js.map +1 -0
- package/dist/tools/product_rate_plans/getRatePlan.d.ts +3 -0
- package/dist/tools/product_rate_plans/getRatePlan.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/getRatePlan.js +32 -0
- package/dist/tools/product_rate_plans/getRatePlan.js.map +1 -0
- package/dist/tools/product_rate_plans/helpers.d.ts +6 -0
- package/dist/tools/product_rate_plans/helpers.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/helpers.js +24 -0
- package/dist/tools/product_rate_plans/helpers.js.map +1 -0
- package/dist/tools/product_rate_plans/index.d.ts +14 -0
- package/dist/tools/product_rate_plans/index.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/index.js +30 -0
- package/dist/tools/product_rate_plans/index.js.map +1 -0
- package/dist/tools/product_rate_plans/listRatePlans.d.ts +3 -0
- package/dist/tools/product_rate_plans/listRatePlans.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/listRatePlans.js +40 -0
- package/dist/tools/product_rate_plans/listRatePlans.js.map +1 -0
- package/dist/tools/product_rate_plans/syncRatePlan.d.ts +3 -0
- package/dist/tools/product_rate_plans/syncRatePlan.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/syncRatePlan.js +29 -0
- package/dist/tools/product_rate_plans/syncRatePlan.js.map +1 -0
- package/dist/tools/product_rate_plans/updateRatePlan.d.ts +3 -0
- package/dist/tools/product_rate_plans/updateRatePlan.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/updateRatePlan.js +50 -0
- package/dist/tools/product_rate_plans/updateRatePlan.js.map +1 -0
- package/dist/tools/product_rate_plans/updateRatePlanStatus.d.ts +3 -0
- package/dist/tools/product_rate_plans/updateRatePlanStatus.d.ts.map +1 -0
- package/dist/tools/product_rate_plans/updateRatePlanStatus.js +38 -0
- package/dist/tools/product_rate_plans/updateRatePlanStatus.js.map +1 -0
- package/dist/tools/products/createProduct.d.ts +3 -0
- package/dist/tools/products/createProduct.d.ts.map +1 -0
- package/dist/tools/products/createProduct.js +37 -0
- package/dist/tools/products/createProduct.js.map +1 -0
- package/dist/tools/products/deleteProduct.d.ts +3 -0
- package/dist/tools/products/deleteProduct.d.ts.map +1 -0
- package/dist/tools/products/deleteProduct.js +29 -0
- package/dist/tools/products/deleteProduct.js.map +1 -0
- package/dist/tools/products/getProduct.d.ts +3 -0
- package/dist/tools/products/getProduct.d.ts.map +1 -0
- package/dist/tools/products/getProduct.js +32 -0
- package/dist/tools/products/getProduct.js.map +1 -0
- package/dist/tools/products/helpers.d.ts +6 -0
- package/dist/tools/products/helpers.d.ts.map +1 -0
- package/dist/tools/products/helpers.js +27 -0
- package/dist/tools/products/helpers.js.map +1 -0
- package/dist/tools/products/index.d.ts +15 -0
- package/dist/tools/products/index.d.ts.map +1 -0
- package/dist/tools/products/index.js +33 -0
- package/dist/tools/products/index.js.map +1 -0
- package/dist/tools/products/linkExternalProduct.d.ts +3 -0
- package/dist/tools/products/linkExternalProduct.d.ts.map +1 -0
- package/dist/tools/products/linkExternalProduct.js +56 -0
- package/dist/tools/products/linkExternalProduct.js.map +1 -0
- package/dist/tools/products/listProducts.d.ts +3 -0
- package/dist/tools/products/listProducts.d.ts.map +1 -0
- package/dist/tools/products/listProducts.js +37 -0
- package/dist/tools/products/listProducts.js.map +1 -0
- package/dist/tools/products/unlinkExternalProduct.d.ts +3 -0
- package/dist/tools/products/unlinkExternalProduct.d.ts.map +1 -0
- package/dist/tools/products/unlinkExternalProduct.js +35 -0
- package/dist/tools/products/unlinkExternalProduct.js.map +1 -0
- package/dist/tools/products/updateProduct.d.ts +3 -0
- package/dist/tools/products/updateProduct.d.ts.map +1 -0
- package/dist/tools/products/updateProduct.js +40 -0
- package/dist/tools/products/updateProduct.js.map +1 -0
- package/dist/tools/products/updateProductStatus.d.ts +3 -0
- package/dist/tools/products/updateProductStatus.d.ts.map +1 -0
- package/dist/tools/products/updateProductStatus.js +38 -0
- package/dist/tools/products/updateProductStatus.js.map +1 -0
- package/dist/tools/shipping/calculateShipping.d.ts +3 -0
- package/dist/tools/shipping/calculateShipping.d.ts.map +1 -0
- package/dist/tools/shipping/calculateShipping.js +84 -0
- package/dist/tools/shipping/calculateShipping.js.map +1 -0
- package/dist/tools/shipping/helpers.d.ts +6 -0
- package/dist/tools/shipping/helpers.d.ts.map +1 -0
- package/dist/tools/shipping/helpers.js +22 -0
- package/dist/tools/shipping/helpers.js.map +1 -0
- package/dist/tools/shipping/index.d.ts +9 -0
- package/dist/tools/shipping/index.d.ts.map +1 -0
- package/dist/tools/shipping/index.js +12 -0
- package/dist/tools/shipping/index.js.map +1 -0
- package/dist/tools/shipping/listShippingServices.d.ts +3 -0
- package/dist/tools/shipping/listShippingServices.d.ts.map +1 -0
- package/dist/tools/shipping/listShippingServices.js +19 -0
- package/dist/tools/shipping/listShippingServices.js.map +1 -0
- package/dist/tools/subscriptions/addSubscriptionRatePlan.d.ts +3 -0
- package/dist/tools/subscriptions/addSubscriptionRatePlan.d.ts.map +1 -0
- package/dist/tools/subscriptions/addSubscriptionRatePlan.js +67 -0
- package/dist/tools/subscriptions/addSubscriptionRatePlan.js.map +1 -0
- package/dist/tools/subscriptions/addSubscriptionRatePlanCharge.d.ts +3 -0
- package/dist/tools/subscriptions/addSubscriptionRatePlanCharge.d.ts.map +1 -0
- package/dist/tools/subscriptions/addSubscriptionRatePlanCharge.js +159 -0
- package/dist/tools/subscriptions/addSubscriptionRatePlanCharge.js.map +1 -0
- package/dist/tools/subscriptions/createSubscription.d.ts +3 -0
- package/dist/tools/subscriptions/createSubscription.d.ts.map +1 -0
- package/dist/tools/subscriptions/createSubscription.js +84 -0
- package/dist/tools/subscriptions/createSubscription.js.map +1 -0
- package/dist/tools/subscriptions/deleteSubscription.d.ts +3 -0
- package/dist/tools/subscriptions/deleteSubscription.d.ts.map +1 -0
- package/dist/tools/subscriptions/deleteSubscription.js +29 -0
- package/dist/tools/subscriptions/deleteSubscription.js.map +1 -0
- package/dist/tools/subscriptions/getSubscription.d.ts +3 -0
- package/dist/tools/subscriptions/getSubscription.d.ts.map +1 -0
- package/dist/tools/subscriptions/getSubscription.js +32 -0
- package/dist/tools/subscriptions/getSubscription.js.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionExternalInvoices.d.ts +3 -0
- package/dist/tools/subscriptions/getSubscriptionExternalInvoices.d.ts.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionExternalInvoices.js +40 -0
- package/dist/tools/subscriptions/getSubscriptionExternalInvoices.js.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionInvoices.d.ts +3 -0
- package/dist/tools/subscriptions/getSubscriptionInvoices.d.ts.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionInvoices.js +43 -0
- package/dist/tools/subscriptions/getSubscriptionInvoices.js.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionLogs.d.ts +3 -0
- package/dist/tools/subscriptions/getSubscriptionLogs.d.ts.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionLogs.js +34 -0
- package/dist/tools/subscriptions/getSubscriptionLogs.js.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionNextBill.d.ts +3 -0
- package/dist/tools/subscriptions/getSubscriptionNextBill.d.ts.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionNextBill.js +32 -0
- package/dist/tools/subscriptions/getSubscriptionNextBill.js.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionRatePlan.d.ts +3 -0
- package/dist/tools/subscriptions/getSubscriptionRatePlan.d.ts.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionRatePlan.js +34 -0
- package/dist/tools/subscriptions/getSubscriptionRatePlan.js.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionRatePlanCharge.d.ts +3 -0
- package/dist/tools/subscriptions/getSubscriptionRatePlanCharge.d.ts.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionRatePlanCharge.js +36 -0
- package/dist/tools/subscriptions/getSubscriptionRatePlanCharge.js.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionUpcomingCharges.d.ts +3 -0
- package/dist/tools/subscriptions/getSubscriptionUpcomingCharges.d.ts.map +1 -0
- package/dist/tools/subscriptions/getSubscriptionUpcomingCharges.js +32 -0
- package/dist/tools/subscriptions/getSubscriptionUpcomingCharges.js.map +1 -0
- package/dist/tools/subscriptions/helpers.d.ts +6 -0
- package/dist/tools/subscriptions/helpers.d.ts.map +1 -0
- package/dist/tools/subscriptions/helpers.js +22 -0
- package/dist/tools/subscriptions/helpers.js.map +1 -0
- package/dist/tools/subscriptions/index.d.ts +27 -0
- package/dist/tools/subscriptions/index.d.ts.map +1 -0
- package/dist/tools/subscriptions/index.js +69 -0
- package/dist/tools/subscriptions/index.js.map +1 -0
- package/dist/tools/subscriptions/listSubscriptionRatePlans.d.ts +3 -0
- package/dist/tools/subscriptions/listSubscriptionRatePlans.d.ts.map +1 -0
- package/dist/tools/subscriptions/listSubscriptionRatePlans.js +40 -0
- package/dist/tools/subscriptions/listSubscriptionRatePlans.js.map +1 -0
- package/dist/tools/subscriptions/listSubscriptions.d.ts +3 -0
- package/dist/tools/subscriptions/listSubscriptions.d.ts.map +1 -0
- package/dist/tools/subscriptions/listSubscriptions.js +41 -0
- package/dist/tools/subscriptions/listSubscriptions.js.map +1 -0
- package/dist/tools/subscriptions/removeSubscriptionRatePlan.d.ts +3 -0
- package/dist/tools/subscriptions/removeSubscriptionRatePlan.d.ts.map +1 -0
- package/dist/tools/subscriptions/removeSubscriptionRatePlan.js +32 -0
- package/dist/tools/subscriptions/removeSubscriptionRatePlan.js.map +1 -0
- package/dist/tools/subscriptions/removeSubscriptionRatePlanCharge.d.ts +3 -0
- package/dist/tools/subscriptions/removeSubscriptionRatePlanCharge.d.ts.map +1 -0
- package/dist/tools/subscriptions/removeSubscriptionRatePlanCharge.js +32 -0
- package/dist/tools/subscriptions/removeSubscriptionRatePlanCharge.js.map +1 -0
- package/dist/tools/subscriptions/updateSubscription.d.ts +3 -0
- package/dist/tools/subscriptions/updateSubscription.d.ts.map +1 -0
- package/dist/tools/subscriptions/updateSubscription.js +46 -0
- package/dist/tools/subscriptions/updateSubscription.js.map +1 -0
- package/dist/tools/subscriptions/updateSubscriptionRatePlan.d.ts +3 -0
- package/dist/tools/subscriptions/updateSubscriptionRatePlan.d.ts.map +1 -0
- package/dist/tools/subscriptions/updateSubscriptionRatePlan.js +40 -0
- package/dist/tools/subscriptions/updateSubscriptionRatePlan.js.map +1 -0
- package/dist/tools/subscriptions/updateSubscriptionRatePlanCharge.d.ts +3 -0
- package/dist/tools/subscriptions/updateSubscriptionRatePlanCharge.d.ts.map +1 -0
- package/dist/tools/subscriptions/updateSubscriptionRatePlanCharge.js +195 -0
- package/dist/tools/subscriptions/updateSubscriptionRatePlanCharge.js.map +1 -0
- package/dist/tools/subscriptions/updateSubscriptionStatus.d.ts +3 -0
- package/dist/tools/subscriptions/updateSubscriptionStatus.d.ts.map +1 -0
- package/dist/tools/subscriptions/updateSubscriptionStatus.js +38 -0
- package/dist/tools/subscriptions/updateSubscriptionStatus.js.map +1 -0
- package/dist/tools/transactions/getTransaction.d.ts +3 -0
- package/dist/tools/transactions/getTransaction.d.ts.map +1 -0
- package/dist/tools/transactions/getTransaction.js +29 -0
- package/dist/tools/transactions/getTransaction.js.map +1 -0
- package/dist/tools/transactions/helpers.d.ts +6 -0
- package/dist/tools/transactions/helpers.d.ts.map +1 -0
- package/dist/tools/transactions/helpers.js +22 -0
- package/dist/tools/transactions/helpers.js.map +1 -0
- package/dist/tools/transactions/index.d.ts +11 -0
- package/dist/tools/transactions/index.d.ts.map +1 -0
- package/dist/tools/transactions/index.js +21 -0
- package/dist/tools/transactions/index.js.map +1 -0
- package/dist/tools/transactions/listTransactions.d.ts +3 -0
- package/dist/tools/transactions/listTransactions.d.ts.map +1 -0
- package/dist/tools/transactions/listTransactions.js +35 -0
- package/dist/tools/transactions/listTransactions.js.map +1 -0
- package/dist/tools/transactions/refundTransaction.d.ts +3 -0
- package/dist/tools/transactions/refundTransaction.d.ts.map +1 -0
- package/dist/tools/transactions/refundTransaction.js +35 -0
- package/dist/tools/transactions/refundTransaction.js.map +1 -0
- package/dist/tools/transactions/voidTransaction.d.ts +3 -0
- package/dist/tools/transactions/voidTransaction.d.ts.map +1 -0
- package/dist/tools/transactions/voidTransaction.js +32 -0
- package/dist/tools/transactions/voidTransaction.js.map +1 -0
- package/dist/tools/types.d.ts +34 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +5 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types/addressInput.d.ts +97 -0
- package/dist/types/addressInput.d.ts.map +1 -0
- package/dist/types/addressInput.js +98 -0
- package/dist/types/addressInput.js.map +1 -0
- package/dist/types.d.ts +412 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +35 -0
- package/dist/types.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as currencyService from "../../services/currencyServices.js";
|
|
4
|
+
const schema = z.object({
|
|
5
|
+
companyCurrencyId: z.string().min(1, "companyCurrencyId is required"),
|
|
6
|
+
conversionRate: z.number().finite("conversionRate is required"),
|
|
7
|
+
fixedRate: z.boolean({ required_error: "fixedRate is required (boolean)" }),
|
|
8
|
+
});
|
|
9
|
+
const definition = {
|
|
10
|
+
name: "update_currency",
|
|
11
|
+
description: "Update a company currency. PUT /currencies/{companyCurrencyId}. Required: companyCurrencyId, conversionRate, fixedRate.",
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
companyCurrencyId: { type: "string", description: "Company currency ID (required)" },
|
|
16
|
+
conversionRate: { type: "number", description: "Conversion rate (required)" },
|
|
17
|
+
fixedRate: { type: "boolean", description: "Fixed rate flag (required)" },
|
|
18
|
+
},
|
|
19
|
+
required: ["companyCurrencyId", "conversionRate", "fixedRate"],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
async function handler(client, args) {
|
|
23
|
+
const parsed = schema.safeParse(args);
|
|
24
|
+
if (!parsed.success) {
|
|
25
|
+
return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
|
|
26
|
+
}
|
|
27
|
+
const { companyCurrencyId, conversionRate, fixedRate } = parsed.data;
|
|
28
|
+
return handleToolCall(() => currencyService.updateCurrency(client, companyCurrencyId, { conversionRate, fixedRate }));
|
|
29
|
+
}
|
|
30
|
+
export const updateCurrencyTool = {
|
|
31
|
+
definition,
|
|
32
|
+
handler,
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=updateCurrency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCurrency.js","sourceRoot":"","sources":["../../../src/tools/currencies/updateCurrency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,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C;IACrE,OAAO,cAAc,CAAC,GAAG,EAAE,CACzB,eAAe,CAAC,cAAc,CAAC,MAAM,EAAE,iBAAiB,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,CACzF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACtC,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomer.d.ts","sourceRoot":"","sources":["../../../src/tools/customers/createCustomer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AA8CxC,eAAO,MAAM,kBAAkB,EAAE,IAGhC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
const schema = z.object({
|
|
5
|
+
firstName: z.string().min(1, "firstName is required"),
|
|
6
|
+
lastName: z.string().min(1, "lastName is required"),
|
|
7
|
+
email: z.string().email("Invalid email"),
|
|
8
|
+
businessName: z.string().optional(),
|
|
9
|
+
locale: z.string().optional(),
|
|
10
|
+
phoneNum: z.string().optional(),
|
|
11
|
+
phoneExt: z.string().optional(),
|
|
12
|
+
preferredCurrency: z.string().optional(),
|
|
13
|
+
taxExempt: z.boolean().optional(),
|
|
14
|
+
});
|
|
15
|
+
const definition = {
|
|
16
|
+
name: "create_customer",
|
|
17
|
+
description: "Create a new customer. POST /customers. Required: firstName, lastName, email. Optional: businessName, locale, phoneNum, phoneExt, preferredCurrency, taxExempt.",
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
firstName: { type: "string", description: "Customer first name (required)" },
|
|
22
|
+
lastName: { type: "string", description: "Customer last name (required)" },
|
|
23
|
+
email: { type: "string", description: "Customer email (required)" },
|
|
24
|
+
businessName: { type: "string", description: "Business name" },
|
|
25
|
+
locale: { type: "string", description: "Locale code" },
|
|
26
|
+
phoneNum: { type: "string", description: "Phone number" },
|
|
27
|
+
phoneExt: { type: "string", description: "Phone extension" },
|
|
28
|
+
preferredCurrency: { type: "string", description: "Preferred currency code" },
|
|
29
|
+
taxExempt: { type: "boolean", description: "Whether customer is tax exempt" },
|
|
30
|
+
},
|
|
31
|
+
required: ["firstName", "lastName", "email"],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
async function handler(client, args) {
|
|
35
|
+
const parsed = schema.safeParse(args);
|
|
36
|
+
if (!parsed.success) {
|
|
37
|
+
return errorResult(parsed.error.errors.map((e) => `${e.path.join(".")}: ${e.message}`).join("; "));
|
|
38
|
+
}
|
|
39
|
+
return handleToolCall(() => customerService.createCustomer(client, parsed.data));
|
|
40
|
+
}
|
|
41
|
+
export const createCustomerTool = {
|
|
42
|
+
definition,
|
|
43
|
+
handler,
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=createCustomer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomer.js","sourceRoot":"","sources":["../../../src/tools/customers/createCustomer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,eAAe,MAAM,oCAAoC,CAAC;AAEtE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;IACrD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC;IACxC,YAAY,EAAE,CAAC,CAAC,MAA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AAE,OAAO,CAAC;KAC7C;CACF,CAAC;AAEF,KAAK,UAAU,OAAO,CAAC,MAAc,EAAE,IAAyC;IAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrG,CAAC;IACD,OAAO,cAAc,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACnF,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACtC,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomerAddress.d.ts","sourceRoot":"","sources":["../../../src/tools/customers/createCustomerAddress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAsExC,eAAO,MAAM,yBAAyB,EAAE,IAGvC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
import { mapAddressInputToApiAddress, COUNTRY_CODE_DESCRIPTION_CONST } from "../../types/addressInput.js";
|
|
5
|
+
const COUNTRY_CODE_REGEX = /^[A-Za-z]{2}$/;
|
|
6
|
+
const schema = z.object({
|
|
7
|
+
customerId: z.string().min(1, "customerId is required"),
|
|
8
|
+
name: z.string().min(1, "name is required"),
|
|
9
|
+
contactName: z.string().min(1, "contactName is required"),
|
|
10
|
+
street1: z.string().min(1, "street1 is required"),
|
|
11
|
+
city: z.string().min(1, "city is required"),
|
|
12
|
+
state: z.string().min(1, "state is required"),
|
|
13
|
+
zip: z.string().min(1, "zip is required"),
|
|
14
|
+
countryCode: z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1, "countryCode is required")
|
|
17
|
+
.transform((s) => s.trim().toUpperCase())
|
|
18
|
+
.refine((s) => COUNTRY_CODE_REGEX.test(s), "countryCode must be ISO 3166-1 alpha-2 (e.g. ES, AR, MX)"),
|
|
19
|
+
type: z.enum(["residential", "commercial"], {
|
|
20
|
+
errorMap: () => ({ message: "type must be 'residential' or 'commercial'" }),
|
|
21
|
+
}),
|
|
22
|
+
street2: z.string().optional(),
|
|
23
|
+
company: z.string().optional(),
|
|
24
|
+
contactEmail: z.string().optional(),
|
|
25
|
+
contactPhone: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
const definition = {
|
|
28
|
+
name: "create_customer_address",
|
|
29
|
+
description: "Create an address book entry for a customer. POST /customers/{customerId}/addressbooks. Required: name, contactName, street1, city, state, zip, countryCode (ISO 3166-1 alpha-2), type (residential or commercial). Optional: street2, company, contactEmail, contactPhone.",
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
customerId: { type: "string", description: "Customer ID (required)" },
|
|
34
|
+
name: { type: "string", description: "Address name (required)" },
|
|
35
|
+
contactName: { type: "string", description: "Contact name (required)" },
|
|
36
|
+
street1: { type: "string", description: "Street line 1 (required)" },
|
|
37
|
+
city: { type: "string", description: "City (required)" },
|
|
38
|
+
state: { type: "string", description: "State (required)" },
|
|
39
|
+
zip: { type: "string", description: "Postal code (required)" },
|
|
40
|
+
countryCode: { type: "string", description: COUNTRY_CODE_DESCRIPTION_CONST },
|
|
41
|
+
type: { type: "string", description: "Address type (required): residential or commercial" },
|
|
42
|
+
street2: { type: "string", description: "Street line 2" },
|
|
43
|
+
company: { type: "string", description: "Company name" },
|
|
44
|
+
contactEmail: { type: "string", description: "Contact email" },
|
|
45
|
+
contactPhone: { type: "string", description: "Contact phone" },
|
|
46
|
+
},
|
|
47
|
+
required: ["customerId", "name", "contactName", "street1", "city", "state", "zip", "countryCode", "type"],
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
async function handler(client, args) {
|
|
51
|
+
const parsed = schema.safeParse(args);
|
|
52
|
+
if (!parsed.success) {
|
|
53
|
+
return errorResult(parsed.error.errors.map((e) => `${e.path.join(".")}: ${e.message}`).join("; "));
|
|
54
|
+
}
|
|
55
|
+
const { customerId, ...rest } = parsed.data;
|
|
56
|
+
const apiAddress = await mapAddressInputToApiAddress(client, rest);
|
|
57
|
+
const body = {
|
|
58
|
+
...apiAddress,
|
|
59
|
+
name: parsed.data.name,
|
|
60
|
+
contactName: parsed.data.contactName,
|
|
61
|
+
};
|
|
62
|
+
return handleToolCall(() => customerService.createCustomerAddress(client, customerId, body));
|
|
63
|
+
}
|
|
64
|
+
export const createCustomerAddressTool = {
|
|
65
|
+
definition,
|
|
66
|
+
handler,
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=createCustomerAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomerAddress.js","sourceRoot":"","sources":["../../../src/tools/customers/createCustomerAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,eAAe,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAE1G,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAE3C,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CA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AAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC;KAC1G;CACF,CAAC;AAEF,KAAK,UAAU,OAAO,CAAC,MAAc,EAAE,IAAyC;IAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrG,CAAC;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;IAC5C,MAAM,UAAU,GAAG,MAAM,2BAA2B,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG;QACX,GAAG,UAAU;QACb,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI;QACtB,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW;KACrC,CAAC;IACF,OAAO,cAAc,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;AAC/F,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAS;IAC7C,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomerChargeCredit.d.ts","sourceRoot":"","sources":["../../../src/tools/customers/createCustomerChargeCredit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AA8ExC,eAAO,MAAM,8BAA8B,EAAE,IAG5C,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
const schema = z.object({
|
|
5
|
+
customerId: z.string().min(1, "customerId is required"),
|
|
6
|
+
amount: z.number().int().min(1, "amount must be a positive integer (in cents)"),
|
|
7
|
+
description: z.string().max(200).optional(),
|
|
8
|
+
type: z.enum(["charge", "credit"], {
|
|
9
|
+
errorMap: () => ({ message: "type must be 'charge' or 'credit'" }),
|
|
10
|
+
}),
|
|
11
|
+
companyCurrencyId: z.number().int().positive("companyCurrencyId is required and must be > 0"),
|
|
12
|
+
category: z.enum(["physical", "digital"], {
|
|
13
|
+
errorMap: () => ({ message: "category must be 'physical' or 'digital'" }),
|
|
14
|
+
}),
|
|
15
|
+
qty: z.number().int().min(1).optional(),
|
|
16
|
+
isFreeShipping: z.boolean().optional(),
|
|
17
|
+
taxable: z.boolean().optional(),
|
|
18
|
+
weight: z.number().optional(),
|
|
19
|
+
});
|
|
20
|
+
const definition = {
|
|
21
|
+
name: "create_customer_charge_credit",
|
|
22
|
+
description: "Create a charge or credit for a customer. POST /customers/{customerId}/charges_credits. IMPORTANT: amount is in CENTS (e.g. 10000 = $100.00). Required: amount (integer, in cents), type (charge or credit), companyCurrencyId, category (physical or digital). Optional: description, qty (default 1), isFreeShipping, taxable, weight (required by API when category is physical).",
|
|
23
|
+
inputSchema: {
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
customerId: { type: "string", description: "Customer ID (required)" },
|
|
27
|
+
amount: {
|
|
28
|
+
type: "number",
|
|
29
|
+
description: "Amount in CENTS (required). Example: 1000 = $10.00, 500 = $5.00. Must be a positive integer.",
|
|
30
|
+
},
|
|
31
|
+
description: { type: "string", description: "Description (max 200 chars)" },
|
|
32
|
+
type: {
|
|
33
|
+
type: "string",
|
|
34
|
+
description: "Type (required): charge or credit",
|
|
35
|
+
},
|
|
36
|
+
companyCurrencyId: {
|
|
37
|
+
type: "number",
|
|
38
|
+
description: "Company currency ID (required, must be > 0)",
|
|
39
|
+
},
|
|
40
|
+
category: {
|
|
41
|
+
type: "string",
|
|
42
|
+
description: "Category (required): physical or digital",
|
|
43
|
+
},
|
|
44
|
+
qty: { type: "number", description: "Quantity (default 1)" },
|
|
45
|
+
isFreeShipping: { type: "boolean", description: "Free shipping" },
|
|
46
|
+
taxable: { type: "boolean", description: "Whether the line is taxable" },
|
|
47
|
+
weight: { type: "number", description: "Weight (required by API when category is physical)" },
|
|
48
|
+
},
|
|
49
|
+
required: ["customerId", "amount", "type", "companyCurrencyId", "category"],
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
async function handler(client, args) {
|
|
53
|
+
const parsed = schema.safeParse(args);
|
|
54
|
+
if (!parsed.success) {
|
|
55
|
+
return errorResult(parsed.error.errors.map((e) => `${e.path.join(".")}: ${e.message}`).join("; "));
|
|
56
|
+
}
|
|
57
|
+
const { customerId, ...body } = parsed.data;
|
|
58
|
+
return handleToolCall(() => customerService.createCustomerChargeCredit(client, customerId, {
|
|
59
|
+
amount: body.amount,
|
|
60
|
+
description: body.description,
|
|
61
|
+
type: body.type,
|
|
62
|
+
companyCurrencyId: body.companyCurrencyId,
|
|
63
|
+
category: body.category,
|
|
64
|
+
qty: body.qty,
|
|
65
|
+
isFreeShipping: body.isFreeShipping,
|
|
66
|
+
taxable: body.taxable,
|
|
67
|
+
weight: body.weight,
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
export const createCustomerChargeCreditTool = {
|
|
71
|
+
definition,
|
|
72
|
+
handler,
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=createCustomerChargeCredit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomerChargeCredit.js","sourceRoot":"","sources":["../../../src/tools/customers/createCustomerChargeCredit.ts"],"names":[],"mappings":"AAAA,OAAO,EA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AAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrG,CAAC;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;IAC5C,OAAO,cAAc,CAAC,GAAG,EAAE,CACzB,eAAe,CAAC,0BAA0B,CAAC,MAAM,EAAE,UAAU,EAAE;QAC7D,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAS;IAClD,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomerPaymentMethod.d.ts","sourceRoot":"","sources":["../../../src/tools/customers/createCustomerPaymentMethod.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAyFxC,eAAO,MAAM,+BAA+B,EAAE,IAG7C,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
import { mapBillingAddressInputToApiBillingAddress } from "../../types/addressInput.js";
|
|
5
|
+
import { COUNTRY_CODE_DESCRIPTION_CONST } from "../../types/addressInput.js";
|
|
6
|
+
const billingAddressSchema = z.object({
|
|
7
|
+
countryCode: z.string().min(1, "billingAddress.countryCode is required"),
|
|
8
|
+
street1: z.string().min(1, "billingAddress.street1 is required"),
|
|
9
|
+
city: z.string().min(1, "billingAddress.city is required"),
|
|
10
|
+
state: z.string().min(1, "billingAddress.state is required"),
|
|
11
|
+
zip: z.string().min(1, "billingAddress.zip is required"),
|
|
12
|
+
street2: z.string().optional(),
|
|
13
|
+
});
|
|
14
|
+
// Public MCP field is paymentMethodNonce only; paymentNonce kept for backward compat (internal only).
|
|
15
|
+
const schema = z
|
|
16
|
+
.object({
|
|
17
|
+
customerId: z.string().min(1, "customerId is required"),
|
|
18
|
+
companyGatewayId: z.string().min(1, "companyGatewayId is required"),
|
|
19
|
+
type: z.enum(["card", "ach"], {
|
|
20
|
+
errorMap: () => ({ message: "type must be 'card' or 'ach'" }),
|
|
21
|
+
}),
|
|
22
|
+
paymentMethodNonce: z.string().optional(),
|
|
23
|
+
paymentNonce: z.string().optional(), // deprecated: use paymentMethodNonce
|
|
24
|
+
billingAddress: billingAddressSchema,
|
|
25
|
+
})
|
|
26
|
+
.refine((data) => (data.paymentMethodNonce?.trim() ?? data.paymentNonce?.trim() ?? "").length > 0, { message: "paymentMethodNonce is required" });
|
|
27
|
+
const PAYMENT_METHOD_NONCE_DESCRIPTION = "Single-use token from your payment integration. Obtain gateway client credential via get_client_token, then use your hosted payment UI to produce this token. Do not send raw card data. Gateway-specific tokenization is handled outside MCP.";
|
|
28
|
+
const definition = {
|
|
29
|
+
name: "create_customer_payment_method",
|
|
30
|
+
description: "Create a payment method for a customer. Gateway-agnostic: required companyGatewayId, type (card or ach), paymentMethodNonce, billingAddress (countryCode, street1, city, state, zip). Obtain gateway client credential via get_client_token; use your payment integration to produce paymentMethodNonce, then call this tool. No raw card data or gateway-specific fields in MCP.",
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
customerId: { type: "string", description: "Customer ID (required)" },
|
|
35
|
+
companyGatewayId: { type: "string", description: "Company gateway ID (required)" },
|
|
36
|
+
type: { type: "string", description: "Payment method type (required): card or ach" },
|
|
37
|
+
paymentMethodNonce: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: PAYMENT_METHOD_NONCE_DESCRIPTION,
|
|
40
|
+
},
|
|
41
|
+
billingAddress: {
|
|
42
|
+
type: "object",
|
|
43
|
+
description: "Billing address (required): countryCode, street1, city, state, zip; street2 optional",
|
|
44
|
+
properties: {
|
|
45
|
+
countryCode: { type: "string", description: COUNTRY_CODE_DESCRIPTION_CONST },
|
|
46
|
+
street1: { type: "string", description: "Street line 1 (required)" },
|
|
47
|
+
city: { type: "string", description: "City (required)" },
|
|
48
|
+
state: { type: "string", description: "State (required)" },
|
|
49
|
+
zip: { type: "string", description: "Postal code (required)" },
|
|
50
|
+
street2: { type: "string", description: "Street line 2" },
|
|
51
|
+
},
|
|
52
|
+
required: ["countryCode", "street1", "city", "state", "zip"],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
required: ["customerId", "companyGatewayId", "type", "paymentMethodNonce", "billingAddress"],
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
async function handler(client, args) {
|
|
59
|
+
const parsed = schema.safeParse(args);
|
|
60
|
+
if (!parsed.success) {
|
|
61
|
+
return errorResult(parsed.error.errors.map((e) => `${e.path.join(".")}: ${e.message}`).join("; "));
|
|
62
|
+
}
|
|
63
|
+
const { customerId, companyGatewayId, type, billingAddress } = parsed.data;
|
|
64
|
+
const nonce = (parsed.data.paymentMethodNonce ?? parsed.data.paymentNonce)?.trim();
|
|
65
|
+
if (!nonce) {
|
|
66
|
+
return errorResult("paymentMethodNonce is required");
|
|
67
|
+
}
|
|
68
|
+
const apiBillingAddress = await mapBillingAddressInputToApiBillingAddress(client, billingAddress);
|
|
69
|
+
return handleToolCall(() => customerService.createCustomerPaymentMethod(client, customerId, {
|
|
70
|
+
companyGatewayId,
|
|
71
|
+
type,
|
|
72
|
+
paymentNonce: nonce, // internal: upstream expects paymentMethod: { nonce }
|
|
73
|
+
billingAddress: apiBillingAddress,
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
export const createCustomerPaymentMethodTool = {
|
|
77
|
+
definition,
|
|
78
|
+
handler,
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=createCustomerPaymentMethod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCustomerPaymentMethod.js","sourceRoot":"","sources":["../../../src/tools/customers/createCustomerPaymentMethod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,eAAe,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,yCAAyC,EAAE,MAAM,6BAA6B,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAE7E,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wCAAwC,CAAC;IACxE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,oCAAoC,CAAC;IAChE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,iCAAiC,CAAC;IAC1D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,kCAAkC,CAAC;IAC5D,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,gCAAgC,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,C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C,CAAC,CAAC;IACrG,CAAC;IACD,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;IAC3E,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACnF,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,WAAW,CAAC,gCAAgC,CAAC,CAAC;IACvD,CAAC;IACD,MAAM,iBAAiB,GAAG,MAAM,yCAAyC,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAClG,OAAO,cAAc,CAAC,GAAG,EAAE,CACzB,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,UAAU,EAAE;QAC9D,gBAAgB;QAChB,IAAI;QACJ,YAAY,EAAE,KAAK,EAAE,sDAAsD;QAC3E,cAAc,EAAE,iBAAiB;KAClC,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAS;IACnD,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteCustomer.d.ts","sourceRoot":"","sources":["../../../src/tools/customers/deleteCustomer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AA8BxC,eAAO,MAAM,kBAAkB,EAAE,IAGhC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
const schema = z.object({
|
|
5
|
+
customerId: z.string().min(1, "customerId is required"),
|
|
6
|
+
});
|
|
7
|
+
const definition = {
|
|
8
|
+
name: "delete_customer",
|
|
9
|
+
description: "Delete a customer by ID. DELETE /customers/{customerId}. WARNING: Cascading delete may remove or orphan related data (addresses, payment methods, subscriptions, invoices, etc.). Use with caution.",
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
customerId: { type: "string", description: "Customer ID to delete (required)" },
|
|
14
|
+
},
|
|
15
|
+
required: ["customerId"],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
async function handler(client, args) {
|
|
19
|
+
const parsed = schema.safeParse(args);
|
|
20
|
+
if (!parsed.success) {
|
|
21
|
+
return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
|
|
22
|
+
}
|
|
23
|
+
return handleToolCall(() => customerService.deleteCustomer(client, parsed.data.customerId));
|
|
24
|
+
}
|
|
25
|
+
export const deleteCustomerTool = {
|
|
26
|
+
definition,
|
|
27
|
+
handler,
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=deleteCustomer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteCustomer.js","sourceRoot":"","sources":["../../../src/tools/customers/deleteCustomer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,eAAe,MAAM,oCAAoC,CAAC;AAEtE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;CACxD,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,qMAAqM;IACvM,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;SAChF;QACD,QAAQ,EAAE,CAAC,YAAY,CAAC;KACzB;CACF,CAAC;AAEF,KAAK,UAAU,OAAO,CAAC,MAAc,EAAE,IAAyC;IAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,cAAc,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;AAC9F,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACtC,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteCustomerAddress.d.ts","sourceRoot":"","sources":["../../../src/tools/customers/deleteCustomerAddress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAmCxC,eAAO,MAAM,yBAAyB,EAAE,IAGvC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
const schema = z.object({
|
|
5
|
+
customerId: z.string().min(1, "customerId is required"),
|
|
6
|
+
addressId: z.string().min(1, "addressId is required"),
|
|
7
|
+
});
|
|
8
|
+
const definition = {
|
|
9
|
+
name: "delete_customer_address",
|
|
10
|
+
description: "Delete an address book entry. DELETE /customers/{customerId}/addressbooks/{addressId}.",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
customerId: { type: "string", description: "Customer ID (required)" },
|
|
15
|
+
addressId: { type: "string", description: "Address book entry ID (required)" },
|
|
16
|
+
},
|
|
17
|
+
required: ["customerId", "addressId"],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
async function handler(client, args) {
|
|
21
|
+
const parsed = schema.safeParse(args);
|
|
22
|
+
if (!parsed.success) {
|
|
23
|
+
return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
|
|
24
|
+
}
|
|
25
|
+
const { customerId, addressId } = parsed.data;
|
|
26
|
+
return handleToolCall(() => customerService.deleteCustomerAddress(client, customerId, addressId));
|
|
27
|
+
}
|
|
28
|
+
export const deleteCustomerAddressTool = {
|
|
29
|
+
definition,
|
|
30
|
+
handler,
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=deleteCustomerAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteCustomerAddress.js","sourceRoot":"","sources":["../../../src/tools/customers/deleteCustomerAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,eAAe,MAAM,oCAAoC,CAAC;AAEtE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;IACvD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;CACtD,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EACT,wFAAwF;IAC1F,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wBAAwB,EAAE;YACrE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;SAC/E;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;KACtC;CACF,CAAC;AAEF,KAAK,UAAU,OAAO,CAAC,MAAc,EAAE,IAAyC;IAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;IAC9C,OAAO,cAAc,CAAC,GAAG,EAAE,CACzB,eAAe,CAAC,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CACrE,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAS;IAC7C,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteCustomerChargeCredit.d.ts","sourceRoot":"","sources":["../../../src/tools/customers/deleteCustomerChargeCredit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAmCxC,eAAO,MAAM,8BAA8B,EAAE,IAG5C,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
const schema = z.object({
|
|
5
|
+
customerId: z.string().min(1, "customerId is required"),
|
|
6
|
+
chargeCreditId: z.string().min(1, "chargeCreditId is required"),
|
|
7
|
+
});
|
|
8
|
+
const definition = {
|
|
9
|
+
name: "delete_customer_charge_credit",
|
|
10
|
+
description: "Delete a charge or credit for a customer. DELETE /customers/{customerId}/charges_credits/{chargeCreditId}. Fails if the charge/credit has invoice details assigned.",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
customerId: { type: "string", description: "Customer ID (required)" },
|
|
15
|
+
chargeCreditId: { type: "string", description: "Charge/credit ID (required)" },
|
|
16
|
+
},
|
|
17
|
+
required: ["customerId", "chargeCreditId"],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
async function handler(client, args) {
|
|
21
|
+
const parsed = schema.safeParse(args);
|
|
22
|
+
if (!parsed.success) {
|
|
23
|
+
return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
|
|
24
|
+
}
|
|
25
|
+
const { customerId, chargeCreditId } = parsed.data;
|
|
26
|
+
return handleToolCall(() => customerService.deleteCustomerChargeCredit(client, customerId, chargeCreditId));
|
|
27
|
+
}
|
|
28
|
+
export const deleteCustomerChargeCreditTool = {
|
|
29
|
+
definition,
|
|
30
|
+
handler,
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=deleteCustomerChargeCredit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteCustomerChargeCredit.js","sourceRoot":"","sources":["../../../src/tools/customers/deleteCustomerChargeCredit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,eAAe,MAAM,oCAAoC,CAAC;AAEtE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;IACvD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AAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAmCxC,eAAO,MAAM,+BAA+B,EAAE,IAG7C,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
const schema = z.object({
|
|
5
|
+
customerId: z.string().min(1, "customerId is required"),
|
|
6
|
+
paymentMethodId: z.string().min(1, "paymentMethodId is required"),
|
|
7
|
+
});
|
|
8
|
+
const definition = {
|
|
9
|
+
name: "delete_customer_payment_method",
|
|
10
|
+
description: "Delete a payment method. DELETE /customers/{customerId}/paymentmethods/{paymentMethodId}.",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
customerId: { type: "string", description: "Customer ID (required)" },
|
|
15
|
+
paymentMethodId: { type: "string", description: "Payment method ID (required)" },
|
|
16
|
+
},
|
|
17
|
+
required: ["customerId", "paymentMethodId"],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
async function handler(client, args) {
|
|
21
|
+
const parsed = schema.safeParse(args);
|
|
22
|
+
if (!parsed.success) {
|
|
23
|
+
return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
|
|
24
|
+
}
|
|
25
|
+
const { customerId, paymentMethodId } = parsed.data;
|
|
26
|
+
return handleToolCall(() => customerService.deleteCustomerPaymentMethod(client, customerId, paymentMethodId));
|
|
27
|
+
}
|
|
28
|
+
export const deleteCustomerPaymentMethodTool = {
|
|
29
|
+
definition,
|
|
30
|
+
handler,
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=deleteCustomerPaymentMethod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteCustomerPaymentMethod.js","sourceRoot":"","sources":["../../../src/tools/customers/deleteCustomerPaymentMethod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC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,UAAU,EAAE,eAAe,CAAC,CACjF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAS;IACnD,UAAU;IACV,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCustomer.d.ts","sourceRoot":"","sources":["../../../src/tools/customers/getCustomer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAqCxC,eAAO,MAAM,eAAe,EAAE,IAG7B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { errorResult, handleToolCall } from "./helpers.js";
|
|
3
|
+
import * as customerService from "../../services/customerServices.js";
|
|
4
|
+
const schema = z.object({
|
|
5
|
+
id: z.string().min(1, "id is required"),
|
|
6
|
+
includeAddresses: z.boolean().optional(),
|
|
7
|
+
includePaymentMethods: z.boolean().optional(),
|
|
8
|
+
});
|
|
9
|
+
const definition = {
|
|
10
|
+
name: "get_customer",
|
|
11
|
+
description: "Get a specific customer by ID. GET /customers/{customerId}. Optional includes: addressbook, paymentmethod.",
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
id: { type: "string", description: "Customer ID" },
|
|
16
|
+
includeAddresses: { type: "boolean", description: "Include customer addresses (addressbook)" },
|
|
17
|
+
includePaymentMethods: { type: "boolean", description: "Include payment methods (paymentmethod)" },
|
|
18
|
+
},
|
|
19
|
+
required: ["id"],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
async function handler(client, args) {
|
|
23
|
+
const parsed = schema.safeParse(args);
|
|
24
|
+
if (!parsed.success) {
|
|
25
|
+
return errorResult(parsed.error.errors.map((e) => e.message).join("; "));
|
|
26
|
+
}
|
|
27
|
+
const { id, includeAddresses, includePaymentMethods } = parsed.data;
|
|
28
|
+
return handleToolCall(() => customerService.getCustomer(client, id, { includeAddresses, includePaymentMethods }));
|
|
29
|
+
}
|
|
30
|
+
export const getCustomerTool = {
|
|
31
|
+
definition,
|
|
32
|
+
handler,
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=getCustomer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCustomer.js","sourceRoot":"","sources":["../../../src/tools/customers/getCustomer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,eAAe,MAAM,oCAAoC,CAAC;AAEtE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,gBAAgB,CAAC;IACvC,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACxC,qBAAqB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,cAAc;IACpB,WAAW,EACT,4GAA4G;IAC9G,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE;YAClD,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,0CAA0C,EAAE;YAC9F,qBAAqB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,yCAAyC,EAAE;SACnG;QACD,QAAQ,EAAE,CAAC,IAAI,CAAC;KACjB;CACF,CAAC;AAEF,KAAK,UAAU,OAAO,CAAC,MAAc,EAAE,IAAyC;IAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,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