@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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
5
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
8
9
|
|
|
@@ -20,8 +21,22 @@ export class Features extends APIResource {
|
|
|
20
21
|
* );
|
|
21
22
|
* ```
|
|
22
23
|
*/
|
|
23
|
-
archiveFeature(
|
|
24
|
-
|
|
24
|
+
archiveFeature(
|
|
25
|
+
id: string,
|
|
26
|
+
params: FeatureArchiveFeatureParams | null | undefined = {},
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): APIPromise<Feature> {
|
|
29
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
30
|
+
return this._client.post(path`/api/v1/features/${id}/archive`, {
|
|
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
|
+
});
|
|
25
40
|
}
|
|
26
41
|
|
|
27
42
|
/**
|
|
@@ -36,8 +51,19 @@ export class Features extends APIResource {
|
|
|
36
51
|
* });
|
|
37
52
|
* ```
|
|
38
53
|
*/
|
|
39
|
-
createFeature(
|
|
40
|
-
|
|
54
|
+
createFeature(params: FeatureCreateFeatureParams, options?: RequestOptions): APIPromise<Feature> {
|
|
55
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
56
|
+
return this._client.post('/api/v1/features', {
|
|
57
|
+
body,
|
|
58
|
+
...options,
|
|
59
|
+
headers: buildHeaders([
|
|
60
|
+
{
|
|
61
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
62
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
63
|
+
},
|
|
64
|
+
options?.headers,
|
|
65
|
+
]),
|
|
66
|
+
});
|
|
41
67
|
}
|
|
42
68
|
|
|
43
69
|
/**
|
|
@@ -52,12 +78,20 @@ export class Features extends APIResource {
|
|
|
52
78
|
* ```
|
|
53
79
|
*/
|
|
54
80
|
listFeatures(
|
|
55
|
-
|
|
81
|
+
params: FeatureListFeaturesParams | null | undefined = {},
|
|
56
82
|
options?: RequestOptions,
|
|
57
83
|
): PagePromise<FeatureListFeaturesResponsesMyCursorIDPage, FeatureListFeaturesResponse> {
|
|
84
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
58
85
|
return this._client.getAPIList('/api/v1/features', MyCursorIDPage<FeatureListFeaturesResponse>, {
|
|
59
86
|
query,
|
|
60
87
|
...options,
|
|
88
|
+
headers: buildHeaders([
|
|
89
|
+
{
|
|
90
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
91
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
92
|
+
},
|
|
93
|
+
options?.headers,
|
|
94
|
+
]),
|
|
61
95
|
});
|
|
62
96
|
}
|
|
63
97
|
|
|
@@ -71,8 +105,22 @@ export class Features extends APIResource {
|
|
|
71
105
|
* );
|
|
72
106
|
* ```
|
|
73
107
|
*/
|
|
74
|
-
retrieveFeature(
|
|
75
|
-
|
|
108
|
+
retrieveFeature(
|
|
109
|
+
id: string,
|
|
110
|
+
params: FeatureRetrieveFeatureParams | null | undefined = {},
|
|
111
|
+
options?: RequestOptions,
|
|
112
|
+
): APIPromise<Feature> {
|
|
113
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
114
|
+
return this._client.get(path`/api/v1/features/${id}`, {
|
|
115
|
+
...options,
|
|
116
|
+
headers: buildHeaders([
|
|
117
|
+
{
|
|
118
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
119
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
120
|
+
},
|
|
121
|
+
options?.headers,
|
|
122
|
+
]),
|
|
123
|
+
});
|
|
76
124
|
}
|
|
77
125
|
|
|
78
126
|
/**
|
|
@@ -85,8 +133,22 @@ export class Features extends APIResource {
|
|
|
85
133
|
* );
|
|
86
134
|
* ```
|
|
87
135
|
*/
|
|
88
|
-
unarchiveFeature(
|
|
89
|
-
|
|
136
|
+
unarchiveFeature(
|
|
137
|
+
id: string,
|
|
138
|
+
params: FeatureUnarchiveFeatureParams | null | undefined = {},
|
|
139
|
+
options?: RequestOptions,
|
|
140
|
+
): APIPromise<Feature> {
|
|
141
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
142
|
+
return this._client.post(path`/api/v1/features/${id}/unarchive`, {
|
|
143
|
+
...options,
|
|
144
|
+
headers: buildHeaders([
|
|
145
|
+
{
|
|
146
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
147
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
148
|
+
},
|
|
149
|
+
options?.headers,
|
|
150
|
+
]),
|
|
151
|
+
});
|
|
90
152
|
}
|
|
91
153
|
|
|
92
154
|
/**
|
|
@@ -98,8 +160,23 @@ export class Features extends APIResource {
|
|
|
98
160
|
* const feature = await client.v1.features.updateFeature('x');
|
|
99
161
|
* ```
|
|
100
162
|
*/
|
|
101
|
-
updateFeature(
|
|
102
|
-
|
|
163
|
+
updateFeature(
|
|
164
|
+
id: string,
|
|
165
|
+
params: FeatureUpdateFeatureParams,
|
|
166
|
+
options?: RequestOptions,
|
|
167
|
+
): APIPromise<Feature> {
|
|
168
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
169
|
+
return this._client.patch(path`/api/v1/features/${id}`, {
|
|
170
|
+
body,
|
|
171
|
+
...options,
|
|
172
|
+
headers: buildHeaders([
|
|
173
|
+
{
|
|
174
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
175
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
176
|
+
},
|
|
177
|
+
options?.headers,
|
|
178
|
+
]),
|
|
179
|
+
});
|
|
103
180
|
}
|
|
104
181
|
}
|
|
105
182
|
|
|
@@ -335,61 +412,89 @@ export namespace FeatureListFeaturesResponse {
|
|
|
335
412
|
}
|
|
336
413
|
}
|
|
337
414
|
|
|
415
|
+
export interface FeatureArchiveFeatureParams {
|
|
416
|
+
/**
|
|
417
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
418
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
419
|
+
*/
|
|
420
|
+
'X-ACCOUNT-ID'?: string;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
424
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
425
|
+
* key).
|
|
426
|
+
*/
|
|
427
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
338
430
|
export interface FeatureCreateFeatureParams {
|
|
339
431
|
/**
|
|
340
|
-
* The unique identifier for the feature
|
|
432
|
+
* Body param: The unique identifier for the feature
|
|
341
433
|
*/
|
|
342
434
|
id: string;
|
|
343
435
|
|
|
344
436
|
/**
|
|
345
|
-
* The display name for the feature
|
|
437
|
+
* Body param: The display name for the feature
|
|
346
438
|
*/
|
|
347
439
|
displayName: string;
|
|
348
440
|
|
|
349
441
|
/**
|
|
350
|
-
* The type of the feature
|
|
442
|
+
* Body param: The type of the feature
|
|
351
443
|
*/
|
|
352
444
|
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
353
445
|
|
|
354
446
|
/**
|
|
355
|
-
* The description for the feature
|
|
447
|
+
* Body param: The description for the feature
|
|
356
448
|
*/
|
|
357
449
|
description?: string;
|
|
358
450
|
|
|
359
451
|
/**
|
|
360
|
-
* The configuration data for the feature
|
|
452
|
+
* Body param: The configuration data for the feature
|
|
361
453
|
*/
|
|
362
454
|
enumConfiguration?: Array<FeatureCreateFeatureParams.EnumConfiguration>;
|
|
363
455
|
|
|
364
456
|
/**
|
|
365
|
-
* The status of the feature
|
|
457
|
+
* Body param: The status of the feature
|
|
366
458
|
*/
|
|
367
459
|
featureStatus?: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
368
460
|
|
|
369
461
|
/**
|
|
370
|
-
* The units for the feature
|
|
462
|
+
* Body param: The units for the feature
|
|
371
463
|
*/
|
|
372
464
|
featureUnits?: string;
|
|
373
465
|
|
|
374
466
|
/**
|
|
375
|
-
* The plural units for the feature
|
|
467
|
+
* Body param: The plural units for the feature
|
|
376
468
|
*/
|
|
377
469
|
featureUnitsPlural?: string;
|
|
378
470
|
|
|
379
471
|
/**
|
|
380
|
-
* The additional metadata for the feature
|
|
472
|
+
* Body param: The additional metadata for the feature
|
|
381
473
|
*/
|
|
382
474
|
metadata?: { [key: string]: string };
|
|
383
475
|
|
|
384
476
|
/**
|
|
385
|
-
* The meter type for the feature
|
|
477
|
+
* Body param: The meter type for the feature
|
|
386
478
|
*/
|
|
387
479
|
meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
|
|
388
480
|
|
|
389
481
|
/**
|
|
390
|
-
* Unit transformation to be applied to the reported usage
|
|
482
|
+
* Body param: Unit transformation to be applied to the reported usage
|
|
391
483
|
*/
|
|
392
484
|
unitTransformation?: FeatureCreateFeatureParams.UnitTransformation | null;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
488
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
489
|
+
*/
|
|
490
|
+
'X-ACCOUNT-ID'?: string;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
494
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
495
|
+
* intrinsic to the key).
|
|
496
|
+
*/
|
|
497
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
393
498
|
}
|
|
394
499
|
|
|
395
500
|
export namespace FeatureCreateFeatureParams {
|
|
@@ -433,29 +538,45 @@ export namespace FeatureCreateFeatureParams {
|
|
|
433
538
|
|
|
434
539
|
export interface FeatureListFeaturesParams extends MyCursorIDPageParams {
|
|
435
540
|
/**
|
|
436
|
-
* Filter by entity ID
|
|
541
|
+
* Query param: Filter by entity ID
|
|
437
542
|
*/
|
|
438
543
|
id?: string;
|
|
439
544
|
|
|
440
545
|
/**
|
|
441
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
546
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
442
547
|
*/
|
|
443
548
|
createdAt?: FeatureListFeaturesParams.CreatedAt;
|
|
444
549
|
|
|
445
550
|
/**
|
|
446
|
-
* Filter by feature type. Supports comma-separated values for
|
|
551
|
+
* Query param: Filter by feature type. Supports comma-separated values for
|
|
552
|
+
* multiple types
|
|
447
553
|
*/
|
|
448
554
|
featureType?: Array<'BOOLEAN' | 'NUMBER' | 'ENUM'>;
|
|
449
555
|
|
|
450
556
|
/**
|
|
451
|
-
* Filter by meter type. Supports comma-separated values for multiple
|
|
557
|
+
* Query param: Filter by meter type. Supports comma-separated values for multiple
|
|
558
|
+
* types
|
|
452
559
|
*/
|
|
453
560
|
meterType?: Array<'None' | 'FLUCTUATING' | 'INCREMENTAL'>;
|
|
454
561
|
|
|
455
562
|
/**
|
|
456
|
-
* Filter by feature status. Supports comma-separated values for
|
|
563
|
+
* Query param: Filter by feature status. Supports comma-separated values for
|
|
564
|
+
* multiple statuses
|
|
457
565
|
*/
|
|
458
566
|
status?: Array<'NEW' | 'SUSPENDED' | 'ACTIVE'>;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
570
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
571
|
+
*/
|
|
572
|
+
'X-ACCOUNT-ID'?: string;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
576
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
577
|
+
* intrinsic to the key).
|
|
578
|
+
*/
|
|
579
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
459
580
|
}
|
|
460
581
|
|
|
461
582
|
export namespace FeatureListFeaturesParams {
|
|
@@ -485,43 +606,89 @@ export namespace FeatureListFeaturesParams {
|
|
|
485
606
|
}
|
|
486
607
|
}
|
|
487
608
|
|
|
609
|
+
export interface FeatureRetrieveFeatureParams {
|
|
610
|
+
/**
|
|
611
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
612
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
613
|
+
*/
|
|
614
|
+
'X-ACCOUNT-ID'?: string;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
618
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
619
|
+
* key).
|
|
620
|
+
*/
|
|
621
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export interface FeatureUnarchiveFeatureParams {
|
|
625
|
+
/**
|
|
626
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
627
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
628
|
+
*/
|
|
629
|
+
'X-ACCOUNT-ID'?: string;
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
633
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
634
|
+
* key).
|
|
635
|
+
*/
|
|
636
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
637
|
+
}
|
|
638
|
+
|
|
488
639
|
export interface FeatureUpdateFeatureParams {
|
|
489
640
|
/**
|
|
490
|
-
* The description for the feature
|
|
641
|
+
* Body param: The description for the feature
|
|
491
642
|
*/
|
|
492
643
|
description?: string;
|
|
493
644
|
|
|
494
645
|
/**
|
|
495
|
-
* The display name for the feature
|
|
646
|
+
* Body param: The display name for the feature
|
|
496
647
|
*/
|
|
497
648
|
displayName?: string;
|
|
498
649
|
|
|
499
650
|
/**
|
|
500
|
-
* The configuration data for the feature
|
|
651
|
+
* Body param: The configuration data for the feature
|
|
501
652
|
*/
|
|
502
653
|
enumConfiguration?: Array<FeatureUpdateFeatureParams.EnumConfiguration>;
|
|
503
654
|
|
|
504
655
|
/**
|
|
505
|
-
* The units for the feature
|
|
656
|
+
* Body param: The units for the feature
|
|
506
657
|
*/
|
|
507
658
|
featureUnits?: string;
|
|
508
659
|
|
|
509
660
|
/**
|
|
510
|
-
* The plural units for the feature
|
|
661
|
+
* Body param: The plural units for the feature
|
|
511
662
|
*/
|
|
512
663
|
featureUnitsPlural?: string;
|
|
513
664
|
|
|
514
665
|
/**
|
|
515
|
-
* The additional metadata for the feature
|
|
666
|
+
* Body param: The additional metadata for the feature
|
|
516
667
|
*/
|
|
517
668
|
metadata?: { [key: string]: string };
|
|
518
669
|
|
|
670
|
+
/**
|
|
671
|
+
* Body param
|
|
672
|
+
*/
|
|
519
673
|
meter?: FeatureUpdateFeatureParams.Meter;
|
|
520
674
|
|
|
521
675
|
/**
|
|
522
|
-
* Unit transformation to be applied to the reported usage
|
|
676
|
+
* Body param: Unit transformation to be applied to the reported usage
|
|
523
677
|
*/
|
|
524
678
|
unitTransformation?: FeatureUpdateFeatureParams.UnitTransformation | null;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
682
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
683
|
+
*/
|
|
684
|
+
'X-ACCOUNT-ID'?: string;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
688
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
689
|
+
* intrinsic to the key).
|
|
690
|
+
*/
|
|
691
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
525
692
|
}
|
|
526
693
|
|
|
527
694
|
export namespace FeatureUpdateFeatureParams {
|
|
@@ -619,8 +786,11 @@ export declare namespace Features {
|
|
|
619
786
|
type Feature as Feature,
|
|
620
787
|
type FeatureListFeaturesResponse as FeatureListFeaturesResponse,
|
|
621
788
|
type FeatureListFeaturesResponsesMyCursorIDPage as FeatureListFeaturesResponsesMyCursorIDPage,
|
|
789
|
+
type FeatureArchiveFeatureParams as FeatureArchiveFeatureParams,
|
|
622
790
|
type FeatureCreateFeatureParams as FeatureCreateFeatureParams,
|
|
623
791
|
type FeatureListFeaturesParams as FeatureListFeaturesParams,
|
|
792
|
+
type FeatureRetrieveFeatureParams as FeatureRetrieveFeatureParams,
|
|
793
|
+
type FeatureUnarchiveFeatureParams as FeatureUnarchiveFeatureParams,
|
|
624
794
|
type FeatureUpdateFeatureParams as FeatureUpdateFeatureParams,
|
|
625
795
|
};
|
|
626
796
|
}
|
|
@@ -8,10 +8,14 @@ export {
|
|
|
8
8
|
type AddonPublishResponse,
|
|
9
9
|
type AddonRemoveDraftResponse,
|
|
10
10
|
type AddonCreateParams,
|
|
11
|
+
type AddonRetrieveParams,
|
|
11
12
|
type AddonUpdateParams,
|
|
12
13
|
type AddonListParams,
|
|
14
|
+
type AddonArchiveParams,
|
|
15
|
+
type AddonCreateDraftParams,
|
|
13
16
|
type AddonListChargesParams,
|
|
14
17
|
type AddonPublishParams,
|
|
18
|
+
type AddonRemoveDraftParams,
|
|
15
19
|
type AddonListResponsesMyCursorIDPage,
|
|
16
20
|
type AddonListChargesResponsesMyCursorIDPage,
|
|
17
21
|
} from './addons/index';
|
|
@@ -20,7 +24,9 @@ export {
|
|
|
20
24
|
type Coupon,
|
|
21
25
|
type CouponListResponse,
|
|
22
26
|
type CouponCreateParams,
|
|
27
|
+
type CouponRetrieveParams,
|
|
23
28
|
type CouponListParams,
|
|
29
|
+
type CouponArchiveCouponParams,
|
|
24
30
|
type CouponUpdateCouponParams,
|
|
25
31
|
type CouponListResponsesMyCursorIDPage,
|
|
26
32
|
} from './coupons';
|
|
@@ -43,13 +49,16 @@ export {
|
|
|
43
49
|
type CustomerImportResponse,
|
|
44
50
|
type CustomerListResourcesResponse,
|
|
45
51
|
type CustomerRetrieveEntitlementsResponse,
|
|
52
|
+
type CustomerRetrieveParams,
|
|
46
53
|
type CustomerUpdateParams,
|
|
47
54
|
type CustomerListParams,
|
|
55
|
+
type CustomerArchiveParams,
|
|
48
56
|
type CustomerCheckEntitlementParams,
|
|
49
57
|
type CustomerImportParams,
|
|
50
58
|
type CustomerListResourcesParams,
|
|
51
59
|
type CustomerProvisionParams,
|
|
52
60
|
type CustomerRetrieveEntitlementsParams,
|
|
61
|
+
type CustomerUnarchiveParams,
|
|
53
62
|
type CustomerListResponsesMyCursorIDPage,
|
|
54
63
|
type CustomerListResourcesResponsesMyCursorIDPage,
|
|
55
64
|
} from './customers/index';
|
|
@@ -58,8 +67,11 @@ export {
|
|
|
58
67
|
Features,
|
|
59
68
|
type Feature,
|
|
60
69
|
type FeatureListFeaturesResponse,
|
|
70
|
+
type FeatureArchiveFeatureParams,
|
|
61
71
|
type FeatureCreateFeatureParams,
|
|
62
72
|
type FeatureListFeaturesParams,
|
|
73
|
+
type FeatureRetrieveFeatureParams,
|
|
74
|
+
type FeatureUnarchiveFeatureParams,
|
|
63
75
|
type FeatureUpdateFeatureParams,
|
|
64
76
|
type FeatureListFeaturesResponsesMyCursorIDPage,
|
|
65
77
|
} from './features';
|
|
@@ -72,11 +84,15 @@ export {
|
|
|
72
84
|
type PlanPublishResponse,
|
|
73
85
|
type PlanRemoveDraftResponse,
|
|
74
86
|
type PlanCreateParams,
|
|
87
|
+
type PlanRetrieveParams,
|
|
75
88
|
type PlanUpdateParams,
|
|
76
89
|
type PlanListParams,
|
|
90
|
+
type PlanArchiveParams,
|
|
91
|
+
type PlanCreateDraftParams,
|
|
77
92
|
type PlanListChargesParams,
|
|
78
93
|
type PlanListOverageChargesParams,
|
|
79
94
|
type PlanPublishParams,
|
|
95
|
+
type PlanRemoveDraftParams,
|
|
80
96
|
type PlanListResponsesMyCursorIDPage,
|
|
81
97
|
type PlanListChargesResponsesMyCursorIDPage,
|
|
82
98
|
type PlanListOverageChargesResponsesMyCursorIDPage,
|
|
@@ -85,9 +101,11 @@ export {
|
|
|
85
101
|
Products,
|
|
86
102
|
type Product,
|
|
87
103
|
type ProductListProductsResponse,
|
|
104
|
+
type ProductArchiveProductParams,
|
|
88
105
|
type ProductCreateProductParams,
|
|
89
106
|
type ProductDuplicateProductParams,
|
|
90
107
|
type ProductListProductsParams,
|
|
108
|
+
type ProductUnarchiveProductParams,
|
|
91
109
|
type ProductUpdateProductParams,
|
|
92
110
|
type ProductListProductsResponsesMyCursorIDPage,
|
|
93
111
|
} from './products';
|
|
@@ -98,6 +116,7 @@ export {
|
|
|
98
116
|
type SubscriptionImportResponse,
|
|
99
117
|
type SubscriptionPreviewResponse,
|
|
100
118
|
type SubscriptionProvisionResponse,
|
|
119
|
+
type SubscriptionRetrieveParams,
|
|
101
120
|
type SubscriptionUpdateParams,
|
|
102
121
|
type SubscriptionListParams,
|
|
103
122
|
type SubscriptionCancelParams,
|