@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
|
|
|
@@ -24,8 +25,17 @@ export class Entities extends APIResource {
|
|
|
24
25
|
params: EntityRetrieveParams,
|
|
25
26
|
options?: RequestOptions,
|
|
26
27
|
): APIPromise<EntityRetrieveResponse> {
|
|
27
|
-
const { id } = params;
|
|
28
|
-
return this._client.get(path`/api/v1-beta/customers/${id}/entities/${entityID}`,
|
|
28
|
+
const { id, 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params;
|
|
29
|
+
return this._client.get(path`/api/v1-beta/customers/${id}/entities/${entityID}`, {
|
|
30
|
+
...options,
|
|
31
|
+
headers: buildHeaders([
|
|
32
|
+
{
|
|
33
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
34
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
35
|
+
},
|
|
36
|
+
options?.headers,
|
|
37
|
+
]),
|
|
38
|
+
});
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
/**
|
|
@@ -43,13 +53,24 @@ export class Entities extends APIResource {
|
|
|
43
53
|
*/
|
|
44
54
|
list(
|
|
45
55
|
id: string,
|
|
46
|
-
|
|
56
|
+
params: EntityListParams | null | undefined = {},
|
|
47
57
|
options?: RequestOptions,
|
|
48
58
|
): PagePromise<EntityListResponsesMyCursorIDPage, EntityListResponse> {
|
|
59
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
49
60
|
return this._client.getAPIList(
|
|
50
61
|
path`/api/v1-beta/customers/${id}/entities`,
|
|
51
62
|
MyCursorIDPage<EntityListResponse>,
|
|
52
|
-
{
|
|
63
|
+
{
|
|
64
|
+
query,
|
|
65
|
+
...options,
|
|
66
|
+
headers: buildHeaders([
|
|
67
|
+
{
|
|
68
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
69
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
70
|
+
},
|
|
71
|
+
options?.headers,
|
|
72
|
+
]),
|
|
73
|
+
},
|
|
53
74
|
);
|
|
54
75
|
}
|
|
55
76
|
|
|
@@ -67,10 +88,21 @@ export class Entities extends APIResource {
|
|
|
67
88
|
*/
|
|
68
89
|
archive(
|
|
69
90
|
id: string,
|
|
70
|
-
|
|
91
|
+
params: EntityArchiveParams,
|
|
71
92
|
options?: RequestOptions,
|
|
72
93
|
): APIPromise<EntityArchiveResponse> {
|
|
73
|
-
|
|
94
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
95
|
+
return this._client.post(path`/api/v1-beta/customers/${id}/entities/archive`, {
|
|
96
|
+
body,
|
|
97
|
+
...options,
|
|
98
|
+
headers: buildHeaders([
|
|
99
|
+
{
|
|
100
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
101
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
102
|
+
},
|
|
103
|
+
options?.headers,
|
|
104
|
+
]),
|
|
105
|
+
});
|
|
74
106
|
}
|
|
75
107
|
|
|
76
108
|
/**
|
|
@@ -87,10 +119,21 @@ export class Entities extends APIResource {
|
|
|
87
119
|
*/
|
|
88
120
|
unarchive(
|
|
89
121
|
id: string,
|
|
90
|
-
|
|
122
|
+
params: EntityUnarchiveParams,
|
|
91
123
|
options?: RequestOptions,
|
|
92
124
|
): APIPromise<EntityUnarchiveResponse> {
|
|
93
|
-
|
|
125
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
126
|
+
return this._client.post(path`/api/v1-beta/customers/${id}/entities/unarchive`, {
|
|
127
|
+
body,
|
|
128
|
+
...options,
|
|
129
|
+
headers: buildHeaders([
|
|
130
|
+
{
|
|
131
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
132
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
133
|
+
},
|
|
134
|
+
options?.headers,
|
|
135
|
+
]),
|
|
136
|
+
});
|
|
94
137
|
}
|
|
95
138
|
|
|
96
139
|
/**
|
|
@@ -122,8 +165,19 @@ export class Entities extends APIResource {
|
|
|
122
165
|
* );
|
|
123
166
|
* ```
|
|
124
167
|
*/
|
|
125
|
-
upsert(id: string,
|
|
126
|
-
|
|
168
|
+
upsert(id: string, params: EntityUpsertParams, options?: RequestOptions): APIPromise<EntityUpsertResponse> {
|
|
169
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
170
|
+
return this._client.put(path`/api/v1-beta/customers/${id}/entities`, {
|
|
171
|
+
body,
|
|
172
|
+
...options,
|
|
173
|
+
headers: buildHeaders([
|
|
174
|
+
{
|
|
175
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
176
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
177
|
+
},
|
|
178
|
+
options?.headers,
|
|
179
|
+
]),
|
|
180
|
+
});
|
|
127
181
|
}
|
|
128
182
|
}
|
|
129
183
|
|
|
@@ -301,42 +355,108 @@ export namespace EntityUpsertResponse {
|
|
|
301
355
|
|
|
302
356
|
export interface EntityRetrieveParams {
|
|
303
357
|
/**
|
|
304
|
-
* The customer identifier (owner) the entity belongs to
|
|
358
|
+
* Path param: The customer identifier (owner) the entity belongs to
|
|
305
359
|
*/
|
|
306
360
|
id: string;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
364
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
365
|
+
*/
|
|
366
|
+
'X-ACCOUNT-ID'?: string;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
370
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
371
|
+
* intrinsic to the key).
|
|
372
|
+
*/
|
|
373
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
307
374
|
}
|
|
308
375
|
|
|
309
376
|
export interface EntityListParams extends MyCursorIDPageParams {
|
|
310
377
|
/**
|
|
311
|
-
* Whether to include archived entities. One of: true, false
|
|
378
|
+
* Query param: Whether to include archived entities. One of: true, false
|
|
312
379
|
*/
|
|
313
380
|
includeArchived?: 'true' | 'false';
|
|
314
381
|
|
|
315
382
|
/**
|
|
316
|
-
* Filter results to entities of a specific entity type, by the type's
|
|
383
|
+
* Query param: Filter results to entities of a specific entity type, by the type's
|
|
384
|
+
* refId
|
|
317
385
|
*/
|
|
318
386
|
typeRefId?: string;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
390
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
391
|
+
*/
|
|
392
|
+
'X-ACCOUNT-ID'?: string;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
396
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
397
|
+
* intrinsic to the key).
|
|
398
|
+
*/
|
|
399
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
319
400
|
}
|
|
320
401
|
|
|
321
402
|
export interface EntityArchiveParams {
|
|
322
403
|
/**
|
|
323
|
-
* Entity identifiers to act on
|
|
404
|
+
* Body param: Entity identifiers to act on
|
|
324
405
|
*/
|
|
325
406
|
ids: Array<string>;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
410
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
411
|
+
*/
|
|
412
|
+
'X-ACCOUNT-ID'?: string;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
416
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
417
|
+
* intrinsic to the key).
|
|
418
|
+
*/
|
|
419
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
326
420
|
}
|
|
327
421
|
|
|
328
422
|
export interface EntityUnarchiveParams {
|
|
329
423
|
/**
|
|
330
|
-
* Entity identifiers to act on
|
|
424
|
+
* Body param: Entity identifiers to act on
|
|
331
425
|
*/
|
|
332
426
|
ids: Array<string>;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
430
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
431
|
+
*/
|
|
432
|
+
'X-ACCOUNT-ID'?: string;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
436
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
437
|
+
* intrinsic to the key).
|
|
438
|
+
*/
|
|
439
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
333
440
|
}
|
|
334
441
|
|
|
335
442
|
export interface EntityUpsertParams {
|
|
336
443
|
/**
|
|
337
|
-
* List of entities to create or update (1-100 entries)
|
|
444
|
+
* Body param: List of entities to create or update (1-100 entries)
|
|
338
445
|
*/
|
|
339
446
|
entities: Array<EntityUpsertParams.Entity>;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
450
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
451
|
+
*/
|
|
452
|
+
'X-ACCOUNT-ID'?: string;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
456
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
457
|
+
* intrinsic to the key).
|
|
458
|
+
*/
|
|
459
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
340
460
|
}
|
|
341
461
|
|
|
342
462
|
export namespace EntityUpsertParams {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../../../internal/headers';
|
|
5
6
|
import { RequestOptions } from '../../../../../internal/request-options';
|
|
6
7
|
import { path } from '../../../../../internal/utils/path';
|
|
7
8
|
|
|
@@ -21,10 +22,21 @@ export class Entitlements extends APIResource {
|
|
|
21
22
|
*/
|
|
22
23
|
check(
|
|
23
24
|
id: string,
|
|
24
|
-
|
|
25
|
+
params: EntitlementCheckParams | null | undefined = {},
|
|
25
26
|
options?: RequestOptions,
|
|
26
27
|
): APIPromise<EntitlementCheckResponse> {
|
|
27
|
-
|
|
28
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
29
|
+
return this._client.get(path`/api/v1-beta/customers/${id}/entitlements/check`, {
|
|
30
|
+
query,
|
|
31
|
+
...options,
|
|
32
|
+
headers: buildHeaders([
|
|
33
|
+
{
|
|
34
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
35
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
36
|
+
},
|
|
37
|
+
options?.headers,
|
|
38
|
+
]),
|
|
39
|
+
});
|
|
28
40
|
}
|
|
29
41
|
}
|
|
30
42
|
|
|
@@ -286,37 +298,52 @@ export namespace EntitlementCheckResponse {
|
|
|
286
298
|
|
|
287
299
|
export interface EntitlementCheckParams {
|
|
288
300
|
/**
|
|
289
|
-
* Currency ID (refId) to check for credit entitlements. Mutually
|
|
290
|
-
* `featureId`.
|
|
301
|
+
* Query param: Currency ID (refId) to check for credit entitlements. Mutually
|
|
302
|
+
* exclusive with `featureId`.
|
|
291
303
|
*/
|
|
292
304
|
currencyId?: string;
|
|
293
305
|
|
|
294
306
|
/**
|
|
295
|
-
* Optional attribution map (e.g. `dimensions[userId]=u1`). When
|
|
296
|
-
* response includes a `chains` array with per-entity governance
|
|
307
|
+
* Query param: Optional attribution map (e.g. `dimensions[userId]=u1`). When
|
|
308
|
+
* provided, the response includes a `chains` array with per-entity governance
|
|
309
|
+
* limits.
|
|
297
310
|
*/
|
|
298
311
|
dimensions?: { [key: string]: string };
|
|
299
312
|
|
|
300
313
|
/**
|
|
301
|
-
* Feature ID (refId) to check. Mutually exclusive with `currencyId`.
|
|
314
|
+
* Query param: Feature ID (refId) to check. Mutually exclusive with `currencyId`.
|
|
302
315
|
*/
|
|
303
316
|
featureId?: string;
|
|
304
317
|
|
|
305
318
|
/**
|
|
306
|
-
* Requested usage amount to evaluate against the entitlement limit
|
|
307
|
-
* features only)
|
|
319
|
+
* Query param: Requested usage amount to evaluate against the entitlement limit
|
|
320
|
+
* (numeric features only)
|
|
308
321
|
*/
|
|
309
322
|
requestedUsage?: number;
|
|
310
323
|
|
|
311
324
|
/**
|
|
312
|
-
* Requested values to evaluate against allowed values (enum features
|
|
325
|
+
* Query param: Requested values to evaluate against allowed values (enum features
|
|
326
|
+
* only)
|
|
313
327
|
*/
|
|
314
328
|
requestedValues?: Array<string>;
|
|
315
329
|
|
|
316
330
|
/**
|
|
317
|
-
* Resource ID to scope the entitlement check to a specific resource
|
|
331
|
+
* Query param: Resource ID to scope the entitlement check to a specific resource
|
|
318
332
|
*/
|
|
319
333
|
resourceId?: string;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
337
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
338
|
+
*/
|
|
339
|
+
'X-ACCOUNT-ID'?: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
343
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
344
|
+
* intrinsic to the key).
|
|
345
|
+
*/
|
|
346
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
320
347
|
}
|
|
321
348
|
|
|
322
349
|
export declare namespace Entitlements {
|
|
@@ -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
|
|
|
8
9
|
export class EntityTypes extends APIResource {
|
|
@@ -20,12 +21,20 @@ export class EntityTypes extends APIResource {
|
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
23
|
list(
|
|
23
|
-
|
|
24
|
+
params: EntityTypeListParams | null | undefined = {},
|
|
24
25
|
options?: RequestOptions,
|
|
25
26
|
): PagePromise<EntityTypeListResponsesMyCursorIDPage, EntityTypeListResponse> {
|
|
27
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
26
28
|
return this._client.getAPIList('/api/v1-beta/entity-types', MyCursorIDPage<EntityTypeListResponse>, {
|
|
27
29
|
query,
|
|
28
30
|
...options,
|
|
31
|
+
headers: buildHeaders([
|
|
32
|
+
{
|
|
33
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
34
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
35
|
+
},
|
|
36
|
+
options?.headers,
|
|
37
|
+
]),
|
|
29
38
|
});
|
|
30
39
|
}
|
|
31
40
|
|
|
@@ -53,8 +62,19 @@ export class EntityTypes extends APIResource {
|
|
|
53
62
|
* });
|
|
54
63
|
* ```
|
|
55
64
|
*/
|
|
56
|
-
upsert(
|
|
57
|
-
|
|
65
|
+
upsert(params: EntityTypeUpsertParams, options?: RequestOptions): APIPromise<EntityTypeUpsertResponse> {
|
|
66
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
67
|
+
return this._client.put('/api/v1-beta/entity-types', {
|
|
68
|
+
body,
|
|
69
|
+
...options,
|
|
70
|
+
headers: buildHeaders([
|
|
71
|
+
{
|
|
72
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
73
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
74
|
+
},
|
|
75
|
+
options?.headers,
|
|
76
|
+
]),
|
|
77
|
+
});
|
|
58
78
|
}
|
|
59
79
|
}
|
|
60
80
|
|
|
@@ -137,13 +157,39 @@ export namespace EntityTypeUpsertResponse {
|
|
|
137
157
|
}
|
|
138
158
|
}
|
|
139
159
|
|
|
140
|
-
export interface EntityTypeListParams extends MyCursorIDPageParams {
|
|
160
|
+
export interface EntityTypeListParams extends MyCursorIDPageParams {
|
|
161
|
+
/**
|
|
162
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
163
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
164
|
+
*/
|
|
165
|
+
'X-ACCOUNT-ID'?: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
169
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
170
|
+
* intrinsic to the key).
|
|
171
|
+
*/
|
|
172
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
173
|
+
}
|
|
141
174
|
|
|
142
175
|
export interface EntityTypeUpsertParams {
|
|
143
176
|
/**
|
|
144
|
-
* Entity types to upsert (1–100 per request)
|
|
177
|
+
* Body param: Entity types to upsert (1–100 per request)
|
|
145
178
|
*/
|
|
146
179
|
types: Array<EntityTypeUpsertParams.Type>;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
183
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
184
|
+
*/
|
|
185
|
+
'X-ACCOUNT-ID'?: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
189
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
190
|
+
* intrinsic to the key).
|
|
191
|
+
*/
|
|
192
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
147
193
|
}
|
|
148
194
|
|
|
149
195
|
export namespace EntityTypeUpsertParams {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
DataExportTriggerSyncResponse,
|
|
13
13
|
} from './data-export/data-export';
|
|
14
14
|
import { APIPromise } from '../../../core/api-promise';
|
|
15
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
15
16
|
import { RequestOptions } from '../../../internal/request-options';
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -38,8 +39,19 @@ export class Events extends APIResource {
|
|
|
38
39
|
* });
|
|
39
40
|
* ```
|
|
40
41
|
*/
|
|
41
|
-
report(
|
|
42
|
-
|
|
42
|
+
report(params: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse> {
|
|
43
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
44
|
+
return this._client.post('/api/v1/events', {
|
|
45
|
+
body,
|
|
46
|
+
...options,
|
|
47
|
+
headers: buildHeaders([
|
|
48
|
+
{
|
|
49
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
50
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
51
|
+
},
|
|
52
|
+
options?.headers,
|
|
53
|
+
]),
|
|
54
|
+
});
|
|
43
55
|
}
|
|
44
56
|
}
|
|
45
57
|
|
|
@@ -56,9 +68,22 @@ export interface EventReportResponse {
|
|
|
56
68
|
|
|
57
69
|
export interface EventReportParams {
|
|
58
70
|
/**
|
|
59
|
-
* A list of usage events to report
|
|
71
|
+
* Body param: A list of usage events to report
|
|
60
72
|
*/
|
|
61
73
|
events: Array<EventReportParams.Event>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
77
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
78
|
+
*/
|
|
79
|
+
'X-ACCOUNT-ID'?: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
83
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
84
|
+
* intrinsic to the key).
|
|
85
|
+
*/
|
|
86
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
62
87
|
}
|
|
63
88
|
|
|
64
89
|
export namespace EventReportParams {
|