@stigg/typescript 0.1.0-beta.55 → 0.1.0-beta.57
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 +33 -0
- package/package.json +1 -1
- package/resources/v1/addons/addons.d.mts +30 -13
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +30 -13
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +5 -1
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +5 -1
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/contracts.d.mts +53 -14
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts +53 -14
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.js +3 -4
- package/resources/v1/contracts.js.map +1 -1
- package/resources/v1/contracts.mjs +3 -4
- package/resources/v1/contracts.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +22 -9
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +22 -9
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/credits/grants.d.mts +51 -14
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +51 -14
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +126 -57
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +126 -57
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +15 -16
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +15 -16
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +19 -11
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +19 -11
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +7 -3
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +7 -3
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +23 -5
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +23 -5
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/events/data-export/data-export.d.mts +1 -61
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -1
- package/resources/v1/events/data-export/data-export.d.ts +1 -61
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -1
- package/resources/v1/events/data-export/data-export.js +0 -18
- package/resources/v1/events/data-export/data-export.js.map +1 -1
- package/resources/v1/events/data-export/data-export.mjs +0 -18
- package/resources/v1/events/data-export/data-export.mjs.map +1 -1
- package/resources/v1/events/data-export/index.d.mts +1 -1
- package/resources/v1/events/data-export/index.d.mts.map +1 -1
- package/resources/v1/events/data-export/index.d.ts +1 -1
- package/resources/v1/events/data-export/index.d.ts.map +1 -1
- package/resources/v1/events/data-export/index.js.map +1 -1
- package/resources/v1/events/data-export/index.mjs.map +1 -1
- package/resources/v1/events/events.d.mts +15 -7
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +15 -7
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +2 -2
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +2 -2
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/events/index.d.mts +1 -1
- package/resources/v1/events/index.d.mts.map +1 -1
- package/resources/v1/events/index.d.ts +1 -1
- package/resources/v1/events/index.d.ts.map +1 -1
- package/resources/v1/events/index.js.map +1 -1
- package/resources/v1/events/index.mjs.map +1 -1
- package/resources/v1/features.d.mts +222 -7
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +222 -7
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/plans/plans.d.mts +62 -22
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +62 -22
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +5 -1
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +5 -1
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +15 -7
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +15 -7
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +66 -22
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +66 -22
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +11 -3
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +11 -3
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/usage.d.mts +32 -9
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +32 -9
- package/resources/v1/usage.d.ts.map +1 -1
- package/src/resources/v1/addons/addons.ts +30 -13
- package/src/resources/v1/contracts.ts +61 -15
- package/src/resources/v1/coupons.ts +22 -9
- package/src/resources/v1/credits/grants.ts +51 -14
- package/src/resources/v1/customers/customers.ts +127 -71
- package/src/resources/v1/customers/integrations.ts +19 -54
- package/src/resources/v1/customers/payment-method.ts +7 -3
- package/src/resources/v1/customers/promotional-entitlements.ts +23 -5
- package/src/resources/v1/events/data-export/data-export.ts +0 -86
- package/src/resources/v1/events/data-export/index.ts +0 -2
- package/src/resources/v1/events/events.ts +13 -9
- package/src/resources/v1/events/index.ts +0 -2
- package/src/resources/v1/features.ts +288 -7
- package/src/resources/v1/plans/plans.ts +62 -22
- package/src/resources/v1/products.ts +15 -7
- package/src/resources/v1/subscriptions/subscriptions.ts +68 -22
- package/src/resources/v1/usage.ts +32 -9
- 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
|
@@ -39,28 +39,6 @@ export class DataExport extends APIResource {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* Mint a scoped JWT for the FE embedded SDK. Lazy-creates the DATA_EXPORT
|
|
44
|
-
* integration if needed.
|
|
45
|
-
*/
|
|
46
|
-
mintScopedToken(
|
|
47
|
-
params: DataExportMintScopedTokenParams,
|
|
48
|
-
options?: RequestOptions,
|
|
49
|
-
): APIPromise<DataExportMintScopedTokenResponse> {
|
|
50
|
-
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
51
|
-
return this._client.post('/api/v1/data-export/scoped-token', {
|
|
52
|
-
body,
|
|
53
|
-
...options,
|
|
54
|
-
headers: buildHeaders([
|
|
55
|
-
{
|
|
56
|
-
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
57
|
-
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
58
|
-
},
|
|
59
|
-
options?.headers,
|
|
60
|
-
]),
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
42
|
/**
|
|
65
43
|
* Trigger a sync for one destination or all destinations under the provider
|
|
66
44
|
* entity.
|
|
@@ -146,38 +124,6 @@ export namespace DataExportListModelsResponse {
|
|
|
146
124
|
}
|
|
147
125
|
}
|
|
148
126
|
|
|
149
|
-
/**
|
|
150
|
-
* Response object
|
|
151
|
-
*/
|
|
152
|
-
export interface DataExportMintScopedTokenResponse {
|
|
153
|
-
/**
|
|
154
|
-
* Scoped token + expiry + provider-specific metadata for the FE SDK.
|
|
155
|
-
*/
|
|
156
|
-
data: DataExportMintScopedTokenResponse.Data;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export namespace DataExportMintScopedTokenResponse {
|
|
160
|
-
/**
|
|
161
|
-
* Scoped token + expiry + provider-specific metadata for the FE SDK.
|
|
162
|
-
*/
|
|
163
|
-
export interface Data {
|
|
164
|
-
/**
|
|
165
|
-
* Provider scoped JWT
|
|
166
|
-
*/
|
|
167
|
-
token: string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* ISO8601 token expiry
|
|
171
|
-
*/
|
|
172
|
-
expiresAt: string;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Provider-specific extras the FE embedded SDK needs
|
|
176
|
-
*/
|
|
177
|
-
providerMetadata: { [key: string]: unknown };
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
127
|
/**
|
|
182
128
|
* Response object
|
|
183
129
|
*/
|
|
@@ -242,36 +188,6 @@ export interface DataExportListModelsParams {
|
|
|
242
188
|
'X-ENVIRONMENT-ID'?: string;
|
|
243
189
|
}
|
|
244
190
|
|
|
245
|
-
export interface DataExportMintScopedTokenParams {
|
|
246
|
-
/**
|
|
247
|
-
* Body param: FE origin the resulting JWT is bound to (provider-side anti-fraud)
|
|
248
|
-
*/
|
|
249
|
-
applicationOrigin: string;
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Body param: Pin the token to a specific warehouse connect flow
|
|
253
|
-
*/
|
|
254
|
-
destinationType?: string;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Body param
|
|
258
|
-
*/
|
|
259
|
-
enabledModels?: Array<string>;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
263
|
-
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
264
|
-
*/
|
|
265
|
-
'X-ACCOUNT-ID'?: string;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Header param: Environment ID — required when authenticating with a user JWT
|
|
269
|
-
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
270
|
-
* intrinsic to the key).
|
|
271
|
-
*/
|
|
272
|
-
'X-ENVIRONMENT-ID'?: string;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
191
|
export interface DataExportTriggerSyncParams {
|
|
276
192
|
/**
|
|
277
193
|
* Body param: Provider destination ID to sync. Omit to sync all destinations.
|
|
@@ -297,10 +213,8 @@ DataExport.Destinations = Destinations;
|
|
|
297
213
|
export declare namespace DataExport {
|
|
298
214
|
export {
|
|
299
215
|
type DataExportListModelsResponse as DataExportListModelsResponse,
|
|
300
|
-
type DataExportMintScopedTokenResponse as DataExportMintScopedTokenResponse,
|
|
301
216
|
type DataExportTriggerSyncResponse as DataExportTriggerSyncResponse,
|
|
302
217
|
type DataExportListModelsParams as DataExportListModelsParams,
|
|
303
|
-
type DataExportMintScopedTokenParams as DataExportMintScopedTokenParams,
|
|
304
218
|
type DataExportTriggerSyncParams as DataExportTriggerSyncParams,
|
|
305
219
|
};
|
|
306
220
|
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
export {
|
|
4
4
|
DataExport,
|
|
5
5
|
type DataExportListModelsResponse,
|
|
6
|
-
type DataExportMintScopedTokenResponse,
|
|
7
6
|
type DataExportTriggerSyncResponse,
|
|
8
7
|
type DataExportListModelsParams,
|
|
9
|
-
type DataExportMintScopedTokenParams,
|
|
10
8
|
type DataExportTriggerSyncParams,
|
|
11
9
|
} from './data-export';
|
|
12
10
|
export {
|
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
DataExport,
|
|
9
9
|
DataExportListModelsParams,
|
|
10
10
|
DataExportListModelsResponse,
|
|
11
|
-
DataExportMintScopedTokenParams,
|
|
12
|
-
DataExportMintScopedTokenResponse,
|
|
13
11
|
DataExportTriggerSyncParams,
|
|
14
12
|
DataExportTriggerSyncResponse,
|
|
15
13
|
} from './data-export/data-export';
|
|
@@ -45,8 +43,8 @@ export class Events extends APIResource {
|
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
/**
|
|
48
|
-
* Reports raw usage events for event-based metering. Events are
|
|
49
|
-
*
|
|
46
|
+
* Reports raw usage events for event-based metering. Events are validated and
|
|
47
|
+
* stored synchronously, then aggregated into usage totals asynchronously.
|
|
50
48
|
*/
|
|
51
49
|
report(params: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse> {
|
|
52
50
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -172,7 +170,10 @@ export interface EventEstimateParams {
|
|
|
172
170
|
dimensions?: { [key: string]: string | number | boolean };
|
|
173
171
|
|
|
174
172
|
/**
|
|
175
|
-
* Body param:
|
|
173
|
+
* Body param: The customer resource this usage applies to. Optional — only
|
|
174
|
+
* required if the customer has multiple resources (for example, one subscription
|
|
175
|
+
* per workspace or site) and usage needs to be tracked separately per resource;
|
|
176
|
+
* omit it to report usage at the customer level.
|
|
176
177
|
*/
|
|
177
178
|
resourceId?: string | null;
|
|
178
179
|
|
|
@@ -226,7 +227,9 @@ export namespace EventReportParams {
|
|
|
226
227
|
eventName: string;
|
|
227
228
|
|
|
228
229
|
/**
|
|
229
|
-
*
|
|
230
|
+
* A key you provide to safely retry the same usage report without double-counting
|
|
231
|
+
* it. Reports with a previously-seen idempotency key are deduplicated for 7 days;
|
|
232
|
+
* after that window a retry is treated as new usage.
|
|
230
233
|
*/
|
|
231
234
|
idempotencyKey: string;
|
|
232
235
|
|
|
@@ -236,7 +239,10 @@ export namespace EventReportParams {
|
|
|
236
239
|
dimensions?: { [key: string]: string | number | boolean };
|
|
237
240
|
|
|
238
241
|
/**
|
|
239
|
-
*
|
|
242
|
+
* The customer resource this usage applies to. Optional — only required if the
|
|
243
|
+
* customer has multiple resources (for example, one subscription per workspace or
|
|
244
|
+
* site) and usage needs to be tracked separately per resource; omit it to report
|
|
245
|
+
* usage at the customer level.
|
|
240
246
|
*/
|
|
241
247
|
resourceId?: string | null;
|
|
242
248
|
|
|
@@ -261,10 +267,8 @@ export declare namespace Events {
|
|
|
261
267
|
export {
|
|
262
268
|
DataExport as DataExport,
|
|
263
269
|
type DataExportListModelsResponse as DataExportListModelsResponse,
|
|
264
|
-
type DataExportMintScopedTokenResponse as DataExportMintScopedTokenResponse,
|
|
265
270
|
type DataExportTriggerSyncResponse as DataExportTriggerSyncResponse,
|
|
266
271
|
type DataExportListModelsParams as DataExportListModelsParams,
|
|
267
|
-
type DataExportMintScopedTokenParams as DataExportMintScopedTokenParams,
|
|
268
272
|
type DataExportTriggerSyncParams as DataExportTriggerSyncParams,
|
|
269
273
|
};
|
|
270
274
|
|
|
@@ -4,10 +4,8 @@ export { Beta } from './beta/index';
|
|
|
4
4
|
export {
|
|
5
5
|
DataExport,
|
|
6
6
|
type DataExportListModelsResponse,
|
|
7
|
-
type DataExportMintScopedTokenResponse,
|
|
8
7
|
type DataExportTriggerSyncResponse,
|
|
9
8
|
type DataExportListModelsParams,
|
|
10
|
-
type DataExportMintScopedTokenParams,
|
|
11
9
|
type DataExportTriggerSyncParams,
|
|
12
10
|
} from './data-export/index';
|
|
13
11
|
export {
|
|
@@ -185,7 +185,8 @@ export namespace Feature {
|
|
|
185
185
|
featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
|
-
* The type of the feature
|
|
188
|
+
* The type of the feature: BOOLEAN (on/off access), NUMBER (a numeric limit or
|
|
189
|
+
* quantity), or ENUM (one of a fixed set of values).
|
|
189
190
|
*/
|
|
190
191
|
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
191
192
|
|
|
@@ -205,7 +206,16 @@ export namespace Feature {
|
|
|
205
206
|
metadata: { [key: string]: string };
|
|
206
207
|
|
|
207
208
|
/**
|
|
208
|
-
*
|
|
209
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
210
|
+
*/
|
|
211
|
+
meter: Data.Meter | null;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* How usage accumulates for this feature. `Incremental` and `Fluctuating` features
|
|
215
|
+
* track usage from reported events; `None` means the feature's value isn't
|
|
216
|
+
* usage-tracked — it's just a numeric or enum value carried by the plan (for
|
|
217
|
+
* example, a seat count or a tier setting) rather than something customers
|
|
218
|
+
* consume.
|
|
209
219
|
*/
|
|
210
220
|
meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
|
|
211
221
|
|
|
@@ -233,6 +243,84 @@ export namespace Feature {
|
|
|
233
243
|
value: string;
|
|
234
244
|
}
|
|
235
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
248
|
+
*/
|
|
249
|
+
export interface Meter {
|
|
250
|
+
/**
|
|
251
|
+
* How the matching events are aggregated into a usage value
|
|
252
|
+
*/
|
|
253
|
+
aggregation: Meter.Aggregation;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Event filters. Conditions within a filter are ANDed, and filters are ORed
|
|
257
|
+
*/
|
|
258
|
+
filters: Array<Meter.Filter>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export namespace Meter {
|
|
262
|
+
/**
|
|
263
|
+
* How the matching events are aggregated into a usage value
|
|
264
|
+
*/
|
|
265
|
+
export interface Aggregation {
|
|
266
|
+
/**
|
|
267
|
+
* Aggregation function applied to the matching events
|
|
268
|
+
*/
|
|
269
|
+
function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Aggregation field name
|
|
273
|
+
*/
|
|
274
|
+
field?: string | null;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* A set of conditions an event must all match
|
|
279
|
+
*/
|
|
280
|
+
export interface Filter {
|
|
281
|
+
/**
|
|
282
|
+
* Conditions the event must match
|
|
283
|
+
*/
|
|
284
|
+
conditions: Array<Filter.Condition>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export namespace Filter {
|
|
288
|
+
/**
|
|
289
|
+
* Meter filter condition
|
|
290
|
+
*/
|
|
291
|
+
export interface Condition {
|
|
292
|
+
/**
|
|
293
|
+
* Condition field name
|
|
294
|
+
*/
|
|
295
|
+
field: string;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Comparison applied to the condition field
|
|
299
|
+
*/
|
|
300
|
+
operation:
|
|
301
|
+
| 'EQUALS'
|
|
302
|
+
| 'NOT_EQUALS'
|
|
303
|
+
| 'GREATER_THAN'
|
|
304
|
+
| 'GREATER_THAN_OR_EQUAL'
|
|
305
|
+
| 'LESS_THAN'
|
|
306
|
+
| 'LESS_THAN_OR_EQUAL'
|
|
307
|
+
| 'IS_NULL'
|
|
308
|
+
| 'IS_NOT_NULL'
|
|
309
|
+
| 'CONTAINS'
|
|
310
|
+
| 'STARTS_WITH'
|
|
311
|
+
| 'ENDS_WITH'
|
|
312
|
+
| 'IN';
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Condition value
|
|
316
|
+
*/
|
|
317
|
+
value?: string | null;
|
|
318
|
+
|
|
319
|
+
values?: Array<string> | null;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
236
324
|
/**
|
|
237
325
|
* Unit transformation to be applied to the reported usage
|
|
238
326
|
*/
|
|
@@ -295,7 +383,8 @@ export interface FeatureListFeaturesResponse {
|
|
|
295
383
|
featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
296
384
|
|
|
297
385
|
/**
|
|
298
|
-
* The type of the feature
|
|
386
|
+
* The type of the feature: BOOLEAN (on/off access), NUMBER (a numeric limit or
|
|
387
|
+
* quantity), or ENUM (one of a fixed set of values).
|
|
299
388
|
*/
|
|
300
389
|
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
301
390
|
|
|
@@ -315,7 +404,16 @@ export interface FeatureListFeaturesResponse {
|
|
|
315
404
|
metadata: { [key: string]: string };
|
|
316
405
|
|
|
317
406
|
/**
|
|
318
|
-
*
|
|
407
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
408
|
+
*/
|
|
409
|
+
meter: FeatureListFeaturesResponse.Meter | null;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* How usage accumulates for this feature. `Incremental` and `Fluctuating` features
|
|
413
|
+
* track usage from reported events; `None` means the feature's value isn't
|
|
414
|
+
* usage-tracked — it's just a numeric or enum value carried by the plan (for
|
|
415
|
+
* example, a seat count or a tier setting) rather than something customers
|
|
416
|
+
* consume.
|
|
319
417
|
*/
|
|
320
418
|
meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
|
|
321
419
|
|
|
@@ -343,6 +441,84 @@ export namespace FeatureListFeaturesResponse {
|
|
|
343
441
|
value: string;
|
|
344
442
|
}
|
|
345
443
|
|
|
444
|
+
/**
|
|
445
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
446
|
+
*/
|
|
447
|
+
export interface Meter {
|
|
448
|
+
/**
|
|
449
|
+
* How the matching events are aggregated into a usage value
|
|
450
|
+
*/
|
|
451
|
+
aggregation: Meter.Aggregation;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Event filters. Conditions within a filter are ANDed, and filters are ORed
|
|
455
|
+
*/
|
|
456
|
+
filters: Array<Meter.Filter>;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export namespace Meter {
|
|
460
|
+
/**
|
|
461
|
+
* How the matching events are aggregated into a usage value
|
|
462
|
+
*/
|
|
463
|
+
export interface Aggregation {
|
|
464
|
+
/**
|
|
465
|
+
* Aggregation function applied to the matching events
|
|
466
|
+
*/
|
|
467
|
+
function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Aggregation field name
|
|
471
|
+
*/
|
|
472
|
+
field?: string | null;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* A set of conditions an event must all match
|
|
477
|
+
*/
|
|
478
|
+
export interface Filter {
|
|
479
|
+
/**
|
|
480
|
+
* Conditions the event must match
|
|
481
|
+
*/
|
|
482
|
+
conditions: Array<Filter.Condition>;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export namespace Filter {
|
|
486
|
+
/**
|
|
487
|
+
* Meter filter condition
|
|
488
|
+
*/
|
|
489
|
+
export interface Condition {
|
|
490
|
+
/**
|
|
491
|
+
* Condition field name
|
|
492
|
+
*/
|
|
493
|
+
field: string;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Comparison applied to the condition field
|
|
497
|
+
*/
|
|
498
|
+
operation:
|
|
499
|
+
| 'EQUALS'
|
|
500
|
+
| 'NOT_EQUALS'
|
|
501
|
+
| 'GREATER_THAN'
|
|
502
|
+
| 'GREATER_THAN_OR_EQUAL'
|
|
503
|
+
| 'LESS_THAN'
|
|
504
|
+
| 'LESS_THAN_OR_EQUAL'
|
|
505
|
+
| 'IS_NULL'
|
|
506
|
+
| 'IS_NOT_NULL'
|
|
507
|
+
| 'CONTAINS'
|
|
508
|
+
| 'STARTS_WITH'
|
|
509
|
+
| 'ENDS_WITH'
|
|
510
|
+
| 'IN';
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Condition value
|
|
514
|
+
*/
|
|
515
|
+
value?: string | null;
|
|
516
|
+
|
|
517
|
+
values?: Array<string> | null;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
346
522
|
/**
|
|
347
523
|
* Unit transformation to be applied to the reported usage
|
|
348
524
|
*/
|
|
@@ -396,7 +572,8 @@ export interface FeatureCreateFeatureParams {
|
|
|
396
572
|
displayName: string;
|
|
397
573
|
|
|
398
574
|
/**
|
|
399
|
-
* Body param: The type of the feature
|
|
575
|
+
* Body param: The type of the feature: BOOLEAN (on/off access), NUMBER (a numeric
|
|
576
|
+
* limit or quantity), or ENUM (one of a fixed set of values).
|
|
400
577
|
*/
|
|
401
578
|
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
402
579
|
|
|
@@ -431,7 +608,17 @@ export interface FeatureCreateFeatureParams {
|
|
|
431
608
|
metadata?: { [key: string]: string };
|
|
432
609
|
|
|
433
610
|
/**
|
|
434
|
-
* Body param:
|
|
611
|
+
* Body param: Event meter that turns reported events into usage for a metered
|
|
612
|
+
* feature
|
|
613
|
+
*/
|
|
614
|
+
meter?: FeatureCreateFeatureParams.Meter;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Body param: How usage accumulates for this feature. `Incremental` and
|
|
618
|
+
* `Fluctuating` features track usage from reported events; `None` means the
|
|
619
|
+
* feature's value isn't usage-tracked — it's just a numeric or enum value carried
|
|
620
|
+
* by the plan (for example, a seat count or a tier setting) rather than something
|
|
621
|
+
* customers consume.
|
|
435
622
|
*/
|
|
436
623
|
meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
|
|
437
624
|
|
|
@@ -467,6 +654,78 @@ export namespace FeatureCreateFeatureParams {
|
|
|
467
654
|
value: string;
|
|
468
655
|
}
|
|
469
656
|
|
|
657
|
+
/**
|
|
658
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
659
|
+
*/
|
|
660
|
+
export interface Meter {
|
|
661
|
+
/**
|
|
662
|
+
* How the matching events are aggregated into a usage value
|
|
663
|
+
*/
|
|
664
|
+
aggregation: Meter.Aggregation;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Event filters. Conditions within a filter are ANDed, and filters are ORed
|
|
668
|
+
*/
|
|
669
|
+
filters: Array<Meter.Filter>;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export namespace Meter {
|
|
673
|
+
/**
|
|
674
|
+
* How the matching events are aggregated into a usage value
|
|
675
|
+
*/
|
|
676
|
+
export interface Aggregation {
|
|
677
|
+
/**
|
|
678
|
+
* Aggregation function applied to the matching events
|
|
679
|
+
*/
|
|
680
|
+
function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Aggregation field name
|
|
684
|
+
*/
|
|
685
|
+
field?: string;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export interface Filter {
|
|
689
|
+
/**
|
|
690
|
+
* Conditions the event must match
|
|
691
|
+
*/
|
|
692
|
+
conditions: Array<Filter.Condition>;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export namespace Filter {
|
|
696
|
+
export interface Condition {
|
|
697
|
+
/**
|
|
698
|
+
* Condition field name
|
|
699
|
+
*/
|
|
700
|
+
field: string;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Comparison applied to the condition field
|
|
704
|
+
*/
|
|
705
|
+
operation:
|
|
706
|
+
| 'EQUALS'
|
|
707
|
+
| 'NOT_EQUALS'
|
|
708
|
+
| 'GREATER_THAN'
|
|
709
|
+
| 'GREATER_THAN_OR_EQUAL'
|
|
710
|
+
| 'LESS_THAN'
|
|
711
|
+
| 'LESS_THAN_OR_EQUAL'
|
|
712
|
+
| 'IS_NULL'
|
|
713
|
+
| 'IS_NOT_NULL'
|
|
714
|
+
| 'CONTAINS'
|
|
715
|
+
| 'STARTS_WITH'
|
|
716
|
+
| 'ENDS_WITH'
|
|
717
|
+
| 'IN';
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Condition value
|
|
721
|
+
*/
|
|
722
|
+
value?: string;
|
|
723
|
+
|
|
724
|
+
values?: Array<string>;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
470
729
|
/**
|
|
471
730
|
* Unit transformation to be applied to the reported usage
|
|
472
731
|
*/
|
|
@@ -625,7 +884,8 @@ export interface FeatureUpdateFeatureParams {
|
|
|
625
884
|
metadata?: { [key: string]: string };
|
|
626
885
|
|
|
627
886
|
/**
|
|
628
|
-
* Body param
|
|
887
|
+
* Body param: Event meter that turns reported events into usage for a metered
|
|
888
|
+
* feature
|
|
629
889
|
*/
|
|
630
890
|
meter?: FeatureUpdateFeatureParams.Meter;
|
|
631
891
|
|
|
@@ -661,14 +921,29 @@ export namespace FeatureUpdateFeatureParams {
|
|
|
661
921
|
value: string;
|
|
662
922
|
}
|
|
663
923
|
|
|
924
|
+
/**
|
|
925
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
926
|
+
*/
|
|
664
927
|
export interface Meter {
|
|
928
|
+
/**
|
|
929
|
+
* How the matching events are aggregated into a usage value
|
|
930
|
+
*/
|
|
665
931
|
aggregation: Meter.Aggregation;
|
|
666
932
|
|
|
933
|
+
/**
|
|
934
|
+
* Event filters. Conditions within a filter are ANDed, and filters are ORed
|
|
935
|
+
*/
|
|
667
936
|
filters: Array<Meter.Filter>;
|
|
668
937
|
}
|
|
669
938
|
|
|
670
939
|
export namespace Meter {
|
|
940
|
+
/**
|
|
941
|
+
* How the matching events are aggregated into a usage value
|
|
942
|
+
*/
|
|
671
943
|
export interface Aggregation {
|
|
944
|
+
/**
|
|
945
|
+
* Aggregation function applied to the matching events
|
|
946
|
+
*/
|
|
672
947
|
function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
|
|
673
948
|
|
|
674
949
|
/**
|
|
@@ -678,6 +953,9 @@ export namespace FeatureUpdateFeatureParams {
|
|
|
678
953
|
}
|
|
679
954
|
|
|
680
955
|
export interface Filter {
|
|
956
|
+
/**
|
|
957
|
+
* Conditions the event must match
|
|
958
|
+
*/
|
|
681
959
|
conditions: Array<Filter.Condition>;
|
|
682
960
|
}
|
|
683
961
|
|
|
@@ -688,6 +966,9 @@ export namespace FeatureUpdateFeatureParams {
|
|
|
688
966
|
*/
|
|
689
967
|
field: string;
|
|
690
968
|
|
|
969
|
+
/**
|
|
970
|
+
* Comparison applied to the condition field
|
|
971
|
+
*/
|
|
691
972
|
operation:
|
|
692
973
|
| 'EQUALS'
|
|
693
974
|
| 'NOT_EQUALS'
|