@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
|
@@ -4,12 +4,15 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as CustomCurrenciesAPI from './custom-currencies';
|
|
5
5
|
import {
|
|
6
6
|
CustomCurrencies,
|
|
7
|
+
CustomCurrencyArchiveParams,
|
|
7
8
|
CustomCurrencyCreateParams,
|
|
9
|
+
CustomCurrencyListAssociatedEntitiesParams,
|
|
8
10
|
CustomCurrencyListAssociatedEntitiesResponse,
|
|
9
11
|
CustomCurrencyListParams,
|
|
10
12
|
CustomCurrencyListResponse,
|
|
11
13
|
CustomCurrencyListResponsesMyCursorIDPage,
|
|
12
14
|
CustomCurrencyResponse,
|
|
15
|
+
CustomCurrencyUnarchiveParams,
|
|
13
16
|
CustomCurrencyUpdateParams,
|
|
14
17
|
} from './custom-currencies';
|
|
15
18
|
import * as GrantsAPI from './grants';
|
|
@@ -19,10 +22,12 @@ import {
|
|
|
19
22
|
GrantListParams,
|
|
20
23
|
GrantListResponse,
|
|
21
24
|
GrantListResponsesMyCursorIDPage,
|
|
25
|
+
GrantVoidParams,
|
|
22
26
|
Grants,
|
|
23
27
|
} from './grants';
|
|
24
28
|
import { APIPromise } from '../../../core/api-promise';
|
|
25
29
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
30
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
26
31
|
import { RequestOptions } from '../../../internal/request-options';
|
|
27
32
|
|
|
28
33
|
export class Credits extends APIResource {
|
|
@@ -36,30 +41,60 @@ export class Credits extends APIResource {
|
|
|
36
41
|
* Returns default settings if no configuration exists.
|
|
37
42
|
*/
|
|
38
43
|
getAutoRecharge(
|
|
39
|
-
|
|
44
|
+
params: CreditGetAutoRechargeParams,
|
|
40
45
|
options?: RequestOptions,
|
|
41
46
|
): APIPromise<CreditGetAutoRechargeResponse> {
|
|
42
|
-
|
|
47
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
48
|
+
return this._client.get('/api/v1/credits/auto-recharge', {
|
|
49
|
+
query,
|
|
50
|
+
...options,
|
|
51
|
+
headers: buildHeaders([
|
|
52
|
+
{
|
|
53
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
54
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
55
|
+
},
|
|
56
|
+
options?.headers,
|
|
57
|
+
]),
|
|
58
|
+
});
|
|
43
59
|
}
|
|
44
60
|
|
|
45
61
|
/**
|
|
46
62
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
47
63
|
* a specified time range.
|
|
48
64
|
*/
|
|
49
|
-
getUsage(
|
|
50
|
-
|
|
65
|
+
getUsage(params: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse> {
|
|
66
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
67
|
+
return this._client.get('/api/v1/credits/usage', {
|
|
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
|
+
});
|
|
51
78
|
}
|
|
52
79
|
|
|
53
80
|
/**
|
|
54
81
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
55
82
|
*/
|
|
56
83
|
listLedger(
|
|
57
|
-
|
|
84
|
+
params: CreditListLedgerParams,
|
|
58
85
|
options?: RequestOptions,
|
|
59
86
|
): PagePromise<CreditListLedgerResponsesMyCursorIDPage, CreditListLedgerResponse> {
|
|
87
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
60
88
|
return this._client.getAPIList('/api/v1/credits/ledger', MyCursorIDPage<CreditListLedgerResponse>, {
|
|
61
89
|
query,
|
|
62
90
|
...options,
|
|
91
|
+
headers: buildHeaders([
|
|
92
|
+
{
|
|
93
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
94
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
95
|
+
},
|
|
96
|
+
options?.headers,
|
|
97
|
+
]),
|
|
63
98
|
});
|
|
64
99
|
}
|
|
65
100
|
}
|
|
@@ -158,6 +193,13 @@ export namespace CreditGetUsageResponse {
|
|
|
158
193
|
*/
|
|
159
194
|
currency: Data.Currency | null;
|
|
160
195
|
|
|
196
|
+
/**
|
|
197
|
+
* Cursor-based pagination for the returned series. `next`/`prev` are opaque
|
|
198
|
+
* cursors; pass them back as `after`/`before` to traverse pages. The series axis
|
|
199
|
+
* is `groupBy` when provided, otherwise `featureId`
|
|
200
|
+
*/
|
|
201
|
+
pagination: Data.Pagination;
|
|
202
|
+
|
|
161
203
|
/**
|
|
162
204
|
* Credit usage series grouped by feature
|
|
163
205
|
*/
|
|
@@ -195,19 +237,37 @@ export namespace CreditGetUsageResponse {
|
|
|
195
237
|
symbol: string | null;
|
|
196
238
|
}
|
|
197
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Cursor-based pagination for the returned series. `next`/`prev` are opaque
|
|
242
|
+
* cursors; pass them back as `after`/`before` to traverse pages. The series axis
|
|
243
|
+
* is `groupBy` when provided, otherwise `featureId`
|
|
244
|
+
*/
|
|
245
|
+
export interface Pagination {
|
|
246
|
+
/**
|
|
247
|
+
* Cursor for fetching the next page of results, or null if no additional pages
|
|
248
|
+
* exist
|
|
249
|
+
*/
|
|
250
|
+
next: string | null;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Cursor for fetching the previous page of results, or null if at the beginning
|
|
254
|
+
*/
|
|
255
|
+
prev: string | null;
|
|
256
|
+
}
|
|
257
|
+
|
|
198
258
|
/**
|
|
199
259
|
* Credit usage data for a single feature
|
|
200
260
|
*/
|
|
201
261
|
export interface Series {
|
|
202
262
|
/**
|
|
203
|
-
* The feature ID
|
|
263
|
+
* The feature ID; null when grouping by dimensions only
|
|
204
264
|
*/
|
|
205
|
-
featureId: string;
|
|
265
|
+
featureId: string | null;
|
|
206
266
|
|
|
207
267
|
/**
|
|
208
|
-
* The display name of the feature
|
|
268
|
+
* The display name of the feature; null when grouping by dimensions only
|
|
209
269
|
*/
|
|
210
|
-
featureName: string;
|
|
270
|
+
featureName: string | null;
|
|
211
271
|
|
|
212
272
|
/**
|
|
213
273
|
* Time-series data points for this feature
|
|
@@ -218,6 +278,11 @@ export namespace CreditGetUsageResponse {
|
|
|
218
278
|
* Total credits consumed by this feature in the time range
|
|
219
279
|
*/
|
|
220
280
|
totalCredits: number;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Dimension key/value pairs identifying this series when groupBy is applied
|
|
284
|
+
*/
|
|
285
|
+
tags?: Array<Series.Tag>;
|
|
221
286
|
}
|
|
222
287
|
|
|
223
288
|
export namespace Series {
|
|
@@ -235,6 +300,21 @@ export namespace CreditGetUsageResponse {
|
|
|
235
300
|
*/
|
|
236
301
|
value: number;
|
|
237
302
|
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Dimension key/value pair identifying a credit usage series
|
|
306
|
+
*/
|
|
307
|
+
export interface Tag {
|
|
308
|
+
/**
|
|
309
|
+
* The dimension key
|
|
310
|
+
*/
|
|
311
|
+
key: string;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* The dimension value for this series
|
|
315
|
+
*/
|
|
316
|
+
value: string;
|
|
317
|
+
}
|
|
238
318
|
}
|
|
239
319
|
}
|
|
240
320
|
}
|
|
@@ -298,66 +378,126 @@ export interface CreditListLedgerResponse {
|
|
|
298
378
|
|
|
299
379
|
export interface CreditGetAutoRechargeParams {
|
|
300
380
|
/**
|
|
301
|
-
* Filter by currency ID (required)
|
|
381
|
+
* Query param: Filter by currency ID (required)
|
|
302
382
|
*/
|
|
303
383
|
currencyId: string;
|
|
304
384
|
|
|
305
385
|
/**
|
|
306
|
-
* Filter by customer ID (required)
|
|
386
|
+
* Query param: Filter by customer ID (required)
|
|
307
387
|
*/
|
|
308
388
|
customerId: string;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
392
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
393
|
+
*/
|
|
394
|
+
'X-ACCOUNT-ID'?: string;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
398
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
399
|
+
* intrinsic to the key).
|
|
400
|
+
*/
|
|
401
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
309
402
|
}
|
|
310
403
|
|
|
311
404
|
export interface CreditGetUsageParams {
|
|
312
405
|
/**
|
|
313
|
-
* Filter by customer ID (required)
|
|
406
|
+
* Query param: Filter by customer ID (required)
|
|
314
407
|
*/
|
|
315
408
|
customerId: string;
|
|
316
409
|
|
|
317
410
|
/**
|
|
318
|
-
*
|
|
411
|
+
* Query param: Return items that come after this cursor
|
|
412
|
+
*/
|
|
413
|
+
after?: string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Query param: Return items that come before this cursor
|
|
417
|
+
*/
|
|
418
|
+
before?: string;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Query param: Filter by currency ID
|
|
319
422
|
*/
|
|
320
423
|
currencyId?: string;
|
|
321
424
|
|
|
322
425
|
/**
|
|
323
|
-
* End date for the credit usage time range (ISO 8601). Defaults to
|
|
324
|
-
* startDate is provided
|
|
426
|
+
* Query param: End date for the credit usage time range (ISO 8601). Defaults to
|
|
427
|
+
* now when startDate is provided
|
|
325
428
|
*/
|
|
326
429
|
endDate?: string;
|
|
327
430
|
|
|
328
431
|
/**
|
|
329
|
-
*
|
|
432
|
+
* Query param: Comma-separated list of feature dimension keys to group usage
|
|
433
|
+
* series by (up to 3). Each key matches /^[a-zA-Z0-9_$-]+$/
|
|
434
|
+
*/
|
|
435
|
+
groupBy?: string;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Query param: Maximum number of items to return
|
|
439
|
+
*/
|
|
440
|
+
limit?: number;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Query param: Filter by resource ID
|
|
330
444
|
*/
|
|
331
445
|
resourceId?: string;
|
|
332
446
|
|
|
333
447
|
/**
|
|
334
|
-
* Start date for the credit usage time range (ISO 8601). Takes
|
|
335
|
-
* timeRange when provided
|
|
448
|
+
* Query param: Start date for the credit usage time range (ISO 8601). Takes
|
|
449
|
+
* precedence over timeRange when provided
|
|
336
450
|
*/
|
|
337
451
|
startDate?: string;
|
|
338
452
|
|
|
339
453
|
/**
|
|
340
|
-
* Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
|
|
341
|
-
* to LAST_MONTH
|
|
454
|
+
* Query param: Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
|
|
455
|
+
* LAST_YEAR). Defaults to LAST_MONTH
|
|
342
456
|
*/
|
|
343
457
|
timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
461
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
462
|
+
*/
|
|
463
|
+
'X-ACCOUNT-ID'?: string;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
467
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
468
|
+
* intrinsic to the key).
|
|
469
|
+
*/
|
|
470
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
344
471
|
}
|
|
345
472
|
|
|
346
473
|
export interface CreditListLedgerParams extends MyCursorIDPageParams {
|
|
347
474
|
/**
|
|
348
|
-
* Filter by customer ID (required)
|
|
475
|
+
* Query param: Filter by customer ID (required)
|
|
349
476
|
*/
|
|
350
477
|
customerId: string;
|
|
351
478
|
|
|
352
479
|
/**
|
|
353
|
-
* Filter by currency ID
|
|
480
|
+
* Query param: Filter by currency ID
|
|
354
481
|
*/
|
|
355
482
|
currencyId?: string;
|
|
356
483
|
|
|
357
484
|
/**
|
|
358
|
-
* Filter by resource ID
|
|
485
|
+
* Query param: Filter by resource ID
|
|
359
486
|
*/
|
|
360
487
|
resourceId?: string;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
491
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
492
|
+
*/
|
|
493
|
+
'X-ACCOUNT-ID'?: string;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
497
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
498
|
+
* intrinsic to the key).
|
|
499
|
+
*/
|
|
500
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
361
501
|
}
|
|
362
502
|
|
|
363
503
|
Credits.Grants = Grants;
|
|
@@ -381,6 +521,7 @@ export declare namespace Credits {
|
|
|
381
521
|
type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage,
|
|
382
522
|
type GrantCreateParams as GrantCreateParams,
|
|
383
523
|
type GrantListParams as GrantListParams,
|
|
524
|
+
type GrantVoidParams as GrantVoidParams,
|
|
384
525
|
};
|
|
385
526
|
|
|
386
527
|
export {
|
|
@@ -392,5 +533,8 @@ export declare namespace Credits {
|
|
|
392
533
|
type CustomCurrencyCreateParams as CustomCurrencyCreateParams,
|
|
393
534
|
type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams,
|
|
394
535
|
type CustomCurrencyListParams as CustomCurrencyListParams,
|
|
536
|
+
type CustomCurrencyArchiveParams as CustomCurrencyArchiveParams,
|
|
537
|
+
type CustomCurrencyListAssociatedEntitiesParams as CustomCurrencyListAssociatedEntitiesParams,
|
|
538
|
+
type CustomCurrencyUnarchiveParams as CustomCurrencyUnarchiveParams,
|
|
395
539
|
};
|
|
396
540
|
}
|
|
@@ -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
|
}
|