@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,14 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
InheritanceAction,
|
|
9
|
+
InheritanceAction$outboundSchema,
|
|
10
|
+
} from "./inheritance-action.js";
|
|
7
11
|
|
|
8
12
|
export type SubModifyInheritanceRequest = {
|
|
13
|
+
action?: InheritanceAction | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* ExternalCustomerIDsToInheritSubscription is used for action="add".
|
|
16
|
+
*/
|
|
9
17
|
externalCustomerIdsToInheritSubscription?: Array<string> | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* ExternalCustomerIDsToRemove is used for action="remove".
|
|
20
|
+
*/
|
|
21
|
+
externalCustomerIdsToRemove?: Array<string> | undefined;
|
|
10
22
|
};
|
|
11
23
|
|
|
12
24
|
/** @internal */
|
|
13
25
|
export type SubModifyInheritanceRequest$Outbound = {
|
|
26
|
+
action?: string | undefined;
|
|
14
27
|
external_customer_ids_to_inherit_subscription?: Array<string> | undefined;
|
|
28
|
+
external_customer_ids_to_remove?: Array<string> | undefined;
|
|
15
29
|
};
|
|
16
30
|
|
|
17
31
|
/** @internal */
|
|
@@ -20,12 +34,15 @@ export const SubModifyInheritanceRequest$outboundSchema: z.ZodMiniType<
|
|
|
20
34
|
SubModifyInheritanceRequest
|
|
21
35
|
> = z.pipe(
|
|
22
36
|
z.object({
|
|
37
|
+
action: z.optional(InheritanceAction$outboundSchema),
|
|
23
38
|
externalCustomerIdsToInheritSubscription: z.optional(z.array(z.string())),
|
|
39
|
+
externalCustomerIdsToRemove: z.optional(z.array(z.string())),
|
|
24
40
|
}),
|
|
25
41
|
z.transform((v) => {
|
|
26
42
|
return remap$(v, {
|
|
27
43
|
externalCustomerIdsToInheritSubscription:
|
|
28
44
|
"external_customer_ids_to_inherit_subscription",
|
|
45
|
+
externalCustomerIdsToRemove: "external_customer_ids_to_remove",
|
|
29
46
|
});
|
|
30
47
|
}),
|
|
31
48
|
);
|
|
@@ -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 SubModifyTaxAction = {
|
|
9
|
+
Add: "add",
|
|
10
|
+
Remove: "remove",
|
|
11
|
+
} as const;
|
|
12
|
+
export type SubModifyTaxAction = ClosedEnum<typeof SubModifyTaxAction>;
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const SubModifyTaxAction$outboundSchema: z.ZodMiniEnum<
|
|
16
|
+
typeof SubModifyTaxAction
|
|
17
|
+
> = z.enum(SubModifyTaxAction);
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
SubModifyTaxAction,
|
|
9
|
+
SubModifyTaxAction$outboundSchema,
|
|
10
|
+
} from "./sub-modify-tax-action.js";
|
|
11
|
+
|
|
12
|
+
export type SubModifyTaxParams = {
|
|
13
|
+
action: SubModifyTaxAction;
|
|
14
|
+
/**
|
|
15
|
+
* Required when action="remove". ID of the TaxAssociation to soft-delete.
|
|
16
|
+
*/
|
|
17
|
+
associationId?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Optional. When to apply the change; defaults to now if omitted.
|
|
20
|
+
*/
|
|
21
|
+
effectiveDate?: Date | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Required when action="add". ID of the active tax rate to attach.
|
|
24
|
+
*/
|
|
25
|
+
taxRateId?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type SubModifyTaxParams$Outbound = {
|
|
30
|
+
action: string;
|
|
31
|
+
association_id?: string | undefined;
|
|
32
|
+
effective_date?: string | undefined;
|
|
33
|
+
tax_rate_id?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const SubModifyTaxParams$outboundSchema: z.ZodMiniType<
|
|
38
|
+
SubModifyTaxParams$Outbound,
|
|
39
|
+
SubModifyTaxParams
|
|
40
|
+
> = z.pipe(
|
|
41
|
+
z.object({
|
|
42
|
+
action: SubModifyTaxAction$outboundSchema,
|
|
43
|
+
associationId: z.optional(z.string()),
|
|
44
|
+
effectiveDate: z.optional(
|
|
45
|
+
z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
46
|
+
),
|
|
47
|
+
taxRateId: z.optional(z.string()),
|
|
48
|
+
}),
|
|
49
|
+
z.transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
associationId: "association_id",
|
|
52
|
+
effectiveDate: "effective_date",
|
|
53
|
+
taxRateId: "tax_rate_id",
|
|
54
|
+
});
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export function subModifyTaxParamsToJSON(
|
|
59
|
+
subModifyTaxParams: SubModifyTaxParams,
|
|
60
|
+
): string {
|
|
61
|
+
return JSON.stringify(
|
|
62
|
+
SubModifyTaxParams$outboundSchema.parse(subModifyTaxParams),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 SubscriptionCouponInput = {
|
|
9
|
+
/**
|
|
10
|
+
* CouponCode is the coupon's human-readable code (case-insensitive). Required.
|
|
11
|
+
*/
|
|
12
|
+
couponCode: string;
|
|
13
|
+
/**
|
|
14
|
+
* EndDate is when the coupon ends; overrides duration_in_periods calculation.
|
|
15
|
+
*/
|
|
16
|
+
endDate?: Date | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* PriceID is the price ID of the line item to target; omit for subscription-level.
|
|
19
|
+
*/
|
|
20
|
+
priceId?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* StartDate is when the coupon starts; defaults to subscription/phase StartDate.
|
|
23
|
+
*/
|
|
24
|
+
startDate?: Date | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type SubscriptionCouponInput$Outbound = {
|
|
29
|
+
coupon_code: string;
|
|
30
|
+
end_date?: string | undefined;
|
|
31
|
+
price_id?: string | undefined;
|
|
32
|
+
start_date?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const SubscriptionCouponInput$outboundSchema: z.ZodMiniType<
|
|
37
|
+
SubscriptionCouponInput$Outbound,
|
|
38
|
+
SubscriptionCouponInput
|
|
39
|
+
> = z.pipe(
|
|
40
|
+
z.object({
|
|
41
|
+
couponCode: z.string(),
|
|
42
|
+
endDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
43
|
+
priceId: z.optional(z.string()),
|
|
44
|
+
startDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
45
|
+
}),
|
|
46
|
+
z.transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
couponCode: "coupon_code",
|
|
49
|
+
endDate: "end_date",
|
|
50
|
+
priceId: "price_id",
|
|
51
|
+
startDate: "start_date",
|
|
52
|
+
});
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export function subscriptionCouponInputToJSON(
|
|
57
|
+
subscriptionCouponInput: SubscriptionCouponInput,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
SubscriptionCouponInput$outboundSchema.parse(subscriptionCouponInput),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -30,6 +30,10 @@ import {
|
|
|
30
30
|
SubscriptionLineItemEntityType,
|
|
31
31
|
SubscriptionLineItemEntityType$inboundSchema,
|
|
32
32
|
} from "./subscription-line-item-entity-type.js";
|
|
33
|
+
import {
|
|
34
|
+
TimeOfDayBucket,
|
|
35
|
+
TimeOfDayBucket$inboundSchema,
|
|
36
|
+
} from "./time-of-day-bucket.js";
|
|
33
37
|
|
|
34
38
|
export type SubscriptionLineItemResponse = {
|
|
35
39
|
addonAssociationId?: string | undefined;
|
|
@@ -45,6 +49,7 @@ export type SubscriptionLineItemResponse = {
|
|
|
45
49
|
commitmentDuration?: BillingPeriod | undefined;
|
|
46
50
|
commitmentOverageFactor?: string | undefined;
|
|
47
51
|
commitmentQuantity?: string | undefined;
|
|
52
|
+
commitmentTimeBuckets?: Array<TimeOfDayBucket> | undefined;
|
|
48
53
|
commitmentTrueUpEnabled?: boolean | undefined;
|
|
49
54
|
commitmentType?: CommitmentType | undefined;
|
|
50
55
|
commitmentWindowed?: boolean | undefined;
|
|
@@ -91,6 +96,9 @@ export const SubscriptionLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
91
96
|
commitment_duration: types.optional(BillingPeriod$inboundSchema),
|
|
92
97
|
commitment_overage_factor: types.optional(types.string()),
|
|
93
98
|
commitment_quantity: types.optional(types.string()),
|
|
99
|
+
commitment_time_buckets: types.optional(
|
|
100
|
+
z.array(TimeOfDayBucket$inboundSchema),
|
|
101
|
+
),
|
|
94
102
|
commitment_true_up_enabled: types.optional(types.boolean()),
|
|
95
103
|
commitment_type: types.optional(CommitmentType$inboundSchema),
|
|
96
104
|
commitment_windowed: types.optional(types.boolean()),
|
|
@@ -132,6 +140,7 @@ export const SubscriptionLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
132
140
|
"commitment_duration": "commitmentDuration",
|
|
133
141
|
"commitment_overage_factor": "commitmentOverageFactor",
|
|
134
142
|
"commitment_quantity": "commitmentQuantity",
|
|
143
|
+
"commitment_time_buckets": "commitmentTimeBuckets",
|
|
135
144
|
"commitment_true_up_enabled": "commitmentTrueUpEnabled",
|
|
136
145
|
"commitment_type": "commitmentType",
|
|
137
146
|
"commitment_windowed": "commitmentWindowed",
|
|
@@ -10,6 +10,8 @@ export const SubscriptionModifyType = {
|
|
|
10
10
|
QuantityChange: "quantity_change",
|
|
11
11
|
GroupedInvoicing: "grouped_invoicing",
|
|
12
12
|
TrialEnd: "trial_end",
|
|
13
|
+
Coupon: "coupon",
|
|
14
|
+
Tax: "tax",
|
|
13
15
|
} as const;
|
|
14
16
|
export type SubscriptionModifyType = ClosedEnum<typeof SubscriptionModifyType>;
|
|
15
17
|
|
|
@@ -14,15 +14,20 @@ import {
|
|
|
14
14
|
OverrideLineItemRequest$Outbound,
|
|
15
15
|
OverrideLineItemRequest$outboundSchema,
|
|
16
16
|
} from "./override-line-item-request.js";
|
|
17
|
+
import {
|
|
18
|
+
SubscriptionCouponInput,
|
|
19
|
+
SubscriptionCouponInput$Outbound,
|
|
20
|
+
SubscriptionCouponInput$outboundSchema,
|
|
21
|
+
} from "./subscription-coupon-input.js";
|
|
17
22
|
|
|
18
23
|
export type SubscriptionPhaseCreateRequest = {
|
|
19
24
|
/**
|
|
20
|
-
*
|
|
25
|
+
* Deprecated: use SubscriptionCoupons instead.
|
|
21
26
|
*/
|
|
22
27
|
coupons?: Array<string> | undefined;
|
|
23
28
|
endDate?: Date | undefined;
|
|
24
29
|
/**
|
|
25
|
-
*
|
|
30
|
+
* Deprecated: use SubscriptionCoupons instead.
|
|
26
31
|
*/
|
|
27
32
|
lineItemCoupons?: { [k: string]: Array<string> } | undefined;
|
|
28
33
|
/**
|
|
@@ -41,6 +46,10 @@ export type SubscriptionPhaseCreateRequest = {
|
|
|
41
46
|
*/
|
|
42
47
|
overrideLineItems?: Array<OverrideLineItemRequest> | undefined;
|
|
43
48
|
startDate: Date;
|
|
49
|
+
/**
|
|
50
|
+
* SubscriptionCoupons is the preferred way to attach coupons to this phase.
|
|
51
|
+
*/
|
|
52
|
+
subscriptionCoupons?: Array<SubscriptionCouponInput> | undefined;
|
|
44
53
|
};
|
|
45
54
|
|
|
46
55
|
/** @internal */
|
|
@@ -52,6 +61,7 @@ export type SubscriptionPhaseCreateRequest$Outbound = {
|
|
|
52
61
|
metadata?: { [k: string]: string } | undefined;
|
|
53
62
|
override_line_items?: Array<OverrideLineItemRequest$Outbound> | undefined;
|
|
54
63
|
start_date: string;
|
|
64
|
+
subscription_coupons?: Array<SubscriptionCouponInput$Outbound> | undefined;
|
|
55
65
|
};
|
|
56
66
|
|
|
57
67
|
/** @internal */
|
|
@@ -71,6 +81,9 @@ export const SubscriptionPhaseCreateRequest$outboundSchema: z.ZodMiniType<
|
|
|
71
81
|
z.array(OverrideLineItemRequest$outboundSchema),
|
|
72
82
|
),
|
|
73
83
|
startDate: z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
84
|
+
subscriptionCoupons: z.optional(
|
|
85
|
+
z.array(SubscriptionCouponInput$outboundSchema),
|
|
86
|
+
),
|
|
74
87
|
}),
|
|
75
88
|
z.transform((v) => {
|
|
76
89
|
return remap$(v, {
|
|
@@ -79,6 +92,7 @@ export const SubscriptionPhaseCreateRequest$outboundSchema: z.ZodMiniType<
|
|
|
79
92
|
lineItems: "line_items",
|
|
80
93
|
overrideLineItems: "override_line_items",
|
|
81
94
|
startDate: "start_date",
|
|
95
|
+
subscriptionCoupons: "subscription_coupons",
|
|
82
96
|
});
|
|
83
97
|
}),
|
|
84
98
|
);
|
|
@@ -27,6 +27,10 @@ import {
|
|
|
27
27
|
SubscriptionLineItemEntityType,
|
|
28
28
|
SubscriptionLineItemEntityType$inboundSchema,
|
|
29
29
|
} from "./subscription-line-item-entity-type.js";
|
|
30
|
+
import {
|
|
31
|
+
TimeOfDayBucket,
|
|
32
|
+
TimeOfDayBucket$inboundSchema,
|
|
33
|
+
} from "./time-of-day-bucket.js";
|
|
30
34
|
|
|
31
35
|
export type SubscriptionSubscriptionLineItem = {
|
|
32
36
|
addonAssociationId?: string | undefined;
|
|
@@ -42,6 +46,7 @@ export type SubscriptionSubscriptionLineItem = {
|
|
|
42
46
|
commitmentDuration?: BillingPeriod | undefined;
|
|
43
47
|
commitmentOverageFactor?: string | undefined;
|
|
44
48
|
commitmentQuantity?: string | undefined;
|
|
49
|
+
commitmentTimeBuckets?: Array<TimeOfDayBucket> | undefined;
|
|
45
50
|
commitmentTrueUpEnabled?: boolean | undefined;
|
|
46
51
|
commitmentType?: CommitmentType | undefined;
|
|
47
52
|
commitmentWindowed?: boolean | undefined;
|
|
@@ -88,6 +93,9 @@ export const SubscriptionSubscriptionLineItem$inboundSchema: z.ZodMiniType<
|
|
|
88
93
|
commitment_duration: types.optional(BillingPeriod$inboundSchema),
|
|
89
94
|
commitment_overage_factor: types.optional(types.string()),
|
|
90
95
|
commitment_quantity: types.optional(types.string()),
|
|
96
|
+
commitment_time_buckets: types.optional(
|
|
97
|
+
z.array(TimeOfDayBucket$inboundSchema),
|
|
98
|
+
),
|
|
91
99
|
commitment_true_up_enabled: types.optional(types.boolean()),
|
|
92
100
|
commitment_type: types.optional(CommitmentType$inboundSchema),
|
|
93
101
|
commitment_windowed: types.optional(types.boolean()),
|
|
@@ -129,6 +137,7 @@ export const SubscriptionSubscriptionLineItem$inboundSchema: z.ZodMiniType<
|
|
|
129
137
|
"commitment_duration": "commitmentDuration",
|
|
130
138
|
"commitment_overage_factor": "commitmentOverageFactor",
|
|
131
139
|
"commitment_quantity": "commitmentQuantity",
|
|
140
|
+
"commitment_time_buckets": "commitmentTimeBuckets",
|
|
132
141
|
"commitment_true_up_enabled": "commitmentTrueUpEnabled",
|
|
133
142
|
"commitment_type": "commitmentType",
|
|
134
143
|
"commitment_windowed": "commitmentWindowed",
|
|
@@ -29,6 +29,10 @@ export type TaxAssociationResponse = {
|
|
|
29
29
|
* Currency
|
|
30
30
|
*/
|
|
31
31
|
currency?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* EndDate is the optional date until which this association is active
|
|
34
|
+
*/
|
|
35
|
+
endDate?: Date | undefined;
|
|
32
36
|
/**
|
|
33
37
|
* ID of the entity this tax rate applies to
|
|
34
38
|
*/
|
|
@@ -50,6 +54,10 @@ export type TaxAssociationResponse = {
|
|
|
50
54
|
* Priority for tax resolution (lower number = higher priority)
|
|
51
55
|
*/
|
|
52
56
|
priority?: number | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* StartDate is the date from which this association is active
|
|
59
|
+
*/
|
|
60
|
+
startDate?: Date | undefined;
|
|
53
61
|
status?: Status | undefined;
|
|
54
62
|
taxRate?: TaxRateResponse | undefined;
|
|
55
63
|
/**
|
|
@@ -71,12 +79,14 @@ export const TaxAssociationResponse$inboundSchema: z.ZodMiniType<
|
|
|
71
79
|
created_at: types.optional(types.date()),
|
|
72
80
|
created_by: types.optional(types.string()),
|
|
73
81
|
currency: types.optional(types.string()),
|
|
82
|
+
end_date: types.optional(types.date()),
|
|
74
83
|
entity_id: types.optional(types.string()),
|
|
75
84
|
entity_type: types.optional(TaxRateEntityType$inboundSchema),
|
|
76
85
|
environment_id: types.optional(types.string()),
|
|
77
86
|
id: types.optional(types.string()),
|
|
78
87
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
79
88
|
priority: types.optional(types.number()),
|
|
89
|
+
start_date: types.optional(types.date()),
|
|
80
90
|
status: types.optional(Status$inboundSchema),
|
|
81
91
|
tax_rate: types.optional(TaxRateResponse$inboundSchema),
|
|
82
92
|
tax_rate_id: types.optional(types.string()),
|
|
@@ -89,9 +99,11 @@ export const TaxAssociationResponse$inboundSchema: z.ZodMiniType<
|
|
|
89
99
|
"auto_apply": "autoApply",
|
|
90
100
|
"created_at": "createdAt",
|
|
91
101
|
"created_by": "createdBy",
|
|
102
|
+
"end_date": "endDate",
|
|
92
103
|
"entity_id": "entityId",
|
|
93
104
|
"entity_type": "entityType",
|
|
94
105
|
"environment_id": "environmentId",
|
|
106
|
+
"start_date": "startDate",
|
|
95
107
|
"tax_rate": "taxRate",
|
|
96
108
|
"tax_rate_id": "taxRateId",
|
|
97
109
|
"tenant_id": "tenantId",
|
|
@@ -0,0 +1,74 @@
|
|
|
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 {
|
|
12
|
+
CommitmentType,
|
|
13
|
+
CommitmentType$inboundSchema,
|
|
14
|
+
} from "./commitment-type.js";
|
|
15
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
16
|
+
|
|
17
|
+
export type TimeOfDayBucket = {
|
|
18
|
+
commitmentType?: CommitmentType | undefined;
|
|
19
|
+
commitmentValue?: string | undefined;
|
|
20
|
+
end?: Bucket | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* ID is server-assigned. Stable for the lifetime of the line item;
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* invoice breakdown and analytics responses reference this ID.
|
|
26
|
+
*/
|
|
27
|
+
id?: string | undefined;
|
|
28
|
+
overageFactor?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* PriceID is the SUBSCRIPTION-scoped price created at bucket-creation time.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Immutable post-create; changing pricing requires a successor line item.
|
|
34
|
+
*/
|
|
35
|
+
priceId?: string | undefined;
|
|
36
|
+
start?: Bucket | undefined;
|
|
37
|
+
trueUpEnabled?: boolean | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const TimeOfDayBucket$inboundSchema: z.ZodMiniType<
|
|
42
|
+
TimeOfDayBucket,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.pipe(
|
|
45
|
+
z.object({
|
|
46
|
+
commitment_type: types.optional(CommitmentType$inboundSchema),
|
|
47
|
+
commitment_value: types.optional(types.string()),
|
|
48
|
+
end: types.optional(Bucket$inboundSchema),
|
|
49
|
+
id: types.optional(types.string()),
|
|
50
|
+
overage_factor: types.optional(types.number()),
|
|
51
|
+
price_id: types.optional(types.string()),
|
|
52
|
+
start: types.optional(Bucket$inboundSchema),
|
|
53
|
+
true_up_enabled: types.optional(types.boolean()),
|
|
54
|
+
}),
|
|
55
|
+
z.transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
"commitment_type": "commitmentType",
|
|
58
|
+
"commitment_value": "commitmentValue",
|
|
59
|
+
"overage_factor": "overageFactor",
|
|
60
|
+
"price_id": "priceId",
|
|
61
|
+
"true_up_enabled": "trueUpEnabled",
|
|
62
|
+
});
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export function timeOfDayBucketFromJSON(
|
|
67
|
+
jsonString: string,
|
|
68
|
+
): SafeParseResult<TimeOfDayBucket, SDKValidationError> {
|
|
69
|
+
return safeParse(
|
|
70
|
+
jsonString,
|
|
71
|
+
(x) => TimeOfDayBucket$inboundSchema.parse(JSON.parse(x)),
|
|
72
|
+
`Failed to parse 'TimeOfDayBucket' from JSON`,
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import {
|
|
7
|
+
UpdateServiceAccountRequest,
|
|
8
|
+
UpdateServiceAccountRequest$Outbound,
|
|
9
|
+
UpdateServiceAccountRequest$outboundSchema,
|
|
10
|
+
} from "./update-service-account-request.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateServiceAccountRequestRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Service Account ID
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Update service account request
|
|
19
|
+
*/
|
|
20
|
+
body: UpdateServiceAccountRequest;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type UpdateServiceAccountRequestRequest$Outbound = {
|
|
25
|
+
id: string;
|
|
26
|
+
body: UpdateServiceAccountRequest$Outbound;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const UpdateServiceAccountRequestRequest$outboundSchema: z.ZodMiniType<
|
|
31
|
+
UpdateServiceAccountRequestRequest$Outbound,
|
|
32
|
+
UpdateServiceAccountRequestRequest
|
|
33
|
+
> = z.object({
|
|
34
|
+
id: z.string(),
|
|
35
|
+
body: UpdateServiceAccountRequest$outboundSchema,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function updateServiceAccountRequestRequestToJSON(
|
|
39
|
+
updateServiceAccountRequestRequest: UpdateServiceAccountRequestRequest,
|
|
40
|
+
): string {
|
|
41
|
+
return JSON.stringify(
|
|
42
|
+
UpdateServiceAccountRequestRequest$outboundSchema.parse(
|
|
43
|
+
updateServiceAccountRequestRequest,
|
|
44
|
+
),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 UpdateServiceAccountRequest = {
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type UpdateServiceAccountRequest$Outbound = {
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const UpdateServiceAccountRequest$outboundSchema: z.ZodMiniType<
|
|
18
|
+
UpdateServiceAccountRequest$Outbound,
|
|
19
|
+
UpdateServiceAccountRequest
|
|
20
|
+
> = z.object({
|
|
21
|
+
name: z.string(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function updateServiceAccountRequestToJSON(
|
|
25
|
+
updateServiceAccountRequest: UpdateServiceAccountRequest,
|
|
26
|
+
): string {
|
|
27
|
+
return JSON.stringify(
|
|
28
|
+
UpdateServiceAccountRequest$outboundSchema.parse(
|
|
29
|
+
updateServiceAccountRequest,
|
|
30
|
+
),
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
import {
|
|
11
|
+
TenantResponse,
|
|
12
|
+
TenantResponse$inboundSchema,
|
|
13
|
+
} from "./tenant-response.js";
|
|
14
|
+
import { UserType, UserType$inboundSchema } from "./user-type.js";
|
|
15
|
+
|
|
16
|
+
export type UpdateServiceAccountResponse = {
|
|
17
|
+
/**
|
|
18
|
+
* Empty for service accounts
|
|
19
|
+
*/
|
|
20
|
+
email?: string | undefined;
|
|
21
|
+
id?: string | undefined;
|
|
22
|
+
metadata?: { [k: string]: string } | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
roles?: Array<string> | undefined;
|
|
25
|
+
tenant?: TenantResponse | undefined;
|
|
26
|
+
type?: UserType | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const UpdateServiceAccountResponse$inboundSchema: z.ZodMiniType<
|
|
31
|
+
UpdateServiceAccountResponse,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
email: types.optional(types.string()),
|
|
35
|
+
id: types.optional(types.string()),
|
|
36
|
+
metadata: types.optional(z.record(z.string(), types.string())),
|
|
37
|
+
name: types.optional(types.string()),
|
|
38
|
+
roles: types.optional(z.array(types.string())),
|
|
39
|
+
tenant: types.optional(TenantResponse$inboundSchema),
|
|
40
|
+
type: types.optional(UserType$inboundSchema),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export function updateServiceAccountResponseFromJSON(
|
|
44
|
+
jsonString: string,
|
|
45
|
+
): SafeParseResult<UpdateServiceAccountResponse, SDKValidationError> {
|
|
46
|
+
return safeParse(
|
|
47
|
+
jsonString,
|
|
48
|
+
(x) => UpdateServiceAccountResponse$inboundSchema.parse(JSON.parse(x)),
|
|
49
|
+
`Failed to parse 'UpdateServiceAccountResponse' from JSON`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -10,6 +10,11 @@ import {
|
|
|
10
10
|
BillingPeriod$outboundSchema,
|
|
11
11
|
} from "./billing-period.js";
|
|
12
12
|
import { BillingTier, BillingTier$outboundSchema } from "./billing-tier.js";
|
|
13
|
+
import {
|
|
14
|
+
CommitmentBucketRequest,
|
|
15
|
+
CommitmentBucketRequest$Outbound,
|
|
16
|
+
CommitmentBucketRequest$outboundSchema,
|
|
17
|
+
} from "./commitment-bucket-request.js";
|
|
13
18
|
import {
|
|
14
19
|
CommitmentType,
|
|
15
20
|
CommitmentType$outboundSchema,
|
|
@@ -38,6 +43,10 @@ export type UpdateSubscriptionLineItemRequest = {
|
|
|
38
43
|
commitmentDuration?: BillingPeriod | undefined;
|
|
39
44
|
commitmentOverageFactor?: number | undefined;
|
|
40
45
|
commitmentQuantity?: number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Pointer so an explicit empty array can clear existing buckets (omission keeps them).
|
|
48
|
+
*/
|
|
49
|
+
commitmentTimeBuckets?: Array<CommitmentBucketRequest> | undefined;
|
|
41
50
|
commitmentTrueUpEnabled?: boolean | undefined;
|
|
42
51
|
commitmentType?: CommitmentType | undefined;
|
|
43
52
|
commitmentWindowed?: boolean | undefined;
|
|
@@ -65,6 +74,7 @@ export type UpdateSubscriptionLineItemRequest$Outbound = {
|
|
|
65
74
|
commitment_duration?: string | undefined;
|
|
66
75
|
commitment_overage_factor?: number | undefined;
|
|
67
76
|
commitment_quantity?: number | undefined;
|
|
77
|
+
commitment_time_buckets?: Array<CommitmentBucketRequest$Outbound> | undefined;
|
|
68
78
|
commitment_true_up_enabled?: boolean | undefined;
|
|
69
79
|
commitment_type?: string | undefined;
|
|
70
80
|
commitment_windowed?: boolean | undefined;
|
|
@@ -87,6 +97,9 @@ export const UpdateSubscriptionLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
87
97
|
commitmentDuration: z.optional(BillingPeriod$outboundSchema),
|
|
88
98
|
commitmentOverageFactor: z.optional(z.number()),
|
|
89
99
|
commitmentQuantity: z.optional(z.number()),
|
|
100
|
+
commitmentTimeBuckets: z.optional(
|
|
101
|
+
z.array(CommitmentBucketRequest$outboundSchema),
|
|
102
|
+
),
|
|
90
103
|
commitmentTrueUpEnabled: z.optional(z.boolean()),
|
|
91
104
|
commitmentType: z.optional(CommitmentType$outboundSchema),
|
|
92
105
|
commitmentWindowed: z.optional(z.boolean()),
|
|
@@ -103,6 +116,7 @@ export const UpdateSubscriptionLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
103
116
|
commitmentDuration: "commitment_duration",
|
|
104
117
|
commitmentOverageFactor: "commitment_overage_factor",
|
|
105
118
|
commitmentQuantity: "commitment_quantity",
|
|
119
|
+
commitmentTimeBuckets: "commitment_time_buckets",
|
|
106
120
|
commitmentTrueUpEnabled: "commitment_true_up_enabled",
|
|
107
121
|
commitmentType: "commitment_type",
|
|
108
122
|
commitmentWindowed: "commitment_windowed",
|
|
@@ -6,11 +6,13 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
|
|
7
7
|
export type UpdateUserRequest = {
|
|
8
8
|
metadata?: { [k: string]: string } | undefined;
|
|
9
|
+
name?: string | undefined;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
/** @internal */
|
|
12
13
|
export type UpdateUserRequest$Outbound = {
|
|
13
14
|
metadata?: { [k: string]: string } | undefined;
|
|
15
|
+
name?: string | undefined;
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
/** @internal */
|
|
@@ -19,6 +21,7 @@ export const UpdateUserRequest$outboundSchema: z.ZodMiniType<
|
|
|
19
21
|
UpdateUserRequest
|
|
20
22
|
> = z.object({
|
|
21
23
|
metadata: z.optional(z.record(z.string(), z.string())),
|
|
24
|
+
name: z.optional(z.string()),
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
export function updateUserRequestToJSON(
|
|
@@ -20,6 +20,7 @@ export type UpdateUserResponse = {
|
|
|
20
20
|
email?: string | undefined;
|
|
21
21
|
id?: string | undefined;
|
|
22
22
|
metadata?: { [k: string]: string } | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
23
24
|
roles?: Array<string> | undefined;
|
|
24
25
|
tenant?: TenantResponse | undefined;
|
|
25
26
|
type?: UserType | undefined;
|
|
@@ -33,6 +34,7 @@ export const UpdateUserResponse$inboundSchema: z.ZodMiniType<
|
|
|
33
34
|
email: types.optional(types.string()),
|
|
34
35
|
id: types.optional(types.string()),
|
|
35
36
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
37
|
+
name: types.optional(types.string()),
|
|
36
38
|
roles: types.optional(z.array(types.string())),
|
|
37
39
|
tenant: types.optional(TenantResponse$inboundSchema),
|
|
38
40
|
type: types.optional(UserType$inboundSchema),
|