@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
|
@@ -18,7 +18,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
18
18
|
* });
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
create(
|
|
21
|
+
create(params: CustomCurrencyCreateParams, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Updates an existing custom currency. Only the supplied fields are modified.
|
|
24
24
|
*
|
|
@@ -30,7 +30,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
30
30
|
* );
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
update(currencyID: string,
|
|
33
|
+
update(currencyID: string, params: CustomCurrencyUpdateParams, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
34
34
|
/**
|
|
35
35
|
* Retrieves a paginated list of custom currencies in the environment. Archived
|
|
36
36
|
* currencies are excluded by default; pass `status=ARCHIVED` (or
|
|
@@ -44,7 +44,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
44
44
|
* }
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
list(
|
|
47
|
+
list(params?: CustomCurrencyListParams | null | undefined, options?: RequestOptions): PagePromise<CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyListResponse>;
|
|
48
48
|
/**
|
|
49
49
|
* Archives a custom currency. Fails if the currency is still associated with any
|
|
50
50
|
* active plan or addon — use the associated-entities endpoint first to inspect
|
|
@@ -58,7 +58,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
58
58
|
* );
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
|
-
archive(currencyID: string, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
61
|
+
archive(currencyID: string, params?: CustomCurrencyArchiveParams | null | undefined, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
62
62
|
/**
|
|
63
63
|
* Lists the active plans and addons that reference a custom currency. Useful
|
|
64
64
|
* before archiving to inspect dependencies.
|
|
@@ -71,7 +71,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
71
71
|
* );
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
|
-
listAssociatedEntities(currencyID: string, options?: RequestOptions): APIPromise<CustomCurrencyListAssociatedEntitiesResponse>;
|
|
74
|
+
listAssociatedEntities(currencyID: string, params?: CustomCurrencyListAssociatedEntitiesParams | null | undefined, options?: RequestOptions): APIPromise<CustomCurrencyListAssociatedEntitiesResponse>;
|
|
75
75
|
/**
|
|
76
76
|
* Restores a previously archived custom currency. Fails if another active currency
|
|
77
77
|
* with the same ID already exists.
|
|
@@ -84,7 +84,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
84
84
|
* );
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
|
-
unarchive(currencyID: string, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
87
|
+
unarchive(currencyID: string, params?: CustomCurrencyUnarchiveParams | null | undefined, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
88
88
|
}
|
|
89
89
|
export type CustomCurrencyListResponsesMyCursorIDPage = MyCursorIDPage<CustomCurrencyListResponse>;
|
|
90
90
|
/**
|
|
@@ -241,32 +241,43 @@ export declare namespace CustomCurrencyListAssociatedEntitiesResponse {
|
|
|
241
241
|
}
|
|
242
242
|
export interface CustomCurrencyCreateParams {
|
|
243
243
|
/**
|
|
244
|
-
* The unique identifier for the new custom currency
|
|
244
|
+
* Body param: The unique identifier for the new custom currency
|
|
245
245
|
*/
|
|
246
246
|
id: string;
|
|
247
247
|
/**
|
|
248
|
-
* The display name of the custom currency
|
|
248
|
+
* Body param: The display name of the custom currency
|
|
249
249
|
*/
|
|
250
250
|
displayName: string;
|
|
251
251
|
/**
|
|
252
|
-
* Description of the currency
|
|
252
|
+
* Body param: Description of the currency
|
|
253
253
|
*/
|
|
254
254
|
description?: string;
|
|
255
255
|
/**
|
|
256
|
-
* Additional metadata to attach to the custom currency
|
|
256
|
+
* Body param: Additional metadata to attach to the custom currency
|
|
257
257
|
*/
|
|
258
258
|
metadata?: {
|
|
259
259
|
[key: string]: string;
|
|
260
260
|
};
|
|
261
261
|
/**
|
|
262
|
-
* The symbol used to represent the custom currency
|
|
262
|
+
* Body param: The symbol used to represent the custom currency
|
|
263
263
|
*/
|
|
264
264
|
symbol?: string;
|
|
265
265
|
/**
|
|
266
|
-
* Singular and plural unit labels for a custom currency. Both fields
|
|
267
|
-
* when supplied.
|
|
266
|
+
* Body param: Singular and plural unit labels for a custom currency. Both fields
|
|
267
|
+
* are required when supplied.
|
|
268
268
|
*/
|
|
269
269
|
units?: CustomCurrencyCreateParams.Units;
|
|
270
|
+
/**
|
|
271
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
272
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
273
|
+
*/
|
|
274
|
+
'X-ACCOUNT-ID'?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
277
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
278
|
+
* intrinsic to the key).
|
|
279
|
+
*/
|
|
280
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
270
281
|
}
|
|
271
282
|
export declare namespace CustomCurrencyCreateParams {
|
|
272
283
|
/**
|
|
@@ -286,29 +297,41 @@ export declare namespace CustomCurrencyCreateParams {
|
|
|
286
297
|
}
|
|
287
298
|
export interface CustomCurrencyUpdateParams {
|
|
288
299
|
/**
|
|
289
|
-
* A human-readable description of the custom currency. Send an empty
|
|
290
|
-
* clear.
|
|
300
|
+
* Body param: A human-readable description of the custom currency. Send an empty
|
|
301
|
+
* string to clear.
|
|
291
302
|
*/
|
|
292
303
|
description?: string | null;
|
|
293
304
|
/**
|
|
294
|
-
* The display name of the custom currency
|
|
305
|
+
* Body param: The display name of the custom currency
|
|
295
306
|
*/
|
|
296
307
|
displayName?: string;
|
|
297
308
|
/**
|
|
298
|
-
* Additional metadata to attach to the custom currency
|
|
309
|
+
* Body param: Additional metadata to attach to the custom currency
|
|
299
310
|
*/
|
|
300
311
|
metadata?: {
|
|
301
312
|
[key: string]: string;
|
|
302
313
|
} | null;
|
|
303
314
|
/**
|
|
304
|
-
* The symbol used to represent the custom currency. Send an empty
|
|
315
|
+
* Body param: The symbol used to represent the custom currency. Send an empty
|
|
316
|
+
* string to clear.
|
|
305
317
|
*/
|
|
306
318
|
symbol?: string | null;
|
|
307
319
|
/**
|
|
308
|
-
* Singular and plural unit labels for a custom currency. Both fields
|
|
309
|
-
* when supplied.
|
|
320
|
+
* Body param: Singular and plural unit labels for a custom currency. Both fields
|
|
321
|
+
* are required when supplied.
|
|
310
322
|
*/
|
|
311
323
|
units?: CustomCurrencyUpdateParams.Units;
|
|
324
|
+
/**
|
|
325
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
326
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
327
|
+
*/
|
|
328
|
+
'X-ACCOUNT-ID'?: string;
|
|
329
|
+
/**
|
|
330
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
331
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
332
|
+
* intrinsic to the key).
|
|
333
|
+
*/
|
|
334
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
312
335
|
}
|
|
313
336
|
export declare namespace CustomCurrencyUpdateParams {
|
|
314
337
|
/**
|
|
@@ -328,12 +351,62 @@ export declare namespace CustomCurrencyUpdateParams {
|
|
|
328
351
|
}
|
|
329
352
|
export interface CustomCurrencyListParams extends MyCursorIDPageParams {
|
|
330
353
|
/**
|
|
331
|
-
* Filter by custom currency status. Supports comma-separated values
|
|
332
|
-
* `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.
|
|
354
|
+
* Query param: Filter by custom currency status. Supports comma-separated values
|
|
355
|
+
* (e.g., `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.
|
|
333
356
|
*/
|
|
334
357
|
status?: Array<'ACTIVE' | 'ARCHIVED'>;
|
|
358
|
+
/**
|
|
359
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
360
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
361
|
+
*/
|
|
362
|
+
'X-ACCOUNT-ID'?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
365
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
366
|
+
* intrinsic to the key).
|
|
367
|
+
*/
|
|
368
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface CustomCurrencyArchiveParams {
|
|
371
|
+
/**
|
|
372
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
373
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
374
|
+
*/
|
|
375
|
+
'X-ACCOUNT-ID'?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
378
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
379
|
+
* key).
|
|
380
|
+
*/
|
|
381
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
382
|
+
}
|
|
383
|
+
export interface CustomCurrencyListAssociatedEntitiesParams {
|
|
384
|
+
/**
|
|
385
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
386
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
387
|
+
*/
|
|
388
|
+
'X-ACCOUNT-ID'?: string;
|
|
389
|
+
/**
|
|
390
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
391
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
392
|
+
* key).
|
|
393
|
+
*/
|
|
394
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
395
|
+
}
|
|
396
|
+
export interface CustomCurrencyUnarchiveParams {
|
|
397
|
+
/**
|
|
398
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
399
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
400
|
+
*/
|
|
401
|
+
'X-ACCOUNT-ID'?: string;
|
|
402
|
+
/**
|
|
403
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
404
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
405
|
+
* key).
|
|
406
|
+
*/
|
|
407
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
335
408
|
}
|
|
336
409
|
export declare namespace CustomCurrencies {
|
|
337
|
-
export { 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, };
|
|
410
|
+
export { 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, };
|
|
338
411
|
}
|
|
339
412
|
//# sourceMappingURL=custom-currencies.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-currencies.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/custom-currencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,qCAAiC;
|
|
1
|
+
{"version":3,"file":"custom-currencies.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/custom-currencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,qCAAiC;AAElG,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAM,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAexG;;;;;;;;;;OAUG;IACH,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAerC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,yCAAyC,EAAE,0BAA0B,CAAC;IAmBrF;;;;;;;;;;;;OAYG;IACH,OAAO,CACL,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,2BAA2B,GAAG,IAAI,GAAG,SAAc,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAcrC;;;;;;;;;;;OAWG;IACH,sBAAsB,CACpB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,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,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,0CAA0C;IACzD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,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"}
|
|
@@ -18,7 +18,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
18
18
|
* });
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
create(
|
|
21
|
+
create(params: CustomCurrencyCreateParams, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Updates an existing custom currency. Only the supplied fields are modified.
|
|
24
24
|
*
|
|
@@ -30,7 +30,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
30
30
|
* );
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
update(currencyID: string,
|
|
33
|
+
update(currencyID: string, params: CustomCurrencyUpdateParams, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
34
34
|
/**
|
|
35
35
|
* Retrieves a paginated list of custom currencies in the environment. Archived
|
|
36
36
|
* currencies are excluded by default; pass `status=ARCHIVED` (or
|
|
@@ -44,7 +44,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
44
44
|
* }
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
list(
|
|
47
|
+
list(params?: CustomCurrencyListParams | null | undefined, options?: RequestOptions): PagePromise<CustomCurrencyListResponsesMyCursorIDPage, CustomCurrencyListResponse>;
|
|
48
48
|
/**
|
|
49
49
|
* Archives a custom currency. Fails if the currency is still associated with any
|
|
50
50
|
* active plan or addon — use the associated-entities endpoint first to inspect
|
|
@@ -58,7 +58,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
58
58
|
* );
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
|
-
archive(currencyID: string, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
61
|
+
archive(currencyID: string, params?: CustomCurrencyArchiveParams | null | undefined, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
62
62
|
/**
|
|
63
63
|
* Lists the active plans and addons that reference a custom currency. Useful
|
|
64
64
|
* before archiving to inspect dependencies.
|
|
@@ -71,7 +71,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
71
71
|
* );
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
|
-
listAssociatedEntities(currencyID: string, options?: RequestOptions): APIPromise<CustomCurrencyListAssociatedEntitiesResponse>;
|
|
74
|
+
listAssociatedEntities(currencyID: string, params?: CustomCurrencyListAssociatedEntitiesParams | null | undefined, options?: RequestOptions): APIPromise<CustomCurrencyListAssociatedEntitiesResponse>;
|
|
75
75
|
/**
|
|
76
76
|
* Restores a previously archived custom currency. Fails if another active currency
|
|
77
77
|
* with the same ID already exists.
|
|
@@ -84,7 +84,7 @@ export declare class CustomCurrencies extends APIResource {
|
|
|
84
84
|
* );
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
|
-
unarchive(currencyID: string, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
87
|
+
unarchive(currencyID: string, params?: CustomCurrencyUnarchiveParams | null | undefined, options?: RequestOptions): APIPromise<CustomCurrencyResponse>;
|
|
88
88
|
}
|
|
89
89
|
export type CustomCurrencyListResponsesMyCursorIDPage = MyCursorIDPage<CustomCurrencyListResponse>;
|
|
90
90
|
/**
|
|
@@ -241,32 +241,43 @@ export declare namespace CustomCurrencyListAssociatedEntitiesResponse {
|
|
|
241
241
|
}
|
|
242
242
|
export interface CustomCurrencyCreateParams {
|
|
243
243
|
/**
|
|
244
|
-
* The unique identifier for the new custom currency
|
|
244
|
+
* Body param: The unique identifier for the new custom currency
|
|
245
245
|
*/
|
|
246
246
|
id: string;
|
|
247
247
|
/**
|
|
248
|
-
* The display name of the custom currency
|
|
248
|
+
* Body param: The display name of the custom currency
|
|
249
249
|
*/
|
|
250
250
|
displayName: string;
|
|
251
251
|
/**
|
|
252
|
-
* Description of the currency
|
|
252
|
+
* Body param: Description of the currency
|
|
253
253
|
*/
|
|
254
254
|
description?: string;
|
|
255
255
|
/**
|
|
256
|
-
* Additional metadata to attach to the custom currency
|
|
256
|
+
* Body param: Additional metadata to attach to the custom currency
|
|
257
257
|
*/
|
|
258
258
|
metadata?: {
|
|
259
259
|
[key: string]: string;
|
|
260
260
|
};
|
|
261
261
|
/**
|
|
262
|
-
* The symbol used to represent the custom currency
|
|
262
|
+
* Body param: The symbol used to represent the custom currency
|
|
263
263
|
*/
|
|
264
264
|
symbol?: string;
|
|
265
265
|
/**
|
|
266
|
-
* Singular and plural unit labels for a custom currency. Both fields
|
|
267
|
-
* when supplied.
|
|
266
|
+
* Body param: Singular and plural unit labels for a custom currency. Both fields
|
|
267
|
+
* are required when supplied.
|
|
268
268
|
*/
|
|
269
269
|
units?: CustomCurrencyCreateParams.Units;
|
|
270
|
+
/**
|
|
271
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
272
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
273
|
+
*/
|
|
274
|
+
'X-ACCOUNT-ID'?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
277
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
278
|
+
* intrinsic to the key).
|
|
279
|
+
*/
|
|
280
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
270
281
|
}
|
|
271
282
|
export declare namespace CustomCurrencyCreateParams {
|
|
272
283
|
/**
|
|
@@ -286,29 +297,41 @@ export declare namespace CustomCurrencyCreateParams {
|
|
|
286
297
|
}
|
|
287
298
|
export interface CustomCurrencyUpdateParams {
|
|
288
299
|
/**
|
|
289
|
-
* A human-readable description of the custom currency. Send an empty
|
|
290
|
-
* clear.
|
|
300
|
+
* Body param: A human-readable description of the custom currency. Send an empty
|
|
301
|
+
* string to clear.
|
|
291
302
|
*/
|
|
292
303
|
description?: string | null;
|
|
293
304
|
/**
|
|
294
|
-
* The display name of the custom currency
|
|
305
|
+
* Body param: The display name of the custom currency
|
|
295
306
|
*/
|
|
296
307
|
displayName?: string;
|
|
297
308
|
/**
|
|
298
|
-
* Additional metadata to attach to the custom currency
|
|
309
|
+
* Body param: Additional metadata to attach to the custom currency
|
|
299
310
|
*/
|
|
300
311
|
metadata?: {
|
|
301
312
|
[key: string]: string;
|
|
302
313
|
} | null;
|
|
303
314
|
/**
|
|
304
|
-
* The symbol used to represent the custom currency. Send an empty
|
|
315
|
+
* Body param: The symbol used to represent the custom currency. Send an empty
|
|
316
|
+
* string to clear.
|
|
305
317
|
*/
|
|
306
318
|
symbol?: string | null;
|
|
307
319
|
/**
|
|
308
|
-
* Singular and plural unit labels for a custom currency. Both fields
|
|
309
|
-
* when supplied.
|
|
320
|
+
* Body param: Singular and plural unit labels for a custom currency. Both fields
|
|
321
|
+
* are required when supplied.
|
|
310
322
|
*/
|
|
311
323
|
units?: CustomCurrencyUpdateParams.Units;
|
|
324
|
+
/**
|
|
325
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
326
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
327
|
+
*/
|
|
328
|
+
'X-ACCOUNT-ID'?: string;
|
|
329
|
+
/**
|
|
330
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
331
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
332
|
+
* intrinsic to the key).
|
|
333
|
+
*/
|
|
334
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
312
335
|
}
|
|
313
336
|
export declare namespace CustomCurrencyUpdateParams {
|
|
314
337
|
/**
|
|
@@ -328,12 +351,62 @@ export declare namespace CustomCurrencyUpdateParams {
|
|
|
328
351
|
}
|
|
329
352
|
export interface CustomCurrencyListParams extends MyCursorIDPageParams {
|
|
330
353
|
/**
|
|
331
|
-
* Filter by custom currency status. Supports comma-separated values
|
|
332
|
-
* `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.
|
|
354
|
+
* Query param: Filter by custom currency status. Supports comma-separated values
|
|
355
|
+
* (e.g., `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.
|
|
333
356
|
*/
|
|
334
357
|
status?: Array<'ACTIVE' | 'ARCHIVED'>;
|
|
358
|
+
/**
|
|
359
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
360
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
361
|
+
*/
|
|
362
|
+
'X-ACCOUNT-ID'?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
365
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
366
|
+
* intrinsic to the key).
|
|
367
|
+
*/
|
|
368
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface CustomCurrencyArchiveParams {
|
|
371
|
+
/**
|
|
372
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
373
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
374
|
+
*/
|
|
375
|
+
'X-ACCOUNT-ID'?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
378
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
379
|
+
* key).
|
|
380
|
+
*/
|
|
381
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
382
|
+
}
|
|
383
|
+
export interface CustomCurrencyListAssociatedEntitiesParams {
|
|
384
|
+
/**
|
|
385
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
386
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
387
|
+
*/
|
|
388
|
+
'X-ACCOUNT-ID'?: string;
|
|
389
|
+
/**
|
|
390
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
391
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
392
|
+
* key).
|
|
393
|
+
*/
|
|
394
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
395
|
+
}
|
|
396
|
+
export interface CustomCurrencyUnarchiveParams {
|
|
397
|
+
/**
|
|
398
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
399
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
400
|
+
*/
|
|
401
|
+
'X-ACCOUNT-ID'?: string;
|
|
402
|
+
/**
|
|
403
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
404
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
405
|
+
* key).
|
|
406
|
+
*/
|
|
407
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
335
408
|
}
|
|
336
409
|
export declare namespace CustomCurrencies {
|
|
337
|
-
export { 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, };
|
|
410
|
+
export { 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, };
|
|
338
411
|
}
|
|
339
412
|
//# sourceMappingURL=custom-currencies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-currencies.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/custom-currencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,oCAAiC;
|
|
1
|
+
{"version":3,"file":"custom-currencies.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/custom-currencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK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,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,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"}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.CustomCurrencies = void 0;
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
7
8
|
const path_1 = require("../../../internal/utils/path.js");
|
|
8
9
|
/**
|
|
9
10
|
* Operations related to custom currencies
|
|
@@ -21,8 +22,19 @@ class CustomCurrencies extends resource_1.APIResource {
|
|
|
21
22
|
* });
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
create(
|
|
25
|
-
|
|
25
|
+
create(params, options) {
|
|
26
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
27
|
+
return this._client.post('/api/v1/credits/custom-currencies', {
|
|
28
|
+
body,
|
|
29
|
+
...options,
|
|
30
|
+
headers: (0, headers_1.buildHeaders)([
|
|
31
|
+
{
|
|
32
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
33
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
34
|
+
},
|
|
35
|
+
options?.headers,
|
|
36
|
+
]),
|
|
37
|
+
});
|
|
26
38
|
}
|
|
27
39
|
/**
|
|
28
40
|
* Updates an existing custom currency. Only the supplied fields are modified.
|
|
@@ -35,8 +47,19 @@ class CustomCurrencies extends resource_1.APIResource {
|
|
|
35
47
|
* );
|
|
36
48
|
* ```
|
|
37
49
|
*/
|
|
38
|
-
update(currencyID,
|
|
39
|
-
|
|
50
|
+
update(currencyID, params, options) {
|
|
51
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
52
|
+
return this._client.patch((0, path_1.path) `/api/v1/credits/custom-currencies/${currencyID}`, {
|
|
53
|
+
body,
|
|
54
|
+
...options,
|
|
55
|
+
headers: (0, headers_1.buildHeaders)([
|
|
56
|
+
{
|
|
57
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
58
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
59
|
+
},
|
|
60
|
+
options?.headers,
|
|
61
|
+
]),
|
|
62
|
+
});
|
|
40
63
|
}
|
|
41
64
|
/**
|
|
42
65
|
* Retrieves a paginated list of custom currencies in the environment. Archived
|
|
@@ -51,8 +74,19 @@ class CustomCurrencies extends resource_1.APIResource {
|
|
|
51
74
|
* }
|
|
52
75
|
* ```
|
|
53
76
|
*/
|
|
54
|
-
list(
|
|
55
|
-
|
|
77
|
+
list(params = {}, options) {
|
|
78
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
79
|
+
return this._client.getAPIList('/api/v1/credits/custom-currencies', (pagination_1.MyCursorIDPage), {
|
|
80
|
+
query,
|
|
81
|
+
...options,
|
|
82
|
+
headers: (0, headers_1.buildHeaders)([
|
|
83
|
+
{
|
|
84
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
85
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
86
|
+
},
|
|
87
|
+
options?.headers,
|
|
88
|
+
]),
|
|
89
|
+
});
|
|
56
90
|
}
|
|
57
91
|
/**
|
|
58
92
|
* Archives a custom currency. Fails if the currency is still associated with any
|
|
@@ -67,8 +101,18 @@ class CustomCurrencies extends resource_1.APIResource {
|
|
|
67
101
|
* );
|
|
68
102
|
* ```
|
|
69
103
|
*/
|
|
70
|
-
archive(currencyID, options) {
|
|
71
|
-
|
|
104
|
+
archive(currencyID, params = {}, options) {
|
|
105
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
106
|
+
return this._client.post((0, path_1.path) `/api/v1/credits/custom-currencies/${currencyID}/archive`, {
|
|
107
|
+
...options,
|
|
108
|
+
headers: (0, headers_1.buildHeaders)([
|
|
109
|
+
{
|
|
110
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
111
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
112
|
+
},
|
|
113
|
+
options?.headers,
|
|
114
|
+
]),
|
|
115
|
+
});
|
|
72
116
|
}
|
|
73
117
|
/**
|
|
74
118
|
* Lists the active plans and addons that reference a custom currency. Useful
|
|
@@ -82,8 +126,18 @@ class CustomCurrencies extends resource_1.APIResource {
|
|
|
82
126
|
* );
|
|
83
127
|
* ```
|
|
84
128
|
*/
|
|
85
|
-
listAssociatedEntities(currencyID, options) {
|
|
86
|
-
|
|
129
|
+
listAssociatedEntities(currencyID, params = {}, options) {
|
|
130
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
131
|
+
return this._client.get((0, path_1.path) `/api/v1/credits/custom-currencies/${currencyID}/associated-entities`, {
|
|
132
|
+
...options,
|
|
133
|
+
headers: (0, headers_1.buildHeaders)([
|
|
134
|
+
{
|
|
135
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
136
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
137
|
+
},
|
|
138
|
+
options?.headers,
|
|
139
|
+
]),
|
|
140
|
+
});
|
|
87
141
|
}
|
|
88
142
|
/**
|
|
89
143
|
* Restores a previously archived custom currency. Fails if another active currency
|
|
@@ -97,8 +151,18 @@ class CustomCurrencies extends resource_1.APIResource {
|
|
|
97
151
|
* );
|
|
98
152
|
* ```
|
|
99
153
|
*/
|
|
100
|
-
unarchive(currencyID, options) {
|
|
101
|
-
|
|
154
|
+
unarchive(currencyID, params = {}, options) {
|
|
155
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
156
|
+
return this._client.post((0, path_1.path) `/api/v1/credits/custom-currencies/${currencyID}/unarchive`, {
|
|
157
|
+
...options,
|
|
158
|
+
headers: (0, headers_1.buildHeaders)([
|
|
159
|
+
{
|
|
160
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
161
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
162
|
+
},
|
|
163
|
+
options?.headers,
|
|
164
|
+
]),
|
|
165
|
+
});
|
|
102
166
|
}
|
|
103
167
|
}
|
|
104
168
|
exports.CustomCurrencies = CustomCurrencies;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-currencies.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/custom-currencies.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAAkG;
|
|
1
|
+
{"version":3,"file":"custom-currencies.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/custom-currencies.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAAk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