@stigg/typescript 0.1.0-beta.64 → 0.1.0-beta.66
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 +29 -0
- package/package.json +1 -1
- package/resources/v1/addons/addons.d.mts +59 -0
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +59 -0
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +59 -0
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +59 -0
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +31 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +31 -0
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +31 -0
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +31 -0
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/contracts.d.mts +30 -0
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts +30 -0
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.js +30 -0
- package/resources/v1/contracts.js.map +1 -1
- package/resources/v1/contracts.mjs +30 -0
- package/resources/v1/contracts.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +36 -0
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +36 -0
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +36 -0
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +36 -0
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/consumption.d.mts +26 -0
- package/resources/v1/credits/consumption.d.mts.map +1 -1
- package/resources/v1/credits/consumption.d.ts +26 -0
- package/resources/v1/credits/consumption.d.ts.map +1 -1
- package/resources/v1/credits/consumption.js +26 -0
- package/resources/v1/credits/consumption.js.map +1 -1
- package/resources/v1/credits/consumption.mjs +26 -0
- package/resources/v1/credits/consumption.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +25 -0
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +25 -0
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +25 -0
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +25 -0
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +49 -0
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +49 -0
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +49 -0
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +49 -0
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +28 -0
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +28 -0
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +28 -0
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +28 -0
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/credits/reservations.d.mts +10 -0
- package/resources/v1/credits/reservations.d.mts.map +1 -1
- package/resources/v1/credits/reservations.d.ts +10 -0
- package/resources/v1/credits/reservations.d.ts.map +1 -1
- package/resources/v1/credits/reservations.js +10 -0
- package/resources/v1/credits/reservations.js.map +1 -1
- package/resources/v1/credits/reservations.mjs +10 -0
- package/resources/v1/credits/reservations.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +198 -7
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +198 -7
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +106 -6
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +106 -6
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/entities/entities.d.mts +332 -0
- package/resources/v1/customers/entities/entities.d.mts.map +1 -0
- package/resources/v1/customers/entities/entities.d.ts +332 -0
- package/resources/v1/customers/entities/entities.d.ts.map +1 -0
- package/resources/v1/customers/entities/entities.js +139 -0
- package/resources/v1/customers/entities/entities.js.map +1 -0
- package/resources/v1/customers/entities/entities.mjs +134 -0
- package/resources/v1/customers/entities/entities.mjs.map +1 -0
- package/resources/v1/customers/entities/entitlements.d.mts +260 -0
- package/resources/v1/customers/entities/entitlements.d.mts.map +1 -0
- package/resources/v1/customers/entities/entitlements.d.ts +260 -0
- package/resources/v1/customers/entities/entitlements.d.ts.map +1 -0
- package/resources/v1/customers/entities/entitlements.js +87 -0
- package/resources/v1/customers/entities/entitlements.js.map +1 -0
- package/resources/v1/customers/entities/entitlements.mjs +83 -0
- package/resources/v1/customers/entities/entitlements.mjs.map +1 -0
- package/resources/v1/customers/entities/index.d.mts +3 -0
- package/resources/v1/customers/entities/index.d.mts.map +1 -0
- package/resources/v1/customers/entities/index.d.ts +3 -0
- package/resources/v1/customers/entities/index.d.ts.map +1 -0
- package/resources/v1/customers/entities/index.js +9 -0
- package/resources/v1/customers/entities/index.js.map +1 -0
- package/resources/v1/customers/entities/index.mjs +4 -0
- package/resources/v1/customers/entities/index.mjs.map +1 -0
- package/resources/v1/customers/entities.d.mts +2 -0
- package/resources/v1/customers/entities.d.mts.map +1 -0
- package/resources/v1/customers/entities.d.ts +2 -0
- package/resources/v1/customers/entities.d.ts.map +1 -0
- package/resources/v1/customers/entities.js +6 -0
- package/resources/v1/customers/entities.js.map +1 -0
- package/resources/v1/customers/entities.mjs +3 -0
- package/resources/v1/customers/entities.mjs.map +1 -0
- package/resources/v1/customers/index.d.mts +1 -0
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +1 -0
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +3 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -0
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +47 -0
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +47 -0
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +47 -0
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +47 -0
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +16 -0
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +16 -0
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +16 -0
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +16 -0
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +51 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +51 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +51 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/entity-types.d.mts +291 -0
- package/resources/v1/entity-types.d.mts.map +1 -0
- package/resources/v1/entity-types.d.ts +291 -0
- package/resources/v1/entity-types.d.ts.map +1 -0
- package/resources/v1/entity-types.js +128 -0
- package/resources/v1/entity-types.js.map +1 -0
- package/resources/v1/entity-types.mjs +124 -0
- package/resources/v1/entity-types.mjs.map +1 -0
- package/resources/v1/events/beta/customers.d.mts +8 -0
- package/resources/v1/events/beta/customers.d.mts.map +1 -1
- package/resources/v1/events/beta/customers.d.ts +8 -0
- package/resources/v1/events/beta/customers.d.ts.map +1 -1
- package/resources/v1/events/beta/customers.js +8 -0
- package/resources/v1/events/beta/customers.js.map +1 -1
- package/resources/v1/events/beta/customers.mjs +8 -0
- package/resources/v1/events/beta/customers.mjs.map +1 -1
- package/resources/v1/events/data-export/data-export.d.mts +12 -0
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -1
- package/resources/v1/events/data-export/data-export.d.ts +12 -0
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -1
- package/resources/v1/events/data-export/data-export.js +12 -0
- package/resources/v1/events/data-export/data-export.js.map +1 -1
- package/resources/v1/events/data-export/data-export.mjs +12 -0
- package/resources/v1/events/data-export/data-export.mjs.map +1 -1
- package/resources/v1/events/data-export/destinations.d.mts +26 -0
- package/resources/v1/events/data-export/destinations.d.mts.map +1 -1
- package/resources/v1/events/data-export/destinations.d.ts +26 -0
- package/resources/v1/events/data-export/destinations.d.ts.map +1 -1
- package/resources/v1/events/data-export/destinations.js +26 -0
- package/resources/v1/events/data-export/destinations.js.map +1 -1
- package/resources/v1/events/data-export/destinations.mjs +26 -0
- package/resources/v1/events/data-export/destinations.mjs.map +1 -1
- package/resources/v1/events/events.d.mts +21 -0
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +21 -0
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +21 -0
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +21 -0
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +43 -0
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +43 -0
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +43 -0
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +43 -0
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -0
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -0
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +31 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +31 -0
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +31 -0
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +31 -0
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +69 -0
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +69 -0
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +69 -0
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +69 -0
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +43 -0
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +43 -0
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +43 -0
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +43 -0
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +16 -0
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +16 -0
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +16 -0
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +16 -0
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +6 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +6 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +6 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +6 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +81 -0
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +81 -0
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +81 -0
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +81 -0
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +13 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +13 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +13 -0
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +13 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +20 -0
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +20 -0
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +20 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +20 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +4 -0
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +4 -0
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -0
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1-beta/customers/assignments.d.mts +12 -33
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -1
- package/resources/v1-beta/customers/assignments.d.ts +12 -33
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -1
- package/resources/v1-beta/customers/assignments.js +7 -33
- package/resources/v1-beta/customers/assignments.js.map +1 -1
- package/resources/v1-beta/customers/assignments.mjs +7 -33
- package/resources/v1-beta/customers/assignments.mjs.map +1 -1
- package/resources/v1-beta/customers/entities.d.mts +18 -55
- package/resources/v1-beta/customers/entities.d.mts.map +1 -1
- package/resources/v1-beta/customers/entities.d.ts +18 -55
- package/resources/v1-beta/customers/entities.d.ts.map +1 -1
- package/resources/v1-beta/customers/entities.js +18 -55
- package/resources/v1-beta/customers/entities.js.map +1 -1
- package/resources/v1-beta/customers/entities.mjs +18 -55
- package/resources/v1-beta/customers/entities.mjs.map +1 -1
- package/resources/v1-beta/customers/entitlements.d.mts +7 -10
- package/resources/v1-beta/customers/entitlements.d.mts.map +1 -1
- package/resources/v1-beta/customers/entitlements.d.ts +7 -10
- package/resources/v1-beta/customers/entitlements.d.ts.map +1 -1
- package/resources/v1-beta/customers/entitlements.js +2 -5
- package/resources/v1-beta/customers/entitlements.js.map +1 -1
- package/resources/v1-beta/customers/entitlements.mjs +2 -5
- package/resources/v1-beta/customers/entitlements.mjs.map +1 -1
- package/resources/v1-beta/entity-types.d.mts +18 -28
- package/resources/v1-beta/entity-types.d.mts.map +1 -1
- package/resources/v1-beta/entity-types.d.ts +18 -28
- package/resources/v1-beta/entity-types.d.ts.map +1 -1
- package/resources/v1-beta/entity-types.js +6 -28
- package/resources/v1-beta/entity-types.js.map +1 -1
- package/resources/v1-beta/entity-types.mjs +6 -28
- package/resources/v1-beta/entity-types.mjs.map +1 -1
- package/src/resources/v1/addons/addons.ts +59 -0
- package/src/resources/v1/addons/entitlements.ts +31 -0
- package/src/resources/v1/contracts.ts +30 -0
- package/src/resources/v1/coupons.ts +36 -0
- package/src/resources/v1/credits/consumption.ts +26 -0
- package/src/resources/v1/credits/credits.ts +25 -0
- package/src/resources/v1/credits/custom-currencies.ts +49 -0
- package/src/resources/v1/credits/grants.ts +28 -0
- package/src/resources/v1/credits/reservations.ts +10 -0
- package/src/resources/v1/customers/customers.ts +237 -7
- package/src/resources/v1/customers/entities/entities.ts +470 -0
- package/src/resources/v1/customers/entities/entitlements.ts +347 -0
- package/src/resources/v1/customers/entities/index.ts +22 -0
- package/src/resources/v1/customers/entities.ts +3 -0
- package/src/resources/v1/customers/index.ts +12 -0
- package/src/resources/v1/customers/integrations.ts +47 -0
- package/src/resources/v1/customers/payment-method.ts +16 -0
- package/src/resources/v1/customers/promotional-entitlements.ts +51 -0
- package/src/resources/v1/entity-types.ts +402 -0
- package/src/resources/v1/events/beta/customers.ts +8 -0
- package/src/resources/v1/events/data-export/data-export.ts +12 -0
- package/src/resources/v1/events/data-export/destinations.ts +26 -0
- package/src/resources/v1/events/events.ts +21 -0
- package/src/resources/v1/features.ts +43 -0
- package/src/resources/v1/index.ts +12 -0
- package/src/resources/v1/plans/entitlements.ts +31 -0
- package/src/resources/v1/plans/plans.ts +69 -0
- package/src/resources/v1/products.ts +43 -0
- package/src/resources/v1/subscriptions/future-update.ts +16 -0
- package/src/resources/v1/subscriptions/invoice.ts +6 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +81 -0
- package/src/resources/v1/subscriptions/usage.ts +13 -0
- package/src/resources/v1/usage.ts +20 -0
- package/src/resources/v1/v1.ts +28 -0
- package/src/resources/v1-beta/customers/assignments.ts +12 -33
- package/src/resources/v1-beta/customers/entities.ts +18 -55
- package/src/resources/v1-beta/customers/entitlements.ts +7 -10
- package/src/resources/v1-beta/entity-types.ts +21 -28
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -26,6 +26,15 @@ export class Plans extends APIResource {
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Creates a new plan in draft status.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const plan = await client.v1.plans.create({
|
|
33
|
+
* id: 'id',
|
|
34
|
+
* displayName: 'displayName',
|
|
35
|
+
* productId: 'productId',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
29
38
|
*/
|
|
30
39
|
create(params: PlanCreateParams, options?: RequestOptions): APIPromise<Plan> {
|
|
31
40
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -45,6 +54,11 @@ export class Plans extends APIResource {
|
|
|
45
54
|
/**
|
|
46
55
|
* Retrieves a plan by its unique identifier, including entitlements and pricing
|
|
47
56
|
* details.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const plan = await client.v1.plans.retrieve('x');
|
|
61
|
+
* ```
|
|
48
62
|
*/
|
|
49
63
|
retrieve(
|
|
50
64
|
id: string,
|
|
@@ -67,6 +81,11 @@ export class Plans extends APIResource {
|
|
|
67
81
|
/**
|
|
68
82
|
* Updates an existing plan's properties such as display name, description, and
|
|
69
83
|
* metadata.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const plan = await client.v1.plans.update('x');
|
|
88
|
+
* ```
|
|
70
89
|
*/
|
|
71
90
|
update(id: string, params: PlanUpdateParams, options?: RequestOptions): APIPromise<Plan> {
|
|
72
91
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -85,6 +104,14 @@ export class Plans extends APIResource {
|
|
|
85
104
|
|
|
86
105
|
/**
|
|
87
106
|
* Retrieves a paginated list of plans in the environment.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* // Automatically fetches more pages as needed.
|
|
111
|
+
* for await (const planListResponse of client.v1.plans.list()) {
|
|
112
|
+
* // ...
|
|
113
|
+
* }
|
|
114
|
+
* ```
|
|
88
115
|
*/
|
|
89
116
|
list(
|
|
90
117
|
params: PlanListParams | null | undefined = {},
|
|
@@ -106,6 +133,11 @@ export class Plans extends APIResource {
|
|
|
106
133
|
|
|
107
134
|
/**
|
|
108
135
|
* Archives a plan, preventing it from being used in new subscriptions.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* const plan = await client.v1.plans.archive('x');
|
|
140
|
+
* ```
|
|
109
141
|
*/
|
|
110
142
|
archive(
|
|
111
143
|
id: string,
|
|
@@ -127,6 +159,11 @@ export class Plans extends APIResource {
|
|
|
127
159
|
|
|
128
160
|
/**
|
|
129
161
|
* Creates a draft version of an existing plan for modification before publishing.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
|
+
* const plan = await client.v1.plans.createDraft('x');
|
|
166
|
+
* ```
|
|
130
167
|
*/
|
|
131
168
|
createDraft(
|
|
132
169
|
id: string,
|
|
@@ -148,6 +185,16 @@ export class Plans extends APIResource {
|
|
|
148
185
|
|
|
149
186
|
/**
|
|
150
187
|
* Retrieves the list of charges configured on a plan.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```ts
|
|
191
|
+
* // Automatically fetches more pages as needed.
|
|
192
|
+
* for await (const planListChargesResponse of client.v1.plans.listCharges(
|
|
193
|
+
* 'x',
|
|
194
|
+
* )) {
|
|
195
|
+
* // ...
|
|
196
|
+
* }
|
|
197
|
+
* ```
|
|
151
198
|
*/
|
|
152
199
|
listCharges(
|
|
153
200
|
id: string,
|
|
@@ -174,6 +221,16 @@ export class Plans extends APIResource {
|
|
|
174
221
|
|
|
175
222
|
/**
|
|
176
223
|
* Retrieves the list of overage charges configured on a plan.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```ts
|
|
227
|
+
* // Automatically fetches more pages as needed.
|
|
228
|
+
* for await (const planListOverageChargesResponse of client.v1.plans.listOverageCharges(
|
|
229
|
+
* 'x',
|
|
230
|
+
* )) {
|
|
231
|
+
* // ...
|
|
232
|
+
* }
|
|
233
|
+
* ```
|
|
177
234
|
*/
|
|
178
235
|
listOverageCharges(
|
|
179
236
|
id: string,
|
|
@@ -204,6 +261,13 @@ export class Plans extends APIResource {
|
|
|
204
261
|
* onto the new version immediately (`ALL_CUSTOMERS`) or stay on the version they
|
|
205
262
|
* subscribed to — grandfathered — until you explicitly migrate them, e.g. via the
|
|
206
263
|
* migrate subscription endpoint (`NEW_CUSTOMERS`).
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```ts
|
|
267
|
+
* const response = await client.v1.plans.publish('x', {
|
|
268
|
+
* migrationType: 'NEW_CUSTOMERS',
|
|
269
|
+
* });
|
|
270
|
+
* ```
|
|
207
271
|
*/
|
|
208
272
|
publish(id: string, params: PlanPublishParams, options?: RequestOptions): APIPromise<PlanPublishResponse> {
|
|
209
273
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -222,6 +286,11 @@ export class Plans extends APIResource {
|
|
|
222
286
|
|
|
223
287
|
/**
|
|
224
288
|
* Removes a draft version of a plan.
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* ```ts
|
|
292
|
+
* const response = await client.v1.plans.removeDraft('x');
|
|
293
|
+
* ```
|
|
225
294
|
*/
|
|
226
295
|
removeDraft(
|
|
227
296
|
id: string,
|
|
@@ -14,6 +14,13 @@ export class Products extends APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Archives a product, preventing new subscriptions. All plans and addons are
|
|
16
16
|
* archived.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const product = await client.v1.products.archiveProduct(
|
|
21
|
+
* 'x',
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
17
24
|
*/
|
|
18
25
|
archiveProduct(
|
|
19
26
|
id: string,
|
|
@@ -35,6 +42,14 @@ export class Products extends APIResource {
|
|
|
35
42
|
|
|
36
43
|
/**
|
|
37
44
|
* Creates a new product.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const product = await client.v1.products.createProduct({
|
|
49
|
+
* id: 'id',
|
|
50
|
+
* displayName: 'displayName',
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
38
53
|
*/
|
|
39
54
|
createProduct(params: ProductCreateProductParams, options?: RequestOptions): APIPromise<Product> {
|
|
40
55
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -53,6 +68,14 @@ export class Products extends APIResource {
|
|
|
53
68
|
|
|
54
69
|
/**
|
|
55
70
|
* Duplicates an existing product, including its plans, addons, and configuration.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const product = await client.v1.products.duplicateProduct(
|
|
75
|
+
* 'x',
|
|
76
|
+
* { targetId: 'targetId' },
|
|
77
|
+
* );
|
|
78
|
+
* ```
|
|
56
79
|
*/
|
|
57
80
|
duplicateProduct(
|
|
58
81
|
id: string,
|
|
@@ -75,6 +98,14 @@ export class Products extends APIResource {
|
|
|
75
98
|
|
|
76
99
|
/**
|
|
77
100
|
* Retrieves a paginated list of products in the environment.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* // Automatically fetches more pages as needed.
|
|
105
|
+
* for await (const productListProductsResponse of client.v1.products.listProducts()) {
|
|
106
|
+
* // ...
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
78
109
|
*/
|
|
79
110
|
listProducts(
|
|
80
111
|
params: ProductListProductsParams | null | undefined = {},
|
|
@@ -96,6 +127,13 @@ export class Products extends APIResource {
|
|
|
96
127
|
|
|
97
128
|
/**
|
|
98
129
|
* Restores an archived product, allowing new subscriptions to be created.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* const product = await client.v1.products.unarchiveProduct(
|
|
134
|
+
* 'x',
|
|
135
|
+
* );
|
|
136
|
+
* ```
|
|
99
137
|
*/
|
|
100
138
|
unarchiveProduct(
|
|
101
139
|
id: string,
|
|
@@ -118,6 +156,11 @@ export class Products extends APIResource {
|
|
|
118
156
|
/**
|
|
119
157
|
* Updates an existing product's properties such as display name, description, and
|
|
120
158
|
* metadata.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const product = await client.v1.products.updateProduct('x');
|
|
163
|
+
* ```
|
|
121
164
|
*/
|
|
122
165
|
updateProduct(
|
|
123
166
|
id: string,
|
|
@@ -12,6 +12,14 @@ import { path } from '../../../internal/utils/path';
|
|
|
12
12
|
export class FutureUpdate extends APIResource {
|
|
13
13
|
/**
|
|
14
14
|
* Cancels a subscription update that is pending payment completion.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const cancelSubscription =
|
|
19
|
+
* await client.v1.subscriptions.futureUpdate.cancelPendingPayment(
|
|
20
|
+
* 'x',
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
15
23
|
*/
|
|
16
24
|
cancelPendingPayment(
|
|
17
25
|
id: string,
|
|
@@ -34,6 +42,14 @@ export class FutureUpdate extends APIResource {
|
|
|
34
42
|
/**
|
|
35
43
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
36
44
|
* change.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const cancelSubscription =
|
|
49
|
+
* await client.v1.subscriptions.futureUpdate.cancelSchedule(
|
|
50
|
+
* 'x',
|
|
51
|
+
* );
|
|
52
|
+
* ```
|
|
37
53
|
*/
|
|
38
54
|
cancelSchedule(
|
|
39
55
|
id: string,
|
|
@@ -13,6 +13,12 @@ export class Invoice extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Marks the latest invoice of a subscription as paid in the billing provider. The
|
|
15
15
|
* invoice must exist and have an OPEN status.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const response =
|
|
20
|
+
* await client.v1.subscriptions.invoice.markAsPaid('x');
|
|
21
|
+
* ```
|
|
16
22
|
*/
|
|
17
23
|
markAsPaid(
|
|
18
24
|
id: string,
|
|
@@ -32,6 +32,13 @@ export class Subscriptions extends APIResource {
|
|
|
32
32
|
/**
|
|
33
33
|
* Retrieves a subscription by its unique identifier, including plan details,
|
|
34
34
|
* billing period, status, and add-ons.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const subscription = await client.v1.subscriptions.retrieve(
|
|
39
|
+
* 'x',
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
35
42
|
*/
|
|
36
43
|
retrieve(
|
|
37
44
|
id: string,
|
|
@@ -60,6 +67,13 @@ export class Subscriptions extends APIResource {
|
|
|
60
67
|
* the array is removed from the subscription. Changes classified as a downgrade
|
|
61
68
|
* may be scheduled for the end of the current billing period instead of applying
|
|
62
69
|
* immediately, depending on your update scheduling configuration.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const subscription = await client.v1.subscriptions.update(
|
|
74
|
+
* 'x',
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
63
77
|
*/
|
|
64
78
|
update(id: string, params: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription> {
|
|
65
79
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -79,6 +93,14 @@ export class Subscriptions extends APIResource {
|
|
|
79
93
|
/**
|
|
80
94
|
* Retrieves a paginated list of subscriptions, with optional filters for customer,
|
|
81
95
|
* status, and plan.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* // Automatically fetches more pages as needed.
|
|
100
|
+
* for await (const subscriptionListResponse of client.v1.subscriptions.list()) {
|
|
101
|
+
* // ...
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
82
104
|
*/
|
|
83
105
|
list(
|
|
84
106
|
params: SubscriptionListParams | null | undefined = {},
|
|
@@ -101,6 +123,13 @@ export class Subscriptions extends APIResource {
|
|
|
101
123
|
/**
|
|
102
124
|
* Cancels an active subscription, either immediately or at a specified time such
|
|
103
125
|
* as end of billing period.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```ts
|
|
129
|
+
* const subscription = await client.v1.subscriptions.cancel(
|
|
130
|
+
* 'x',
|
|
131
|
+
* );
|
|
132
|
+
* ```
|
|
104
133
|
*/
|
|
105
134
|
cancel(id: string, params: SubscriptionCancelParams, options?: RequestOptions): APIPromise<Subscription> {
|
|
106
135
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -122,6 +151,14 @@ export class Subscriptions extends APIResource {
|
|
|
122
151
|
* managing it. The original customer remains the paying customer for this
|
|
123
152
|
* subscription, unless payment was already delegated to the target customer, in
|
|
124
153
|
* which case the target customer becomes the paying customer as well.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```ts
|
|
157
|
+
* const subscription = await client.v1.subscriptions.delegate(
|
|
158
|
+
* 'x',
|
|
159
|
+
* { targetCustomerId: 'targetCustomerId' },
|
|
160
|
+
* );
|
|
161
|
+
* ```
|
|
125
162
|
*/
|
|
126
163
|
delegate(
|
|
127
164
|
id: string,
|
|
@@ -145,6 +182,19 @@ export class Subscriptions extends APIResource {
|
|
|
145
182
|
/**
|
|
146
183
|
* Imports multiple subscriptions in bulk. Used for migrating subscription data
|
|
147
184
|
* from external systems.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```ts
|
|
188
|
+
* const response = await client.v1.subscriptions.import({
|
|
189
|
+
* subscriptions: [
|
|
190
|
+
* {
|
|
191
|
+
* id: 'id',
|
|
192
|
+
* customerId: 'customerId',
|
|
193
|
+
* planId: 'planId',
|
|
194
|
+
* },
|
|
195
|
+
* ],
|
|
196
|
+
* });
|
|
197
|
+
* ```
|
|
148
198
|
*/
|
|
149
199
|
import(params: SubscriptionImportParams, options?: RequestOptions): APIPromise<SubscriptionImportResponse> {
|
|
150
200
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -164,6 +214,13 @@ export class Subscriptions extends APIResource {
|
|
|
164
214
|
/**
|
|
165
215
|
* Migrates a subscription to the latest published version of its plan or add-ons.
|
|
166
216
|
* Handles prorated charges or credits automatically.
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```ts
|
|
220
|
+
* const subscription = await client.v1.subscriptions.migrate(
|
|
221
|
+
* 'x',
|
|
222
|
+
* );
|
|
223
|
+
* ```
|
|
167
224
|
*/
|
|
168
225
|
migrate(id: string, params: SubscriptionMigrateParams, options?: RequestOptions): APIPromise<Subscription> {
|
|
169
226
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -183,6 +240,14 @@ export class Subscriptions extends APIResource {
|
|
|
183
240
|
/**
|
|
184
241
|
* Previews the pricing impact of creating or updating a subscription without
|
|
185
242
|
* making changes. Returns estimated costs, taxes, and proration details.
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```ts
|
|
246
|
+
* const response = await client.v1.subscriptions.preview({
|
|
247
|
+
* customerId: 'customerId',
|
|
248
|
+
* planId: 'planId',
|
|
249
|
+
* });
|
|
250
|
+
* ```
|
|
186
251
|
*/
|
|
187
252
|
preview(
|
|
188
253
|
params: SubscriptionPreviewParams,
|
|
@@ -205,6 +270,14 @@ export class Subscriptions extends APIResource {
|
|
|
205
270
|
/**
|
|
206
271
|
* Creates a new subscription for an existing customer. When payment is required
|
|
207
272
|
* and no payment method exists, returns a checkout URL.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```ts
|
|
276
|
+
* const response = await client.v1.subscriptions.provision({
|
|
277
|
+
* customerId: 'customerId',
|
|
278
|
+
* planId: 'planId',
|
|
279
|
+
* });
|
|
280
|
+
* ```
|
|
208
281
|
*/
|
|
209
282
|
provision(
|
|
210
283
|
params: SubscriptionProvisionParams,
|
|
@@ -227,6 +300,14 @@ export class Subscriptions extends APIResource {
|
|
|
227
300
|
/**
|
|
228
301
|
* Transfers a subscription to a different resource ID. Used for multi-resource
|
|
229
302
|
* products where subscriptions apply to specific entities like websites or apps.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* ```ts
|
|
306
|
+
* const subscription = await client.v1.subscriptions.transfer(
|
|
307
|
+
* 'x',
|
|
308
|
+
* { destinationResourceId: 'destinationResourceId' },
|
|
309
|
+
* );
|
|
310
|
+
* ```
|
|
230
311
|
*/
|
|
231
312
|
transfer(
|
|
232
313
|
id: string,
|
|
@@ -13,6 +13,12 @@ export class Usage extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Immediately charges usage for a subscription via the billing integration.
|
|
15
15
|
* Calculates usage since the last charge and creates an invoice.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const response =
|
|
20
|
+
* await client.v1.subscriptions.usage.chargeUsage('x');
|
|
21
|
+
* ```
|
|
16
22
|
*/
|
|
17
23
|
chargeUsage(
|
|
18
24
|
id: string,
|
|
@@ -36,6 +42,13 @@ export class Usage extends APIResource {
|
|
|
36
42
|
/**
|
|
37
43
|
* Triggers a usage sync for a subscription, reporting current usage to the billing
|
|
38
44
|
* provider.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response = await client.v1.subscriptions.usage.sync(
|
|
49
|
+
* 'x',
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
39
52
|
*/
|
|
40
53
|
sync(
|
|
41
54
|
id: string,
|
|
@@ -14,6 +14,15 @@ export class Usage extends APIResource {
|
|
|
14
14
|
* Estimates the credit cost of a usage report without recording it. Returns the
|
|
15
15
|
* estimated cost per credit currency, the current balance, and the balance after
|
|
16
16
|
* the estimated consumption.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const response = await client.v1.usage.estimate({
|
|
21
|
+
* customerId: 'customerId',
|
|
22
|
+
* featureId: 'featureId',
|
|
23
|
+
* value: -9007199254740991,
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
17
26
|
*/
|
|
18
27
|
estimate(params: UsageEstimateParams, options?: RequestOptions): APIPromise<UsageEstimateResponse> {
|
|
19
28
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -32,6 +41,17 @@ export class Usage extends APIResource {
|
|
|
32
41
|
|
|
33
42
|
/**
|
|
34
43
|
* Retrieves historical usage data for a customer's metered feature over time.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response = await client.v1.usage.history(
|
|
48
|
+
* 'featureId',
|
|
49
|
+
* {
|
|
50
|
+
* customerId: 'customerId',
|
|
51
|
+
* startDate: '2019-12-27T18:11:19.117Z',
|
|
52
|
+
* },
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
35
55
|
*/
|
|
36
56
|
history(
|
|
37
57
|
featureID: string,
|
package/src/resources/v1/v1.ts
CHANGED
|
@@ -28,6 +28,19 @@ import {
|
|
|
28
28
|
CouponUpdateCouponParams,
|
|
29
29
|
Coupons,
|
|
30
30
|
} from './coupons';
|
|
31
|
+
import * as EntityTypesAPI from './entity-types';
|
|
32
|
+
import {
|
|
33
|
+
EntityTypeArchiveParams,
|
|
34
|
+
EntityTypeArchiveResponse,
|
|
35
|
+
EntityTypeCheckActiveEntitiesParams,
|
|
36
|
+
EntityTypeCheckActiveEntitiesResponse,
|
|
37
|
+
EntityTypeListParams,
|
|
38
|
+
EntityTypeListResponse,
|
|
39
|
+
EntityTypeListResponsesMyCursorIDPage,
|
|
40
|
+
EntityTypeUpsertParams,
|
|
41
|
+
EntityTypeUpsertResponse,
|
|
42
|
+
EntityTypes,
|
|
43
|
+
} from './entity-types';
|
|
31
44
|
import * as FeaturesAPI from './features';
|
|
32
45
|
import {
|
|
33
46
|
Feature,
|
|
@@ -187,6 +200,7 @@ export class V1 extends APIResource {
|
|
|
187
200
|
usage: UsageAPI.Usage = new UsageAPI.Usage(this._client);
|
|
188
201
|
products: ProductsAPI.Products = new ProductsAPI.Products(this._client);
|
|
189
202
|
contracts: ContractsAPI.Contracts = new ContractsAPI.Contracts(this._client);
|
|
203
|
+
entityTypes: EntityTypesAPI.EntityTypes = new EntityTypesAPI.EntityTypes(this._client);
|
|
190
204
|
}
|
|
191
205
|
|
|
192
206
|
V1.Customers = Customers;
|
|
@@ -200,6 +214,7 @@ V1.Plans = Plans;
|
|
|
200
214
|
V1.Usage = Usage;
|
|
201
215
|
V1.Products = Products;
|
|
202
216
|
V1.Contracts = Contracts;
|
|
217
|
+
V1.EntityTypes = EntityTypes;
|
|
203
218
|
|
|
204
219
|
export declare namespace V1 {
|
|
205
220
|
export {
|
|
@@ -374,4 +389,17 @@ export declare namespace V1 {
|
|
|
374
389
|
type ContractListParams as ContractListParams,
|
|
375
390
|
type ContractDeleteParams as ContractDeleteParams,
|
|
376
391
|
};
|
|
392
|
+
|
|
393
|
+
export {
|
|
394
|
+
EntityTypes as EntityTypes,
|
|
395
|
+
type EntityTypeListResponse as EntityTypeListResponse,
|
|
396
|
+
type EntityTypeArchiveResponse as EntityTypeArchiveResponse,
|
|
397
|
+
type EntityTypeCheckActiveEntitiesResponse as EntityTypeCheckActiveEntitiesResponse,
|
|
398
|
+
type EntityTypeUpsertResponse as EntityTypeUpsertResponse,
|
|
399
|
+
type EntityTypeListResponsesMyCursorIDPage as EntityTypeListResponsesMyCursorIDPage,
|
|
400
|
+
type EntityTypeListParams as EntityTypeListParams,
|
|
401
|
+
type EntityTypeArchiveParams as EntityTypeArchiveParams,
|
|
402
|
+
type EntityTypeCheckActiveEntitiesParams as EntityTypeCheckActiveEntitiesParams,
|
|
403
|
+
type EntityTypeUpsertParams as EntityTypeUpsertParams,
|
|
404
|
+
};
|
|
377
405
|
}
|
|
@@ -11,17 +11,10 @@ export class Assignments extends APIResource {
|
|
|
11
11
|
/**
|
|
12
12
|
* Returns a cursor-paginated list of capability assignments for the given
|
|
13
13
|
* customer. An assignment ties an entity to a capability with a usage limit and
|
|
14
|
-
* reset cadence.
|
|
14
|
+
* reset cadence. Deprecated: use
|
|
15
|
+
* `GET /api/v1/customers/{id}/entities/entitlements`.
|
|
15
16
|
*
|
|
16
|
-
* @
|
|
17
|
-
* ```ts
|
|
18
|
-
* // Automatically fetches more pages as needed.
|
|
19
|
-
* for await (const assignmentListResponse of client.v1Beta.customers.assignments.list(
|
|
20
|
-
* 'id',
|
|
21
|
-
* )) {
|
|
22
|
-
* // ...
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
17
|
+
* @deprecated Use `v1.customers.entities.entitlements.list` instead.
|
|
25
18
|
*/
|
|
26
19
|
list(
|
|
27
20
|
id: string,
|
|
@@ -50,30 +43,11 @@ export class Assignments extends APIResource {
|
|
|
50
43
|
* Batched create-or-update of capability assignments. Existing assignments matched
|
|
51
44
|
* by (entityId, capabilityId) are updated; new pairs are created. On update,
|
|
52
45
|
* omitted fields (usageLimit, cadence) are preserved; on create both are required
|
|
53
|
-
* by the governance service.
|
|
46
|
+
* by the governance service. Deprecated: use
|
|
47
|
+
* `PUT /api/v1/customers/{id}/entities/entitlements` with the body key
|
|
48
|
+
* `entityEntitlements`.
|
|
54
49
|
*
|
|
55
|
-
* @
|
|
56
|
-
* ```ts
|
|
57
|
-
* const response =
|
|
58
|
-
* await client.v1Beta.customers.assignments.upsert('id', {
|
|
59
|
-
* assignments: [
|
|
60
|
-
* {
|
|
61
|
-
* entityId: 'workspace-001',
|
|
62
|
-
* featureId: 'compute-minutes',
|
|
63
|
-
* usageLimit: 1000,
|
|
64
|
-
* cadence: 'P1M',
|
|
65
|
-
* },
|
|
66
|
-
* {
|
|
67
|
-
* entityId: 'workspace-002',
|
|
68
|
-
* currencyId: 'cred-type-tokens',
|
|
69
|
-
* usageLimit: 2000,
|
|
70
|
-
* cadence: 'P1M',
|
|
71
|
-
* parentId: 'workspace-001',
|
|
72
|
-
* scopeEntityIds: ['user-1'],
|
|
73
|
-
* },
|
|
74
|
-
* ],
|
|
75
|
-
* });
|
|
76
|
-
* ```
|
|
50
|
+
* @deprecated Use `v1.customers.entities.entitlements.upsert` instead. Its body key is `entityEntitlements`.
|
|
77
51
|
*/
|
|
78
52
|
upsert(
|
|
79
53
|
id: string,
|
|
@@ -317,6 +291,11 @@ export namespace AssignmentUpsertParams {
|
|
|
317
291
|
*/
|
|
318
292
|
parentId?: string | null;
|
|
319
293
|
|
|
294
|
+
/**
|
|
295
|
+
* Dimension-scoped sub-budget: the set of entity IDs this budget applies to
|
|
296
|
+
* (order-insensitive, unique, at most 5). Omit or leave empty for the node-wide
|
|
297
|
+
* budget.
|
|
298
|
+
*/
|
|
320
299
|
scopeEntityIds?: Array<string>;
|
|
321
300
|
|
|
322
301
|
/**
|