@stigg/typescript 0.1.0-beta.2 → 0.1.0-beta.21
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 +170 -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.map +1 -1
- package/client.d.ts.map +1 -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.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +372 -32
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +372 -32
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +173 -15
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +173 -15
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +93 -5
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +93 -5
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +80 -8
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +80 -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 +117 -21
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +117 -21
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +96 -9
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +96 -9
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +212 -27
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +212 -27
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +66 -7
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +66 -7
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +150 -28
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +150 -28
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +125 -12
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +125 -12
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +91 -26
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +91 -26
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +63 -5
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +63 -5
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/credits/index.d.mts +3 -4
- package/resources/v1/credits/index.d.mts.map +1 -1
- package/resources/v1/credits/index.d.ts +3 -4
- package/resources/v1/credits/index.d.ts.map +1 -1
- package/resources/v1/credits/index.js +1 -3
- package/resources/v1/credits/index.js.map +1 -1
- package/resources/v1/credits/index.mjs +0 -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 +249 -55
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +249 -55
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +201 -19
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +201 -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 +116 -14
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +116 -14
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +104 -9
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +104 -9
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +48 -8
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +48 -8
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +42 -4
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +42 -4
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +93 -9
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +93 -9
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +89 -6
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +89 -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 +14 -0
- package/resources/v1/events/beta/beta.d.mts.map +1 -0
- package/resources/v1/events/beta/beta.d.ts +14 -0
- package/resources/v1/events/beta/beta.d.ts.map +1 -0
- package/resources/v1/events/beta/beta.js +21 -0
- package/resources/v1/events/beta/beta.js.map +1 -0
- package/resources/v1/events/beta/beta.mjs +16 -0
- package/resources/v1/events/beta/beta.mjs.map +1 -0
- package/resources/v1/events/beta/customers/assignments.d.mts +200 -0
- package/resources/v1/events/beta/customers/assignments.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/assignments.d.ts +200 -0
- package/resources/v1/events/beta/customers/assignments.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/assignments.js +85 -0
- package/resources/v1/events/beta/customers/assignments.js.map +1 -0
- package/resources/v1/events/beta/customers/assignments.mjs +81 -0
- package/resources/v1/events/beta/customers/assignments.mjs.map +1 -0
- package/resources/v1/events/beta/customers/customers.d.mts +18 -0
- package/resources/v1/events/beta/customers/customers.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/customers.d.ts +18 -0
- package/resources/v1/events/beta/customers/customers.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/customers.js +25 -0
- package/resources/v1/events/beta/customers/customers.js.map +1 -0
- package/resources/v1/events/beta/customers/customers.mjs +20 -0
- package/resources/v1/events/beta/customers/customers.mjs.map +1 -0
- package/resources/v1/events/beta/customers/entities.d.mts +360 -0
- package/resources/v1/events/beta/customers/entities.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/entities.d.ts +360 -0
- package/resources/v1/events/beta/customers/entities.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/entities.js +159 -0
- package/resources/v1/events/beta/customers/entities.js.map +1 -0
- package/resources/v1/events/beta/customers/entities.mjs +155 -0
- package/resources/v1/events/beta/customers/entities.mjs.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.d.mts +251 -0
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.d.ts +251 -0
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.js +38 -0
- package/resources/v1/events/beta/customers/entitlements.js.map +1 -0
- package/resources/v1/events/beta/customers/entitlements.mjs +34 -0
- package/resources/v1/events/beta/customers/entitlements.mjs.map +1 -0
- package/resources/v1/events/beta/customers/index.d.mts +5 -0
- package/resources/v1/events/beta/customers/index.d.mts.map +1 -0
- package/resources/v1/events/beta/customers/index.d.ts +5 -0
- package/resources/v1/events/beta/customers/index.d.ts.map +1 -0
- package/resources/v1/events/beta/customers/index.js +13 -0
- package/resources/v1/events/beta/customers/index.js.map +1 -0
- package/resources/v1/events/beta/customers/index.mjs +6 -0
- package/resources/v1/events/beta/customers/index.mjs.map +1 -0
- package/resources/v1/events/beta/customers.d.mts +2 -0
- package/resources/v1/events/beta/customers.d.mts.map +1 -0
- package/resources/v1/events/beta/customers.d.ts +2 -0
- package/resources/v1/events/beta/customers.d.ts.map +1 -0
- package/resources/v1/events/beta/customers.js +6 -0
- package/resources/v1/events/beta/customers.js.map +1 -0
- package/resources/v1/events/beta/customers.mjs +3 -0
- package/resources/v1/events/beta/customers.mjs.map +1 -0
- package/resources/v1/events/beta/entity-types.d.mts +166 -0
- package/resources/v1/events/beta/entity-types.d.mts.map +1 -0
- package/resources/v1/events/beta/entity-types.d.ts +166 -0
- package/resources/v1/events/beta/entity-types.d.ts.map +1 -0
- package/resources/v1/events/beta/entity-types.js +76 -0
- package/resources/v1/events/beta/entity-types.js.map +1 -0
- package/resources/v1/events/beta/entity-types.mjs +72 -0
- package/resources/v1/events/beta/entity-types.mjs.map +1 -0
- package/resources/v1/events/beta/index.d.mts +4 -0
- package/resources/v1/events/beta/index.d.mts.map +1 -0
- package/resources/v1/events/beta/index.d.ts +4 -0
- package/resources/v1/events/beta/index.d.ts.map +1 -0
- package/resources/v1/events/beta/index.js +11 -0
- package/resources/v1/events/beta/index.js.map +1 -0
- package/resources/v1/events/beta/index.mjs +5 -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 +126 -0
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -0
- package/resources/v1/events/data-export/data-export.d.ts +126 -0
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -0
- package/resources/v1/events/data-export/data-export.js +45 -0
- package/resources/v1/events/data-export/data-export.js.map +1 -0
- package/resources/v1/events/data-export/data-export.mjs +40 -0
- package/resources/v1/events/data-export/data-export.mjs.map +1 -0
- package/resources/v1/events/data-export/destinations.d.mts +202 -0
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -0
- package/resources/v1/events/data-export/destinations.d.ts +202 -0
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -0
- package/resources/v1/events/data-export/destinations.js +41 -0
- package/resources/v1/events/data-export/destinations.js.map +1 -0
- package/resources/v1/events/data-export/destinations.mjs +37 -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 +98 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +98 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +56 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +51 -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 +152 -31
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +152 -31
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +115 -11
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +115 -11
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +9 -9
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +9 -9
- 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 +93 -5
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +93 -5
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +80 -8
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +80 -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 +565 -32
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +565 -32
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +204 -16
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +204 -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 +140 -23
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +140 -23
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +116 -11
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +116 -11
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +45 -3
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +45 -3
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +41 -4
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +41 -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 +21 -2
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +21 -2
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +19 -2
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +19 -2
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +341 -85
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +341 -85
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +207 -19
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +209 -21
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +42 -4
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +42 -4
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +39 -4
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +39 -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 +48 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +48 -2
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +50 -4
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +50 -4
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +18 -18
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +18 -18
- 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.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/resources/v1/addons/addons.ts +908 -36
- package/src/resources/v1/addons/entitlements.ts +154 -10
- package/src/resources/v1/addons/index.ts +8 -0
- package/src/resources/v1/coupons.ts +194 -27
- package/src/resources/v1/credits/credits.ts +287 -35
- package/src/resources/v1/credits/custom-currencies.ts +245 -38
- package/src/resources/v1/credits/grants.ts +132 -26
- package/src/resources/v1/credits/index.ts +7 -6
- package/src/resources/v1/customers/customers.ts +415 -67
- package/src/resources/v1/customers/index.ts +8 -1
- package/src/resources/v1/customers/integrations.ts +184 -18
- package/src/resources/v1/customers/payment-method.ts +85 -10
- package/src/resources/v1/customers/promotional-entitlements.ts +133 -11
- package/src/resources/v1/events/beta/beta.ts +35 -0
- package/src/resources/v1/events/beta/customers/assignments.ts +277 -0
- package/src/resources/v1/events/beta/customers/customers.ts +71 -0
- package/src/resources/v1/events/beta/customers/entities.ts +501 -0
- package/src/resources/v1/events/beta/customers/entitlements.ts +354 -0
- package/src/resources/v1/events/beta/customers/index.ts +26 -0
- package/src/resources/v1/events/beta/customers.ts +3 -0
- package/src/resources/v1/events/beta/entity-types.ts +226 -0
- package/src/resources/v1/events/beta/index.ts +12 -0
- package/src/resources/v1/events/beta.ts +3 -0
- package/src/resources/v1/events/data-export/data-export.ts +170 -0
- package/src/resources/v1/events/data-export/destinations.ts +243 -0
- package/src/resources/v1/events/data-export/index.ts +15 -0
- package/src/resources/v1/events/data-export.ts +3 -0
- package/src/resources/v1/events/events.ts +141 -0
- package/src/resources/v1/events/index.ts +11 -0
- package/src/resources/v1/events.ts +1 -75
- package/src/resources/v1/features.ts +252 -39
- package/src/resources/v1/index.ts +31 -1
- package/src/resources/v1/plans/entitlements.ts +154 -10
- package/src/resources/v1/plans/index.ts +11 -0
- package/src/resources/v1/plans/plans.ts +1509 -37
- package/src/resources/v1/products.ts +235 -30
- package/src/resources/v1/subscriptions/future-update.ts +84 -5
- package/src/resources/v1/subscriptions/index.ts +9 -2
- package/src/resources/v1/subscriptions/invoice.ts +42 -3
- package/src/resources/v1/subscriptions/subscriptions.ts +509 -90
- package/src/resources/v1/subscriptions/usage.ts +74 -5
- package/src/resources/v1/usage.ts +77 -5
- package/src/resources/v1/v1.ts +62 -2
- 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/credits/auto-recharge.d.mts +0 -84
- package/resources/v1/credits/auto-recharge.d.mts.map +0 -1
- package/resources/v1/credits/auto-recharge.d.ts +0 -84
- package/resources/v1/credits/auto-recharge.d.ts.map +0 -1
- package/resources/v1/credits/auto-recharge.js +0 -16
- package/resources/v1/credits/auto-recharge.js.map +0 -1
- package/resources/v1/credits/auto-recharge.mjs +0 -12
- package/resources/v1/credits/auto-recharge.mjs.map +0 -1
- package/src/resources/v1/credits/auto-recharge.ts +0 -109
|
@@ -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,41 +14,123 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
13
14
|
/**
|
|
14
15
|
* Grants promotional entitlements to a customer, providing feature access outside
|
|
15
16
|
* their subscription. Entitlements can be time-limited or permanent.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const promotionalEntitlement =
|
|
21
|
+
* await client.v1.customers.promotionalEntitlements.create(
|
|
22
|
+
* 'x',
|
|
23
|
+
* {
|
|
24
|
+
* promotionalEntitlements: [
|
|
25
|
+
* {
|
|
26
|
+
* customEndDate: '2019-12-27T18:11:19.117Z',
|
|
27
|
+
* enumValues: ['string'],
|
|
28
|
+
* featureId: 'featureId',
|
|
29
|
+
* hasSoftLimit: true,
|
|
30
|
+
* hasUnlimitedUsage: true,
|
|
31
|
+
* isVisible: true,
|
|
32
|
+
* monthlyResetPeriodConfiguration: {
|
|
33
|
+
* accordingTo: 'SubscriptionStart',
|
|
34
|
+
* },
|
|
35
|
+
* period: '1 week',
|
|
36
|
+
* resetPeriod: 'YEAR',
|
|
37
|
+
* usageLimit: -9007199254740991,
|
|
38
|
+
* weeklyResetPeriodConfiguration: {
|
|
39
|
+
* accordingTo: 'SubscriptionStart',
|
|
40
|
+
* },
|
|
41
|
+
* yearlyResetPeriodConfiguration: {
|
|
42
|
+
* accordingTo: 'SubscriptionStart',
|
|
43
|
+
* },
|
|
44
|
+
* },
|
|
45
|
+
* ],
|
|
46
|
+
* },
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
16
49
|
*/
|
|
17
50
|
create(
|
|
18
51
|
id: string,
|
|
19
|
-
|
|
52
|
+
params: PromotionalEntitlementCreateParams,
|
|
20
53
|
options?: RequestOptions,
|
|
21
54
|
): APIPromise<PromotionalEntitlementCreateResponse> {
|
|
22
|
-
|
|
55
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
56
|
+
return this._client.post(path`/api/v1/customers/${id}/promotional-entitlements`, {
|
|
57
|
+
body,
|
|
58
|
+
...options,
|
|
59
|
+
headers: buildHeaders([
|
|
60
|
+
{
|
|
61
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
62
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
63
|
+
},
|
|
64
|
+
options?.headers,
|
|
65
|
+
]),
|
|
66
|
+
});
|
|
23
67
|
}
|
|
24
68
|
|
|
25
69
|
/**
|
|
26
70
|
* Retrieves a paginated list of a customer's promotional entitlements.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* // Automatically fetches more pages as needed.
|
|
75
|
+
* for await (const promotionalEntitlementListResponse of client.v1.customers.promotionalEntitlements.list(
|
|
76
|
+
* 'x',
|
|
77
|
+
* )) {
|
|
78
|
+
* // ...
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
27
81
|
*/
|
|
28
82
|
list(
|
|
29
83
|
id: string,
|
|
30
|
-
|
|
84
|
+
params: PromotionalEntitlementListParams | null | undefined = {},
|
|
31
85
|
options?: RequestOptions,
|
|
32
86
|
): PagePromise<PromotionalEntitlementListResponsesMyCursorIDPage, PromotionalEntitlementListResponse> {
|
|
87
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
33
88
|
return this._client.getAPIList(
|
|
34
89
|
path`/api/v1/customers/${id}/promotional-entitlements`,
|
|
35
90
|
MyCursorIDPage<PromotionalEntitlementListResponse>,
|
|
36
|
-
{
|
|
91
|
+
{
|
|
92
|
+
query,
|
|
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
|
+
},
|
|
37
102
|
);
|
|
38
103
|
}
|
|
39
104
|
|
|
40
105
|
/**
|
|
41
106
|
* Revokes a previously granted promotional entitlement from a customer for a
|
|
42
107
|
* specific feature.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const response =
|
|
112
|
+
* await client.v1.customers.promotionalEntitlements.revoke(
|
|
113
|
+
* 'featureId',
|
|
114
|
+
* { id: 'id' },
|
|
115
|
+
* );
|
|
116
|
+
* ```
|
|
43
117
|
*/
|
|
44
118
|
revoke(
|
|
45
119
|
featureID: string,
|
|
46
120
|
params: PromotionalEntitlementRevokeParams,
|
|
47
121
|
options?: RequestOptions,
|
|
48
122
|
): APIPromise<PromotionalEntitlementRevokeResponse> {
|
|
49
|
-
const { id } = params;
|
|
50
|
-
return this._client.delete(path`/api/v1/customers/${id}/promotional-entitlements/${featureID}`,
|
|
123
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
124
|
+
return this._client.delete(path`/api/v1/customers/${id}/promotional-entitlements/${featureID}`, {
|
|
125
|
+
...options,
|
|
126
|
+
headers: buildHeaders([
|
|
127
|
+
{
|
|
128
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
129
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
130
|
+
},
|
|
131
|
+
options?.headers,
|
|
132
|
+
]),
|
|
133
|
+
});
|
|
51
134
|
}
|
|
52
135
|
}
|
|
53
136
|
|
|
@@ -494,9 +577,22 @@ export namespace PromotionalEntitlementRevokeResponse {
|
|
|
494
577
|
|
|
495
578
|
export interface PromotionalEntitlementCreateParams {
|
|
496
579
|
/**
|
|
497
|
-
* Promotional entitlements to grant
|
|
580
|
+
* Body param: Promotional entitlements to grant
|
|
498
581
|
*/
|
|
499
582
|
promotionalEntitlements: Array<PromotionalEntitlementCreateParams.PromotionalEntitlement>;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
586
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
587
|
+
*/
|
|
588
|
+
'X-ACCOUNT-ID'?: string;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
592
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
593
|
+
* intrinsic to the key).
|
|
594
|
+
*/
|
|
595
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
500
596
|
}
|
|
501
597
|
|
|
502
598
|
export namespace PromotionalEntitlementCreateParams {
|
|
@@ -614,15 +710,28 @@ export namespace PromotionalEntitlementCreateParams {
|
|
|
614
710
|
|
|
615
711
|
export interface PromotionalEntitlementListParams extends MyCursorIDPageParams {
|
|
616
712
|
/**
|
|
617
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
713
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
618
714
|
*/
|
|
619
715
|
createdAt?: PromotionalEntitlementListParams.CreatedAt;
|
|
620
716
|
|
|
621
717
|
/**
|
|
622
|
-
* Filter by promotional entitlement status. Supports comma-separated
|
|
623
|
-
* multiple statuses
|
|
718
|
+
* Query param: Filter by promotional entitlement status. Supports comma-separated
|
|
719
|
+
* values for multiple statuses
|
|
624
720
|
*/
|
|
625
721
|
status?: Array<'Active' | 'Expired' | 'Paused'>;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
725
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
726
|
+
*/
|
|
727
|
+
'X-ACCOUNT-ID'?: string;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
731
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
732
|
+
* intrinsic to the key).
|
|
733
|
+
*/
|
|
734
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
626
735
|
}
|
|
627
736
|
|
|
628
737
|
export namespace PromotionalEntitlementListParams {
|
|
@@ -654,9 +763,22 @@ export namespace PromotionalEntitlementListParams {
|
|
|
654
763
|
|
|
655
764
|
export interface PromotionalEntitlementRevokeParams {
|
|
656
765
|
/**
|
|
657
|
-
* The unique identifier of the customer
|
|
766
|
+
* Path param: The unique identifier of the customer
|
|
658
767
|
*/
|
|
659
768
|
id: string;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
772
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
773
|
+
*/
|
|
774
|
+
'X-ACCOUNT-ID'?: string;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
778
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
779
|
+
* intrinsic to the key).
|
|
780
|
+
*/
|
|
781
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
660
782
|
}
|
|
661
783
|
|
|
662
784
|
export declare namespace PromotionalEntitlements {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../core/resource';
|
|
4
|
+
import * as EntityTypesAPI from './entity-types';
|
|
5
|
+
import {
|
|
6
|
+
EntityTypeListParams,
|
|
7
|
+
EntityTypeListResponse,
|
|
8
|
+
EntityTypeListResponsesMyCursorIDPage,
|
|
9
|
+
EntityTypeUpsertParams,
|
|
10
|
+
EntityTypeUpsertResponse,
|
|
11
|
+
EntityTypes,
|
|
12
|
+
} from './entity-types';
|
|
13
|
+
import * as CustomersAPI from './customers/customers';
|
|
14
|
+
import { Customers } from './customers/customers';
|
|
15
|
+
|
|
16
|
+
export class Beta extends APIResource {
|
|
17
|
+
customers: CustomersAPI.Customers = new CustomersAPI.Customers(this._client);
|
|
18
|
+
entityTypes: EntityTypesAPI.EntityTypes = new EntityTypesAPI.EntityTypes(this._client);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Beta.Customers = Customers;
|
|
22
|
+
Beta.EntityTypes = EntityTypes;
|
|
23
|
+
|
|
24
|
+
export declare namespace Beta {
|
|
25
|
+
export { Customers as Customers };
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
EntityTypes as EntityTypes,
|
|
29
|
+
type EntityTypeListResponse as EntityTypeListResponse,
|
|
30
|
+
type EntityTypeUpsertResponse as EntityTypeUpsertResponse,
|
|
31
|
+
type EntityTypeListResponsesMyCursorIDPage as EntityTypeListResponsesMyCursorIDPage,
|
|
32
|
+
type EntityTypeListParams as EntityTypeListParams,
|
|
33
|
+
type EntityTypeUpsertParams as EntityTypeUpsertParams,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
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 { buildHeaders } from '../../../../../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../../../../../internal/request-options';
|
|
8
|
+
import { path } from '../../../../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Assignments extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns a cursor-paginated list of capability assignments for the given
|
|
13
|
+
* customer. An assignment ties an entity to a capability with a usage limit and
|
|
14
|
+
* reset cadence.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* // Automatically fetches more pages as needed.
|
|
19
|
+
* for await (const assignmentListResponse of client.v1.events.beta.customers.assignments.list(
|
|
20
|
+
* 'id',
|
|
21
|
+
* )) {
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
id: string,
|
|
28
|
+
params: AssignmentListParams | null | undefined = {},
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): PagePromise<AssignmentListResponsesMyCursorIDPage, AssignmentListResponse> {
|
|
31
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
32
|
+
return this._client.getAPIList(
|
|
33
|
+
path`/api/v1-beta/customers/${id}/assignments`,
|
|
34
|
+
MyCursorIDPage<AssignmentListResponse>,
|
|
35
|
+
{
|
|
36
|
+
query,
|
|
37
|
+
...options,
|
|
38
|
+
headers: buildHeaders([
|
|
39
|
+
{
|
|
40
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
41
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
42
|
+
},
|
|
43
|
+
options?.headers,
|
|
44
|
+
]),
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Batched create-or-update of capability assignments. Existing assignments matched
|
|
51
|
+
* by (entityId, capabilityId) are updated; new pairs are created. On update,
|
|
52
|
+
* omitted fields (usageLimit, cadence) are preserved; on create both are required
|
|
53
|
+
* by the governance service.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response =
|
|
58
|
+
* await client.v1.events.beta.customers.assignments.upsert(
|
|
59
|
+
* 'id',
|
|
60
|
+
* {
|
|
61
|
+
* assignments: [
|
|
62
|
+
* {
|
|
63
|
+
* entityId: 'workspace-001',
|
|
64
|
+
* capabilityId: 'compute-minutes',
|
|
65
|
+
* usageLimit: 1000,
|
|
66
|
+
* cadence: 'MONTH',
|
|
67
|
+
* },
|
|
68
|
+
* {
|
|
69
|
+
* entityId: 'workspace-002',
|
|
70
|
+
* capabilityId: 'compute-minutes',
|
|
71
|
+
* usageLimit: 2000,
|
|
72
|
+
* cadence: 'MONTH',
|
|
73
|
+
* },
|
|
74
|
+
* ],
|
|
75
|
+
* },
|
|
76
|
+
* );
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
upsert(
|
|
80
|
+
id: string,
|
|
81
|
+
params: AssignmentUpsertParams,
|
|
82
|
+
options?: RequestOptions,
|
|
83
|
+
): APIPromise<AssignmentUpsertResponse> {
|
|
84
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
85
|
+
return this._client.put(path`/api/v1-beta/customers/${id}/assignments`, {
|
|
86
|
+
body,
|
|
87
|
+
...options,
|
|
88
|
+
headers: buildHeaders([
|
|
89
|
+
{
|
|
90
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
91
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
92
|
+
},
|
|
93
|
+
options?.headers,
|
|
94
|
+
]),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type AssignmentListResponsesMyCursorIDPage = MyCursorIDPage<AssignmentListResponse>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* A capability assignment for an entity belonging to a customer. Defines how much
|
|
103
|
+
* of the capability the entity may consume (`usageLimit`) and how often the
|
|
104
|
+
* counter resets (`cadence`).
|
|
105
|
+
*/
|
|
106
|
+
export interface AssignmentListResponse {
|
|
107
|
+
/**
|
|
108
|
+
* Synthetic UUID identifier — also the cursor anchor for paginated lists
|
|
109
|
+
*/
|
|
110
|
+
id: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Usage-reset cadence. Currently only `MONTH` is supported
|
|
114
|
+
*/
|
|
115
|
+
cadence: 'MONTH';
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The capability refId this assignment grants
|
|
119
|
+
*/
|
|
120
|
+
capabilityId: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Timestamp of when the record was created
|
|
124
|
+
*/
|
|
125
|
+
createdAt: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The entity refId this assignment is attached to
|
|
129
|
+
*/
|
|
130
|
+
entityId: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Timestamp of when the record was last updated
|
|
134
|
+
*/
|
|
135
|
+
updatedAt: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Maximum usage allowed within one cadence window
|
|
139
|
+
*/
|
|
140
|
+
usageLimit: number;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Assignments after upsert.
|
|
145
|
+
*/
|
|
146
|
+
export interface AssignmentUpsertResponse {
|
|
147
|
+
data: Array<AssignmentUpsertResponse.Data>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export namespace AssignmentUpsertResponse {
|
|
151
|
+
/**
|
|
152
|
+
* A capability assignment for an entity belonging to a customer. Defines how much
|
|
153
|
+
* of the capability the entity may consume (`usageLimit`) and how often the
|
|
154
|
+
* counter resets (`cadence`).
|
|
155
|
+
*/
|
|
156
|
+
export interface Data {
|
|
157
|
+
/**
|
|
158
|
+
* Synthetic UUID identifier — also the cursor anchor for paginated lists
|
|
159
|
+
*/
|
|
160
|
+
id: string;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Usage-reset cadence. Currently only `MONTH` is supported
|
|
164
|
+
*/
|
|
165
|
+
cadence: 'MONTH';
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The capability refId this assignment grants
|
|
169
|
+
*/
|
|
170
|
+
capabilityId: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Timestamp of when the record was created
|
|
174
|
+
*/
|
|
175
|
+
createdAt: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The entity refId this assignment is attached to
|
|
179
|
+
*/
|
|
180
|
+
entityId: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Timestamp of when the record was last updated
|
|
184
|
+
*/
|
|
185
|
+
updatedAt: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Maximum usage allowed within one cadence window
|
|
189
|
+
*/
|
|
190
|
+
usageLimit: number;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface AssignmentListParams extends MyCursorIDPageParams {
|
|
195
|
+
/**
|
|
196
|
+
* Query param: Filter assignments to a specific capability refId
|
|
197
|
+
*/
|
|
198
|
+
capabilityId?: string;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Query param: Filter assignments to a specific entity refId
|
|
202
|
+
*/
|
|
203
|
+
entityId?: string;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
207
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
208
|
+
*/
|
|
209
|
+
'X-ACCOUNT-ID'?: string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
213
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
214
|
+
* intrinsic to the key).
|
|
215
|
+
*/
|
|
216
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface AssignmentUpsertParams {
|
|
220
|
+
/**
|
|
221
|
+
* Body param: Assignments to upsert (1–100 per request)
|
|
222
|
+
*/
|
|
223
|
+
assignments: Array<AssignmentUpsertParams.Assignment>;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
227
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
228
|
+
*/
|
|
229
|
+
'X-ACCOUNT-ID'?: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
233
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
234
|
+
* intrinsic to the key).
|
|
235
|
+
*/
|
|
236
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export namespace AssignmentUpsertParams {
|
|
240
|
+
/**
|
|
241
|
+
* A single assignment to create or update. The natural key is the
|
|
242
|
+
* `(entityId, capabilityId)` pair. On create both `usageLimit` and `cadence` are
|
|
243
|
+
* required; on update they may be omitted individually to preserve the existing
|
|
244
|
+
* value.
|
|
245
|
+
*/
|
|
246
|
+
export interface Assignment {
|
|
247
|
+
/**
|
|
248
|
+
* The capability refId this assignment grants
|
|
249
|
+
*/
|
|
250
|
+
capabilityId: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The entity refId this assignment is attached to
|
|
254
|
+
*/
|
|
255
|
+
entityId: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Usage-reset cadence (required on create). Currently only `MONTH` is supported
|
|
259
|
+
*/
|
|
260
|
+
cadence?: 'MONTH';
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Maximum usage allowed within one cadence window (required on create)
|
|
264
|
+
*/
|
|
265
|
+
usageLimit?: number;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export declare namespace Assignments {
|
|
270
|
+
export {
|
|
271
|
+
type AssignmentListResponse as AssignmentListResponse,
|
|
272
|
+
type AssignmentUpsertResponse as AssignmentUpsertResponse,
|
|
273
|
+
type AssignmentListResponsesMyCursorIDPage as AssignmentListResponsesMyCursorIDPage,
|
|
274
|
+
type AssignmentListParams as AssignmentListParams,
|
|
275
|
+
type AssignmentUpsertParams as AssignmentUpsertParams,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../../core/resource';
|
|
4
|
+
import * as AssignmentsAPI from './assignments';
|
|
5
|
+
import {
|
|
6
|
+
AssignmentListParams,
|
|
7
|
+
AssignmentListResponse,
|
|
8
|
+
AssignmentListResponsesMyCursorIDPage,
|
|
9
|
+
AssignmentUpsertParams,
|
|
10
|
+
AssignmentUpsertResponse,
|
|
11
|
+
Assignments,
|
|
12
|
+
} from './assignments';
|
|
13
|
+
import * as EntitiesAPI from './entities';
|
|
14
|
+
import {
|
|
15
|
+
Entities,
|
|
16
|
+
EntityArchiveParams,
|
|
17
|
+
EntityArchiveResponse,
|
|
18
|
+
EntityListParams,
|
|
19
|
+
EntityListResponse,
|
|
20
|
+
EntityListResponsesMyCursorIDPage,
|
|
21
|
+
EntityRetrieveParams,
|
|
22
|
+
EntityRetrieveResponse,
|
|
23
|
+
EntityUnarchiveParams,
|
|
24
|
+
EntityUnarchiveResponse,
|
|
25
|
+
EntityUpsertParams,
|
|
26
|
+
EntityUpsertResponse,
|
|
27
|
+
} from './entities';
|
|
28
|
+
import * as EntitlementsAPI from './entitlements';
|
|
29
|
+
import { EntitlementCheckParams, EntitlementCheckResponse, Entitlements } from './entitlements';
|
|
30
|
+
|
|
31
|
+
export class Customers extends APIResource {
|
|
32
|
+
entitlements: EntitlementsAPI.Entitlements = new EntitlementsAPI.Entitlements(this._client);
|
|
33
|
+
entities: EntitiesAPI.Entities = new EntitiesAPI.Entities(this._client);
|
|
34
|
+
assignments: AssignmentsAPI.Assignments = new AssignmentsAPI.Assignments(this._client);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Customers.Entitlements = Entitlements;
|
|
38
|
+
Customers.Entities = Entities;
|
|
39
|
+
Customers.Assignments = Assignments;
|
|
40
|
+
|
|
41
|
+
export declare namespace Customers {
|
|
42
|
+
export {
|
|
43
|
+
Entitlements as Entitlements,
|
|
44
|
+
type EntitlementCheckResponse as EntitlementCheckResponse,
|
|
45
|
+
type EntitlementCheckParams as EntitlementCheckParams,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
Entities as Entities,
|
|
50
|
+
type EntityRetrieveResponse as EntityRetrieveResponse,
|
|
51
|
+
type EntityListResponse as EntityListResponse,
|
|
52
|
+
type EntityArchiveResponse as EntityArchiveResponse,
|
|
53
|
+
type EntityUnarchiveResponse as EntityUnarchiveResponse,
|
|
54
|
+
type EntityUpsertResponse as EntityUpsertResponse,
|
|
55
|
+
type EntityListResponsesMyCursorIDPage as EntityListResponsesMyCursorIDPage,
|
|
56
|
+
type EntityRetrieveParams as EntityRetrieveParams,
|
|
57
|
+
type EntityListParams as EntityListParams,
|
|
58
|
+
type EntityArchiveParams as EntityArchiveParams,
|
|
59
|
+
type EntityUnarchiveParams as EntityUnarchiveParams,
|
|
60
|
+
type EntityUpsertParams as EntityUpsertParams,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export {
|
|
64
|
+
Assignments as Assignments,
|
|
65
|
+
type AssignmentListResponse as AssignmentListResponse,
|
|
66
|
+
type AssignmentUpsertResponse as AssignmentUpsertResponse,
|
|
67
|
+
type AssignmentListResponsesMyCursorIDPage as AssignmentListResponsesMyCursorIDPage,
|
|
68
|
+
type AssignmentListParams as AssignmentListParams,
|
|
69
|
+
type AssignmentUpsertParams as AssignmentUpsertParams,
|
|
70
|
+
};
|
|
71
|
+
}
|