@flexprice/sdk 2.1.17 → 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/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-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-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 +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/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/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/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/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-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-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 +20 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +20 -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 +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/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/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/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-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-usage-analytics-request.ts +12 -0
- package/src/sdk/models/index.ts +20 -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 +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/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
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
SubModifyCouponParams,
|
|
9
|
+
SubModifyCouponParams$Outbound,
|
|
10
|
+
SubModifyCouponParams$outboundSchema,
|
|
11
|
+
} from "./sub-modify-coupon-params.js";
|
|
7
12
|
import {
|
|
8
13
|
SubModifyGroupedInvoicingParams,
|
|
9
14
|
SubModifyGroupedInvoicingParams$Outbound,
|
|
@@ -19,6 +24,11 @@ import {
|
|
|
19
24
|
SubModifyQuantityChangeRequest$Outbound,
|
|
20
25
|
SubModifyQuantityChangeRequest$outboundSchema,
|
|
21
26
|
} from "./sub-modify-quantity-change-request.js";
|
|
27
|
+
import {
|
|
28
|
+
SubModifyTaxParams,
|
|
29
|
+
SubModifyTaxParams$Outbound,
|
|
30
|
+
SubModifyTaxParams$outboundSchema,
|
|
31
|
+
} from "./sub-modify-tax-params.js";
|
|
22
32
|
import {
|
|
23
33
|
SubModifyTrialEndRequest,
|
|
24
34
|
SubModifyTrialEndRequest$Outbound,
|
|
@@ -30,20 +40,24 @@ import {
|
|
|
30
40
|
} from "./subscription-modify-type.js";
|
|
31
41
|
|
|
32
42
|
export type ExecuteSubscriptionModifyRequest = {
|
|
43
|
+
couponParams?: SubModifyCouponParams | undefined;
|
|
33
44
|
groupedInvoicingParams?: SubModifyGroupedInvoicingParams | undefined;
|
|
34
45
|
inheritanceParams?: SubModifyInheritanceRequest | undefined;
|
|
35
46
|
quantityChangeParams?: SubModifyQuantityChangeRequest | undefined;
|
|
47
|
+
taxParams?: SubModifyTaxParams | undefined;
|
|
36
48
|
trialEndParams?: SubModifyTrialEndRequest | undefined;
|
|
37
49
|
type: SubscriptionModifyType;
|
|
38
50
|
};
|
|
39
51
|
|
|
40
52
|
/** @internal */
|
|
41
53
|
export type ExecuteSubscriptionModifyRequest$Outbound = {
|
|
54
|
+
coupon_params?: SubModifyCouponParams$Outbound | undefined;
|
|
42
55
|
grouped_invoicing_params?:
|
|
43
56
|
| SubModifyGroupedInvoicingParams$Outbound
|
|
44
57
|
| undefined;
|
|
45
58
|
inheritance_params?: SubModifyInheritanceRequest$Outbound | undefined;
|
|
46
59
|
quantity_change_params?: SubModifyQuantityChangeRequest$Outbound | undefined;
|
|
60
|
+
tax_params?: SubModifyTaxParams$Outbound | undefined;
|
|
47
61
|
trial_end_params?: SubModifyTrialEndRequest$Outbound | undefined;
|
|
48
62
|
type: string;
|
|
49
63
|
};
|
|
@@ -54,6 +68,7 @@ export const ExecuteSubscriptionModifyRequest$outboundSchema: z.ZodMiniType<
|
|
|
54
68
|
ExecuteSubscriptionModifyRequest
|
|
55
69
|
> = z.pipe(
|
|
56
70
|
z.object({
|
|
71
|
+
couponParams: z.optional(SubModifyCouponParams$outboundSchema),
|
|
57
72
|
groupedInvoicingParams: z.optional(
|
|
58
73
|
SubModifyGroupedInvoicingParams$outboundSchema,
|
|
59
74
|
),
|
|
@@ -61,14 +76,17 @@ export const ExecuteSubscriptionModifyRequest$outboundSchema: z.ZodMiniType<
|
|
|
61
76
|
quantityChangeParams: z.optional(
|
|
62
77
|
SubModifyQuantityChangeRequest$outboundSchema,
|
|
63
78
|
),
|
|
79
|
+
taxParams: z.optional(SubModifyTaxParams$outboundSchema),
|
|
64
80
|
trialEndParams: z.optional(SubModifyTrialEndRequest$outboundSchema),
|
|
65
81
|
type: SubscriptionModifyType$outboundSchema,
|
|
66
82
|
}),
|
|
67
83
|
z.transform((v) => {
|
|
68
84
|
return remap$(v, {
|
|
85
|
+
couponParams: "coupon_params",
|
|
69
86
|
groupedInvoicingParams: "grouped_invoicing_params",
|
|
70
87
|
inheritanceParams: "inheritance_params",
|
|
71
88
|
quantityChangeParams: "quantity_change_params",
|
|
89
|
+
taxParams: "tax_params",
|
|
72
90
|
trialEndParams: "trial_end_params",
|
|
73
91
|
});
|
|
74
92
|
}),
|
|
@@ -11,6 +11,7 @@ export const FailurePointType = {
|
|
|
11
11
|
MeterLookup: "meter_lookup",
|
|
12
12
|
PriceLookup: "price_lookup",
|
|
13
13
|
SubscriptionLineItemLookup: "subscription_line_item_lookup",
|
|
14
|
+
AttributedToCustomer: "attributed_to_customer",
|
|
14
15
|
} as const;
|
|
15
16
|
export type FailurePointType = OpenEnum<typeof FailurePointType>;
|
|
16
17
|
|
|
@@ -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 GetCouponAssociationRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Coupon Association ID
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type GetCouponAssociationRequest$Outbound = {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const GetCouponAssociationRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
+
GetCouponAssociationRequest$Outbound,
|
|
22
|
+
GetCouponAssociationRequest
|
|
23
|
+
> = z.object({
|
|
24
|
+
id: z.string(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function getCouponAssociationRequestToJSON(
|
|
28
|
+
getCouponAssociationRequest: GetCouponAssociationRequest,
|
|
29
|
+
): string {
|
|
30
|
+
return JSON.stringify(
|
|
31
|
+
GetCouponAssociationRequest$outboundSchema.parse(
|
|
32
|
+
getCouponAssociationRequest,
|
|
33
|
+
),
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -7,6 +7,15 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { WindowSize, WindowSize$outboundSchema } from "./window-size.js";
|
|
8
8
|
|
|
9
9
|
export type GetUsageAnalyticsRequest = {
|
|
10
|
+
/**
|
|
11
|
+
* BreakdownBucket when true augments each time-series point with BucketID/PriceID
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* and appends a BucketSummaries rollup to each item. Requires WindowSize to be set
|
|
15
|
+
* and the item to be linked to a subscription line item that has CommitmentTimeBuckets.
|
|
16
|
+
* Default: false (opt-in, backward compatible).
|
|
17
|
+
*/
|
|
18
|
+
breakdownBucket?: boolean | undefined;
|
|
10
19
|
endTime?: Date | undefined;
|
|
11
20
|
/**
|
|
12
21
|
* allowed values: "price", "meter", "feature", "subscription_line_item","plan","addon"
|
|
@@ -42,6 +51,7 @@ export type GetUsageAnalyticsRequest = {
|
|
|
42
51
|
|
|
43
52
|
/** @internal */
|
|
44
53
|
export type GetUsageAnalyticsRequest$Outbound = {
|
|
54
|
+
breakdown_bucket?: boolean | undefined;
|
|
45
55
|
end_time?: string | undefined;
|
|
46
56
|
expand?: Array<string> | undefined;
|
|
47
57
|
external_customer_id?: string | undefined;
|
|
@@ -60,6 +70,7 @@ export const GetUsageAnalyticsRequest$outboundSchema: z.ZodMiniType<
|
|
|
60
70
|
GetUsageAnalyticsRequest
|
|
61
71
|
> = z.pipe(
|
|
62
72
|
z.object({
|
|
73
|
+
breakdownBucket: z.optional(z.boolean()),
|
|
63
74
|
endTime: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
64
75
|
expand: z.optional(z.array(z.string())),
|
|
65
76
|
externalCustomerId: z.optional(z.string()),
|
|
@@ -73,6 +84,7 @@ export const GetUsageAnalyticsRequest$outboundSchema: z.ZodMiniType<
|
|
|
73
84
|
}),
|
|
74
85
|
z.transform((v) => {
|
|
75
86
|
return remap$(v, {
|
|
87
|
+
breakdownBucket: "breakdown_bucket",
|
|
76
88
|
endTime: "end_time",
|
|
77
89
|
externalCustomerId: "external_customer_id",
|
|
78
90
|
featureIds: "feature_ids",
|
package/src/sdk/models/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from "./alert-threshold.js";
|
|
|
28
28
|
export * from "./alert-type.js";
|
|
29
29
|
export * from "./application-status.js";
|
|
30
30
|
export * from "./attempt-invoice-payment-op.js";
|
|
31
|
+
export * from "./attributed-to-customer-result.js";
|
|
31
32
|
export * from "./auto-topup.js";
|
|
32
33
|
export * from "./billing-cadence.js";
|
|
33
34
|
export * from "./billing-cycle-info.js";
|
|
@@ -36,6 +37,8 @@ export * from "./billing-model.js";
|
|
|
36
37
|
export * from "./billing-period-info.js";
|
|
37
38
|
export * from "./billing-period.js";
|
|
38
39
|
export * from "./billing-tier.js";
|
|
40
|
+
export * from "./bucket-summary.js";
|
|
41
|
+
export * from "./bucket.js";
|
|
39
42
|
export * from "./bulk-ingest-event-request.js";
|
|
40
43
|
export * from "./cancel-immediately-invoice-policy.js";
|
|
41
44
|
export * from "./cancel-schedule-request.js";
|
|
@@ -60,6 +63,7 @@ export * from "./clone-feature-request.js";
|
|
|
60
63
|
export * from "./clone-plan-op.js";
|
|
61
64
|
export * from "./clone-plan-request.js";
|
|
62
65
|
export * from "./collection-method.js";
|
|
66
|
+
export * from "./commitment-bucket-request.js";
|
|
63
67
|
export * from "./commitment-info.js";
|
|
64
68
|
export * from "./commitment-type.js";
|
|
65
69
|
export * from "./cost-analytic-item.js";
|
|
@@ -154,10 +158,12 @@ export * from "./delete-price-op.js";
|
|
|
154
158
|
export * from "./delete-price-request.js";
|
|
155
159
|
export * from "./delete-price-unit-op.js";
|
|
156
160
|
export * from "./delete-scheduled-task-op.js";
|
|
161
|
+
export * from "./delete-service-account-op.js";
|
|
157
162
|
export * from "./delete-subscription-line-item-op.js";
|
|
158
163
|
export * from "./delete-subscription-line-item-request.js";
|
|
159
164
|
export * from "./delete-tax-association-op.js";
|
|
160
165
|
export * from "./delete-tax-rate-op.js";
|
|
166
|
+
export * from "./delink-integration-mapping-request.js";
|
|
161
167
|
export * from "./download-task-export-op.js";
|
|
162
168
|
export * from "./entitlement-entity-type.js";
|
|
163
169
|
export * from "./entitlement-filter.js";
|
|
@@ -199,6 +205,7 @@ export * from "./get-addon-op.js";
|
|
|
199
205
|
export * from "./get-cost-analytics-request.js";
|
|
200
206
|
export * from "./get-costsheet-op.js";
|
|
201
207
|
export * from "./get-costsheet-response.js";
|
|
208
|
+
export * from "./get-coupon-association-op.js";
|
|
202
209
|
export * from "./get-coupon-op.js";
|
|
203
210
|
export * from "./get-credit-grant-op.js";
|
|
204
211
|
export * from "./get-credit-note-op.js";
|
|
@@ -262,6 +269,7 @@ export * from "./group-response.js";
|
|
|
262
269
|
export * from "./grouped-invoicing-action.js";
|
|
263
270
|
export * from "./http-client-errors.js";
|
|
264
271
|
export * from "./ingest-event-request.js";
|
|
272
|
+
export * from "./inheritance-action.js";
|
|
265
273
|
export * from "./integration-config-entry.js";
|
|
266
274
|
export * from "./integration-config-response.js";
|
|
267
275
|
export * from "./integration-entity-type.js";
|
|
@@ -286,6 +294,8 @@ export * from "./list-alert-logs-response.js";
|
|
|
286
294
|
export * from "./list-all-subscription-schedules-op.js";
|
|
287
295
|
export * from "./list-api-keys-op.js";
|
|
288
296
|
export * from "./list-costsheet-response.js";
|
|
297
|
+
export * from "./list-coupon-associations-op.js";
|
|
298
|
+
export * from "./list-coupon-associations-response.js";
|
|
289
299
|
export * from "./list-coupons-response.js";
|
|
290
300
|
export * from "./list-credit-grant-applications-response.js";
|
|
291
301
|
export * from "./list-credit-grants-response.js";
|
|
@@ -323,6 +333,7 @@ export * from "./meter-filter.js";
|
|
|
323
333
|
export * from "./meter-matching-result.js";
|
|
324
334
|
export * from "./meter-meter.js";
|
|
325
335
|
export * from "./meter-response.js";
|
|
336
|
+
export * from "./meter-usage-attribution.js";
|
|
326
337
|
export * from "./models-temporal-workflow-result.js";
|
|
327
338
|
export * from "./override-entitlement-request.js";
|
|
328
339
|
export * from "./override-line-item-request.js";
|
|
@@ -391,14 +402,19 @@ export * from "./sort-condition.js";
|
|
|
391
402
|
export * from "./sort-direction.js";
|
|
392
403
|
export * from "./source-usage-item.js";
|
|
393
404
|
export * from "./status.js";
|
|
405
|
+
export * from "./sub-modify-coupon-action.js";
|
|
406
|
+
export * from "./sub-modify-coupon-params.js";
|
|
394
407
|
export * from "./sub-modify-grouped-invoicing-params.js";
|
|
395
408
|
export * from "./sub-modify-inheritance-request.js";
|
|
396
409
|
export * from "./sub-modify-quantity-change-request.js";
|
|
410
|
+
export * from "./sub-modify-tax-action.js";
|
|
411
|
+
export * from "./sub-modify-tax-params.js";
|
|
397
412
|
export * from "./sub-modify-trial-end-request.js";
|
|
398
413
|
export * from "./subscription-change-execute-response.js";
|
|
399
414
|
export * from "./subscription-change-preview-response.js";
|
|
400
415
|
export * from "./subscription-change-request.js";
|
|
401
416
|
export * from "./subscription-change-type.js";
|
|
417
|
+
export * from "./subscription-coupon-input.js";
|
|
402
418
|
export * from "./subscription-entitlements-response.js";
|
|
403
419
|
export * from "./subscription-filter.js";
|
|
404
420
|
export * from "./subscription-inheritance-config.js";
|
|
@@ -440,6 +456,7 @@ export * from "./tenant-billing-details.js";
|
|
|
440
456
|
export * from "./tenant-billing-usage.js";
|
|
441
457
|
export * from "./tenant-response.js";
|
|
442
458
|
export * from "./terminate-wallet-op.js";
|
|
459
|
+
export * from "./time-of-day-bucket.js";
|
|
443
460
|
export * from "./time-range-filter.js";
|
|
444
461
|
export * from "./top-up-wallet-op.js";
|
|
445
462
|
export * from "./top-up-wallet-request.js";
|
|
@@ -481,6 +498,9 @@ export * from "./update-price-unit-op.js";
|
|
|
481
498
|
export * from "./update-price-unit-request.js";
|
|
482
499
|
export * from "./update-scheduled-task-op.js";
|
|
483
500
|
export * from "./update-scheduled-task-request.js";
|
|
501
|
+
export * from "./update-service-account-op.js";
|
|
502
|
+
export * from "./update-service-account-request.js";
|
|
503
|
+
export * from "./update-service-account-response.js";
|
|
484
504
|
export * from "./update-subscription-line-item-op.js";
|
|
485
505
|
export * from "./update-subscription-line-item-request.js";
|
|
486
506
|
export * from "./update-subscription-op.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const InheritanceAction = {
|
|
9
|
+
Add: "add",
|
|
10
|
+
Remove: "remove",
|
|
11
|
+
} as const;
|
|
12
|
+
export type InheritanceAction = ClosedEnum<typeof InheritanceAction>;
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const InheritanceAction$outboundSchema: z.ZodMiniEnum<
|
|
16
|
+
typeof InheritanceAction
|
|
17
|
+
> = z.enum(InheritanceAction);
|
|
@@ -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,
|
|
@@ -23,6 +28,15 @@ export type LineItemCommitmentConfig = {
|
|
|
23
28
|
* CommitmentQuantity is the minimum quantity committed for this line item
|
|
24
29
|
*/
|
|
25
30
|
commitmentQuantity?: number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* CommitmentTimeBuckets defines per-bucket commitment + inline price for
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* windows whose start UTC hour falls within each configured bucket. Each
|
|
36
|
+
* bucket carries its own price (materialized by the service). Requires
|
|
37
|
+
* IsWindowCommitment=true.
|
|
38
|
+
*/
|
|
39
|
+
commitmentTimeBuckets?: Array<CommitmentBucketRequest> | undefined;
|
|
26
40
|
commitmentType?: CommitmentType | undefined;
|
|
27
41
|
/**
|
|
28
42
|
* EnableTrueUp determines if true-up fee should be applied when usage is below commitment
|
|
@@ -43,6 +57,7 @@ export type LineItemCommitmentConfig$Outbound = {
|
|
|
43
57
|
commitment_amount?: number | undefined;
|
|
44
58
|
commitment_duration?: string | undefined;
|
|
45
59
|
commitment_quantity?: number | undefined;
|
|
60
|
+
commitment_time_buckets?: Array<CommitmentBucketRequest$Outbound> | undefined;
|
|
46
61
|
commitment_type?: string | undefined;
|
|
47
62
|
enable_true_up?: boolean | undefined;
|
|
48
63
|
is_window_commitment?: boolean | undefined;
|
|
@@ -58,6 +73,9 @@ export const LineItemCommitmentConfig$outboundSchema: z.ZodMiniType<
|
|
|
58
73
|
commitmentAmount: z.optional(z.number()),
|
|
59
74
|
commitmentDuration: z.optional(BillingPeriod$outboundSchema),
|
|
60
75
|
commitmentQuantity: z.optional(z.number()),
|
|
76
|
+
commitmentTimeBuckets: z.optional(
|
|
77
|
+
z.array(CommitmentBucketRequest$outboundSchema),
|
|
78
|
+
),
|
|
61
79
|
commitmentType: z.optional(CommitmentType$outboundSchema),
|
|
62
80
|
enableTrueUp: z.optional(z.boolean()),
|
|
63
81
|
isWindowCommitment: z.optional(z.boolean()),
|
|
@@ -68,6 +86,7 @@ export const LineItemCommitmentConfig$outboundSchema: z.ZodMiniType<
|
|
|
68
86
|
commitmentAmount: "commitment_amount",
|
|
69
87
|
commitmentDuration: "commitment_duration",
|
|
70
88
|
commitmentQuantity: "commitment_quantity",
|
|
89
|
+
commitmentTimeBuckets: "commitment_time_buckets",
|
|
71
90
|
commitmentType: "commitment_type",
|
|
72
91
|
enableTrueUp: "enable_true_up",
|
|
73
92
|
isWindowCommitment: "is_window_commitment",
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
|
|
8
|
+
export type ListCouponAssociationsRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* Filter by subscription IDs (max 100)
|
|
11
|
+
*/
|
|
12
|
+
subscriptionIds?: Array<string> | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Filter by coupon IDs (max 100)
|
|
15
|
+
*/
|
|
16
|
+
couponIds?: Array<string> | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Return only currently active associations
|
|
19
|
+
*/
|
|
20
|
+
activeOnly?: boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Page size
|
|
23
|
+
*/
|
|
24
|
+
limit?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Page offset
|
|
27
|
+
*/
|
|
28
|
+
offset?: number | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type ListCouponAssociationsRequest$Outbound = {
|
|
33
|
+
subscription_ids?: Array<string> | undefined;
|
|
34
|
+
coupon_ids?: Array<string> | undefined;
|
|
35
|
+
active_only?: boolean | undefined;
|
|
36
|
+
limit?: number | undefined;
|
|
37
|
+
offset?: number | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ListCouponAssociationsRequest$outboundSchema: z.ZodMiniType<
|
|
42
|
+
ListCouponAssociationsRequest$Outbound,
|
|
43
|
+
ListCouponAssociationsRequest
|
|
44
|
+
> = z.pipe(
|
|
45
|
+
z.object({
|
|
46
|
+
subscriptionIds: z.optional(z.array(z.string())),
|
|
47
|
+
couponIds: z.optional(z.array(z.string())),
|
|
48
|
+
activeOnly: z.optional(z.boolean()),
|
|
49
|
+
limit: z.optional(z.int()),
|
|
50
|
+
offset: z.optional(z.int()),
|
|
51
|
+
}),
|
|
52
|
+
z.transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
subscriptionIds: "subscription_ids",
|
|
55
|
+
couponIds: "coupon_ids",
|
|
56
|
+
activeOnly: "active_only",
|
|
57
|
+
});
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
export function listCouponAssociationsRequestToJSON(
|
|
62
|
+
listCouponAssociationsRequest: ListCouponAssociationsRequest,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
ListCouponAssociationsRequest$outboundSchema.parse(
|
|
66
|
+
listCouponAssociationsRequest,
|
|
67
|
+
),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 {
|
|
10
|
+
CouponAssociationResponse,
|
|
11
|
+
CouponAssociationResponse$inboundSchema,
|
|
12
|
+
} from "./coupon-association-response.js";
|
|
13
|
+
import {
|
|
14
|
+
PaginationResponse,
|
|
15
|
+
PaginationResponse$inboundSchema,
|
|
16
|
+
} from "./pagination-response.js";
|
|
17
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
18
|
+
|
|
19
|
+
export type ListCouponAssociationsResponse = {
|
|
20
|
+
items?: Array<CouponAssociationResponse> | undefined;
|
|
21
|
+
pagination?: PaginationResponse | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ListCouponAssociationsResponse$inboundSchema: z.ZodMiniType<
|
|
26
|
+
ListCouponAssociationsResponse,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
items: types.optional(z.array(CouponAssociationResponse$inboundSchema)),
|
|
30
|
+
pagination: types.optional(PaginationResponse$inboundSchema),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export function listCouponAssociationsResponseFromJSON(
|
|
34
|
+
jsonString: string,
|
|
35
|
+
): SafeParseResult<ListCouponAssociationsResponse, SDKValidationError> {
|
|
36
|
+
return safeParse(
|
|
37
|
+
jsonString,
|
|
38
|
+
(x) => ListCouponAssociationsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
39
|
+
`Failed to parse 'ListCouponAssociationsResponse' from JSON`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -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 { 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 { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export type MeterUsageAttribution = {
|
|
13
|
+
externalCustomerId?: string | undefined;
|
|
14
|
+
meterId?: string | undefined;
|
|
15
|
+
qtyTotal?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const MeterUsageAttribution$inboundSchema: z.ZodMiniType<
|
|
20
|
+
MeterUsageAttribution,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.pipe(
|
|
23
|
+
z.object({
|
|
24
|
+
external_customer_id: types.optional(types.string()),
|
|
25
|
+
meter_id: types.optional(types.string()),
|
|
26
|
+
qty_total: types.optional(types.string()),
|
|
27
|
+
}),
|
|
28
|
+
z.transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"external_customer_id": "externalCustomerId",
|
|
31
|
+
"meter_id": "meterId",
|
|
32
|
+
"qty_total": "qtyTotal",
|
|
33
|
+
});
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export function meterUsageAttributionFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<MeterUsageAttribution, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => MeterUsageAttribution$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'MeterUsageAttribution' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import {
|
|
9
|
+
BillingPeriod,
|
|
10
|
+
BillingPeriod$outboundSchema,
|
|
11
|
+
} from "./billing-period.js";
|
|
8
12
|
import {
|
|
9
13
|
FilterCondition,
|
|
10
14
|
FilterCondition$Outbound,
|
|
@@ -24,6 +28,7 @@ export type PriceFilterOrder = ClosedEnum<typeof PriceFilterOrder>;
|
|
|
24
28
|
|
|
25
29
|
export type PriceFilter = {
|
|
26
30
|
allowExpiredPrices?: boolean | undefined;
|
|
31
|
+
billingPeriods?: Array<BillingPeriod> | undefined;
|
|
27
32
|
endTime?: Date | undefined;
|
|
28
33
|
entityIds?: Array<string> | undefined;
|
|
29
34
|
entityType?: PriceEntityType | undefined;
|
|
@@ -57,6 +62,7 @@ export const PriceFilterOrder$outboundSchema: z.ZodMiniEnum<
|
|
|
57
62
|
/** @internal */
|
|
58
63
|
export type PriceFilter$Outbound = {
|
|
59
64
|
allow_expired_prices: boolean;
|
|
65
|
+
billing_periods?: Array<string> | undefined;
|
|
60
66
|
end_time?: string | undefined;
|
|
61
67
|
entity_ids?: Array<string> | undefined;
|
|
62
68
|
entity_type?: string | undefined;
|
|
@@ -83,6 +89,7 @@ export const PriceFilter$outboundSchema: z.ZodMiniType<
|
|
|
83
89
|
> = z.pipe(
|
|
84
90
|
z.object({
|
|
85
91
|
allowExpiredPrices: z._default(z.boolean(), false),
|
|
92
|
+
billingPeriods: z.optional(z.array(BillingPeriod$outboundSchema)),
|
|
86
93
|
endTime: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
87
94
|
entityIds: z.optional(z.array(z.string())),
|
|
88
95
|
entityType: z.optional(PriceEntityType$outboundSchema),
|
|
@@ -104,6 +111,7 @@ export const PriceFilter$outboundSchema: z.ZodMiniType<
|
|
|
104
111
|
z.transform((v) => {
|
|
105
112
|
return remap$(v, {
|
|
106
113
|
allowExpiredPrices: "allow_expired_prices",
|
|
114
|
+
billingPeriods: "billing_periods",
|
|
107
115
|
endTime: "end_time",
|
|
108
116
|
entityIds: "entity_ids",
|
|
109
117
|
entityType: "entity_type",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const SubModifyCouponAction = {
|
|
9
|
+
Add: "add",
|
|
10
|
+
Remove: "remove",
|
|
11
|
+
} as const;
|
|
12
|
+
export type SubModifyCouponAction = ClosedEnum<typeof SubModifyCouponAction>;
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const SubModifyCouponAction$outboundSchema: z.ZodMiniEnum<
|
|
16
|
+
typeof SubModifyCouponAction
|
|
17
|
+
> = z.enum(SubModifyCouponAction);
|
|
@@ -0,0 +1,92 @@
|
|
|
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 {
|
|
8
|
+
SubModifyCouponAction,
|
|
9
|
+
SubModifyCouponAction$outboundSchema,
|
|
10
|
+
} from "./sub-modify-coupon-action.js";
|
|
11
|
+
|
|
12
|
+
export type SubModifyCouponParams = {
|
|
13
|
+
action: SubModifyCouponAction;
|
|
14
|
+
/**
|
|
15
|
+
* Required when action="remove". ID of the CouponAssociation to soft-delete.
|
|
16
|
+
*/
|
|
17
|
+
associationId?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Required for action="add". Coupon code of the coupon to attach.
|
|
20
|
+
*/
|
|
21
|
+
couponCode?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Optional. When to apply the change; defaults to now if omitted.
|
|
24
|
+
*/
|
|
25
|
+
effectiveDate?: Date | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Optional. When the coupon association ends.
|
|
28
|
+
*/
|
|
29
|
+
endDate?: Date | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Optional. When the coupon association starts; defaults to EffectiveDate.
|
|
32
|
+
*/
|
|
33
|
+
startDate?: Date | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Optional. Apply at subscription level. Mutually exclusive with SubscriptionLineItemID.
|
|
36
|
+
*/
|
|
37
|
+
subscriptionId?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Optional. Apply at a specific line item. Mutually exclusive with SubscriptionID.
|
|
40
|
+
*/
|
|
41
|
+
subscriptionLineItemId?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type SubModifyCouponParams$Outbound = {
|
|
46
|
+
action: string;
|
|
47
|
+
association_id?: string | undefined;
|
|
48
|
+
coupon_code?: string | undefined;
|
|
49
|
+
effective_date?: string | undefined;
|
|
50
|
+
end_date?: string | undefined;
|
|
51
|
+
start_date?: string | undefined;
|
|
52
|
+
subscription_id?: string | undefined;
|
|
53
|
+
subscription_line_item_id?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const SubModifyCouponParams$outboundSchema: z.ZodMiniType<
|
|
58
|
+
SubModifyCouponParams$Outbound,
|
|
59
|
+
SubModifyCouponParams
|
|
60
|
+
> = z.pipe(
|
|
61
|
+
z.object({
|
|
62
|
+
action: SubModifyCouponAction$outboundSchema,
|
|
63
|
+
associationId: z.optional(z.string()),
|
|
64
|
+
couponCode: z.optional(z.string()),
|
|
65
|
+
effectiveDate: z.optional(
|
|
66
|
+
z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
67
|
+
),
|
|
68
|
+
endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
69
|
+
startDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
70
|
+
subscriptionId: z.optional(z.string()),
|
|
71
|
+
subscriptionLineItemId: z.optional(z.string()),
|
|
72
|
+
}),
|
|
73
|
+
z.transform((v) => {
|
|
74
|
+
return remap$(v, {
|
|
75
|
+
associationId: "association_id",
|
|
76
|
+
couponCode: "coupon_code",
|
|
77
|
+
effectiveDate: "effective_date",
|
|
78
|
+
endDate: "end_date",
|
|
79
|
+
startDate: "start_date",
|
|
80
|
+
subscriptionId: "subscription_id",
|
|
81
|
+
subscriptionLineItemId: "subscription_line_item_id",
|
|
82
|
+
});
|
|
83
|
+
}),
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
export function subModifyCouponParamsToJSON(
|
|
87
|
+
subModifyCouponParams: SubModifyCouponParams,
|
|
88
|
+
): string {
|
|
89
|
+
return JSON.stringify(
|
|
90
|
+
SubModifyCouponParams$outboundSchema.parse(subModifyCouponParams),
|
|
91
|
+
);
|
|
92
|
+
}
|