@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
|
@@ -7,12 +7,14 @@ import {
|
|
|
7
7
|
EntitlementCreateParams,
|
|
8
8
|
EntitlementCreateResponse,
|
|
9
9
|
EntitlementDeleteParams,
|
|
10
|
+
EntitlementListParams,
|
|
10
11
|
EntitlementListResponse,
|
|
11
12
|
EntitlementUpdateParams,
|
|
12
13
|
Entitlements,
|
|
13
14
|
} from './entitlements';
|
|
14
15
|
import { APIPromise } from '../../../core/api-promise';
|
|
15
16
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
17
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
16
18
|
import { RequestOptions } from '../../../internal/request-options';
|
|
17
19
|
import { path } from '../../../internal/utils/path';
|
|
18
20
|
|
|
@@ -34,8 +36,19 @@ export class Addons extends APIResource {
|
|
|
34
36
|
* });
|
|
35
37
|
* ```
|
|
36
38
|
*/
|
|
37
|
-
create(
|
|
38
|
-
|
|
39
|
+
create(params: AddonCreateParams, options?: RequestOptions): APIPromise<Addon> {
|
|
40
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
41
|
+
return this._client.post('/api/v1/addons', {
|
|
42
|
+
body,
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([
|
|
45
|
+
{
|
|
46
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
47
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
48
|
+
},
|
|
49
|
+
options?.headers,
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
39
52
|
}
|
|
40
53
|
|
|
41
54
|
/**
|
|
@@ -47,8 +60,22 @@ export class Addons extends APIResource {
|
|
|
47
60
|
* const addon = await client.v1.addons.retrieve('x');
|
|
48
61
|
* ```
|
|
49
62
|
*/
|
|
50
|
-
retrieve(
|
|
51
|
-
|
|
63
|
+
retrieve(
|
|
64
|
+
id: string,
|
|
65
|
+
params: AddonRetrieveParams | null | undefined = {},
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): APIPromise<Addon> {
|
|
68
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
69
|
+
return this._client.get(path`/api/v1/addons/${id}`, {
|
|
70
|
+
...options,
|
|
71
|
+
headers: buildHeaders([
|
|
72
|
+
{
|
|
73
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
74
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
75
|
+
},
|
|
76
|
+
options?.headers,
|
|
77
|
+
]),
|
|
78
|
+
});
|
|
52
79
|
}
|
|
53
80
|
|
|
54
81
|
/**
|
|
@@ -60,8 +87,19 @@ export class Addons extends APIResource {
|
|
|
60
87
|
* const addon = await client.v1.addons.update('x');
|
|
61
88
|
* ```
|
|
62
89
|
*/
|
|
63
|
-
update(id: string,
|
|
64
|
-
|
|
90
|
+
update(id: string, params: AddonUpdateParams, options?: RequestOptions): APIPromise<Addon> {
|
|
91
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
92
|
+
return this._client.patch(path`/api/v1/addons/${id}`, {
|
|
93
|
+
body,
|
|
94
|
+
...options,
|
|
95
|
+
headers: buildHeaders([
|
|
96
|
+
{
|
|
97
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
98
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
99
|
+
},
|
|
100
|
+
options?.headers,
|
|
101
|
+
]),
|
|
102
|
+
});
|
|
65
103
|
}
|
|
66
104
|
|
|
67
105
|
/**
|
|
@@ -76,12 +114,20 @@ export class Addons extends APIResource {
|
|
|
76
114
|
* ```
|
|
77
115
|
*/
|
|
78
116
|
list(
|
|
79
|
-
|
|
117
|
+
params: AddonListParams | null | undefined = {},
|
|
80
118
|
options?: RequestOptions,
|
|
81
119
|
): PagePromise<AddonListResponsesMyCursorIDPage, AddonListResponse> {
|
|
120
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
82
121
|
return this._client.getAPIList('/api/v1/addons', MyCursorIDPage<AddonListResponse>, {
|
|
83
122
|
query,
|
|
84
123
|
...options,
|
|
124
|
+
headers: buildHeaders([
|
|
125
|
+
{
|
|
126
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
127
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
128
|
+
},
|
|
129
|
+
options?.headers,
|
|
130
|
+
]),
|
|
85
131
|
});
|
|
86
132
|
}
|
|
87
133
|
|
|
@@ -93,8 +139,22 @@ export class Addons extends APIResource {
|
|
|
93
139
|
* const addon = await client.v1.addons.archive('x');
|
|
94
140
|
* ```
|
|
95
141
|
*/
|
|
96
|
-
archive(
|
|
97
|
-
|
|
142
|
+
archive(
|
|
143
|
+
id: string,
|
|
144
|
+
params: AddonArchiveParams | null | undefined = {},
|
|
145
|
+
options?: RequestOptions,
|
|
146
|
+
): APIPromise<Addon> {
|
|
147
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
148
|
+
return this._client.post(path`/api/v1/addons/${id}/archive`, {
|
|
149
|
+
...options,
|
|
150
|
+
headers: buildHeaders([
|
|
151
|
+
{
|
|
152
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
153
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
154
|
+
},
|
|
155
|
+
options?.headers,
|
|
156
|
+
]),
|
|
157
|
+
});
|
|
98
158
|
}
|
|
99
159
|
|
|
100
160
|
/**
|
|
@@ -105,8 +165,22 @@ export class Addons extends APIResource {
|
|
|
105
165
|
* const addon = await client.v1.addons.createDraft('x');
|
|
106
166
|
* ```
|
|
107
167
|
*/
|
|
108
|
-
createDraft(
|
|
109
|
-
|
|
168
|
+
createDraft(
|
|
169
|
+
id: string,
|
|
170
|
+
params: AddonCreateDraftParams | null | undefined = {},
|
|
171
|
+
options?: RequestOptions,
|
|
172
|
+
): APIPromise<Addon> {
|
|
173
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
174
|
+
return this._client.post(path`/api/v1/addons/${id}/draft`, {
|
|
175
|
+
...options,
|
|
176
|
+
headers: buildHeaders([
|
|
177
|
+
{
|
|
178
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
179
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
180
|
+
},
|
|
181
|
+
options?.headers,
|
|
182
|
+
]),
|
|
183
|
+
});
|
|
110
184
|
}
|
|
111
185
|
|
|
112
186
|
/**
|
|
@@ -124,13 +198,24 @@ export class Addons extends APIResource {
|
|
|
124
198
|
*/
|
|
125
199
|
listCharges(
|
|
126
200
|
id: string,
|
|
127
|
-
|
|
201
|
+
params: AddonListChargesParams | null | undefined = {},
|
|
128
202
|
options?: RequestOptions,
|
|
129
203
|
): PagePromise<AddonListChargesResponsesMyCursorIDPage, AddonListChargesResponse> {
|
|
204
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
130
205
|
return this._client.getAPIList(
|
|
131
206
|
path`/api/v1/addons/${id}/charges`,
|
|
132
207
|
MyCursorIDPage<AddonListChargesResponse>,
|
|
133
|
-
{
|
|
208
|
+
{
|
|
209
|
+
query,
|
|
210
|
+
...options,
|
|
211
|
+
headers: buildHeaders([
|
|
212
|
+
{
|
|
213
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
214
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
215
|
+
},
|
|
216
|
+
options?.headers,
|
|
217
|
+
]),
|
|
218
|
+
},
|
|
134
219
|
);
|
|
135
220
|
}
|
|
136
221
|
|
|
@@ -144,8 +229,23 @@ export class Addons extends APIResource {
|
|
|
144
229
|
* });
|
|
145
230
|
* ```
|
|
146
231
|
*/
|
|
147
|
-
publish(
|
|
148
|
-
|
|
232
|
+
publish(
|
|
233
|
+
id: string,
|
|
234
|
+
params: AddonPublishParams,
|
|
235
|
+
options?: RequestOptions,
|
|
236
|
+
): APIPromise<AddonPublishResponse> {
|
|
237
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
238
|
+
return this._client.post(path`/api/v1/addons/${id}/publish`, {
|
|
239
|
+
body,
|
|
240
|
+
...options,
|
|
241
|
+
headers: buildHeaders([
|
|
242
|
+
{
|
|
243
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
244
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
245
|
+
},
|
|
246
|
+
options?.headers,
|
|
247
|
+
]),
|
|
248
|
+
});
|
|
149
249
|
}
|
|
150
250
|
|
|
151
251
|
/**
|
|
@@ -156,8 +256,22 @@ export class Addons extends APIResource {
|
|
|
156
256
|
* const response = await client.v1.addons.removeDraft('x');
|
|
157
257
|
* ```
|
|
158
258
|
*/
|
|
159
|
-
removeDraft(
|
|
160
|
-
|
|
259
|
+
removeDraft(
|
|
260
|
+
id: string,
|
|
261
|
+
params: AddonRemoveDraftParams | null | undefined = {},
|
|
262
|
+
options?: RequestOptions,
|
|
263
|
+
): APIPromise<AddonRemoveDraftResponse> {
|
|
264
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
|
|
265
|
+
return this._client.delete(path`/api/v1/addons/${id}/draft`, {
|
|
266
|
+
...options,
|
|
267
|
+
headers: buildHeaders([
|
|
268
|
+
{
|
|
269
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
270
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
271
|
+
},
|
|
272
|
+
options?.headers,
|
|
273
|
+
]),
|
|
274
|
+
});
|
|
161
275
|
}
|
|
162
276
|
}
|
|
163
277
|
|
|
@@ -943,91 +1057,134 @@ export namespace AddonRemoveDraftResponse {
|
|
|
943
1057
|
|
|
944
1058
|
export interface AddonCreateParams {
|
|
945
1059
|
/**
|
|
946
|
-
* The unique identifier for the entity
|
|
1060
|
+
* Body param: The unique identifier for the entity
|
|
947
1061
|
*/
|
|
948
1062
|
id: string;
|
|
949
1063
|
|
|
950
1064
|
/**
|
|
951
|
-
* The display name of the package
|
|
1065
|
+
* Body param: The display name of the package
|
|
952
1066
|
*/
|
|
953
1067
|
displayName: string;
|
|
954
1068
|
|
|
955
1069
|
/**
|
|
956
|
-
* The product id of the package
|
|
1070
|
+
* Body param: The product id of the package
|
|
957
1071
|
*/
|
|
958
1072
|
productId: string;
|
|
959
1073
|
|
|
960
1074
|
/**
|
|
961
|
-
* The unique identifier for the entity in the billing provider
|
|
1075
|
+
* Body param: The unique identifier for the entity in the billing provider
|
|
962
1076
|
*/
|
|
963
1077
|
billingId?: string | null;
|
|
964
1078
|
|
|
965
1079
|
/**
|
|
966
|
-
* The description of the package
|
|
1080
|
+
* Body param: The description of the package
|
|
967
1081
|
*/
|
|
968
1082
|
description?: string | null;
|
|
969
1083
|
|
|
970
1084
|
/**
|
|
971
|
-
* The maximum quantity of this addon that can be added to a
|
|
1085
|
+
* Body param: The maximum quantity of this addon that can be added to a
|
|
1086
|
+
* subscription
|
|
972
1087
|
*/
|
|
973
1088
|
maxQuantity?: number | null;
|
|
974
1089
|
|
|
975
1090
|
/**
|
|
976
|
-
* Metadata associated with the entity
|
|
1091
|
+
* Body param: Metadata associated with the entity
|
|
977
1092
|
*/
|
|
978
1093
|
metadata?: { [key: string]: string };
|
|
979
1094
|
|
|
980
1095
|
/**
|
|
981
|
-
* The pricing type of the package
|
|
1096
|
+
* Body param: The pricing type of the package
|
|
982
1097
|
*/
|
|
983
1098
|
pricingType?: 'FREE' | 'PAID' | 'CUSTOM' | null;
|
|
984
1099
|
|
|
985
1100
|
/**
|
|
986
|
-
* The status of the package
|
|
1101
|
+
* Body param: The status of the package
|
|
987
1102
|
*/
|
|
988
1103
|
status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
1107
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
1108
|
+
*/
|
|
1109
|
+
'X-ACCOUNT-ID'?: string;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
1113
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
1114
|
+
* intrinsic to the key).
|
|
1115
|
+
*/
|
|
1116
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
export interface AddonRetrieveParams {
|
|
1120
|
+
/**
|
|
1121
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
1122
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
1123
|
+
*/
|
|
1124
|
+
'X-ACCOUNT-ID'?: string;
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
1128
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
1129
|
+
* key).
|
|
1130
|
+
*/
|
|
1131
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
989
1132
|
}
|
|
990
1133
|
|
|
991
1134
|
export interface AddonUpdateParams {
|
|
992
1135
|
/**
|
|
993
|
-
* The unique identifier for the entity in the billing provider
|
|
1136
|
+
* Body param: The unique identifier for the entity in the billing provider
|
|
994
1137
|
*/
|
|
995
1138
|
billingId?: string | null;
|
|
996
1139
|
|
|
997
1140
|
/**
|
|
998
|
-
* Pricing configuration to set on the addon draft
|
|
1141
|
+
* Body param: Pricing configuration to set on the addon draft
|
|
999
1142
|
*/
|
|
1000
1143
|
charges?: AddonUpdateParams.Charges;
|
|
1001
1144
|
|
|
1002
1145
|
/**
|
|
1003
|
-
* List of addons the addon is dependant on
|
|
1146
|
+
* Body param: List of addons the addon is dependant on
|
|
1004
1147
|
*/
|
|
1005
1148
|
dependencies?: Array<string> | null;
|
|
1006
1149
|
|
|
1007
1150
|
/**
|
|
1008
|
-
* The description of the package
|
|
1151
|
+
* Body param: The description of the package
|
|
1009
1152
|
*/
|
|
1010
1153
|
description?: string | null;
|
|
1011
1154
|
|
|
1012
1155
|
/**
|
|
1013
|
-
* The display name of the package
|
|
1156
|
+
* Body param: The display name of the package
|
|
1014
1157
|
*/
|
|
1015
1158
|
displayName?: string;
|
|
1016
1159
|
|
|
1017
1160
|
/**
|
|
1018
|
-
* The maximum quantity of this addon that can be added to a
|
|
1161
|
+
* Body param: The maximum quantity of this addon that can be added to a
|
|
1162
|
+
* subscription
|
|
1019
1163
|
*/
|
|
1020
1164
|
maxQuantity?: number | null;
|
|
1021
1165
|
|
|
1022
1166
|
/**
|
|
1023
|
-
* Metadata associated with the entity
|
|
1167
|
+
* Body param: Metadata associated with the entity
|
|
1024
1168
|
*/
|
|
1025
1169
|
metadata?: { [key: string]: string };
|
|
1026
1170
|
|
|
1027
1171
|
/**
|
|
1028
|
-
* The status of the package
|
|
1172
|
+
* Body param: The status of the package
|
|
1029
1173
|
*/
|
|
1030
1174
|
status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
1178
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
1179
|
+
*/
|
|
1180
|
+
'X-ACCOUNT-ID'?: string;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
1184
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
1185
|
+
* intrinsic to the key).
|
|
1186
|
+
*/
|
|
1187
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
1031
1188
|
}
|
|
1032
1189
|
|
|
1033
1190
|
export namespace AddonUpdateParams {
|
|
@@ -2400,19 +2557,33 @@ export namespace AddonUpdateParams {
|
|
|
2400
2557
|
|
|
2401
2558
|
export interface AddonListParams extends MyCursorIDPageParams {
|
|
2402
2559
|
/**
|
|
2403
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
2560
|
+
* Query param: Filter by creation date using range operators: gt, gte, lt, lte
|
|
2404
2561
|
*/
|
|
2405
2562
|
createdAt?: AddonListParams.CreatedAt;
|
|
2406
2563
|
|
|
2407
2564
|
/**
|
|
2408
|
-
* Filter by product ID
|
|
2565
|
+
* Query param: Filter by product ID
|
|
2409
2566
|
*/
|
|
2410
2567
|
productId?: string;
|
|
2411
2568
|
|
|
2412
2569
|
/**
|
|
2413
|
-
* Filter by status. Supports comma-separated values for multiple
|
|
2570
|
+
* Query param: Filter by status. Supports comma-separated values for multiple
|
|
2571
|
+
* statuses
|
|
2414
2572
|
*/
|
|
2415
2573
|
status?: Array<'DRAFT' | 'PUBLISHED' | 'ARCHIVED'>;
|
|
2574
|
+
|
|
2575
|
+
/**
|
|
2576
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
2577
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
2578
|
+
*/
|
|
2579
|
+
'X-ACCOUNT-ID'?: string;
|
|
2580
|
+
|
|
2581
|
+
/**
|
|
2582
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
2583
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
2584
|
+
* intrinsic to the key).
|
|
2585
|
+
*/
|
|
2586
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
2416
2587
|
}
|
|
2417
2588
|
|
|
2418
2589
|
export namespace AddonListParams {
|
|
@@ -2442,13 +2613,84 @@ export namespace AddonListParams {
|
|
|
2442
2613
|
}
|
|
2443
2614
|
}
|
|
2444
2615
|
|
|
2445
|
-
export interface
|
|
2616
|
+
export interface AddonArchiveParams {
|
|
2617
|
+
/**
|
|
2618
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
2619
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
2620
|
+
*/
|
|
2621
|
+
'X-ACCOUNT-ID'?: string;
|
|
2622
|
+
|
|
2623
|
+
/**
|
|
2624
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
2625
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
2626
|
+
* key).
|
|
2627
|
+
*/
|
|
2628
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
export interface AddonCreateDraftParams {
|
|
2632
|
+
/**
|
|
2633
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
2634
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
2635
|
+
*/
|
|
2636
|
+
'X-ACCOUNT-ID'?: string;
|
|
2637
|
+
|
|
2638
|
+
/**
|
|
2639
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
2640
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
2641
|
+
* key).
|
|
2642
|
+
*/
|
|
2643
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
export interface AddonListChargesParams extends MyCursorIDPageParams {
|
|
2647
|
+
/**
|
|
2648
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
2649
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
2650
|
+
*/
|
|
2651
|
+
'X-ACCOUNT-ID'?: string;
|
|
2652
|
+
|
|
2653
|
+
/**
|
|
2654
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
2655
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
2656
|
+
* intrinsic to the key).
|
|
2657
|
+
*/
|
|
2658
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
2659
|
+
}
|
|
2446
2660
|
|
|
2447
2661
|
export interface AddonPublishParams {
|
|
2448
2662
|
/**
|
|
2449
|
-
* The migration type of the package
|
|
2663
|
+
* Body param: The migration type of the package
|
|
2450
2664
|
*/
|
|
2451
2665
|
migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';
|
|
2666
|
+
|
|
2667
|
+
/**
|
|
2668
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
2669
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
2670
|
+
*/
|
|
2671
|
+
'X-ACCOUNT-ID'?: string;
|
|
2672
|
+
|
|
2673
|
+
/**
|
|
2674
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
2675
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
2676
|
+
* intrinsic to the key).
|
|
2677
|
+
*/
|
|
2678
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
export interface AddonRemoveDraftParams {
|
|
2682
|
+
/**
|
|
2683
|
+
* Account ID — optional when authenticating with a user JWT (Bearer token); falls
|
|
2684
|
+
* back to the user's first membership. Ignored for API-key auth.
|
|
2685
|
+
*/
|
|
2686
|
+
'X-ACCOUNT-ID'?: string;
|
|
2687
|
+
|
|
2688
|
+
/**
|
|
2689
|
+
* Environment ID — required when authenticating with a user JWT (Bearer token) on
|
|
2690
|
+
* environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
|
|
2691
|
+
* key).
|
|
2692
|
+
*/
|
|
2693
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
2452
2694
|
}
|
|
2453
2695
|
|
|
2454
2696
|
Addons.Entitlements = Entitlements;
|
|
@@ -2463,10 +2705,14 @@ export declare namespace Addons {
|
|
|
2463
2705
|
type AddonListResponsesMyCursorIDPage as AddonListResponsesMyCursorIDPage,
|
|
2464
2706
|
type AddonListChargesResponsesMyCursorIDPage as AddonListChargesResponsesMyCursorIDPage,
|
|
2465
2707
|
type AddonCreateParams as AddonCreateParams,
|
|
2708
|
+
type AddonRetrieveParams as AddonRetrieveParams,
|
|
2466
2709
|
type AddonUpdateParams as AddonUpdateParams,
|
|
2467
2710
|
type AddonListParams as AddonListParams,
|
|
2711
|
+
type AddonArchiveParams as AddonArchiveParams,
|
|
2712
|
+
type AddonCreateDraftParams as AddonCreateDraftParams,
|
|
2468
2713
|
type AddonListChargesParams as AddonListChargesParams,
|
|
2469
2714
|
type AddonPublishParams as AddonPublishParams,
|
|
2715
|
+
type AddonRemoveDraftParams as AddonRemoveDraftParams,
|
|
2470
2716
|
};
|
|
2471
2717
|
|
|
2472
2718
|
export {
|
|
@@ -2476,6 +2722,7 @@ export declare namespace Addons {
|
|
|
2476
2722
|
type EntitlementListResponse as EntitlementListResponse,
|
|
2477
2723
|
type EntitlementCreateParams as EntitlementCreateParams,
|
|
2478
2724
|
type EntitlementUpdateParams as EntitlementUpdateParams,
|
|
2725
|
+
type EntitlementListParams as EntitlementListParams,
|
|
2479
2726
|
type EntitlementDeleteParams as EntitlementDeleteParams,
|
|
2480
2727
|
};
|
|
2481
2728
|
}
|