@stigg/typescript 0.1.0-beta.4 → 0.1.0-beta.40
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/CHANGELOG.md +306 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +4 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -1
- package/client.d.ts.map +1 -1
- package/client.js +15 -4
- package/client.js.map +1 -1
- package/client.mjs +15 -4
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +143 -33
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +143 -33
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +110 -17
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +110 -17
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +92 -5
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +92 -5
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +49 -8
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +49 -8
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/addons/index.d.mts +2 -2
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +2 -2
- package/resources/v1/addons/index.d.ts.map +1 -1
- package/resources/v1/addons/index.js.map +1 -1
- package/resources/v1/addons/index.mjs.map +1 -1
- package/resources/v1/addons.d.mts.map +1 -1
- package/resources/v1/addons.d.ts.map +1 -1
- package/resources/v1/addons.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +80 -20
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +80 -20
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +60 -9
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +60 -9
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/consumption.d.mts +196 -0
- package/resources/v1/credits/consumption.d.mts.map +1 -0
- package/resources/v1/credits/consumption.d.ts +196 -0
- package/resources/v1/credits/consumption.d.ts.map +1 -0
- package/resources/v1/credits/consumption.js +46 -0
- package/resources/v1/credits/consumption.js.map +1 -0
- package/resources/v1/credits/consumption.mjs +42 -0
- package/resources/v1/credits/consumption.mjs.map +1 -0
- package/resources/v1/credits/credits.d.mts +118 -25
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +118 -25
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +40 -5
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +40 -5
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +96 -23
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +96 -23
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +76 -12
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +76 -12
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +60 -23
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +60 -23
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +35 -5
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +35 -5
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/credits/index.d.mts +3 -2
- package/resources/v1/credits/index.d.mts.map +1 -1
- package/resources/v1/credits/index.d.ts +3 -2
- package/resources/v1/credits/index.d.ts.map +1 -1
- package/resources/v1/credits/index.js +3 -1
- package/resources/v1/credits/index.js.map +1 -1
- package/resources/v1/credits/index.mjs +1 -0
- package/resources/v1/credits/index.mjs.map +1 -1
- package/resources/v1/credits.d.mts.map +1 -1
- package/resources/v1/credits.d.ts.map +1 -1
- package/resources/v1/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +170 -53
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +170 -53
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +124 -19
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +124 -19
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +67 -12
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +67 -12
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +57 -9
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +57 -9
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +32 -8
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +32 -8
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +26 -4
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +26 -4
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +40 -7
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +40 -7
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +38 -6
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +38 -6
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/customers.d.mts.map +1 -1
- package/resources/v1/customers.d.ts.map +1 -1
- package/resources/v1/customers.mjs.map +1 -1
- package/resources/v1/events/beta/beta.d.mts +10 -0
- package/resources/v1/events/beta/beta.d.mts.map +1 -0
- package/resources/v1/events/beta/beta.d.ts +10 -0
- package/resources/v1/events/beta/beta.d.ts.map +1 -0
- package/resources/v1/events/beta/beta.js +17 -0
- package/resources/v1/events/beta/beta.js.map +1 -0
- package/resources/v1/events/beta/beta.mjs +12 -0
- package/resources/v1/events/beta/beta.mjs.map +1 -0
- package/resources/v1/events/beta/customers.d.mts +160 -0
- package/resources/v1/events/beta/customers.d.mts.map +1 -0
- package/resources/v1/events/beta/customers.d.ts +160 -0
- package/resources/v1/events/beta/customers.d.ts.map +1 -0
- package/resources/v1/events/beta/customers.js +32 -0
- package/resources/v1/events/beta/customers.js.map +1 -0
- package/resources/v1/events/beta/customers.mjs +28 -0
- package/resources/v1/events/beta/customers.mjs.map +1 -0
- package/resources/v1/events/beta/index.d.mts +3 -0
- package/resources/v1/events/beta/index.d.mts.map +1 -0
- package/resources/v1/events/beta/index.d.ts +3 -0
- package/resources/v1/events/beta/index.d.ts.map +1 -0
- package/resources/v1/events/beta/index.js +9 -0
- package/resources/v1/events/beta/index.js.map +1 -0
- package/resources/v1/events/beta/index.mjs +4 -0
- package/resources/v1/events/beta/index.mjs.map +1 -0
- package/resources/v1/events/beta.d.mts +2 -0
- package/resources/v1/events/beta.d.mts.map +1 -0
- package/resources/v1/events/beta.d.ts +2 -0
- package/resources/v1/events/beta.d.ts.map +1 -0
- package/resources/v1/events/beta.js +6 -0
- package/resources/v1/events/beta.js.map +1 -0
- package/resources/v1/events/beta.mjs +3 -0
- package/resources/v1/events/beta.mjs.map +1 -0
- package/resources/v1/events/data-export/data-export.d.mts +211 -0
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -0
- package/resources/v1/events/data-export/data-export.d.ts +211 -0
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -0
- package/resources/v1/events/data-export/data-export.js +71 -0
- package/resources/v1/events/data-export/data-export.js.map +1 -0
- package/resources/v1/events/data-export/data-export.mjs +66 -0
- package/resources/v1/events/data-export/data-export.mjs.map +1 -0
- package/resources/v1/events/data-export/destinations.d.mts +321 -0
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -0
- package/resources/v1/events/data-export/destinations.d.ts +321 -0
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -0
- package/resources/v1/events/data-export/destinations.js +65 -0
- package/resources/v1/events/data-export/destinations.js.map +1 -0
- package/resources/v1/events/data-export/destinations.mjs +61 -0
- package/resources/v1/events/data-export/destinations.mjs.map +1 -0
- package/resources/v1/events/data-export/index.d.mts +3 -0
- package/resources/v1/events/data-export/index.d.mts.map +1 -0
- package/resources/v1/events/data-export/index.d.ts +3 -0
- package/resources/v1/events/data-export/index.d.ts.map +1 -0
- package/resources/v1/events/data-export/index.js +9 -0
- package/resources/v1/events/data-export/index.js.map +1 -0
- package/resources/v1/events/data-export/index.mjs +4 -0
- package/resources/v1/events/data-export/index.mjs.map +1 -0
- package/resources/v1/events/data-export.d.mts +2 -0
- package/resources/v1/events/data-export.d.mts.map +1 -0
- package/resources/v1/events/data-export.d.ts +2 -0
- package/resources/v1/events/data-export.d.ts.map +1 -0
- package/resources/v1/events/data-export.js +6 -0
- package/resources/v1/events/data-export.js.map +1 -0
- package/resources/v1/events/data-export.mjs +3 -0
- package/resources/v1/events/data-export.mjs.map +1 -0
- package/resources/v1/events/events.d.mts +85 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +85 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +43 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +38 -0
- package/resources/v1/events/events.mjs.map +1 -0
- package/resources/v1/events/index.d.mts +4 -0
- package/resources/v1/events/index.d.mts.map +1 -0
- package/resources/v1/events/index.d.ts +4 -0
- package/resources/v1/events/index.d.ts.map +1 -0
- package/resources/v1/events/index.js +11 -0
- package/resources/v1/events/index.js.map +1 -0
- package/resources/v1/events/index.mjs +5 -0
- package/resources/v1/events/index.mjs.map +1 -0
- package/resources/v1/events.d.mts +1 -65
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts +1 -65
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.js +2 -15
- package/resources/v1/events.js.map +1 -1
- package/resources/v1/events.mjs +1 -13
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +108 -30
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +108 -30
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +72 -11
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +72 -11
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +8 -8
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +8 -8
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +6 -6
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +92 -5
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +92 -5
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +49 -8
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +49 -8
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/index.d.mts +2 -2
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +2 -2
- package/resources/v1/plans/index.d.ts.map +1 -1
- package/resources/v1/plans/index.js.map +1 -1
- package/resources/v1/plans/index.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +156 -34
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +156 -34
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +127 -20
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +127 -20
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/plans.d.mts.map +1 -1
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +97 -23
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +97 -23
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +73 -11
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +73 -11
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +29 -3
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +29 -3
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +25 -4
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +25 -4
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts +4 -4
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +4 -4
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +15 -2
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +15 -2
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +13 -2
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +13 -2
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +252 -76
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +252 -76
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +126 -19
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +128 -21
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +29 -4
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +29 -4
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +26 -4
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +26 -4
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions.mjs.map +1 -1
- package/resources/v1/usage.d.mts +61 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +61 -2
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +26 -4
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +26 -4
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +16 -16
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +16 -16
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1-beta/customers/assignments.d.mts +249 -0
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -0
- package/resources/v1-beta/customers/assignments.d.ts +249 -0
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -0
- package/resources/v1-beta/customers/assignments.js +84 -0
- package/resources/v1-beta/customers/assignments.js.map +1 -0
- package/resources/v1-beta/customers/assignments.mjs +80 -0
- package/resources/v1-beta/customers/assignments.mjs.map +1 -0
- package/resources/v1-beta/customers/customers.d.mts +18 -0
- package/resources/v1-beta/customers/customers.d.mts.map +1 -0
- package/resources/v1-beta/customers/customers.d.ts +18 -0
- package/resources/v1-beta/customers/customers.d.ts.map +1 -0
- package/resources/v1-beta/customers/customers.js +25 -0
- package/resources/v1-beta/customers/customers.js.map +1 -0
- package/resources/v1-beta/customers/customers.mjs +20 -0
- package/resources/v1-beta/customers/customers.mjs.map +1 -0
- package/resources/v1-beta/customers/entities.d.mts +351 -0
- package/resources/v1-beta/customers/entities.d.mts.map +1 -0
- package/resources/v1-beta/customers/entities.d.ts +351 -0
- package/resources/v1-beta/customers/entities.d.ts.map +1 -0
- package/resources/v1-beta/customers/entities.js +150 -0
- package/resources/v1-beta/customers/entities.js.map +1 -0
- package/resources/v1-beta/customers/entities.mjs +146 -0
- package/resources/v1-beta/customers/entities.mjs.map +1 -0
- package/resources/v1-beta/customers/entitlements.d.mts +261 -0
- package/resources/v1-beta/customers/entitlements.d.mts.map +1 -0
- package/resources/v1-beta/customers/entitlements.d.ts +261 -0
- package/resources/v1-beta/customers/entitlements.d.ts.map +1 -0
- package/resources/v1-beta/customers/entitlements.js +36 -0
- package/resources/v1-beta/customers/entitlements.js.map +1 -0
- package/resources/v1-beta/customers/entitlements.mjs +32 -0
- package/resources/v1-beta/customers/entitlements.mjs.map +1 -0
- package/resources/v1-beta/customers/index.d.mts +5 -0
- package/resources/v1-beta/customers/index.d.mts.map +1 -0
- package/resources/v1-beta/customers/index.d.ts +5 -0
- package/resources/v1-beta/customers/index.d.ts.map +1 -0
- package/resources/v1-beta/customers/index.js +13 -0
- package/resources/v1-beta/customers/index.js.map +1 -0
- package/resources/v1-beta/customers/index.mjs +6 -0
- package/resources/v1-beta/customers/index.mjs.map +1 -0
- package/resources/v1-beta/customers.d.mts +2 -0
- package/resources/v1-beta/customers.d.mts.map +1 -0
- package/resources/v1-beta/customers.d.ts +2 -0
- package/resources/v1-beta/customers.d.ts.map +1 -0
- package/resources/v1-beta/customers.js +6 -0
- package/resources/v1-beta/customers.js.map +1 -0
- package/resources/v1-beta/customers.mjs +3 -0
- package/resources/v1-beta/customers.mjs.map +1 -0
- package/resources/v1-beta/entity-types.d.mts +165 -0
- package/resources/v1-beta/entity-types.d.mts.map +1 -0
- package/resources/v1-beta/entity-types.d.ts +165 -0
- package/resources/v1-beta/entity-types.d.ts.map +1 -0
- package/resources/v1-beta/entity-types.js +75 -0
- package/resources/v1-beta/entity-types.js.map +1 -0
- package/resources/v1-beta/entity-types.mjs +71 -0
- package/resources/v1-beta/entity-types.mjs.map +1 -0
- package/resources/v1-beta/index.d.mts +4 -0
- package/resources/v1-beta/index.d.mts.map +1 -0
- package/resources/v1-beta/index.d.ts +4 -0
- package/resources/v1-beta/index.d.ts.map +1 -0
- package/resources/v1-beta/index.js +11 -0
- package/resources/v1-beta/index.js.map +1 -0
- package/resources/v1-beta/index.mjs +5 -0
- package/resources/v1-beta/index.mjs.map +1 -0
- package/resources/v1-beta/v1-beta.d.mts +14 -0
- package/resources/v1-beta/v1-beta.d.mts.map +1 -0
- package/resources/v1-beta/v1-beta.d.ts +14 -0
- package/resources/v1-beta/v1-beta.d.ts.map +1 -0
- package/resources/v1-beta/v1-beta.js +21 -0
- package/resources/v1-beta/v1-beta.js.map +1 -0
- package/resources/v1-beta/v1-beta.mjs +16 -0
- package/resources/v1-beta/v1-beta.mjs.map +1 -0
- package/resources/v1-beta.d.mts +2 -0
- package/resources/v1-beta.d.mts.map +1 -0
- package/resources/v1-beta.d.ts +2 -0
- package/resources/v1-beta.d.ts.map +1 -0
- package/resources/v1-beta.js +6 -0
- package/resources/v1-beta.js.map +1 -0
- package/resources/v1-beta.mjs +3 -0
- package/resources/v1-beta.mjs.map +1 -0
- package/resources/v1.d.mts.map +1 -1
- package/resources/v1.d.ts.map +1 -1
- package/resources/v1.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +17 -4
- package/src/resources/index.ts +1 -0
- package/src/resources/v1/addons/addons.ts +286 -39
- package/src/resources/v1/addons/entitlements.ts +158 -10
- package/src/resources/v1/addons/index.ts +5 -0
- package/src/resources/v1/coupons.ts +154 -23
- package/src/resources/v1/credits/consumption.ts +266 -0
- package/src/resources/v1/credits/credits.ts +185 -23
- package/src/resources/v1/credits/custom-currencies.ts +188 -30
- package/src/resources/v1/credits/grants.ts +102 -24
- package/src/resources/v1/credits/index.ts +11 -0
- package/src/resources/v1/customers/customers.ts +338 -62
- package/src/resources/v1/customers/index.ts +8 -1
- package/src/resources/v1/customers/integrations.ts +140 -18
- package/src/resources/v1/customers/payment-method.ts +70 -10
- package/src/resources/v1/customers/promotional-entitlements.ts +82 -11
- package/src/resources/v1/events/beta/beta.ts +19 -0
- package/src/resources/v1/events/beta/customers.ts +212 -0
- package/src/resources/v1/events/beta/index.ts +8 -0
- package/src/resources/v1/events/beta.ts +3 -0
- package/src/resources/v1/events/data-export/data-export.ts +316 -0
- package/src/resources/v1/events/data-export/destinations.ts +434 -0
- package/src/resources/v1/events/data-export/index.ts +20 -0
- package/src/resources/v1/events/data-export.ts +3 -0
- package/src/resources/v1/events/events.ts +132 -0
- package/src/resources/v1/events/index.ts +13 -0
- package/src/resources/v1/events.ts +1 -75
- package/src/resources/v1/features.ts +204 -34
- package/src/resources/v1/index.ts +20 -1
- package/src/resources/v1/plans/entitlements.ts +158 -10
- package/src/resources/v1/plans/index.ts +5 -0
- package/src/resources/v1/plans/plans.ts +314 -43
- package/src/resources/v1/products.ts +189 -27
- package/src/resources/v1/subscriptions/future-update.ts +68 -5
- package/src/resources/v1/subscriptions/index.ts +9 -2
- package/src/resources/v1/subscriptions/invoice.ts +36 -3
- package/src/resources/v1/subscriptions/subscriptions.ts +423 -83
- package/src/resources/v1/subscriptions/usage.ts +61 -5
- package/src/resources/v1/usage.ts +97 -5
- package/src/resources/v1/v1.ts +40 -2
- package/src/resources/v1-beta/customers/assignments.ts +336 -0
- package/src/resources/v1-beta/customers/customers.ts +71 -0
- package/src/resources/v1-beta/customers/entities.ts +492 -0
- package/src/resources/v1-beta/customers/entitlements.ts +366 -0
- package/src/resources/v1-beta/customers/index.ts +26 -0
- package/src/resources/v1-beta/customers.ts +3 -0
- package/src/resources/v1-beta/entity-types.ts +225 -0
- package/src/resources/v1-beta/index.ts +12 -0
- package/src/resources/v1-beta/v1-beta.ts +35 -0
- package/src/resources/v1-beta.ts +3 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
5
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
8
9
|
|
|
@@ -14,15 +15,40 @@ export class Products extends APIResource {
|
|
|
14
15
|
* Archives a product, preventing new subscriptions. All plans and addons are
|
|
15
16
|
* archived.
|
|
16
17
|
*/
|
|
17
|
-
archiveProduct(
|
|
18
|
-
|
|
18
|
+
archiveProduct(
|
|
19
|
+
id: string,
|
|
20
|
+
params: ProductArchiveProductParams | null | undefined = {},
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): APIPromise<Product> {
|
|
23
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
24
|
+
return this._client.post(path`/api/v1/products/${id}/archive`, {
|
|
25
|
+
...options,
|
|
26
|
+
headers: buildHeaders([
|
|
27
|
+
{
|
|
28
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
29
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
30
|
+
},
|
|
31
|
+
options?.headers,
|
|
32
|
+
]),
|
|
33
|
+
});
|
|
19
34
|
}
|
|
20
35
|
|
|
21
36
|
/**
|
|
22
37
|
* Creates a new product.
|
|
23
38
|
*/
|
|
24
|
-
createProduct(
|
|
25
|
-
|
|
39
|
+
createProduct(params: ProductCreateProductParams, options?: RequestOptions): APIPromise<Product> {
|
|
40
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
41
|
+
return this._client.post('/api/v1/products', {
|
|
42
|
+
body,
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([
|
|
45
|
+
{
|
|
46
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
47
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
48
|
+
},
|
|
49
|
+
options?.headers,
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
26
52
|
}
|
|
27
53
|
|
|
28
54
|
/**
|
|
@@ -30,38 +56,86 @@ export class Products extends APIResource {
|
|
|
30
56
|
*/
|
|
31
57
|
duplicateProduct(
|
|
32
58
|
id: string,
|
|
33
|
-
|
|
59
|
+
params: ProductDuplicateProductParams,
|
|
34
60
|
options?: RequestOptions,
|
|
35
61
|
): APIPromise<Product> {
|
|
36
|
-
|
|
62
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
63
|
+
return this._client.post(path`/api/v1/products/${id}/duplicate`, {
|
|
64
|
+
body,
|
|
65
|
+
...options,
|
|
66
|
+
headers: buildHeaders([
|
|
67
|
+
{
|
|
68
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
69
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
70
|
+
},
|
|
71
|
+
options?.headers,
|
|
72
|
+
]),
|
|
73
|
+
});
|
|
37
74
|
}
|
|
38
75
|
|
|
39
76
|
/**
|
|
40
77
|
* Retrieves a paginated list of products in the environment.
|
|
41
78
|
*/
|
|
42
79
|
listProducts(
|
|
43
|
-
|
|
80
|
+
params: ProductListProductsParams | null | undefined = {},
|
|
44
81
|
options?: RequestOptions,
|
|
45
82
|
): PagePromise<ProductListProductsResponsesMyCursorIDPage, ProductListProductsResponse> {
|
|
83
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
46
84
|
return this._client.getAPIList('/api/v1/products', MyCursorIDPage<ProductListProductsResponse>, {
|
|
47
85
|
query,
|
|
48
86
|
...options,
|
|
87
|
+
headers: buildHeaders([
|
|
88
|
+
{
|
|
89
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
90
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
91
|
+
},
|
|
92
|
+
options?.headers,
|
|
93
|
+
]),
|
|
49
94
|
});
|
|
50
95
|
}
|
|
51
96
|
|
|
52
97
|
/**
|
|
53
98
|
* Restores an archived product, allowing new subscriptions to be created.
|
|
54
99
|
*/
|
|
55
|
-
unarchiveProduct(
|
|
56
|
-
|
|
100
|
+
unarchiveProduct(
|
|
101
|
+
id: string,
|
|
102
|
+
params: ProductUnarchiveProductParams | null | undefined = {},
|
|
103
|
+
options?: RequestOptions,
|
|
104
|
+
): APIPromise<Product> {
|
|
105
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
106
|
+
return this._client.post(path`/api/v1/products/${id}/unarchive`, {
|
|
107
|
+
...options,
|
|
108
|
+
headers: buildHeaders([
|
|
109
|
+
{
|
|
110
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
111
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
112
|
+
},
|
|
113
|
+
options?.headers,
|
|
114
|
+
]),
|
|
115
|
+
});
|
|
57
116
|
}
|
|
58
117
|
|
|
59
118
|
/**
|
|
60
119
|
* Updates an existing product's properties such as display name, description, and
|
|
61
120
|
* metadata.
|
|
62
121
|
*/
|
|
63
|
-
updateProduct(
|
|
64
|
-
|
|
122
|
+
updateProduct(
|
|
123
|
+
id: string,
|
|
124
|
+
params: ProductUpdateProductParams,
|
|
125
|
+
options?: RequestOptions,
|
|
126
|
+
): APIPromise<Product> {
|
|
127
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
128
|
+
return this._client.patch(path`/api/v1/products/${id}`, {
|
|
129
|
+
body,
|
|
130
|
+
...options,
|
|
131
|
+
headers: buildHeaders([
|
|
132
|
+
{
|
|
133
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
134
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
135
|
+
},
|
|
136
|
+
options?.headers,
|
|
137
|
+
]),
|
|
138
|
+
});
|
|
65
139
|
}
|
|
66
140
|
}
|
|
67
141
|
|
|
@@ -255,65 +329,120 @@ export namespace ProductListProductsResponse {
|
|
|
255
329
|
}
|
|
256
330
|
}
|
|
257
331
|
|
|
332
|
+
export interface ProductArchiveProductParams {
|
|
333
|
+
/**
|
|
334
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
335
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
336
|
+
*/
|
|
337
|
+
'X-ACCOUNT-ID'?: string;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
341
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
342
|
+
* key).
|
|
343
|
+
*/
|
|
344
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
258
347
|
export interface ProductCreateProductParams {
|
|
259
348
|
/**
|
|
260
|
-
* The unique identifier for the entity
|
|
349
|
+
* Body param: The unique identifier for the entity
|
|
261
350
|
*/
|
|
262
351
|
id: string;
|
|
263
352
|
|
|
264
353
|
/**
|
|
265
|
-
* Display name of the product
|
|
354
|
+
* Body param: Display name of the product
|
|
266
355
|
*/
|
|
267
356
|
displayName: string;
|
|
268
357
|
|
|
269
358
|
/**
|
|
270
|
-
* Description of the product
|
|
359
|
+
* Body param: Description of the product
|
|
271
360
|
*/
|
|
272
361
|
description?: string | null;
|
|
273
362
|
|
|
274
363
|
/**
|
|
275
|
-
* Additional metadata for the product
|
|
364
|
+
* Body param: Additional metadata for the product
|
|
276
365
|
*/
|
|
277
366
|
metadata?: { [key: string]: string } | null;
|
|
278
367
|
|
|
279
368
|
/**
|
|
280
|
-
* Indicates if multiple subscriptions to this product are allowed
|
|
369
|
+
* Body param: Indicates if multiple subscriptions to this product are allowed
|
|
281
370
|
*/
|
|
282
371
|
multipleSubscriptions?: boolean;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
375
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
376
|
+
*/
|
|
377
|
+
'X-ACCOUNT-ID'?: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
381
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
382
|
+
* intrinsic to the key).
|
|
383
|
+
*/
|
|
384
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
283
385
|
}
|
|
284
386
|
|
|
285
387
|
export interface ProductDuplicateProductParams {
|
|
286
388
|
/**
|
|
287
|
-
* The unique identifier for the entity
|
|
389
|
+
* Body param: The unique identifier for the entity
|
|
288
390
|
*/
|
|
289
391
|
targetId: string;
|
|
290
392
|
|
|
291
393
|
/**
|
|
292
|
-
* Description of the product
|
|
394
|
+
* Body param: Description of the product
|
|
293
395
|
*/
|
|
294
396
|
description?: string | null;
|
|
295
397
|
|
|
296
398
|
/**
|
|
297
|
-
* Display name of the product
|
|
399
|
+
* Body param: Display name of the product
|
|
298
400
|
*/
|
|
299
401
|
displayName?: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
405
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
406
|
+
*/
|
|
407
|
+
'X-ACCOUNT-ID'?: string;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
411
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
412
|
+
* intrinsic to the key).
|
|
413
|
+
*/
|
|
414
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
300
415
|
}
|
|
301
416
|
|
|
302
417
|
export interface ProductListProductsParams extends MyCursorIDPageParams {
|
|
303
418
|
/**
|
|
304
|
-
* Filter by entity ID
|
|
419
|
+
* Query param: Filter by entity ID
|
|
305
420
|
*/
|
|
306
421
|
id?: string;
|
|
307
422
|
|
|
308
423
|
/**
|
|
309
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
424
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
310
425
|
*/
|
|
311
426
|
createdAt?: ProductListProductsParams.CreatedAt;
|
|
312
427
|
|
|
313
428
|
/**
|
|
314
|
-
* Filter by product status. Supports comma-separated values for
|
|
429
|
+
* Query param: Filter by product status. Supports comma-separated values for
|
|
430
|
+
* multiple statuses
|
|
315
431
|
*/
|
|
316
432
|
status?: Array<'PUBLISHED' | 'ARCHIVED'>;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
436
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
437
|
+
*/
|
|
438
|
+
'X-ACCOUNT-ID'?: string;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
442
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
443
|
+
* intrinsic to the key).
|
|
444
|
+
*/
|
|
445
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
317
446
|
}
|
|
318
447
|
|
|
319
448
|
export namespace ProductListProductsParams {
|
|
@@ -343,33 +472,64 @@ export namespace ProductListProductsParams {
|
|
|
343
472
|
}
|
|
344
473
|
}
|
|
345
474
|
|
|
475
|
+
export interface ProductUnarchiveProductParams {
|
|
476
|
+
/**
|
|
477
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
478
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
479
|
+
*/
|
|
480
|
+
'X-ACCOUNT-ID'?: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
484
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
485
|
+
* key).
|
|
486
|
+
*/
|
|
487
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
488
|
+
}
|
|
489
|
+
|
|
346
490
|
export interface ProductUpdateProductParams {
|
|
347
491
|
/**
|
|
348
|
-
* Description of the product
|
|
492
|
+
* Body param: Description of the product
|
|
349
493
|
*/
|
|
350
494
|
description?: string | null;
|
|
351
495
|
|
|
352
496
|
/**
|
|
353
|
-
* Display name of the product
|
|
497
|
+
* Body param: Display name of the product
|
|
354
498
|
*/
|
|
355
499
|
displayName?: string;
|
|
356
500
|
|
|
357
501
|
/**
|
|
358
|
-
* Additional metadata for the product
|
|
502
|
+
* Body param: Additional metadata for the product
|
|
359
503
|
*/
|
|
360
504
|
metadata?: { [key: string]: string } | null;
|
|
361
505
|
|
|
362
506
|
/**
|
|
363
|
-
* Indicates if multiple subscriptions to this product are allowed
|
|
507
|
+
* Body param: Indicates if multiple subscriptions to this product are allowed
|
|
364
508
|
*/
|
|
365
509
|
multipleSubscriptions?: boolean;
|
|
366
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Body param
|
|
513
|
+
*/
|
|
367
514
|
productSettings?: ProductUpdateProductParams.ProductSettings;
|
|
368
515
|
|
|
369
516
|
/**
|
|
370
|
-
* Rule defining when usage resets upon subscription update.
|
|
517
|
+
* Body param: Rule defining when usage resets upon subscription update.
|
|
371
518
|
*/
|
|
372
519
|
usageResetCutoffRule?: ProductUpdateProductParams.UsageResetCutoffRule;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
523
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
524
|
+
*/
|
|
525
|
+
'X-ACCOUNT-ID'?: string;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
529
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
530
|
+
* intrinsic to the key).
|
|
531
|
+
*/
|
|
532
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
373
533
|
}
|
|
374
534
|
|
|
375
535
|
export namespace ProductUpdateProductParams {
|
|
@@ -422,9 +582,11 @@ export declare namespace Products {
|
|
|
422
582
|
type Product as Product,
|
|
423
583
|
type ProductListProductsResponse as ProductListProductsResponse,
|
|
424
584
|
type ProductListProductsResponsesMyCursorIDPage as ProductListProductsResponsesMyCursorIDPage,
|
|
585
|
+
type ProductArchiveProductParams as ProductArchiveProductParams,
|
|
425
586
|
type ProductCreateProductParams as ProductCreateProductParams,
|
|
426
587
|
type ProductDuplicateProductParams as ProductDuplicateProductParams,
|
|
427
588
|
type ProductListProductsParams as ProductListProductsParams,
|
|
589
|
+
type ProductUnarchiveProductParams as ProductUnarchiveProductParams,
|
|
428
590
|
type ProductUpdateProductParams as ProductUpdateProductParams,
|
|
429
591
|
};
|
|
430
592
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
5
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
6
7
|
import { path } from '../../../internal/utils/path';
|
|
7
8
|
|
|
@@ -12,16 +13,44 @@ export class FutureUpdate extends APIResource {
|
|
|
12
13
|
/**
|
|
13
14
|
* Cancels a subscription update that is pending payment completion.
|
|
14
15
|
*/
|
|
15
|
-
cancelPendingPayment(
|
|
16
|
-
|
|
16
|
+
cancelPendingPayment(
|
|
17
|
+
id: string,
|
|
18
|
+
params: FutureUpdateCancelPendingPaymentParams | null | undefined = {},
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): APIPromise<CancelSubscription> {
|
|
21
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
22
|
+
return this._client.delete(path`/api/v1/subscriptions/${id}/future-update/pending-payment`, {
|
|
23
|
+
...options,
|
|
24
|
+
headers: buildHeaders([
|
|
25
|
+
{
|
|
26
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
27
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
28
|
+
},
|
|
29
|
+
options?.headers,
|
|
30
|
+
]),
|
|
31
|
+
});
|
|
17
32
|
}
|
|
18
33
|
|
|
19
34
|
/**
|
|
20
35
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
21
36
|
* change.
|
|
22
37
|
*/
|
|
23
|
-
cancelSchedule(
|
|
24
|
-
|
|
38
|
+
cancelSchedule(
|
|
39
|
+
id: string,
|
|
40
|
+
params: FutureUpdateCancelScheduleParams | null | undefined = {},
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): APIPromise<CancelSubscription> {
|
|
43
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
44
|
+
return this._client.delete(path`/api/v1/subscriptions/${id}/future-update/schedule`, {
|
|
45
|
+
...options,
|
|
46
|
+
headers: buildHeaders([
|
|
47
|
+
{
|
|
48
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
49
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
50
|
+
},
|
|
51
|
+
options?.headers,
|
|
52
|
+
]),
|
|
53
|
+
});
|
|
25
54
|
}
|
|
26
55
|
}
|
|
27
56
|
|
|
@@ -41,6 +70,40 @@ export namespace CancelSubscription {
|
|
|
41
70
|
}
|
|
42
71
|
}
|
|
43
72
|
|
|
73
|
+
export interface FutureUpdateCancelPendingPaymentParams {
|
|
74
|
+
/**
|
|
75
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
76
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
77
|
+
*/
|
|
78
|
+
'X-ACCOUNT-ID'?: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
82
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
83
|
+
* key).
|
|
84
|
+
*/
|
|
85
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface FutureUpdateCancelScheduleParams {
|
|
89
|
+
/**
|
|
90
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
91
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
92
|
+
*/
|
|
93
|
+
'X-ACCOUNT-ID'?: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
97
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
98
|
+
* key).
|
|
99
|
+
*/
|
|
100
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
44
103
|
export declare namespace FutureUpdate {
|
|
45
|
-
export {
|
|
104
|
+
export {
|
|
105
|
+
type CancelSubscription as CancelSubscription,
|
|
106
|
+
type FutureUpdateCancelPendingPaymentParams as FutureUpdateCancelPendingPaymentParams,
|
|
107
|
+
type FutureUpdateCancelScheduleParams as FutureUpdateCancelScheduleParams,
|
|
108
|
+
};
|
|
46
109
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
|
|
3
|
+
export {
|
|
4
|
+
FutureUpdate,
|
|
5
|
+
type CancelSubscription,
|
|
6
|
+
type FutureUpdateCancelPendingPaymentParams,
|
|
7
|
+
type FutureUpdateCancelScheduleParams,
|
|
8
|
+
} from './future-update';
|
|
9
|
+
export { Invoice, type InvoiceMarkAsPaidResponse, type InvoiceMarkAsPaidParams } from './invoice';
|
|
5
10
|
export {
|
|
6
11
|
Subscriptions,
|
|
7
12
|
type Subscription,
|
|
@@ -9,6 +14,7 @@ export {
|
|
|
9
14
|
type SubscriptionImportResponse,
|
|
10
15
|
type SubscriptionPreviewResponse,
|
|
11
16
|
type SubscriptionProvisionResponse,
|
|
17
|
+
type SubscriptionRetrieveParams,
|
|
12
18
|
type SubscriptionUpdateParams,
|
|
13
19
|
type SubscriptionListParams,
|
|
14
20
|
type SubscriptionCancelParams,
|
|
@@ -25,4 +31,5 @@ export {
|
|
|
25
31
|
type UsageChargeUsageResponse,
|
|
26
32
|
type UsageSyncResponse,
|
|
27
33
|
type UsageChargeUsageParams,
|
|
34
|
+
type UsageSyncParams,
|
|
28
35
|
} from './usage';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
5
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
6
7
|
import { path } from '../../../internal/utils/path';
|
|
7
8
|
|
|
@@ -13,8 +14,22 @@ export class Invoice extends APIResource {
|
|
|
13
14
|
* Marks the latest invoice of a subscription as paid in the billing provider. The
|
|
14
15
|
* invoice must exist and have an OPEN status.
|
|
15
16
|
*/
|
|
16
|
-
markAsPaid(
|
|
17
|
-
|
|
17
|
+
markAsPaid(
|
|
18
|
+
id: string,
|
|
19
|
+
params: InvoiceMarkAsPaidParams | null | undefined = {},
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): APIPromise<InvoiceMarkAsPaidResponse> {
|
|
22
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
23
|
+
return this._client.post(path`/api/v1/subscriptions/${id}/invoice/paid`, {
|
|
24
|
+
...options,
|
|
25
|
+
headers: buildHeaders([
|
|
26
|
+
{
|
|
27
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
28
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
29
|
+
},
|
|
30
|
+
options?.headers,
|
|
31
|
+
]),
|
|
32
|
+
});
|
|
18
33
|
}
|
|
19
34
|
}
|
|
20
35
|
|
|
@@ -40,6 +55,24 @@ export namespace InvoiceMarkAsPaidResponse {
|
|
|
40
55
|
}
|
|
41
56
|
}
|
|
42
57
|
|
|
58
|
+
export interface InvoiceMarkAsPaidParams {
|
|
59
|
+
/**
|
|
60
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
61
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
62
|
+
*/
|
|
63
|
+
'X-ACCOUNT-ID'?: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
67
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
68
|
+
* key).
|
|
69
|
+
*/
|
|
70
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
43
73
|
export declare namespace Invoice {
|
|
44
|
-
export {
|
|
74
|
+
export {
|
|
75
|
+
type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse,
|
|
76
|
+
type InvoiceMarkAsPaidParams as InvoiceMarkAsPaidParams,
|
|
77
|
+
};
|
|
45
78
|
}
|