@flexprice/sdk 2.1.33 → 2.1.34
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/docs/sdk/models/checkout-params.md +1 -1
- package/docs/sdk/models/checkout-payment-provider.md +1 -1
- package/docs/sdk/models/configuration-details.md +15 -0
- package/docs/sdk/models/cost-analytic-item.md +1 -1
- package/docs/sdk/models/create-fx-rate-request.md +27 -0
- package/docs/sdk/models/delete-fx-rate-request.md +17 -0
- package/docs/sdk/models/execution-details.md +15 -0
- package/docs/sdk/models/fx-rate-filter-order.md +15 -0
- package/docs/sdk/models/fx-rate-filter.md +28 -0
- package/docs/sdk/models/fx-rate-response.md +31 -0
- package/docs/sdk/models/fx-rate-scope.md +17 -0
- package/docs/sdk/models/fx-rate-source.md +17 -0
- package/docs/sdk/models/get-event-request.md +7 -3
- package/docs/sdk/models/get-fx-rate-request.md +17 -0
- package/docs/sdk/models/list-all-subscription-schedules-request.md +9 -6
- package/docs/sdk/models/list-all-subscription-schedules-schedule-status.md +15 -0
- package/docs/sdk/models/list-all-subscription-schedules-schedule-type.md +15 -0
- package/docs/sdk/models/list-customer-payment-methods-request.md +18 -0
- package/docs/sdk/models/list-fx-rates-response.md +16 -0
- package/docs/sdk/models/matched-meter.md +5 -5
- package/docs/sdk/models/{meter-meter.md → meter.md} +3 -3
- package/docs/sdk/models/payment-gateway-type.md +3 -1
- package/docs/sdk/models/payment-method-status.md +17 -0
- package/docs/sdk/models/plan-change-schedule-details.md +17 -0
- package/docs/sdk/models/plan-change-schedule-result.md +20 -0
- package/docs/sdk/models/provider-error.md +15 -0
- package/docs/sdk/models/provider-saved-payment-methods.md +17 -0
- package/docs/sdk/models/recurring-payment-status.md +17 -0
- package/docs/sdk/models/saved-card-details.md +18 -0
- package/docs/sdk/models/saved-payment-method.md +24 -0
- package/docs/sdk/models/saved-payment-methods-response.md +15 -0
- package/docs/sdk/models/saved-recurring-payment-details.md +17 -0
- package/docs/sdk/models/saved-upi-details.md +15 -0
- package/docs/sdk/models/subscription-line-item-response.md +1 -1
- package/docs/sdk/models/subscription-schedule-response.md +4 -2
- package/docs/sdk/models/subscription-subscription-line-item.md +1 -1
- package/docs/sdk/models/update-fx-rate-request-request.md +19 -0
- package/docs/sdk/models/update-fx-rate-request.md +18 -0
- package/docs/sdk/models/usage-analytic-item.md +1 -1
- package/docs/sdk/models/webhook-dto-invoice-sync-webhook-payload.md +18 -0
- package/docs/sdk/models/webhook-dto-provider-details.md +17 -0
- package/docs/sdk/models/webhook-event-name.md +1 -1
- package/docs/sdks/customers/README.md +73 -0
- package/docs/sdks/events/README.md +6 -84
- package/docs/sdks/fxrates/README.md +375 -0
- package/docs/sdks/subscriptions/README.md +1 -4
- package/docs/sdks/webhookevents/README.md +138 -0
- package/esm/funcs/customers-list-customer-payment-methods.d.ts +17 -0
- package/esm/funcs/customers-list-customer-payment-methods.d.ts.map +1 -0
- package/esm/funcs/customers-list-customer-payment-methods.js +96 -0
- package/esm/funcs/customers-list-customer-payment-methods.js.map +1 -0
- package/esm/funcs/events-get-event.d.ts +1 -1
- package/esm/funcs/events-get-event.d.ts.map +1 -1
- package/esm/funcs/events-get-event.js +10 -4
- package/esm/funcs/events-get-event.js.map +1 -1
- package/esm/funcs/fx-rates-create-fx-rate.d.ts +17 -0
- package/esm/funcs/fx-rates-create-fx-rate.d.ts.map +1 -0
- package/esm/funcs/{events-get-huggingface-inference-data.js → fx-rates-create-fx-rate.js} +8 -8
- package/esm/funcs/fx-rates-create-fx-rate.js.map +1 -0
- package/esm/funcs/fx-rates-delete-fx-rate.d.ts +19 -0
- package/esm/funcs/fx-rates-delete-fx-rate.d.ts.map +1 -0
- package/esm/funcs/fx-rates-delete-fx-rate.js +92 -0
- package/esm/funcs/fx-rates-delete-fx-rate.js.map +1 -0
- package/esm/funcs/fx-rates-get-fx-rate.d.ts +17 -0
- package/esm/funcs/fx-rates-get-fx-rate.d.ts.map +1 -0
- package/esm/funcs/fx-rates-get-fx-rate.js +91 -0
- package/esm/funcs/fx-rates-get-fx-rate.js.map +1 -0
- package/esm/funcs/fx-rates-query-fx-rates.d.ts +17 -0
- package/esm/funcs/fx-rates-query-fx-rates.d.ts.map +1 -0
- package/esm/funcs/fx-rates-query-fx-rates.js +83 -0
- package/esm/funcs/fx-rates-query-fx-rates.js.map +1 -0
- package/esm/funcs/fx-rates-update-fx-rate.d.ts +17 -0
- package/esm/funcs/fx-rates-update-fx-rate.d.ts.map +1 -0
- package/esm/funcs/fx-rates-update-fx-rate.js +93 -0
- package/esm/funcs/fx-rates-update-fx-rate.js.map +1 -0
- package/esm/funcs/subscriptions-list-all-subscription-schedules.d.ts +1 -1
- package/esm/funcs/subscriptions-list-all-subscription-schedules.d.ts.map +1 -1
- package/esm/funcs/subscriptions-list-all-subscription-schedules.js +7 -10
- package/esm/funcs/subscriptions-list-all-subscription-schedules.js.map +1 -1
- package/esm/funcs/webhook-events-post-webhook-events-invoice-sync-failed.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-invoice-sync-failed.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-invoice-sync-failed.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-invoice-sync-failed.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-invoice-sync-success.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-invoice-sync-success.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-invoice-sync-success.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-invoice-sync-success.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/sdk/customers.d.ts +7 -0
- package/esm/sdk/customers.d.ts.map +1 -1
- package/esm/sdk/customers.js +10 -0
- package/esm/sdk/customers.js.map +1 -1
- package/esm/sdk/events.d.ts +1 -8
- package/esm/sdk/events.d.ts.map +1 -1
- package/esm/sdk/events.js +2 -12
- package/esm/sdk/events.js.map +1 -1
- package/esm/sdk/fx-rates.d.ts +42 -0
- package/esm/sdk/fx-rates.d.ts.map +1 -0
- package/esm/sdk/fx-rates.js +58 -0
- package/esm/sdk/fx-rates.js.map +1 -0
- package/esm/sdk/models/checkout-payment-provider.d.ts +1 -0
- package/esm/sdk/models/checkout-payment-provider.d.ts.map +1 -1
- package/esm/sdk/models/checkout-payment-provider.js +1 -0
- package/esm/sdk/models/checkout-payment-provider.js.map +1 -1
- package/esm/sdk/models/configuration-details.d.ts +11 -0
- package/esm/sdk/models/configuration-details.d.ts.map +1 -0
- package/esm/sdk/models/configuration-details.js +20 -0
- package/esm/sdk/models/configuration-details.js.map +1 -0
- package/esm/sdk/models/cost-analytic-item.d.ts +2 -2
- package/esm/sdk/models/cost-analytic-item.d.ts.map +1 -1
- package/esm/sdk/models/cost-analytic-item.js +2 -2
- package/esm/sdk/models/cost-analytic-item.js.map +1 -1
- package/esm/sdk/models/create-fx-rate-request.d.ts +34 -0
- package/esm/sdk/models/create-fx-rate-request.d.ts.map +1 -0
- package/esm/sdk/models/create-fx-rate-request.js +31 -0
- package/esm/sdk/models/create-fx-rate-request.js.map +1 -0
- package/esm/sdk/models/delete-fx-rate-op.d.ts +15 -0
- package/esm/sdk/models/delete-fx-rate-op.d.ts.map +1 -0
- package/esm/sdk/models/delete-fx-rate-op.js +12 -0
- package/esm/sdk/models/delete-fx-rate-op.js.map +1 -0
- package/esm/sdk/models/entity-change-policy.d.ts +5 -0
- package/esm/sdk/models/entity-change-policy.d.ts.map +1 -1
- package/esm/sdk/models/entity-change-policy.js +15 -1
- package/esm/sdk/models/entity-change-policy.js.map +1 -1
- package/esm/sdk/models/execution-details.d.ts +11 -0
- package/esm/sdk/models/execution-details.d.ts.map +1 -0
- package/esm/sdk/models/execution-details.js +20 -0
- package/esm/sdk/models/execution-details.js.map +1 -0
- package/esm/sdk/models/fx-rate-filter.d.ts +50 -0
- package/esm/sdk/models/fx-rate-filter.d.ts.map +1 -0
- package/esm/sdk/models/fx-rate-filter.js +45 -0
- package/esm/sdk/models/fx-rate-filter.js.map +1 -0
- package/esm/sdk/models/fx-rate-response.d.ts +31 -0
- package/esm/sdk/models/fx-rate-response.d.ts.map +1 -0
- package/esm/sdk/models/fx-rate-response.js +48 -0
- package/esm/sdk/models/fx-rate-response.js.map +1 -0
- package/esm/sdk/models/fx-rate-scope.d.ts +13 -0
- package/esm/sdk/models/fx-rate-scope.d.ts.map +1 -0
- package/esm/sdk/models/fx-rate-scope.js +14 -0
- package/esm/sdk/models/fx-rate-scope.js.map +1 -0
- package/esm/sdk/models/fx-rate-source.d.ts +12 -0
- package/esm/sdk/models/fx-rate-source.d.ts.map +1 -0
- package/esm/sdk/models/fx-rate-source.js +13 -0
- package/esm/sdk/models/fx-rate-source.js.map +1 -0
- package/esm/sdk/models/get-event-op.d.ts +15 -0
- package/esm/sdk/models/get-event-op.d.ts.map +1 -1
- package/esm/sdk/models/get-event-op.js +12 -2
- package/esm/sdk/models/get-event-op.js.map +1 -1
- package/esm/sdk/models/get-fx-rate-op.d.ts +15 -0
- package/esm/sdk/models/get-fx-rate-op.d.ts.map +1 -0
- package/esm/sdk/models/get-fx-rate-op.js +12 -0
- package/esm/sdk/models/get-fx-rate-op.js.map +1 -0
- package/esm/sdk/models/index.d.ts +27 -4
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +27 -4
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/list-all-subscription-schedules-op.d.ts +33 -0
- package/esm/sdk/models/list-all-subscription-schedules-op.d.ts.map +1 -1
- package/esm/sdk/models/list-all-subscription-schedules-op.js +21 -0
- package/esm/sdk/models/list-all-subscription-schedules-op.js.map +1 -1
- package/esm/sdk/models/list-customer-payment-methods-op.d.ts +20 -0
- package/esm/sdk/models/list-customer-payment-methods-op.d.ts.map +1 -0
- package/esm/sdk/models/list-customer-payment-methods-op.js +13 -0
- package/esm/sdk/models/list-customer-payment-methods-op.js.map +1 -0
- package/esm/sdk/models/list-fx-rates-response.d.ts +13 -0
- package/esm/sdk/models/list-fx-rates-response.d.ts.map +1 -0
- package/esm/sdk/models/list-fx-rates-response.js +17 -0
- package/esm/sdk/models/list-fx-rates-response.js.map +1 -0
- package/esm/sdk/models/matched-meter.d.ts +2 -2
- package/esm/sdk/models/matched-meter.d.ts.map +1 -1
- package/esm/sdk/models/matched-meter.js +2 -2
- package/esm/sdk/models/matched-meter.js.map +1 -1
- package/esm/sdk/models/{meter-meter.d.ts → meter.d.ts} +4 -4
- package/esm/sdk/models/meter.d.ts.map +1 -0
- package/esm/sdk/models/{meter-meter.js → meter.js} +4 -5
- package/esm/sdk/models/meter.js.map +1 -0
- package/esm/sdk/models/payment-gateway-type.d.ts +5 -3
- package/esm/sdk/models/payment-gateway-type.d.ts.map +1 -1
- package/esm/sdk/models/payment-gateway-type.js +4 -2
- package/esm/sdk/models/payment-gateway-type.js.map +1 -1
- package/esm/sdk/models/payment-method-status.d.ts +11 -0
- package/esm/sdk/models/payment-method-status.d.ts.map +1 -0
- package/esm/sdk/models/payment-method-status.js +12 -0
- package/esm/sdk/models/payment-method-status.js.map +1 -0
- package/esm/sdk/models/plan-change-schedule-details.d.ts +14 -0
- package/esm/sdk/models/plan-change-schedule-details.d.ts.map +1 -0
- package/esm/sdk/models/plan-change-schedule-details.js +25 -0
- package/esm/sdk/models/plan-change-schedule-details.js.map +1 -0
- package/esm/sdk/models/plan-change-schedule-result.d.ts +18 -0
- package/esm/sdk/models/plan-change-schedule-result.d.ts.map +1 -0
- package/esm/sdk/models/plan-change-schedule-result.js +29 -0
- package/esm/sdk/models/plan-change-schedule-result.js.map +1 -0
- package/esm/sdk/models/provider-error.d.ts +10 -0
- package/esm/sdk/models/provider-error.d.ts.map +1 -0
- package/esm/sdk/models/provider-error.js +14 -0
- package/esm/sdk/models/provider-error.js.map +1 -0
- package/esm/sdk/models/provider-saved-payment-methods.d.ts +15 -0
- package/esm/sdk/models/provider-saved-payment-methods.d.ts.map +1 -0
- package/esm/sdk/models/provider-saved-payment-methods.js +19 -0
- package/esm/sdk/models/provider-saved-payment-methods.js.map +1 -0
- package/esm/sdk/models/recurring-payment-status.d.ts +15 -0
- package/esm/sdk/models/recurring-payment-status.d.ts.map +1 -0
- package/esm/sdk/models/recurring-payment-status.js +16 -0
- package/esm/sdk/models/recurring-payment-status.js.map +1 -0
- package/esm/sdk/models/saved-card-details.d.ts +13 -0
- package/esm/sdk/models/saved-card-details.d.ts.map +1 -0
- package/esm/sdk/models/saved-card-details.js +23 -0
- package/esm/sdk/models/saved-card-details.js.map +1 -0
- package/esm/sdk/models/saved-payment-method.d.ts +38 -0
- package/esm/sdk/models/saved-payment-method.d.ts.map +1 -0
- package/esm/sdk/models/saved-payment-method.js +36 -0
- package/esm/sdk/models/saved-payment-method.js.map +1 -0
- package/esm/sdk/models/saved-payment-methods-response.d.ts +11 -0
- package/esm/sdk/models/saved-payment-methods-response.d.ts.map +1 -0
- package/esm/sdk/models/saved-payment-methods-response.js +15 -0
- package/esm/sdk/models/saved-payment-methods-response.js.map +1 -0
- package/esm/sdk/models/saved-recurring-payment-details.d.ts +13 -0
- package/esm/sdk/models/saved-recurring-payment-details.d.ts.map +1 -0
- package/esm/sdk/models/saved-recurring-payment-details.js +23 -0
- package/esm/sdk/models/saved-recurring-payment-details.js.map +1 -0
- package/esm/sdk/models/saved-upi-details.d.ts +10 -0
- package/esm/sdk/models/saved-upi-details.d.ts.map +1 -0
- package/esm/sdk/models/saved-upi-details.js +14 -0
- package/esm/sdk/models/saved-upi-details.js.map +1 -0
- package/esm/sdk/models/subscription-change-entity-policies.d.ts +5 -0
- package/esm/sdk/models/subscription-change-entity-policies.d.ts.map +1 -1
- package/esm/sdk/models/subscription-change-entity-policies.js +10 -1
- package/esm/sdk/models/subscription-change-entity-policies.js.map +1 -1
- package/esm/sdk/models/subscription-line-item-response.d.ts +2 -2
- package/esm/sdk/models/subscription-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-line-item-response.js +2 -2
- package/esm/sdk/models/subscription-line-item-response.js.map +1 -1
- package/esm/sdk/models/subscription-schedule-response.d.ts +6 -2
- package/esm/sdk/models/subscription-schedule-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-schedule-response.js +6 -0
- package/esm/sdk/models/subscription-schedule-response.js.map +1 -1
- package/esm/sdk/models/subscription-subscription-line-item.d.ts +2 -2
- package/esm/sdk/models/subscription-subscription-line-item.d.ts.map +1 -1
- package/esm/sdk/models/subscription-subscription-line-item.js +2 -2
- package/esm/sdk/models/subscription-subscription-line-item.js.map +1 -1
- package/esm/sdk/models/update-fx-rate-op.d.ts +21 -0
- package/esm/sdk/models/update-fx-rate-op.d.ts.map +1 -0
- package/esm/sdk/models/update-fx-rate-op.js +14 -0
- package/esm/sdk/models/update-fx-rate-op.js.map +1 -0
- package/esm/sdk/models/update-fx-rate-request.d.ts +22 -0
- package/esm/sdk/models/update-fx-rate-request.d.ts.map +1 -0
- package/esm/sdk/models/update-fx-rate-request.js +21 -0
- package/esm/sdk/models/update-fx-rate-request.js.map +1 -0
- package/esm/sdk/models/usage-analytic-item.d.ts +2 -2
- package/esm/sdk/models/usage-analytic-item.d.ts.map +1 -1
- package/esm/sdk/models/usage-analytic-item.js +2 -2
- package/esm/sdk/models/usage-analytic-item.js.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice-sync-webhook-payload.d.ts +16 -0
- package/esm/sdk/models/webhook-dto-invoice-sync-webhook-payload.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-invoice-sync-webhook-payload.js +26 -0
- package/esm/sdk/models/webhook-dto-invoice-sync-webhook-payload.js.map +1 -0
- package/esm/sdk/models/webhook-dto-provider-details.d.ts +13 -0
- package/esm/sdk/models/webhook-dto-provider-details.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-provider-details.js +23 -0
- package/esm/sdk/models/webhook-dto-provider-details.js.map +1 -0
- package/esm/sdk/models/webhook-event-name.d.ts +2 -0
- package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
- package/esm/sdk/models/webhook-event-name.js +2 -0
- package/esm/sdk/models/webhook-event-name.js.map +1 -1
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +5 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/subscriptions.d.ts +1 -1
- package/esm/sdk/subscriptions.d.ts.map +1 -1
- package/esm/sdk/subscriptions.js +2 -2
- package/esm/sdk/subscriptions.js.map +1 -1
- package/esm/sdk/webhook-events.d.ts +14 -0
- package/esm/sdk/webhook-events.d.ts.map +1 -1
- package/esm/sdk/webhook-events.js +20 -0
- package/esm/sdk/webhook-events.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customers-list-customer-payment-methods.ts +191 -0
- package/src/funcs/events-get-event.ts +16 -1
- package/src/funcs/{events-get-huggingface-inference-data.ts → fx-rates-create-fx-rate.ts} +13 -13
- package/src/funcs/fx-rates-delete-fx-rate.ts +182 -0
- package/src/funcs/fx-rates-get-fx-rate.ts +181 -0
- package/src/funcs/fx-rates-query-fx-rates.ts +172 -0
- package/src/funcs/fx-rates-update-fx-rate.ts +186 -0
- package/src/funcs/subscriptions-list-all-subscription-schedules.ts +7 -20
- package/src/funcs/webhook-events-post-webhook-events-invoice-sync-failed.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-invoice-sync-success.ts +144 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/customers.ts +20 -0
- package/src/sdk/events.ts +6 -18
- package/src/sdk/fx-rates.ts +101 -0
- package/src/sdk/models/checkout-payment-provider.ts +1 -0
- package/src/sdk/models/configuration-details.ts +43 -0
- package/src/sdk/models/cost-analytic-item.ts +3 -3
- package/src/sdk/models/create-fx-rate-request.ts +68 -0
- package/src/sdk/models/delete-fx-rate-op.ts +33 -0
- package/src/sdk/models/entity-change-policy.ts +31 -0
- package/src/sdk/models/execution-details.ts +43 -0
- package/src/sdk/models/fx-rate-filter.ts +102 -0
- package/src/sdk/models/fx-rate-response.ts +84 -0
- package/src/sdk/models/fx-rate-scope.ts +21 -0
- package/src/sdk/models/fx-rate-source.ts +20 -0
- package/src/sdk/models/get-event-op.ts +31 -3
- package/src/sdk/models/get-fx-rate-op.ts +33 -0
- package/src/sdk/models/index.ts +27 -4
- package/src/sdk/models/list-all-subscription-schedules-op.ts +59 -0
- package/src/sdk/models/list-customer-payment-methods-op.ts +41 -0
- package/src/sdk/models/list-fx-rates-response.ts +41 -0
- package/src/sdk/models/matched-meter.ts +3 -3
- package/src/sdk/models/{meter-meter.ts → meter.ts} +34 -35
- package/src/sdk/models/payment-gateway-type.ts +12 -5
- package/src/sdk/models/payment-method-status.ts +20 -0
- package/src/sdk/models/plan-change-schedule-details.ts +57 -0
- package/src/sdk/models/plan-change-schedule-result.ts +57 -0
- package/src/sdk/models/provider-error.ts +31 -0
- package/src/sdk/models/provider-saved-payment-methods.ts +47 -0
- package/src/sdk/models/recurring-payment-status.ts +24 -0
- package/src/sdk/models/saved-card-details.ts +46 -0
- package/src/sdk/models/saved-payment-method.ts +96 -0
- package/src/sdk/models/saved-payment-methods-response.ts +35 -0
- package/src/sdk/models/saved-recurring-payment-details.ts +48 -0
- package/src/sdk/models/saved-upi-details.ts +31 -0
- package/src/sdk/models/subscription-change-entity-policies.ts +21 -0
- package/src/sdk/models/subscription-line-item-response.ts +3 -3
- package/src/sdk/models/subscription-schedule-response.ts +16 -2
- package/src/sdk/models/subscription-subscription-line-item.ts +3 -3
- package/src/sdk/models/update-fx-rate-op.ts +44 -0
- package/src/sdk/models/update-fx-rate-request.ts +48 -0
- package/src/sdk/models/usage-analytic-item.ts +3 -3
- package/src/sdk/models/webhook-dto-invoice-sync-webhook-payload.ts +59 -0
- package/src/sdk/models/webhook-dto-provider-details.ts +48 -0
- package/src/sdk/models/webhook-event-name.ts +2 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/subscriptions.ts +2 -8
- package/src/sdk/webhook-events.ts +32 -0
- package/docs/sdk/models/event-cost-info.md +0 -16
- package/docs/sdk/models/get-hugging-face-billing-data-request.md +0 -20
- package/docs/sdk/models/get-hugging-face-billing-data-response.md +0 -15
- package/esm/funcs/events-get-huggingface-inference-data.d.ts +0 -17
- package/esm/funcs/events-get-huggingface-inference-data.d.ts.map +0 -1
- package/esm/funcs/events-get-huggingface-inference-data.js.map +0 -1
- package/esm/sdk/models/event-cost-info.d.ts +0 -11
- package/esm/sdk/models/event-cost-info.d.ts.map +0 -1
- package/esm/sdk/models/event-cost-info.js +0 -15
- package/esm/sdk/models/event-cost-info.js.map +0 -1
- package/esm/sdk/models/get-hugging-face-billing-data-request.d.ts +0 -12
- package/esm/sdk/models/get-hugging-face-billing-data-request.d.ts.map +0 -1
- package/esm/sdk/models/get-hugging-face-billing-data-request.js +0 -12
- package/esm/sdk/models/get-hugging-face-billing-data-request.js.map +0 -1
- package/esm/sdk/models/get-hugging-face-billing-data-response.d.ts +0 -11
- package/esm/sdk/models/get-hugging-face-billing-data-response.d.ts.map +0 -1
- package/esm/sdk/models/get-hugging-face-billing-data-response.js +0 -15
- package/esm/sdk/models/get-hugging-face-billing-data-response.js.map +0 -1
- package/esm/sdk/models/meter-meter.d.ts.map +0 -1
- package/esm/sdk/models/meter-meter.js.map +0 -1
- package/src/sdk/models/event-cost-info.ts +0 -33
- package/src/sdk/models/get-hugging-face-billing-data-request.ts +0 -32
- package/src/sdk/models/get-hugging-face-billing-data-response.ts +0 -35
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { FlexpriceCore } from "../core.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/http-client-errors.js";
|
|
20
|
+
import * as models from "../sdk/models/index.js";
|
|
21
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* invoice.sync.failed
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Fired once per provider when an invoice sync fails after its last retry.
|
|
31
|
+
*/
|
|
32
|
+
export function webhookEventsPostWebhookEventsInvoiceSyncFailed(
|
|
33
|
+
client: FlexpriceCore,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
models.WebhookDtoInvoiceSyncWebhookPayload,
|
|
38
|
+
| FlexPriceError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
options,
|
|
51
|
+
));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function $do(
|
|
55
|
+
client: FlexpriceCore,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<
|
|
58
|
+
[
|
|
59
|
+
Result<
|
|
60
|
+
models.WebhookDtoInvoiceSyncWebhookPayload,
|
|
61
|
+
| FlexPriceError
|
|
62
|
+
| ResponseValidationError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
| RequestAbortedError
|
|
65
|
+
| RequestTimeoutError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
>,
|
|
70
|
+
APICall,
|
|
71
|
+
]
|
|
72
|
+
> {
|
|
73
|
+
const path = pathToFunc("/webhook-events/invoice.sync.failed")();
|
|
74
|
+
|
|
75
|
+
const headers = new Headers(compactMap({
|
|
76
|
+
Accept: "application/json",
|
|
77
|
+
}));
|
|
78
|
+
|
|
79
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
80
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
81
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
82
|
+
|
|
83
|
+
const context = {
|
|
84
|
+
options: client._options,
|
|
85
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
86
|
+
operationID: "post_/webhook-events/invoice.sync.failed",
|
|
87
|
+
oAuth2Scopes: null,
|
|
88
|
+
|
|
89
|
+
resolvedSecurity: requestSecurity,
|
|
90
|
+
|
|
91
|
+
securitySource: client._options.apiKeyAuth,
|
|
92
|
+
retryConfig: options?.retries
|
|
93
|
+
|| client._options.retryConfig
|
|
94
|
+
|| { strategy: "none" },
|
|
95
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const requestRes = client._createRequest(context, {
|
|
99
|
+
security: requestSecurity,
|
|
100
|
+
method: "POST",
|
|
101
|
+
baseURL: options?.serverURL,
|
|
102
|
+
path: path,
|
|
103
|
+
headers: headers,
|
|
104
|
+
userAgent: client._options.userAgent,
|
|
105
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
106
|
+
}, options);
|
|
107
|
+
if (!requestRes.ok) {
|
|
108
|
+
return [requestRes, { status: "invalid" }];
|
|
109
|
+
}
|
|
110
|
+
const req = requestRes.value;
|
|
111
|
+
|
|
112
|
+
const doResult = await client._do(req, {
|
|
113
|
+
context,
|
|
114
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
115
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
116
|
+
retryConfig: context.retryConfig,
|
|
117
|
+
retryCodes: context.retryCodes,
|
|
118
|
+
});
|
|
119
|
+
if (!doResult.ok) {
|
|
120
|
+
return [doResult, { status: "request-error", request: req }];
|
|
121
|
+
}
|
|
122
|
+
const response = doResult.value;
|
|
123
|
+
|
|
124
|
+
const [result] = await M.match<
|
|
125
|
+
models.WebhookDtoInvoiceSyncWebhookPayload,
|
|
126
|
+
| FlexPriceError
|
|
127
|
+
| ResponseValidationError
|
|
128
|
+
| ConnectionError
|
|
129
|
+
| RequestAbortedError
|
|
130
|
+
| RequestTimeoutError
|
|
131
|
+
| InvalidRequestError
|
|
132
|
+
| UnexpectedClientError
|
|
133
|
+
| SDKValidationError
|
|
134
|
+
>(
|
|
135
|
+
M.json(200, models.WebhookDtoInvoiceSyncWebhookPayload$inboundSchema),
|
|
136
|
+
M.fail("4XX"),
|
|
137
|
+
M.fail("5XX"),
|
|
138
|
+
)(response, req);
|
|
139
|
+
if (!result.ok) {
|
|
140
|
+
return [result, { status: "complete", request: req, response }];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return [result, { status: "complete", request: req, response }];
|
|
144
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { FlexpriceCore } from "../core.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/http-client-errors.js";
|
|
20
|
+
import * as models from "../sdk/models/index.js";
|
|
21
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* invoice.sync.success
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Fired once per provider when an invoice is synced to that provider.
|
|
31
|
+
*/
|
|
32
|
+
export function webhookEventsPostWebhookEventsInvoiceSyncSuccess(
|
|
33
|
+
client: FlexpriceCore,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
models.WebhookDtoInvoiceSyncWebhookPayload,
|
|
38
|
+
| FlexPriceError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
options,
|
|
51
|
+
));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function $do(
|
|
55
|
+
client: FlexpriceCore,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<
|
|
58
|
+
[
|
|
59
|
+
Result<
|
|
60
|
+
models.WebhookDtoInvoiceSyncWebhookPayload,
|
|
61
|
+
| FlexPriceError
|
|
62
|
+
| ResponseValidationError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
| RequestAbortedError
|
|
65
|
+
| RequestTimeoutError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
>,
|
|
70
|
+
APICall,
|
|
71
|
+
]
|
|
72
|
+
> {
|
|
73
|
+
const path = pathToFunc("/webhook-events/invoice.sync.success")();
|
|
74
|
+
|
|
75
|
+
const headers = new Headers(compactMap({
|
|
76
|
+
Accept: "application/json",
|
|
77
|
+
}));
|
|
78
|
+
|
|
79
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
80
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
81
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
82
|
+
|
|
83
|
+
const context = {
|
|
84
|
+
options: client._options,
|
|
85
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
86
|
+
operationID: "post_/webhook-events/invoice.sync.success",
|
|
87
|
+
oAuth2Scopes: null,
|
|
88
|
+
|
|
89
|
+
resolvedSecurity: requestSecurity,
|
|
90
|
+
|
|
91
|
+
securitySource: client._options.apiKeyAuth,
|
|
92
|
+
retryConfig: options?.retries
|
|
93
|
+
|| client._options.retryConfig
|
|
94
|
+
|| { strategy: "none" },
|
|
95
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const requestRes = client._createRequest(context, {
|
|
99
|
+
security: requestSecurity,
|
|
100
|
+
method: "POST",
|
|
101
|
+
baseURL: options?.serverURL,
|
|
102
|
+
path: path,
|
|
103
|
+
headers: headers,
|
|
104
|
+
userAgent: client._options.userAgent,
|
|
105
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
106
|
+
}, options);
|
|
107
|
+
if (!requestRes.ok) {
|
|
108
|
+
return [requestRes, { status: "invalid" }];
|
|
109
|
+
}
|
|
110
|
+
const req = requestRes.value;
|
|
111
|
+
|
|
112
|
+
const doResult = await client._do(req, {
|
|
113
|
+
context,
|
|
114
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
115
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
116
|
+
retryConfig: context.retryConfig,
|
|
117
|
+
retryCodes: context.retryCodes,
|
|
118
|
+
});
|
|
119
|
+
if (!doResult.ok) {
|
|
120
|
+
return [doResult, { status: "request-error", request: req }];
|
|
121
|
+
}
|
|
122
|
+
const response = doResult.value;
|
|
123
|
+
|
|
124
|
+
const [result] = await M.match<
|
|
125
|
+
models.WebhookDtoInvoiceSyncWebhookPayload,
|
|
126
|
+
| FlexPriceError
|
|
127
|
+
| ResponseValidationError
|
|
128
|
+
| ConnectionError
|
|
129
|
+
| RequestAbortedError
|
|
130
|
+
| RequestTimeoutError
|
|
131
|
+
| InvalidRequestError
|
|
132
|
+
| UnexpectedClientError
|
|
133
|
+
| SDKValidationError
|
|
134
|
+
>(
|
|
135
|
+
M.json(200, models.WebhookDtoInvoiceSyncWebhookPayload$inboundSchema),
|
|
136
|
+
M.fail("4XX"),
|
|
137
|
+
M.fail("5XX"),
|
|
138
|
+
)(response, req);
|
|
139
|
+
if (!result.ok) {
|
|
140
|
+
return [result, { status: "complete", request: req, response }];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return [result, { status: "complete", request: req, response }];
|
|
144
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.0",
|
|
68
|
-
sdkVersion: "2.1.
|
|
69
|
-
genVersion: "2.
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 2.1.
|
|
68
|
+
sdkVersion: "2.1.34",
|
|
69
|
+
genVersion: "2.943.0",
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 2.1.34 2.943.0 1.0 @flexprice/sdk",
|
|
71
71
|
} as const;
|
package/src/sdk/customers.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { customersGetCustomerUpcomingGrants } from "../funcs/customers-get-custo
|
|
|
11
11
|
import { customersGetCustomerUsageSummary } from "../funcs/customers-get-customer-usage-summary.js";
|
|
12
12
|
import { customersGetCustomer } from "../funcs/customers-get-customer.js";
|
|
13
13
|
import { customersGetSubscriptionsForCustomer } from "../funcs/customers-get-subscriptions-for-customer.js";
|
|
14
|
+
import { customersListCustomerPaymentMethods } from "../funcs/customers-list-customer-payment-methods.js";
|
|
14
15
|
import { customersQueryCustomer } from "../funcs/customers-query-customer.js";
|
|
15
16
|
import { customersUpdateCustomer } from "../funcs/customers-update-customer.js";
|
|
16
17
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -210,4 +211,23 @@ export class Customers extends ClientSDK {
|
|
|
210
211
|
options,
|
|
211
212
|
));
|
|
212
213
|
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* List customer payment methods
|
|
217
|
+
*
|
|
218
|
+
* @remarks
|
|
219
|
+
* Use when you need a customer's saved payment methods across every connected gateway, including whether each can be auto-charged. Only gateways that can list saved methods are included.
|
|
220
|
+
*/
|
|
221
|
+
async listCustomerPaymentMethods(
|
|
222
|
+
id: string,
|
|
223
|
+
providers?: Array<string> | undefined,
|
|
224
|
+
options?: RequestOptions,
|
|
225
|
+
): Promise<models.SavedPaymentMethodsResponse> {
|
|
226
|
+
return unwrapAsync(customersListCustomerPaymentMethods(
|
|
227
|
+
this,
|
|
228
|
+
id,
|
|
229
|
+
providers,
|
|
230
|
+
options,
|
|
231
|
+
));
|
|
232
|
+
}
|
|
213
233
|
}
|
package/src/sdk/events.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { eventsGetEvent } from "../funcs/events-get-event.js";
|
|
6
|
-
import { eventsGetHuggingfaceInferenceData } from "../funcs/events-get-huggingface-inference-data.js";
|
|
7
6
|
import { eventsGetUsageAnalytics } from "../funcs/events-get-usage-analytics.js";
|
|
8
7
|
import { eventsGetUsageByMeter } from "../funcs/events-get-usage-by-meter.js";
|
|
9
8
|
import { eventsGetUsageStatistics } from "../funcs/events-get-usage-statistics.js";
|
|
@@ -66,23 +65,6 @@ export class Events extends ClientSDK {
|
|
|
66
65
|
));
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
/**
|
|
70
|
-
* Get Hugging Face inference data
|
|
71
|
-
*
|
|
72
|
-
* @remarks
|
|
73
|
-
* Use when fetching Hugging Face inference usage or billing data (e.g. for HF-specific reporting or reconciliation). Reads the meter-usage pipeline.
|
|
74
|
-
*/
|
|
75
|
-
async getHuggingfaceInferenceData(
|
|
76
|
-
request: models.GetHuggingFaceBillingDataRequest,
|
|
77
|
-
options?: RequestOptions,
|
|
78
|
-
): Promise<models.GetHuggingFaceBillingDataResponse> {
|
|
79
|
-
return unwrapAsync(eventsGetHuggingfaceInferenceData(
|
|
80
|
-
this,
|
|
81
|
-
request,
|
|
82
|
-
options,
|
|
83
|
-
));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
68
|
/**
|
|
87
69
|
* Get event
|
|
88
70
|
*
|
|
@@ -91,11 +73,17 @@ export class Events extends ClientSDK {
|
|
|
91
73
|
*/
|
|
92
74
|
async getEvent(
|
|
93
75
|
id: string,
|
|
76
|
+
externalCustomerId: string,
|
|
77
|
+
startTime?: string | undefined,
|
|
78
|
+
endTime?: string | undefined,
|
|
94
79
|
options?: RequestOptions,
|
|
95
80
|
): Promise<models.GetEventByIDResponse> {
|
|
96
81
|
return unwrapAsync(eventsGetEvent(
|
|
97
82
|
this,
|
|
98
83
|
id,
|
|
84
|
+
externalCustomerId,
|
|
85
|
+
startTime,
|
|
86
|
+
endTime,
|
|
99
87
|
options,
|
|
100
88
|
));
|
|
101
89
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { fxRatesCreateFXRate } from "../funcs/fx-rates-create-fx-rate.js";
|
|
6
|
+
import { fxRatesDeleteFXRate } from "../funcs/fx-rates-delete-fx-rate.js";
|
|
7
|
+
import { fxRatesGetFXRate } from "../funcs/fx-rates-get-fx-rate.js";
|
|
8
|
+
import { fxRatesQueryFXRates } from "../funcs/fx-rates-query-fx-rates.js";
|
|
9
|
+
import { fxRatesUpdateFXRate } from "../funcs/fx-rates-update-fx-rate.js";
|
|
10
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
12
|
+
import * as models from "./models/index.js";
|
|
13
|
+
|
|
14
|
+
export class FXRates extends ClientSDK {
|
|
15
|
+
/**
|
|
16
|
+
* Create an FX rate
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Configure a fixed exchange rate at tenant, customer or subscription scope. Overrides need a tenant rate for the same pair.
|
|
20
|
+
*/
|
|
21
|
+
async createFXRate(
|
|
22
|
+
request: models.CreateFXRateRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<models.FXRateResponse> {
|
|
25
|
+
return unwrapAsync(fxRatesCreateFXRate(
|
|
26
|
+
this,
|
|
27
|
+
request,
|
|
28
|
+
options,
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Query FX rates
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Filter FX rates via a request body (POST used for a complex query, but read-only).
|
|
37
|
+
*/
|
|
38
|
+
async queryFXRates(
|
|
39
|
+
request: models.FXRateFilter,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): Promise<models.ListFXRatesResponse> {
|
|
42
|
+
return unwrapAsync(fxRatesQueryFXRates(
|
|
43
|
+
this,
|
|
44
|
+
request,
|
|
45
|
+
options,
|
|
46
|
+
));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get an FX rate
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Load a single FX rate by ID.
|
|
54
|
+
*/
|
|
55
|
+
async getFXRate(
|
|
56
|
+
id: string,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): Promise<models.FXRateResponse> {
|
|
59
|
+
return unwrapAsync(fxRatesGetFXRate(
|
|
60
|
+
this,
|
|
61
|
+
id,
|
|
62
|
+
options,
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Update an FX rate
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* Update a rate's value, validity window (overrides only) or metadata. Scope, scope_id and the currency pair are immutable.
|
|
71
|
+
*/
|
|
72
|
+
async updateFXRate(
|
|
73
|
+
id: string,
|
|
74
|
+
body: models.UpdateFXRateRequest,
|
|
75
|
+
options?: RequestOptions,
|
|
76
|
+
): Promise<models.FXRateResponse> {
|
|
77
|
+
return unwrapAsync(fxRatesUpdateFXRate(
|
|
78
|
+
this,
|
|
79
|
+
id,
|
|
80
|
+
body,
|
|
81
|
+
options,
|
|
82
|
+
));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Delete an FX rate
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* Archive a customer or subscription override. Tenant rates cannot be deleted.
|
|
90
|
+
*/
|
|
91
|
+
async deleteFXRate(
|
|
92
|
+
id: string,
|
|
93
|
+
options?: RequestOptions,
|
|
94
|
+
): Promise<{ [k: string]: string }> {
|
|
95
|
+
return unwrapAsync(fxRatesDeleteFXRate(
|
|
96
|
+
this,
|
|
97
|
+
id,
|
|
98
|
+
options,
|
|
99
|
+
));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -9,6 +9,7 @@ import { OpenEnum } from "../../types/enums.js";
|
|
|
9
9
|
export const CheckoutPaymentProvider = {
|
|
10
10
|
Razorpay: "razorpay",
|
|
11
11
|
Chargebee: "chargebee",
|
|
12
|
+
Stripe: "stripe",
|
|
12
13
|
} as const;
|
|
13
14
|
export type CheckoutPaymentProvider = OpenEnum<typeof CheckoutPaymentProvider>;
|
|
14
15
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
PlanChangeScheduleDetails,
|
|
12
|
+
PlanChangeScheduleDetails$inboundSchema,
|
|
13
|
+
} from "./plan-change-schedule-details.js";
|
|
14
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
|
|
16
|
+
export type ConfigurationDetails = {
|
|
17
|
+
planChange?: PlanChangeScheduleDetails | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ConfigurationDetails$inboundSchema: z.ZodMiniType<
|
|
22
|
+
ConfigurationDetails,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.pipe(
|
|
25
|
+
z.object({
|
|
26
|
+
plan_change: types.optional(PlanChangeScheduleDetails$inboundSchema),
|
|
27
|
+
}),
|
|
28
|
+
z.transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"plan_change": "planChange",
|
|
31
|
+
});
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export function configurationDetailsFromJSON(
|
|
36
|
+
jsonString: string,
|
|
37
|
+
): SafeParseResult<ConfigurationDetails, SDKValidationError> {
|
|
38
|
+
return safeParse(
|
|
39
|
+
jsonString,
|
|
40
|
+
(x) => ConfigurationDetails$inboundSchema.parse(JSON.parse(x)),
|
|
41
|
+
`Failed to parse 'ConfigurationDetails' from JSON`,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -8,7 +8,7 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import * as types from "../../types/primitives.js";
|
|
10
10
|
import { CostPoint, CostPoint$inboundSchema } from "./cost-point.js";
|
|
11
|
-
import {
|
|
11
|
+
import { Meter, Meter$inboundSchema } from "./meter.js";
|
|
12
12
|
import { PricePrice, PricePrice$inboundSchema } from "./price-price.js";
|
|
13
13
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
14
14
|
|
|
@@ -24,7 +24,7 @@ export type CostAnalyticItem = {
|
|
|
24
24
|
currency?: string | undefined;
|
|
25
25
|
customerId?: string | undefined;
|
|
26
26
|
externalCustomerId?: string | undefined;
|
|
27
|
-
meter?:
|
|
27
|
+
meter?: Meter | undefined;
|
|
28
28
|
meterId?: string | undefined;
|
|
29
29
|
meterName?: string | undefined;
|
|
30
30
|
price?: PricePrice | undefined;
|
|
@@ -50,7 +50,7 @@ export const CostAnalyticItem$inboundSchema: z.ZodMiniType<
|
|
|
50
50
|
currency: types.optional(types.string()),
|
|
51
51
|
customer_id: types.optional(types.string()),
|
|
52
52
|
external_customer_id: types.optional(types.string()),
|
|
53
|
-
meter: types.optional(
|
|
53
|
+
meter: types.optional(Meter$inboundSchema),
|
|
54
54
|
meter_id: types.optional(types.string()),
|
|
55
55
|
meter_name: types.optional(types.string()),
|
|
56
56
|
price: types.optional(PricePrice$inboundSchema),
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { FXRateScope, FXRateScope$outboundSchema } from "./fx-rate-scope.js";
|
|
8
|
+
import { FXRateSource, FXRateSource$outboundSchema } from "./fx-rate-source.js";
|
|
9
|
+
|
|
10
|
+
export type CreateFXRateRequest = {
|
|
11
|
+
endDate?: Date | undefined;
|
|
12
|
+
fromCurrency: string;
|
|
13
|
+
metadata?: { [k: string]: string } | undefined;
|
|
14
|
+
rate?: string | undefined;
|
|
15
|
+
scope: FXRateScope;
|
|
16
|
+
scopeId?: string | undefined;
|
|
17
|
+
source?: FXRateSource | undefined;
|
|
18
|
+
startDate?: Date | undefined;
|
|
19
|
+
toCurrency: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type CreateFXRateRequest$Outbound = {
|
|
24
|
+
end_date?: string | undefined;
|
|
25
|
+
from_currency: string;
|
|
26
|
+
metadata?: { [k: string]: string } | undefined;
|
|
27
|
+
rate?: string | undefined;
|
|
28
|
+
scope: string;
|
|
29
|
+
scope_id?: string | undefined;
|
|
30
|
+
source?: string | undefined;
|
|
31
|
+
start_date?: string | undefined;
|
|
32
|
+
to_currency: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const CreateFXRateRequest$outboundSchema: z.ZodMiniType<
|
|
37
|
+
CreateFXRateRequest$Outbound,
|
|
38
|
+
CreateFXRateRequest
|
|
39
|
+
> = z.pipe(
|
|
40
|
+
z.object({
|
|
41
|
+
endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
42
|
+
fromCurrency: z.string(),
|
|
43
|
+
metadata: z.optional(z.record(z.string(), z.string())),
|
|
44
|
+
rate: z.optional(z.string()),
|
|
45
|
+
scope: FXRateScope$outboundSchema,
|
|
46
|
+
scopeId: z.optional(z.string()),
|
|
47
|
+
source: z.optional(FXRateSource$outboundSchema),
|
|
48
|
+
startDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
49
|
+
toCurrency: z.string(),
|
|
50
|
+
}),
|
|
51
|
+
z.transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
endDate: "end_date",
|
|
54
|
+
fromCurrency: "from_currency",
|
|
55
|
+
scopeId: "scope_id",
|
|
56
|
+
startDate: "start_date",
|
|
57
|
+
toCurrency: "to_currency",
|
|
58
|
+
});
|
|
59
|
+
}),
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
export function createFXRateRequestToJSON(
|
|
63
|
+
createFXRateRequest: CreateFXRateRequest,
|
|
64
|
+
): string {
|
|
65
|
+
return JSON.stringify(
|
|
66
|
+
CreateFXRateRequest$outboundSchema.parse(createFXRateRequest),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type DeleteFXRateRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* FX rate ID
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type DeleteFXRateRequest$Outbound = {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const DeleteFXRateRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
+
DeleteFXRateRequest$Outbound,
|
|
22
|
+
DeleteFXRateRequest
|
|
23
|
+
> = z.object({
|
|
24
|
+
id: z.string(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function deleteFXRateRequestToJSON(
|
|
28
|
+
deleteFXRateRequest: DeleteFXRateRequest,
|
|
29
|
+
): string {
|
|
30
|
+
return JSON.stringify(
|
|
31
|
+
DeleteFXRateRequest$outboundSchema.parse(deleteFXRateRequest),
|
|
32
|
+
);
|
|
33
|
+
}
|