@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
package/resources/v1/products.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Products = 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 products
|
|
@@ -20,8 +21,18 @@ class Products extends resource_1.APIResource {
|
|
|
20
21
|
* );
|
|
21
22
|
* ```
|
|
22
23
|
*/
|
|
23
|
-
archiveProduct(id, options) {
|
|
24
|
-
|
|
24
|
+
archiveProduct(id, params = {}, options) {
|
|
25
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
26
|
+
return this._client.post((0, path_1.path) `/api/v1/products/${id}/archive`, {
|
|
27
|
+
...options,
|
|
28
|
+
headers: (0, headers_1.buildHeaders)([
|
|
29
|
+
{
|
|
30
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
31
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
32
|
+
},
|
|
33
|
+
options?.headers,
|
|
34
|
+
]),
|
|
35
|
+
});
|
|
25
36
|
}
|
|
26
37
|
/**
|
|
27
38
|
* Creates a new product.
|
|
@@ -34,8 +45,19 @@ class Products extends resource_1.APIResource {
|
|
|
34
45
|
* });
|
|
35
46
|
* ```
|
|
36
47
|
*/
|
|
37
|
-
createProduct(
|
|
38
|
-
|
|
48
|
+
createProduct(params, options) {
|
|
49
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
50
|
+
return this._client.post('/api/v1/products', {
|
|
51
|
+
body,
|
|
52
|
+
...options,
|
|
53
|
+
headers: (0, headers_1.buildHeaders)([
|
|
54
|
+
{
|
|
55
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
56
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
57
|
+
},
|
|
58
|
+
options?.headers,
|
|
59
|
+
]),
|
|
60
|
+
});
|
|
39
61
|
}
|
|
40
62
|
/**
|
|
41
63
|
* Duplicates an existing product, including its plans, addons, and configuration.
|
|
@@ -48,8 +70,19 @@ class Products extends resource_1.APIResource {
|
|
|
48
70
|
* );
|
|
49
71
|
* ```
|
|
50
72
|
*/
|
|
51
|
-
duplicateProduct(id,
|
|
52
|
-
|
|
73
|
+
duplicateProduct(id, params, options) {
|
|
74
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
75
|
+
return this._client.post((0, path_1.path) `/api/v1/products/${id}/duplicate`, {
|
|
76
|
+
body,
|
|
77
|
+
...options,
|
|
78
|
+
headers: (0, headers_1.buildHeaders)([
|
|
79
|
+
{
|
|
80
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
81
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
82
|
+
},
|
|
83
|
+
options?.headers,
|
|
84
|
+
]),
|
|
85
|
+
});
|
|
53
86
|
}
|
|
54
87
|
/**
|
|
55
88
|
* Retrieves a paginated list of products in the environment.
|
|
@@ -62,10 +95,18 @@ class Products extends resource_1.APIResource {
|
|
|
62
95
|
* }
|
|
63
96
|
* ```
|
|
64
97
|
*/
|
|
65
|
-
listProducts(
|
|
98
|
+
listProducts(params = {}, options) {
|
|
99
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
66
100
|
return this._client.getAPIList('/api/v1/products', (pagination_1.MyCursorIDPage), {
|
|
67
101
|
query,
|
|
68
102
|
...options,
|
|
103
|
+
headers: (0, headers_1.buildHeaders)([
|
|
104
|
+
{
|
|
105
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
106
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
107
|
+
},
|
|
108
|
+
options?.headers,
|
|
109
|
+
]),
|
|
69
110
|
});
|
|
70
111
|
}
|
|
71
112
|
/**
|
|
@@ -78,8 +119,18 @@ class Products extends resource_1.APIResource {
|
|
|
78
119
|
* );
|
|
79
120
|
* ```
|
|
80
121
|
*/
|
|
81
|
-
unarchiveProduct(id, options) {
|
|
82
|
-
|
|
122
|
+
unarchiveProduct(id, params = {}, options) {
|
|
123
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
124
|
+
return this._client.post((0, path_1.path) `/api/v1/products/${id}/unarchive`, {
|
|
125
|
+
...options,
|
|
126
|
+
headers: (0, headers_1.buildHeaders)([
|
|
127
|
+
{
|
|
128
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
129
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
130
|
+
},
|
|
131
|
+
options?.headers,
|
|
132
|
+
]),
|
|
133
|
+
});
|
|
83
134
|
}
|
|
84
135
|
/**
|
|
85
136
|
* Updates an existing product's properties such as display name, description, and
|
|
@@ -90,8 +141,19 @@ class Products extends resource_1.APIResource {
|
|
|
90
141
|
* const product = await client.v1.products.updateProduct('x');
|
|
91
142
|
* ```
|
|
92
143
|
*/
|
|
93
|
-
updateProduct(id,
|
|
94
|
-
|
|
144
|
+
updateProduct(id, params, options) {
|
|
145
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
146
|
+
return this._client.patch((0, path_1.path) `/api/v1/products/${id}`, {
|
|
147
|
+
body,
|
|
148
|
+
...options,
|
|
149
|
+
headers: (0, headers_1.buildHeaders)([
|
|
150
|
+
{
|
|
151
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
152
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
153
|
+
},
|
|
154
|
+
options?.headers,
|
|
155
|
+
]),
|
|
156
|
+
});
|
|
95
157
|
}
|
|
96
158
|
}
|
|
97
159
|
exports.Products = Products;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/resources/v1/products.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA+F;
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/resources/v1/products.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA+F;AAC/F,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;OAUG;IACH,cAAc,CACZ,EAAU,EACV,SAAyD,EAAE,EAC3D,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,UAAU,EAAE;YAC7D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EA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E,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,aAAa,CACX,EAAU,EACV,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3F,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE;YACtD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA1KD,4BA0KC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import { MyCursorIDPage } from "../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
5
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
6
|
/**
|
|
6
7
|
* Operations related to products
|
|
@@ -17,8 +18,18 @@ export class Products extends APIResource {
|
|
|
17
18
|
* );
|
|
18
19
|
* ```
|
|
19
20
|
*/
|
|
20
|
-
archiveProduct(id, options) {
|
|
21
|
-
|
|
21
|
+
archiveProduct(id, params = {}, options) {
|
|
22
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
23
|
+
return this._client.post(path `/api/v1/products/${id}/archive`, {
|
|
24
|
+
...options,
|
|
25
|
+
headers: buildHeaders([
|
|
26
|
+
{
|
|
27
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
28
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
29
|
+
},
|
|
30
|
+
options?.headers,
|
|
31
|
+
]),
|
|
32
|
+
});
|
|
22
33
|
}
|
|
23
34
|
/**
|
|
24
35
|
* Creates a new product.
|
|
@@ -31,8 +42,19 @@ export class Products extends APIResource {
|
|
|
31
42
|
* });
|
|
32
43
|
* ```
|
|
33
44
|
*/
|
|
34
|
-
createProduct(
|
|
35
|
-
|
|
45
|
+
createProduct(params, options) {
|
|
46
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
47
|
+
return this._client.post('/api/v1/products', {
|
|
48
|
+
body,
|
|
49
|
+
...options,
|
|
50
|
+
headers: buildHeaders([
|
|
51
|
+
{
|
|
52
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
53
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
54
|
+
},
|
|
55
|
+
options?.headers,
|
|
56
|
+
]),
|
|
57
|
+
});
|
|
36
58
|
}
|
|
37
59
|
/**
|
|
38
60
|
* Duplicates an existing product, including its plans, addons, and configuration.
|
|
@@ -45,8 +67,19 @@ export class Products extends APIResource {
|
|
|
45
67
|
* );
|
|
46
68
|
* ```
|
|
47
69
|
*/
|
|
48
|
-
duplicateProduct(id,
|
|
49
|
-
|
|
70
|
+
duplicateProduct(id, params, options) {
|
|
71
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
72
|
+
return this._client.post(path `/api/v1/products/${id}/duplicate`, {
|
|
73
|
+
body,
|
|
74
|
+
...options,
|
|
75
|
+
headers: buildHeaders([
|
|
76
|
+
{
|
|
77
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
78
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
79
|
+
},
|
|
80
|
+
options?.headers,
|
|
81
|
+
]),
|
|
82
|
+
});
|
|
50
83
|
}
|
|
51
84
|
/**
|
|
52
85
|
* Retrieves a paginated list of products in the environment.
|
|
@@ -59,10 +92,18 @@ export class Products extends APIResource {
|
|
|
59
92
|
* }
|
|
60
93
|
* ```
|
|
61
94
|
*/
|
|
62
|
-
listProducts(
|
|
95
|
+
listProducts(params = {}, options) {
|
|
96
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
63
97
|
return this._client.getAPIList('/api/v1/products', (MyCursorIDPage), {
|
|
64
98
|
query,
|
|
65
99
|
...options,
|
|
100
|
+
headers: buildHeaders([
|
|
101
|
+
{
|
|
102
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
103
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
104
|
+
},
|
|
105
|
+
options?.headers,
|
|
106
|
+
]),
|
|
66
107
|
});
|
|
67
108
|
}
|
|
68
109
|
/**
|
|
@@ -75,8 +116,18 @@ export class Products extends APIResource {
|
|
|
75
116
|
* );
|
|
76
117
|
* ```
|
|
77
118
|
*/
|
|
78
|
-
unarchiveProduct(id, options) {
|
|
79
|
-
|
|
119
|
+
unarchiveProduct(id, params = {}, options) {
|
|
120
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
121
|
+
return this._client.post(path `/api/v1/products/${id}/unarchive`, {
|
|
122
|
+
...options,
|
|
123
|
+
headers: buildHeaders([
|
|
124
|
+
{
|
|
125
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
126
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
127
|
+
},
|
|
128
|
+
options?.headers,
|
|
129
|
+
]),
|
|
130
|
+
});
|
|
80
131
|
}
|
|
81
132
|
/**
|
|
82
133
|
* Updates an existing product's properties such as display name, description, and
|
|
@@ -87,8 +138,19 @@ export class Products extends APIResource {
|
|
|
87
138
|
* const product = await client.v1.products.updateProduct('x');
|
|
88
139
|
* ```
|
|
89
140
|
*/
|
|
90
|
-
updateProduct(id,
|
|
91
|
-
|
|
141
|
+
updateProduct(id, params, options) {
|
|
142
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
143
|
+
return this._client.patch(path `/api/v1/products/${id}`, {
|
|
144
|
+
body,
|
|
145
|
+
...options,
|
|
146
|
+
headers: buildHeaders([
|
|
147
|
+
{
|
|
148
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
149
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
150
|
+
},
|
|
151
|
+
options?.headers,
|
|
152
|
+
]),
|
|
153
|
+
});
|
|
92
154
|
}
|
|
93
155
|
}
|
|
94
156
|
//# sourceMappingURL=products.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.mjs","sourceRoot":"","sources":["../../src/resources/v1/products.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,cAAc,EAA0C,kCAA8B;
|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OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -16,7 +16,7 @@ export declare class FutureUpdate extends APIResource {
|
|
|
16
16
|
* );
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
cancelPendingPayment(id: string, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
19
|
+
cancelPendingPayment(id: string, params?: FutureUpdateCancelPendingPaymentParams | null | undefined, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
20
20
|
/**
|
|
21
21
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
22
22
|
* change.
|
|
@@ -29,7 +29,7 @@ export declare class FutureUpdate extends APIResource {
|
|
|
29
29
|
* );
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
cancelSchedule(id: string, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
32
|
+
cancelSchedule(id: string, params?: FutureUpdateCancelScheduleParams | null | undefined, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Response object
|
|
@@ -45,7 +45,33 @@ export declare namespace CancelSubscription {
|
|
|
45
45
|
id: string;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
export interface FutureUpdateCancelPendingPaymentParams {
|
|
49
|
+
/**
|
|
50
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
51
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
52
|
+
*/
|
|
53
|
+
'X-ACCOUNT-ID'?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
56
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
57
|
+
* key).
|
|
58
|
+
*/
|
|
59
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface FutureUpdateCancelScheduleParams {
|
|
62
|
+
/**
|
|
63
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
64
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
65
|
+
*/
|
|
66
|
+
'X-ACCOUNT-ID'?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
69
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
70
|
+
* key).
|
|
71
|
+
*/
|
|
72
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
73
|
+
}
|
|
48
74
|
export declare namespace FutureUpdate {
|
|
49
|
-
export { type CancelSubscription as CancelSubscription };
|
|
75
|
+
export { type CancelSubscription as CancelSubscription, type FutureUpdateCancelPendingPaymentParams as FutureUpdateCancelPendingPaymentParams, type FutureUpdateCancelScheduleParams as FutureUpdateCancelScheduleParams, };
|
|
50
76
|
}
|
|
51
77
|
//# sourceMappingURL=future-update.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-update.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;
|
|
1
|
+
{"version":3,"file":"future-update.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,sCAAsC,GAAG,IAAI,GAAG,SAAc,EACtE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAcjC;;;;;;;;;;;OAWG;IACH,cAAc,CACZ,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,gCAAgC,GAAG,IAAI,GAAG,SAAc,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAalC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;CAC/B;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,sCAAsC;IACrD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,gCAAgC,IAAI,gCAAgC,GAC1E,CAAC;CACH"}
|
|
@@ -16,7 +16,7 @@ export declare class FutureUpdate extends APIResource {
|
|
|
16
16
|
* );
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
cancelPendingPayment(id: string, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
19
|
+
cancelPendingPayment(id: string, params?: FutureUpdateCancelPendingPaymentParams | null | undefined, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
20
20
|
/**
|
|
21
21
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
22
22
|
* change.
|
|
@@ -29,7 +29,7 @@ export declare class FutureUpdate extends APIResource {
|
|
|
29
29
|
* );
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
cancelSchedule(id: string, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
32
|
+
cancelSchedule(id: string, params?: FutureUpdateCancelScheduleParams | null | undefined, options?: RequestOptions): APIPromise<CancelSubscription>;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Response object
|
|
@@ -45,7 +45,33 @@ export declare namespace CancelSubscription {
|
|
|
45
45
|
id: string;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
export interface FutureUpdateCancelPendingPaymentParams {
|
|
49
|
+
/**
|
|
50
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
51
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
52
|
+
*/
|
|
53
|
+
'X-ACCOUNT-ID'?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
56
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
57
|
+
* key).
|
|
58
|
+
*/
|
|
59
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface FutureUpdateCancelScheduleParams {
|
|
62
|
+
/**
|
|
63
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
64
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
65
|
+
*/
|
|
66
|
+
'X-ACCOUNT-ID'?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
69
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
70
|
+
* key).
|
|
71
|
+
*/
|
|
72
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
73
|
+
}
|
|
48
74
|
export declare namespace FutureUpdate {
|
|
49
|
-
export { type CancelSubscription as CancelSubscription };
|
|
75
|
+
export { type CancelSubscription as CancelSubscription, type FutureUpdateCancelPendingPaymentParams as FutureUpdateCancelPendingPaymentParams, type FutureUpdateCancelScheduleParams as FutureUpdateCancelScheduleParams, };
|
|
50
76
|
}
|
|
51
77
|
//# sourceMappingURL=future-update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-update.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;
|
|
1
|
+
{"version":3,"file":"future-update.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,sCAAsC,GAAG,IAAI,GAAG,SAAc,EACtE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAcjC;;;;;;;;;;;OAWG;IACH,cAAc,CACZ,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,gCAAgC,GAAG,IAAI,GAAG,SAAc,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAalC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;CAC/B;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,sCAAsC;IACrD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,gCAAgC,IAAI,gCAAgC,GAC1E,CAAC;CACH"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.FutureUpdate = void 0;
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
6
7
|
const path_1 = require("../../../internal/utils/path.js");
|
|
7
8
|
/**
|
|
8
9
|
* Operations related to subscriptions
|
|
@@ -19,8 +20,18 @@ class FutureUpdate extends resource_1.APIResource {
|
|
|
19
20
|
* );
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
|
-
cancelPendingPayment(id, options) {
|
|
23
|
-
|
|
23
|
+
cancelPendingPayment(id, params = {}, options) {
|
|
24
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
25
|
+
return this._client.delete((0, path_1.path) `/api/v1/subscriptions/${id}/future-update/pending-payment`, {
|
|
26
|
+
...options,
|
|
27
|
+
headers: (0, headers_1.buildHeaders)([
|
|
28
|
+
{
|
|
29
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
30
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
31
|
+
},
|
|
32
|
+
options?.headers,
|
|
33
|
+
]),
|
|
34
|
+
});
|
|
24
35
|
}
|
|
25
36
|
/**
|
|
26
37
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
@@ -34,8 +45,18 @@ class FutureUpdate extends resource_1.APIResource {
|
|
|
34
45
|
* );
|
|
35
46
|
* ```
|
|
36
47
|
*/
|
|
37
|
-
cancelSchedule(id, options) {
|
|
38
|
-
|
|
48
|
+
cancelSchedule(id, params = {}, options) {
|
|
49
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
50
|
+
return this._client.delete((0, path_1.path) `/api/v1/subscriptions/${id}/future-update/schedule`, {
|
|
51
|
+
...options,
|
|
52
|
+
headers: (0, headers_1.buildHeaders)([
|
|
53
|
+
{
|
|
54
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
55
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
56
|
+
},
|
|
57
|
+
options?.headers,
|
|
58
|
+
]),
|
|
59
|
+
});
|
|
39
60
|
}
|
|
40
61
|
}
|
|
41
62
|
exports.FutureUpdate = FutureUpdate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-update.js","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;
|
|
1
|
+
{"version":3,"file":"future-update.js","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;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C;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA3DD,oCA2DC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
3
4
|
import { path } from "../../../internal/utils/path.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* Operations related to subscriptions
|
|
@@ -16,8 +17,18 @@ export class FutureUpdate extends APIResource {
|
|
|
16
17
|
* );
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
|
-
cancelPendingPayment(id, options) {
|
|
20
|
-
|
|
20
|
+
cancelPendingPayment(id, params = {}, options) {
|
|
21
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
22
|
+
return this._client.delete(path `/api/v1/subscriptions/${id}/future-update/pending-payment`, {
|
|
23
|
+
...options,
|
|
24
|
+
headers: buildHeaders([
|
|
25
|
+
{
|
|
26
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
27
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
28
|
+
},
|
|
29
|
+
options?.headers,
|
|
30
|
+
]),
|
|
31
|
+
});
|
|
21
32
|
}
|
|
22
33
|
/**
|
|
23
34
|
* Cancels a scheduled subscription update, such as a future downgrade or plan
|
|
@@ -31,8 +42,18 @@ export class FutureUpdate extends APIResource {
|
|
|
31
42
|
* );
|
|
32
43
|
* ```
|
|
33
44
|
*/
|
|
34
|
-
cancelSchedule(id, options) {
|
|
35
|
-
|
|
45
|
+
cancelSchedule(id, params = {}, options) {
|
|
46
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
47
|
+
return this._client.delete(path `/api/v1/subscriptions/${id}/future-update/schedule`, {
|
|
48
|
+
...options,
|
|
49
|
+
headers: buildHeaders([
|
|
50
|
+
{
|
|
51
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
52
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
53
|
+
},
|
|
54
|
+
options?.headers,
|
|
55
|
+
]),
|
|
56
|
+
});
|
|
36
57
|
}
|
|
37
58
|
}
|
|
38
59
|
//# sourceMappingURL=future-update.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-update.mjs","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;
|
|
1
|
+
{"version":3,"file":"future-update.mjs","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/future-update.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,EAAU,EACV,SAAoE,EAAE,EACtE,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,yBAAyB,EAAE,gCAAgC,EAAE;YAC1F,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,cAAc,CACZ,EAAU,EACV,SAA8D,EAAE,EAChE,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,yBAAyB,EAAE,yBAAyB,EAAE;YACnF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { FutureUpdate, type CancelSubscription } from "./future-update.mjs";
|
|
2
|
-
export { Invoice, type InvoiceMarkAsPaidResponse } from "./invoice.mjs";
|
|
3
|
-
export { Subscriptions, type Subscription, type SubscriptionListResponse, type SubscriptionImportResponse, type SubscriptionPreviewResponse, type SubscriptionProvisionResponse, type SubscriptionUpdateParams, type SubscriptionListParams, type SubscriptionCancelParams, type SubscriptionDelegateParams, type SubscriptionImportParams, type SubscriptionMigrateParams, type SubscriptionPreviewParams, type SubscriptionProvisionParams, type SubscriptionTransferParams, type SubscriptionListResponsesMyCursorIDPage, } from "./subscriptions.mjs";
|
|
4
|
-
export { Usage, type UsageChargeUsageResponse, type UsageSyncResponse, type UsageChargeUsageParams, } from "./usage.mjs";
|
|
1
|
+
export { FutureUpdate, type CancelSubscription, type FutureUpdateCancelPendingPaymentParams, type FutureUpdateCancelScheduleParams, } from "./future-update.mjs";
|
|
2
|
+
export { Invoice, type InvoiceMarkAsPaidResponse, type InvoiceMarkAsPaidParams } from "./invoice.mjs";
|
|
3
|
+
export { Subscriptions, type Subscription, type SubscriptionListResponse, type SubscriptionImportResponse, type SubscriptionPreviewResponse, type SubscriptionProvisionResponse, type SubscriptionRetrieveParams, type SubscriptionUpdateParams, type SubscriptionListParams, type SubscriptionCancelParams, type SubscriptionDelegateParams, type SubscriptionImportParams, type SubscriptionMigrateParams, type SubscriptionPreviewParams, type SubscriptionProvisionParams, type SubscriptionTransferParams, type SubscriptionListResponsesMyCursorIDPage, } from "./subscriptions.mjs";
|
|
4
|
+
export { Usage, type UsageChargeUsageResponse, type UsageSyncResponse, type UsageChargeUsageParams, type UsageSyncParams, } from "./usage.mjs";
|
|
5
5
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/index.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,GACtC,4BAAwB;AACzB,OAAO,EAAE,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,sBAAkB;AAClG,OAAO,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,uCAAuC,GAC7C,4BAAwB;AACzB,OAAO,EACL,KAAK,EACL,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACrB,oBAAgB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { FutureUpdate, type CancelSubscription } from "./future-update.js";
|
|
2
|
-
export { Invoice, type InvoiceMarkAsPaidResponse } from "./invoice.js";
|
|
3
|
-
export { Subscriptions, type Subscription, type SubscriptionListResponse, type SubscriptionImportResponse, type SubscriptionPreviewResponse, type SubscriptionProvisionResponse, type SubscriptionUpdateParams, type SubscriptionListParams, type SubscriptionCancelParams, type SubscriptionDelegateParams, type SubscriptionImportParams, type SubscriptionMigrateParams, type SubscriptionPreviewParams, type SubscriptionProvisionParams, type SubscriptionTransferParams, type SubscriptionListResponsesMyCursorIDPage, } from "./subscriptions.js";
|
|
4
|
-
export { Usage, type UsageChargeUsageResponse, type UsageSyncResponse, type UsageChargeUsageParams, } from "./usage.js";
|
|
1
|
+
export { FutureUpdate, type CancelSubscription, type FutureUpdateCancelPendingPaymentParams, type FutureUpdateCancelScheduleParams, } from "./future-update.js";
|
|
2
|
+
export { Invoice, type InvoiceMarkAsPaidResponse, type InvoiceMarkAsPaidParams } from "./invoice.js";
|
|
3
|
+
export { Subscriptions, type Subscription, type SubscriptionListResponse, type SubscriptionImportResponse, type SubscriptionPreviewResponse, type SubscriptionProvisionResponse, type SubscriptionRetrieveParams, type SubscriptionUpdateParams, type SubscriptionListParams, type SubscriptionCancelParams, type SubscriptionDelegateParams, type SubscriptionImportParams, type SubscriptionMigrateParams, type SubscriptionPreviewParams, type SubscriptionProvisionParams, type SubscriptionTransferParams, type SubscriptionListResponsesMyCursorIDPage, } from "./subscriptions.js";
|
|
4
|
+
export { Usage, type UsageChargeUsageResponse, type UsageSyncResponse, type UsageChargeUsageParams, type UsageSyncParams, } from "./usage.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/index.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,GACtC,2BAAwB;AACzB,OAAO,EAAE,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,qBAAkB;AAClG,OAAO,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,uCAAuC,GAC7C,2BAAwB;AACzB,OAAO,EACL,KAAK,EACL,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACrB,mBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oDAKyB;AAJvB,6GAAA,YAAY,OAAA;AAKd,wCAAkG;AAAzF,kGAAA,OAAO,OAAA;AAChB,oDAkByB;AAjBvB,8GAAA,aAAa,OAAA;AAkBf,oCAMiB;AALf,8FAAA,KAAK,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export { FutureUpdate } from "./future-update.mjs";
|
|
2
|
+
export { FutureUpdate, } from "./future-update.mjs";
|
|
3
3
|
export { Invoice } from "./invoice.mjs";
|
|
4
4
|
export { Subscriptions, } from "./subscriptions.mjs";
|
|
5
5
|
export { Usage, } from "./usage.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/subscriptions/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,YAAY,GAIb,4BAAwB;AACzB,OAAO,EAAE,OAAO,EAAgE,sBAAkB;AAClG,OAAO,EACL,aAAa,GAiBd,4BAAwB;AACzB,OAAO,EACL,KAAK,GAKN,oBAAgB"}
|
|
@@ -15,7 +15,7 @@ export declare class Invoice extends APIResource {
|
|
|
15
15
|
* await client.v1.subscriptions.invoice.markAsPaid('x');
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
markAsPaid(id: string, options?: RequestOptions): APIPromise<InvoiceMarkAsPaidResponse>;
|
|
18
|
+
markAsPaid(id: string, params?: InvoiceMarkAsPaidParams | null | undefined, options?: RequestOptions): APIPromise<InvoiceMarkAsPaidResponse>;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Response object
|
|
@@ -37,7 +37,20 @@ export declare namespace InvoiceMarkAsPaidResponse {
|
|
|
37
37
|
id: string;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
export interface InvoiceMarkAsPaidParams {
|
|
41
|
+
/**
|
|
42
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
43
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
44
|
+
*/
|
|
45
|
+
'X-ACCOUNT-ID'?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
48
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
49
|
+
* key).
|
|
50
|
+
*/
|
|
51
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
52
|
+
}
|
|
40
53
|
export declare namespace Invoice {
|
|
41
|
-
export { type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse };
|
|
54
|
+
export { type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse, type InvoiceMarkAsPaidParams as InvoiceMarkAsPaidParams, };
|
|
42
55
|
}
|
|
43
56
|
//# sourceMappingURL=invoice.d.mts.map
|