@stigg/typescript 0.1.0-beta.65 → 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 +16 -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 +182 -7
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +182 -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 +17 -50
- package/resources/v1-beta/customers/entities.d.mts.map +1 -1
- package/resources/v1-beta/customers/entities.d.ts +17 -50
- package/resources/v1-beta/customers/entities.d.ts.map +1 -1
- package/resources/v1-beta/customers/entities.js +17 -50
- package/resources/v1-beta/customers/entities.js.map +1 -1
- package/resources/v1-beta/customers/entities.mjs +17 -50
- 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 +4 -27
- package/resources/v1-beta/entity-types.d.mts.map +1 -1
- package/resources/v1-beta/entity-types.d.ts +4 -27
- package/resources/v1-beta/entity-types.d.ts.map +1 -1
- package/resources/v1-beta/entity-types.js +4 -27
- package/resources/v1-beta/entity-types.js.map +1 -1
- package/resources/v1-beta/entity-types.mjs +4 -27
- 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 +217 -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 +17 -50
- package/src/resources/v1-beta/customers/entitlements.ts +7 -10
- package/src/resources/v1-beta/entity-types.ts +4 -27
- 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
|
@@ -0,0 +1,347 @@
|
|
|
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 Entitlements extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns a cursor-paginated list of entity entitlements for the given customer.
|
|
13
|
+
* An entity entitlement ties an entity to a feature or currency with a usage limit
|
|
14
|
+
* and reset cadence.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* // Automatically fetches more pages as needed.
|
|
19
|
+
* for await (const entitlementListResponse of client.v1.customers.entities.entitlements.list(
|
|
20
|
+
* 'id',
|
|
21
|
+
* )) {
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
id: string,
|
|
28
|
+
params: EntitlementListParams | null | undefined = {},
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): PagePromise<EntitlementListResponsesMyCursorIDPage, EntitlementListResponse> {
|
|
31
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
32
|
+
return this._client.getAPIList(
|
|
33
|
+
path`/api/v1/customers/${id}/entities/entitlements`,
|
|
34
|
+
MyCursorIDPage<EntitlementListResponse>,
|
|
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 entity entitlements. Existing entity entitlements
|
|
51
|
+
* matched by (entityId, featureId or currencyId, scopeEntityIds) are updated; new
|
|
52
|
+
* ones are created. On update, omitted fields (usageLimit, cadence) are preserved;
|
|
53
|
+
* on create both are required.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response =
|
|
58
|
+
* await client.v1.customers.entities.entitlements.upsert(
|
|
59
|
+
* 'id',
|
|
60
|
+
* {
|
|
61
|
+
* entityEntitlements: [
|
|
62
|
+
* {
|
|
63
|
+
* entityId: 'workspace-001',
|
|
64
|
+
* featureId: 'compute-minutes',
|
|
65
|
+
* usageLimit: 1000,
|
|
66
|
+
* cadence: 'P1M',
|
|
67
|
+
* },
|
|
68
|
+
* {
|
|
69
|
+
* entityId: 'workspace-002',
|
|
70
|
+
* currencyId: 'cred-type-tokens',
|
|
71
|
+
* usageLimit: 2000,
|
|
72
|
+
* cadence: 'P1M',
|
|
73
|
+
* parentId: 'workspace-001',
|
|
74
|
+
* scopeEntityIds: ['user-1'],
|
|
75
|
+
* },
|
|
76
|
+
* ],
|
|
77
|
+
* },
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
upsert(
|
|
82
|
+
id: string,
|
|
83
|
+
params: EntitlementUpsertParams,
|
|
84
|
+
options?: RequestOptions,
|
|
85
|
+
): APIPromise<EntitlementUpsertResponse> {
|
|
86
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
87
|
+
return this._client.put(path`/api/v1/customers/${id}/entities/entitlements`, {
|
|
88
|
+
body,
|
|
89
|
+
...options,
|
|
90
|
+
headers: buildHeaders([
|
|
91
|
+
{
|
|
92
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
93
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
94
|
+
},
|
|
95
|
+
options?.headers,
|
|
96
|
+
]),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type EntitlementListResponsesMyCursorIDPage = MyCursorIDPage<EntitlementListResponse>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* An entity entitlement for an entity belonging to a customer. Defines how much of
|
|
105
|
+
* the feature or currency the entity may consume (`usageLimit`) and how often the
|
|
106
|
+
* counter resets (`cadence`).
|
|
107
|
+
*/
|
|
108
|
+
export interface EntitlementListResponse {
|
|
109
|
+
/**
|
|
110
|
+
* Synthetic UUID identifier — also the cursor anchor for paginated lists
|
|
111
|
+
*/
|
|
112
|
+
id: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`,
|
|
116
|
+
* `PT1M`.
|
|
117
|
+
*/
|
|
118
|
+
cadence: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Timestamp of when the record was created
|
|
122
|
+
*/
|
|
123
|
+
createdAt: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The entity ID this entity entitlement is attached to
|
|
127
|
+
*/
|
|
128
|
+
entityId: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Parent entity ID in the hierarchy, or `null` for a root.
|
|
132
|
+
*/
|
|
133
|
+
parentId: string | null;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Dimension-scoped sub-limit key: the set of entity IDs this limit applies to.
|
|
137
|
+
* Empty is the node-wide limit that always matches; a non-empty set only applies
|
|
138
|
+
* when every listed entity is present in the resolved set (order-insensitive).
|
|
139
|
+
*/
|
|
140
|
+
scopeEntityIds: Array<string>;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Timestamp of when the record was last updated
|
|
144
|
+
*/
|
|
145
|
+
updatedAt: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Maximum usage allowed within one cadence window
|
|
149
|
+
*/
|
|
150
|
+
usageLimit: number | null;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Currency ID this entity entitlement grants (present when it grants a credit
|
|
154
|
+
* currency).
|
|
155
|
+
*/
|
|
156
|
+
currencyId?: string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Feature ID this entity entitlement grants (present when it grants a feature).
|
|
160
|
+
*/
|
|
161
|
+
featureId?: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Entity entitlements after upsert.
|
|
166
|
+
*/
|
|
167
|
+
export interface EntitlementUpsertResponse {
|
|
168
|
+
data: Array<EntitlementUpsertResponse.Data>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export namespace EntitlementUpsertResponse {
|
|
172
|
+
/**
|
|
173
|
+
* An entity entitlement for an entity belonging to a customer. Defines how much of
|
|
174
|
+
* the feature or currency the entity may consume (`usageLimit`) and how often the
|
|
175
|
+
* counter resets (`cadence`).
|
|
176
|
+
*/
|
|
177
|
+
export interface Data {
|
|
178
|
+
/**
|
|
179
|
+
* Synthetic UUID identifier — also the cursor anchor for paginated lists
|
|
180
|
+
*/
|
|
181
|
+
id: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`,
|
|
185
|
+
* `PT1M`.
|
|
186
|
+
*/
|
|
187
|
+
cadence: string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Timestamp of when the record was created
|
|
191
|
+
*/
|
|
192
|
+
createdAt: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* The entity ID this entity entitlement is attached to
|
|
196
|
+
*/
|
|
197
|
+
entityId: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Parent entity ID in the hierarchy, or `null` for a root.
|
|
201
|
+
*/
|
|
202
|
+
parentId: string | null;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Dimension-scoped sub-limit key: the set of entity IDs this limit applies to.
|
|
206
|
+
* Empty is the node-wide limit that always matches; a non-empty set only applies
|
|
207
|
+
* when every listed entity is present in the resolved set (order-insensitive).
|
|
208
|
+
*/
|
|
209
|
+
scopeEntityIds: Array<string>;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Timestamp of when the record was last updated
|
|
213
|
+
*/
|
|
214
|
+
updatedAt: string;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Maximum usage allowed within one cadence window
|
|
218
|
+
*/
|
|
219
|
+
usageLimit: number | null;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Currency ID this entity entitlement grants (present when it grants a credit
|
|
223
|
+
* currency).
|
|
224
|
+
*/
|
|
225
|
+
currencyId?: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Feature ID this entity entitlement grants (present when it grants a feature).
|
|
229
|
+
*/
|
|
230
|
+
featureId?: string;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface EntitlementListParams extends MyCursorIDPageParams {
|
|
235
|
+
/**
|
|
236
|
+
* Query param: Filter entity entitlements to a specific currency, by its ID.
|
|
237
|
+
* Mutually exclusive with `featureId`.
|
|
238
|
+
*/
|
|
239
|
+
currencyId?: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Query param: Filter entity entitlements to a specific entity ID
|
|
243
|
+
*/
|
|
244
|
+
entityId?: string;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Query param: Filter entity entitlements to a specific feature, by its ID.
|
|
248
|
+
* Mutually exclusive with `currencyId`.
|
|
249
|
+
*/
|
|
250
|
+
featureId?: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
254
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
255
|
+
*/
|
|
256
|
+
'X-ACCOUNT-ID'?: string;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
260
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
261
|
+
* intrinsic to the key).
|
|
262
|
+
*/
|
|
263
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export interface EntitlementUpsertParams {
|
|
267
|
+
/**
|
|
268
|
+
* Body param: Entity entitlements to upsert (1–100 per request)
|
|
269
|
+
*/
|
|
270
|
+
entityEntitlements: Array<EntitlementUpsertParams.EntityEntitlement>;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
274
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
275
|
+
*/
|
|
276
|
+
'X-ACCOUNT-ID'?: string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
280
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
281
|
+
* intrinsic to the key).
|
|
282
|
+
*/
|
|
283
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export namespace EntitlementUpsertParams {
|
|
287
|
+
/**
|
|
288
|
+
* A single entity entitlement to create or update. Identify the feature or
|
|
289
|
+
* currency with exactly one of `featureId` or `currencyId`. The natural key is the
|
|
290
|
+
* `(entityId, featureId or currencyId, scopeEntityIds)` triple. On create both
|
|
291
|
+
* `usageLimit` and `cadence` are required; on update they may be omitted
|
|
292
|
+
* individually to preserve the existing value.
|
|
293
|
+
*/
|
|
294
|
+
export interface EntityEntitlement {
|
|
295
|
+
/**
|
|
296
|
+
* The entity ID this entity entitlement is attached to
|
|
297
|
+
*/
|
|
298
|
+
entityId: string;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Usage-reset cadence (required on create) as an ISO-8601 single-unit duration,
|
|
302
|
+
* e.g. `P1M`, `P30D`, `PT1M`.
|
|
303
|
+
*/
|
|
304
|
+
cadence?: string;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Currency ID this entity entitlement grants (credit limits). Mutually exclusive
|
|
308
|
+
* with `featureId`.
|
|
309
|
+
*/
|
|
310
|
+
currencyId?: string;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Feature ID this entity entitlement grants. Mutually exclusive with `currencyId`.
|
|
314
|
+
*/
|
|
315
|
+
featureId?: string;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Parent entity ID in the hierarchy. Omit to leave the current parent untouched (a
|
|
319
|
+
* new node defaults to a root); `null` detaches to a root; an ID sets or changes
|
|
320
|
+
* the parent. Reparenting or detaching an existing node is leaf-only; place a
|
|
321
|
+
* parent before its children, or in the same batch.
|
|
322
|
+
*/
|
|
323
|
+
parentId?: string | null;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Dimension-scoped sub-limit: the set of entity IDs this limit applies to
|
|
327
|
+
* (order-insensitive, unique, at most 5). Omit or leave empty for the node-wide
|
|
328
|
+
* limit.
|
|
329
|
+
*/
|
|
330
|
+
scopeEntityIds?: Array<string>;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Maximum usage allowed within one cadence window (required on create)
|
|
334
|
+
*/
|
|
335
|
+
usageLimit?: number | null;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export declare namespace Entitlements {
|
|
340
|
+
export {
|
|
341
|
+
type EntitlementListResponse as EntitlementListResponse,
|
|
342
|
+
type EntitlementUpsertResponse as EntitlementUpsertResponse,
|
|
343
|
+
type EntitlementListResponsesMyCursorIDPage as EntitlementListResponsesMyCursorIDPage,
|
|
344
|
+
type EntitlementListParams as EntitlementListParams,
|
|
345
|
+
type EntitlementUpsertParams as EntitlementUpsertParams,
|
|
346
|
+
};
|
|
347
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Entities,
|
|
5
|
+
type EntityRetrieveResponse,
|
|
6
|
+
type EntityListResponse,
|
|
7
|
+
type EntityArchiveResponse,
|
|
8
|
+
type EntityUpsertResponse,
|
|
9
|
+
type EntityRetrieveParams,
|
|
10
|
+
type EntityListParams,
|
|
11
|
+
type EntityArchiveParams,
|
|
12
|
+
type EntityUpsertParams,
|
|
13
|
+
type EntityListResponsesMyCursorIDPage,
|
|
14
|
+
} from './entities';
|
|
15
|
+
export {
|
|
16
|
+
Entitlements,
|
|
17
|
+
type EntitlementListResponse,
|
|
18
|
+
type EntitlementUpsertResponse,
|
|
19
|
+
type EntitlementListParams,
|
|
20
|
+
type EntitlementUpsertParams,
|
|
21
|
+
type EntitlementListResponsesMyCursorIDPage,
|
|
22
|
+
} from './entitlements';
|
|
@@ -27,6 +27,18 @@ export {
|
|
|
27
27
|
type CustomerListInvoicesResponsesMyCursorIDPage,
|
|
28
28
|
type CustomerListResourcesResponsesMyCursorIDPage,
|
|
29
29
|
} from './customers';
|
|
30
|
+
export {
|
|
31
|
+
Entities,
|
|
32
|
+
type EntityRetrieveResponse,
|
|
33
|
+
type EntityListResponse,
|
|
34
|
+
type EntityArchiveResponse,
|
|
35
|
+
type EntityUpsertResponse,
|
|
36
|
+
type EntityRetrieveParams,
|
|
37
|
+
type EntityListParams,
|
|
38
|
+
type EntityArchiveParams,
|
|
39
|
+
type EntityUpsertParams,
|
|
40
|
+
type EntityListResponsesMyCursorIDPage,
|
|
41
|
+
} from './entities/index';
|
|
30
42
|
export {
|
|
31
43
|
Integrations,
|
|
32
44
|
type IntegrationListResponse,
|
|
@@ -11,6 +11,15 @@ import { path } from '../../../internal/utils/path';
|
|
|
11
11
|
export class Integrations extends APIResource {
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves a specific integration for a customer by integration ID.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const customerIntegrationResponse =
|
|
18
|
+
* await client.v1.customers.integrations.retrieve(
|
|
19
|
+
* 'integrationId',
|
|
20
|
+
* { id: 'id' },
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
14
23
|
*/
|
|
15
24
|
retrieve(
|
|
16
25
|
integrationID: string,
|
|
@@ -33,6 +42,15 @@ export class Integrations extends APIResource {
|
|
|
33
42
|
/**
|
|
34
43
|
* Updates a customer's integration link, such as changing the synced external
|
|
35
44
|
* entity ID.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const customerIntegrationResponse =
|
|
49
|
+
* await client.v1.customers.integrations.update(
|
|
50
|
+
* 'integrationId',
|
|
51
|
+
* { id: 'id', syncedEntityId: 'syncedEntityId' },
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
36
54
|
*/
|
|
37
55
|
update(
|
|
38
56
|
integrationID: string,
|
|
@@ -56,6 +74,16 @@ export class Integrations extends APIResource {
|
|
|
56
74
|
/**
|
|
57
75
|
* Retrieves a paginated list of a customer's external integrations (billing, CRM,
|
|
58
76
|
* etc.).
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* // Automatically fetches more pages as needed.
|
|
81
|
+
* for await (const integrationListResponse of client.v1.customers.integrations.list(
|
|
82
|
+
* 'x',
|
|
83
|
+
* )) {
|
|
84
|
+
* // ...
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
59
87
|
*/
|
|
60
88
|
list(
|
|
61
89
|
id: string,
|
|
@@ -83,6 +111,16 @@ export class Integrations extends APIResource {
|
|
|
83
111
|
/**
|
|
84
112
|
* Links a customer to an external integration by specifying the vendor and
|
|
85
113
|
* external entity ID.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* const customerIntegrationResponse =
|
|
118
|
+
* await client.v1.customers.integrations.link('x', {
|
|
119
|
+
* id: 'id',
|
|
120
|
+
* syncedEntityId: 'syncedEntityId',
|
|
121
|
+
* vendorIdentifier: 'STRIPE',
|
|
122
|
+
* });
|
|
123
|
+
* ```
|
|
86
124
|
*/
|
|
87
125
|
link(
|
|
88
126
|
id: string,
|
|
@@ -105,6 +143,15 @@ export class Integrations extends APIResource {
|
|
|
105
143
|
|
|
106
144
|
/**
|
|
107
145
|
* Removes the link between a customer and an external integration.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```ts
|
|
149
|
+
* const customerIntegrationResponse =
|
|
150
|
+
* await client.v1.customers.integrations.unlink(
|
|
151
|
+
* 'integrationId',
|
|
152
|
+
* { id: 'id' },
|
|
153
|
+
* );
|
|
154
|
+
* ```
|
|
108
155
|
*/
|
|
109
156
|
unlink(
|
|
110
157
|
integrationID: string,
|
|
@@ -14,6 +14,16 @@ export class PaymentMethod extends APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Attaches a payment method to a customer for billing. Required for paid
|
|
16
16
|
* subscriptions when integrated with a billing provider.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const customerResponse =
|
|
21
|
+
* await client.v1.customers.paymentMethod.attach('x', {
|
|
22
|
+
* integrationId: 'integrationId',
|
|
23
|
+
* paymentMethodId: 'paymentMethodId',
|
|
24
|
+
* vendorIdentifier: 'AUTH0',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
17
27
|
*/
|
|
18
28
|
attach(
|
|
19
29
|
id: string,
|
|
@@ -37,6 +47,12 @@ export class PaymentMethod extends APIResource {
|
|
|
37
47
|
/**
|
|
38
48
|
* Removes the payment method from a customer. Ensure active paid subscriptions
|
|
39
49
|
* have an alternative payment method.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const customerResponse =
|
|
54
|
+
* await client.v1.customers.paymentMethod.detach('x');
|
|
55
|
+
* ```
|
|
40
56
|
*/
|
|
41
57
|
detach(
|
|
42
58
|
id: string,
|
|
@@ -14,6 +14,38 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Grants promotional entitlements to a customer, providing feature access outside
|
|
16
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
|
+
* ```
|
|
17
49
|
*/
|
|
18
50
|
create(
|
|
19
51
|
id: string,
|
|
@@ -36,6 +68,16 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
36
68
|
|
|
37
69
|
/**
|
|
38
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
|
+
* ```
|
|
39
81
|
*/
|
|
40
82
|
list(
|
|
41
83
|
id: string,
|
|
@@ -63,6 +105,15 @@ export class PromotionalEntitlements extends APIResource {
|
|
|
63
105
|
/**
|
|
64
106
|
* Revokes a previously granted promotional entitlement from a customer for a
|
|
65
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
|
+
* ```
|
|
66
117
|
*/
|
|
67
118
|
revoke(
|
|
68
119
|
featureID: string,
|