@stigg/typescript 0.1.0-beta.1 → 0.1.0-beta.10
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 +90 -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 +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- 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 +198 -1
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +198 -1
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +9 -0
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +9 -0
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/addons/index.d.mts +1 -1
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +1 -1
- 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.map +1 -1
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/{events/credits → credits}/credits.d.mts +32 -10
- package/resources/v1/credits/credits.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.d.ts +32 -10
- package/resources/v1/credits/credits.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.js +3 -3
- package/resources/v1/credits/credits.js.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.mjs +2 -2
- package/resources/v1/credits/credits.mjs.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.d.mts +12 -219
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.d.ts +12 -219
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.js +3 -3
- package/resources/v1/credits/custom-currencies.js.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.mjs +3 -3
- package/resources/v1/credits/custom-currencies.mjs.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.d.mts +4 -4
- package/resources/v1/credits/grants.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.d.ts +4 -4
- package/resources/v1/credits/grants.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.js +3 -3
- package/resources/v1/credits/grants.js.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.mjs +3 -3
- package/resources/v1/credits/grants.mjs.map +1 -0
- package/resources/v1/credits/index.d.mts +4 -0
- package/resources/v1/credits/index.d.mts.map +1 -0
- package/resources/v1/credits/index.d.ts +4 -0
- package/resources/v1/credits/index.d.ts.map +1 -0
- package/resources/v1/credits/index.js.map +1 -0
- package/resources/v1/credits/index.mjs.map +1 -0
- package/resources/v1/credits.d.mts.map +1 -0
- package/resources/v1/credits.d.ts.map +1 -0
- package/resources/v1/{events/credits.js → credits.js} +1 -1
- package/resources/v1/credits.js.map +1 -0
- package/resources/v1/credits.mjs.map +1 -0
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- 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.d.mts +65 -1
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts +65 -1
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.js +15 -2
- package/resources/v1/events.js.map +1 -1
- package/resources/v1/events.mjs +13 -1
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +4 -3
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +4 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +7 -5
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +2 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/index.d.mts +1 -1
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +1 -1
- 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 +16 -1
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +16 -1
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +12 -0
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +12 -0
- 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.map +1 -1
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +12 -9
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +12 -9
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- 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.map +1 -1
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +10 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +10 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +6 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +6 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1-beta/customers/assignments.d.mts +175 -0
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -0
- package/resources/v1-beta/customers/assignments.d.ts +175 -0
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -0
- package/resources/v1-beta/customers/assignments.js +59 -0
- package/resources/v1-beta/customers/assignments.js.map +1 -0
- package/resources/v1-beta/customers/assignments.mjs +55 -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 +284 -0
- package/resources/v1-beta/customers/entities.d.mts.map +1 -0
- package/resources/v1-beta/customers/entities.d.ts +284 -0
- package/resources/v1-beta/customers/entities.d.ts.map +1 -0
- package/resources/v1-beta/customers/entities.js +96 -0
- package/resources/v1-beta/customers/entities.js.map +1 -0
- package/resources/v1-beta/customers/entities.mjs +92 -0
- package/resources/v1-beta/customers/entities.mjs.map +1 -0
- package/resources/v1-beta/customers/entitlements.d.mts +236 -0
- package/resources/v1-beta/customers/entitlements.d.mts.map +1 -0
- package/resources/v1-beta/customers/entitlements.d.ts +236 -0
- package/resources/v1-beta/customers/entitlements.d.ts.map +1 -0
- package/resources/v1-beta/customers/entitlements.js +24 -0
- package/resources/v1-beta/customers/entitlements.js.map +1 -0
- package/resources/v1-beta/customers/entitlements.mjs +20 -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 +143 -0
- package/resources/v1-beta/entity-types.d.mts.map +1 -0
- package/resources/v1-beta/entity-types.d.ts +143 -0
- package/resources/v1-beta/entity-types.d.ts.map +1 -0
- package/resources/v1-beta/entity-types.js +55 -0
- package/resources/v1-beta/entity-types.js.map +1 -0
- package/resources/v1-beta/entity-types.mjs +51 -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 +5 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/v1/addons/addons.ts +595 -0
- package/src/resources/v1/addons/index.ts +3 -0
- package/src/resources/v1/{events/credits → credits}/credits.ts +36 -16
- package/src/resources/v1/{events/credits → credits}/custom-currencies.ts +13 -256
- package/src/resources/v1/{events/credits → credits}/grants.ts +5 -5
- package/src/resources/v1/{events/credits → credits}/index.ts +1 -4
- package/src/resources/v1/events.ts +75 -1
- package/src/resources/v1/index.ts +16 -1
- package/src/resources/v1/plans/index.ts +2 -0
- package/src/resources/v1/plans/plans.ts +40 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +12 -9
- package/src/resources/v1/v1.ts +36 -2
- package/src/resources/v1-beta/customers/assignments.ts +225 -0
- package/src/resources/v1-beta/customers/customers.ts +71 -0
- package/src/resources/v1-beta/customers/entities.ts +360 -0
- package/src/resources/v1-beta/customers/entitlements.ts +325 -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 +179 -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
- package/resources/v1/events/credits/credits.d.mts.map +0 -1
- package/resources/v1/events/credits/credits.d.ts.map +0 -1
- package/resources/v1/events/credits/credits.js.map +0 -1
- package/resources/v1/events/credits/credits.mjs.map +0 -1
- package/resources/v1/events/credits/custom-currencies.d.mts.map +0 -1
- package/resources/v1/events/credits/custom-currencies.d.ts.map +0 -1
- package/resources/v1/events/credits/custom-currencies.js.map +0 -1
- package/resources/v1/events/credits/custom-currencies.mjs.map +0 -1
- package/resources/v1/events/credits/grants.d.mts.map +0 -1
- package/resources/v1/events/credits/grants.d.ts.map +0 -1
- package/resources/v1/events/credits/grants.js.map +0 -1
- package/resources/v1/events/credits/grants.mjs.map +0 -1
- package/resources/v1/events/credits/index.d.mts +0 -4
- package/resources/v1/events/credits/index.d.mts.map +0 -1
- package/resources/v1/events/credits/index.d.ts +0 -4
- package/resources/v1/events/credits/index.d.ts.map +0 -1
- package/resources/v1/events/credits/index.js.map +0 -1
- package/resources/v1/events/credits/index.mjs.map +0 -1
- package/resources/v1/events/credits.d.mts.map +0 -1
- package/resources/v1/events/credits.d.ts.map +0 -1
- package/resources/v1/events/credits.js.map +0 -1
- package/resources/v1/events/credits.mjs.map +0 -1
- package/resources/v1/events/events.d.mts +0 -70
- package/resources/v1/events/events.d.mts.map +0 -1
- package/resources/v1/events/events.d.ts +0 -70
- package/resources/v1/events/events.d.ts.map +0 -1
- package/resources/v1/events/events.js +0 -27
- package/resources/v1/events/events.js.map +0 -1
- package/resources/v1/events/events.mjs +0 -22
- package/resources/v1/events/events.mjs.map +0 -1
- package/resources/v1/events/index.d.mts +0 -3
- package/resources/v1/events/index.d.mts.map +0 -1
- package/resources/v1/events/index.d.ts +0 -3
- package/resources/v1/events/index.d.ts.map +0 -1
- package/resources/v1/events/index.js +0 -9
- package/resources/v1/events/index.js.map +0 -1
- package/resources/v1/events/index.mjs +0 -4
- package/resources/v1/events/index.mjs.map +0 -1
- package/src/resources/v1/events/events.ts +0 -103
- package/src/resources/v1/events/index.ts +0 -13
- /package/resources/v1/{events/credits → credits}/index.js +0 -0
- /package/resources/v1/{events/credits → credits}/index.mjs +0 -0
- /package/resources/v1/{events/credits.d.mts → credits.d.mts} +0 -0
- /package/resources/v1/{events/credits.d.ts → credits.d.ts} +0 -0
- /package/resources/v1/{events/credits.mjs → credits.mjs} +0 -0
- /package/src/resources/v1/{events/credits.ts → credits.ts} +0 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
import { path } from '../../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Entities extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves a single entity for the given customer by its identifier.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const entity =
|
|
16
|
+
* await client.v1Beta.customers.entities.retrieve('x', {
|
|
17
|
+
* id: 'id',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
retrieve(
|
|
22
|
+
entityID: string,
|
|
23
|
+
params: EntityRetrieveParams,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): APIPromise<EntityRetrieveResponse> {
|
|
26
|
+
const { id } = params;
|
|
27
|
+
return this._client.get(path`/api/v1-beta/customers/${id}/entities/${entityID}`, options);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves a paginated list of entities for the given customer.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Automatically fetches more pages as needed.
|
|
36
|
+
* for await (const entityListResponse of client.v1Beta.customers.entities.list(
|
|
37
|
+
* 'id',
|
|
38
|
+
* )) {
|
|
39
|
+
* // ...
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
list(
|
|
44
|
+
id: string,
|
|
45
|
+
query: EntityListParams | null | undefined = {},
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): PagePromise<EntityListResponsesMyCursorIDPage, EntityListResponse> {
|
|
48
|
+
return this._client.getAPIList(
|
|
49
|
+
path`/api/v1-beta/customers/${id}/entities`,
|
|
50
|
+
MyCursorIDPage<EntityListResponse>,
|
|
51
|
+
{ query, ...options },
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Archives entities in bulk for the given customer by id.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const entityIDsActionResponseDto =
|
|
61
|
+
* await client.v1Beta.customers.entities.archive('id', {
|
|
62
|
+
* ids: ['user-7f3a0c1d', 'user-c4d1b2e9'],
|
|
63
|
+
* });
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
archive(
|
|
67
|
+
id: string,
|
|
68
|
+
body: EntityArchiveParams,
|
|
69
|
+
options?: RequestOptions,
|
|
70
|
+
): APIPromise<EntityIDsActionResponseDto> {
|
|
71
|
+
return this._client.post(path`/api/v1-beta/customers/${id}/entities/archive`, { body, ...options });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Restores previously archived entities in bulk for the given customer by id.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const entityIDsActionResponseDto =
|
|
80
|
+
* await client.v1Beta.customers.entities.unarchive('id', {
|
|
81
|
+
* ids: ['user-7f3a0c1d', 'user-c4d1b2e9'],
|
|
82
|
+
* });
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
unarchive(
|
|
86
|
+
id: string,
|
|
87
|
+
body: EntityUnarchiveParams,
|
|
88
|
+
options?: RequestOptions,
|
|
89
|
+
): APIPromise<EntityIDsActionResponseDto> {
|
|
90
|
+
return this._client.post(path`/api/v1-beta/customers/${id}/entities/unarchive`, { body, ...options });
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Creates or updates entities in bulk for the given customer. Existing entities
|
|
95
|
+
* matched by id are updated; new ids are created.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const response =
|
|
100
|
+
* await client.v1Beta.customers.entities.upsert('id', {
|
|
101
|
+
* entities: [
|
|
102
|
+
* {
|
|
103
|
+
* id: 'user-7f3a0c1d',
|
|
104
|
+
* typeRefId: 'user',
|
|
105
|
+
* metadata: { email: 'jane@acme.com', role: 'admin' },
|
|
106
|
+
* },
|
|
107
|
+
* {
|
|
108
|
+
* id: 'user-c4d1b2e9',
|
|
109
|
+
* typeRefId: 'user',
|
|
110
|
+
* metadata: { email: 'john@acme.com' },
|
|
111
|
+
* },
|
|
112
|
+
* ],
|
|
113
|
+
* });
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
upsert(id: string, body: EntityUpsertParams, options?: RequestOptions): APIPromise<EntityUpsertResponse> {
|
|
117
|
+
return this._client.put(path`/api/v1-beta/customers/${id}/entities`, { body, ...options });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type EntityListResponsesMyCursorIDPage = MyCursorIDPage<EntityListResponse>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Wrapped response echoing the ids that were acted on by an archive/unarchive call
|
|
125
|
+
*/
|
|
126
|
+
export interface EntityIDsActionResponseDto {
|
|
127
|
+
/**
|
|
128
|
+
* List of entity identifiers that were acted on
|
|
129
|
+
*/
|
|
130
|
+
data: EntityIDsActionResponseDto.Data;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export namespace EntityIDsActionResponseDto {
|
|
134
|
+
/**
|
|
135
|
+
* List of entity identifiers that were acted on
|
|
136
|
+
*/
|
|
137
|
+
export interface Data {
|
|
138
|
+
/**
|
|
139
|
+
* Entity identifiers to act on
|
|
140
|
+
*/
|
|
141
|
+
ids: Array<string>;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* List of entity identifiers to act on in bulk (1-100 entries)
|
|
147
|
+
*/
|
|
148
|
+
export interface EntityIDsRequestDto {
|
|
149
|
+
/**
|
|
150
|
+
* Entity identifiers to act on
|
|
151
|
+
*/
|
|
152
|
+
ids: Array<string>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Response object
|
|
157
|
+
*/
|
|
158
|
+
export interface EntityRetrieveResponse {
|
|
159
|
+
/**
|
|
160
|
+
* A stored entity instance tracked by the governance service for a given customer
|
|
161
|
+
*/
|
|
162
|
+
data: EntityRetrieveResponse.Data;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export namespace EntityRetrieveResponse {
|
|
166
|
+
/**
|
|
167
|
+
* A stored entity instance tracked by the governance service for a given customer
|
|
168
|
+
*/
|
|
169
|
+
export interface Data {
|
|
170
|
+
/**
|
|
171
|
+
* The unique identifier for the entity
|
|
172
|
+
*/
|
|
173
|
+
id: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Timestamp of when the record was deleted
|
|
177
|
+
*/
|
|
178
|
+
archivedAt: string | null;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Timestamp of when the record was created
|
|
182
|
+
*/
|
|
183
|
+
createdAt: string;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Free-form key/value metadata attached to the entity
|
|
187
|
+
*/
|
|
188
|
+
metadata: { [key: string]: string };
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* The entity type identifier this entity instantiates
|
|
192
|
+
*/
|
|
193
|
+
typeId: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Timestamp of when the record was last updated
|
|
197
|
+
*/
|
|
198
|
+
updatedAt: string;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* A stored entity instance tracked by the governance service for a given customer
|
|
204
|
+
*/
|
|
205
|
+
export interface EntityListResponse {
|
|
206
|
+
/**
|
|
207
|
+
* The unique identifier for the entity
|
|
208
|
+
*/
|
|
209
|
+
id: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Timestamp of when the record was deleted
|
|
213
|
+
*/
|
|
214
|
+
archivedAt: string | null;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Timestamp of when the record was created
|
|
218
|
+
*/
|
|
219
|
+
createdAt: string;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Free-form key/value metadata attached to the entity
|
|
223
|
+
*/
|
|
224
|
+
metadata: { [key: string]: string };
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* The entity type identifier this entity instantiates
|
|
228
|
+
*/
|
|
229
|
+
typeId: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Timestamp of when the record was last updated
|
|
233
|
+
*/
|
|
234
|
+
updatedAt: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* List of entities created or updated by an upsert request
|
|
239
|
+
*/
|
|
240
|
+
export interface EntityUpsertResponse {
|
|
241
|
+
data: Array<EntityUpsertResponse.Data>;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export namespace EntityUpsertResponse {
|
|
245
|
+
/**
|
|
246
|
+
* A stored entity instance tracked by the governance service for a given customer
|
|
247
|
+
*/
|
|
248
|
+
export interface Data {
|
|
249
|
+
/**
|
|
250
|
+
* The unique identifier for the entity
|
|
251
|
+
*/
|
|
252
|
+
id: string;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Timestamp of when the record was deleted
|
|
256
|
+
*/
|
|
257
|
+
archivedAt: string | null;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Timestamp of when the record was created
|
|
261
|
+
*/
|
|
262
|
+
createdAt: string;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Free-form key/value metadata attached to the entity
|
|
266
|
+
*/
|
|
267
|
+
metadata: { [key: string]: string };
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The entity type identifier this entity instantiates
|
|
271
|
+
*/
|
|
272
|
+
typeId: string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Timestamp of when the record was last updated
|
|
276
|
+
*/
|
|
277
|
+
updatedAt: string;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export interface EntityRetrieveParams {
|
|
282
|
+
/**
|
|
283
|
+
* The customer identifier (owner) the entity belongs to
|
|
284
|
+
*/
|
|
285
|
+
id: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface EntityListParams extends MyCursorIDPageParams {
|
|
289
|
+
/**
|
|
290
|
+
* Whether to include archived entities. One of: true, false
|
|
291
|
+
*/
|
|
292
|
+
includeArchived?: 'true' | 'false';
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Filter results to entities of a specific entity type, by the type's refId
|
|
296
|
+
*/
|
|
297
|
+
typeRefId?: string;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface EntityArchiveParams {
|
|
301
|
+
/**
|
|
302
|
+
* Entity identifiers to act on
|
|
303
|
+
*/
|
|
304
|
+
ids: Array<string>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface EntityUnarchiveParams {
|
|
308
|
+
/**
|
|
309
|
+
* Entity identifiers to act on
|
|
310
|
+
*/
|
|
311
|
+
ids: Array<string>;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface EntityUpsertParams {
|
|
315
|
+
/**
|
|
316
|
+
* List of entities to create or update (1-100 entries)
|
|
317
|
+
*/
|
|
318
|
+
entities: Array<EntityUpsertParams.Entity>;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export namespace EntityUpsertParams {
|
|
322
|
+
/**
|
|
323
|
+
* A single entity to create or update.
|
|
324
|
+
*/
|
|
325
|
+
export interface Entity {
|
|
326
|
+
/**
|
|
327
|
+
* The unique identifier for the entity
|
|
328
|
+
*/
|
|
329
|
+
id: string;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Free-form key/value metadata. Patch semantics: empty-string value removes a key,
|
|
333
|
+
* omitted keys are preserved.
|
|
334
|
+
*/
|
|
335
|
+
metadata?: { [key: string]: string };
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* The entity type refId this entity instantiates. Required when creating a new
|
|
339
|
+
* entity; on a re-upsert may be omitted to preserve the existing type. Governance
|
|
340
|
+
* returns 400 if missing on create.
|
|
341
|
+
*/
|
|
342
|
+
typeRefId?: string;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export declare namespace Entities {
|
|
347
|
+
export {
|
|
348
|
+
type EntityIDsActionResponseDto as EntityIDsActionResponseDto,
|
|
349
|
+
type EntityIDsRequestDto as EntityIDsRequestDto,
|
|
350
|
+
type EntityRetrieveResponse as EntityRetrieveResponse,
|
|
351
|
+
type EntityListResponse as EntityListResponse,
|
|
352
|
+
type EntityUpsertResponse as EntityUpsertResponse,
|
|
353
|
+
type EntityListResponsesMyCursorIDPage as EntityListResponsesMyCursorIDPage,
|
|
354
|
+
type EntityRetrieveParams as EntityRetrieveParams,
|
|
355
|
+
type EntityListParams as EntityListParams,
|
|
356
|
+
type EntityArchiveParams as EntityArchiveParams,
|
|
357
|
+
type EntityUnarchiveParams as EntityUnarchiveParams,
|
|
358
|
+
type EntityUpsertParams as EntityUpsertParams,
|
|
359
|
+
};
|
|
360
|
+
}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Entitlements extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Experimental — request and response shapes may change without notice. Same
|
|
11
|
+
* semantics as `Check entitlement`, plus an optional `dimensions` query param that
|
|
12
|
+
* resolves to per-entity governance limits surfaced as `chains` on the response.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.v1Beta.customers.entitlements.check('x');
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
check(
|
|
21
|
+
id: string,
|
|
22
|
+
query: EntitlementCheckParams | null | undefined = {},
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): APIPromise<EntitlementCheckResponse> {
|
|
25
|
+
return this._client.get(path`/api/v1-beta/customers/${id}/entitlements/check`, { query, ...options });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Response object
|
|
31
|
+
*/
|
|
32
|
+
export interface EntitlementCheckResponse {
|
|
33
|
+
/**
|
|
34
|
+
* Feature entitlement with optional governance chains attached.
|
|
35
|
+
*/
|
|
36
|
+
data: EntitlementCheckResponse.Feature | EntitlementCheckResponse.Credit;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export namespace EntitlementCheckResponse {
|
|
40
|
+
/**
|
|
41
|
+
* Feature entitlement with optional governance chains attached.
|
|
42
|
+
*/
|
|
43
|
+
export interface Feature {
|
|
44
|
+
accessDeniedReason:
|
|
45
|
+
| 'FeatureNotFound'
|
|
46
|
+
| 'CustomerNotFound'
|
|
47
|
+
| 'CustomerIsArchived'
|
|
48
|
+
| 'CustomerResourceNotFound'
|
|
49
|
+
| 'NoActiveSubscription'
|
|
50
|
+
| 'NoFeatureEntitlementInSubscription'
|
|
51
|
+
| 'RequestedUsageExceedingLimit'
|
|
52
|
+
| 'RequestedValuesMismatch'
|
|
53
|
+
| 'BudgetExceeded'
|
|
54
|
+
| 'Unknown'
|
|
55
|
+
| 'FeatureTypeMismatch'
|
|
56
|
+
| 'Revoked'
|
|
57
|
+
| 'InsufficientCredits'
|
|
58
|
+
| 'EntitlementNotFound'
|
|
59
|
+
| null;
|
|
60
|
+
|
|
61
|
+
isGranted: boolean;
|
|
62
|
+
|
|
63
|
+
type: 'FEATURE';
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Per-entity rollups, one chain per resolved dimension. Omitted when dimensions
|
|
67
|
+
* was not provided.
|
|
68
|
+
*/
|
|
69
|
+
chains?: Array<Array<Feature.Chain>>;
|
|
70
|
+
|
|
71
|
+
currentUsage?: number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Timestamp of the last update to the entitlement grant or configuration.
|
|
75
|
+
*/
|
|
76
|
+
entitlementUpdatedAt?: string;
|
|
77
|
+
|
|
78
|
+
feature?: Feature.Feature;
|
|
79
|
+
|
|
80
|
+
hasUnlimitedUsage?: boolean;
|
|
81
|
+
|
|
82
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
|
|
83
|
+
|
|
84
|
+
usageLimit?: number | null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The anchor for calculating the usage period for metered entitlements with a
|
|
88
|
+
* reset period configured
|
|
89
|
+
*/
|
|
90
|
+
usagePeriodAnchor?: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The end date of the usage period for metered entitlements with a reset period
|
|
94
|
+
* configured
|
|
95
|
+
*/
|
|
96
|
+
usagePeriodEnd?: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The start date of the usage period for metered entitlements with a reset period
|
|
100
|
+
* configured
|
|
101
|
+
*/
|
|
102
|
+
usagePeriodStart?: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The next time the entitlement should be recalculated
|
|
106
|
+
*/
|
|
107
|
+
validUntil?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export namespace Feature {
|
|
111
|
+
/**
|
|
112
|
+
* Per-entity governance node — limit and current usage for a single resolved
|
|
113
|
+
* entity.
|
|
114
|
+
*/
|
|
115
|
+
export interface Chain {
|
|
116
|
+
/**
|
|
117
|
+
* Amount consumed by this entity in the current cadence period.
|
|
118
|
+
*/
|
|
119
|
+
currentUsage: number;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* External id of the entity within the customer.
|
|
123
|
+
*/
|
|
124
|
+
entityId: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Whether this node alone permits the requested usage.
|
|
128
|
+
*/
|
|
129
|
+
isGranted: boolean;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Hard usage limit for this node; null when no assignment is configured.
|
|
133
|
+
*/
|
|
134
|
+
usageLimit: number | null;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface Feature {
|
|
138
|
+
/**
|
|
139
|
+
* The unique reference ID of the entitlement.
|
|
140
|
+
*/
|
|
141
|
+
id: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The human-readable name of the entitlement, shown in UI elements.
|
|
145
|
+
*/
|
|
146
|
+
displayName: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The current status of the feature.
|
|
150
|
+
*/
|
|
151
|
+
featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The type of feature associated with the entitlement.
|
|
155
|
+
*/
|
|
156
|
+
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Credit entitlement with optional governance chains attached.
|
|
162
|
+
*/
|
|
163
|
+
export interface Credit {
|
|
164
|
+
accessDeniedReason:
|
|
165
|
+
| 'FeatureNotFound'
|
|
166
|
+
| 'CustomerNotFound'
|
|
167
|
+
| 'CustomerIsArchived'
|
|
168
|
+
| 'CustomerResourceNotFound'
|
|
169
|
+
| 'NoActiveSubscription'
|
|
170
|
+
| 'NoFeatureEntitlementInSubscription'
|
|
171
|
+
| 'RequestedUsageExceedingLimit'
|
|
172
|
+
| 'RequestedValuesMismatch'
|
|
173
|
+
| 'BudgetExceeded'
|
|
174
|
+
| 'Unknown'
|
|
175
|
+
| 'FeatureTypeMismatch'
|
|
176
|
+
| 'Revoked'
|
|
177
|
+
| 'InsufficientCredits'
|
|
178
|
+
| 'EntitlementNotFound'
|
|
179
|
+
| null;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The currency associated with a credit entitlement.
|
|
183
|
+
*/
|
|
184
|
+
currency: Credit.Currency;
|
|
185
|
+
|
|
186
|
+
currentUsage: number;
|
|
187
|
+
|
|
188
|
+
isGranted: boolean;
|
|
189
|
+
|
|
190
|
+
type: 'CREDIT';
|
|
191
|
+
|
|
192
|
+
usageLimit: number;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Timestamp of the last update to the credit usage.
|
|
196
|
+
*/
|
|
197
|
+
usageUpdatedAt: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Per-entity rollups, one chain per resolved dimension. Omitted when dimensions
|
|
201
|
+
* was not provided.
|
|
202
|
+
*/
|
|
203
|
+
chains?: Array<Array<Credit.Chain>>;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Timestamp of the last update to the entitlement grant or configuration.
|
|
207
|
+
*/
|
|
208
|
+
entitlementUpdatedAt?: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The end date of the current billing period for recurring credit grants.
|
|
212
|
+
*/
|
|
213
|
+
usagePeriodEnd?: string;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The next time the entitlement should be recalculated
|
|
217
|
+
*/
|
|
218
|
+
validUntil?: string;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export namespace Credit {
|
|
222
|
+
/**
|
|
223
|
+
* The currency associated with a credit entitlement.
|
|
224
|
+
*/
|
|
225
|
+
export interface Currency {
|
|
226
|
+
/**
|
|
227
|
+
* The unique identifier of the custom currency.
|
|
228
|
+
*/
|
|
229
|
+
currencyId: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The display name of the currency.
|
|
233
|
+
*/
|
|
234
|
+
displayName: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* A description of the currency.
|
|
238
|
+
*/
|
|
239
|
+
description?: string | null;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Additional metadata associated with the currency.
|
|
243
|
+
*/
|
|
244
|
+
metadata?: { [key: string]: string } | null;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* The plural form of the currency unit.
|
|
248
|
+
*/
|
|
249
|
+
unitPlural?: string | null;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* The singular form of the currency unit.
|
|
253
|
+
*/
|
|
254
|
+
unitSingular?: string | null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Per-entity governance node — limit and current usage for a single resolved
|
|
259
|
+
* entity.
|
|
260
|
+
*/
|
|
261
|
+
export interface Chain {
|
|
262
|
+
/**
|
|
263
|
+
* Amount consumed by this entity in the current cadence period.
|
|
264
|
+
*/
|
|
265
|
+
currentUsage: number;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* External id of the entity within the customer.
|
|
269
|
+
*/
|
|
270
|
+
entityId: string;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Whether this node alone permits the requested usage.
|
|
274
|
+
*/
|
|
275
|
+
isGranted: boolean;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Hard usage limit for this node; null when no assignment is configured.
|
|
279
|
+
*/
|
|
280
|
+
usageLimit: number | null;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface EntitlementCheckParams {
|
|
286
|
+
/**
|
|
287
|
+
* Currency ID (refId) to check for credit entitlements. Mutually exclusive with
|
|
288
|
+
* `featureId`.
|
|
289
|
+
*/
|
|
290
|
+
currencyId?: string;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Optional attribution map (e.g. `dimensions[userId]=u1`). When provided, the
|
|
294
|
+
* response includes a `chains` array with per-entity governance limits.
|
|
295
|
+
*/
|
|
296
|
+
dimensions?: { [key: string]: string };
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Feature ID (refId) to check. Mutually exclusive with `currencyId`.
|
|
300
|
+
*/
|
|
301
|
+
featureId?: string;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Requested usage amount to evaluate against the entitlement limit (numeric
|
|
305
|
+
* features only)
|
|
306
|
+
*/
|
|
307
|
+
requestedUsage?: number;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Requested values to evaluate against allowed values (enum features only)
|
|
311
|
+
*/
|
|
312
|
+
requestedValues?: Array<string>;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Resource ID to scope the entitlement check to a specific resource
|
|
316
|
+
*/
|
|
317
|
+
resourceId?: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export declare namespace Entitlements {
|
|
321
|
+
export {
|
|
322
|
+
type EntitlementCheckResponse as EntitlementCheckResponse,
|
|
323
|
+
type EntitlementCheckParams as EntitlementCheckParams,
|
|
324
|
+
};
|
|
325
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Assignments,
|
|
5
|
+
type AssignmentListResponse,
|
|
6
|
+
type AssignmentUpsertResponse,
|
|
7
|
+
type AssignmentListParams,
|
|
8
|
+
type AssignmentUpsertParams,
|
|
9
|
+
type AssignmentListResponsesMyCursorIDPage,
|
|
10
|
+
} from './assignments';
|
|
11
|
+
export { Customers } from './customers';
|
|
12
|
+
export {
|
|
13
|
+
Entities,
|
|
14
|
+
type EntityIDsActionResponseDto,
|
|
15
|
+
type EntityIDsRequestDto,
|
|
16
|
+
type EntityRetrieveResponse,
|
|
17
|
+
type EntityListResponse,
|
|
18
|
+
type EntityUpsertResponse,
|
|
19
|
+
type EntityRetrieveParams,
|
|
20
|
+
type EntityListParams,
|
|
21
|
+
type EntityArchiveParams,
|
|
22
|
+
type EntityUnarchiveParams,
|
|
23
|
+
type EntityUpsertParams,
|
|
24
|
+
type EntityListResponsesMyCursorIDPage,
|
|
25
|
+
} from './entities';
|
|
26
|
+
export { Entitlements, type EntitlementCheckResponse, type EntitlementCheckParams } from './entitlements';
|