@stigg/typescript 0.1.0-beta.3 → 0.1.0-beta.31
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 +236 -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 +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +12 -1
- package/client.js.map +1 -1
- package/client.mjs +12 -1
- 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 +313 -32
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +313 -32
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +114 -15
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +114 -15
- 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/credits.d.mts +114 -25
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +114 -25
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +36 -5
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +36 -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 +2 -2
- package/resources/v1/credits/index.d.mts.map +1 -1
- package/resources/v1/credits/index.d.ts +2 -2
- package/resources/v1/credits/index.d.ts.map +1 -1
- package/resources/v1/credits/index.js.map +1 -1
- 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 +215 -0
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -0
- package/resources/v1/events/data-export/destinations.d.ts +215 -0
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -0
- package/resources/v1/events/data-export/destinations.js +46 -0
- package/resources/v1/events/data-export/destinations.js.map +1 -0
- package/resources/v1/events/data-export/destinations.mjs +42 -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 +496 -32
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +496 -32
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +135 -16
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +135 -16
- 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 +258 -79
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +258 -79
- 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 +52 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +52 -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 +245 -0
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -0
- package/resources/v1-beta/customers/assignments.d.ts +245 -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 +14 -1
- package/src/resources/index.ts +1 -0
- package/src/resources/v1/addons/addons.ts +849 -36
- package/src/resources/v1/addons/entitlements.ts +158 -10
- package/src/resources/v1/addons/index.ts +8 -0
- package/src/resources/v1/coupons.ts +154 -23
- package/src/resources/v1/credits/credits.ts +167 -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 +4 -0
- package/src/resources/v1/customers/customers.ts +333 -62
- package/src/resources/v1/customers/index.ts +8 -1
- package/src/resources/v1/customers/integrations.ts +137 -18
- package/src/resources/v1/customers/payment-method.ts +69 -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 +312 -0
- package/src/resources/v1/events/data-export/destinations.ts +290 -0
- package/src/resources/v1/events/data-export/index.ts +18 -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 +29 -1
- package/src/resources/v1/plans/entitlements.ts +158 -10
- package/src/resources/v1/plans/index.ts +11 -0
- package/src/resources/v1/plans/plans.ts +1440 -37
- 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 +429 -86
- package/src/resources/v1/subscriptions/usage.ts +61 -5
- package/src/resources/v1/usage.ts +86 -5
- package/src/resources/v1/v1.ts +58 -2
- package/src/resources/v1-beta/customers/assignments.ts +331 -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,9 @@ export interface IntegrationListResponse {
|
|
|
106
154
|
| 'SALESFORCE'
|
|
107
155
|
| 'BIG_QUERY'
|
|
108
156
|
| 'OPEN_FGA'
|
|
109
|
-
| 'APP_STORE'
|
|
157
|
+
| 'APP_STORE'
|
|
158
|
+
| 'RECEIVED'
|
|
159
|
+
| 'PREQUEL';
|
|
110
160
|
|
|
111
161
|
/**
|
|
112
162
|
* Price billing sync revision data containing billing ID, link URL, and price
|
|
@@ -169,9 +219,22 @@ export namespace IntegrationListResponse {
|
|
|
169
219
|
|
|
170
220
|
export interface IntegrationRetrieveParams {
|
|
171
221
|
/**
|
|
172
|
-
* Customer slug
|
|
222
|
+
* Path param: Customer slug
|
|
173
223
|
*/
|
|
174
224
|
id: string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
228
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
229
|
+
*/
|
|
230
|
+
'X-ACCOUNT-ID'?: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
234
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
235
|
+
* intrinsic to the key).
|
|
236
|
+
*/
|
|
237
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
175
238
|
}
|
|
176
239
|
|
|
177
240
|
export interface IntegrationUpdateParams {
|
|
@@ -184,12 +247,25 @@ export interface IntegrationUpdateParams {
|
|
|
184
247
|
* Body param: Synced entity id
|
|
185
248
|
*/
|
|
186
249
|
syncedEntityId: string | null;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
253
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
254
|
+
*/
|
|
255
|
+
'X-ACCOUNT-ID'?: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
259
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
260
|
+
* intrinsic to the key).
|
|
261
|
+
*/
|
|
262
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
187
263
|
}
|
|
188
264
|
|
|
189
265
|
export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
190
266
|
/**
|
|
191
|
-
* Filter by vendor identifier. Supports comma-separated values for
|
|
192
|
-
* vendors (e.g., STRIPE,HUBSPOT)
|
|
267
|
+
* Query param: Filter by vendor identifier. Supports comma-separated values for
|
|
268
|
+
* multiple vendors (e.g., STRIPE,HUBSPOT)
|
|
193
269
|
*/
|
|
194
270
|
vendorIdentifier?: Array<
|
|
195
271
|
| 'AUTH0'
|
|
@@ -202,22 +278,37 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
|
202
278
|
| 'BIG_QUERY'
|
|
203
279
|
| 'OPEN_FGA'
|
|
204
280
|
| 'APP_STORE'
|
|
281
|
+
| 'RECEIVED'
|
|
282
|
+
| 'PREQUEL'
|
|
205
283
|
>;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
287
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
288
|
+
*/
|
|
289
|
+
'X-ACCOUNT-ID'?: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
293
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
294
|
+
* intrinsic to the key).
|
|
295
|
+
*/
|
|
296
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
206
297
|
}
|
|
207
298
|
|
|
208
299
|
export interface IntegrationLinkParams {
|
|
209
300
|
/**
|
|
210
|
-
* Integration details
|
|
301
|
+
* Body param: Integration details
|
|
211
302
|
*/
|
|
212
303
|
id: string;
|
|
213
304
|
|
|
214
305
|
/**
|
|
215
|
-
* Synced entity id
|
|
306
|
+
* Body param: Synced entity id
|
|
216
307
|
*/
|
|
217
308
|
syncedEntityId: string;
|
|
218
309
|
|
|
219
310
|
/**
|
|
220
|
-
* The vendor identifier of integration
|
|
311
|
+
* Body param: The vendor identifier of integration
|
|
221
312
|
*/
|
|
222
313
|
vendorIdentifier:
|
|
223
314
|
| 'AUTH0'
|
|
@@ -229,14 +320,42 @@ export interface IntegrationLinkParams {
|
|
|
229
320
|
| 'SALESFORCE'
|
|
230
321
|
| 'BIG_QUERY'
|
|
231
322
|
| 'OPEN_FGA'
|
|
232
|
-
| 'APP_STORE'
|
|
323
|
+
| 'APP_STORE'
|
|
324
|
+
| 'RECEIVED'
|
|
325
|
+
| 'PREQUEL';
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
329
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
330
|
+
*/
|
|
331
|
+
'X-ACCOUNT-ID'?: string;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
335
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
336
|
+
* intrinsic to the key).
|
|
337
|
+
*/
|
|
338
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
233
339
|
}
|
|
234
340
|
|
|
235
341
|
export interface IntegrationUnlinkParams {
|
|
236
342
|
/**
|
|
237
|
-
* Customer slug
|
|
343
|
+
* Path param: Customer slug
|
|
238
344
|
*/
|
|
239
345
|
id: string;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
349
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
350
|
+
*/
|
|
351
|
+
'X-ACCOUNT-ID'?: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
355
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
356
|
+
* intrinsic to the key).
|
|
357
|
+
*/
|
|
358
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
240
359
|
}
|
|
241
360
|
|
|
242
361
|
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,12 @@ export interface PaymentMethodAttachParams {
|
|
|
55
81
|
| 'SALESFORCE'
|
|
56
82
|
| 'BIG_QUERY'
|
|
57
83
|
| 'OPEN_FGA'
|
|
58
|
-
| 'APP_STORE'
|
|
84
|
+
| 'APP_STORE'
|
|
85
|
+
| 'RECEIVED'
|
|
86
|
+
| 'PREQUEL';
|
|
59
87
|
|
|
60
88
|
/**
|
|
61
|
-
* Customers selected currency
|
|
89
|
+
* Body param: Customers selected currency
|
|
62
90
|
*/
|
|
63
91
|
billingCurrency?:
|
|
64
92
|
| 'usd'
|
|
@@ -178,8 +206,39 @@ export interface PaymentMethodAttachParams {
|
|
|
178
206
|
| 'xof'
|
|
179
207
|
| 'xpf'
|
|
180
208
|
| null;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
212
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
213
|
+
*/
|
|
214
|
+
'X-ACCOUNT-ID'?: string;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
218
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
219
|
+
* intrinsic to the key).
|
|
220
|
+
*/
|
|
221
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface PaymentMethodDetachParams {
|
|
225
|
+
/**
|
|
226
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
227
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
228
|
+
*/
|
|
229
|
+
'X-ACCOUNT-ID'?: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
233
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
234
|
+
* key).
|
|
235
|
+
*/
|
|
236
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
181
237
|
}
|
|
182
238
|
|
|
183
239
|
export declare namespace PaymentMethod {
|
|
184
|
-
export {
|
|
240
|
+
export {
|
|
241
|
+
type PaymentMethodAttachParams as PaymentMethodAttachParams,
|
|
242
|
+
type PaymentMethodDetachParams as PaymentMethodDetachParams,
|
|
243
|
+
};
|
|
185
244
|
}
|
|
@@ -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
|
+
}
|