@flexprice/sdk 2.1.11 → 2.1.18
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/attributed-to-customer-result.md +17 -0
- package/docs/sdk/models/bucket-summary.md +26 -0
- package/docs/sdk/models/bucket.md +16 -0
- package/docs/sdk/models/cancel-subscription-request.md +7 -7
- package/docs/sdk/models/changed-subscription.md +7 -5
- package/docs/sdk/models/commitment-bucket-request.md +22 -0
- package/docs/sdk/models/coupon-response.md +1 -0
- package/docs/sdk/models/coupon.md +1 -0
- package/docs/sdk/models/create-coupon-request.md +1 -0
- package/docs/sdk/models/create-invoice-line-item-request.md +25 -22
- package/docs/sdk/models/create-subscription-line-item-request.md +1 -0
- package/docs/sdk/models/create-subscription-request.md +3 -2
- package/docs/sdk/models/create-tax-association-request.md +12 -10
- package/docs/sdk/models/create-user-request.md +1 -0
- package/docs/sdk/models/create-user-response.md +2 -0
- package/docs/sdk/models/debug-tracker-status.md +2 -2
- package/docs/sdk/models/debug-tracker.md +1 -0
- package/docs/sdk/models/delete-service-account-request.md +17 -0
- package/docs/sdk/models/delink-integration-mapping-request.md +21 -0
- package/docs/sdk/models/entity-integration-mapping-response.md +1 -0
- package/docs/sdk/models/entity-sync-config.md +16 -0
- package/docs/sdk/models/execute-subscription-modify-request-request.md +1 -1
- package/docs/sdk/models/execute-subscription-modify-request.md +4 -1
- package/docs/sdk/models/failure-point-type.md +1 -1
- package/docs/sdk/models/get-coupon-association-request.md +17 -0
- package/docs/sdk/models/get-entity-integration-mappings-request.md +19 -0
- package/docs/sdk/models/get-usage-analytics-request.md +13 -12
- package/docs/sdk/models/inheritance-action.md +15 -0
- package/docs/sdk/models/integration-config-entry.md +17 -0
- package/docs/sdk/models/integration-config-response.md +15 -0
- package/docs/sdk/models/invoice-billing-reason.md +1 -1
- package/docs/sdk/models/invoice-filter.md +2 -0
- package/docs/sdk/models/invoice-line-item-response.md +38 -36
- package/docs/sdk/models/invoice-sync-settings.md +15 -0
- package/docs/sdk/models/line-item-commitment-config.md +10 -9
- package/docs/sdk/models/list-coupon-associations-request.md +19 -0
- package/docs/sdk/models/list-coupon-associations-response.md +16 -0
- package/docs/sdk/models/list-entity-integration-mappings-response.md +16 -0
- package/docs/sdk/models/meter-usage-attribution.md +17 -0
- package/docs/sdk/models/payment-gateway-type.md +1 -1
- package/docs/sdk/models/preview-subscription-modify-request.md +1 -1
- package/docs/sdk/models/price-filter.md +1 -0
- package/docs/sdk/models/price-price.md +43 -42
- package/docs/sdk/models/price-response.md +48 -47
- package/docs/sdk/models/s3-export-config.md +20 -0
- package/docs/sdk/models/secret-provider.md +1 -1
- package/docs/sdk/models/sub-modify-coupon-action.md +15 -0
- package/docs/sdk/models/sub-modify-coupon-params.md +24 -0
- package/docs/sdk/models/sub-modify-inheritance-request.md +5 -3
- package/docs/sdk/models/sub-modify-tax-action.md +15 -0
- package/docs/sdk/models/sub-modify-tax-params.md +20 -0
- package/docs/sdk/models/sub-modify-trial-end-request.md +18 -0
- package/docs/sdk/models/subscription-coupon-input.md +20 -0
- package/docs/sdk/models/subscription-line-item-response.md +1 -0
- package/docs/sdk/models/subscription-modify-type.md +2 -2
- package/docs/sdk/models/subscription-phase-create-request.md +4 -3
- package/docs/sdk/models/subscription-response-v2.md +2 -0
- package/docs/sdk/models/subscription-response.md +1 -0
- package/docs/sdk/models/subscription-subscription-line-item.md +1 -0
- package/docs/sdk/models/sync-config.md +23 -0
- package/docs/sdk/models/tax-association-response.md +2 -0
- package/docs/sdk/models/time-of-day-bucket.md +22 -0
- package/docs/sdk/models/trial-end-action.md +15 -0
- package/docs/sdk/models/update-service-account-request-request.md +21 -0
- package/docs/sdk/models/update-service-account-request.md +17 -0
- package/docs/sdk/models/update-service-account-response.md +21 -0
- package/docs/sdk/models/update-subscription-line-item-request.md +17 -16
- package/docs/sdk/models/update-user-request.md +16 -0
- package/docs/sdk/models/update-user-response.md +21 -0
- package/docs/sdk/models/usage-analytic-item.md +34 -33
- package/docs/sdk/models/usage-analytic-point.md +11 -9
- package/docs/sdk/models/user-response.md +2 -0
- package/docs/sdk/models/window-size.md +2 -2
- package/docs/sdks/couponassociations/README.md +150 -0
- package/docs/sdks/integrations/README.md +223 -0
- package/docs/sdks/subscriptions/README.md +4 -4
- package/docs/sdks/users/README.md +221 -0
- package/esm/funcs/coupon-associations-get-coupon-association.d.ts +17 -0
- package/esm/funcs/coupon-associations-get-coupon-association.d.ts.map +1 -0
- package/esm/funcs/coupon-associations-get-coupon-association.js +91 -0
- package/esm/funcs/coupon-associations-get-coupon-association.js.map +1 -0
- package/esm/funcs/coupon-associations-list-coupon-associations.d.ts +17 -0
- package/esm/funcs/coupon-associations-list-coupon-associations.d.ts.map +1 -0
- package/esm/funcs/coupon-associations-list-coupon-associations.js +91 -0
- package/esm/funcs/coupon-associations-list-coupon-associations.js.map +1 -0
- package/esm/funcs/integrations-delink-integration-mapping.d.ts +17 -0
- package/esm/funcs/integrations-delink-integration-mapping.d.ts.map +1 -0
- package/esm/funcs/integrations-delink-integration-mapping.js +83 -0
- package/esm/funcs/integrations-delink-integration-mapping.js.map +1 -0
- package/esm/funcs/integrations-get-entity-integration-mappings.d.ts +17 -0
- package/esm/funcs/integrations-get-entity-integration-mappings.d.ts.map +1 -0
- package/esm/funcs/integrations-get-entity-integration-mappings.js +91 -0
- package/esm/funcs/integrations-get-entity-integration-mappings.js.map +1 -0
- package/esm/funcs/integrations-get-integration-config.d.ts +17 -0
- package/esm/funcs/integrations-get-integration-config.d.ts.map +1 -0
- package/esm/funcs/integrations-get-integration-config.js +72 -0
- package/esm/funcs/integrations-get-integration-config.js.map +1 -0
- package/esm/funcs/subscriptions-execute-subscription-modify.d.ts +1 -1
- package/esm/funcs/subscriptions-execute-subscription-modify.js +1 -1
- package/esm/funcs/subscriptions-preview-subscription-modify.d.ts +1 -1
- package/esm/funcs/subscriptions-preview-subscription-modify.js +1 -1
- package/esm/funcs/users-delete-service-account.d.ts +17 -0
- package/esm/funcs/users-delete-service-account.d.ts.map +1 -0
- package/esm/funcs/users-delete-service-account.js +91 -0
- package/esm/funcs/users-delete-service-account.js.map +1 -0
- package/esm/funcs/users-update-service-account.d.ts +17 -0
- package/esm/funcs/users-update-service-account.d.ts.map +1 -0
- package/esm/funcs/users-update-service-account.js +93 -0
- package/esm/funcs/users-update-service-account.js.map +1 -0
- package/esm/funcs/users-update-user.d.ts +17 -0
- package/esm/funcs/users-update-user.d.ts.map +1 -0
- package/esm/funcs/users-update-user.js +83 -0
- package/esm/funcs/users-update-user.js.map +1 -0
- package/esm/hooks/types.d.ts +1 -0
- package/esm/hooks/types.d.ts.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.js +1 -1
- package/esm/lib/encodings.js.map +1 -1
- package/esm/lib/matchers.js +1 -1
- package/esm/lib/matchers.js.map +1 -1
- package/esm/lib/primitives.d.ts +1 -0
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +17 -0
- package/esm/lib/primitives.js.map +1 -1
- package/esm/lib/sdks.d.ts.map +1 -1
- package/esm/lib/sdks.js +50 -16
- package/esm/lib/sdks.js.map +1 -1
- package/esm/sdk/coupon-associations.d.ts +19 -0
- package/esm/sdk/coupon-associations.d.ts.map +1 -0
- package/esm/sdk/coupon-associations.js +28 -0
- package/esm/sdk/coupon-associations.js.map +1 -0
- package/esm/sdk/integrations.d.ts +21 -0
- package/esm/sdk/integrations.d.ts.map +1 -1
- package/esm/sdk/integrations.js +30 -0
- package/esm/sdk/integrations.js.map +1 -1
- package/esm/sdk/models/attributed-to-customer-result.d.ts +15 -0
- package/esm/sdk/models/attributed-to-customer-result.d.ts.map +1 -0
- package/esm/sdk/models/attributed-to-customer-result.js +24 -0
- package/esm/sdk/models/attributed-to-customer-result.js.map +1 -0
- package/esm/sdk/models/bucket-summary.d.ts +31 -0
- package/esm/sdk/models/bucket-summary.d.ts.map +1 -0
- package/esm/sdk/models/bucket-summary.js +40 -0
- package/esm/sdk/models/bucket-summary.js.map +1 -0
- package/esm/sdk/models/bucket.d.ts +19 -0
- package/esm/sdk/models/bucket.d.ts.map +1 -0
- package/esm/sdk/models/bucket.js +24 -0
- package/esm/sdk/models/bucket.js.map +1 -0
- package/esm/sdk/models/cancel-subscription-request.d.ts +8 -0
- package/esm/sdk/models/cancel-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/cancel-subscription-request.js.map +1 -1
- package/esm/sdk/models/changed-subscription.d.ts +2 -0
- package/esm/sdk/models/changed-subscription.d.ts.map +1 -1
- package/esm/sdk/models/changed-subscription.js +10 -2
- package/esm/sdk/models/changed-subscription.js.map +1 -1
- package/esm/sdk/models/commitment-bucket-request.d.ts +29 -0
- package/esm/sdk/models/commitment-bucket-request.d.ts.map +1 -0
- package/esm/sdk/models/commitment-bucket-request.js +30 -0
- package/esm/sdk/models/commitment-bucket-request.js.map +1 -0
- package/esm/sdk/models/coupon-response.d.ts +1 -0
- package/esm/sdk/models/coupon-response.d.ts.map +1 -1
- package/esm/sdk/models/coupon-response.js +2 -0
- package/esm/sdk/models/coupon-response.js.map +1 -1
- package/esm/sdk/models/coupon.d.ts +1 -0
- package/esm/sdk/models/coupon.d.ts.map +1 -1
- package/esm/sdk/models/coupon.js +2 -0
- package/esm/sdk/models/coupon.js.map +1 -1
- package/esm/sdk/models/create-coupon-request.d.ts +2 -0
- package/esm/sdk/models/create-coupon-request.d.ts.map +1 -1
- package/esm/sdk/models/create-coupon-request.js +2 -0
- package/esm/sdk/models/create-coupon-request.js.map +1 -1
- package/esm/sdk/models/create-invoice-line-item-request.d.ts +18 -0
- package/esm/sdk/models/create-invoice-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/create-invoice-line-item-request.js +6 -0
- package/esm/sdk/models/create-invoice-line-item-request.js.map +1 -1
- package/esm/sdk/models/create-subscription-line-item-request.d.ts +3 -0
- package/esm/sdk/models/create-subscription-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-line-item-request.js +3 -0
- package/esm/sdk/models/create-subscription-line-item-request.js.map +1 -1
- package/esm/sdk/models/create-subscription-request.d.ts +15 -0
- package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-request.js +3 -0
- package/esm/sdk/models/create-subscription-request.js.map +1 -1
- package/esm/sdk/models/create-tax-association-request.d.ts +10 -0
- package/esm/sdk/models/create-tax-association-request.d.ts.map +1 -1
- package/esm/sdk/models/create-tax-association-request.js +4 -0
- package/esm/sdk/models/create-tax-association-request.js.map +1 -1
- package/esm/sdk/models/create-user-request.d.ts +5 -0
- package/esm/sdk/models/create-user-request.d.ts.map +1 -1
- package/esm/sdk/models/create-user-request.js +1 -0
- package/esm/sdk/models/create-user-request.js.map +1 -1
- package/esm/sdk/models/create-user-response.d.ts +4 -0
- package/esm/sdk/models/create-user-response.d.ts.map +1 -1
- package/esm/sdk/models/create-user-response.js +2 -0
- package/esm/sdk/models/create-user-response.js.map +1 -1
- package/esm/sdk/models/debug-tracker-status.d.ts +2 -0
- package/esm/sdk/models/debug-tracker-status.d.ts.map +1 -1
- package/esm/sdk/models/debug-tracker-status.js +2 -0
- package/esm/sdk/models/debug-tracker-status.js.map +1 -1
- package/esm/sdk/models/debug-tracker.d.ts +2 -0
- package/esm/sdk/models/debug-tracker.d.ts.map +1 -1
- package/esm/sdk/models/debug-tracker.js +3 -0
- package/esm/sdk/models/debug-tracker.js.map +1 -1
- package/esm/sdk/models/delete-service-account-op.d.ts +15 -0
- package/esm/sdk/models/delete-service-account-op.d.ts.map +1 -0
- package/esm/sdk/models/delete-service-account-op.js +12 -0
- package/esm/sdk/models/delete-service-account-op.js.map +1 -0
- package/esm/sdk/models/delink-integration-mapping-request.d.ts +17 -0
- package/esm/sdk/models/delink-integration-mapping-request.d.ts.map +1 -0
- package/esm/sdk/models/delink-integration-mapping-request.js +22 -0
- package/esm/sdk/models/delink-integration-mapping-request.js.map +1 -0
- package/esm/sdk/models/entity-integration-mapping-response.d.ts +3 -0
- package/esm/sdk/models/entity-integration-mapping-response.d.ts.map +1 -1
- package/esm/sdk/models/entity-integration-mapping-response.js +1 -0
- package/esm/sdk/models/entity-integration-mapping-response.js.map +1 -1
- package/esm/sdk/models/entity-sync-config.d.ts +17 -0
- package/esm/sdk/models/entity-sync-config.d.ts.map +1 -0
- package/esm/sdk/models/entity-sync-config.js +15 -0
- package/esm/sdk/models/entity-sync-config.js.map +1 -0
- package/esm/sdk/models/execute-subscription-modify-request.d.ts +9 -0
- package/esm/sdk/models/execute-subscription-modify-request.d.ts.map +1 -1
- package/esm/sdk/models/execute-subscription-modify-request.js +9 -0
- package/esm/sdk/models/execute-subscription-modify-request.js.map +1 -1
- package/esm/sdk/models/failure-point-type.d.ts +1 -0
- package/esm/sdk/models/failure-point-type.d.ts.map +1 -1
- package/esm/sdk/models/failure-point-type.js +1 -0
- package/esm/sdk/models/failure-point-type.js.map +1 -1
- package/esm/sdk/models/get-coupon-association-op.d.ts +15 -0
- package/esm/sdk/models/get-coupon-association-op.d.ts.map +1 -0
- package/esm/sdk/models/get-coupon-association-op.js +12 -0
- package/esm/sdk/models/get-coupon-association-op.js.map +1 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.d.ts +20 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.d.ts.map +1 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.js +19 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.js.map +1 -0
- package/esm/sdk/models/get-usage-analytics-request.d.ts +10 -0
- package/esm/sdk/models/get-usage-analytics-request.d.ts.map +1 -1
- package/esm/sdk/models/get-usage-analytics-request.js +2 -0
- package/esm/sdk/models/get-usage-analytics-request.js.map +1 -1
- package/esm/sdk/models/index.d.ts +32 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +32 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/inheritance-action.d.ts +10 -0
- package/esm/sdk/models/inheritance-action.d.ts.map +1 -0
- package/esm/sdk/models/inheritance-action.js +11 -0
- package/esm/sdk/models/inheritance-action.js.map +1 -0
- package/esm/sdk/models/integration-config-entry.d.ts +14 -0
- package/esm/sdk/models/integration-config-entry.d.ts.map +1 -0
- package/esm/sdk/models/integration-config-entry.js +24 -0
- package/esm/sdk/models/integration-config-entry.js.map +1 -0
- package/esm/sdk/models/integration-config-response.d.ts +11 -0
- package/esm/sdk/models/integration-config-response.d.ts.map +1 -0
- package/esm/sdk/models/integration-config-response.js +15 -0
- package/esm/sdk/models/integration-config-response.js.map +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
- package/esm/sdk/models/invoice-billing-reason.js +1 -0
- package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
- package/esm/sdk/models/invoice-filter.d.ts +11 -0
- package/esm/sdk/models/invoice-filter.d.ts.map +1 -1
- package/esm/sdk/models/invoice-filter.js +4 -0
- package/esm/sdk/models/invoice-filter.js.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.d.ts +11 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.js +4 -0
- package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
- package/esm/sdk/models/invoice-sync-settings.d.ts +11 -0
- package/esm/sdk/models/invoice-sync-settings.d.ts.map +1 -0
- package/esm/sdk/models/invoice-sync-settings.js +20 -0
- package/esm/sdk/models/invoice-sync-settings.js.map +1 -0
- package/esm/sdk/models/line-item-commitment-config.d.ts +11 -0
- package/esm/sdk/models/line-item-commitment-config.d.ts.map +1 -1
- package/esm/sdk/models/line-item-commitment-config.js +3 -0
- package/esm/sdk/models/line-item-commitment-config.js.map +1 -1
- package/esm/sdk/models/list-coupon-associations-op.d.ts +35 -0
- package/esm/sdk/models/list-coupon-associations-op.d.ts.map +1 -0
- package/esm/sdk/models/list-coupon-associations-op.js +23 -0
- package/esm/sdk/models/list-coupon-associations-op.js.map +1 -0
- package/esm/sdk/models/list-coupon-associations-response.d.ts +13 -0
- package/esm/sdk/models/list-coupon-associations-response.d.ts.map +1 -0
- package/esm/sdk/models/list-coupon-associations-response.js +17 -0
- package/esm/sdk/models/list-coupon-associations-response.js.map +1 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.d.ts +13 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.d.ts.map +1 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.js +17 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.js.map +1 -0
- package/esm/sdk/models/meter-usage-attribution.d.ts +12 -0
- package/esm/sdk/models/meter-usage-attribution.d.ts.map +1 -0
- package/esm/sdk/models/meter-usage-attribution.js +23 -0
- package/esm/sdk/models/meter-usage-attribution.js.map +1 -0
- package/esm/sdk/models/payment-gateway-type.d.ts +1 -0
- package/esm/sdk/models/payment-gateway-type.d.ts.map +1 -1
- package/esm/sdk/models/payment-gateway-type.js +1 -0
- package/esm/sdk/models/payment-gateway-type.js.map +1 -1
- package/esm/sdk/models/price-filter.d.ts +3 -0
- package/esm/sdk/models/price-filter.d.ts.map +1 -1
- package/esm/sdk/models/price-filter.js +3 -0
- package/esm/sdk/models/price-filter.js.map +1 -1
- package/esm/sdk/models/price-price.d.ts +9 -0
- package/esm/sdk/models/price-price.d.ts.map +1 -1
- package/esm/sdk/models/price-price.js +1 -0
- package/esm/sdk/models/price-price.js.map +1 -1
- package/esm/sdk/models/price-response.d.ts +9 -0
- package/esm/sdk/models/price-response.d.ts.map +1 -1
- package/esm/sdk/models/price-response.js +1 -0
- package/esm/sdk/models/price-response.js.map +1 -1
- package/esm/sdk/models/s3-export-config.d.ts +29 -0
- package/esm/sdk/models/s3-export-config.d.ts.map +1 -0
- package/esm/sdk/models/s3-export-config.js +27 -0
- package/esm/sdk/models/s3-export-config.js.map +1 -0
- package/esm/sdk/models/secret-provider.d.ts +1 -0
- package/esm/sdk/models/secret-provider.d.ts.map +1 -1
- package/esm/sdk/models/secret-provider.js +1 -0
- package/esm/sdk/models/secret-provider.js.map +1 -1
- package/esm/sdk/models/sub-modify-coupon-action.d.ts +10 -0
- package/esm/sdk/models/sub-modify-coupon-action.d.ts.map +1 -0
- package/esm/sdk/models/sub-modify-coupon-action.js +11 -0
- package/esm/sdk/models/sub-modify-coupon-action.js.map +1 -0
- package/esm/sdk/models/sub-modify-coupon-params.d.ts +48 -0
- package/esm/sdk/models/sub-modify-coupon-params.d.ts.map +1 -0
- package/esm/sdk/models/sub-modify-coupon-params.js +31 -0
- package/esm/sdk/models/sub-modify-coupon-params.js.map +1 -0
- package/esm/sdk/models/sub-modify-inheritance-request.d.ts +11 -0
- package/esm/sdk/models/sub-modify-inheritance-request.d.ts.map +1 -1
- package/esm/sdk/models/sub-modify-inheritance-request.js +4 -0
- package/esm/sdk/models/sub-modify-inheritance-request.js.map +1 -1
- package/esm/sdk/models/sub-modify-tax-action.d.ts +10 -0
- package/esm/sdk/models/sub-modify-tax-action.d.ts.map +1 -0
- package/esm/sdk/models/sub-modify-tax-action.js +11 -0
- package/esm/sdk/models/sub-modify-tax-action.js.map +1 -0
- package/esm/sdk/models/sub-modify-tax-params.d.ts +28 -0
- package/esm/sdk/models/sub-modify-tax-params.d.ts.map +1 -0
- package/esm/sdk/models/sub-modify-tax-params.js +23 -0
- package/esm/sdk/models/sub-modify-tax-params.js.map +1 -0
- package/esm/sdk/models/sub-modify-trial-end-request.d.ts +18 -0
- package/esm/sdk/models/sub-modify-trial-end-request.d.ts.map +1 -0
- package/esm/sdk/models/sub-modify-trial-end-request.js +19 -0
- package/esm/sdk/models/sub-modify-trial-end-request.js.map +1 -0
- package/esm/sdk/models/subscription-coupon-input.d.ts +30 -0
- package/esm/sdk/models/subscription-coupon-input.d.ts.map +1 -0
- package/esm/sdk/models/subscription-coupon-input.js +23 -0
- package/esm/sdk/models/subscription-coupon-input.js.map +1 -0
- package/esm/sdk/models/subscription-line-item-response.d.ts +2 -0
- package/esm/sdk/models/subscription-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-line-item-response.js +3 -0
- package/esm/sdk/models/subscription-line-item-response.js.map +1 -1
- package/esm/sdk/models/subscription-modify-type.d.ts +3 -0
- package/esm/sdk/models/subscription-modify-type.d.ts.map +1 -1
- package/esm/sdk/models/subscription-modify-type.js +3 -0
- package/esm/sdk/models/subscription-modify-type.js.map +1 -1
- package/esm/sdk/models/subscription-phase-create-request.d.ts +8 -2
- package/esm/sdk/models/subscription-phase-create-request.d.ts.map +1 -1
- package/esm/sdk/models/subscription-phase-create-request.js +3 -0
- package/esm/sdk/models/subscription-phase-create-request.js.map +1 -1
- package/esm/sdk/models/subscription-response-v2.d.ts +16 -0
- package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response-v2.js +4 -0
- package/esm/sdk/models/subscription-response-v2.js.map +1 -1
- package/esm/sdk/models/subscription-response.d.ts +8 -0
- package/esm/sdk/models/subscription-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response.js +2 -0
- package/esm/sdk/models/subscription-response.js.map +1 -1
- package/esm/sdk/models/subscription-subscription-line-item.d.ts +2 -0
- package/esm/sdk/models/subscription-subscription-line-item.d.ts.map +1 -1
- package/esm/sdk/models/subscription-subscription-line-item.js +3 -0
- package/esm/sdk/models/subscription-subscription-line-item.js.map +1 -1
- package/esm/sdk/models/sync-config.d.ts +21 -0
- package/esm/sdk/models/sync-config.d.ts.map +1 -0
- package/esm/sdk/models/sync-config.js +31 -0
- package/esm/sdk/models/sync-config.js.map +1 -0
- package/esm/sdk/models/tax-association-response.d.ts +8 -0
- package/esm/sdk/models/tax-association-response.d.ts.map +1 -1
- package/esm/sdk/models/tax-association-response.js +4 -0
- package/esm/sdk/models/tax-association-response.js.map +1 -1
- package/esm/sdk/models/time-of-day-bucket.d.ts +31 -0
- package/esm/sdk/models/time-of-day-bucket.d.ts.map +1 -0
- package/esm/sdk/models/time-of-day-bucket.js +32 -0
- package/esm/sdk/models/time-of-day-bucket.js.map +1 -0
- package/esm/sdk/models/trial-end-action.d.ts +10 -0
- package/esm/sdk/models/trial-end-action.d.ts.map +1 -0
- package/esm/sdk/models/trial-end-action.js +11 -0
- package/esm/sdk/models/trial-end-action.js.map +1 -0
- package/esm/sdk/models/update-service-account-op.d.ts +21 -0
- package/esm/sdk/models/update-service-account-op.d.ts.map +1 -0
- package/esm/sdk/models/update-service-account-op.js +14 -0
- package/esm/sdk/models/update-service-account-op.js.map +1 -0
- package/esm/sdk/models/update-service-account-request.d.ts +12 -0
- package/esm/sdk/models/update-service-account-request.d.ts.map +1 -0
- package/esm/sdk/models/update-service-account-request.js +12 -0
- package/esm/sdk/models/update-service-account-request.js.map +1 -0
- package/esm/sdk/models/update-service-account-response.d.ts +23 -0
- package/esm/sdk/models/update-service-account-response.d.ts.map +1 -0
- package/esm/sdk/models/update-service-account-response.js +22 -0
- package/esm/sdk/models/update-service-account-response.js.map +1 -0
- package/esm/sdk/models/update-subscription-line-item-request.d.ts +6 -0
- package/esm/sdk/models/update-subscription-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/update-subscription-line-item-request.js +3 -0
- package/esm/sdk/models/update-subscription-line-item-request.js.map +1 -1
- package/esm/sdk/models/update-user-request.d.ts +18 -0
- package/esm/sdk/models/update-user-request.d.ts.map +1 -0
- package/esm/sdk/models/update-user-request.js +13 -0
- package/esm/sdk/models/update-user-request.js.map +1 -0
- package/esm/sdk/models/update-user-response.d.ts +23 -0
- package/esm/sdk/models/update-user-response.d.ts.map +1 -0
- package/esm/sdk/models/update-user-response.js +22 -0
- package/esm/sdk/models/update-user-response.js.map +1 -0
- package/esm/sdk/models/usage-analytic-item.d.ts +8 -0
- package/esm/sdk/models/usage-analytic-item.d.ts.map +1 -1
- package/esm/sdk/models/usage-analytic-item.js +3 -0
- package/esm/sdk/models/usage-analytic-item.js.map +1 -1
- package/esm/sdk/models/usage-analytic-point.d.ts +8 -0
- package/esm/sdk/models/usage-analytic-point.d.ts.map +1 -1
- package/esm/sdk/models/usage-analytic-point.js +4 -0
- package/esm/sdk/models/usage-analytic-point.js.map +1 -1
- package/esm/sdk/models/user-response.d.ts +4 -0
- package/esm/sdk/models/user-response.d.ts.map +1 -1
- package/esm/sdk/models/user-response.js +2 -0
- package/esm/sdk/models/user-response.js.map +1 -1
- package/esm/sdk/models/window-size.d.ts +1 -1
- package/esm/sdk/models/window-size.js +1 -1
- package/esm/sdk/models/window-size.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 +2 -2
- package/esm/sdk/subscriptions.js +2 -2
- package/esm/sdk/users.d.ts +21 -0
- package/esm/sdk/users.d.ts.map +1 -1
- package/esm/sdk/users.js +30 -0
- package/esm/sdk/users.js.map +1 -1
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +6 -6
- package/esm/types/async.js.map +1 -1
- package/esm/types/primitives.d.ts +0 -2
- package/esm/types/primitives.d.ts.map +1 -1
- package/esm/types/primitives.js +0 -22
- package/esm/types/primitives.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/coupon-associations-get-coupon-association.ts +182 -0
- package/src/funcs/coupon-associations-list-coupon-associations.ts +188 -0
- package/src/funcs/integrations-delink-integration-mapping.ts +173 -0
- package/src/funcs/integrations-get-entity-integration-mappings.ts +186 -0
- package/src/funcs/integrations-get-integration-config.ts +152 -0
- package/src/funcs/subscriptions-execute-subscription-modify.ts +1 -1
- package/src/funcs/subscriptions-preview-subscription-modify.ts +1 -1
- package/src/funcs/users-delete-service-account.ts +182 -0
- package/src/funcs/users-update-service-account.ts +187 -0
- package/src/funcs/users-update-user.ts +172 -0
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/matchers.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/lib/sdks.ts +54 -17
- package/src/sdk/coupon-associations.ts +45 -0
- package/src/sdk/integrations.ts +54 -0
- package/src/sdk/models/attributed-to-customer-result.ts +55 -0
- package/src/sdk/models/bucket-summary.ts +80 -0
- package/src/sdk/models/bucket.ts +45 -0
- package/src/sdk/models/cancel-subscription-request.ts +8 -0
- package/src/sdk/models/changed-subscription.ts +18 -5
- package/src/sdk/models/commitment-bucket-request.ts +72 -0
- package/src/sdk/models/coupon-response.ts +3 -0
- package/src/sdk/models/coupon.ts +3 -0
- package/src/sdk/models/create-coupon-request.ts +4 -0
- package/src/sdk/models/create-invoice-line-item-request.ts +24 -0
- package/src/sdk/models/create-subscription-line-item-request.ts +11 -0
- package/src/sdk/models/create-subscription-request.ts +23 -0
- package/src/sdk/models/create-tax-association-request.ts +14 -0
- package/src/sdk/models/create-user-request.ts +6 -0
- package/src/sdk/models/create-user-response.ts +4 -0
- package/src/sdk/models/debug-tracker-status.ts +2 -0
- package/src/sdk/models/debug-tracker.ts +9 -0
- package/src/sdk/models/delete-service-account-op.ts +35 -0
- package/src/sdk/models/delink-integration-mapping-request.ts +52 -0
- package/src/sdk/models/entity-integration-mapping-response.ts +2 -0
- package/src/sdk/models/entity-sync-config.ts +39 -0
- package/src/sdk/models/execute-subscription-modify-request.ts +27 -0
- package/src/sdk/models/failure-point-type.ts +1 -0
- package/src/sdk/models/get-coupon-association-op.ts +35 -0
- package/src/sdk/models/get-entity-integration-mappings-op.ts +50 -0
- package/src/sdk/models/get-usage-analytics-request.ts +12 -0
- package/src/sdk/models/index.ts +32 -0
- package/src/sdk/models/inheritance-action.ts +17 -0
- package/src/sdk/models/integration-config-entry.ts +49 -0
- package/src/sdk/models/integration-config-response.ts +35 -0
- package/src/sdk/models/invoice-billing-reason.ts +1 -0
- package/src/sdk/models/invoice-filter.ts +17 -0
- package/src/sdk/models/invoice-line-item-response.ts +15 -0
- package/src/sdk/models/invoice-sync-settings.ts +43 -0
- package/src/sdk/models/line-item-commitment-config.ts +19 -0
- package/src/sdk/models/list-coupon-associations-op.ts +69 -0
- package/src/sdk/models/list-coupon-associations-response.ts +41 -0
- package/src/sdk/models/list-entity-integration-mappings-response.ts +44 -0
- package/src/sdk/models/meter-usage-attribution.ts +45 -0
- package/src/sdk/models/payment-gateway-type.ts +1 -0
- package/src/sdk/models/price-filter.ts +8 -0
- package/src/sdk/models/price-price.ts +10 -0
- package/src/sdk/models/price-response.ts +10 -0
- package/src/sdk/models/s3-export-config.ts +70 -0
- package/src/sdk/models/secret-provider.ts +1 -0
- package/src/sdk/models/sub-modify-coupon-action.ts +17 -0
- package/src/sdk/models/sub-modify-coupon-params.ts +92 -0
- package/src/sdk/models/sub-modify-inheritance-request.ts +17 -0
- package/src/sdk/models/sub-modify-tax-action.ts +17 -0
- package/src/sdk/models/sub-modify-tax-params.ts +64 -0
- package/src/sdk/models/sub-modify-trial-end-request.ts +50 -0
- package/src/sdk/models/subscription-coupon-input.ts +62 -0
- package/src/sdk/models/subscription-line-item-response.ts +9 -0
- package/src/sdk/models/subscription-modify-type.ts +3 -0
- package/src/sdk/models/subscription-phase-create-request.ts +16 -2
- package/src/sdk/models/subscription-response-v2.ts +20 -0
- package/src/sdk/models/subscription-response.ts +10 -0
- package/src/sdk/models/subscription-subscription-line-item.ts +9 -0
- package/src/sdk/models/sync-config.ts +65 -0
- package/src/sdk/models/tax-association-response.ts +12 -0
- package/src/sdk/models/time-of-day-bucket.ts +74 -0
- package/src/sdk/models/trial-end-action.ts +17 -0
- package/src/sdk/models/update-service-account-op.ts +46 -0
- package/src/sdk/models/update-service-account-request.ts +32 -0
- package/src/sdk/models/update-service-account-response.ts +51 -0
- package/src/sdk/models/update-subscription-line-item-request.ts +14 -0
- package/src/sdk/models/update-user-request.ts +33 -0
- package/src/sdk/models/update-user-response.ts +51 -0
- package/src/sdk/models/usage-analytic-item.ts +13 -0
- package/src/sdk/models/usage-analytic-point.ts +12 -0
- package/src/sdk/models/user-response.ts +4 -0
- package/src/sdk/models/window-size.ts +1 -1
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/subscriptions.ts +2 -2
- package/src/sdk/users.ts +56 -0
- package/src/types/async.ts +8 -7
- package/src/types/primitives.ts +0 -26
- package/esm/lib/dlv.d.ts +0 -14
- package/esm/lib/dlv.d.ts.map +0 -1
- package/esm/lib/dlv.js +0 -46
- package/esm/lib/dlv.js.map +0 -1
- package/esm/lib/is-plain-object.d.ts +0 -2
- package/esm/lib/is-plain-object.d.ts.map +0 -1
- package/esm/lib/is-plain-object.js +0 -38
- package/esm/lib/is-plain-object.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
package/src/lib/sdks.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
matchContentType,
|
|
24
24
|
} from "./http.js";
|
|
25
25
|
import { Logger } from "./logger.js";
|
|
26
|
+
import { combineSignals } from "./primitives.js";
|
|
26
27
|
import { retry, RetryConfig } from "./retries.js";
|
|
27
28
|
import { SecurityState } from "./security.js";
|
|
28
29
|
|
|
@@ -127,27 +128,55 @@ export class ClientSDK {
|
|
|
127
128
|
if (path) {
|
|
128
129
|
baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
|
|
129
130
|
reqURL = new URL(path, baseURL);
|
|
131
|
+
if (!reqURL.search && baseURL.search) {
|
|
132
|
+
reqURL.search = baseURL.search;
|
|
133
|
+
}
|
|
130
134
|
} else {
|
|
131
135
|
reqURL = baseURL;
|
|
132
136
|
}
|
|
133
137
|
reqURL.hash = "";
|
|
134
138
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (typeof q !== "undefined") {
|
|
141
|
-
secQuery.push(q);
|
|
139
|
+
// Appends already-encoded query pairs to a query string, replacing any
|
|
140
|
+
// existing pairs with the same key so later sources take precedence.
|
|
141
|
+
const mergeQuery = (current: string, additions: string): string => {
|
|
142
|
+
if (!additions) {
|
|
143
|
+
return current;
|
|
142
144
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
const additionKeys = new Set(
|
|
146
|
+
additions
|
|
147
|
+
.split("&")
|
|
148
|
+
.filter((pair) => pair !== "")
|
|
149
|
+
.map((pair) => pair.split("=")[0] ?? ""),
|
|
150
|
+
);
|
|
151
|
+
const kept = current.split("&").filter((pair) => {
|
|
152
|
+
return pair !== "" && !additionKeys.has(pair.split("=")[0] ?? "");
|
|
153
|
+
});
|
|
154
|
+
return [...kept, additions].join("&");
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const encodeQueryRecord = (record: Record<string, unknown>): string => {
|
|
158
|
+
return Object.entries(record)
|
|
159
|
+
.map(([k, v]) => {
|
|
160
|
+
if (v == null) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
const value = v;
|
|
164
|
+
return encodeForm(k, value, {
|
|
165
|
+
explode: Array.isArray(value),
|
|
166
|
+
charEncoding: "percent",
|
|
167
|
+
});
|
|
168
|
+
})
|
|
169
|
+
.filter((pair): pair is string => typeof pair !== "undefined")
|
|
170
|
+
.join("&");
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const finalQuery = [
|
|
174
|
+
query || "",
|
|
175
|
+
encodeQueryRecord(security?.queryParams || {}),
|
|
176
|
+
].reduce(mergeQuery, reqURL.search.slice(1));
|
|
147
177
|
|
|
148
178
|
if (finalQuery) {
|
|
149
|
-
|
|
150
|
-
reqURL.search = `?${q}`;
|
|
179
|
+
reqURL.search = `?${finalQuery}`;
|
|
151
180
|
}
|
|
152
181
|
|
|
153
182
|
const headers = new Headers(opHeaders);
|
|
@@ -193,9 +222,8 @@ export class ClientSDK {
|
|
|
193
222
|
...options?.fetchOptions,
|
|
194
223
|
...options,
|
|
195
224
|
};
|
|
196
|
-
if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
|
|
197
|
-
|
|
198
|
-
fetchOptions.signal = timeoutSignal;
|
|
225
|
+
if (!fetchOptions?.signal && conf.timeoutMs != null && conf.timeoutMs > 0) {
|
|
226
|
+
context.timeoutMs = conf.timeoutMs;
|
|
199
227
|
}
|
|
200
228
|
|
|
201
229
|
if (conf.body instanceof ReadableStream) {
|
|
@@ -242,10 +270,19 @@ export class ClientSDK {
|
|
|
242
270
|
>
|
|
243
271
|
> {
|
|
244
272
|
const { context, isErrorStatusCode } = options;
|
|
273
|
+
const timeoutMs = context.timeoutMs;
|
|
245
274
|
|
|
246
275
|
return retry(
|
|
247
276
|
async () => {
|
|
248
|
-
const
|
|
277
|
+
const cloned = request.clone();
|
|
278
|
+
let attempt = cloned;
|
|
279
|
+
if (timeoutMs != null && timeoutMs > 0) {
|
|
280
|
+
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
281
|
+
const combined = combineSignals(cloned.signal, timeoutSignal)
|
|
282
|
+
?? timeoutSignal;
|
|
283
|
+
attempt = new Request(cloned, { signal: combined });
|
|
284
|
+
}
|
|
285
|
+
const req = await this.#hooks.beforeRequest(context, attempt);
|
|
249
286
|
await logRequest(this.#logger, req).catch((e) =>
|
|
250
287
|
this.#logger?.log("Failed to log request:", e)
|
|
251
288
|
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { couponAssociationsGetCouponAssociation } from "../funcs/coupon-associations-get-coupon-association.js";
|
|
6
|
+
import { couponAssociationsListCouponAssociations } from "../funcs/coupon-associations-list-coupon-associations.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
import * as models from "./models/index.js";
|
|
10
|
+
|
|
11
|
+
export class CouponAssociations extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* List coupon associations
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* List coupon associations with optional filters. Coupon associations are created and removed via the subscription modify API.
|
|
17
|
+
*/
|
|
18
|
+
async listCouponAssociations(
|
|
19
|
+
request?: models.ListCouponAssociationsRequest | undefined,
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): Promise<models.ListCouponAssociationsResponse> {
|
|
22
|
+
return unwrapAsync(couponAssociationsListCouponAssociations(
|
|
23
|
+
this,
|
|
24
|
+
request,
|
|
25
|
+
options,
|
|
26
|
+
));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get coupon association
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Get a single coupon association by ID. Coupon associations are created and removed via the subscription modify API.
|
|
34
|
+
*/
|
|
35
|
+
async getCouponAssociation(
|
|
36
|
+
id: string,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): Promise<models.CouponAssociationResponse> {
|
|
39
|
+
return unwrapAsync(couponAssociationsGetCouponAssociation(
|
|
40
|
+
this,
|
|
41
|
+
id,
|
|
42
|
+
options,
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
}
|
package/src/sdk/integrations.ts
CHANGED
|
@@ -2,12 +2,30 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { integrationsDelinkIntegrationMapping } from "../funcs/integrations-delink-integration-mapping.js";
|
|
6
|
+
import { integrationsGetEntityIntegrationMappings } from "../funcs/integrations-get-entity-integration-mappings.js";
|
|
7
|
+
import { integrationsGetIntegrationConfig } from "../funcs/integrations-get-integration-config.js";
|
|
5
8
|
import { integrationsLinkIntegrationMapping } from "../funcs/integrations-link-integration-mapping.js";
|
|
6
9
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
10
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
11
|
import * as models from "./models/index.js";
|
|
9
12
|
|
|
10
13
|
export class Integrations extends ClientSDK {
|
|
14
|
+
/**
|
|
15
|
+
* Get integration configurations
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Returns the base capabilities and current sync configuration for all connected providers.
|
|
19
|
+
*/
|
|
20
|
+
async getIntegrationConfig(
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): Promise<models.IntegrationConfigResponse> {
|
|
23
|
+
return unwrapAsync(integrationsGetIntegrationConfig(
|
|
24
|
+
this,
|
|
25
|
+
options,
|
|
26
|
+
));
|
|
27
|
+
}
|
|
28
|
+
|
|
11
29
|
/**
|
|
12
30
|
* Link integration mapping
|
|
13
31
|
*
|
|
@@ -24,4 +42,40 @@ export class Integrations extends ClientSDK {
|
|
|
24
42
|
options,
|
|
25
43
|
));
|
|
26
44
|
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Delink integration mapping
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Soft-delete (archive) the mapping between a FlexPrice entity and a provider entity.
|
|
51
|
+
*/
|
|
52
|
+
async delinkIntegrationMapping(
|
|
53
|
+
request: models.DelinkIntegrationMappingRequest,
|
|
54
|
+
options?: RequestOptions,
|
|
55
|
+
): Promise<models.SuccessResponse> {
|
|
56
|
+
return unwrapAsync(integrationsDelinkIntegrationMapping(
|
|
57
|
+
this,
|
|
58
|
+
request,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Get entity integration mappings
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
* Get integration mappings for a specific entity by entity type and entity ID.
|
|
68
|
+
*/
|
|
69
|
+
async getEntityIntegrationMappings(
|
|
70
|
+
entityType: string,
|
|
71
|
+
entityId: string,
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): Promise<models.ListEntityIntegrationMappingsResponse> {
|
|
74
|
+
return unwrapAsync(integrationsGetEntityIntegrationMappings(
|
|
75
|
+
this,
|
|
76
|
+
entityType,
|
|
77
|
+
entityId,
|
|
78
|
+
options,
|
|
79
|
+
));
|
|
80
|
+
}
|
|
27
81
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
DebugTrackerStatus,
|
|
12
|
+
DebugTrackerStatus$inboundSchema,
|
|
13
|
+
} from "./debug-tracker-status.js";
|
|
14
|
+
import {
|
|
15
|
+
ErrorResponse,
|
|
16
|
+
ErrorResponse$inboundSchema,
|
|
17
|
+
} from "./error-response.js";
|
|
18
|
+
import {
|
|
19
|
+
MeterUsageAttribution,
|
|
20
|
+
MeterUsageAttribution$inboundSchema,
|
|
21
|
+
} from "./meter-usage-attribution.js";
|
|
22
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
23
|
+
|
|
24
|
+
export type AttributedToCustomerResult = {
|
|
25
|
+
error?: ErrorResponse | undefined;
|
|
26
|
+
meterUsage?: MeterUsageAttribution | undefined;
|
|
27
|
+
status?: DebugTrackerStatus | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const AttributedToCustomerResult$inboundSchema: z.ZodMiniType<
|
|
32
|
+
AttributedToCustomerResult,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.pipe(
|
|
35
|
+
z.object({
|
|
36
|
+
error: types.optional(ErrorResponse$inboundSchema),
|
|
37
|
+
meter_usage: types.optional(MeterUsageAttribution$inboundSchema),
|
|
38
|
+
status: types.optional(DebugTrackerStatus$inboundSchema),
|
|
39
|
+
}),
|
|
40
|
+
z.transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"meter_usage": "meterUsage",
|
|
43
|
+
});
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
export function attributedToCustomerResultFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<AttributedToCustomerResult, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => AttributedToCustomerResult$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'AttributedToCustomerResult' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 { Bucket, Bucket$inboundSchema } from "./bucket.js";
|
|
11
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type BucketSummary = {
|
|
14
|
+
baseCharge?: string | undefined;
|
|
15
|
+
bucketId?: string | undefined;
|
|
16
|
+
commitmentType?: string | undefined;
|
|
17
|
+
commitmentValue?: string | undefined;
|
|
18
|
+
computedOverage?: string | undefined;
|
|
19
|
+
computedTrueUp?: string | undefined;
|
|
20
|
+
computedUtilized?: string | undefined;
|
|
21
|
+
end?: Bucket | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* PriceID is the bucket's own price (the line item's price for the
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* out-of-bucket row).
|
|
27
|
+
*/
|
|
28
|
+
priceId?: string | undefined;
|
|
29
|
+
start?: Bucket | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* SubscriptionLineItemID is the line item this bucket is configured on.
|
|
32
|
+
*/
|
|
33
|
+
subscriptionLineItemId?: string | undefined;
|
|
34
|
+
totalUsage?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const BucketSummary$inboundSchema: z.ZodMiniType<
|
|
39
|
+
BucketSummary,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.pipe(
|
|
42
|
+
z.object({
|
|
43
|
+
base_charge: types.optional(types.string()),
|
|
44
|
+
bucket_id: types.optional(types.string()),
|
|
45
|
+
commitment_type: types.optional(types.string()),
|
|
46
|
+
commitment_value: types.optional(types.string()),
|
|
47
|
+
computed_overage: types.optional(types.string()),
|
|
48
|
+
computed_true_up: types.optional(types.string()),
|
|
49
|
+
computed_utilized: types.optional(types.string()),
|
|
50
|
+
end: types.optional(Bucket$inboundSchema),
|
|
51
|
+
price_id: types.optional(types.string()),
|
|
52
|
+
start: types.optional(Bucket$inboundSchema),
|
|
53
|
+
subscription_line_item_id: types.optional(types.string()),
|
|
54
|
+
total_usage: types.optional(types.string()),
|
|
55
|
+
}),
|
|
56
|
+
z.transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
"base_charge": "baseCharge",
|
|
59
|
+
"bucket_id": "bucketId",
|
|
60
|
+
"commitment_type": "commitmentType",
|
|
61
|
+
"commitment_value": "commitmentValue",
|
|
62
|
+
"computed_overage": "computedOverage",
|
|
63
|
+
"computed_true_up": "computedTrueUp",
|
|
64
|
+
"computed_utilized": "computedUtilized",
|
|
65
|
+
"price_id": "priceId",
|
|
66
|
+
"subscription_line_item_id": "subscriptionLineItemId",
|
|
67
|
+
"total_usage": "totalUsage",
|
|
68
|
+
});
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
export function bucketSummaryFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<BucketSummary, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => BucketSummary$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'BucketSummary' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
10
|
+
|
|
11
|
+
export type Bucket = {
|
|
12
|
+
hour?: number | undefined;
|
|
13
|
+
minute?: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const Bucket$inboundSchema: z.ZodMiniType<Bucket, unknown> = z.object({
|
|
18
|
+
hour: types.optional(types.number()),
|
|
19
|
+
minute: types.optional(types.number()),
|
|
20
|
+
});
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type Bucket$Outbound = {
|
|
23
|
+
hour?: number | undefined;
|
|
24
|
+
minute?: number | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const Bucket$outboundSchema: z.ZodMiniType<Bucket$Outbound, Bucket> = z
|
|
29
|
+
.object({
|
|
30
|
+
hour: z.optional(z.int()),
|
|
31
|
+
minute: z.optional(z.int()),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function bucketToJSON(bucket: Bucket): string {
|
|
35
|
+
return JSON.stringify(Bucket$outboundSchema.parse(bucket));
|
|
36
|
+
}
|
|
37
|
+
export function bucketFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<Bucket, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => Bucket$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'Bucket' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -18,6 +18,14 @@ import {
|
|
|
18
18
|
} from "./proration-behavior.js";
|
|
19
19
|
|
|
20
20
|
export type CancelSubscriptionRequest = {
|
|
21
|
+
/**
|
|
22
|
+
* CancelAt is the exact date/time when the subscription should be cancelled.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Required for cancellation_type "scheduled_date"; optional for "immediate" (past dates only — backdated cancellation).
|
|
26
|
+
* For "scheduled_date", accepts both future dates (deferred cancellation) and past dates (backdated cancellation).
|
|
27
|
+
* For "immediate", accepts past/current dates only; use "scheduled_date" for future dates.
|
|
28
|
+
*/
|
|
21
29
|
cancelAt?: Date | undefined;
|
|
22
30
|
cancelImmediatelyInovicePolicy?: CancelImmediatelyInvoicePolicy | undefined;
|
|
23
31
|
cancellationType: CancellationType;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import * as types from "../../types/primitives.js";
|
|
@@ -21,19 +22,31 @@ export type ChangedSubscription = {
|
|
|
21
22
|
* created | updated
|
|
22
23
|
*/
|
|
23
24
|
action?: ChangedSubscriptionAction | undefined;
|
|
25
|
+
currentPeriodEnd?: Date | undefined;
|
|
24
26
|
id?: string | undefined;
|
|
25
27
|
status?: SubscriptionStatus | undefined;
|
|
28
|
+
trialEnd?: Date | undefined;
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
/** @internal */
|
|
29
32
|
export const ChangedSubscription$inboundSchema: z.ZodMiniType<
|
|
30
33
|
ChangedSubscription,
|
|
31
34
|
unknown
|
|
32
|
-
> = z.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
> = z.pipe(
|
|
36
|
+
z.object({
|
|
37
|
+
action: types.optional(ChangedSubscriptionAction$inboundSchema),
|
|
38
|
+
current_period_end: types.optional(types.date()),
|
|
39
|
+
id: types.optional(types.string()),
|
|
40
|
+
status: types.optional(SubscriptionStatus$inboundSchema),
|
|
41
|
+
trial_end: types.optional(types.date()),
|
|
42
|
+
}),
|
|
43
|
+
z.transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"current_period_end": "currentPeriodEnd",
|
|
46
|
+
"trial_end": "trialEnd",
|
|
47
|
+
});
|
|
48
|
+
}),
|
|
49
|
+
);
|
|
37
50
|
|
|
38
51
|
export function changedSubscriptionFromJSON(
|
|
39
52
|
jsonString: string,
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { Bucket, Bucket$Outbound, Bucket$outboundSchema } from "./bucket.js";
|
|
8
|
+
import {
|
|
9
|
+
CommitmentType,
|
|
10
|
+
CommitmentType$outboundSchema,
|
|
11
|
+
} from "./commitment-type.js";
|
|
12
|
+
import {
|
|
13
|
+
CreatePriceRequest,
|
|
14
|
+
CreatePriceRequest$Outbound,
|
|
15
|
+
CreatePriceRequest$outboundSchema,
|
|
16
|
+
} from "./create-price-request.js";
|
|
17
|
+
|
|
18
|
+
export type CommitmentBucketRequest = {
|
|
19
|
+
commitmentType?: CommitmentType | undefined;
|
|
20
|
+
commitmentValue?: string | undefined;
|
|
21
|
+
end?: Bucket | undefined;
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
overageFactor?: string | undefined;
|
|
24
|
+
price?: CreatePriceRequest | undefined;
|
|
25
|
+
start?: Bucket | undefined;
|
|
26
|
+
trueUpEnabled?: boolean | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type CommitmentBucketRequest$Outbound = {
|
|
31
|
+
commitment_type?: string | undefined;
|
|
32
|
+
commitment_value?: string | undefined;
|
|
33
|
+
end?: Bucket$Outbound | undefined;
|
|
34
|
+
id?: string | undefined;
|
|
35
|
+
overage_factor?: string | undefined;
|
|
36
|
+
price?: CreatePriceRequest$Outbound | undefined;
|
|
37
|
+
start?: Bucket$Outbound | undefined;
|
|
38
|
+
true_up_enabled?: boolean | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const CommitmentBucketRequest$outboundSchema: z.ZodMiniType<
|
|
43
|
+
CommitmentBucketRequest$Outbound,
|
|
44
|
+
CommitmentBucketRequest
|
|
45
|
+
> = z.pipe(
|
|
46
|
+
z.object({
|
|
47
|
+
commitmentType: z.optional(CommitmentType$outboundSchema),
|
|
48
|
+
commitmentValue: z.optional(z.string()),
|
|
49
|
+
end: z.optional(Bucket$outboundSchema),
|
|
50
|
+
id: z.optional(z.string()),
|
|
51
|
+
overageFactor: z.optional(z.string()),
|
|
52
|
+
price: z.optional(CreatePriceRequest$outboundSchema),
|
|
53
|
+
start: z.optional(Bucket$outboundSchema),
|
|
54
|
+
trueUpEnabled: z.optional(z.boolean()),
|
|
55
|
+
}),
|
|
56
|
+
z.transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
commitmentType: "commitment_type",
|
|
59
|
+
commitmentValue: "commitment_value",
|
|
60
|
+
overageFactor: "overage_factor",
|
|
61
|
+
trueUpEnabled: "true_up_enabled",
|
|
62
|
+
});
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export function commitmentBucketRequestToJSON(
|
|
67
|
+
commitmentBucketRequest: CommitmentBucketRequest,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
CommitmentBucketRequest$outboundSchema.parse(commitmentBucketRequest),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -18,6 +18,7 @@ import { Status, Status$inboundSchema } from "./status.js";
|
|
|
18
18
|
export type CouponResponse = {
|
|
19
19
|
amountOff?: string | undefined;
|
|
20
20
|
cadence?: CouponCadence | undefined;
|
|
21
|
+
couponCode?: string | undefined;
|
|
21
22
|
createdAt?: Date | undefined;
|
|
22
23
|
createdBy?: string | undefined;
|
|
23
24
|
currency?: string | undefined;
|
|
@@ -47,6 +48,7 @@ export const CouponResponse$inboundSchema: z.ZodMiniType<
|
|
|
47
48
|
z.object({
|
|
48
49
|
amount_off: types.optional(types.string()),
|
|
49
50
|
cadence: types.optional(CouponCadence$inboundSchema),
|
|
51
|
+
coupon_code: types.optional(types.string()),
|
|
50
52
|
created_at: types.optional(types.date()),
|
|
51
53
|
created_by: types.optional(types.string()),
|
|
52
54
|
currency: types.optional(types.string()),
|
|
@@ -70,6 +72,7 @@ export const CouponResponse$inboundSchema: z.ZodMiniType<
|
|
|
70
72
|
z.transform((v) => {
|
|
71
73
|
return remap$(v, {
|
|
72
74
|
"amount_off": "amountOff",
|
|
75
|
+
"coupon_code": "couponCode",
|
|
73
76
|
"created_at": "createdAt",
|
|
74
77
|
"created_by": "createdBy",
|
|
75
78
|
"duration_in_periods": "durationInPeriods",
|
package/src/sdk/models/coupon.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { Status, Status$inboundSchema } from "./status.js";
|
|
|
18
18
|
export type Coupon = {
|
|
19
19
|
amountOff?: string | undefined;
|
|
20
20
|
cadence?: CouponCadence | undefined;
|
|
21
|
+
couponCode?: string | undefined;
|
|
21
22
|
createdAt?: Date | undefined;
|
|
22
23
|
createdBy?: string | undefined;
|
|
23
24
|
currency?: string | undefined;
|
|
@@ -44,6 +45,7 @@ export const Coupon$inboundSchema: z.ZodMiniType<Coupon, unknown> = z.pipe(
|
|
|
44
45
|
z.object({
|
|
45
46
|
amount_off: types.optional(types.string()),
|
|
46
47
|
cadence: types.optional(CouponCadence$inboundSchema),
|
|
48
|
+
coupon_code: types.optional(types.string()),
|
|
47
49
|
created_at: types.optional(types.date()),
|
|
48
50
|
created_by: types.optional(types.string()),
|
|
49
51
|
currency: types.optional(types.string()),
|
|
@@ -67,6 +69,7 @@ export const Coupon$inboundSchema: z.ZodMiniType<Coupon, unknown> = z.pipe(
|
|
|
67
69
|
z.transform((v) => {
|
|
68
70
|
return remap$(v, {
|
|
69
71
|
"amount_off": "amountOff",
|
|
72
|
+
"coupon_code": "couponCode",
|
|
70
73
|
"created_at": "createdAt",
|
|
71
74
|
"created_by": "createdBy",
|
|
72
75
|
"duration_in_periods": "durationInPeriods",
|
|
@@ -13,6 +13,7 @@ import { CouponType, CouponType$outboundSchema } from "./coupon-type.js";
|
|
|
13
13
|
export type CreateCouponRequest = {
|
|
14
14
|
amountOff?: string | undefined;
|
|
15
15
|
cadence: CouponCadence;
|
|
16
|
+
couponCode?: string | undefined;
|
|
16
17
|
currency?: string | undefined;
|
|
17
18
|
durationInPeriods?: number | undefined;
|
|
18
19
|
maxRedemptions?: number | undefined;
|
|
@@ -29,6 +30,7 @@ export type CreateCouponRequest = {
|
|
|
29
30
|
export type CreateCouponRequest$Outbound = {
|
|
30
31
|
amount_off?: string | undefined;
|
|
31
32
|
cadence: string;
|
|
33
|
+
coupon_code?: string | undefined;
|
|
32
34
|
currency?: string | undefined;
|
|
33
35
|
duration_in_periods?: number | undefined;
|
|
34
36
|
max_redemptions?: number | undefined;
|
|
@@ -49,6 +51,7 @@ export const CreateCouponRequest$outboundSchema: z.ZodMiniType<
|
|
|
49
51
|
z.object({
|
|
50
52
|
amountOff: z.optional(z.string()),
|
|
51
53
|
cadence: CouponCadence$outboundSchema,
|
|
54
|
+
couponCode: z.optional(z.string()),
|
|
52
55
|
currency: z.optional(z.string()),
|
|
53
56
|
durationInPeriods: z.optional(z.int()),
|
|
54
57
|
maxRedemptions: z.optional(z.int()),
|
|
@@ -63,6 +66,7 @@ export const CreateCouponRequest$outboundSchema: z.ZodMiniType<
|
|
|
63
66
|
z.transform((v) => {
|
|
64
67
|
return remap$(v, {
|
|
65
68
|
amountOff: "amount_off",
|
|
69
|
+
couponCode: "coupon_code",
|
|
66
70
|
durationInPeriods: "duration_in_periods",
|
|
67
71
|
maxRedemptions: "max_redemptions",
|
|
68
72
|
percentageOff: "percentage_off",
|