@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
|
@@ -9,15 +9,43 @@ export declare class Grants extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates a new credit grant for a customer with specified amount, type, and
|
|
11
11
|
* optional billing configuration.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const creditGrantResponse =
|
|
16
|
+
* await client.v1.credits.grants.create({
|
|
17
|
+
* amount: 0,
|
|
18
|
+
* currencyId: 'currencyId',
|
|
19
|
+
* customerId: 'customerId',
|
|
20
|
+
* displayName: 'displayName',
|
|
21
|
+
* grantType: 'PAID',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
12
24
|
*/
|
|
13
25
|
create(params: GrantCreateParams, options?: RequestOptions): APIPromise<CreditGrantResponse>;
|
|
14
26
|
/**
|
|
15
27
|
* Retrieves a paginated list of credit grants for a customer.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* // Automatically fetches more pages as needed.
|
|
32
|
+
* for await (const grantListResponse of client.v1.credits.grants.list(
|
|
33
|
+
* { customerId: 'customerId' },
|
|
34
|
+
* )) {
|
|
35
|
+
* // ...
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
16
38
|
*/
|
|
17
39
|
list(params: GrantListParams, options?: RequestOptions): PagePromise<GrantListResponsesMyCursorIDPage, GrantListResponse>;
|
|
18
40
|
/**
|
|
19
41
|
* Voids an existing credit grant, preventing further consumption of the remaining
|
|
20
42
|
* credits.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const creditGrantResponse =
|
|
47
|
+
* await client.v1.credits.grants.void('x');
|
|
48
|
+
* ```
|
|
21
49
|
*/
|
|
22
50
|
void(id: string, params?: GrantVoidParams | null | undefined, options?: RequestOptions): APIPromise<CreditGrantResponse>;
|
|
23
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grants.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/grants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EA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Ae,CAAC;IAC/B;;OAEG;IACH,UAAiB,SAAS;QACxB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -13,6 +13,18 @@ class Grants extends resource_1.APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new credit grant for a customer with specified amount, type, and
|
|
15
15
|
* optional billing configuration.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const creditGrantResponse =
|
|
20
|
+
* await client.v1.credits.grants.create({
|
|
21
|
+
* amount: 0,
|
|
22
|
+
* currencyId: 'currencyId',
|
|
23
|
+
* customerId: 'customerId',
|
|
24
|
+
* displayName: 'displayName',
|
|
25
|
+
* grantType: 'PAID',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
16
28
|
*/
|
|
17
29
|
create(params, options) {
|
|
18
30
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -30,6 +42,16 @@ class Grants extends resource_1.APIResource {
|
|
|
30
42
|
}
|
|
31
43
|
/**
|
|
32
44
|
* Retrieves a paginated list of credit grants for a customer.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* // Automatically fetches more pages as needed.
|
|
49
|
+
* for await (const grantListResponse of client.v1.credits.grants.list(
|
|
50
|
+
* { customerId: 'customerId' },
|
|
51
|
+
* )) {
|
|
52
|
+
* // ...
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
33
55
|
*/
|
|
34
56
|
list(params, options) {
|
|
35
57
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
@@ -48,6 +70,12 @@ class Grants extends resource_1.APIResource {
|
|
|
48
70
|
/**
|
|
49
71
|
* Voids an existing credit grant, preventing further consumption of the remaining
|
|
50
72
|
* credits.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const creditGrantResponse =
|
|
77
|
+
* await client.v1.credits.grants.void('x');
|
|
78
|
+
* ```
|
|
51
79
|
*/
|
|
52
80
|
void(id, params = {}, options) {
|
|
53
81
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grants.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/grants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAAkG;AAClG,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"grants.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/grants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAAkG;AAClG,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;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;;;;;OASG;IACH,IAAI,CACF,EAAU,EACV,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,0BAA0B,EAAE,OAAO,EAAE;YAChE,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;AA1FD,wBA0FC"}
|
|
@@ -10,6 +10,18 @@ export class Grants extends APIResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* Creates a new credit grant for a customer with specified amount, type, and
|
|
12
12
|
* optional billing configuration.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const creditGrantResponse =
|
|
17
|
+
* await client.v1.credits.grants.create({
|
|
18
|
+
* amount: 0,
|
|
19
|
+
* currencyId: 'currencyId',
|
|
20
|
+
* customerId: 'customerId',
|
|
21
|
+
* displayName: 'displayName',
|
|
22
|
+
* grantType: 'PAID',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
13
25
|
*/
|
|
14
26
|
create(params, options) {
|
|
15
27
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -27,6 +39,16 @@ export class Grants extends APIResource {
|
|
|
27
39
|
}
|
|
28
40
|
/**
|
|
29
41
|
* Retrieves a paginated list of credit grants for a customer.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* // Automatically fetches more pages as needed.
|
|
46
|
+
* for await (const grantListResponse of client.v1.credits.grants.list(
|
|
47
|
+
* { customerId: 'customerId' },
|
|
48
|
+
* )) {
|
|
49
|
+
* // ...
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
30
52
|
*/
|
|
31
53
|
list(params, options) {
|
|
32
54
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
@@ -45,6 +67,12 @@ export class Grants extends APIResource {
|
|
|
45
67
|
/**
|
|
46
68
|
* Voids an existing credit grant, preventing further consumption of the remaining
|
|
47
69
|
* credits.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const creditGrantResponse =
|
|
74
|
+
* await client.v1.credits.grants.void('x');
|
|
75
|
+
* ```
|
|
48
76
|
*/
|
|
49
77
|
void(id, params = {}, options) {
|
|
50
78
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grants.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/grants.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,cAAc,EAA0C,qCAAiC;AAClG,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"grants.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/grants.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAA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I,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;;;;;;;;;OASG;IACH,IAAI,CACF,EAAU,EACV,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,0BAA0B,EAAE,OAAO,EAAE;YAChE,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"}
|
|
@@ -6,6 +6,16 @@ export declare class Reservations extends APIResource {
|
|
|
6
6
|
* Releases a credit reservation, consuming the given amount and returning the rest
|
|
7
7
|
* of the held credits to the balance. Retry a failed release with the same
|
|
8
8
|
* reservation ID; it is applied once.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response =
|
|
13
|
+
* await client.v1.credits.reservations.release('x', {
|
|
14
|
+
* consumedAmount: 0,
|
|
15
|
+
* currencyId: 'currencyId',
|
|
16
|
+
* customerId: 'customerId',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
9
19
|
*/
|
|
10
20
|
release(reservationID: string, params: ReservationReleaseParams, options?: RequestOptions): APIPromise<ReservationReleaseResponse>;
|
|
11
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservations.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/reservations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE,qBAAa,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"reservations.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/reservations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAc1C;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,IAAI,EAAE,0BAA0B,CAAC,IAAI,CAAC;CACvC;AAED,yBAAiB,0BAA0B,CAAC;IAC1C;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC;KAC/B;IAED,UAAiB,IAAI,CAAC;QACpB;;WAEG;QACH,UAAiB,MAAM;YACrB;;eAEG;YACH,UAAU,EAAE,MAAM,CAAC;YAEnB;;;;;eAKG;YACH,YAAY,EAAE,MAAM,CAAC;YAErB;;;eAGG;YACH,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,UAAU,EAAE,MAAM,CAAC;YAEnB;;;eAGG;YACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAChC;QAED;;WAEG;QACH,UAAiB,WAAW;YAC1B;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,MAAM,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;YAE9B;;;eAGG;YACH,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;SAC3C;KACF;CACF;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -6,6 +6,16 @@ export declare class Reservations extends APIResource {
|
|
|
6
6
|
* Releases a credit reservation, consuming the given amount and returning the rest
|
|
7
7
|
* of the held credits to the balance. Retry a failed release with the same
|
|
8
8
|
* reservation ID; it is applied once.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response =
|
|
13
|
+
* await client.v1.credits.reservations.release('x', {
|
|
14
|
+
* consumedAmount: 0,
|
|
15
|
+
* currencyId: 'currencyId',
|
|
16
|
+
* customerId: 'customerId',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
9
19
|
*/
|
|
10
20
|
release(reservationID: string, params: ReservationReleaseParams, options?: RequestOptions): APIPromise<ReservationReleaseResponse>;
|
|
11
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservations.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/reservations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE,qBAAa,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"reservations.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/reservations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAc1C;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,IAAI,EAAE,0BAA0B,CAAC,IAAI,CAAC;CACvC;AAED,yBAAiB,0BAA0B,CAAC;IAC1C;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC;KAC/B;IAED,UAAiB,IAAI,CAAC;QACpB;;WAEG;QACH,UAAiB,MAAM;YACrB;;eAEG;YACH,UAAU,EAAE,MAAM,CAAC;YAEnB;;;;;eAKG;YACH,YAAY,EAAE,MAAM,CAAC;YAErB;;;eAGG;YACH,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,UAAU,EAAE,MAAM,CAAC;YAEnB;;;eAGG;YACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAChC;QAED;;WAEG;QACH,UAAiB,WAAW;YAC1B;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,MAAM,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;YAE9B;;;eAGG;YACH,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;SAC3C;KACF;CACF;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -10,6 +10,16 @@ class Reservations extends resource_1.APIResource {
|
|
|
10
10
|
* Releases a credit reservation, consuming the given amount and returning the rest
|
|
11
11
|
* of the held credits to the balance. Retry a failed release with the same
|
|
12
12
|
* reservation ID; it is applied once.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.v1.credits.reservations.release('x', {
|
|
18
|
+
* consumedAmount: 0,
|
|
19
|
+
* currencyId: 'currencyId',
|
|
20
|
+
* customerId: 'customerId',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
13
23
|
*/
|
|
14
24
|
release(reservationID, params, options) {
|
|
15
25
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservations.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/reservations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,YAAa,SAAQ,sBAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"reservations.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/reservations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,aAAqB,EACrB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3F,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gCAAgC,aAAa,UAAU,EAAE;YACpF,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;AAlCD,oCAkCC"}
|
|
@@ -7,6 +7,16 @@ export class Reservations extends APIResource {
|
|
|
7
7
|
* Releases a credit reservation, consuming the given amount and returning the rest
|
|
8
8
|
* of the held credits to the balance. Retry a failed release with the same
|
|
9
9
|
* reservation ID; it is applied once.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.v1.credits.reservations.release('x', {
|
|
15
|
+
* consumedAmount: 0,
|
|
16
|
+
* currencyId: 'currencyId',
|
|
17
|
+
* customerId: 'customerId',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
10
20
|
*/
|
|
11
21
|
release(reservationID, params, options) {
|
|
12
22
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservations.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/reservations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C
|
|
1
|
+
{"version":3,"file":"reservations.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/reservations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CACL,aAAqB,EACrB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3F,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gCAAgC,aAAa,UAAU,EAAE;YACpF,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"}
|
|
@@ -5,6 +5,8 @@ import * as PaymentMethodAPI from "./payment-method.mjs";
|
|
|
5
5
|
import { PaymentMethod, PaymentMethodAttachParams, PaymentMethodDetachParams } from "./payment-method.mjs";
|
|
6
6
|
import * as PromotionalEntitlementsAPI from "./promotional-entitlements.mjs";
|
|
7
7
|
import { PromotionalEntitlementCreateParams, PromotionalEntitlementCreateResponse, PromotionalEntitlementListParams, PromotionalEntitlementListResponse, PromotionalEntitlementListResponsesMyCursorIDPage, PromotionalEntitlementRevokeParams, PromotionalEntitlementRevokeResponse, PromotionalEntitlements } from "./promotional-entitlements.mjs";
|
|
8
|
+
import * as EntitiesAPI from "./entities/entities.mjs";
|
|
9
|
+
import { Entities, EntityArchiveParams, EntityArchiveResponse, EntityListParams, EntityListResponse, EntityListResponsesMyCursorIDPage, EntityRetrieveParams, EntityRetrieveResponse, EntityUpsertParams, EntityUpsertResponse } from "./entities/entities.mjs";
|
|
8
10
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
9
11
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
10
12
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
@@ -12,45 +14,104 @@ export declare class Customers extends APIResource {
|
|
|
12
14
|
paymentMethod: PaymentMethodAPI.PaymentMethod;
|
|
13
15
|
promotionalEntitlements: PromotionalEntitlementsAPI.PromotionalEntitlements;
|
|
14
16
|
integrations: IntegrationsAPI.Integrations;
|
|
17
|
+
entities: EntitiesAPI.Entities;
|
|
15
18
|
/**
|
|
16
19
|
* Retrieves a customer by their unique identifier, including billing information
|
|
17
20
|
* and subscription status.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const customerResponse = await client.v1.customers.retrieve(
|
|
25
|
+
* 'x',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
18
28
|
*/
|
|
19
29
|
retrieve(id: string, params?: CustomerRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<CustomerResponse>;
|
|
20
30
|
/**
|
|
21
31
|
* Updates an existing customer's properties such as name, email, and billing
|
|
22
32
|
* information.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const customerResponse = await client.v1.customers.update(
|
|
37
|
+
* 'x',
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
23
40
|
*/
|
|
24
41
|
update(id: string, params: CustomerUpdateParams, options?: RequestOptions): APIPromise<CustomerResponse>;
|
|
25
42
|
/**
|
|
26
43
|
* Retrieves a paginated list of customers in the environment.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* // Automatically fetches more pages as needed.
|
|
48
|
+
* for await (const customerListResponse of client.v1.customers.list()) {
|
|
49
|
+
* // ...
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
27
52
|
*/
|
|
28
53
|
list(params?: CustomerListParams | null | undefined, options?: RequestOptions): PagePromise<CustomerListResponsesMyCursorIDPage, CustomerListResponse>;
|
|
29
54
|
/**
|
|
30
55
|
* Archives a customer, preventing new subscriptions. Optionally cancels existing
|
|
31
56
|
* subscriptions.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const customerResponse = await client.v1.customers.archive(
|
|
61
|
+
* 'x',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
32
64
|
*/
|
|
33
65
|
archive(id: string, params?: CustomerArchiveParams | null | undefined, options?: RequestOptions): APIPromise<CustomerResponse>;
|
|
34
66
|
/**
|
|
35
67
|
* Checks a single entitlement (feature or credit) for a customer or resource.
|
|
36
68
|
* Supports `requestedUsage` and `requestedValues` to evaluate against limits or
|
|
37
|
-
* enum values.
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
69
|
+
* enum values. Pass `dimensions` to also check the governance budgets of the
|
|
70
|
+
* entities the usage is attributed to; the response then includes `chains`. Each
|
|
71
|
+
* call reaches the Stigg API directly, so latency reflects a network round trip.
|
|
72
|
+
* For entitlement checks on a hot path (e.g. gating a request in real time), the
|
|
73
|
+
* Stigg Node Server SDK (with its built-in cache) or the Sidecar will typically
|
|
74
|
+
* respond faster and keep working through brief Stigg outages; reach for this
|
|
75
|
+
* endpoint when a live HTTP call is the natural fit, such as from a non-Node
|
|
76
|
+
* backend or a server-side job.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const response = await client.v1.customers.checkEntitlement(
|
|
81
|
+
* 'x',
|
|
82
|
+
* );
|
|
83
|
+
* ```
|
|
43
84
|
*/
|
|
44
85
|
checkEntitlement(id: string, params?: CustomerCheckEntitlementParams | null | undefined, options?: RequestOptions): APIPromise<CustomerCheckEntitlementResponse>;
|
|
45
86
|
/**
|
|
46
87
|
* Imports multiple customers in bulk. Used for migrating customer data from
|
|
47
88
|
* external systems.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const response = await client.v1.customers.import({
|
|
93
|
+
* customers: [
|
|
94
|
+
* {
|
|
95
|
+
* id: 'id',
|
|
96
|
+
* email: 'dev@stainless.com',
|
|
97
|
+
* name: 'name',
|
|
98
|
+
* },
|
|
99
|
+
* ],
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
48
102
|
*/
|
|
49
103
|
import(params: CustomerImportParams, options?: RequestOptions): APIPromise<CustomerImportResponse>;
|
|
50
104
|
/**
|
|
51
105
|
* Retrieves a customer's contracts. Each contract that has a billing contract is
|
|
52
106
|
* enriched with a preview of its upcoming (next) invoice when available. Returns
|
|
53
107
|
* an empty list when the customer has no contracts.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const response = await client.v1.customers.listContracts(
|
|
112
|
+
* 'id',
|
|
113
|
+
* );
|
|
114
|
+
* ```
|
|
54
115
|
*/
|
|
55
116
|
listContracts(id: string, params?: CustomerListContractsParams | null | undefined, options?: RequestOptions): APIPromise<CustomerListContractsResponse>;
|
|
56
117
|
/**
|
|
@@ -60,14 +121,40 @@ export declare class Customers extends APIResource {
|
|
|
60
121
|
* Optionally narrowed to one contract, an issue-date range, and/or a set of
|
|
61
122
|
* invoice states. Returns an empty list when no billing provider is connected or
|
|
62
123
|
* the customer is not synced.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* // Automatically fetches more pages as needed.
|
|
128
|
+
* for await (const customerListInvoicesResponse of client.v1.customers.listInvoices(
|
|
129
|
+
* 'id',
|
|
130
|
+
* )) {
|
|
131
|
+
* // ...
|
|
132
|
+
* }
|
|
133
|
+
* ```
|
|
63
134
|
*/
|
|
64
135
|
listInvoices(id: string, params?: CustomerListInvoicesParams | null | undefined, options?: RequestOptions): PagePromise<CustomerListInvoicesResponsesMyCursorIDPage, CustomerListInvoicesResponse>;
|
|
65
136
|
/**
|
|
66
137
|
* Retrieves a paginated list of resources within the same customer.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* // Automatically fetches more pages as needed.
|
|
142
|
+
* for await (const customerListResourcesResponse of client.v1.customers.listResources(
|
|
143
|
+
* 'x',
|
|
144
|
+
* )) {
|
|
145
|
+
* // ...
|
|
146
|
+
* }
|
|
147
|
+
* ```
|
|
67
148
|
*/
|
|
68
149
|
listResources(id: string, params?: CustomerListResourcesParams | null | undefined, options?: RequestOptions): PagePromise<CustomerListResourcesResponsesMyCursorIDPage, CustomerListResourcesResponse>;
|
|
69
150
|
/**
|
|
70
151
|
* Creates a new customer.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* const customerResponse =
|
|
156
|
+
* await client.v1.customers.provision({ id: 'id' });
|
|
157
|
+
* ```
|
|
71
158
|
*/
|
|
72
159
|
provision(params: CustomerProvisionParams, options?: RequestOptions): APIPromise<CustomerResponse>;
|
|
73
160
|
/**
|
|
@@ -78,10 +165,22 @@ export declare class Customers extends APIResource {
|
|
|
78
165
|
* built-in cache) or the Sidecar will typically respond faster and keep working
|
|
79
166
|
* through brief Stigg outages; reach for this endpoint when a live HTTP call is
|
|
80
167
|
* the natural fit, such as from a non-Node backend or a server-side job.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* const response =
|
|
172
|
+
* await client.v1.customers.retrieveEntitlements('x');
|
|
173
|
+
* ```
|
|
81
174
|
*/
|
|
82
175
|
retrieveEntitlements(id: string, params?: CustomerRetrieveEntitlementsParams | null | undefined, options?: RequestOptions): APIPromise<CustomerRetrieveEntitlementsResponse>;
|
|
83
176
|
/**
|
|
84
177
|
* Restores an archived customer, allowing them to create new subscriptions again.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```ts
|
|
181
|
+
* const customerResponse =
|
|
182
|
+
* await client.v1.customers.unarchive('x');
|
|
183
|
+
* ```
|
|
85
184
|
*/
|
|
86
185
|
unarchive(id: string, params?: CustomerUnarchiveParams | null | undefined, options?: RequestOptions): APIPromise<CustomerResponse>;
|
|
87
186
|
}
|
|
@@ -823,6 +922,11 @@ export declare namespace CustomerCheckEntitlementResponse {
|
|
|
823
922
|
accessDeniedReason: 'FeatureNotFound' | 'CustomerNotFound' | 'CustomerIsArchived' | 'CustomerResourceNotFound' | 'NoActiveSubscription' | 'NoFeatureEntitlementInSubscription' | 'RequestedUsageExceedingLimit' | 'RequestedValuesMismatch' | 'BudgetExceeded' | 'Unknown' | 'FeatureTypeMismatch' | 'Revoked' | 'InsufficientCredits' | 'EntitlementNotFound' | null;
|
|
824
923
|
isGranted: boolean;
|
|
825
924
|
type: 'FEATURE';
|
|
925
|
+
/**
|
|
926
|
+
* Per-entity rollups, one chain per resolved dimension. Omitted when dimensions
|
|
927
|
+
* was not provided.
|
|
928
|
+
*/
|
|
929
|
+
chains?: Array<Array<Feature.Chain>>;
|
|
826
930
|
currentUsage?: number;
|
|
827
931
|
/**
|
|
828
932
|
* Timestamp of the last update to the entitlement grant or configuration.
|
|
@@ -853,6 +957,34 @@ export declare namespace CustomerCheckEntitlementResponse {
|
|
|
853
957
|
validUntil?: string;
|
|
854
958
|
}
|
|
855
959
|
namespace Feature {
|
|
960
|
+
/**
|
|
961
|
+
* Per-entity governance node — limit and current usage for a single resolved
|
|
962
|
+
* entity.
|
|
963
|
+
*/
|
|
964
|
+
interface Chain {
|
|
965
|
+
/**
|
|
966
|
+
* Amount consumed by this entity in the current cadence period.
|
|
967
|
+
*/
|
|
968
|
+
currentUsage: number;
|
|
969
|
+
/**
|
|
970
|
+
* External id of the entity within the customer.
|
|
971
|
+
*/
|
|
972
|
+
entityId: string;
|
|
973
|
+
/**
|
|
974
|
+
* Whether this node alone permits the requested usage.
|
|
975
|
+
*/
|
|
976
|
+
isGranted: boolean;
|
|
977
|
+
/**
|
|
978
|
+
* External ids of the entities this budget is scoped to. Empty (`[]`) is the
|
|
979
|
+
* node-wide budget; a non-empty set is the dimension-scoped budget that matched
|
|
980
|
+
* this request — use it to tell apart multiple budgets on the same entity.
|
|
981
|
+
*/
|
|
982
|
+
scopeEntityIds: Array<string>;
|
|
983
|
+
/**
|
|
984
|
+
* Hard usage limit for this node; null when the entity has no entity entitlement.
|
|
985
|
+
*/
|
|
986
|
+
usageLimit: number | null;
|
|
987
|
+
}
|
|
856
988
|
interface Feature {
|
|
857
989
|
/**
|
|
858
990
|
* The unique reference ID of the entitlement.
|
|
@@ -886,6 +1018,11 @@ export declare namespace CustomerCheckEntitlementResponse {
|
|
|
886
1018
|
* Timestamp of the last update to the credit usage.
|
|
887
1019
|
*/
|
|
888
1020
|
usageUpdatedAt: string;
|
|
1021
|
+
/**
|
|
1022
|
+
* Per-entity rollups, one chain per resolved dimension. Omitted when dimensions
|
|
1023
|
+
* was not provided.
|
|
1024
|
+
*/
|
|
1025
|
+
chains?: Array<Array<Credit.Chain>>;
|
|
889
1026
|
/**
|
|
890
1027
|
* Timestamp of the last update to the entitlement grant or configuration.
|
|
891
1028
|
*/
|
|
@@ -947,6 +1084,34 @@ export declare namespace CustomerCheckEntitlementResponse {
|
|
|
947
1084
|
*/
|
|
948
1085
|
unitSingular?: string | null;
|
|
949
1086
|
}
|
|
1087
|
+
/**
|
|
1088
|
+
* Per-entity governance node — limit and current usage for a single resolved
|
|
1089
|
+
* entity.
|
|
1090
|
+
*/
|
|
1091
|
+
interface Chain {
|
|
1092
|
+
/**
|
|
1093
|
+
* Amount consumed by this entity in the current cadence period.
|
|
1094
|
+
*/
|
|
1095
|
+
currentUsage: number;
|
|
1096
|
+
/**
|
|
1097
|
+
* External id of the entity within the customer.
|
|
1098
|
+
*/
|
|
1099
|
+
entityId: string;
|
|
1100
|
+
/**
|
|
1101
|
+
* Whether this node alone permits the requested usage.
|
|
1102
|
+
*/
|
|
1103
|
+
isGranted: boolean;
|
|
1104
|
+
/**
|
|
1105
|
+
* External ids of the entities this budget is scoped to. Empty (`[]`) is the
|
|
1106
|
+
* node-wide budget; a non-empty set is the dimension-scoped budget that matched
|
|
1107
|
+
* this request — use it to tell apart multiple budgets on the same entity.
|
|
1108
|
+
*/
|
|
1109
|
+
scopeEntityIds: Array<string>;
|
|
1110
|
+
/**
|
|
1111
|
+
* Hard usage limit for this node; null when the entity has no entity entitlement.
|
|
1112
|
+
*/
|
|
1113
|
+
usageLimit: number | null;
|
|
1114
|
+
}
|
|
950
1115
|
/**
|
|
951
1116
|
* The reservation created by this request, when it asked to reserve credits and
|
|
952
1117
|
* was granted.
|
|
@@ -1819,6 +1984,14 @@ export interface CustomerCheckEntitlementParams {
|
|
|
1819
1984
|
* exclusive with `featureId`.
|
|
1820
1985
|
*/
|
|
1821
1986
|
currencyId?: string;
|
|
1987
|
+
/**
|
|
1988
|
+
* Query param: Attribution map of the entities the usage is attributed to (e.g.
|
|
1989
|
+
* `dimensions[userId]=u1`). When provided, their governance budgets are checked
|
|
1990
|
+
* too and the response includes `chains`.
|
|
1991
|
+
*/
|
|
1992
|
+
dimensions?: {
|
|
1993
|
+
[key: string]: string;
|
|
1994
|
+
};
|
|
1822
1995
|
/**
|
|
1823
1996
|
* Query param: Feature ID (refId) to check. Mutually exclusive with `currencyId`.
|
|
1824
1997
|
*/
|
|
@@ -1855,7 +2028,8 @@ export interface CustomerCheckEntitlementParams {
|
|
|
1855
2028
|
reservationTtlSeconds?: number;
|
|
1856
2029
|
/**
|
|
1857
2030
|
* Query param: Credits to reserve (credit entitlements only). The check is decided
|
|
1858
|
-
* and the credits held atomically; `requestedUsage` is ignored.
|
|
2031
|
+
* and the credits held atomically; `requestedUsage` is ignored. Not supported with
|
|
2032
|
+
* `dimensions`.
|
|
1859
2033
|
*/
|
|
1860
2034
|
reserveAmount?: number;
|
|
1861
2035
|
/**
|
|
@@ -2344,5 +2518,6 @@ export declare namespace Customers {
|
|
|
2344
2518
|
export { PaymentMethod as PaymentMethod, type PaymentMethodAttachParams as PaymentMethodAttachParams, type PaymentMethodDetachParams as PaymentMethodDetachParams, };
|
|
2345
2519
|
export { PromotionalEntitlements as PromotionalEntitlements, type PromotionalEntitlementCreateResponse as PromotionalEntitlementCreateResponse, type PromotionalEntitlementListResponse as PromotionalEntitlementListResponse, type PromotionalEntitlementRevokeResponse as PromotionalEntitlementRevokeResponse, type PromotionalEntitlementListResponsesMyCursorIDPage as PromotionalEntitlementListResponsesMyCursorIDPage, type PromotionalEntitlementCreateParams as PromotionalEntitlementCreateParams, type PromotionalEntitlementListParams as PromotionalEntitlementListParams, type PromotionalEntitlementRevokeParams as PromotionalEntitlementRevokeParams, };
|
|
2346
2520
|
export { Integrations as Integrations, type IntegrationListResponse as IntegrationListResponse, type IntegrationListResponsesMyCursorIDPage as IntegrationListResponsesMyCursorIDPage, type IntegrationRetrieveParams as IntegrationRetrieveParams, type IntegrationUpdateParams as IntegrationUpdateParams, type IntegrationListParams as IntegrationListParams, type IntegrationLinkParams as IntegrationLinkParams, type IntegrationUnlinkParams as IntegrationUnlinkParams, };
|
|
2521
|
+
export { Entities as Entities, type EntityRetrieveResponse as EntityRetrieveResponse, type EntityListResponse as EntityListResponse, type EntityArchiveResponse as EntityArchiveResponse, type EntityUpsertResponse as EntityUpsertResponse, type EntityListResponsesMyCursorIDPage as EntityListResponsesMyCursorIDPage, type EntityRetrieveParams as EntityRetrieveParams, type EntityListParams as EntityListParams, type EntityArchiveParams as EntityArchiveParams, type EntityUpsertParams as EntityUpsertParams, };
|
|
2347
2522
|
}
|
|
2348
2523
|
//# sourceMappingURL=customers.d.mts.map
|