@stigg/typescript 0.1.0-beta.4 → 0.1.0-beta.41
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 +314 -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 +199 -0
- package/resources/v1/credits/consumption.d.mts.map +1 -0
- package/resources/v1/credits/consumption.d.ts +199 -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 +71 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +71 -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 +269 -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 +108 -5
- package/src/resources/v1/v1.ts +40 -2
- package/src/resources/v1-beta/customers/assignments.ts +336 -0
- package/src/resources/v1-beta/customers/customers.ts +71 -0
- package/src/resources/v1-beta/customers/entities.ts +492 -0
- package/src/resources/v1-beta/customers/entitlements.ts +366 -0
- package/src/resources/v1-beta/customers/index.ts +26 -0
- package/src/resources/v1-beta/customers.ts +3 -0
- package/src/resources/v1-beta/entity-types.ts +225 -0
- package/src/resources/v1-beta/index.ts +12 -0
- package/src/resources/v1-beta/v1-beta.ts +35 -0
- package/src/resources/v1-beta.ts +3 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
5
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
8
|
import { path } from '../../../internal/utils/path';
|
|
8
9
|
|
|
@@ -13,8 +14,19 @@ export class CustomCurrencies extends APIResource {
|
|
|
13
14
|
/**
|
|
14
15
|
* Creates a new custom currency in the environment.
|
|
15
16
|
*/
|
|
16
|
-
create(
|
|
17
|
-
|
|
17
|
+
create(params: CustomCurrencyCreateParams, options?: RequestOptions): APIPromise<CustomCurrencyResponse> {
|
|
18
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
19
|
+
return this._client.post('/api/v1/credits/custom-currencies', {
|
|
20
|
+
body,
|
|
21
|
+
...options,
|
|
22
|
+
headers: buildHeaders([
|
|
23
|
+
{
|
|
24
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
25
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
26
|
+
},
|
|
27
|
+
options?.headers,
|
|
28
|
+
]),
|
|
29
|
+
});
|
|
18
30
|
}
|
|
19
31
|
|
|
20
32
|
/**
|
|
@@ -22,10 +34,21 @@ export class CustomCurrencies extends APIResource {
|
|
|
22
34
|
*/
|
|
23
35
|
update(
|
|
24
36
|
currencyID: string,
|
|
25
|
-
|
|
37
|
+
params: CustomCurrencyUpdateParams,
|
|
26
38
|
options?: RequestOptions,
|
|
27
39
|
): APIPromise<CustomCurrencyResponse> {
|
|
28
|
-
|
|
40
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
41
|
+
return this._client.patch(path`/api/v1/credits/custom-currencies/${currencyID}`, {
|
|
42
|
+
body,
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([
|
|
45
|
+
{
|
|
46
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
47
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
48
|
+
},
|
|
49
|
+
options?.headers,
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
29
52
|
}
|
|
30
53
|
|
|
31
54
|
/**
|
|
@@ -34,13 +57,24 @@ export class CustomCurrencies extends APIResource {
|
|
|
34
57
|
* `status=ACTIVE,ARCHIVED`) to include them.
|
|
35
58
|
*/
|
|
36
59
|
list(
|
|
37
|
-
|
|
60
|
+
params: CustomCurrencyListParams | null | undefined = {},
|
|
38
61
|
options?: RequestOptions,
|
|
39
62
|
): PagePromise<CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyListResponse> {
|
|
63
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
40
64
|
return this._client.getAPIList(
|
|
41
65
|
'/api/v1/credits/custom-currencies',
|
|
42
66
|
MyCursorIDPage<CustomCurrencyListResponse>,
|
|
43
|
-
{
|
|
67
|
+
{
|
|
68
|
+
query,
|
|
69
|
+
...options,
|
|
70
|
+
headers: buildHeaders([
|
|
71
|
+
{
|
|
72
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
73
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
74
|
+
},
|
|
75
|
+
options?.headers,
|
|
76
|
+
]),
|
|
77
|
+
},
|
|
44
78
|
);
|
|
45
79
|
}
|
|
46
80
|
|
|
@@ -49,8 +83,22 @@ export class CustomCurrencies extends APIResource {
|
|
|
49
83
|
* active plan or addon — use the associated-entities endpoint first to inspect
|
|
50
84
|
* dependencies.
|
|
51
85
|
*/
|
|
52
|
-
archive(
|
|
53
|
-
|
|
86
|
+
archive(
|
|
87
|
+
currencyID: string,
|
|
88
|
+
params: CustomCurrencyArchiveParams | null | undefined = {},
|
|
89
|
+
options?: RequestOptions,
|
|
90
|
+
): APIPromise<CustomCurrencyResponse> {
|
|
91
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
92
|
+
return this._client.post(path`/api/v1/credits/custom-currencies/${currencyID}/archive`, {
|
|
93
|
+
...options,
|
|
94
|
+
headers: buildHeaders([
|
|
95
|
+
{
|
|
96
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
97
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
98
|
+
},
|
|
99
|
+
options?.headers,
|
|
100
|
+
]),
|
|
101
|
+
});
|
|
54
102
|
}
|
|
55
103
|
|
|
56
104
|
/**
|
|
@@ -59,20 +107,42 @@ export class CustomCurrencies extends APIResource {
|
|
|
59
107
|
*/
|
|
60
108
|
listAssociatedEntities(
|
|
61
109
|
currencyID: string,
|
|
110
|
+
params: CustomCurrencyListAssociatedEntitiesParams | null | undefined = {},
|
|
62
111
|
options?: RequestOptions,
|
|
63
112
|
): APIPromise<CustomCurrencyListAssociatedEntitiesResponse> {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
options,
|
|
67
|
-
|
|
113
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
114
|
+
return this._client.get(path`/api/v1/credits/custom-currencies/${currencyID}/associated-entities`, {
|
|
115
|
+
...options,
|
|
116
|
+
headers: buildHeaders([
|
|
117
|
+
{
|
|
118
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
119
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
120
|
+
},
|
|
121
|
+
options?.headers,
|
|
122
|
+
]),
|
|
123
|
+
});
|
|
68
124
|
}
|
|
69
125
|
|
|
70
126
|
/**
|
|
71
127
|
* Restores a previously archived custom currency. Fails if another active currency
|
|
72
128
|
* with the same ID already exists.
|
|
73
129
|
*/
|
|
74
|
-
unarchive(
|
|
75
|
-
|
|
130
|
+
unarchive(
|
|
131
|
+
currencyID: string,
|
|
132
|
+
params: CustomCurrencyUnarchiveParams | null | undefined = {},
|
|
133
|
+
options?: RequestOptions,
|
|
134
|
+
): APIPromise<CustomCurrencyResponse> {
|
|
135
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
136
|
+
return this._client.post(path`/api/v1/credits/custom-currencies/${currencyID}/unarchive`, {
|
|
137
|
+
...options,
|
|
138
|
+
headers: buildHeaders([
|
|
139
|
+
{
|
|
140
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
141
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
142
|
+
},
|
|
143
|
+
options?.headers,
|
|
144
|
+
]),
|
|
145
|
+
});
|
|
76
146
|
}
|
|
77
147
|
}
|
|
78
148
|
|
|
@@ -255,35 +325,48 @@ export namespace CustomCurrencyListAssociatedEntitiesResponse {
|
|
|
255
325
|
|
|
256
326
|
export interface CustomCurrencyCreateParams {
|
|
257
327
|
/**
|
|
258
|
-
* The unique identifier for the new custom currency
|
|
328
|
+
* Body param: The unique identifier for the new custom currency
|
|
259
329
|
*/
|
|
260
330
|
id: string;
|
|
261
331
|
|
|
262
332
|
/**
|
|
263
|
-
* The display name of the custom currency
|
|
333
|
+
* Body param: The display name of the custom currency
|
|
264
334
|
*/
|
|
265
335
|
displayName: string;
|
|
266
336
|
|
|
267
337
|
/**
|
|
268
|
-
* Description of the currency
|
|
338
|
+
* Body param: Description of the currency
|
|
269
339
|
*/
|
|
270
340
|
description?: string;
|
|
271
341
|
|
|
272
342
|
/**
|
|
273
|
-
* Additional metadata to attach to the custom currency
|
|
343
|
+
* Body param: Additional metadata to attach to the custom currency
|
|
274
344
|
*/
|
|
275
345
|
metadata?: { [key: string]: string };
|
|
276
346
|
|
|
277
347
|
/**
|
|
278
|
-
* The symbol used to represent the custom currency
|
|
348
|
+
* Body param: The symbol used to represent the custom currency
|
|
279
349
|
*/
|
|
280
350
|
symbol?: string;
|
|
281
351
|
|
|
282
352
|
/**
|
|
283
|
-
* Singular and plural unit labels for a custom currency. Both fields
|
|
284
|
-
* when supplied.
|
|
353
|
+
* Body param: Singular and plural unit labels for a custom currency. Both fields
|
|
354
|
+
* are required when supplied.
|
|
285
355
|
*/
|
|
286
356
|
units?: CustomCurrencyCreateParams.Units;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
360
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
361
|
+
*/
|
|
362
|
+
'X-ACCOUNT-ID'?: string;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
366
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
367
|
+
* intrinsic to the key).
|
|
368
|
+
*/
|
|
369
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
287
370
|
}
|
|
288
371
|
|
|
289
372
|
export namespace CustomCurrencyCreateParams {
|
|
@@ -306,31 +389,45 @@ export namespace CustomCurrencyCreateParams {
|
|
|
306
389
|
|
|
307
390
|
export interface CustomCurrencyUpdateParams {
|
|
308
391
|
/**
|
|
309
|
-
* A human-readable description of the custom currency. Send an empty
|
|
310
|
-
* clear.
|
|
392
|
+
* Body param: A human-readable description of the custom currency. Send an empty
|
|
393
|
+
* string to clear.
|
|
311
394
|
*/
|
|
312
395
|
description?: string | null;
|
|
313
396
|
|
|
314
397
|
/**
|
|
315
|
-
* The display name of the custom currency
|
|
398
|
+
* Body param: The display name of the custom currency
|
|
316
399
|
*/
|
|
317
400
|
displayName?: string;
|
|
318
401
|
|
|
319
402
|
/**
|
|
320
|
-
* Additional metadata to attach to the custom currency
|
|
403
|
+
* Body param: Additional metadata to attach to the custom currency
|
|
321
404
|
*/
|
|
322
405
|
metadata?: { [key: string]: string } | null;
|
|
323
406
|
|
|
324
407
|
/**
|
|
325
|
-
* The symbol used to represent the custom currency. Send an empty
|
|
408
|
+
* Body param: The symbol used to represent the custom currency. Send an empty
|
|
409
|
+
* string to clear.
|
|
326
410
|
*/
|
|
327
411
|
symbol?: string | null;
|
|
328
412
|
|
|
329
413
|
/**
|
|
330
|
-
* Singular and plural unit labels for a custom currency. Both fields
|
|
331
|
-
* when supplied.
|
|
414
|
+
* Body param: Singular and plural unit labels for a custom currency. Both fields
|
|
415
|
+
* are required when supplied.
|
|
332
416
|
*/
|
|
333
417
|
units?: CustomCurrencyUpdateParams.Units;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
421
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
422
|
+
*/
|
|
423
|
+
'X-ACCOUNT-ID'?: string;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
427
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
428
|
+
* intrinsic to the key).
|
|
429
|
+
*/
|
|
430
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
334
431
|
}
|
|
335
432
|
|
|
336
433
|
export namespace CustomCurrencyUpdateParams {
|
|
@@ -353,10 +450,68 @@ export namespace CustomCurrencyUpdateParams {
|
|
|
353
450
|
|
|
354
451
|
export interface CustomCurrencyListParams extends MyCursorIDPageParams {
|
|
355
452
|
/**
|
|
356
|
-
* Filter by custom currency status. Supports comma-separated values
|
|
357
|
-
* `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.
|
|
453
|
+
* Query param: Filter by custom currency status. Supports comma-separated values
|
|
454
|
+
* (e.g., `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.
|
|
358
455
|
*/
|
|
359
456
|
status?: Array<'ACTIVE' | 'ARCHIVED'>;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
460
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
461
|
+
*/
|
|
462
|
+
'X-ACCOUNT-ID'?: string;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
466
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
467
|
+
* intrinsic to the key).
|
|
468
|
+
*/
|
|
469
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export interface CustomCurrencyArchiveParams {
|
|
473
|
+
/**
|
|
474
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
475
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
476
|
+
*/
|
|
477
|
+
'X-ACCOUNT-ID'?: string;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
481
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
482
|
+
* key).
|
|
483
|
+
*/
|
|
484
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export interface CustomCurrencyListAssociatedEntitiesParams {
|
|
488
|
+
/**
|
|
489
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
490
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
491
|
+
*/
|
|
492
|
+
'X-ACCOUNT-ID'?: string;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
496
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
497
|
+
* key).
|
|
498
|
+
*/
|
|
499
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface CustomCurrencyUnarchiveParams {
|
|
503
|
+
/**
|
|
504
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
505
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
506
|
+
*/
|
|
507
|
+
'X-ACCOUNT-ID'?: string;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
511
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
512
|
+
* key).
|
|
513
|
+
*/
|
|
514
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
360
515
|
}
|
|
361
516
|
|
|
362
517
|
export declare namespace CustomCurrencies {
|
|
@@ -368,5 +523,8 @@ export declare namespace CustomCurrencies {
|
|
|
368
523
|
type CustomCurrencyCreateParams as CustomCurrencyCreateParams,
|
|
369
524
|
type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams,
|
|
370
525
|
type CustomCurrencyListParams as CustomCurrencyListParams,
|
|
526
|
+
type CustomCurrencyArchiveParams as CustomCurrencyArchiveParams,
|
|
527
|
+
type CustomCurrencyListAssociatedEntitiesParams as CustomCurrencyListAssociatedEntitiesParams,
|
|
528
|
+
type CustomCurrencyUnarchiveParams as CustomCurrencyUnarchiveParams,
|
|
371
529
|
};
|
|
372
530
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
5
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
8
|
import { path } from '../../../internal/utils/path';
|
|
8
9
|
|
|
@@ -14,20 +15,39 @@ export class Grants extends APIResource {
|
|
|
14
15
|
* Creates a new credit grant for a customer with specified amount, type, and
|
|
15
16
|
* optional billing configuration.
|
|
16
17
|
*/
|
|
17
|
-
create(
|
|
18
|
-
|
|
18
|
+
create(params: GrantCreateParams, options?: RequestOptions): APIPromise<CreditGrantResponse> {
|
|
19
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
20
|
+
return this._client.post('/api/v1/credits/grants', {
|
|
21
|
+
body,
|
|
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
|
+
});
|
|
19
31
|
}
|
|
20
32
|
|
|
21
33
|
/**
|
|
22
34
|
* Retrieves a paginated list of credit grants for a customer.
|
|
23
35
|
*/
|
|
24
36
|
list(
|
|
25
|
-
|
|
37
|
+
params: GrantListParams,
|
|
26
38
|
options?: RequestOptions,
|
|
27
39
|
): PagePromise<GrantListResponsesMyCursorIDPage, GrantListResponse> {
|
|
40
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
28
41
|
return this._client.getAPIList('/api/v1/credits/grants', MyCursorIDPage<GrantListResponse>, {
|
|
29
42
|
query,
|
|
30
43
|
...options,
|
|
44
|
+
headers: buildHeaders([
|
|
45
|
+
{
|
|
46
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
47
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
48
|
+
},
|
|
49
|
+
options?.headers,
|
|
50
|
+
]),
|
|
31
51
|
});
|
|
32
52
|
}
|
|
33
53
|
|
|
@@ -35,8 +55,22 @@ export class Grants extends APIResource {
|
|
|
35
55
|
* Voids an existing credit grant, preventing further consumption of the remaining
|
|
36
56
|
* credits.
|
|
37
57
|
*/
|
|
38
|
-
void(
|
|
39
|
-
|
|
58
|
+
void(
|
|
59
|
+
id: string,
|
|
60
|
+
params: GrantVoidParams | null | undefined = {},
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): APIPromise<CreditGrantResponse> {
|
|
63
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
64
|
+
return this._client.post(path`/api/v1/credits/grants/${id}/void`, {
|
|
65
|
+
...options,
|
|
66
|
+
headers: buildHeaders([
|
|
67
|
+
{
|
|
68
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
69
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
70
|
+
},
|
|
71
|
+
options?.headers,
|
|
72
|
+
]),
|
|
73
|
+
});
|
|
40
74
|
}
|
|
41
75
|
}
|
|
42
76
|
|
|
@@ -470,79 +504,93 @@ export namespace GrantListResponse {
|
|
|
470
504
|
|
|
471
505
|
export interface GrantCreateParams {
|
|
472
506
|
/**
|
|
473
|
-
* The credit amount to grant
|
|
507
|
+
* Body param: The credit amount to grant
|
|
474
508
|
*/
|
|
475
509
|
amount: number;
|
|
476
510
|
|
|
477
511
|
/**
|
|
478
|
-
* The credit currency ID (required)
|
|
512
|
+
* Body param: The credit currency ID (required)
|
|
479
513
|
*/
|
|
480
514
|
currencyId: string;
|
|
481
515
|
|
|
482
516
|
/**
|
|
483
|
-
* The customer ID to grant credits to (required)
|
|
517
|
+
* Body param: The customer ID to grant credits to (required)
|
|
484
518
|
*/
|
|
485
519
|
customerId: string;
|
|
486
520
|
|
|
487
521
|
/**
|
|
488
|
-
* The display name for the credit grant
|
|
522
|
+
* Body param: The display name for the credit grant
|
|
489
523
|
*/
|
|
490
524
|
displayName: string;
|
|
491
525
|
|
|
492
526
|
/**
|
|
493
|
-
* The type of credit grant (PAID, PROMOTIONAL)
|
|
527
|
+
* Body param: The type of credit grant (PAID, PROMOTIONAL)
|
|
494
528
|
*/
|
|
495
529
|
grantType: 'PAID' | 'PROMOTIONAL';
|
|
496
530
|
|
|
497
531
|
/**
|
|
498
|
-
* Whether to wait for payment confirmation before returning (default:
|
|
532
|
+
* Body param: Whether to wait for payment confirmation before returning (default:
|
|
533
|
+
* true)
|
|
499
534
|
*/
|
|
500
535
|
awaitPaymentConfirmation?: boolean;
|
|
501
536
|
|
|
502
537
|
/**
|
|
503
|
-
* Billing information for the credit grant
|
|
538
|
+
* Body param: Billing information for the credit grant
|
|
504
539
|
*/
|
|
505
540
|
billingInformation?: GrantCreateParams.BillingInformation;
|
|
506
541
|
|
|
507
542
|
/**
|
|
508
|
-
* An optional comment on the credit grant
|
|
543
|
+
* Body param: An optional comment on the credit grant
|
|
509
544
|
*/
|
|
510
545
|
comment?: string;
|
|
511
546
|
|
|
512
547
|
/**
|
|
513
|
-
* The monetary cost of the credit grant
|
|
548
|
+
* Body param: The monetary cost of the credit grant
|
|
514
549
|
*/
|
|
515
550
|
cost?: GrantCreateParams.Cost;
|
|
516
551
|
|
|
517
552
|
/**
|
|
518
|
-
* The date when the credit grant becomes effective
|
|
553
|
+
* Body param: The date when the credit grant becomes effective
|
|
519
554
|
*/
|
|
520
555
|
effectiveAt?: string;
|
|
521
556
|
|
|
522
557
|
/**
|
|
523
|
-
* The date when the credit grant expires
|
|
558
|
+
* Body param: The date when the credit grant expires
|
|
524
559
|
*/
|
|
525
560
|
expireAt?: string;
|
|
526
561
|
|
|
527
562
|
/**
|
|
528
|
-
* Additional metadata for the credit grant
|
|
563
|
+
* Body param: Additional metadata for the credit grant
|
|
529
564
|
*/
|
|
530
565
|
metadata?: { [key: string]: string };
|
|
531
566
|
|
|
532
567
|
/**
|
|
533
|
-
* The payment collection method (CHARGE, INVOICE, NONE)
|
|
568
|
+
* Body param: The payment collection method (CHARGE, INVOICE, NONE)
|
|
534
569
|
*/
|
|
535
570
|
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE';
|
|
536
571
|
|
|
537
572
|
/**
|
|
538
|
-
* The priority of the credit grant (lower number = higher priority)
|
|
573
|
+
* Body param: The priority of the credit grant (lower number = higher priority)
|
|
539
574
|
*/
|
|
540
575
|
priority?: number;
|
|
541
576
|
|
|
542
577
|
/**
|
|
543
|
-
* The resource ID to scope the grant to
|
|
578
|
+
* Body param: The resource ID to scope the grant to
|
|
544
579
|
*/
|
|
545
580
|
resourceId?: string;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
584
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
585
|
+
*/
|
|
586
|
+
'X-ACCOUNT-ID'?: string;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
590
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
591
|
+
* intrinsic to the key).
|
|
592
|
+
*/
|
|
593
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
546
594
|
}
|
|
547
595
|
|
|
548
596
|
export namespace GrantCreateParams {
|
|
@@ -737,24 +785,38 @@ export namespace GrantCreateParams {
|
|
|
737
785
|
|
|
738
786
|
export interface GrantListParams extends MyCursorIDPageParams {
|
|
739
787
|
/**
|
|
740
|
-
* Filter by customer ID (required)
|
|
788
|
+
* Query param: Filter by customer ID (required)
|
|
741
789
|
*/
|
|
742
790
|
customerId: string;
|
|
743
791
|
|
|
744
792
|
/**
|
|
745
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
793
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
746
794
|
*/
|
|
747
795
|
createdAt?: GrantListParams.CreatedAt;
|
|
748
796
|
|
|
749
797
|
/**
|
|
750
|
-
* Filter by currency ID
|
|
798
|
+
* Query param: Filter by currency ID
|
|
751
799
|
*/
|
|
752
800
|
currencyId?: string;
|
|
753
801
|
|
|
754
802
|
/**
|
|
755
|
-
* Filter by resource ID. When omitted, only grants without a resource
|
|
803
|
+
* Query param: Filter by resource ID. When omitted, only grants without a resource
|
|
804
|
+
* are returned
|
|
756
805
|
*/
|
|
757
806
|
resourceId?: string;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
810
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
811
|
+
*/
|
|
812
|
+
'X-ACCOUNT-ID'?: string;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
816
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
817
|
+
* intrinsic to the key).
|
|
818
|
+
*/
|
|
819
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
758
820
|
}
|
|
759
821
|
|
|
760
822
|
export namespace GrantListParams {
|
|
@@ -784,6 +846,21 @@ export namespace GrantListParams {
|
|
|
784
846
|
}
|
|
785
847
|
}
|
|
786
848
|
|
|
849
|
+
export interface GrantVoidParams {
|
|
850
|
+
/**
|
|
851
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
852
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
853
|
+
*/
|
|
854
|
+
'X-ACCOUNT-ID'?: string;
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
858
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
859
|
+
* key).
|
|
860
|
+
*/
|
|
861
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
862
|
+
}
|
|
863
|
+
|
|
787
864
|
export declare namespace Grants {
|
|
788
865
|
export {
|
|
789
866
|
type CreditGrantResponse as CreditGrantResponse,
|
|
@@ -791,5 +868,6 @@ export declare namespace Grants {
|
|
|
791
868
|
type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage,
|
|
792
869
|
type GrantCreateParams as GrantCreateParams,
|
|
793
870
|
type GrantListParams as GrantListParams,
|
|
871
|
+
type GrantVoidParams as GrantVoidParams,
|
|
794
872
|
};
|
|
795
873
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Consumption,
|
|
5
|
+
type ConsumptionConsumeResponse,
|
|
6
|
+
type ConsumptionConsumeAsyncResponse,
|
|
7
|
+
type ConsumptionConsumeParams,
|
|
8
|
+
type ConsumptionConsumeAsyncParams,
|
|
9
|
+
} from './consumption';
|
|
3
10
|
export {
|
|
4
11
|
Credits,
|
|
5
12
|
type CreditGetAutoRechargeResponse,
|
|
@@ -18,6 +25,9 @@ export {
|
|
|
18
25
|
type CustomCurrencyCreateParams,
|
|
19
26
|
type CustomCurrencyUpdateParams,
|
|
20
27
|
type CustomCurrencyListParams,
|
|
28
|
+
type CustomCurrencyArchiveParams,
|
|
29
|
+
type CustomCurrencyListAssociatedEntitiesParams,
|
|
30
|
+
type CustomCurrencyUnarchiveParams,
|
|
21
31
|
type CustomCurrencyListResponsesMyCursorIDPage,
|
|
22
32
|
} from './custom-currencies';
|
|
23
33
|
export {
|
|
@@ -26,5 +36,6 @@ export {
|
|
|
26
36
|
type GrantListResponse,
|
|
27
37
|
type GrantCreateParams,
|
|
28
38
|
type GrantListParams,
|
|
39
|
+
type GrantVoidParams,
|
|
29
40
|
type GrantListResponsesMyCursorIDPage,
|
|
30
41
|
} from './grants';
|