@flexprice/sdk 2.1.17 → 2.1.19
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/commitment-bucket-request.md +22 -0
- package/docs/sdk/models/coupon-filter.md +1 -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-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 +1 -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/execute-subscription-modify-request-request.md +1 -1
- package/docs/sdk/models/execute-subscription-modify-request.md +3 -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-coupon-by-code-request.md +17 -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/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/meter-usage-attribution.md +17 -0
- package/docs/sdk/models/preview-subscription-modify-request.md +1 -1
- package/docs/sdk/models/price-filter.md +1 -0
- package/docs/sdk/models/sub-modify-coupon-action.md +15 -0
- package/docs/sdk/models/sub-modify-coupon-params.md +23 -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/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-subscription-line-item.md +1 -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/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 +2 -1
- package/docs/sdk/models/update-user-response.md +1 -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 +1 -0
- package/docs/sdk/models/window-size.md +2 -2
- package/docs/sdks/couponassociations/README.md +150 -0
- package/docs/sdks/coupons/README.md +72 -0
- package/docs/sdks/integrations/README.md +80 -0
- package/docs/sdks/subscriptions/README.md +4 -4
- package/docs/sdks/users/README.md +150 -1
- 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/coupons-get-coupon-by-code.d.ts +17 -0
- package/esm/funcs/coupons-get-coupon-by-code.d.ts.map +1 -0
- package/esm/funcs/coupons-get-coupon-by-code.js +91 -0
- package/esm/funcs/coupons-get-coupon-by-code.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/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 +1 -1
- package/esm/funcs/users-update-user.js +1 -1
- 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/coupons.d.ts +7 -0
- package/esm/sdk/coupons.d.ts.map +1 -1
- package/esm/sdk/coupons.js +10 -0
- package/esm/sdk/coupons.js.map +1 -1
- package/esm/sdk/integrations.d.ts +7 -0
- package/esm/sdk/integrations.d.ts.map +1 -1
- package/esm/sdk/integrations.js +10 -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/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-filter.d.ts +2 -0
- package/esm/sdk/models/coupon-filter.d.ts.map +1 -1
- package/esm/sdk/models/coupon-filter.js +2 -0
- package/esm/sdk/models/coupon-filter.js.map +1 -1
- 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-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 +1 -0
- package/esm/sdk/models/create-user-response.d.ts.map +1 -1
- package/esm/sdk/models/create-user-response.js +1 -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/execute-subscription-modify-request.d.ts +6 -0
- package/esm/sdk/models/execute-subscription-modify-request.d.ts.map +1 -1
- package/esm/sdk/models/execute-subscription-modify-request.js +6 -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-coupon-by-code-op.d.ts +15 -0
- package/esm/sdk/models/get-coupon-by-code-op.d.ts.map +1 -0
- package/esm/sdk/models/get-coupon-by-code-op.js +12 -0
- package/esm/sdk/models/get-coupon-by-code-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 +21 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +21 -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/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/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/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/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 +43 -0
- package/esm/sdk/models/sub-modify-coupon-params.d.ts.map +1 -0
- package/esm/sdk/models/sub-modify-coupon-params.js +29 -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/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 +2 -0
- package/esm/sdk/models/subscription-modify-type.d.ts.map +1 -1
- package/esm/sdk/models/subscription-modify-type.js +2 -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-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/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/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 +2 -0
- package/esm/sdk/models/update-user-request.d.ts.map +1 -1
- package/esm/sdk/models/update-user-request.js +1 -0
- package/esm/sdk/models/update-user-request.js.map +1 -1
- package/esm/sdk/models/update-user-response.d.ts +1 -0
- package/esm/sdk/models/update-user-response.d.ts.map +1 -1
- package/esm/sdk/models/update-user-response.js +1 -0
- package/esm/sdk/models/update-user-response.js.map +1 -1
- 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 +1 -0
- package/esm/sdk/models/user-response.d.ts.map +1 -1
- package/esm/sdk/models/user-response.js +1 -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 +15 -1
- package/esm/sdk/users.d.ts.map +1 -1
- package/esm/sdk/users.js +21 -1
- package/esm/sdk/users.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/coupons-get-coupon-by-code.ts +181 -0
- package/src/funcs/integrations-delink-integration-mapping.ts +173 -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 +1 -1
- 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/coupons.ts +18 -0
- package/src/sdk/integrations.ts +18 -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/commitment-bucket-request.ts +72 -0
- package/src/sdk/models/coupon-filter.ts +4 -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-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 +2 -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/execute-subscription-modify-request.ts +18 -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-coupon-by-code-op.ts +33 -0
- package/src/sdk/models/get-usage-analytics-request.ts +12 -0
- package/src/sdk/models/index.ts +21 -0
- package/src/sdk/models/inheritance-action.ts +17 -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/meter-usage-attribution.ts +45 -0
- package/src/sdk/models/price-filter.ts +8 -0
- package/src/sdk/models/sub-modify-coupon-action.ts +17 -0
- package/src/sdk/models/sub-modify-coupon-params.ts +83 -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/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 +2 -0
- package/src/sdk/models/subscription-phase-create-request.ts +16 -2
- package/src/sdk/models/subscription-subscription-line-item.ts +9 -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/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 +3 -0
- package/src/sdk/models/update-user-response.ts +2 -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 +2 -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 +39 -1
- 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
|
@@ -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;
|
|
@@ -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
|
+
}
|
|
@@ -24,6 +24,7 @@ export const CouponFilterOrder = {
|
|
|
24
24
|
export type CouponFilterOrder = ClosedEnum<typeof CouponFilterOrder>;
|
|
25
25
|
|
|
26
26
|
export type CouponFilter = {
|
|
27
|
+
couponCodes?: Array<string> | undefined;
|
|
27
28
|
couponIds?: Array<string> | undefined;
|
|
28
29
|
expand?: string | undefined;
|
|
29
30
|
filters?: Array<FilterCondition> | undefined;
|
|
@@ -41,6 +42,7 @@ export const CouponFilterOrder$outboundSchema: z.ZodMiniEnum<
|
|
|
41
42
|
|
|
42
43
|
/** @internal */
|
|
43
44
|
export type CouponFilter$Outbound = {
|
|
45
|
+
coupon_codes?: Array<string> | undefined;
|
|
44
46
|
coupon_ids?: Array<string> | undefined;
|
|
45
47
|
expand?: string | undefined;
|
|
46
48
|
filters?: Array<FilterCondition$Outbound> | undefined;
|
|
@@ -57,6 +59,7 @@ export const CouponFilter$outboundSchema: z.ZodMiniType<
|
|
|
57
59
|
CouponFilter
|
|
58
60
|
> = z.pipe(
|
|
59
61
|
z.object({
|
|
62
|
+
couponCodes: z.optional(z.array(z.string())),
|
|
60
63
|
couponIds: z.optional(z.array(z.string())),
|
|
61
64
|
expand: z.optional(z.string()),
|
|
62
65
|
filters: z.optional(z.array(FilterCondition$outboundSchema)),
|
|
@@ -68,6 +71,7 @@ export const CouponFilter$outboundSchema: z.ZodMiniType<
|
|
|
68
71
|
}),
|
|
69
72
|
z.transform((v) => {
|
|
70
73
|
return remap$(v, {
|
|
74
|
+
couponCodes: "coupon_codes",
|
|
71
75
|
couponIds: "coupon_ids",
|
|
72
76
|
});
|
|
73
77
|
}),
|
|
@@ -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",
|
|
@@ -8,6 +8,11 @@ import {
|
|
|
8
8
|
BillingPeriod,
|
|
9
9
|
BillingPeriod$outboundSchema,
|
|
10
10
|
} from "./billing-period.js";
|
|
11
|
+
import {
|
|
12
|
+
CommitmentBucketRequest,
|
|
13
|
+
CommitmentBucketRequest$Outbound,
|
|
14
|
+
CommitmentBucketRequest$outboundSchema,
|
|
15
|
+
} from "./commitment-bucket-request.js";
|
|
11
16
|
import {
|
|
12
17
|
CommitmentType,
|
|
13
18
|
CommitmentType$outboundSchema,
|
|
@@ -30,6 +35,7 @@ export type CreateSubscriptionLineItemRequest = {
|
|
|
30
35
|
commitmentDuration?: BillingPeriod | undefined;
|
|
31
36
|
commitmentOverageFactor?: number | undefined;
|
|
32
37
|
commitmentQuantity?: number | undefined;
|
|
38
|
+
commitmentTimeBuckets?: Array<CommitmentBucketRequest> | undefined;
|
|
33
39
|
commitmentTrueUpEnabled?: boolean | undefined;
|
|
34
40
|
commitmentType?: CommitmentType | undefined;
|
|
35
41
|
commitmentWindowed?: boolean | undefined;
|
|
@@ -53,6 +59,7 @@ export type CreateSubscriptionLineItemRequest$Outbound = {
|
|
|
53
59
|
commitment_duration?: string | undefined;
|
|
54
60
|
commitment_overage_factor?: number | undefined;
|
|
55
61
|
commitment_quantity?: number | undefined;
|
|
62
|
+
commitment_time_buckets?: Array<CommitmentBucketRequest$Outbound> | undefined;
|
|
56
63
|
commitment_true_up_enabled?: boolean | undefined;
|
|
57
64
|
commitment_type?: string | undefined;
|
|
58
65
|
commitment_windowed?: boolean | undefined;
|
|
@@ -77,6 +84,9 @@ export const CreateSubscriptionLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
77
84
|
commitmentDuration: z.optional(BillingPeriod$outboundSchema),
|
|
78
85
|
commitmentOverageFactor: z.optional(z.number()),
|
|
79
86
|
commitmentQuantity: z.optional(z.number()),
|
|
87
|
+
commitmentTimeBuckets: z.optional(
|
|
88
|
+
z.array(CommitmentBucketRequest$outboundSchema),
|
|
89
|
+
),
|
|
80
90
|
commitmentTrueUpEnabled: z.optional(z.boolean()),
|
|
81
91
|
commitmentType: z.optional(CommitmentType$outboundSchema),
|
|
82
92
|
commitmentWindowed: z.optional(z.boolean()),
|
|
@@ -96,6 +106,7 @@ export const CreateSubscriptionLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
96
106
|
commitmentDuration: "commitment_duration",
|
|
97
107
|
commitmentOverageFactor: "commitment_overage_factor",
|
|
98
108
|
commitmentQuantity: "commitment_quantity",
|
|
109
|
+
commitmentTimeBuckets: "commitment_time_buckets",
|
|
99
110
|
commitmentTrueUpEnabled: "commitment_true_up_enabled",
|
|
100
111
|
commitmentType: "commitment_type",
|
|
101
112
|
commitmentWindowed: "commitment_windowed",
|
|
@@ -52,6 +52,11 @@ import {
|
|
|
52
52
|
ProrationBehavior,
|
|
53
53
|
ProrationBehavior$outboundSchema,
|
|
54
54
|
} from "./proration-behavior.js";
|
|
55
|
+
import {
|
|
56
|
+
SubscriptionCouponInput,
|
|
57
|
+
SubscriptionCouponInput$Outbound,
|
|
58
|
+
SubscriptionCouponInput$outboundSchema,
|
|
59
|
+
} from "./subscription-coupon-input.js";
|
|
55
60
|
import {
|
|
56
61
|
SubscriptionInheritanceConfig,
|
|
57
62
|
SubscriptionInheritanceConfig$Outbound,
|
|
@@ -105,6 +110,9 @@ export type CreateSubscriptionRequest = {
|
|
|
105
110
|
*/
|
|
106
111
|
commitmentAmount?: string | undefined;
|
|
107
112
|
commitmentDuration?: BillingPeriod | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Deprecated: use SubscriptionCoupons instead.
|
|
115
|
+
*/
|
|
108
116
|
coupons?: Array<string> | undefined;
|
|
109
117
|
/**
|
|
110
118
|
* Credit grants to be applied when subscription is created
|
|
@@ -143,6 +151,9 @@ export type CreateSubscriptionRequest = {
|
|
|
143
151
|
* LineItemCommitments allows setting commitment configuration per line item (keyed by price_id)
|
|
144
152
|
*/
|
|
145
153
|
lineItemCommitments?: { [k: string]: LineItemCommitmentConfig } | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* Deprecated: use SubscriptionCoupons instead.
|
|
156
|
+
*/
|
|
146
157
|
lineItemCoupons?: { [k: string]: Array<string> } | undefined;
|
|
147
158
|
/**
|
|
148
159
|
* LineItems are extra line items to add at creation (each with price_id or price), in addition to plan prices
|
|
@@ -171,6 +182,13 @@ export type CreateSubscriptionRequest = {
|
|
|
171
182
|
planId: string;
|
|
172
183
|
prorationBehavior?: ProrationBehavior | undefined;
|
|
173
184
|
startDate?: Date | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* SubscriptionCoupons is the preferred way to attach coupons at creation.
|
|
187
|
+
*
|
|
188
|
+
* @remarks
|
|
189
|
+
* Accepts coupon_code; optionally targets a line item via price_id.
|
|
190
|
+
*/
|
|
191
|
+
subscriptionCoupons?: Array<SubscriptionCouponInput> | undefined;
|
|
174
192
|
subscriptionStatus?: SubscriptionStatus | undefined;
|
|
175
193
|
/**
|
|
176
194
|
* tax_rate_overrides is the tax rate overrides to be applied to the subscription
|
|
@@ -224,6 +242,7 @@ export type CreateSubscriptionRequest$Outbound = {
|
|
|
224
242
|
plan_id: string;
|
|
225
243
|
proration_behavior?: string | undefined;
|
|
226
244
|
start_date?: string | undefined;
|
|
245
|
+
subscription_coupons?: Array<SubscriptionCouponInput$Outbound> | undefined;
|
|
227
246
|
subscription_status?: string | undefined;
|
|
228
247
|
tax_rate_overrides?: Array<TaxRateOverride$Outbound> | undefined;
|
|
229
248
|
trial_period_days?: number | undefined;
|
|
@@ -278,6 +297,9 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType<
|
|
|
278
297
|
planId: z.string(),
|
|
279
298
|
prorationBehavior: z.optional(ProrationBehavior$outboundSchema),
|
|
280
299
|
startDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
300
|
+
subscriptionCoupons: z.optional(
|
|
301
|
+
z.array(SubscriptionCouponInput$outboundSchema),
|
|
302
|
+
),
|
|
281
303
|
subscriptionStatus: z.optional(SubscriptionStatus$outboundSchema),
|
|
282
304
|
taxRateOverrides: z.optional(z.array(TaxRateOverride$outboundSchema)),
|
|
283
305
|
trialPeriodDays: z.optional(z.int()),
|
|
@@ -311,6 +333,7 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType<
|
|
|
311
333
|
planId: "plan_id",
|
|
312
334
|
prorationBehavior: "proration_behavior",
|
|
313
335
|
startDate: "start_date",
|
|
336
|
+
subscriptionCoupons: "subscription_coupons",
|
|
314
337
|
subscriptionStatus: "subscription_status",
|
|
315
338
|
taxRateOverrides: "tax_rate_overrides",
|
|
316
339
|
trialPeriodDays: "trial_period_days",
|
|
@@ -12,11 +12,19 @@ import {
|
|
|
12
12
|
export type CreateTaxAssociationRequest = {
|
|
13
13
|
autoApply?: boolean | undefined;
|
|
14
14
|
currency?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* EndDate sets when this association expires. Must be after StartDate when both are provided.
|
|
17
|
+
*/
|
|
18
|
+
endDate?: Date | undefined;
|
|
15
19
|
entityId?: string | undefined;
|
|
16
20
|
entityType?: TaxRateEntityType | undefined;
|
|
17
21
|
externalCustomerId?: string | undefined;
|
|
18
22
|
metadata?: { [k: string]: string } | undefined;
|
|
19
23
|
priority?: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* StartDate sets when this association becomes active. Defaults to now if omitted.
|
|
26
|
+
*/
|
|
27
|
+
startDate?: Date | undefined;
|
|
20
28
|
taxRateCode: string;
|
|
21
29
|
};
|
|
22
30
|
|
|
@@ -24,11 +32,13 @@ export type CreateTaxAssociationRequest = {
|
|
|
24
32
|
export type CreateTaxAssociationRequest$Outbound = {
|
|
25
33
|
auto_apply?: boolean | undefined;
|
|
26
34
|
currency?: string | undefined;
|
|
35
|
+
end_date?: string | undefined;
|
|
27
36
|
entity_id?: string | undefined;
|
|
28
37
|
entity_type?: string | undefined;
|
|
29
38
|
external_customer_id?: string | undefined;
|
|
30
39
|
metadata?: { [k: string]: string } | undefined;
|
|
31
40
|
priority?: number | undefined;
|
|
41
|
+
start_date?: string | undefined;
|
|
32
42
|
tax_rate_code: string;
|
|
33
43
|
};
|
|
34
44
|
|
|
@@ -40,19 +50,23 @@ export const CreateTaxAssociationRequest$outboundSchema: z.ZodMiniType<
|
|
|
40
50
|
z.object({
|
|
41
51
|
autoApply: z.optional(z.boolean()),
|
|
42
52
|
currency: z.optional(z.string()),
|
|
53
|
+
endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
43
54
|
entityId: z.optional(z.string()),
|
|
44
55
|
entityType: z.optional(TaxRateEntityType$outboundSchema),
|
|
45
56
|
externalCustomerId: z.optional(z.string()),
|
|
46
57
|
metadata: z.optional(z.record(z.string(), z.string())),
|
|
47
58
|
priority: z.optional(z.int()),
|
|
59
|
+
startDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
48
60
|
taxRateCode: z.string(),
|
|
49
61
|
}),
|
|
50
62
|
z.transform((v) => {
|
|
51
63
|
return remap$(v, {
|
|
52
64
|
autoApply: "auto_apply",
|
|
65
|
+
endDate: "end_date",
|
|
53
66
|
entityId: "entity_id",
|
|
54
67
|
entityType: "entity_type",
|
|
55
68
|
externalCustomerId: "external_customer_id",
|
|
69
|
+
startDate: "start_date",
|
|
56
70
|
taxRateCode: "tax_rate_code",
|
|
57
71
|
});
|
|
58
72
|
}),
|
|
@@ -10,6 +10,10 @@ export type CreateUserRequest = {
|
|
|
10
10
|
* Required when type is "user"
|
|
11
11
|
*/
|
|
12
12
|
email?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Display name; optional for service accounts
|
|
15
|
+
*/
|
|
16
|
+
name?: string | undefined;
|
|
13
17
|
/**
|
|
14
18
|
* Required when type is "service_account"
|
|
15
19
|
*/
|
|
@@ -20,6 +24,7 @@ export type CreateUserRequest = {
|
|
|
20
24
|
/** @internal */
|
|
21
25
|
export type CreateUserRequest$Outbound = {
|
|
22
26
|
email?: string | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
23
28
|
roles?: Array<string> | undefined;
|
|
24
29
|
type: string;
|
|
25
30
|
};
|
|
@@ -30,6 +35,7 @@ export const CreateUserRequest$outboundSchema: z.ZodMiniType<
|
|
|
30
35
|
CreateUserRequest
|
|
31
36
|
> = z.object({
|
|
32
37
|
email: z.optional(z.string()),
|
|
38
|
+
name: z.optional(z.string()),
|
|
33
39
|
roles: z.optional(z.array(z.string())),
|
|
34
40
|
type: UserType$outboundSchema,
|
|
35
41
|
});
|
|
@@ -20,6 +20,7 @@ export type CreateUserResponse = {
|
|
|
20
20
|
email?: string | undefined;
|
|
21
21
|
id?: string | undefined;
|
|
22
22
|
metadata?: { [k: string]: string } | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
23
24
|
password?: string | undefined;
|
|
24
25
|
roles?: Array<string> | undefined;
|
|
25
26
|
tenant?: TenantResponse | undefined;
|
|
@@ -34,6 +35,7 @@ export const CreateUserResponse$inboundSchema: z.ZodMiniType<
|
|
|
34
35
|
email: types.optional(types.string()),
|
|
35
36
|
id: types.optional(types.string()),
|
|
36
37
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
38
|
+
name: types.optional(types.string()),
|
|
37
39
|
password: types.optional(types.string()),
|
|
38
40
|
roles: types.optional(z.array(types.string())),
|
|
39
41
|
tenant: types.optional(TenantResponse$inboundSchema),
|
|
@@ -7,6 +7,10 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
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
|
+
import {
|
|
11
|
+
AttributedToCustomerResult,
|
|
12
|
+
AttributedToCustomerResult$inboundSchema,
|
|
13
|
+
} from "./attributed-to-customer-result.js";
|
|
10
14
|
import {
|
|
11
15
|
CustomerLookupResult,
|
|
12
16
|
CustomerLookupResult$inboundSchema,
|
|
@@ -27,6 +31,7 @@ import {
|
|
|
27
31
|
} from "./subscription-line-item-lookup-result.js";
|
|
28
32
|
|
|
29
33
|
export type DebugTracker = {
|
|
34
|
+
attributedToCustomer?: AttributedToCustomerResult | undefined;
|
|
30
35
|
customerLookup?: CustomerLookupResult | undefined;
|
|
31
36
|
failurePoint?: FailurePoint | undefined;
|
|
32
37
|
meterMatching?: MeterMatchingResult | undefined;
|
|
@@ -38,6 +43,9 @@ export type DebugTracker = {
|
|
|
38
43
|
export const DebugTracker$inboundSchema: z.ZodMiniType<DebugTracker, unknown> =
|
|
39
44
|
z.pipe(
|
|
40
45
|
z.object({
|
|
46
|
+
attributed_to_customer: types.optional(
|
|
47
|
+
AttributedToCustomerResult$inboundSchema,
|
|
48
|
+
),
|
|
41
49
|
customer_lookup: types.optional(CustomerLookupResult$inboundSchema),
|
|
42
50
|
failure_point: types.optional(FailurePoint$inboundSchema),
|
|
43
51
|
meter_matching: types.optional(MeterMatchingResult$inboundSchema),
|
|
@@ -48,6 +56,7 @@ export const DebugTracker$inboundSchema: z.ZodMiniType<DebugTracker, unknown> =
|
|
|
48
56
|
}),
|
|
49
57
|
z.transform((v) => {
|
|
50
58
|
return remap$(v, {
|
|
59
|
+
"attributed_to_customer": "attributedToCustomer",
|
|
51
60
|
"customer_lookup": "customerLookup",
|
|
52
61
|
"failure_point": "failurePoint",
|
|
53
62
|
"meter_matching": "meterMatching",
|
|
@@ -0,0 +1,35 @@
|
|
|
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 DeleteServiceAccountRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Service Account ID
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type DeleteServiceAccountRequest$Outbound = {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const DeleteServiceAccountRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
+
DeleteServiceAccountRequest$Outbound,
|
|
22
|
+
DeleteServiceAccountRequest
|
|
23
|
+
> = z.object({
|
|
24
|
+
id: z.string(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function deleteServiceAccountRequestToJSON(
|
|
28
|
+
deleteServiceAccountRequest: DeleteServiceAccountRequest,
|
|
29
|
+
): string {
|
|
30
|
+
return JSON.stringify(
|
|
31
|
+
DeleteServiceAccountRequest$outboundSchema.parse(
|
|
32
|
+
deleteServiceAccountRequest,
|
|
33
|
+
),
|
|
34
|
+
);
|
|
35
|
+
}
|