@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
|
@@ -7,41 +7,18 @@ export declare class EntityTypes extends APIResource {
|
|
|
7
7
|
* Returns a cursor-paginated list of entity types defined in the environment.
|
|
8
8
|
* Entity types are vendor-defined categories of resource that can be governed
|
|
9
9
|
* (e.g. Org, Team, User). Archived entity types are excluded unless
|
|
10
|
-
* includeArchived=true.
|
|
10
|
+
* includeArchived=true. Deprecated: use `GET /api/v1/entity-types`.
|
|
11
11
|
*
|
|
12
|
-
* @
|
|
13
|
-
* ```ts
|
|
14
|
-
* // Automatically fetches more pages as needed.
|
|
15
|
-
* for await (const entityTypeListResponse of client.v1Beta.entityTypes.list()) {
|
|
16
|
-
* // ...
|
|
17
|
-
* }
|
|
18
|
-
* ```
|
|
12
|
+
* @deprecated Use `v1.entity_types.list` instead.
|
|
19
13
|
*/
|
|
20
14
|
list(params?: EntityTypeListParams | null | undefined, options?: RequestOptions): PagePromise<EntityTypeListResponsesMyCursorIDPage, EntityTypeListResponse>;
|
|
21
15
|
/**
|
|
22
16
|
* Batched create-or-update of entity types. Existing types matched by id are
|
|
23
17
|
* updated; new ids are created. Idempotent — re-submitting the same payload
|
|
24
18
|
* converges to the same state. An upsert of an archived entity type restores it.
|
|
19
|
+
* Deprecated: use `PUT /api/v1/entity-types`.
|
|
25
20
|
*
|
|
26
|
-
* @
|
|
27
|
-
* ```ts
|
|
28
|
-
* const response = await client.v1Beta.entityTypes.upsert({
|
|
29
|
-
* types: [
|
|
30
|
-
* {
|
|
31
|
-
* id: 'org',
|
|
32
|
-
* displayName: 'Organization',
|
|
33
|
-
* description:
|
|
34
|
-
* 'A customer organization — the top of the hierarchy, holding the account-wide budget.',
|
|
35
|
-
* attributionKeys: ['organizationId'],
|
|
36
|
-
* },
|
|
37
|
-
* {
|
|
38
|
-
* id: 'team',
|
|
39
|
-
* displayName: 'Team',
|
|
40
|
-
* attributionKeys: ['teamId'],
|
|
41
|
-
* },
|
|
42
|
-
* ],
|
|
43
|
-
* });
|
|
44
|
-
* ```
|
|
21
|
+
* @deprecated Use `v1.entity_types.upsert` instead.
|
|
45
22
|
*/
|
|
46
23
|
upsert(params: EntityTypeUpsertParams, options?: RequestOptions): APIPromise<EntityTypeUpsertResponse>;
|
|
47
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-types.d.ts","sourceRoot":"","sources":["../../src/resources/v1-beta/entity-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,iCAA8B;AAE/F,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"entity-types.d.ts","sourceRoot":"","sources":["../../src/resources/v1-beta/entity-types.ts"],"names":[],"mappings":"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"}
|
|
@@ -10,15 +10,9 @@ class EntityTypes extends resource_1.APIResource {
|
|
|
10
10
|
* Returns a cursor-paginated list of entity types defined in the environment.
|
|
11
11
|
* Entity types are vendor-defined categories of resource that can be governed
|
|
12
12
|
* (e.g. Org, Team, User). Archived entity types are excluded unless
|
|
13
|
-
* includeArchived=true.
|
|
13
|
+
* includeArchived=true. Deprecated: use `GET /api/v1/entity-types`.
|
|
14
14
|
*
|
|
15
|
-
* @
|
|
16
|
-
* ```ts
|
|
17
|
-
* // Automatically fetches more pages as needed.
|
|
18
|
-
* for await (const entityTypeListResponse of client.v1Beta.entityTypes.list()) {
|
|
19
|
-
* // ...
|
|
20
|
-
* }
|
|
21
|
-
* ```
|
|
15
|
+
* @deprecated Use `v1.entity_types.list` instead.
|
|
22
16
|
*/
|
|
23
17
|
list(params = {}, options) {
|
|
24
18
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
@@ -38,26 +32,9 @@ class EntityTypes extends resource_1.APIResource {
|
|
|
38
32
|
* Batched create-or-update of entity types. Existing types matched by id are
|
|
39
33
|
* updated; new ids are created. Idempotent — re-submitting the same payload
|
|
40
34
|
* converges to the same state. An upsert of an archived entity type restores it.
|
|
35
|
+
* Deprecated: use `PUT /api/v1/entity-types`.
|
|
41
36
|
*
|
|
42
|
-
* @
|
|
43
|
-
* ```ts
|
|
44
|
-
* const response = await client.v1Beta.entityTypes.upsert({
|
|
45
|
-
* types: [
|
|
46
|
-
* {
|
|
47
|
-
* id: 'org',
|
|
48
|
-
* displayName: 'Organization',
|
|
49
|
-
* description:
|
|
50
|
-
* 'A customer organization — the top of the hierarchy, holding the account-wide budget.',
|
|
51
|
-
* attributionKeys: ['organizationId'],
|
|
52
|
-
* },
|
|
53
|
-
* {
|
|
54
|
-
* id: 'team',
|
|
55
|
-
* displayName: 'Team',
|
|
56
|
-
* attributionKeys: ['teamId'],
|
|
57
|
-
* },
|
|
58
|
-
* ],
|
|
59
|
-
* });
|
|
60
|
-
* ```
|
|
37
|
+
* @deprecated Use `v1.entity_types.upsert` instead.
|
|
61
38
|
*/
|
|
62
39
|
upsert(params, options) {
|
|
63
40
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-types.js","sourceRoot":"","sources":["../../src/resources/v1-beta/entity-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA+F;AAC/F,uDAAsD;AAGtD,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"entity-types.js","sourceRoot":"","sources":["../../src/resources/v1-beta/entity-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA+F;AAC/F,uDAAsD;AAGtD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;OAOG;IACH,IAAI,CACF,SAAkD,EAAE,EACpD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAClG,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAA,2BAAsC,CAAA,EAAE;YAClG,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAA8B,EAAE,OAAwB;QAC7D,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3F,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE;YACnD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAjDD,kCAiDC"}
|
|
@@ -7,15 +7,9 @@ export class EntityTypes extends APIResource {
|
|
|
7
7
|
* Returns a cursor-paginated list of entity types defined in the environment.
|
|
8
8
|
* Entity types are vendor-defined categories of resource that can be governed
|
|
9
9
|
* (e.g. Org, Team, User). Archived entity types are excluded unless
|
|
10
|
-
* includeArchived=true.
|
|
10
|
+
* includeArchived=true. Deprecated: use `GET /api/v1/entity-types`.
|
|
11
11
|
*
|
|
12
|
-
* @
|
|
13
|
-
* ```ts
|
|
14
|
-
* // Automatically fetches more pages as needed.
|
|
15
|
-
* for await (const entityTypeListResponse of client.v1Beta.entityTypes.list()) {
|
|
16
|
-
* // ...
|
|
17
|
-
* }
|
|
18
|
-
* ```
|
|
12
|
+
* @deprecated Use `v1.entity_types.list` instead.
|
|
19
13
|
*/
|
|
20
14
|
list(params = {}, options) {
|
|
21
15
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
@@ -35,26 +29,9 @@ export class EntityTypes extends APIResource {
|
|
|
35
29
|
* Batched create-or-update of entity types. Existing types matched by id are
|
|
36
30
|
* updated; new ids are created. Idempotent — re-submitting the same payload
|
|
37
31
|
* converges to the same state. An upsert of an archived entity type restores it.
|
|
32
|
+
* Deprecated: use `PUT /api/v1/entity-types`.
|
|
38
33
|
*
|
|
39
|
-
* @
|
|
40
|
-
* ```ts
|
|
41
|
-
* const response = await client.v1Beta.entityTypes.upsert({
|
|
42
|
-
* types: [
|
|
43
|
-
* {
|
|
44
|
-
* id: 'org',
|
|
45
|
-
* displayName: 'Organization',
|
|
46
|
-
* description:
|
|
47
|
-
* 'A customer organization — the top of the hierarchy, holding the account-wide budget.',
|
|
48
|
-
* attributionKeys: ['organizationId'],
|
|
49
|
-
* },
|
|
50
|
-
* {
|
|
51
|
-
* id: 'team',
|
|
52
|
-
* displayName: 'Team',
|
|
53
|
-
* attributionKeys: ['teamId'],
|
|
54
|
-
* },
|
|
55
|
-
* ],
|
|
56
|
-
* });
|
|
57
|
-
* ```
|
|
34
|
+
* @deprecated Use `v1.entity_types.upsert` instead.
|
|
58
35
|
*/
|
|
59
36
|
upsert(params, options) {
|
|
60
37
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-types.mjs","sourceRoot":"","sources":["../../src/resources/v1-beta/entity-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,cAAc,EAA0C,kCAA8B;AAC/F,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAGtD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"entity-types.mjs","sourceRoot":"","sources":["../../src/resources/v1-beta/entity-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,cAAc,EAA0C,kCAA8B;AAC/F,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAGtD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;OAOG;IACH,IAAI,CACF,SAAkD,EAAE,EACpD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAClG,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAA,cAAsC,CAAA,EAAE;YAClG,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAA8B,EAAE,OAAwB;QAC7D,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3F,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE;YACnD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -26,6 +26,15 @@ export class Addons extends APIResource {
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Creates a new addon in draft status, associated with a specific product.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const addon = await client.v1.addons.create({
|
|
33
|
+
* id: 'id',
|
|
34
|
+
* displayName: 'displayName',
|
|
35
|
+
* productId: 'productId',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
29
38
|
*/
|
|
30
39
|
create(params: AddonCreateParams, options?: RequestOptions): APIPromise<Addon> {
|
|
31
40
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -45,6 +54,11 @@ export class Addons extends APIResource {
|
|
|
45
54
|
/**
|
|
46
55
|
* Retrieves an addon by its unique identifier, including entitlements and pricing
|
|
47
56
|
* details.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const addon = await client.v1.addons.retrieve('x');
|
|
61
|
+
* ```
|
|
48
62
|
*/
|
|
49
63
|
retrieve(
|
|
50
64
|
id: string,
|
|
@@ -67,6 +81,11 @@ export class Addons extends APIResource {
|
|
|
67
81
|
/**
|
|
68
82
|
* Updates an existing addon's properties such as display name, description, and
|
|
69
83
|
* metadata.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const addon = await client.v1.addons.update('x');
|
|
88
|
+
* ```
|
|
70
89
|
*/
|
|
71
90
|
update(id: string, params: AddonUpdateParams, options?: RequestOptions): APIPromise<Addon> {
|
|
72
91
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -85,6 +104,14 @@ export class Addons extends APIResource {
|
|
|
85
104
|
|
|
86
105
|
/**
|
|
87
106
|
* Retrieves a paginated list of addons in the environment.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* // Automatically fetches more pages as needed.
|
|
111
|
+
* for await (const addonListResponse of client.v1.addons.list()) {
|
|
112
|
+
* // ...
|
|
113
|
+
* }
|
|
114
|
+
* ```
|
|
88
115
|
*/
|
|
89
116
|
list(
|
|
90
117
|
params: AddonListParams | null | undefined = {},
|
|
@@ -106,6 +133,11 @@ export class Addons extends APIResource {
|
|
|
106
133
|
|
|
107
134
|
/**
|
|
108
135
|
* Archives an addon, preventing it from being used in new subscriptions.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* const addon = await client.v1.addons.archive('x');
|
|
140
|
+
* ```
|
|
109
141
|
*/
|
|
110
142
|
archive(
|
|
111
143
|
id: string,
|
|
@@ -127,6 +159,11 @@ export class Addons extends APIResource {
|
|
|
127
159
|
|
|
128
160
|
/**
|
|
129
161
|
* Creates a draft version of an existing addon for modification before publishing.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
|
+
* const addon = await client.v1.addons.createDraft('x');
|
|
166
|
+
* ```
|
|
130
167
|
*/
|
|
131
168
|
createDraft(
|
|
132
169
|
id: string,
|
|
@@ -148,6 +185,16 @@ export class Addons extends APIResource {
|
|
|
148
185
|
|
|
149
186
|
/**
|
|
150
187
|
* Retrieves the list of charges configured on an addon.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```ts
|
|
191
|
+
* // Automatically fetches more pages as needed.
|
|
192
|
+
* for await (const addonListChargesResponse of client.v1.addons.listCharges(
|
|
193
|
+
* 'x',
|
|
194
|
+
* )) {
|
|
195
|
+
* // ...
|
|
196
|
+
* }
|
|
197
|
+
* ```
|
|
151
198
|
*/
|
|
152
199
|
listCharges(
|
|
153
200
|
id: string,
|
|
@@ -178,6 +225,13 @@ export class Addons extends APIResource {
|
|
|
178
225
|
* addon are moved onto the new version immediately (`ALL_CUSTOMERS`) or stay on
|
|
179
226
|
* the version they were using — grandfathered — until you explicitly migrate them
|
|
180
227
|
* (`NEW_CUSTOMERS`).
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```ts
|
|
231
|
+
* const response = await client.v1.addons.publish('x', {
|
|
232
|
+
* migrationType: 'NEW_CUSTOMERS',
|
|
233
|
+
* });
|
|
234
|
+
* ```
|
|
181
235
|
*/
|
|
182
236
|
publish(
|
|
183
237
|
id: string,
|
|
@@ -200,6 +254,11 @@ export class Addons extends APIResource {
|
|
|
200
254
|
|
|
201
255
|
/**
|
|
202
256
|
* Removes a draft version of an addon.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```ts
|
|
260
|
+
* const response = await client.v1.addons.removeDraft('x');
|
|
261
|
+
* ```
|
|
203
262
|
*/
|
|
204
263
|
removeDraft(
|
|
205
264
|
id: string,
|
|
@@ -9,6 +9,14 @@ import { path } from '../../../internal/utils/path';
|
|
|
9
9
|
export class Entitlements extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Creates one or more entitlements (feature or credit) on a draft addon.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const entitlement =
|
|
16
|
+
* await client.v1.addons.entitlements.create('addonId', {
|
|
17
|
+
* entitlements: [{ id: 'id', type: 'FEATURE' }],
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
12
20
|
*/
|
|
13
21
|
create(
|
|
14
22
|
addonID: string,
|
|
@@ -31,6 +39,15 @@ export class Entitlements extends APIResource {
|
|
|
31
39
|
|
|
32
40
|
/**
|
|
33
41
|
* Updates an existing entitlement on a draft addon.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const addonPackageEntitlement =
|
|
46
|
+
* await client.v1.addons.entitlements.update('id', {
|
|
47
|
+
* addonId: 'addonId',
|
|
48
|
+
* type: 'FEATURE',
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
34
51
|
*/
|
|
35
52
|
update(
|
|
36
53
|
id: string,
|
|
@@ -53,6 +70,12 @@ export class Entitlements extends APIResource {
|
|
|
53
70
|
|
|
54
71
|
/**
|
|
55
72
|
* Retrieves a list of entitlements for an addon.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const entitlements =
|
|
77
|
+
* await client.v1.addons.entitlements.list('addonId');
|
|
78
|
+
* ```
|
|
56
79
|
*/
|
|
57
80
|
list(
|
|
58
81
|
addonID: string,
|
|
@@ -74,6 +97,14 @@ export class Entitlements extends APIResource {
|
|
|
74
97
|
|
|
75
98
|
/**
|
|
76
99
|
* Deletes an entitlement from a draft addon.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const addonPackageEntitlement =
|
|
104
|
+
* await client.v1.addons.entitlements.delete('id', {
|
|
105
|
+
* addonId: 'addonId',
|
|
106
|
+
* });
|
|
107
|
+
* ```
|
|
77
108
|
*/
|
|
78
109
|
delete(
|
|
79
110
|
id: string,
|
|
@@ -14,6 +14,13 @@ export class Contracts extends APIResource {
|
|
|
14
14
|
* inside one transaction — any validation or creation failure rolls the whole
|
|
15
15
|
* contract back. Each subscription entry is either a new subscription to create or
|
|
16
16
|
* a reference to an existing custom subscription. Returns the created contract.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const contract = await client.v1.contracts.create({
|
|
21
|
+
* customerId: 'customerId',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
17
24
|
*/
|
|
18
25
|
create(params: ContractCreateParams, options?: RequestOptions): APIPromise<ContractCreateResponse> {
|
|
19
26
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -34,6 +41,11 @@ export class Contracts extends APIResource {
|
|
|
34
41
|
* Retrieves a single contract by its ID, enriched with a preview of its upcoming
|
|
35
42
|
* (next) invoice when one is available. Returns 404 when no contract with that ID
|
|
36
43
|
* exists in the environment.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const contract = await client.v1.contracts.retrieve('x');
|
|
48
|
+
* ```
|
|
37
49
|
*/
|
|
38
50
|
retrieve(
|
|
39
51
|
id: string,
|
|
@@ -57,6 +69,11 @@ export class Contracts extends APIResource {
|
|
|
57
69
|
* Updates a contract's metadata (name, PO number, activation dates) and optionally
|
|
58
70
|
* re-links its subscriptions. Best-effort re-syncs the change to the connected
|
|
59
71
|
* billing provider.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const contract = await client.v1.contracts.update('x');
|
|
76
|
+
* ```
|
|
60
77
|
*/
|
|
61
78
|
update(
|
|
62
79
|
id: string,
|
|
@@ -82,6 +99,14 @@ export class Contracts extends APIResource {
|
|
|
82
99
|
* that has a billing contract is enriched with a preview of its upcoming (next)
|
|
83
100
|
* invoice when one is available. Supports filtering by customer external ID,
|
|
84
101
|
* state, and name.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* // Automatically fetches more pages as needed.
|
|
106
|
+
* for await (const contractListResponse of client.v1.contracts.list()) {
|
|
107
|
+
* // ...
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
85
110
|
*/
|
|
86
111
|
list(
|
|
87
112
|
params: ContractListParams | null | undefined = {},
|
|
@@ -104,6 +129,11 @@ export class Contracts extends APIResource {
|
|
|
104
129
|
/**
|
|
105
130
|
* Deletes a contract: cancels the contract in the connected billing provider and
|
|
106
131
|
* cancels every subscription linked to it.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* const contract = await client.v1.contracts.delete('x');
|
|
136
|
+
* ```
|
|
107
137
|
*/
|
|
108
138
|
delete(
|
|
109
139
|
id: string,
|
|
@@ -14,6 +14,19 @@ export class Coupons extends APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Creates a new discount coupon with percentage or fixed amount off, applicable to
|
|
16
16
|
* customer subscriptions.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const coupon = await client.v1.coupons.create({
|
|
21
|
+
* id: 'id',
|
|
22
|
+
* amountsOff: [{ amount: 0, currency: 'usd' }],
|
|
23
|
+
* description: 'description',
|
|
24
|
+
* durationInMonths: 1,
|
|
25
|
+
* metadata: { foo: 'string' },
|
|
26
|
+
* name: 'name',
|
|
27
|
+
* percentOff: 1,
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
17
30
|
*/
|
|
18
31
|
create(params: CouponCreateParams, options?: RequestOptions): APIPromise<Coupon> {
|
|
19
32
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -32,6 +45,11 @@ export class Coupons extends APIResource {
|
|
|
32
45
|
|
|
33
46
|
/**
|
|
34
47
|
* Retrieves a coupon by its unique identifier.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const coupon = await client.v1.coupons.retrieve('x');
|
|
52
|
+
* ```
|
|
35
53
|
*/
|
|
36
54
|
retrieve(
|
|
37
55
|
id: string,
|
|
@@ -53,6 +71,14 @@ export class Coupons extends APIResource {
|
|
|
53
71
|
|
|
54
72
|
/**
|
|
55
73
|
* Retrieves a paginated list of coupons in the environment.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* // Automatically fetches more pages as needed.
|
|
78
|
+
* for await (const couponListResponse of client.v1.coupons.list()) {
|
|
79
|
+
* // ...
|
|
80
|
+
* }
|
|
81
|
+
* ```
|
|
56
82
|
*/
|
|
57
83
|
list(
|
|
58
84
|
params: CouponListParams | null | undefined = {},
|
|
@@ -74,6 +100,11 @@ export class Coupons extends APIResource {
|
|
|
74
100
|
|
|
75
101
|
/**
|
|
76
102
|
* Archives a coupon, preventing it from being applied to new subscriptions.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* const coupon = await client.v1.coupons.archiveCoupon('x');
|
|
107
|
+
* ```
|
|
77
108
|
*/
|
|
78
109
|
archiveCoupon(
|
|
79
110
|
id: string,
|
|
@@ -95,6 +126,11 @@ export class Coupons extends APIResource {
|
|
|
95
126
|
|
|
96
127
|
/**
|
|
97
128
|
* Updates an existing coupon's properties such as name, description, and metadata.
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* const coupon = await client.v1.coupons.updateCoupon('x');
|
|
133
|
+
* ```
|
|
98
134
|
*/
|
|
99
135
|
updateCoupon(id: string, params: CouponUpdateCouponParams, options?: RequestOptions): APIPromise<Coupon> {
|
|
100
136
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -9,6 +9,17 @@ export class Consumption extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Consumes a specified amount of credits directly from a customer wallet, with no
|
|
11
11
|
* feature mapping. Returns the optimistic balance.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response =
|
|
16
|
+
* await client.v1.credits.consumption.consume({
|
|
17
|
+
* amount: 1,
|
|
18
|
+
* currencyId: 'currencyId',
|
|
19
|
+
* customerId: 'customerId',
|
|
20
|
+
* idempotencyKey: 'x',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
12
23
|
*/
|
|
13
24
|
consume(
|
|
14
25
|
params: ConsumptionConsumeParams,
|
|
@@ -31,6 +42,21 @@ export class Consumption extends APIResource {
|
|
|
31
42
|
/**
|
|
32
43
|
* Consumes credits directly from customer wallets asynchronously. Consumptions are
|
|
33
44
|
* reconciled asynchronously into the credit balances.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response =
|
|
49
|
+
* await client.v1.credits.consumption.consumeAsync({
|
|
50
|
+
* consumptions: [
|
|
51
|
+
* {
|
|
52
|
+
* amount: 1,
|
|
53
|
+
* currencyId: 'currencyId',
|
|
54
|
+
* customerId: 'customerId',
|
|
55
|
+
* idempotencyKey: 'x',
|
|
56
|
+
* },
|
|
57
|
+
* ],
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
34
60
|
*/
|
|
35
61
|
consumeAsync(
|
|
36
62
|
params: ConsumptionConsumeAsyncParams,
|
|
@@ -51,6 +51,14 @@ export class Credits extends APIResource {
|
|
|
51
51
|
/**
|
|
52
52
|
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
53
53
|
* Returns default settings if no configuration exists.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response = await client.v1.credits.getAutoRecharge({
|
|
58
|
+
* currencyId: 'currencyId',
|
|
59
|
+
* customerId: 'customerId',
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
54
62
|
*/
|
|
55
63
|
getAutoRecharge(
|
|
56
64
|
params: CreditGetAutoRechargeParams,
|
|
@@ -73,6 +81,13 @@ export class Credits extends APIResource {
|
|
|
73
81
|
/**
|
|
74
82
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
75
83
|
* a specified time range.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const response = await client.v1.credits.getUsage({
|
|
88
|
+
* customerId: 'customerId',
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
76
91
|
*/
|
|
77
92
|
getUsage(params: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse> {
|
|
78
93
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
@@ -91,6 +106,16 @@ export class Credits extends APIResource {
|
|
|
91
106
|
|
|
92
107
|
/**
|
|
93
108
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* // Automatically fetches more pages as needed.
|
|
113
|
+
* for await (const creditListLedgerResponse of client.v1.credits.listLedger(
|
|
114
|
+
* { customerId: 'customerId' },
|
|
115
|
+
* )) {
|
|
116
|
+
* // ...
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
94
119
|
*/
|
|
95
120
|
listLedger(
|
|
96
121
|
params: CreditListLedgerParams,
|
|
@@ -13,6 +13,15 @@ import { path } from '../../../internal/utils/path';
|
|
|
13
13
|
export class CustomCurrencies extends APIResource {
|
|
14
14
|
/**
|
|
15
15
|
* Creates a new custom currency in the environment.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const customCurrencyResponse =
|
|
20
|
+
* await client.v1.credits.customCurrencies.create({
|
|
21
|
+
* id: 'id',
|
|
22
|
+
* displayName: 'displayName',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
16
25
|
*/
|
|
17
26
|
create(params: CustomCurrencyCreateParams, options?: RequestOptions): APIPromise<CustomCurrencyResponse> {
|
|
18
27
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -31,6 +40,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
31
40
|
|
|
32
41
|
/**
|
|
33
42
|
* Updates an existing custom currency. Only the supplied fields are modified.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const customCurrencyResponse =
|
|
47
|
+
* await client.v1.credits.customCurrencies.update(
|
|
48
|
+
* 'currencyId',
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
34
51
|
*/
|
|
35
52
|
update(
|
|
36
53
|
currencyID: string,
|
|
@@ -55,6 +72,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
55
72
|
* Retrieves a paginated list of custom currencies in the environment. Archived
|
|
56
73
|
* currencies are excluded by default; pass `status=ARCHIVED` (or
|
|
57
74
|
* `status=ACTIVE,ARCHIVED`) to include them.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* // Automatically fetches more pages as needed.
|
|
79
|
+
* for await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {
|
|
80
|
+
* // ...
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
58
83
|
*/
|
|
59
84
|
list(
|
|
60
85
|
params: CustomCurrencyListParams | null | undefined = {},
|
|
@@ -82,6 +107,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
82
107
|
* Archives a custom currency. Fails if the currency is still associated with any
|
|
83
108
|
* active plan or addon — use the associated-entities endpoint first to inspect
|
|
84
109
|
* dependencies.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const customCurrencyResponse =
|
|
114
|
+
* await client.v1.credits.customCurrencies.archive(
|
|
115
|
+
* 'currencyId',
|
|
116
|
+
* );
|
|
117
|
+
* ```
|
|
85
118
|
*/
|
|
86
119
|
archive(
|
|
87
120
|
currencyID: string,
|
|
@@ -104,6 +137,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
104
137
|
/**
|
|
105
138
|
* Lists the active plans and addons that reference a custom currency. Useful
|
|
106
139
|
* before archiving to inspect dependencies.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```ts
|
|
143
|
+
* const response =
|
|
144
|
+
* await client.v1.credits.customCurrencies.listAssociatedEntities(
|
|
145
|
+
* 'currencyId',
|
|
146
|
+
* );
|
|
147
|
+
* ```
|
|
107
148
|
*/
|
|
108
149
|
listAssociatedEntities(
|
|
109
150
|
currencyID: string,
|
|
@@ -126,6 +167,14 @@ export class CustomCurrencies extends APIResource {
|
|
|
126
167
|
/**
|
|
127
168
|
* Restores a previously archived custom currency. Fails if another active currency
|
|
128
169
|
* with the same ID already exists.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```ts
|
|
173
|
+
* const customCurrencyResponse =
|
|
174
|
+
* await client.v1.credits.customCurrencies.unarchive(
|
|
175
|
+
* 'currencyId',
|
|
176
|
+
* );
|
|
177
|
+
* ```
|
|
129
178
|
*/
|
|
130
179
|
unarchive(
|
|
131
180
|
currencyID: string,
|