@stigg/typescript 0.1.0-beta.20 → 0.1.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/v1/addons/addons.d.mts +143 -33
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +143 -33
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +110 -17
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +110 -17
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +62 -5
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +62 -5
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/entitlements.js +49 -8
- package/resources/v1/addons/entitlements.js.map +1 -1
- package/resources/v1/addons/entitlements.mjs +49 -8
- package/resources/v1/addons/entitlements.mjs.map +1 -1
- package/resources/v1/addons/index.d.mts +2 -2
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +2 -2
- package/resources/v1/addons/index.d.ts.map +1 -1
- package/resources/v1/addons/index.js.map +1 -1
- package/resources/v1/addons/index.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +80 -20
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +80 -20
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +60 -9
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +60 -9
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/credits/credits.d.mts +59 -26
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +59 -26
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +36 -5
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +36 -5
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/custom-currencies.d.mts +96 -23
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
- package/resources/v1/credits/custom-currencies.d.ts +96 -23
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
- package/resources/v1/credits/custom-currencies.js +76 -12
- package/resources/v1/credits/custom-currencies.js.map +1 -1
- package/resources/v1/credits/custom-currencies.mjs +76 -12
- package/resources/v1/credits/custom-currencies.mjs.map +1 -1
- package/resources/v1/credits/grants.d.mts +60 -23
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +60 -23
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/credits/grants.js +35 -5
- package/resources/v1/credits/grants.js.map +1 -1
- package/resources/v1/credits/grants.mjs +35 -5
- package/resources/v1/credits/grants.mjs.map +1 -1
- package/resources/v1/credits/index.d.mts +2 -2
- package/resources/v1/credits/index.d.mts.map +1 -1
- package/resources/v1/credits/index.d.ts +2 -2
- package/resources/v1/credits/index.d.ts.map +1 -1
- package/resources/v1/credits/index.js.map +1 -1
- package/resources/v1/credits/index.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +165 -48
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +165 -48
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +124 -19
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +124 -19
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +64 -9
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +64 -9
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/integrations.js +57 -9
- package/resources/v1/customers/integrations.js.map +1 -1
- package/resources/v1/customers/integrations.mjs +57 -9
- package/resources/v1/customers/integrations.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +31 -7
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +31 -7
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +26 -4
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +26 -4
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +40 -7
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +40 -7
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.js +38 -6
- package/resources/v1/customers/promotional-entitlements.js.map +1 -1
- package/resources/v1/customers/promotional-entitlements.mjs +38 -6
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
- package/resources/v1/events/beta/customers/assignments.d.mts +27 -5
- package/resources/v1/events/beta/customers/assignments.d.mts.map +1 -1
- package/resources/v1/events/beta/customers/assignments.d.ts +27 -5
- package/resources/v1/events/beta/customers/assignments.d.ts.map +1 -1
- package/resources/v1/events/beta/customers/assignments.js +27 -4
- package/resources/v1/events/beta/customers/assignments.js.map +1 -1
- package/resources/v1/events/beta/customers/assignments.mjs +27 -4
- package/resources/v1/events/beta/customers/assignments.mjs.map +1 -1
- package/resources/v1/events/beta/customers/entities.d.mts +66 -10
- package/resources/v1/events/beta/customers/entities.d.mts.map +1 -1
- package/resources/v1/events/beta/customers/entities.d.ts +66 -10
- package/resources/v1/events/beta/customers/entities.d.ts.map +1 -1
- package/resources/v1/events/beta/customers/entities.js +64 -10
- package/resources/v1/events/beta/customers/entities.js.map +1 -1
- package/resources/v1/events/beta/customers/entities.mjs +64 -10
- package/resources/v1/events/beta/customers/entities.mjs.map +1 -1
- package/resources/v1/events/beta/customers/entitlements.d.mts +23 -10
- package/resources/v1/events/beta/customers/entitlements.d.mts.map +1 -1
- package/resources/v1/events/beta/customers/entitlements.d.ts +23 -10
- package/resources/v1/events/beta/customers/entitlements.d.ts.map +1 -1
- package/resources/v1/events/beta/customers/entitlements.js +14 -2
- package/resources/v1/events/beta/customers/entitlements.js.map +1 -1
- package/resources/v1/events/beta/customers/entitlements.mjs +14 -2
- package/resources/v1/events/beta/customers/entitlements.mjs.map +1 -1
- package/resources/v1/events/beta/entity-types.d.mts +25 -3
- package/resources/v1/events/beta/entity-types.d.mts.map +1 -1
- package/resources/v1/events/beta/entity-types.d.ts +25 -3
- package/resources/v1/events/beta/entity-types.d.ts.map +1 -1
- package/resources/v1/events/beta/entity-types.js +23 -3
- package/resources/v1/events/beta/entity-types.js.map +1 -1
- package/resources/v1/events/beta/entity-types.mjs +23 -3
- package/resources/v1/events/beta/entity-types.mjs.map +1 -1
- package/resources/v1/events/events.d.mts +13 -2
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +13 -2
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +14 -2
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +14 -2
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +108 -30
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +108 -30
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/features.js +72 -11
- package/resources/v1/features.js.map +1 -1
- package/resources/v1/features.mjs +72 -11
- package/resources/v1/features.mjs.map +1 -1
- package/resources/v1/index.d.mts +7 -7
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +7 -7
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +62 -5
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +62 -5
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/entitlements.js +49 -8
- package/resources/v1/plans/entitlements.js.map +1 -1
- package/resources/v1/plans/entitlements.mjs +49 -8
- package/resources/v1/plans/entitlements.mjs.map +1 -1
- package/resources/v1/plans/index.d.mts +2 -2
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +2 -2
- package/resources/v1/plans/index.d.ts.map +1 -1
- package/resources/v1/plans/index.js.map +1 -1
- package/resources/v1/plans/index.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +156 -34
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +156 -34
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +127 -20
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +127 -20
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +97 -23
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +97 -23
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/products.js +73 -11
- package/resources/v1/products.js.map +1 -1
- package/resources/v1/products.mjs +73 -11
- package/resources/v1/products.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +29 -3
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +29 -3
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +25 -4
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +25 -4
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts +4 -4
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +4 -4
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +15 -2
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -1
- package/resources/v1/subscriptions/invoice.d.ts +15 -2
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -1
- package/resources/v1/subscriptions/invoice.js +13 -2
- package/resources/v1/subscriptions/invoice.js.map +1 -1
- package/resources/v1/subscriptions/invoice.mjs +13 -2
- package/resources/v1/subscriptions/invoice.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +242 -78
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +242 -78
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +126 -19
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +128 -21
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +29 -4
- package/resources/v1/subscriptions/usage.d.mts.map +1 -1
- package/resources/v1/subscriptions/usage.d.ts +29 -4
- package/resources/v1/subscriptions/usage.d.ts.map +1 -1
- package/resources/v1/subscriptions/usage.js +26 -4
- package/resources/v1/subscriptions/usage.js.map +1 -1
- package/resources/v1/subscriptions/usage.mjs +26 -4
- package/resources/v1/subscriptions/usage.mjs.map +1 -1
- package/resources/v1/usage.d.mts +24 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +24 -2
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +26 -4
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +26 -4
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +14 -14
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +14 -14
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/addons/addons.ts +286 -39
- package/src/resources/v1/addons/entitlements.ts +123 -10
- package/src/resources/v1/addons/index.ts +5 -0
- package/src/resources/v1/coupons.ts +154 -23
- package/src/resources/v1/credits/credits.ts +102 -24
- package/src/resources/v1/credits/custom-currencies.ts +188 -30
- package/src/resources/v1/credits/grants.ts +102 -24
- package/src/resources/v1/credits/index.ts +4 -0
- package/src/resources/v1/customers/customers.ts +318 -57
- package/src/resources/v1/customers/index.ts +8 -1
- package/src/resources/v1/customers/integrations.ts +129 -16
- package/src/resources/v1/customers/payment-method.ts +66 -9
- package/src/resources/v1/customers/promotional-entitlements.ts +82 -11
- package/src/resources/v1/events/beta/customers/assignments.ts +56 -7
- package/src/resources/v1/events/beta/customers/entities.ts +136 -16
- package/src/resources/v1/events/beta/customers/entitlements.ts +38 -11
- package/src/resources/v1/events/beta/entity-types.ts +51 -5
- package/src/resources/v1/events/events.ts +28 -3
- package/src/resources/v1/features.ts +204 -34
- package/src/resources/v1/index.ts +19 -0
- package/src/resources/v1/plans/entitlements.ts +123 -10
- package/src/resources/v1/plans/index.ts +5 -0
- package/src/resources/v1/plans/plans.ts +314 -43
- package/src/resources/v1/products.ts +189 -27
- package/src/resources/v1/subscriptions/future-update.ts +68 -5
- package/src/resources/v1/subscriptions/index.ts +9 -2
- package/src/resources/v1/subscriptions/invoice.ts +36 -3
- package/src/resources/v1/subscriptions/subscriptions.ts +410 -85
- package/src/resources/v1/subscriptions/usage.ts +61 -5
- package/src/resources/v1/usage.ts +53 -5
- package/src/resources/v1/v1.ts +38 -0
- 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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import * as CustomCurrenciesAPI from "./custom-currencies.mjs";
|
|
3
|
-
import { CustomCurrencies, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyResponse, CustomCurrencyUpdateParams } from "./custom-currencies.mjs";
|
|
3
|
+
import { CustomCurrencies, CustomCurrencyArchiveParams, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyResponse, CustomCurrencyUnarchiveParams, CustomCurrencyUpdateParams } from "./custom-currencies.mjs";
|
|
4
4
|
import * as GrantsAPI from "./grants.mjs";
|
|
5
|
-
import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, Grants } from "./grants.mjs";
|
|
5
|
+
import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, GrantVoidParams, Grants } from "./grants.mjs";
|
|
6
6
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
7
7
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
8
8
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
@@ -21,7 +21,7 @@ export declare class Credits extends APIResource {
|
|
|
21
21
|
* });
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
getAutoRecharge(
|
|
24
|
+
getAutoRecharge(params: CreditGetAutoRechargeParams, options?: RequestOptions): APIPromise<CreditGetAutoRechargeResponse>;
|
|
25
25
|
/**
|
|
26
26
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
27
27
|
* a specified time range.
|
|
@@ -33,7 +33,7 @@ export declare class Credits extends APIResource {
|
|
|
33
33
|
* });
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
getUsage(
|
|
36
|
+
getUsage(params: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse>;
|
|
37
37
|
/**
|
|
38
38
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
39
39
|
*
|
|
@@ -47,7 +47,7 @@ export declare class Credits extends APIResource {
|
|
|
47
47
|
* }
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
listLedger(
|
|
50
|
+
listLedger(params: CreditListLedgerParams, options?: RequestOptions): PagePromise<CreditListLedgerResponsesMyCursorIDPage, CreditListLedgerResponse>;
|
|
51
51
|
}
|
|
52
52
|
export type CreditListLedgerResponsesMyCursorIDPage = MyCursorIDPage<CreditListLedgerResponse>;
|
|
53
53
|
/**
|
|
@@ -279,77 +279,110 @@ export interface CreditListLedgerResponse {
|
|
|
279
279
|
}
|
|
280
280
|
export interface CreditGetAutoRechargeParams {
|
|
281
281
|
/**
|
|
282
|
-
* Filter by currency ID (required)
|
|
282
|
+
* Query param: Filter by currency ID (required)
|
|
283
283
|
*/
|
|
284
284
|
currencyId: string;
|
|
285
285
|
/**
|
|
286
|
-
* Filter by customer ID (required)
|
|
286
|
+
* Query param: Filter by customer ID (required)
|
|
287
287
|
*/
|
|
288
288
|
customerId: string;
|
|
289
|
+
/**
|
|
290
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
291
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
292
|
+
*/
|
|
293
|
+
'X-ACCOUNT-ID'?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
296
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
297
|
+
* intrinsic to the key).
|
|
298
|
+
*/
|
|
299
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
289
300
|
}
|
|
290
301
|
export interface CreditGetUsageParams {
|
|
291
302
|
/**
|
|
292
|
-
* Filter by customer ID (required)
|
|
303
|
+
* Query param: Filter by customer ID (required)
|
|
293
304
|
*/
|
|
294
305
|
customerId: string;
|
|
295
306
|
/**
|
|
296
|
-
* Return items that come after this cursor
|
|
307
|
+
* Query param: Return items that come after this cursor
|
|
297
308
|
*/
|
|
298
309
|
after?: string;
|
|
299
310
|
/**
|
|
300
|
-
* Return items that come before this cursor
|
|
311
|
+
* Query param: Return items that come before this cursor
|
|
301
312
|
*/
|
|
302
313
|
before?: string;
|
|
303
314
|
/**
|
|
304
|
-
* Filter by currency ID
|
|
315
|
+
* Query param: Filter by currency ID
|
|
305
316
|
*/
|
|
306
317
|
currencyId?: string;
|
|
307
318
|
/**
|
|
308
|
-
* End date for the credit usage time range (ISO 8601). Defaults to
|
|
309
|
-
* startDate is provided
|
|
319
|
+
* Query param: End date for the credit usage time range (ISO 8601). Defaults to
|
|
320
|
+
* now when startDate is provided
|
|
310
321
|
*/
|
|
311
322
|
endDate?: string;
|
|
312
323
|
/**
|
|
313
|
-
* Comma-separated list of feature dimension keys to group usage
|
|
314
|
-
* 3). Each key matches /^[a-zA-Z0-9_$-]+$/
|
|
324
|
+
* Query param: Comma-separated list of feature dimension keys to group usage
|
|
325
|
+
* series by (up to 3). Each key matches /^[a-zA-Z0-9_$-]+$/
|
|
315
326
|
*/
|
|
316
327
|
groupBy?: string;
|
|
317
328
|
/**
|
|
318
|
-
* Maximum number of items to return
|
|
329
|
+
* Query param: Maximum number of items to return
|
|
319
330
|
*/
|
|
320
331
|
limit?: number;
|
|
321
332
|
/**
|
|
322
|
-
* Filter by resource ID
|
|
333
|
+
* Query param: Filter by resource ID
|
|
323
334
|
*/
|
|
324
335
|
resourceId?: string;
|
|
325
336
|
/**
|
|
326
|
-
* Start date for the credit usage time range (ISO 8601). Takes
|
|
327
|
-
* timeRange when provided
|
|
337
|
+
* Query param: Start date for the credit usage time range (ISO 8601). Takes
|
|
338
|
+
* precedence over timeRange when provided
|
|
328
339
|
*/
|
|
329
340
|
startDate?: string;
|
|
330
341
|
/**
|
|
331
|
-
* Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
|
|
332
|
-
* to LAST_MONTH
|
|
342
|
+
* Query param: Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
|
|
343
|
+
* LAST_YEAR). Defaults to LAST_MONTH
|
|
333
344
|
*/
|
|
334
345
|
timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';
|
|
346
|
+
/**
|
|
347
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
348
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
349
|
+
*/
|
|
350
|
+
'X-ACCOUNT-ID'?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
353
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
354
|
+
* intrinsic to the key).
|
|
355
|
+
*/
|
|
356
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
335
357
|
}
|
|
336
358
|
export interface CreditListLedgerParams extends MyCursorIDPageParams {
|
|
337
359
|
/**
|
|
338
|
-
* Filter by customer ID (required)
|
|
360
|
+
* Query param: Filter by customer ID (required)
|
|
339
361
|
*/
|
|
340
362
|
customerId: string;
|
|
341
363
|
/**
|
|
342
|
-
* Filter by currency ID
|
|
364
|
+
* Query param: Filter by currency ID
|
|
343
365
|
*/
|
|
344
366
|
currencyId?: string;
|
|
345
367
|
/**
|
|
346
|
-
* Filter by resource ID
|
|
368
|
+
* Query param: Filter by resource ID
|
|
347
369
|
*/
|
|
348
370
|
resourceId?: string;
|
|
371
|
+
/**
|
|
372
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
373
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
374
|
+
*/
|
|
375
|
+
'X-ACCOUNT-ID'?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
378
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
379
|
+
* intrinsic to the key).
|
|
380
|
+
*/
|
|
381
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
349
382
|
}
|
|
350
383
|
export declare namespace Credits {
|
|
351
384
|
export { type CreditGetAutoRechargeResponse as CreditGetAutoRechargeResponse, type CreditGetUsageResponse as CreditGetUsageResponse, type CreditListLedgerResponse as CreditListLedgerResponse, type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage, type CreditGetAutoRechargeParams as CreditGetAutoRechargeParams, type CreditGetUsageParams as CreditGetUsageParams, type CreditListLedgerParams as CreditListLedgerParams, };
|
|
352
|
-
export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, };
|
|
353
|
-
export { CustomCurrencies as CustomCurrencies, type CustomCurrencyResponse as CustomCurrencyResponse, type CustomCurrencyListResponse as CustomCurrencyListResponse, type CustomCurrencyListAssociatedEntitiesResponse as CustomCurrencyListAssociatedEntitiesResponse, type CustomCurrencyListResponsesMyCursorIDPage as CustomCurrencyListResponsesMyCursorIDPage, type CustomCurrencyCreateParams as CustomCurrencyCreateParams, type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams, type CustomCurrencyListParams as CustomCurrencyListParams, };
|
|
385
|
+
export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, type GrantVoidParams as GrantVoidParams, };
|
|
386
|
+
export { CustomCurrencies as CustomCurrencies, type CustomCurrencyResponse as CustomCurrencyResponse, type CustomCurrencyListResponse as CustomCurrencyListResponse, type CustomCurrencyListAssociatedEntitiesResponse as CustomCurrencyListAssociatedEntitiesResponse, type CustomCurrencyListResponsesMyCursorIDPage as CustomCurrencyListResponsesMyCursorIDPage, type CustomCurrencyCreateParams as CustomCurrencyCreateParams, type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams, type CustomCurrencyListParams as CustomCurrencyListParams, type CustomCurrencyArchiveParams as CustomCurrencyArchiveParams, type CustomCurrencyListAssociatedEntitiesParams as CustomCurrencyListAssociatedEntitiesParams, type CustomCurrencyUnarchiveParams as CustomCurrencyUnarchiveParams, };
|
|
354
387
|
}
|
|
355
388
|
//# sourceMappingURL=credits.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,4CAA4C,EAC5C,wBAAwB,EACxB,0BAA0B,EAC1B,yCAAyC,EACzC,sBAAsB,EACtB,0BAA0B,EAC3B,gCAA4B;AAC7B,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,MAAM,EACP,qBAAiB;AAClB,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,qCAAiC;
|
|
1
|
+
{"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EACL,gBAAgB,EAChB,2BAA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kB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAKD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,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;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import * as CustomCurrenciesAPI from "./custom-currencies.js";
|
|
3
|
-
import { CustomCurrencies, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyResponse, CustomCurrencyUpdateParams } from "./custom-currencies.js";
|
|
3
|
+
import { CustomCurrencies, CustomCurrencyArchiveParams, CustomCurrencyCreateParams, CustomCurrencyListAssociatedEntitiesParams, CustomCurrencyListAssociatedEntitiesResponse, CustomCurrencyListParams, CustomCurrencyListResponse, CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyResponse, CustomCurrencyUnarchiveParams, CustomCurrencyUpdateParams } from "./custom-currencies.js";
|
|
4
4
|
import * as GrantsAPI from "./grants.js";
|
|
5
|
-
import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, Grants } from "./grants.js";
|
|
5
|
+
import { CreditGrantResponse, GrantCreateParams, GrantListParams, GrantListResponse, GrantListResponsesMyCursorIDPage, GrantVoidParams, Grants } from "./grants.js";
|
|
6
6
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
7
7
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.js";
|
|
8
8
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
@@ -21,7 +21,7 @@ export declare class Credits extends APIResource {
|
|
|
21
21
|
* });
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
getAutoRecharge(
|
|
24
|
+
getAutoRecharge(params: CreditGetAutoRechargeParams, options?: RequestOptions): APIPromise<CreditGetAutoRechargeResponse>;
|
|
25
25
|
/**
|
|
26
26
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
27
27
|
* a specified time range.
|
|
@@ -33,7 +33,7 @@ export declare class Credits extends APIResource {
|
|
|
33
33
|
* });
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
getUsage(
|
|
36
|
+
getUsage(params: CreditGetUsageParams, options?: RequestOptions): APIPromise<CreditGetUsageResponse>;
|
|
37
37
|
/**
|
|
38
38
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
39
39
|
*
|
|
@@ -47,7 +47,7 @@ export declare class Credits extends APIResource {
|
|
|
47
47
|
* }
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
listLedger(
|
|
50
|
+
listLedger(params: CreditListLedgerParams, options?: RequestOptions): PagePromise<CreditListLedgerResponsesMyCursorIDPage, CreditListLedgerResponse>;
|
|
51
51
|
}
|
|
52
52
|
export type CreditListLedgerResponsesMyCursorIDPage = MyCursorIDPage<CreditListLedgerResponse>;
|
|
53
53
|
/**
|
|
@@ -279,77 +279,110 @@ export interface CreditListLedgerResponse {
|
|
|
279
279
|
}
|
|
280
280
|
export interface CreditGetAutoRechargeParams {
|
|
281
281
|
/**
|
|
282
|
-
* Filter by currency ID (required)
|
|
282
|
+
* Query param: Filter by currency ID (required)
|
|
283
283
|
*/
|
|
284
284
|
currencyId: string;
|
|
285
285
|
/**
|
|
286
|
-
* Filter by customer ID (required)
|
|
286
|
+
* Query param: Filter by customer ID (required)
|
|
287
287
|
*/
|
|
288
288
|
customerId: string;
|
|
289
|
+
/**
|
|
290
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
291
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
292
|
+
*/
|
|
293
|
+
'X-ACCOUNT-ID'?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
296
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
297
|
+
* intrinsic to the key).
|
|
298
|
+
*/
|
|
299
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
289
300
|
}
|
|
290
301
|
export interface CreditGetUsageParams {
|
|
291
302
|
/**
|
|
292
|
-
* Filter by customer ID (required)
|
|
303
|
+
* Query param: Filter by customer ID (required)
|
|
293
304
|
*/
|
|
294
305
|
customerId: string;
|
|
295
306
|
/**
|
|
296
|
-
* Return items that come after this cursor
|
|
307
|
+
* Query param: Return items that come after this cursor
|
|
297
308
|
*/
|
|
298
309
|
after?: string;
|
|
299
310
|
/**
|
|
300
|
-
* Return items that come before this cursor
|
|
311
|
+
* Query param: Return items that come before this cursor
|
|
301
312
|
*/
|
|
302
313
|
before?: string;
|
|
303
314
|
/**
|
|
304
|
-
* Filter by currency ID
|
|
315
|
+
* Query param: Filter by currency ID
|
|
305
316
|
*/
|
|
306
317
|
currencyId?: string;
|
|
307
318
|
/**
|
|
308
|
-
* End date for the credit usage time range (ISO 8601). Defaults to
|
|
309
|
-
* startDate is provided
|
|
319
|
+
* Query param: End date for the credit usage time range (ISO 8601). Defaults to
|
|
320
|
+
* now when startDate is provided
|
|
310
321
|
*/
|
|
311
322
|
endDate?: string;
|
|
312
323
|
/**
|
|
313
|
-
* Comma-separated list of feature dimension keys to group usage
|
|
314
|
-
* 3). Each key matches /^[a-zA-Z0-9_$-]+$/
|
|
324
|
+
* Query param: Comma-separated list of feature dimension keys to group usage
|
|
325
|
+
* series by (up to 3). Each key matches /^[a-zA-Z0-9_$-]+$/
|
|
315
326
|
*/
|
|
316
327
|
groupBy?: string;
|
|
317
328
|
/**
|
|
318
|
-
* Maximum number of items to return
|
|
329
|
+
* Query param: Maximum number of items to return
|
|
319
330
|
*/
|
|
320
331
|
limit?: number;
|
|
321
332
|
/**
|
|
322
|
-
* Filter by resource ID
|
|
333
|
+
* Query param: Filter by resource ID
|
|
323
334
|
*/
|
|
324
335
|
resourceId?: string;
|
|
325
336
|
/**
|
|
326
|
-
* Start date for the credit usage time range (ISO 8601). Takes
|
|
327
|
-
* timeRange when provided
|
|
337
|
+
* Query param: Start date for the credit usage time range (ISO 8601). Takes
|
|
338
|
+
* precedence over timeRange when provided
|
|
328
339
|
*/
|
|
329
340
|
startDate?: string;
|
|
330
341
|
/**
|
|
331
|
-
* Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
|
|
332
|
-
* to LAST_MONTH
|
|
342
|
+
* Query param: Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH,
|
|
343
|
+
* LAST_YEAR). Defaults to LAST_MONTH
|
|
333
344
|
*/
|
|
334
345
|
timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';
|
|
346
|
+
/**
|
|
347
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
348
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
349
|
+
*/
|
|
350
|
+
'X-ACCOUNT-ID'?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
353
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
354
|
+
* intrinsic to the key).
|
|
355
|
+
*/
|
|
356
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
335
357
|
}
|
|
336
358
|
export interface CreditListLedgerParams extends MyCursorIDPageParams {
|
|
337
359
|
/**
|
|
338
|
-
* Filter by customer ID (required)
|
|
360
|
+
* Query param: Filter by customer ID (required)
|
|
339
361
|
*/
|
|
340
362
|
customerId: string;
|
|
341
363
|
/**
|
|
342
|
-
* Filter by currency ID
|
|
364
|
+
* Query param: Filter by currency ID
|
|
343
365
|
*/
|
|
344
366
|
currencyId?: string;
|
|
345
367
|
/**
|
|
346
|
-
* Filter by resource ID
|
|
368
|
+
* Query param: Filter by resource ID
|
|
347
369
|
*/
|
|
348
370
|
resourceId?: string;
|
|
371
|
+
/**
|
|
372
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
373
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
374
|
+
*/
|
|
375
|
+
'X-ACCOUNT-ID'?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
378
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
379
|
+
* intrinsic to the key).
|
|
380
|
+
*/
|
|
381
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
349
382
|
}
|
|
350
383
|
export declare namespace Credits {
|
|
351
384
|
export { type CreditGetAutoRechargeResponse as CreditGetAutoRechargeResponse, type CreditGetUsageResponse as CreditGetUsageResponse, type CreditListLedgerResponse as CreditListLedgerResponse, type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage, type CreditGetAutoRechargeParams as CreditGetAutoRechargeParams, type CreditGetUsageParams as CreditGetUsageParams, type CreditListLedgerParams as CreditListLedgerParams, };
|
|
352
|
-
export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, };
|
|
353
|
-
export { CustomCurrencies as CustomCurrencies, type CustomCurrencyResponse as CustomCurrencyResponse, type CustomCurrencyListResponse as CustomCurrencyListResponse, type CustomCurrencyListAssociatedEntitiesResponse as CustomCurrencyListAssociatedEntitiesResponse, type CustomCurrencyListResponsesMyCursorIDPage as CustomCurrencyListResponsesMyCursorIDPage, type CustomCurrencyCreateParams as CustomCurrencyCreateParams, type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams, type CustomCurrencyListParams as CustomCurrencyListParams, };
|
|
385
|
+
export { Grants as Grants, type CreditGrantResponse as CreditGrantResponse, type GrantListResponse as GrantListResponse, type GrantListResponsesMyCursorIDPage as GrantListResponsesMyCursorIDPage, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, type GrantVoidParams as GrantVoidParams, };
|
|
386
|
+
export { CustomCurrencies as CustomCurrencies, type CustomCurrencyResponse as CustomCurrencyResponse, type CustomCurrencyListResponse as CustomCurrencyListResponse, type CustomCurrencyListAssociatedEntitiesResponse as CustomCurrencyListAssociatedEntitiesResponse, type CustomCurrencyListResponsesMyCursorIDPage as CustomCurrencyListResponsesMyCursorIDPage, type CustomCurrencyCreateParams as CustomCurrencyCreateParams, type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams, type CustomCurrencyListParams as CustomCurrencyListParams, type CustomCurrencyArchiveParams as CustomCurrencyArchiveParams, type CustomCurrencyListAssociatedEntitiesParams as CustomCurrencyListAssociatedEntitiesParams, type CustomCurrencyUnarchiveParams as CustomCurrencyUnarchiveParams, };
|
|
354
387
|
}
|
|
355
388
|
//# sourceMappingURL=credits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,mBAAmB,+BAA4B;AAC3D,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,4CAA4C,EAC5C,wBAAwB,EACxB,0BAA0B,EAC1B,yCAAyC,EACzC,sBAAsB,EACtB,0BAA0B,EAC3B,+BAA4B;AAC7B,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,MAAM,EACP,oBAAiB;AAClB,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,oCAAiC;
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,mBAAmB,+BAA4B;AAC3D,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,EAC1B,0CAA0C,EAC1C,4CAA4C,EAC5C,wBAAwB,EACxB,0BAA0B,EAC1B,yCAAyC,EACzC,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC3B,+BAA4B;AAC7B,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,eAAe,EACf,MAAM,E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AAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,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;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -9,6 +9,7 @@ const custom_currencies_1 = require("./custom-currencies.js");
|
|
|
9
9
|
const GrantsAPI = tslib_1.__importStar(require("./grants.js"));
|
|
10
10
|
const grants_1 = require("./grants.js");
|
|
11
11
|
const pagination_1 = require("../../../core/pagination.js");
|
|
12
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
12
13
|
class Credits extends resource_1.APIResource {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -27,8 +28,19 @@ class Credits extends resource_1.APIResource {
|
|
|
27
28
|
* });
|
|
28
29
|
* ```
|
|
29
30
|
*/
|
|
30
|
-
getAutoRecharge(
|
|
31
|
-
|
|
31
|
+
getAutoRecharge(params, options) {
|
|
32
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
33
|
+
return this._client.get('/api/v1/credits/auto-recharge', {
|
|
34
|
+
query,
|
|
35
|
+
...options,
|
|
36
|
+
headers: (0, headers_1.buildHeaders)([
|
|
37
|
+
{
|
|
38
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
39
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
40
|
+
},
|
|
41
|
+
options?.headers,
|
|
42
|
+
]),
|
|
43
|
+
});
|
|
32
44
|
}
|
|
33
45
|
/**
|
|
34
46
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
@@ -41,8 +53,19 @@ class Credits extends resource_1.APIResource {
|
|
|
41
53
|
* });
|
|
42
54
|
* ```
|
|
43
55
|
*/
|
|
44
|
-
getUsage(
|
|
45
|
-
|
|
56
|
+
getUsage(params, options) {
|
|
57
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
58
|
+
return this._client.get('/api/v1/credits/usage', {
|
|
59
|
+
query,
|
|
60
|
+
...options,
|
|
61
|
+
headers: (0, headers_1.buildHeaders)([
|
|
62
|
+
{
|
|
63
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
64
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
65
|
+
},
|
|
66
|
+
options?.headers,
|
|
67
|
+
]),
|
|
68
|
+
});
|
|
46
69
|
}
|
|
47
70
|
/**
|
|
48
71
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
@@ -57,10 +80,18 @@ class Credits extends resource_1.APIResource {
|
|
|
57
80
|
* }
|
|
58
81
|
* ```
|
|
59
82
|
*/
|
|
60
|
-
listLedger(
|
|
83
|
+
listLedger(params, options) {
|
|
84
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
61
85
|
return this._client.getAPIList('/api/v1/credits/ledger', (pagination_1.MyCursorIDPage), {
|
|
62
86
|
query,
|
|
63
87
|
...options,
|
|
88
|
+
headers: (0, headers_1.buildHeaders)([
|
|
89
|
+
{
|
|
90
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
91
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
92
|
+
},
|
|
93
|
+
options?.headers,
|
|
94
|
+
]),
|
|
64
95
|
});
|
|
65
96
|
}
|
|
66
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,oFAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,oFAA2D;AAC3D,8DAY6B;AAC7B,+DAAsC;AACtC,wCAQkB;AAElB,4DAAkG;AAClG,0DAAyD;AAGzD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IAwFJ,CAAC;IAtFC;;;;;;;;;;;OAWG;IACH,eAAe,CACb,MAAmC,EACnC,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5F,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE;YACvD,KAAK;YACL,GAAG,OAAO;YAC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AO;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;AA5FD,0BA4FC;AAmZD,OAAO,CAAC,MAAM,GAAG,eAAM,CAAC;AACxB,OAAO,CAAC,gBAAgB,GAAG,oCAAgB,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { CustomCurrencies, } from "./custom-currencies.mjs";
|
|
|
5
5
|
import * as GrantsAPI from "./grants.mjs";
|
|
6
6
|
import { Grants, } from "./grants.mjs";
|
|
7
7
|
import { MyCursorIDPage } from "../../../core/pagination.mjs";
|
|
8
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
8
9
|
export class Credits extends APIResource {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -23,8 +24,19 @@ export class Credits extends APIResource {
|
|
|
23
24
|
* });
|
|
24
25
|
* ```
|
|
25
26
|
*/
|
|
26
|
-
getAutoRecharge(
|
|
27
|
-
|
|
27
|
+
getAutoRecharge(params, options) {
|
|
28
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
29
|
+
return this._client.get('/api/v1/credits/auto-recharge', {
|
|
30
|
+
query,
|
|
31
|
+
...options,
|
|
32
|
+
headers: buildHeaders([
|
|
33
|
+
{
|
|
34
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
35
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
36
|
+
},
|
|
37
|
+
options?.headers,
|
|
38
|
+
]),
|
|
39
|
+
});
|
|
28
40
|
}
|
|
29
41
|
/**
|
|
30
42
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
@@ -37,8 +49,19 @@ export class Credits extends APIResource {
|
|
|
37
49
|
* });
|
|
38
50
|
* ```
|
|
39
51
|
*/
|
|
40
|
-
getUsage(
|
|
41
|
-
|
|
52
|
+
getUsage(params, options) {
|
|
53
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
54
|
+
return this._client.get('/api/v1/credits/usage', {
|
|
55
|
+
query,
|
|
56
|
+
...options,
|
|
57
|
+
headers: buildHeaders([
|
|
58
|
+
{
|
|
59
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
60
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
61
|
+
},
|
|
62
|
+
options?.headers,
|
|
63
|
+
]),
|
|
64
|
+
});
|
|
42
65
|
}
|
|
43
66
|
/**
|
|
44
67
|
* Retrieves a paginated list of credit ledger events for a customer.
|
|
@@ -53,10 +76,18 @@ export class Credits extends APIResource {
|
|
|
53
76
|
* }
|
|
54
77
|
* ```
|
|
55
78
|
*/
|
|
56
|
-
listLedger(
|
|
79
|
+
listLedger(params, options) {
|
|
80
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params;
|
|
57
81
|
return this._client.getAPIList('/api/v1/credits/ledger', (MyCursorIDPage), {
|
|
58
82
|
query,
|
|
59
83
|
...options,
|
|
84
|
+
headers: buildHeaders([
|
|
85
|
+
{
|
|
86
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
87
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
88
|
+
},
|
|
89
|
+
options?.headers,
|
|
90
|
+
]),
|
|
60
91
|
});
|
|
61
92
|
}
|
|
62
93
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EACL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"credits.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/credits.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EACL,gBAAgB,GAWjB,gCAA4B;AAC7B,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAOL,MAAM,GACP,qBAAiB;AAElB,OAAO,EAAE,cAAc,EAA0C,qCAAiC;AAClG,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAGzD,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IAwFJ,CAAC;IAtFC;;;;;;;;;;;OAWG;IACH,eAAe,CACb,MAAmC,EACnC,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5F,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE;YACvD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAA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