@openmeter/sdk 1.0.0-beta.120 → 1.0.0-beta.122
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/dist/cjs/clients/client.d.cts +0 -3
- package/dist/cjs/clients/subject.cjs +4 -4
- package/dist/cjs/clients/subject.d.cts +2 -2
- package/dist/cjs/clients/subject.js.map +1 -1
- package/dist/cjs/schemas/openapi.d.cts +692 -7
- package/dist/cjs/tsconfig.8a0ebfeb.tsbuildinfo +1 -0
- package/dist/cjs/tsconfig.a848f333.tsbuildinfo +1 -0
- package/dist/clients/client.d.ts +0 -3
- package/dist/clients/subject.d.ts +2 -2
- package/dist/clients/subject.js +4 -4
- package/dist/clients/subject.js.map +1 -1
- package/dist/schemas/openapi.d.ts +692 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/dist/cjs/tsconfig.977805fc.tsbuildinfo +0 -1
- package/dist/cjs/tsconfig.f9628b0e.tsbuildinfo +0 -1
|
@@ -205,10 +205,10 @@ export interface paths {
|
|
|
205
205
|
*/
|
|
206
206
|
delete: operations['deleteEntitlement'];
|
|
207
207
|
};
|
|
208
|
-
'/api/v1/subjects/{subjectIdOrKey}/entitlements/{
|
|
208
|
+
'/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants': {
|
|
209
209
|
/**
|
|
210
210
|
* List grants for an entitlement
|
|
211
|
-
* @description List all grants issued for an entitlement.
|
|
211
|
+
* @description List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.
|
|
212
212
|
*/
|
|
213
213
|
get: operations['listEntitlementGrants'];
|
|
214
214
|
/**
|
|
@@ -264,6 +264,78 @@ export interface paths {
|
|
|
264
264
|
*/
|
|
265
265
|
get: operations['getDebugMetrics'];
|
|
266
266
|
};
|
|
267
|
+
'/api/v1/notification/channels': {
|
|
268
|
+
/**
|
|
269
|
+
* List notification channels
|
|
270
|
+
* @description List all notification channels.
|
|
271
|
+
*/
|
|
272
|
+
get: operations['listNotificationChannels'];
|
|
273
|
+
/**
|
|
274
|
+
* Create a notification channel
|
|
275
|
+
* @description Create a new notification channel.
|
|
276
|
+
*/
|
|
277
|
+
post: operations['createNotificationChannel'];
|
|
278
|
+
};
|
|
279
|
+
'/api/v1/notification/channels/{channelId}': {
|
|
280
|
+
/**
|
|
281
|
+
* Get notification channel
|
|
282
|
+
* @description Get a notification channel by id.
|
|
283
|
+
*/
|
|
284
|
+
get: operations['getNotificationChannel'];
|
|
285
|
+
/**
|
|
286
|
+
* Update notification channel
|
|
287
|
+
* @description Update a notification channel by id.
|
|
288
|
+
*/
|
|
289
|
+
put: operations['updateNotificationChannel'];
|
|
290
|
+
/**
|
|
291
|
+
* Delete a notification channel
|
|
292
|
+
* @description Delete notification channel by id.
|
|
293
|
+
*/
|
|
294
|
+
delete: operations['deleteNotificationChannel'];
|
|
295
|
+
};
|
|
296
|
+
'/api/v1/notification/rules': {
|
|
297
|
+
/**
|
|
298
|
+
* List notification rules
|
|
299
|
+
* @description List all notification rules.
|
|
300
|
+
*/
|
|
301
|
+
get: operations['listNotificationRules'];
|
|
302
|
+
/**
|
|
303
|
+
* Create a notification rule
|
|
304
|
+
* @description Create a new notification rule.
|
|
305
|
+
*/
|
|
306
|
+
post: operations['createNotificationRule'];
|
|
307
|
+
};
|
|
308
|
+
'/api/v1/notification/rules/{ruleId}': {
|
|
309
|
+
/**
|
|
310
|
+
* Get notification rule
|
|
311
|
+
* @description Get a notification rule by id.
|
|
312
|
+
*/
|
|
313
|
+
get: operations['getNotificationRule'];
|
|
314
|
+
/**
|
|
315
|
+
* Update a notification rule
|
|
316
|
+
* @description Update a notification rule by id.
|
|
317
|
+
*/
|
|
318
|
+
put: operations['updateNotificationRule'];
|
|
319
|
+
/**
|
|
320
|
+
* Delete a notification rule
|
|
321
|
+
* @description Delete notification rule by id.
|
|
322
|
+
*/
|
|
323
|
+
delete: operations['deleteNotificationRule'];
|
|
324
|
+
};
|
|
325
|
+
'/api/v1/notification/events': {
|
|
326
|
+
/**
|
|
327
|
+
* List notification evens
|
|
328
|
+
* @description List all notification events.
|
|
329
|
+
*/
|
|
330
|
+
get: operations['listNotificationEvents'];
|
|
331
|
+
};
|
|
332
|
+
'/api/v1/notification/events/{eventId}': {
|
|
333
|
+
/**
|
|
334
|
+
* Get notification event
|
|
335
|
+
* @description Get a notification event by id.
|
|
336
|
+
*/
|
|
337
|
+
get: operations['getNotificationEvent'];
|
|
338
|
+
};
|
|
267
339
|
}
|
|
268
340
|
export type webhooks = Record<string, never>;
|
|
269
341
|
export interface components {
|
|
@@ -534,6 +606,21 @@ export interface components {
|
|
|
534
606
|
*/
|
|
535
607
|
archivedAt?: string;
|
|
536
608
|
} & components['schemas']['FeatureCreateInputs'] & components['schemas']['SharedMetaFields'];
|
|
609
|
+
/** @description Limited representation of a feature resource which includes only its unique identifiers (id, key). */
|
|
610
|
+
FeatureMeta: {
|
|
611
|
+
/**
|
|
612
|
+
* @description A unique identifier for the notification rule.
|
|
613
|
+
* @example 01J2KNP1YTXQRXHTDJ4KPR7PZ0
|
|
614
|
+
*/
|
|
615
|
+
id: string;
|
|
616
|
+
/**
|
|
617
|
+
* @description The key is an immutable unique identifier of the feature used throughout the API,
|
|
618
|
+
* for example when interacting with a subject's entitlements.
|
|
619
|
+
*
|
|
620
|
+
* @example gpt4_tokens
|
|
621
|
+
*/
|
|
622
|
+
key: string;
|
|
623
|
+
};
|
|
537
624
|
EntitlementCreateSharedFields: {
|
|
538
625
|
/**
|
|
539
626
|
* @description The feature the subject is entitled to use.
|
|
@@ -1189,9 +1276,303 @@ export interface components {
|
|
|
1189
1276
|
* @example tokens_total
|
|
1190
1277
|
*/
|
|
1191
1278
|
IdOrSlug: string;
|
|
1279
|
+
NotificationChannelCreateRequest: components['schemas']['NotificationChannelWebhookCreateRequest'];
|
|
1280
|
+
NotificationChannel: components['schemas']['NotificationChannelWebhook'];
|
|
1281
|
+
NotificationChannels: components['schemas']['NotificationChannel'][];
|
|
1282
|
+
NotificationChannelWebhookCreateRequest: components['schemas']['NotificationChannelCommonCreateRequest'] & {
|
|
1283
|
+
/**
|
|
1284
|
+
* @description Webhook URL where the notification is sent.
|
|
1285
|
+
* @example https://example.com/webhook
|
|
1286
|
+
*/
|
|
1287
|
+
url: string;
|
|
1288
|
+
/**
|
|
1289
|
+
* @description Custom HTTP headers sent as part of the webhook request.
|
|
1290
|
+
* @example {
|
|
1291
|
+
* "X-CUSTOM-HEADER": "value"
|
|
1292
|
+
* }
|
|
1293
|
+
*/
|
|
1294
|
+
customHeaders?: {
|
|
1295
|
+
[key: string]: unknown;
|
|
1296
|
+
} | null;
|
|
1297
|
+
/**
|
|
1298
|
+
* @description Signing secret used for webhook request validation on the receiving end. Automatically generated if not provided.
|
|
1299
|
+
*
|
|
1300
|
+
* Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24
|
|
1301
|
+
*
|
|
1302
|
+
* @example whsec_S6g2HLnTwd9AhHwUIMFggVS9OfoPafN8
|
|
1303
|
+
*/
|
|
1304
|
+
signingSecret?: string | null;
|
|
1305
|
+
};
|
|
1306
|
+
/** @description Notification channel with webhook type. */
|
|
1307
|
+
NotificationChannelWebhook: components['schemas']['NotificationChannelCommon'] & {
|
|
1308
|
+
/**
|
|
1309
|
+
* @description Webhook URL where the notification is sent.
|
|
1310
|
+
* @example https://example.com/webhook
|
|
1311
|
+
*/
|
|
1312
|
+
url: string;
|
|
1313
|
+
/**
|
|
1314
|
+
* @description Custom HTTP headers sent as part of the webhook request.
|
|
1315
|
+
* @example {
|
|
1316
|
+
* "X-CUSTOM-HEADER": "value"
|
|
1317
|
+
* }
|
|
1318
|
+
*/
|
|
1319
|
+
customHeaders?: {
|
|
1320
|
+
[key: string]: unknown;
|
|
1321
|
+
} | null;
|
|
1322
|
+
/**
|
|
1323
|
+
* @description Signing secret used for webhook request validation on the receiving end.
|
|
1324
|
+
*
|
|
1325
|
+
* Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24
|
|
1326
|
+
*
|
|
1327
|
+
* @example whsec_S6g2HLnTwd9AhHwUIMFggVS9OfoPafN8
|
|
1328
|
+
*/
|
|
1329
|
+
signingSecret: string;
|
|
1330
|
+
};
|
|
1331
|
+
/**
|
|
1332
|
+
* @description The type of the notification channel.
|
|
1333
|
+
* @example WEBHOOK
|
|
1334
|
+
* @enum {string}
|
|
1335
|
+
*/
|
|
1336
|
+
NotificationChannelType: 'WEBHOOK';
|
|
1337
|
+
/** @description Common fields for create notification channel request. */
|
|
1338
|
+
NotificationChannelCommonCreateRequest: {
|
|
1339
|
+
/**
|
|
1340
|
+
* @description User friendly name of the channel.
|
|
1341
|
+
* @example customer-webhook
|
|
1342
|
+
*/
|
|
1343
|
+
name: string;
|
|
1344
|
+
/**
|
|
1345
|
+
* @description Whether the channel is disabled or not.
|
|
1346
|
+
* @default false
|
|
1347
|
+
* @example false
|
|
1348
|
+
*/
|
|
1349
|
+
disabled?: boolean;
|
|
1350
|
+
type: components['schemas']['NotificationChannelType'];
|
|
1351
|
+
};
|
|
1352
|
+
/** @description Limited representation of notification channel which includes only the channel identifier and its type. */
|
|
1353
|
+
NotificationChannelMeta: {
|
|
1354
|
+
/**
|
|
1355
|
+
* @description A unique identifier for the notification channel.
|
|
1356
|
+
* @example 01J2KNP1YTXQRXHTDJ4KPR7PZ0
|
|
1357
|
+
*/
|
|
1358
|
+
id: string;
|
|
1359
|
+
type: components['schemas']['NotificationChannelType'];
|
|
1360
|
+
};
|
|
1361
|
+
/** @description Common fields for notification channel resources. */
|
|
1362
|
+
NotificationChannelCommon: components['schemas']['NotificationChannelMeta'] & {
|
|
1363
|
+
/**
|
|
1364
|
+
* @description User friendly name of the channel.
|
|
1365
|
+
* @example customer-webhook
|
|
1366
|
+
*/
|
|
1367
|
+
name?: string;
|
|
1368
|
+
/**
|
|
1369
|
+
* Format: date-time
|
|
1370
|
+
* @description Timestamp when the channel was created.
|
|
1371
|
+
* @example 2023-01-01T00:00:00Z
|
|
1372
|
+
*/
|
|
1373
|
+
createdAt?: string;
|
|
1374
|
+
/**
|
|
1375
|
+
* Format: date-time
|
|
1376
|
+
* @description Timestamp when the channel was modified.
|
|
1377
|
+
* @example 2023-01-02T00:00:00Z
|
|
1378
|
+
*/
|
|
1379
|
+
updatedAt?: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* @description Whether the channel is disabled or not.
|
|
1382
|
+
* @default false
|
|
1383
|
+
* @example false
|
|
1384
|
+
*/
|
|
1385
|
+
disabled?: boolean;
|
|
1386
|
+
};
|
|
1387
|
+
NotificationRuleCreateRequest: components['schemas']['NotificationRuleBalanceThresholdCreateRequest'];
|
|
1388
|
+
NotificationRule: components['schemas']['NotificationRuleBalanceThreshold'];
|
|
1389
|
+
NotificationRules: components['schemas']['NotificationRule'][];
|
|
1390
|
+
/**
|
|
1391
|
+
* @description Request for creating new notification rule for triggering notification events base on conditions
|
|
1392
|
+
* applied to current balance of entitlements.
|
|
1393
|
+
*/
|
|
1394
|
+
NotificationRuleBalanceThresholdCreateRequest: components['schemas']['NotificationRuleCommonCreateRequest'] & {
|
|
1395
|
+
/**
|
|
1396
|
+
* @description List of thresholds the rule suppose to be triggered.
|
|
1397
|
+
* @example [
|
|
1398
|
+
* {
|
|
1399
|
+
* "value": 100,
|
|
1400
|
+
* "type": "PERCENT"
|
|
1401
|
+
* },
|
|
1402
|
+
* {
|
|
1403
|
+
* "value": 10000,
|
|
1404
|
+
* "type": "NUMBER"
|
|
1405
|
+
* }
|
|
1406
|
+
* ]
|
|
1407
|
+
*/
|
|
1408
|
+
thresholds: components['schemas']['NotificationRuleBalanceThresholdValue'][];
|
|
1409
|
+
/**
|
|
1410
|
+
* @description Optional field for defining the scope of notification by feature. It may contain features by id or key.
|
|
1411
|
+
*
|
|
1412
|
+
* @example [
|
|
1413
|
+
* "gpt4_tokens",
|
|
1414
|
+
* "01ARZ3NDEKTSV4RRFFQ69G5FAV"
|
|
1415
|
+
* ]
|
|
1416
|
+
*/
|
|
1417
|
+
features?: string[] | null;
|
|
1418
|
+
};
|
|
1419
|
+
/** @description Threshold value with multiple supported types. */
|
|
1420
|
+
NotificationRuleBalanceThresholdValue: {
|
|
1421
|
+
/** Format: double */
|
|
1422
|
+
value: number;
|
|
1423
|
+
/** @enum {string} */
|
|
1424
|
+
type: 'NUMBER' | 'PERCENT';
|
|
1425
|
+
};
|
|
1426
|
+
/** @description Notification rule for triggering notification events by applying conditions to current balance of entitlements. */
|
|
1427
|
+
NotificationRuleBalanceThreshold: components['schemas']['NotificationRuleCommon'] & {
|
|
1428
|
+
/**
|
|
1429
|
+
* @description List of thresholds the rule suppose to be triggered.
|
|
1430
|
+
* @example [
|
|
1431
|
+
* {
|
|
1432
|
+
* "value": 100,
|
|
1433
|
+
* "type": "PERCENT"
|
|
1434
|
+
* },
|
|
1435
|
+
* {
|
|
1436
|
+
* "value": 10000,
|
|
1437
|
+
* "type": "NUMBER"
|
|
1438
|
+
* }
|
|
1439
|
+
* ]
|
|
1440
|
+
*/
|
|
1441
|
+
thresholds: components['schemas']['NotificationRuleBalanceThresholdValue'][];
|
|
1442
|
+
/** @description Optional field containing list of features the rule applies to. */
|
|
1443
|
+
features?: components['schemas']['FeatureMeta'][] | null;
|
|
1444
|
+
};
|
|
1445
|
+
/**
|
|
1446
|
+
* @description The type of the notification event.
|
|
1447
|
+
* @example entitlements.balance.threshold
|
|
1448
|
+
* @enum {string}
|
|
1449
|
+
*/
|
|
1450
|
+
NotificationEventType: 'entitlements.balance.threshold';
|
|
1451
|
+
/** @description Defines the common fields for create notification rule request. */
|
|
1452
|
+
NotificationRuleCommonCreateRequest: {
|
|
1453
|
+
type: components['schemas']['NotificationEventType'];
|
|
1454
|
+
/**
|
|
1455
|
+
* @description The user friendly name of the notification rule.
|
|
1456
|
+
* @example Balance threshold reached
|
|
1457
|
+
*/
|
|
1458
|
+
name: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* @description List of notification channel identifiers or names the rule applies to.
|
|
1461
|
+
* @example [
|
|
1462
|
+
* "01G65Z755AFWAKHE12NY0CQ9FH"
|
|
1463
|
+
* ]
|
|
1464
|
+
*/
|
|
1465
|
+
channels: string[];
|
|
1466
|
+
/**
|
|
1467
|
+
* @description Whether the rule is disabled or not.
|
|
1468
|
+
* @default false
|
|
1469
|
+
* @example false
|
|
1470
|
+
*/
|
|
1471
|
+
disabled?: boolean;
|
|
1472
|
+
};
|
|
1473
|
+
/** @description Defines the common fields of a notification rule. */
|
|
1474
|
+
NotificationRuleMeta: {
|
|
1475
|
+
/**
|
|
1476
|
+
* @description A unique identifier for the notification rule.
|
|
1477
|
+
* @example 01J2KNP1YTXQRXHTDJ4KPR7PZ0
|
|
1478
|
+
*/
|
|
1479
|
+
id: string;
|
|
1480
|
+
type: components['schemas']['NotificationEventType'];
|
|
1481
|
+
};
|
|
1482
|
+
/** @description Common fields for notification rules. */
|
|
1483
|
+
NotificationRuleCommon: components['schemas']['NotificationRuleMeta'] & {
|
|
1484
|
+
/**
|
|
1485
|
+
* @description The user friendly name of the notification rule.
|
|
1486
|
+
* @example Balance threshold reached
|
|
1487
|
+
*/
|
|
1488
|
+
name?: string;
|
|
1489
|
+
/** @description List of notification channels the rule applies to. */
|
|
1490
|
+
channels?: components['schemas']['NotificationChannelMeta'][];
|
|
1491
|
+
/**
|
|
1492
|
+
* Format: date-time
|
|
1493
|
+
* @description Timestamp when the rule was created.
|
|
1494
|
+
* @example 2023-01-01T00:00:00Z
|
|
1495
|
+
*/
|
|
1496
|
+
createdAt?: string;
|
|
1497
|
+
/**
|
|
1498
|
+
* Format: date-time
|
|
1499
|
+
* @description Timestamp when the rule was modified.
|
|
1500
|
+
* @example 2023-01-02T00:00:00Z
|
|
1501
|
+
*/
|
|
1502
|
+
updatedAt?: string;
|
|
1503
|
+
/**
|
|
1504
|
+
* @description Whether the rule is disabled or not.
|
|
1505
|
+
* @default false
|
|
1506
|
+
* @example false
|
|
1507
|
+
*/
|
|
1508
|
+
disabled?: boolean;
|
|
1509
|
+
};
|
|
1510
|
+
/**
|
|
1511
|
+
* @description Notification event generated by the system based on the criteria defined in the corresponding
|
|
1512
|
+
* a notification rule.
|
|
1513
|
+
*
|
|
1514
|
+
* The `payload` field contains the actual message sent to the notification channel.
|
|
1515
|
+
*/
|
|
1516
|
+
NotificationEvent: {
|
|
1517
|
+
/**
|
|
1518
|
+
* @description A unique identifier for the notification event.
|
|
1519
|
+
* @example 01J2KNP1YTXQRXHTDJ4KPR7PZ0
|
|
1520
|
+
*/
|
|
1521
|
+
id: string;
|
|
1522
|
+
/**
|
|
1523
|
+
* Format: date-time
|
|
1524
|
+
* @description Timestamp when the notification event was created.
|
|
1525
|
+
* @example 2023-01-01T00:00:00Z
|
|
1526
|
+
*/
|
|
1527
|
+
createdAt: string;
|
|
1528
|
+
rule?: components['schemas']['NotificationRuleMeta'];
|
|
1529
|
+
/** @description The delivery status of the notification event. */
|
|
1530
|
+
deliveryStatus: components['schemas']['NotificationEventDeliveryStatus'][];
|
|
1531
|
+
payload: components['schemas']['NotificationEventPayload'];
|
|
1532
|
+
};
|
|
1533
|
+
/** @description The actual payload sent to channel as part of the notification event. */
|
|
1534
|
+
NotificationEventPayload: components['schemas']['NotificationEventBalanceThresholdPayload'];
|
|
1535
|
+
/** @description Common fields for notification event payload. */
|
|
1536
|
+
NotificationEventCommonPayload: {
|
|
1537
|
+
/**
|
|
1538
|
+
* @description A unique identifier for the notification event the payload belongs to.
|
|
1539
|
+
* @example 01J2KNP1YTXQRXHTDJ4KPR7PZ0
|
|
1540
|
+
*/
|
|
1541
|
+
id: string;
|
|
1542
|
+
type: components['schemas']['NotificationEventType'];
|
|
1543
|
+
/**
|
|
1544
|
+
* Format: date-time
|
|
1545
|
+
* @description Timestamp when the notification event was created.
|
|
1546
|
+
* @example 2023-01-01T00:00:00Z
|
|
1547
|
+
*/
|
|
1548
|
+
timestamp: string;
|
|
1549
|
+
};
|
|
1550
|
+
/**
|
|
1551
|
+
* @description Defines payload for notification event which is triggered when the `balance` of the `entitlement`
|
|
1552
|
+
* surpass the user defined `threshold`.
|
|
1553
|
+
*/
|
|
1554
|
+
NotificationEventBalanceThresholdPayload: components['schemas']['NotificationEventCommonPayload'] & {
|
|
1555
|
+
data: {
|
|
1556
|
+
entitlement: components['schemas']['EntitlementMetered'];
|
|
1557
|
+
feature: components['schemas']['Feature'];
|
|
1558
|
+
subject: components['schemas']['Subject'];
|
|
1559
|
+
balance: components['schemas']['EntitlementValue'];
|
|
1560
|
+
threshold: components['schemas']['NotificationRuleBalanceThresholdValue'];
|
|
1561
|
+
};
|
|
1562
|
+
};
|
|
1563
|
+
NotificationEventDeliveryStatus: {
|
|
1564
|
+
channel: components['schemas']['NotificationChannelMeta'];
|
|
1565
|
+
/** @enum {string} */
|
|
1566
|
+
state: 'SUCCESS' | 'FAILED' | 'SENDING';
|
|
1567
|
+
/**
|
|
1568
|
+
* Format: date-time
|
|
1569
|
+
* @example 2023-01-01T00:00:00Z
|
|
1570
|
+
*/
|
|
1571
|
+
updatedAt: string;
|
|
1572
|
+
};
|
|
1192
1573
|
};
|
|
1193
1574
|
responses: {
|
|
1194
|
-
/** @description
|
|
1575
|
+
/** @description Conflict */
|
|
1195
1576
|
ConflictProblemResponse: {
|
|
1196
1577
|
content: {
|
|
1197
1578
|
'application/problem+json': components['schemas']['ConflictProblem'];
|
|
@@ -1267,9 +1648,15 @@ export interface components {
|
|
|
1267
1648
|
/**
|
|
1268
1649
|
* @description Filtering by multiple subjects.
|
|
1269
1650
|
*
|
|
1270
|
-
* Usage:
|
|
1651
|
+
* Usage: `?subject=customer-1&subject=customer-2`
|
|
1271
1652
|
*/
|
|
1272
1653
|
queryFilterSubject?: string[];
|
|
1654
|
+
/**
|
|
1655
|
+
* @description Filtering by multiple features.
|
|
1656
|
+
*
|
|
1657
|
+
* Usage: `?feature=feature-1&feature=feature-2`
|
|
1658
|
+
*/
|
|
1659
|
+
queryFilterFeature?: string[];
|
|
1273
1660
|
queryFilterGroupBy?: {
|
|
1274
1661
|
[key: string]: string;
|
|
1275
1662
|
};
|
|
@@ -1278,6 +1665,14 @@ export interface components {
|
|
|
1278
1665
|
* `subject` is a reserved group by value.
|
|
1279
1666
|
*/
|
|
1280
1667
|
queryGroupBy?: string[];
|
|
1668
|
+
/** @description A unique ULID identifier for a notification channel. */
|
|
1669
|
+
channelId: string;
|
|
1670
|
+
/** @description A unique ULID identifier for a notification rule. */
|
|
1671
|
+
ruleId: string;
|
|
1672
|
+
/** @description A unique ULID identifier for a notification event. */
|
|
1673
|
+
eventId: string;
|
|
1674
|
+
/** @description Include disabled entries. */
|
|
1675
|
+
queryIncludeDisabled?: boolean;
|
|
1281
1676
|
};
|
|
1282
1677
|
requestBodies: never;
|
|
1283
1678
|
headers: never;
|
|
@@ -1976,7 +2371,7 @@ export interface operations {
|
|
|
1976
2371
|
};
|
|
1977
2372
|
/**
|
|
1978
2373
|
* List grants for an entitlement
|
|
1979
|
-
* @description List all grants issued for an entitlement.
|
|
2374
|
+
* @description List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.
|
|
1980
2375
|
*/
|
|
1981
2376
|
listEntitlementGrants: {
|
|
1982
2377
|
parameters: {
|
|
@@ -1987,7 +2382,7 @@ export interface operations {
|
|
|
1987
2382
|
};
|
|
1988
2383
|
path: {
|
|
1989
2384
|
subjectIdOrKey: components['parameters']['subjectIdOrKey'];
|
|
1990
|
-
|
|
2385
|
+
entitlementIdOrFeatureKey: components['parameters']['entitlementIdOrFeatureKey'];
|
|
1991
2386
|
};
|
|
1992
2387
|
};
|
|
1993
2388
|
responses: {
|
|
@@ -2019,7 +2414,7 @@ export interface operations {
|
|
|
2019
2414
|
parameters: {
|
|
2020
2415
|
path: {
|
|
2021
2416
|
subjectIdOrKey: components['parameters']['subjectIdOrKey'];
|
|
2022
|
-
|
|
2417
|
+
entitlementIdOrFeatureKey: components['parameters']['entitlementIdOrFeatureKey'];
|
|
2023
2418
|
};
|
|
2024
2419
|
};
|
|
2025
2420
|
/** @description The grant to create. */
|
|
@@ -2175,4 +2570,294 @@ export interface operations {
|
|
|
2175
2570
|
default: components['responses']['UnexpectedProblemResponse'];
|
|
2176
2571
|
};
|
|
2177
2572
|
};
|
|
2573
|
+
/**
|
|
2574
|
+
* List notification channels
|
|
2575
|
+
* @description List all notification channels.
|
|
2576
|
+
*/
|
|
2577
|
+
listNotificationChannels: {
|
|
2578
|
+
parameters: {
|
|
2579
|
+
query?: {
|
|
2580
|
+
limit?: components['parameters']['queryLimit'];
|
|
2581
|
+
offset?: components['parameters']['queryOffset'];
|
|
2582
|
+
/** @description Order by field */
|
|
2583
|
+
orderBy?: 'id' | 'type' | 'createdAt' | 'updatedAt';
|
|
2584
|
+
includeDisabled?: components['parameters']['queryIncludeDisabled'];
|
|
2585
|
+
};
|
|
2586
|
+
};
|
|
2587
|
+
responses: {
|
|
2588
|
+
/** @description List of notification channels. */
|
|
2589
|
+
200: {
|
|
2590
|
+
content: {
|
|
2591
|
+
'application/json': components['schemas']['NotificationChannels'];
|
|
2592
|
+
};
|
|
2593
|
+
};
|
|
2594
|
+
400: components['responses']['BadRequestProblemResponse'];
|
|
2595
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2596
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2597
|
+
};
|
|
2598
|
+
};
|
|
2599
|
+
/**
|
|
2600
|
+
* Create a notification channel
|
|
2601
|
+
* @description Create a new notification channel.
|
|
2602
|
+
*/
|
|
2603
|
+
createNotificationChannel: {
|
|
2604
|
+
/** @description The notification channel to create. */
|
|
2605
|
+
requestBody: {
|
|
2606
|
+
content: {
|
|
2607
|
+
'application/json': components['schemas']['NotificationChannelCreateRequest'];
|
|
2608
|
+
};
|
|
2609
|
+
};
|
|
2610
|
+
responses: {
|
|
2611
|
+
/** @description Notification channel created. */
|
|
2612
|
+
201: {
|
|
2613
|
+
content: {
|
|
2614
|
+
'application/json': components['schemas']['NotificationChannel'];
|
|
2615
|
+
};
|
|
2616
|
+
};
|
|
2617
|
+
400: components['responses']['BadRequestProblemResponse'];
|
|
2618
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2619
|
+
409: components['responses']['ConflictProblemResponse'];
|
|
2620
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2621
|
+
};
|
|
2622
|
+
};
|
|
2623
|
+
/**
|
|
2624
|
+
* Get notification channel
|
|
2625
|
+
* @description Get a notification channel by id.
|
|
2626
|
+
*/
|
|
2627
|
+
getNotificationChannel: {
|
|
2628
|
+
parameters: {
|
|
2629
|
+
path: {
|
|
2630
|
+
channelId: components['parameters']['channelId'];
|
|
2631
|
+
};
|
|
2632
|
+
};
|
|
2633
|
+
responses: {
|
|
2634
|
+
/** @description Notification channel found. */
|
|
2635
|
+
200: {
|
|
2636
|
+
content: {
|
|
2637
|
+
'application/json': components['schemas']['NotificationChannel'];
|
|
2638
|
+
};
|
|
2639
|
+
};
|
|
2640
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2641
|
+
404: components['responses']['NotFoundProblemResponse'];
|
|
2642
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2643
|
+
};
|
|
2644
|
+
};
|
|
2645
|
+
/**
|
|
2646
|
+
* Update notification channel
|
|
2647
|
+
* @description Update a notification channel by id.
|
|
2648
|
+
*/
|
|
2649
|
+
updateNotificationChannel: {
|
|
2650
|
+
parameters: {
|
|
2651
|
+
path: {
|
|
2652
|
+
channelId: components['parameters']['channelId'];
|
|
2653
|
+
};
|
|
2654
|
+
};
|
|
2655
|
+
/** @description The notification channel to update. */
|
|
2656
|
+
requestBody: {
|
|
2657
|
+
content: {
|
|
2658
|
+
'application/json': components['schemas']['NotificationChannelCreateRequest'];
|
|
2659
|
+
};
|
|
2660
|
+
};
|
|
2661
|
+
responses: {
|
|
2662
|
+
/** @description Notification channel updated. */
|
|
2663
|
+
200: {
|
|
2664
|
+
content: {
|
|
2665
|
+
'application/json': components['schemas']['NotificationChannel'];
|
|
2666
|
+
};
|
|
2667
|
+
};
|
|
2668
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2669
|
+
404: components['responses']['NotFoundProblemResponse'];
|
|
2670
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2671
|
+
};
|
|
2672
|
+
};
|
|
2673
|
+
/**
|
|
2674
|
+
* Delete a notification channel
|
|
2675
|
+
* @description Delete notification channel by id.
|
|
2676
|
+
*/
|
|
2677
|
+
deleteNotificationChannel: {
|
|
2678
|
+
parameters: {
|
|
2679
|
+
path: {
|
|
2680
|
+
channelId: components['parameters']['channelId'];
|
|
2681
|
+
};
|
|
2682
|
+
};
|
|
2683
|
+
responses: {
|
|
2684
|
+
/** @description Notification channel deleted. */
|
|
2685
|
+
204: {
|
|
2686
|
+
content: never;
|
|
2687
|
+
};
|
|
2688
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2689
|
+
404: components['responses']['NotFoundProblemResponse'];
|
|
2690
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2691
|
+
};
|
|
2692
|
+
};
|
|
2693
|
+
/**
|
|
2694
|
+
* List notification rules
|
|
2695
|
+
* @description List all notification rules.
|
|
2696
|
+
*/
|
|
2697
|
+
listNotificationRules: {
|
|
2698
|
+
parameters: {
|
|
2699
|
+
query?: {
|
|
2700
|
+
limit?: components['parameters']['queryLimit'];
|
|
2701
|
+
offset?: components['parameters']['queryOffset'];
|
|
2702
|
+
/** @description Order by field */
|
|
2703
|
+
orderBy?: 'id' | 'type' | 'createdAt' | 'updatedAt';
|
|
2704
|
+
includeDisabled?: components['parameters']['queryIncludeDisabled'];
|
|
2705
|
+
feature?: components['parameters']['queryFilterFeature'];
|
|
2706
|
+
};
|
|
2707
|
+
};
|
|
2708
|
+
responses: {
|
|
2709
|
+
/** @description List of notification rules. */
|
|
2710
|
+
200: {
|
|
2711
|
+
content: {
|
|
2712
|
+
'application/json': components['schemas']['NotificationRules'];
|
|
2713
|
+
};
|
|
2714
|
+
};
|
|
2715
|
+
400: components['responses']['BadRequestProblemResponse'];
|
|
2716
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2717
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2718
|
+
};
|
|
2719
|
+
};
|
|
2720
|
+
/**
|
|
2721
|
+
* Create a notification rule
|
|
2722
|
+
* @description Create a new notification rule.
|
|
2723
|
+
*/
|
|
2724
|
+
createNotificationRule: {
|
|
2725
|
+
/** @description The notification rule to create. */
|
|
2726
|
+
requestBody: {
|
|
2727
|
+
content: {
|
|
2728
|
+
'application/json': components['schemas']['NotificationRuleCreateRequest'];
|
|
2729
|
+
};
|
|
2730
|
+
};
|
|
2731
|
+
responses: {
|
|
2732
|
+
/** @description Notification rule created. */
|
|
2733
|
+
201: {
|
|
2734
|
+
content: {
|
|
2735
|
+
'application/json': components['schemas']['NotificationRule'];
|
|
2736
|
+
};
|
|
2737
|
+
};
|
|
2738
|
+
400: components['responses']['BadRequestProblemResponse'];
|
|
2739
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2740
|
+
409: components['responses']['ConflictProblemResponse'];
|
|
2741
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2742
|
+
};
|
|
2743
|
+
};
|
|
2744
|
+
/**
|
|
2745
|
+
* Get notification rule
|
|
2746
|
+
* @description Get a notification rule by id.
|
|
2747
|
+
*/
|
|
2748
|
+
getNotificationRule: {
|
|
2749
|
+
parameters: {
|
|
2750
|
+
path: {
|
|
2751
|
+
ruleId: components['parameters']['ruleId'];
|
|
2752
|
+
};
|
|
2753
|
+
};
|
|
2754
|
+
responses: {
|
|
2755
|
+
/** @description Rule found. */
|
|
2756
|
+
200: {
|
|
2757
|
+
content: {
|
|
2758
|
+
'application/json': components['schemas']['NotificationRule'];
|
|
2759
|
+
};
|
|
2760
|
+
};
|
|
2761
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2762
|
+
404: components['responses']['NotFoundProblemResponse'];
|
|
2763
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2764
|
+
};
|
|
2765
|
+
};
|
|
2766
|
+
/**
|
|
2767
|
+
* Update a notification rule
|
|
2768
|
+
* @description Update a notification rule by id.
|
|
2769
|
+
*/
|
|
2770
|
+
updateNotificationRule: {
|
|
2771
|
+
parameters: {
|
|
2772
|
+
path: {
|
|
2773
|
+
ruleId: components['parameters']['ruleId'];
|
|
2774
|
+
};
|
|
2775
|
+
};
|
|
2776
|
+
/** @description The notification rule to update. */
|
|
2777
|
+
requestBody: {
|
|
2778
|
+
content: {
|
|
2779
|
+
'application/json': components['schemas']['NotificationRuleCreateRequest'];
|
|
2780
|
+
};
|
|
2781
|
+
};
|
|
2782
|
+
responses: {
|
|
2783
|
+
/** @description Notification Rule updated. */
|
|
2784
|
+
200: {
|
|
2785
|
+
content: {
|
|
2786
|
+
'application/json': components['schemas']['NotificationRule'];
|
|
2787
|
+
};
|
|
2788
|
+
};
|
|
2789
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2790
|
+
404: components['responses']['NotFoundProblemResponse'];
|
|
2791
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2792
|
+
};
|
|
2793
|
+
};
|
|
2794
|
+
/**
|
|
2795
|
+
* Delete a notification rule
|
|
2796
|
+
* @description Delete notification rule by id.
|
|
2797
|
+
*/
|
|
2798
|
+
deleteNotificationRule: {
|
|
2799
|
+
parameters: {
|
|
2800
|
+
path: {
|
|
2801
|
+
ruleId: components['parameters']['ruleId'];
|
|
2802
|
+
};
|
|
2803
|
+
};
|
|
2804
|
+
responses: {
|
|
2805
|
+
/** @description Notification rule deleted. */
|
|
2806
|
+
204: {
|
|
2807
|
+
content: never;
|
|
2808
|
+
};
|
|
2809
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2810
|
+
404: components['responses']['NotFoundProblemResponse'];
|
|
2811
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2812
|
+
};
|
|
2813
|
+
};
|
|
2814
|
+
/**
|
|
2815
|
+
* List notification evens
|
|
2816
|
+
* @description List all notification events.
|
|
2817
|
+
*/
|
|
2818
|
+
listNotificationEvents: {
|
|
2819
|
+
parameters: {
|
|
2820
|
+
query?: {
|
|
2821
|
+
limit?: components['parameters']['queryLimit'];
|
|
2822
|
+
offset?: components['parameters']['queryOffset'];
|
|
2823
|
+
/** @description Order by field */
|
|
2824
|
+
orderBy?: 'id' | 'createdAt';
|
|
2825
|
+
feature?: components['parameters']['queryFilterFeature'];
|
|
2826
|
+
subject?: components['parameters']['queryFilterSubject'];
|
|
2827
|
+
};
|
|
2828
|
+
};
|
|
2829
|
+
responses: {
|
|
2830
|
+
/** @description List of notification events. */
|
|
2831
|
+
200: {
|
|
2832
|
+
content: {
|
|
2833
|
+
'application/json': components['schemas']['NotificationEvent'][];
|
|
2834
|
+
};
|
|
2835
|
+
};
|
|
2836
|
+
400: components['responses']['BadRequestProblemResponse'];
|
|
2837
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2838
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2839
|
+
};
|
|
2840
|
+
};
|
|
2841
|
+
/**
|
|
2842
|
+
* Get notification event
|
|
2843
|
+
* @description Get a notification event by id.
|
|
2844
|
+
*/
|
|
2845
|
+
getNotificationEvent: {
|
|
2846
|
+
parameters: {
|
|
2847
|
+
path: {
|
|
2848
|
+
eventId: components['parameters']['eventId'];
|
|
2849
|
+
};
|
|
2850
|
+
};
|
|
2851
|
+
responses: {
|
|
2852
|
+
/** @description Notification event found. */
|
|
2853
|
+
200: {
|
|
2854
|
+
content: {
|
|
2855
|
+
'application/json': components['schemas']['NotificationEvent'];
|
|
2856
|
+
};
|
|
2857
|
+
};
|
|
2858
|
+
401: components['responses']['UnauthorizedProblemResponse'];
|
|
2859
|
+
404: components['responses']['NotFoundProblemResponse'];
|
|
2860
|
+
default: components['responses']['UnexpectedProblemResponse'];
|
|
2861
|
+
};
|
|
2862
|
+
};
|
|
2178
2863
|
}
|