@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
|
@@ -9,13 +9,16 @@ export {
|
|
|
9
9
|
type CustomerImportResponse,
|
|
10
10
|
type CustomerListResourcesResponse,
|
|
11
11
|
type CustomerRetrieveEntitlementsResponse,
|
|
12
|
+
type CustomerRetrieveParams,
|
|
12
13
|
type CustomerUpdateParams,
|
|
13
14
|
type CustomerListParams,
|
|
15
|
+
type CustomerArchiveParams,
|
|
14
16
|
type CustomerCheckEntitlementParams,
|
|
15
17
|
type CustomerImportParams,
|
|
16
18
|
type CustomerListResourcesParams,
|
|
17
19
|
type CustomerProvisionParams,
|
|
18
20
|
type CustomerRetrieveEntitlementsParams,
|
|
21
|
+
type CustomerUnarchiveParams,
|
|
19
22
|
type CustomerListResponsesMyCursorIDPage,
|
|
20
23
|
type CustomerListResourcesResponsesMyCursorIDPage,
|
|
21
24
|
} from './customers';
|
|
@@ -29,7 +32,11 @@ export {
|
|
|
29
32
|
type IntegrationUnlinkParams,
|
|
30
33
|
type IntegrationListResponsesMyCursorIDPage,
|
|
31
34
|
} from './integrations';
|
|
32
|
-
export {
|
|
35
|
+
export {
|
|
36
|
+
PaymentMethod,
|
|
37
|
+
type PaymentMethodAttachParams,
|
|
38
|
+
type PaymentMethodDetachParams,
|
|
39
|
+
} from './payment-method';
|
|
33
40
|
export {
|
|
34
41
|
PromotionalEntitlements,
|
|
35
42
|
type PromotionalEntitlementCreateResponse,
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as CustomersAPI from './customers';
|
|
5
5
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
6
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
7
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
7
8
|
import { RequestOptions } from '../../../internal/request-options';
|
|
8
9
|
import { path } from '../../../internal/utils/path';
|
|
9
10
|
|
|
@@ -16,8 +17,17 @@ export class Integrations extends APIResource {
|
|
|
16
17
|
params: IntegrationRetrieveParams,
|
|
17
18
|
options?: RequestOptions,
|
|
18
19
|
): APIPromise<CustomersAPI.CustomerIntegrationResponse> {
|
|
19
|
-
const { id } = params;
|
|
20
|
-
return this._client.get(path`/api/v1/customers/${id}/integrations/${integrationID}`,
|
|
20
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
21
|
+
return this._client.get(path`/api/v1/customers/${id}/integrations/${integrationID}`, {
|
|
22
|
+
...options,
|
|
23
|
+
headers: buildHeaders([
|
|
24
|
+
{
|
|
25
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
26
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
27
|
+
},
|
|
28
|
+
options?.headers,
|
|
29
|
+
]),
|
|
30
|
+
});
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
/**
|
|
@@ -29,10 +39,17 @@ export class Integrations extends APIResource {
|
|
|
29
39
|
params: IntegrationUpdateParams,
|
|
30
40
|
options?: RequestOptions,
|
|
31
41
|
): APIPromise<CustomersAPI.CustomerIntegrationResponse> {
|
|
32
|
-
const { id, ...body } = params;
|
|
42
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
33
43
|
return this._client.patch(path`/api/v1/customers/${id}/integrations/${integrationID}`, {
|
|
34
44
|
body,
|
|
35
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
|
+
]),
|
|
36
53
|
});
|
|
37
54
|
}
|
|
38
55
|
|
|
@@ -42,13 +59,24 @@ export class Integrations extends APIResource {
|
|
|
42
59
|
*/
|
|
43
60
|
list(
|
|
44
61
|
id: string,
|
|
45
|
-
|
|
62
|
+
params: IntegrationListParams | null | undefined = {},
|
|
46
63
|
options?: RequestOptions,
|
|
47
64
|
): PagePromise<IntegrationListResponsesMyCursorIDPage, IntegrationListResponse> {
|
|
65
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
48
66
|
return this._client.getAPIList(
|
|
49
67
|
path`/api/v1/customers/${id}/integrations`,
|
|
50
68
|
MyCursorIDPage<IntegrationListResponse>,
|
|
51
|
-
{
|
|
69
|
+
{
|
|
70
|
+
query,
|
|
71
|
+
...options,
|
|
72
|
+
headers: buildHeaders([
|
|
73
|
+
{
|
|
74
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
75
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
76
|
+
},
|
|
77
|
+
options?.headers,
|
|
78
|
+
]),
|
|
79
|
+
},
|
|
52
80
|
);
|
|
53
81
|
}
|
|
54
82
|
|
|
@@ -58,10 +86,21 @@ export class Integrations extends APIResource {
|
|
|
58
86
|
*/
|
|
59
87
|
link(
|
|
60
88
|
id: string,
|
|
61
|
-
|
|
89
|
+
params: IntegrationLinkParams,
|
|
62
90
|
options?: RequestOptions,
|
|
63
91
|
): APIPromise<CustomersAPI.CustomerIntegrationResponse> {
|
|
64
|
-
|
|
92
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
93
|
+
return this._client.post(path`/api/v1/customers/${id}/integrations`, {
|
|
94
|
+
body,
|
|
95
|
+
...options,
|
|
96
|
+
headers: buildHeaders([
|
|
97
|
+
{
|
|
98
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
99
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
100
|
+
},
|
|
101
|
+
options?.headers,
|
|
102
|
+
]),
|
|
103
|
+
});
|
|
65
104
|
}
|
|
66
105
|
|
|
67
106
|
/**
|
|
@@ -72,8 +111,17 @@ export class Integrations extends APIResource {
|
|
|
72
111
|
params: IntegrationUnlinkParams,
|
|
73
112
|
options?: RequestOptions,
|
|
74
113
|
): APIPromise<CustomersAPI.CustomerIntegrationResponse> {
|
|
75
|
-
const { id } = params;
|
|
76
|
-
return this._client.delete(path`/api/v1/customers/${id}/integrations/${integrationID}`,
|
|
114
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
115
|
+
return this._client.delete(path`/api/v1/customers/${id}/integrations/${integrationID}`, {
|
|
116
|
+
...options,
|
|
117
|
+
headers: buildHeaders([
|
|
118
|
+
{
|
|
119
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
120
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
121
|
+
},
|
|
122
|
+
options?.headers,
|
|
123
|
+
]),
|
|
124
|
+
});
|
|
77
125
|
}
|
|
78
126
|
}
|
|
79
127
|
|
|
@@ -106,7 +154,10 @@ export interface IntegrationListResponse {
|
|
|
106
154
|
| 'SALESFORCE'
|
|
107
155
|
| 'BIG_QUERY'
|
|
108
156
|
| 'OPEN_FGA'
|
|
109
|
-
| 'APP_STORE'
|
|
157
|
+
| 'APP_STORE'
|
|
158
|
+
| 'RECEIVED'
|
|
159
|
+
| 'PREQUEL'
|
|
160
|
+
| 'AIRWALLEX';
|
|
110
161
|
|
|
111
162
|
/**
|
|
112
163
|
* Price billing sync revision data containing billing ID, link URL, and price
|
|
@@ -169,9 +220,22 @@ export namespace IntegrationListResponse {
|
|
|
169
220
|
|
|
170
221
|
export interface IntegrationRetrieveParams {
|
|
171
222
|
/**
|
|
172
|
-
* Customer slug
|
|
223
|
+
* Path param: Customer slug
|
|
173
224
|
*/
|
|
174
225
|
id: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
229
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
230
|
+
*/
|
|
231
|
+
'X-ACCOUNT-ID'?: string;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
235
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
236
|
+
* intrinsic to the key).
|
|
237
|
+
*/
|
|
238
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
175
239
|
}
|
|
176
240
|
|
|
177
241
|
export interface IntegrationUpdateParams {
|
|
@@ -184,12 +248,25 @@ export interface IntegrationUpdateParams {
|
|
|
184
248
|
* Body param: Synced entity id
|
|
185
249
|
*/
|
|
186
250
|
syncedEntityId: string | null;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
254
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
255
|
+
*/
|
|
256
|
+
'X-ACCOUNT-ID'?: string;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
260
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
261
|
+
* intrinsic to the key).
|
|
262
|
+
*/
|
|
263
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
187
264
|
}
|
|
188
265
|
|
|
189
266
|
export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
190
267
|
/**
|
|
191
|
-
* Filter by vendor identifier. Supports comma-separated values for
|
|
192
|
-
* vendors (e.g., STRIPE,HUBSPOT)
|
|
268
|
+
* Query param: Filter by vendor identifier. Supports comma-separated values for
|
|
269
|
+
* multiple vendors (e.g., STRIPE,HUBSPOT)
|
|
193
270
|
*/
|
|
194
271
|
vendorIdentifier?: Array<
|
|
195
272
|
| 'AUTH0'
|
|
@@ -202,22 +279,38 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
|
202
279
|
| 'BIG_QUERY'
|
|
203
280
|
| 'OPEN_FGA'
|
|
204
281
|
| 'APP_STORE'
|
|
282
|
+
| 'RECEIVED'
|
|
283
|
+
| 'PREQUEL'
|
|
284
|
+
| 'AIRWALLEX'
|
|
205
285
|
>;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
289
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
290
|
+
*/
|
|
291
|
+
'X-ACCOUNT-ID'?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
295
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
296
|
+
* intrinsic to the key).
|
|
297
|
+
*/
|
|
298
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
206
299
|
}
|
|
207
300
|
|
|
208
301
|
export interface IntegrationLinkParams {
|
|
209
302
|
/**
|
|
210
|
-
* Integration details
|
|
303
|
+
* Body param: Integration details
|
|
211
304
|
*/
|
|
212
305
|
id: string;
|
|
213
306
|
|
|
214
307
|
/**
|
|
215
|
-
* Synced entity id
|
|
308
|
+
* Body param: Synced entity id
|
|
216
309
|
*/
|
|
217
310
|
syncedEntityId: string;
|
|
218
311
|
|
|
219
312
|
/**
|
|
220
|
-
* The vendor identifier of integration
|
|
313
|
+
* Body param: The vendor identifier of integration
|
|
221
314
|
*/
|
|
222
315
|
vendorIdentifier:
|
|
223
316
|
| 'AUTH0'
|
|
@@ -229,14 +322,43 @@ export interface IntegrationLinkParams {
|
|
|
229
322
|
| 'SALESFORCE'
|
|
230
323
|
| 'BIG_QUERY'
|
|
231
324
|
| 'OPEN_FGA'
|
|
232
|
-
| 'APP_STORE'
|
|
325
|
+
| 'APP_STORE'
|
|
326
|
+
| 'RECEIVED'
|
|
327
|
+
| 'PREQUEL'
|
|
328
|
+
| 'AIRWALLEX';
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
332
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
333
|
+
*/
|
|
334
|
+
'X-ACCOUNT-ID'?: string;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
338
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
339
|
+
* intrinsic to the key).
|
|
340
|
+
*/
|
|
341
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
233
342
|
}
|
|
234
343
|
|
|
235
344
|
export interface IntegrationUnlinkParams {
|
|
236
345
|
/**
|
|
237
|
-
* Customer slug
|
|
346
|
+
* Path param: Customer slug
|
|
238
347
|
*/
|
|
239
348
|
id: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
352
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
353
|
+
*/
|
|
354
|
+
'X-ACCOUNT-ID'?: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
358
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
359
|
+
* intrinsic to the key).
|
|
360
|
+
*/
|
|
361
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
240
362
|
}
|
|
241
363
|
|
|
242
364
|
export declare namespace Integrations {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as CustomersAPI from './customers';
|
|
5
5
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
8
|
import { path } from '../../../internal/utils/path';
|
|
8
9
|
|
|
@@ -16,34 +17,59 @@ export class PaymentMethod extends APIResource {
|
|
|
16
17
|
*/
|
|
17
18
|
attach(
|
|
18
19
|
id: string,
|
|
19
|
-
|
|
20
|
+
params: PaymentMethodAttachParams,
|
|
20
21
|
options?: RequestOptions,
|
|
21
22
|
): APIPromise<CustomersAPI.CustomerResponse> {
|
|
22
|
-
|
|
23
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
24
|
+
return this._client.post(path`/api/v1/customers/${id}/payment-method`, {
|
|
25
|
+
body,
|
|
26
|
+
...options,
|
|
27
|
+
headers: buildHeaders([
|
|
28
|
+
{
|
|
29
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
30
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
31
|
+
},
|
|
32
|
+
options?.headers,
|
|
33
|
+
]),
|
|
34
|
+
});
|
|
23
35
|
}
|
|
24
36
|
|
|
25
37
|
/**
|
|
26
38
|
* Removes the payment method from a customer. Ensure active paid subscriptions
|
|
27
39
|
* have an alternative payment method.
|
|
28
40
|
*/
|
|
29
|
-
detach(
|
|
30
|
-
|
|
41
|
+
detach(
|
|
42
|
+
id: string,
|
|
43
|
+
params: PaymentMethodDetachParams | null | undefined = {},
|
|
44
|
+
options?: RequestOptions,
|
|
45
|
+
): APIPromise<CustomersAPI.CustomerResponse> {
|
|
46
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
47
|
+
return this._client.delete(path`/api/v1/customers/${id}/payment-method`, {
|
|
48
|
+
...options,
|
|
49
|
+
headers: buildHeaders([
|
|
50
|
+
{
|
|
51
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
52
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
53
|
+
},
|
|
54
|
+
options?.headers,
|
|
55
|
+
]),
|
|
56
|
+
});
|
|
31
57
|
}
|
|
32
58
|
}
|
|
33
59
|
|
|
34
60
|
export interface PaymentMethodAttachParams {
|
|
35
61
|
/**
|
|
36
|
-
* Integration details
|
|
62
|
+
* Body param: Integration details
|
|
37
63
|
*/
|
|
38
64
|
integrationId: string;
|
|
39
65
|
|
|
40
66
|
/**
|
|
41
|
-
* Billing provider payment method id
|
|
67
|
+
* Body param: Billing provider payment method id
|
|
42
68
|
*/
|
|
43
69
|
paymentMethodId: string;
|
|
44
70
|
|
|
45
71
|
/**
|
|
46
|
-
* The vendor identifier of integration
|
|
72
|
+
* Body param: The vendor identifier of integration
|
|
47
73
|
*/
|
|
48
74
|
vendorIdentifier:
|
|
49
75
|
| 'AUTH0'
|
|
@@ -55,10 +81,13 @@ export interface PaymentMethodAttachParams {
|
|
|
55
81
|
| 'SALESFORCE'
|
|
56
82
|
| 'BIG_QUERY'
|
|
57
83
|
| 'OPEN_FGA'
|
|
58
|
-
| 'APP_STORE'
|
|
84
|
+
| 'APP_STORE'
|
|
85
|
+
| 'RECEIVED'
|
|
86
|
+
| 'PREQUEL'
|
|
87
|
+
| 'AIRWALLEX';
|
|
59
88
|
|
|
60
89
|
/**
|
|
61
|
-
* Customers selected currency
|
|
90
|
+
* Body param: Customers selected currency
|
|
62
91
|
*/
|
|
63
92
|
billingCurrency?:
|
|
64
93
|
| 'usd'
|
|
@@ -178,8 +207,39 @@ export interface PaymentMethodAttachParams {
|
|
|
178
207
|
| 'xof'
|
|
179
208
|
| 'xpf'
|
|
180
209
|
| null;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
213
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
214
|
+
*/
|
|
215
|
+
'X-ACCOUNT-ID'?: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
219
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
220
|
+
* intrinsic to the key).
|
|
221
|
+
*/
|
|
222
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface PaymentMethodDetachParams {
|
|
226
|
+
/**
|
|
227
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
228
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
229
|
+
*/
|
|
230
|
+
'X-ACCOUNT-ID'?: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
234
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
235
|
+
* key).
|
|
236
|
+
*/
|
|
237
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
181
238
|
}
|
|
182
239
|
|
|
183
240
|
export declare namespace PaymentMethod {
|
|
184
|
-
export {
|
|
241
|
+
export {
|
|
242
|
+
type PaymentMethodAttachParams as PaymentMethodAttachParams,
|
|
243
|
+
type PaymentMethodDetachParams as PaymentMethodDetachParams,
|
|
244
|
+
};
|
|
185
245
|
}
|
|
@@ -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
|
|
|
@@ -16,10 +17,21 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
16
17
|
*/
|
|
17
18
|
create(
|
|
18
19
|
id: string,
|
|
19
|
-
|
|
20
|
+
params: PromotionalEntitlementCreateParams,
|
|
20
21
|
options?: RequestOptions,
|
|
21
22
|
): APIPromise<PromotionalEntitlementCreateResponse> {
|
|
22
|
-
|
|
23
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
24
|
+
return this._client.post(path`/api/v1/customers/${id}/promotional-entitlements`, {
|
|
25
|
+
body,
|
|
26
|
+
...options,
|
|
27
|
+
headers: buildHeaders([
|
|
28
|
+
{
|
|
29
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
30
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
31
|
+
},
|
|
32
|
+
options?.headers,
|
|
33
|
+
]),
|
|
34
|
+
});
|
|
23
35
|
}
|
|
24
36
|
|
|
25
37
|
/**
|
|
@@ -27,13 +39,24 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
27
39
|
*/
|
|
28
40
|
list(
|
|
29
41
|
id: string,
|
|
30
|
-
|
|
42
|
+
params: PromotionalEntitlementListParams | null | undefined = {},
|
|
31
43
|
options?: RequestOptions,
|
|
32
44
|
): PagePromise<PromotionalEntitlementListResponsesMyCursorIDPage, PromotionalEntitlementListResponse> {
|
|
45
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
33
46
|
return this._client.getAPIList(
|
|
34
47
|
path`/api/v1/customers/${id}/promotional-entitlements`,
|
|
35
48
|
MyCursorIDPage<PromotionalEntitlementListResponse>,
|
|
36
|
-
{
|
|
49
|
+
{
|
|
50
|
+
query,
|
|
51
|
+
...options,
|
|
52
|
+
headers: buildHeaders([
|
|
53
|
+
{
|
|
54
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
55
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
56
|
+
},
|
|
57
|
+
options?.headers,
|
|
58
|
+
]),
|
|
59
|
+
},
|
|
37
60
|
);
|
|
38
61
|
}
|
|
39
62
|
|
|
@@ -46,8 +69,17 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
46
69
|
params: PromotionalEntitlementRevokeParams,
|
|
47
70
|
options?: RequestOptions,
|
|
48
71
|
): APIPromise<PromotionalEntitlementRevokeResponse> {
|
|
49
|
-
const { id } = params;
|
|
50
|
-
return this._client.delete(path`/api/v1/customers/${id}/promotional-entitlements/${featureID}`,
|
|
72
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
73
|
+
return this._client.delete(path`/api/v1/customers/${id}/promotional-entitlements/${featureID}`, {
|
|
74
|
+
...options,
|
|
75
|
+
headers: buildHeaders([
|
|
76
|
+
{
|
|
77
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
78
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
79
|
+
},
|
|
80
|
+
options?.headers,
|
|
81
|
+
]),
|
|
82
|
+
});
|
|
51
83
|
}
|
|
52
84
|
}
|
|
53
85
|
|
|
@@ -494,9 +526,22 @@ export namespace PromotionalEntitlementRevokeResponse {
|
|
|
494
526
|
|
|
495
527
|
export interface PromotionalEntitlementCreateParams {
|
|
496
528
|
/**
|
|
497
|
-
* Promotional entitlements to grant
|
|
529
|
+
* Body param: Promotional entitlements to grant
|
|
498
530
|
*/
|
|
499
531
|
promotionalEntitlements: Array<PromotionalEntitlementCreateParams.PromotionalEntitlement>;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
535
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
536
|
+
*/
|
|
537
|
+
'X-ACCOUNT-ID'?: string;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
541
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
542
|
+
* intrinsic to the key).
|
|
543
|
+
*/
|
|
544
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
500
545
|
}
|
|
501
546
|
|
|
502
547
|
export namespace PromotionalEntitlementCreateParams {
|
|
@@ -614,15 +659,28 @@ export namespace PromotionalEntitlementCreateParams {
|
|
|
614
659
|
|
|
615
660
|
export interface PromotionalEntitlementListParams extends MyCursorIDPageParams {
|
|
616
661
|
/**
|
|
617
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
662
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
618
663
|
*/
|
|
619
664
|
createdAt?: PromotionalEntitlementListParams.CreatedAt;
|
|
620
665
|
|
|
621
666
|
/**
|
|
622
|
-
* Filter by promotional entitlement status. Supports comma-separated
|
|
623
|
-
* multiple statuses
|
|
667
|
+
* Query param: Filter by promotional entitlement status. Supports comma-separated
|
|
668
|
+
* values for multiple statuses
|
|
624
669
|
*/
|
|
625
670
|
status?: Array<'Active' | 'Expired' | 'Paused'>;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
674
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
675
|
+
*/
|
|
676
|
+
'X-ACCOUNT-ID'?: string;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
680
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
681
|
+
* intrinsic to the key).
|
|
682
|
+
*/
|
|
683
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
626
684
|
}
|
|
627
685
|
|
|
628
686
|
export namespace PromotionalEntitlementListParams {
|
|
@@ -654,9 +712,22 @@ export namespace PromotionalEntitlementListParams {
|
|
|
654
712
|
|
|
655
713
|
export interface PromotionalEntitlementRevokeParams {
|
|
656
714
|
/**
|
|
657
|
-
* The unique identifier of the customer
|
|
715
|
+
* Path param: The unique identifier of the customer
|
|
658
716
|
*/
|
|
659
717
|
id: string;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
721
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
722
|
+
*/
|
|
723
|
+
'X-ACCOUNT-ID'?: string;
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
727
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
728
|
+
* intrinsic to the key).
|
|
729
|
+
*/
|
|
730
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
660
731
|
}
|
|
661
732
|
|
|
662
733
|
export declare namespace PromotionalEntitlements {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../core/resource';
|
|
4
|
+
import * as CustomersAPI from './customers';
|
|
5
|
+
import { CustomerRetrieveGovernanceParams, CustomerRetrieveGovernanceResponse, Customers } from './customers';
|
|
6
|
+
|
|
7
|
+
export class Beta extends APIResource {
|
|
8
|
+
customers: CustomersAPI.Customers = new CustomersAPI.Customers(this._client);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Beta.Customers = Customers;
|
|
12
|
+
|
|
13
|
+
export declare namespace Beta {
|
|
14
|
+
export {
|
|
15
|
+
Customers as Customers,
|
|
16
|
+
type CustomerRetrieveGovernanceResponse as CustomerRetrieveGovernanceResponse,
|
|
17
|
+
type CustomerRetrieveGovernanceParams as CustomerRetrieveGovernanceParams,
|
|
18
|
+
};
|
|
19
|
+
}
|