@stigg/typescript 0.1.0-beta.35 → 0.1.0-beta.37
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 +16 -0
- package/client.d.mts +1 -1
- package/client.d.ts +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/v1/credits/consumption.d.mts +196 -0
- package/resources/v1/credits/consumption.d.mts.map +1 -0
- package/resources/v1/credits/consumption.d.ts +196 -0
- package/resources/v1/credits/consumption.d.ts.map +1 -0
- package/resources/v1/credits/consumption.js +46 -0
- package/resources/v1/credits/consumption.js.map +1 -0
- package/resources/v1/credits/consumption.mjs +42 -0
- package/resources/v1/credits/consumption.mjs.map +1 -0
- package/resources/v1/credits/credits.d.mts +4 -0
- package/resources/v1/credits/credits.d.mts.map +1 -1
- package/resources/v1/credits/credits.d.ts +4 -0
- package/resources/v1/credits/credits.d.ts.map +1 -1
- package/resources/v1/credits/credits.js +4 -0
- package/resources/v1/credits/credits.js.map +1 -1
- package/resources/v1/credits/credits.mjs +4 -0
- package/resources/v1/credits/credits.mjs.map +1 -1
- package/resources/v1/credits/index.d.mts +1 -0
- package/resources/v1/credits/index.d.mts.map +1 -1
- package/resources/v1/credits/index.d.ts +1 -0
- package/resources/v1/credits/index.d.ts.map +1 -1
- package/resources/v1/credits/index.js +3 -1
- package/resources/v1/credits/index.js.map +1 -1
- package/resources/v1/credits/index.mjs +1 -0
- package/resources/v1/credits/index.mjs.map +1 -1
- package/resources/v1/events/beta/customers.d.mts +3 -3
- package/resources/v1/events/beta/customers.d.mts.map +1 -1
- package/resources/v1/events/beta/customers.d.ts +3 -3
- package/resources/v1/events/beta/customers.d.ts.map +1 -1
- package/resources/v1-beta/customers/assignments.d.mts +22 -24
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -1
- package/resources/v1-beta/customers/assignments.d.ts +22 -24
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -1
- package/resources/v1-beta/customers/entities.d.mts +25 -25
- package/resources/v1-beta/customers/entities.d.mts.map +1 -1
- package/resources/v1-beta/customers/entities.d.ts +25 -25
- package/resources/v1-beta/customers/entities.d.ts.map +1 -1
- package/resources/v1-beta/customers/entities.js +2 -2
- package/resources/v1-beta/customers/entities.mjs +2 -2
- package/src/client.ts +3 -3
- package/src/resources/v1/credits/consumption.ts +266 -0
- package/src/resources/v1/credits/credits.ts +18 -0
- package/src/resources/v1/credits/index.ts +7 -0
- package/src/resources/v1/events/beta/customers.ts +3 -3
- package/src/resources/v1-beta/customers/assignments.ts +22 -24
- package/src/resources/v1-beta/customers/entities.ts +26 -26
- 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
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
|
|
8
|
+
export class Consumption extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Consumes a specified amount of credits directly from a customer wallet, with no
|
|
11
|
+
* feature mapping. Returns the optimistic balance.
|
|
12
|
+
*/
|
|
13
|
+
consume(
|
|
14
|
+
params: ConsumptionConsumeParams,
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): APIPromise<ConsumptionConsumeResponse> {
|
|
17
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
18
|
+
return this._client.post('/api/v1/credits/consumption', {
|
|
19
|
+
body,
|
|
20
|
+
...options,
|
|
21
|
+
headers: buildHeaders([
|
|
22
|
+
{
|
|
23
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
24
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
25
|
+
},
|
|
26
|
+
options?.headers,
|
|
27
|
+
]),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Consumes credits directly from customer wallets asynchronously. Consumptions are
|
|
33
|
+
* reconciled asynchronously into the credit balances.
|
|
34
|
+
*/
|
|
35
|
+
consumeAsync(
|
|
36
|
+
params: ConsumptionConsumeAsyncParams,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<ConsumptionConsumeAsyncResponse> {
|
|
39
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
40
|
+
return this._client.post('/api/v1/credits/consumption/async', {
|
|
41
|
+
body,
|
|
42
|
+
...options,
|
|
43
|
+
headers: buildHeaders([
|
|
44
|
+
{
|
|
45
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
46
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
47
|
+
},
|
|
48
|
+
options?.headers,
|
|
49
|
+
]),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Response object
|
|
56
|
+
*/
|
|
57
|
+
export interface ConsumptionConsumeResponse {
|
|
58
|
+
/**
|
|
59
|
+
* Result of a synchronous direct credit consumption
|
|
60
|
+
*/
|
|
61
|
+
data: ConsumptionConsumeResponse.Data;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export namespace ConsumptionConsumeResponse {
|
|
65
|
+
/**
|
|
66
|
+
* Result of a synchronous direct credit consumption
|
|
67
|
+
*/
|
|
68
|
+
export interface Data {
|
|
69
|
+
/**
|
|
70
|
+
* The amount of credits consumed
|
|
71
|
+
*/
|
|
72
|
+
amount: number;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The credit currency the credits were consumed from
|
|
76
|
+
*/
|
|
77
|
+
currencyId: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The customer the credits were consumed from
|
|
81
|
+
*/
|
|
82
|
+
customerId: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The timestamp the consumption was attributed to
|
|
86
|
+
*/
|
|
87
|
+
timestamp: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The optimistic credit balance after consumption (when sync credit consumption is
|
|
91
|
+
* enabled)
|
|
92
|
+
*/
|
|
93
|
+
credit?: Data.Credit | null;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The resource the consumption was attributed to
|
|
97
|
+
*/
|
|
98
|
+
resourceId?: string | null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export namespace Data {
|
|
102
|
+
/**
|
|
103
|
+
* The optimistic credit balance after consumption (when sync credit consumption is
|
|
104
|
+
* enabled)
|
|
105
|
+
*/
|
|
106
|
+
export interface Credit {
|
|
107
|
+
/**
|
|
108
|
+
* The credit currency identifier
|
|
109
|
+
*/
|
|
110
|
+
currencyId: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The credits consumed (optimistic — includes not-yet-reconciled usage)
|
|
114
|
+
*/
|
|
115
|
+
currentUsage: number;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The grant-version timestamp of this balance, used by the SDK for last-write-wins
|
|
119
|
+
* reconciliation
|
|
120
|
+
*/
|
|
121
|
+
timestamp: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The total credits granted
|
|
125
|
+
*/
|
|
126
|
+
usageLimit: number;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* End of the current credit grant period (when recurring credits reset), if
|
|
130
|
+
* applicable
|
|
131
|
+
*/
|
|
132
|
+
usagePeriodEnd?: string | null;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Response object
|
|
139
|
+
*/
|
|
140
|
+
export interface ConsumptionConsumeAsyncResponse {
|
|
141
|
+
/**
|
|
142
|
+
* Confirmation that the credit consumptions were accepted for processing
|
|
143
|
+
*/
|
|
144
|
+
data: unknown;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface ConsumptionConsumeParams {
|
|
148
|
+
/**
|
|
149
|
+
* Body param: The amount of credits to consume
|
|
150
|
+
*/
|
|
151
|
+
amount: number;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Body param: The credit currency to consume from (required)
|
|
155
|
+
*/
|
|
156
|
+
currencyId: string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Body param: The customer to consume credits from (required)
|
|
160
|
+
*/
|
|
161
|
+
customerId: string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Body param: A unique key used to deduplicate the consumption (required)
|
|
165
|
+
*/
|
|
166
|
+
idempotencyKey: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Body param: Optional timestamp the consumption is attributed to
|
|
170
|
+
*/
|
|
171
|
+
createdAt?: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Body param: Optional dimensions describing the consumption
|
|
175
|
+
*/
|
|
176
|
+
dimensions?: { [key: string]: string | number | boolean };
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Body param: Optional resource the consumption is attributed to
|
|
180
|
+
*/
|
|
181
|
+
resourceId?: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
185
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
186
|
+
*/
|
|
187
|
+
'X-ACCOUNT-ID'?: string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
191
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
192
|
+
* intrinsic to the key).
|
|
193
|
+
*/
|
|
194
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface ConsumptionConsumeAsyncParams {
|
|
198
|
+
/**
|
|
199
|
+
* Body param: The credit consumptions to report (up to 1000)
|
|
200
|
+
*/
|
|
201
|
+
consumptions: Array<ConsumptionConsumeAsyncParams.Consumption>;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
205
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
206
|
+
*/
|
|
207
|
+
'X-ACCOUNT-ID'?: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
211
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
212
|
+
* intrinsic to the key).
|
|
213
|
+
*/
|
|
214
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export namespace ConsumptionConsumeAsyncParams {
|
|
218
|
+
/**
|
|
219
|
+
* Request body for consuming credits directly from a wallet
|
|
220
|
+
*/
|
|
221
|
+
export interface Consumption {
|
|
222
|
+
/**
|
|
223
|
+
* The amount of credits to consume
|
|
224
|
+
*/
|
|
225
|
+
amount: number;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The credit currency to consume from (required)
|
|
229
|
+
*/
|
|
230
|
+
currencyId: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The customer to consume credits from (required)
|
|
234
|
+
*/
|
|
235
|
+
customerId: string;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* A unique key used to deduplicate the consumption (required)
|
|
239
|
+
*/
|
|
240
|
+
idempotencyKey: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Optional timestamp the consumption is attributed to
|
|
244
|
+
*/
|
|
245
|
+
createdAt?: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Optional dimensions describing the consumption
|
|
249
|
+
*/
|
|
250
|
+
dimensions?: { [key: string]: string | number | boolean };
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Optional resource the consumption is attributed to
|
|
254
|
+
*/
|
|
255
|
+
resourceId?: string;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export declare namespace Consumption {
|
|
260
|
+
export {
|
|
261
|
+
type ConsumptionConsumeResponse as ConsumptionConsumeResponse,
|
|
262
|
+
type ConsumptionConsumeAsyncResponse as ConsumptionConsumeAsyncResponse,
|
|
263
|
+
type ConsumptionConsumeParams as ConsumptionConsumeParams,
|
|
264
|
+
type ConsumptionConsumeAsyncParams as ConsumptionConsumeAsyncParams,
|
|
265
|
+
};
|
|
266
|
+
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as ConsumptionAPI from './consumption';
|
|
5
|
+
import {
|
|
6
|
+
Consumption,
|
|
7
|
+
ConsumptionConsumeAsyncParams,
|
|
8
|
+
ConsumptionConsumeAsyncResponse,
|
|
9
|
+
ConsumptionConsumeParams,
|
|
10
|
+
ConsumptionConsumeResponse,
|
|
11
|
+
} from './consumption';
|
|
4
12
|
import * as CustomCurrenciesAPI from './custom-currencies';
|
|
5
13
|
import {
|
|
6
14
|
CustomCurrencies,
|
|
@@ -35,6 +43,7 @@ export class Credits extends APIResource {
|
|
|
35
43
|
customCurrencies: CustomCurrenciesAPI.CustomCurrencies = new CustomCurrenciesAPI.CustomCurrencies(
|
|
36
44
|
this._client,
|
|
37
45
|
);
|
|
46
|
+
consumption: ConsumptionAPI.Consumption = new ConsumptionAPI.Consumption(this._client);
|
|
38
47
|
|
|
39
48
|
/**
|
|
40
49
|
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
@@ -502,6 +511,7 @@ export interface CreditListLedgerParams extends MyCursorIDPageParams {
|
|
|
502
511
|
|
|
503
512
|
Credits.Grants = Grants;
|
|
504
513
|
Credits.CustomCurrencies = CustomCurrencies;
|
|
514
|
+
Credits.Consumption = Consumption;
|
|
505
515
|
|
|
506
516
|
export declare namespace Credits {
|
|
507
517
|
export {
|
|
@@ -537,4 +547,12 @@ export declare namespace Credits {
|
|
|
537
547
|
type CustomCurrencyListAssociatedEntitiesParams as CustomCurrencyListAssociatedEntitiesParams,
|
|
538
548
|
type CustomCurrencyUnarchiveParams as CustomCurrencyUnarchiveParams,
|
|
539
549
|
};
|
|
550
|
+
|
|
551
|
+
export {
|
|
552
|
+
Consumption as Consumption,
|
|
553
|
+
type ConsumptionConsumeResponse as ConsumptionConsumeResponse,
|
|
554
|
+
type ConsumptionConsumeAsyncResponse as ConsumptionConsumeAsyncResponse,
|
|
555
|
+
type ConsumptionConsumeParams as ConsumptionConsumeParams,
|
|
556
|
+
type ConsumptionConsumeAsyncParams as ConsumptionConsumeAsyncParams,
|
|
557
|
+
};
|
|
540
558
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Consumption,
|
|
5
|
+
type ConsumptionConsumeResponse,
|
|
6
|
+
type ConsumptionConsumeAsyncResponse,
|
|
7
|
+
type ConsumptionConsumeParams,
|
|
8
|
+
type ConsumptionConsumeAsyncParams,
|
|
9
|
+
} from './consumption';
|
|
3
10
|
export {
|
|
4
11
|
Credits,
|
|
5
12
|
type CreditGetAutoRechargeResponse,
|
|
@@ -72,7 +72,7 @@ export namespace CustomerRetrieveGovernanceResponse {
|
|
|
72
72
|
/**
|
|
73
73
|
* External id of the entity type (e.g. `team`, `user`).
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
entityTypeId: string;
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* External id of the parent entity in the tree; `null` for a root. Use it to
|
|
@@ -110,13 +110,13 @@ export namespace CustomerRetrieveGovernanceResponse {
|
|
|
110
110
|
utilization: number | null;
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
* The metered currency
|
|
113
|
+
* The metered currency ID (present when the configured capability is a credit
|
|
114
114
|
* currency).
|
|
115
115
|
*/
|
|
116
116
|
currencyId?: string;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* The metered feature
|
|
119
|
+
* The metered feature ID (present when the configured capability is a feature).
|
|
120
120
|
*/
|
|
121
121
|
featureId?: string;
|
|
122
122
|
}
|
|
@@ -120,20 +120,19 @@ export interface AssignmentListResponse {
|
|
|
120
120
|
createdAt: string;
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* The entity
|
|
123
|
+
* The entity ID this assignment is attached to
|
|
124
124
|
*/
|
|
125
125
|
entityId: string;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* Parent entity
|
|
128
|
+
* Parent entity ID in the hierarchy, or `null` for a root.
|
|
129
129
|
*/
|
|
130
130
|
parentId: string | null;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* Dimension-scoped sub-budget key: the set of entity
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* (order-insensitive).
|
|
133
|
+
* Dimension-scoped sub-budget key: the set of entity IDs this budget applies to.
|
|
134
|
+
* Empty is the node-wide budget that always matches; a non-empty set only applies
|
|
135
|
+
* when every listed entity is present in the resolved set (order-insensitive).
|
|
137
136
|
*/
|
|
138
137
|
scopeEntityIds: Array<string>;
|
|
139
138
|
|
|
@@ -148,12 +147,12 @@ export interface AssignmentListResponse {
|
|
|
148
147
|
usageLimit: number | null;
|
|
149
148
|
|
|
150
149
|
/**
|
|
151
|
-
* Currency
|
|
150
|
+
* Currency ID this assignment grants (present for credit capabilities).
|
|
152
151
|
*/
|
|
153
152
|
currencyId?: string;
|
|
154
153
|
|
|
155
154
|
/**
|
|
156
|
-
* Feature
|
|
155
|
+
* Feature ID this assignment grants (present for feature capabilities).
|
|
157
156
|
*/
|
|
158
157
|
featureId?: string;
|
|
159
158
|
}
|
|
@@ -189,20 +188,19 @@ export namespace AssignmentUpsertResponse {
|
|
|
189
188
|
createdAt: string;
|
|
190
189
|
|
|
191
190
|
/**
|
|
192
|
-
* The entity
|
|
191
|
+
* The entity ID this assignment is attached to
|
|
193
192
|
*/
|
|
194
193
|
entityId: string;
|
|
195
194
|
|
|
196
195
|
/**
|
|
197
|
-
* Parent entity
|
|
196
|
+
* Parent entity ID in the hierarchy, or `null` for a root.
|
|
198
197
|
*/
|
|
199
198
|
parentId: string | null;
|
|
200
199
|
|
|
201
200
|
/**
|
|
202
|
-
* Dimension-scoped sub-budget key: the set of entity
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* (order-insensitive).
|
|
201
|
+
* Dimension-scoped sub-budget key: the set of entity IDs this budget applies to.
|
|
202
|
+
* Empty is the node-wide budget that always matches; a non-empty set only applies
|
|
203
|
+
* when every listed entity is present in the resolved set (order-insensitive).
|
|
206
204
|
*/
|
|
207
205
|
scopeEntityIds: Array<string>;
|
|
208
206
|
|
|
@@ -217,12 +215,12 @@ export namespace AssignmentUpsertResponse {
|
|
|
217
215
|
usageLimit: number | null;
|
|
218
216
|
|
|
219
217
|
/**
|
|
220
|
-
* Currency
|
|
218
|
+
* Currency ID this assignment grants (present for credit capabilities).
|
|
221
219
|
*/
|
|
222
220
|
currencyId?: string;
|
|
223
221
|
|
|
224
222
|
/**
|
|
225
|
-
* Feature
|
|
223
|
+
* Feature ID this assignment grants (present for feature capabilities).
|
|
226
224
|
*/
|
|
227
225
|
featureId?: string;
|
|
228
226
|
}
|
|
@@ -230,12 +228,12 @@ export namespace AssignmentUpsertResponse {
|
|
|
230
228
|
|
|
231
229
|
export interface AssignmentListParams extends MyCursorIDPageParams {
|
|
232
230
|
/**
|
|
233
|
-
* Query param: Filter assignments to a specific capability
|
|
231
|
+
* Query param: Filter assignments to a specific capability ID
|
|
234
232
|
*/
|
|
235
233
|
capabilityId?: string;
|
|
236
234
|
|
|
237
235
|
/**
|
|
238
|
-
* Query param: Filter assignments to a specific entity
|
|
236
|
+
* Query param: Filter assignments to a specific entity ID
|
|
239
237
|
*/
|
|
240
238
|
entityId?: string;
|
|
241
239
|
|
|
@@ -283,7 +281,7 @@ export namespace AssignmentUpsertParams {
|
|
|
283
281
|
*/
|
|
284
282
|
export interface Assignment {
|
|
285
283
|
/**
|
|
286
|
-
* The entity
|
|
284
|
+
* The entity ID this assignment is attached to
|
|
287
285
|
*/
|
|
288
286
|
entityId: string;
|
|
289
287
|
|
|
@@ -294,20 +292,20 @@ export namespace AssignmentUpsertParams {
|
|
|
294
292
|
cadence?: string;
|
|
295
293
|
|
|
296
294
|
/**
|
|
297
|
-
* Currency
|
|
295
|
+
* Currency ID this assignment grants (credit budgets). Mutually exclusive with
|
|
298
296
|
* `featureId`.
|
|
299
297
|
*/
|
|
300
298
|
currencyId?: string;
|
|
301
299
|
|
|
302
300
|
/**
|
|
303
|
-
* Feature
|
|
301
|
+
* Feature ID this assignment grants. Mutually exclusive with `currencyId`.
|
|
304
302
|
*/
|
|
305
303
|
featureId?: string;
|
|
306
304
|
|
|
307
305
|
/**
|
|
308
|
-
* Parent entity
|
|
309
|
-
*
|
|
310
|
-
*
|
|
306
|
+
* Parent entity ID in the hierarchy. Omit to leave the current parent untouched (a
|
|
307
|
+
* new node defaults to a root); `null` detaches to a root; an ID sets or changes
|
|
308
|
+
* the parent. Reparenting an existing node is leaf-only.
|
|
311
309
|
*/
|
|
312
310
|
parentId?: string | null;
|
|
313
311
|
|
|
@@ -144,12 +144,12 @@ export class Entities extends APIResource {
|
|
|
144
144
|
* entities: [
|
|
145
145
|
* {
|
|
146
146
|
* id: 'user-7f3a0c1d',
|
|
147
|
-
*
|
|
147
|
+
* entityTypeId: 'user',
|
|
148
148
|
* metadata: { email: 'jane@acme.com', role: 'admin' },
|
|
149
149
|
* },
|
|
150
150
|
* {
|
|
151
151
|
* id: 'user-c4d1b2e9',
|
|
152
|
-
*
|
|
152
|
+
* entityTypeId: 'user',
|
|
153
153
|
* metadata: { email: 'john@acme.com' },
|
|
154
154
|
* },
|
|
155
155
|
* ],
|
|
@@ -205,14 +205,14 @@ export namespace EntityRetrieveResponse {
|
|
|
205
205
|
createdAt: string;
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
|
-
*
|
|
208
|
+
* The entity type identifier this entity instantiates
|
|
209
209
|
*/
|
|
210
|
-
|
|
210
|
+
entityTypeId: string;
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
|
-
*
|
|
213
|
+
* Free-form key/value metadata attached to the entity
|
|
214
214
|
*/
|
|
215
|
-
|
|
215
|
+
metadata: { [key: string]: string };
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* Timestamp of when the record was last updated
|
|
@@ -241,14 +241,14 @@ export interface EntityListResponse {
|
|
|
241
241
|
createdAt: string;
|
|
242
242
|
|
|
243
243
|
/**
|
|
244
|
-
*
|
|
244
|
+
* The entity type identifier this entity instantiates
|
|
245
245
|
*/
|
|
246
|
-
|
|
246
|
+
entityTypeId: string;
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
|
-
*
|
|
249
|
+
* Free-form key/value metadata attached to the entity
|
|
250
250
|
*/
|
|
251
|
-
|
|
251
|
+
metadata: { [key: string]: string };
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
* Timestamp of when the record was last updated
|
|
@@ -328,14 +328,14 @@ export namespace EntityUpsertResponse {
|
|
|
328
328
|
createdAt: string;
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
|
-
*
|
|
331
|
+
* The entity type identifier this entity instantiates
|
|
332
332
|
*/
|
|
333
|
-
|
|
333
|
+
entityTypeId: string;
|
|
334
334
|
|
|
335
335
|
/**
|
|
336
|
-
*
|
|
336
|
+
* Free-form key/value metadata attached to the entity
|
|
337
337
|
*/
|
|
338
|
-
|
|
338
|
+
metadata: { [key: string]: string };
|
|
339
339
|
|
|
340
340
|
/**
|
|
341
341
|
* Timestamp of when the record was last updated
|
|
@@ -366,15 +366,15 @@ export interface EntityRetrieveParams {
|
|
|
366
366
|
|
|
367
367
|
export interface EntityListParams extends MyCursorIDPageParams {
|
|
368
368
|
/**
|
|
369
|
-
* Query param:
|
|
369
|
+
* Query param: Filter results to entities of a specific entity type, by the type's
|
|
370
|
+
* ID
|
|
370
371
|
*/
|
|
371
|
-
|
|
372
|
+
entityTypeId?: string;
|
|
372
373
|
|
|
373
374
|
/**
|
|
374
|
-
* Query param:
|
|
375
|
-
* refId
|
|
375
|
+
* Query param: Whether to include archived entities. One of: true, false
|
|
376
376
|
*/
|
|
377
|
-
|
|
377
|
+
includeArchived?: 'true' | 'false';
|
|
378
378
|
|
|
379
379
|
/**
|
|
380
380
|
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
@@ -461,17 +461,17 @@ export namespace EntityUpsertParams {
|
|
|
461
461
|
id: string;
|
|
462
462
|
|
|
463
463
|
/**
|
|
464
|
-
*
|
|
465
|
-
* omitted
|
|
464
|
+
* The entity type ID this entity instantiates. Required when creating a new
|
|
465
|
+
* entity; on a re-upsert may be omitted to preserve the existing type. Governance
|
|
466
|
+
* returns 400 if missing on create.
|
|
466
467
|
*/
|
|
467
|
-
|
|
468
|
+
entityTypeId?: string;
|
|
468
469
|
|
|
469
470
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
* returns 400 if missing on create.
|
|
471
|
+
* Free-form key/value metadata. Patch semantics: empty-string value removes a key,
|
|
472
|
+
* omitted keys are preserved.
|
|
473
473
|
*/
|
|
474
|
-
|
|
474
|
+
metadata?: { [key: string]: string };
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-beta.
|
|
1
|
+
export const VERSION = '0.1.0-beta.37'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-beta.
|
|
1
|
+
export declare const VERSION = "0.1.0-beta.37";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-beta.
|
|
1
|
+
export declare const VERSION = "0.1.0-beta.37";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '0.1.0-beta.
|
|
4
|
+
exports.VERSION = '0.1.0-beta.37'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-beta.
|
|
1
|
+
export const VERSION = '0.1.0-beta.37'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|