@reveldigital/mcp-graphql-proxy 2.2.0 → 2.4.0
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/core/query-builder.d.ts.map +1 -1
- package/dist/core/query-builder.js +37 -0
- package/dist/core/query-builder.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +48 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/index.js +217 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/types/schema.graphql +275 -2
package/src/types/schema.graphql
CHANGED
|
@@ -341,6 +341,23 @@ type Query {
|
|
|
341
341
|
order: [AdHawkDeviceMediaImpressionsSortInput!] @cost(weight: "10")
|
|
342
342
|
): [AdHawkDeviceMediaImpressions] @cost(weight: "10")
|
|
343
343
|
"""
|
|
344
|
+
Gets alert rules for the authenticated account.
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
**Returns:**
|
|
348
|
+
List of alert rules
|
|
349
|
+
"""
|
|
350
|
+
alertRule(
|
|
351
|
+
"Filter by specific alert rule IDs (encrypted)"
|
|
352
|
+
id: [String!]
|
|
353
|
+
"Filter by organization ID (encrypted)"
|
|
354
|
+
orgId: String
|
|
355
|
+
"Maximum number of items to return"
|
|
356
|
+
limit: Int
|
|
357
|
+
where: AlertRuleFilterInput @cost(weight: "10")
|
|
358
|
+
order: [AlertRuleSortInput!] @cost(weight: "10")
|
|
359
|
+
): [AlertRule] @cost(weight: "10")
|
|
360
|
+
"""
|
|
344
361
|
Gets alerts for the authenticated account.
|
|
345
362
|
|
|
346
363
|
|
|
@@ -395,6 +412,20 @@ type Query {
|
|
|
395
412
|
where: AuditEventFilterInput @cost(weight: "10")
|
|
396
413
|
order: [AuditEventSortInput!] @cost(weight: "10")
|
|
397
414
|
): [AuditEvent!]! @cost(weight: "10")
|
|
415
|
+
"""
|
|
416
|
+
Fetches a normalized dataset from a registered connector data source through the broker.
|
|
417
|
+
The caller never sends SQL; it references a datasetId on a
|
|
418
|
+
datasourceId plus validated params. The tenant is
|
|
419
|
+
resolved from the caller's API key / bearer, never supplied by the caller.
|
|
420
|
+
"""
|
|
421
|
+
connectorData(
|
|
422
|
+
"The registered data source identifier."
|
|
423
|
+
datasourceId: String
|
|
424
|
+
"The registered dataset identifier on that source."
|
|
425
|
+
datasetId: String
|
|
426
|
+
"Optional validated parameters for the dataset (JSON object)."
|
|
427
|
+
params: [Any]
|
|
428
|
+
): ConnectorData @cost(weight: "10")
|
|
398
429
|
"Lists data tables in the account, with optional group filtering."
|
|
399
430
|
dataTables(
|
|
400
431
|
"Optional group ID to filter by"
|
|
@@ -438,6 +469,10 @@ type Query {
|
|
|
438
469
|
inRange value is between from and to (inclusive)
|
|
439
470
|
outOfRange value is outside [from, to]
|
|
440
471
|
|
|
472
|
+
Set operators (require a non-empty `values` array):
|
|
473
|
+
in value matches one of the entries in `values`
|
|
474
|
+
notIn value matches none of the entries in `values`
|
|
475
|
+
|
|
441
476
|
No-value operators (no `value` / `from` / `to`):
|
|
442
477
|
isEmpty column is null / empty string
|
|
443
478
|
isNotEmpty column has a value
|
|
@@ -465,6 +500,7 @@ type Query {
|
|
|
465
500
|
{"price": {"op": "gte", "value": 25}}
|
|
466
501
|
{"name": {"op": "contains", "value": "pizza"}}
|
|
467
502
|
{"score": {"op": "inRange", "from": 0, "to": 100}}
|
|
503
|
+
{"category": {"op": "in", "values": ["Entree", "Dessert"]}}
|
|
468
504
|
{"deletedAt": {"op": "isEmpty"}}
|
|
469
505
|
{"publishAt": {"op": "beforeNow"}}
|
|
470
506
|
|
|
@@ -623,6 +659,17 @@ type Query {
|
|
|
623
659
|
}
|
|
624
660
|
|
|
625
661
|
type Mutation {
|
|
662
|
+
"""
|
|
663
|
+
Create a new alert rule.
|
|
664
|
+
Example: An AI agent creates a rule that fires when a lobby display goes offline.
|
|
665
|
+
"""
|
|
666
|
+
createAlertRule(input: AlertRuleInput): AlertRuleMutationResult
|
|
667
|
+
@cost(weight: "10")
|
|
668
|
+
"Update an existing alert rule."
|
|
669
|
+
updateAlertRule(input: AlertRuleInput): AlertRuleMutationResult
|
|
670
|
+
@cost(weight: "10")
|
|
671
|
+
"Delete an alert rule."
|
|
672
|
+
deleteAlertRule(id: String): AlertRuleMutationResult @cost(weight: "10")
|
|
626
673
|
"""
|
|
627
674
|
Create a new data table with the specified column schema.
|
|
628
675
|
Example: Create a menu board table with columns for item name, price, description, and image.
|
|
@@ -1283,6 +1330,67 @@ type AlertDevice {
|
|
|
1283
1330
|
name: String
|
|
1284
1331
|
}
|
|
1285
1332
|
|
|
1333
|
+
"Full alert rule model. An alert rule defines the conditions that trigger alerts."
|
|
1334
|
+
type AlertRule {
|
|
1335
|
+
"The alert rule id (encrypted)"
|
|
1336
|
+
id: String
|
|
1337
|
+
"The name of the alert rule"
|
|
1338
|
+
name: String
|
|
1339
|
+
"""
|
|
1340
|
+
The rule set configuration as a JSON string. See AlertRuleInput.ruleSet for the full
|
|
1341
|
+
schema, supported condition types, operators, and value semantics.
|
|
1342
|
+
"""
|
|
1343
|
+
ruleSet: String
|
|
1344
|
+
"""
|
|
1345
|
+
Indicates whether the alert rule is currently enabled and will be evaluated.
|
|
1346
|
+
When false, the rule is stored but never triggers alerts.
|
|
1347
|
+
"""
|
|
1348
|
+
isEnabled: Boolean
|
|
1349
|
+
"The look-back / evaluation period, in minutes, used by time-window based conditions."
|
|
1350
|
+
period: Int
|
|
1351
|
+
"""
|
|
1352
|
+
A legacy scalar threshold value retained for backward compatibility. Thresholds for new
|
|
1353
|
+
rules are expressed inside the rule set (AlertRuleInput.ruleSet) via each item's "value" instead.
|
|
1354
|
+
"""
|
|
1355
|
+
threshold: Int
|
|
1356
|
+
"Optional HTTPS webhook URL that is invoked (HTTP POST) when the rule triggers."
|
|
1357
|
+
webhookUrl: String
|
|
1358
|
+
"""
|
|
1359
|
+
When true, the rule is evaluated against every device in the account and
|
|
1360
|
+
DeviceIds is empty. When false, only DeviceIds are evaluated.
|
|
1361
|
+
"""
|
|
1362
|
+
allDevices: Boolean
|
|
1363
|
+
"""
|
|
1364
|
+
When true, all users in the account are notified and UserIds is empty.
|
|
1365
|
+
When false, only the users in UserIds are notified.
|
|
1366
|
+
"""
|
|
1367
|
+
allUsers: Boolean
|
|
1368
|
+
"The date and time the alert rule was created"
|
|
1369
|
+
createdOn: DateTime
|
|
1370
|
+
"The date and time the alert rule was last updated"
|
|
1371
|
+
updatedOn: DateTime
|
|
1372
|
+
"""
|
|
1373
|
+
The devices explicitly associated with the rule (encrypted ids).
|
|
1374
|
+
Empty when AllDevices is true.
|
|
1375
|
+
"""
|
|
1376
|
+
deviceIds: [String]
|
|
1377
|
+
"""
|
|
1378
|
+
The users explicitly notified by the rule (encrypted ids).
|
|
1379
|
+
Empty when AllUsers is true.
|
|
1380
|
+
"""
|
|
1381
|
+
userIds: [String]
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
"Result from an alert rule mutation."
|
|
1385
|
+
type AlertRuleMutationResult {
|
|
1386
|
+
"Whether the operation was successful."
|
|
1387
|
+
success: Boolean!
|
|
1388
|
+
"The created or updated alert rule."
|
|
1389
|
+
alertRule: AlertRule
|
|
1390
|
+
"Error message if the operation failed."
|
|
1391
|
+
error: String
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1286
1394
|
"Alert rule summary (minimal info included with alerts)"
|
|
1287
1395
|
type AlertRuleSummary {
|
|
1288
1396
|
"The alert rule id (encrypted)"
|
|
@@ -1459,6 +1567,12 @@ type BulkCommandResult {
|
|
|
1459
1567
|
results: [CommandResult]
|
|
1460
1568
|
}
|
|
1461
1569
|
|
|
1570
|
+
"Describes a single column in a ConnectorData result."
|
|
1571
|
+
type ColumnMeta {
|
|
1572
|
+
name: String
|
|
1573
|
+
type: String
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1462
1576
|
"Result from sending commands to a device."
|
|
1463
1577
|
type CommandResult {
|
|
1464
1578
|
"Whether the command was successfully queued."
|
|
@@ -1486,6 +1600,25 @@ type Condition {
|
|
|
1486
1600
|
value4: String
|
|
1487
1601
|
}
|
|
1488
1602
|
|
|
1603
|
+
"""
|
|
1604
|
+
A normalized, source-agnostic dataset returned by the connector broker. The same shape
|
|
1605
|
+
carries SQL rows, HTTP-JSON rows and RSS items alike. Mirrors the broker HTTP contract
|
|
1606
|
+
(POST {BrokerUrl}/v1/connector-data).
|
|
1607
|
+
"""
|
|
1608
|
+
type ConnectorData {
|
|
1609
|
+
"The columns, in row order."
|
|
1610
|
+
columns: [ColumnMeta]
|
|
1611
|
+
"""
|
|
1612
|
+
Row-major data; each row is an array of cell values aligned to Columns.
|
|
1613
|
+
Exposed through the JSON scalar so arbitrary SQL/JSON/RSS cell values flow through.
|
|
1614
|
+
"""
|
|
1615
|
+
rows: [[Any]]
|
|
1616
|
+
"Epoch milliseconds at which the broker last fetched the underlying data."
|
|
1617
|
+
fetchedAt: Long!
|
|
1618
|
+
"True when the broker served a cached copy while revalidating (stale-while-revalidate)."
|
|
1619
|
+
stale: Boolean!
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1489
1622
|
"Result from creating media from a URL."
|
|
1490
1623
|
type CreateMediaResult {
|
|
1491
1624
|
"Whether the upload was successful."
|
|
@@ -1548,8 +1681,12 @@ type DataTableRowModel {
|
|
|
1548
1681
|
data: Any
|
|
1549
1682
|
updatedAt: DateTime!
|
|
1550
1683
|
"""
|
|
1551
|
-
Optimistic concurrency token.
|
|
1552
|
-
|
|
1684
|
+
Optimistic concurrency token. To ensure the row hasn't changed since you read it,
|
|
1685
|
+
send this value back as the If-Match request header on the REST
|
|
1686
|
+
updateDataTableRow (HTTP PUT) call, or as the eTag input field on
|
|
1687
|
+
the GraphQL updateDataTableRow mutation. A stale token results in
|
|
1688
|
+
409 Conflict (REST) or a mutation error (GraphQL). Note: the REST endpoint does
|
|
1689
|
+
not read an eTag body property — it uses the If-Match header.
|
|
1553
1690
|
"""
|
|
1554
1691
|
eTag: String
|
|
1555
1692
|
}
|
|
@@ -3246,6 +3383,142 @@ input AlertFilterInput {
|
|
|
3246
3383
|
isActive: BooleanOperationFilterInput
|
|
3247
3384
|
}
|
|
3248
3385
|
|
|
3386
|
+
"Full alert rule model. An alert rule defines the conditions that trigger alerts."
|
|
3387
|
+
input AlertRuleFilterInput {
|
|
3388
|
+
and: [AlertRuleFilterInput!]
|
|
3389
|
+
or: [AlertRuleFilterInput!]
|
|
3390
|
+
"The alert rule id (encrypted)"
|
|
3391
|
+
id: StringOperationFilterInput
|
|
3392
|
+
"The name of the alert rule"
|
|
3393
|
+
name: StringOperationFilterInput
|
|
3394
|
+
"""
|
|
3395
|
+
The rule set configuration as a JSON string. See AlertRuleInput.ruleSet for the full
|
|
3396
|
+
schema, supported condition types, operators, and value semantics.
|
|
3397
|
+
"""
|
|
3398
|
+
ruleSet: StringOperationFilterInput
|
|
3399
|
+
"""
|
|
3400
|
+
Indicates whether the alert rule is currently enabled and will be evaluated.
|
|
3401
|
+
When false, the rule is stored but never triggers alerts.
|
|
3402
|
+
"""
|
|
3403
|
+
isEnabled: BooleanOperationFilterInput
|
|
3404
|
+
"The look-back / evaluation period, in minutes, used by time-window based conditions."
|
|
3405
|
+
period: IntOperationFilterInput
|
|
3406
|
+
"""
|
|
3407
|
+
A legacy scalar threshold value retained for backward compatibility. Thresholds for new
|
|
3408
|
+
rules are expressed inside the rule set (AlertRuleInput.ruleSet) via each item's "value" instead.
|
|
3409
|
+
"""
|
|
3410
|
+
threshold: IntOperationFilterInput
|
|
3411
|
+
"Optional HTTPS webhook URL that is invoked (HTTP POST) when the rule triggers."
|
|
3412
|
+
webhookUrl: StringOperationFilterInput
|
|
3413
|
+
"""
|
|
3414
|
+
When true, the rule is evaluated against every device in the account and
|
|
3415
|
+
DeviceIds is empty. When false, only DeviceIds are evaluated.
|
|
3416
|
+
"""
|
|
3417
|
+
allDevices: BooleanOperationFilterInput
|
|
3418
|
+
"""
|
|
3419
|
+
When true, all users in the account are notified and UserIds is empty.
|
|
3420
|
+
When false, only the users in UserIds are notified.
|
|
3421
|
+
"""
|
|
3422
|
+
allUsers: BooleanOperationFilterInput
|
|
3423
|
+
"The date and time the alert rule was created"
|
|
3424
|
+
createdOn: DateTimeOperationFilterInput
|
|
3425
|
+
"The date and time the alert rule was last updated"
|
|
3426
|
+
updatedOn: DateTimeOperationFilterInput
|
|
3427
|
+
"""
|
|
3428
|
+
The devices explicitly associated with the rule (encrypted ids).
|
|
3429
|
+
Empty when AllDevices is true.
|
|
3430
|
+
"""
|
|
3431
|
+
deviceIds: ListStringOperationFilterInput
|
|
3432
|
+
"""
|
|
3433
|
+
The users explicitly notified by the rule (encrypted ids).
|
|
3434
|
+
Empty when AllUsers is true.
|
|
3435
|
+
"""
|
|
3436
|
+
userIds: ListStringOperationFilterInput
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
"GraphQL input for creating or updating an alert rule."
|
|
3440
|
+
input AlertRuleInput {
|
|
3441
|
+
"The alert rule id (encrypted). Required for update, omitted for create."
|
|
3442
|
+
id: String
|
|
3443
|
+
"The name of the alert rule."
|
|
3444
|
+
name: String
|
|
3445
|
+
"""
|
|
3446
|
+
The rule set configuration, supplied as a JSON string (serialized JSON, not a nested object).
|
|
3447
|
+
A rule set is an array of condition groups combined with logical AND; the items within each group
|
|
3448
|
+
are combined with logical OR. Each item is { "type", "op", "value" }: "type" (required, case-sensitive)
|
|
3449
|
+
is one of TimeOffline, LastUpdate, MemoryUsage, CpuUsage, DiskUsage, NoContent, BytesTxDay, BytesRxDay,
|
|
3450
|
+
BytesTotalDay, BytesTxPeriod, BytesRxPeriod, BytesTotalPeriod, ClockSkew, DisplayDetected, BatteryVoltage,
|
|
3451
|
+
BatteryPercentage, or SystemTemperature; "op" (optional) is EQ, NE, GT, LT, GTE, or LTE (defaults to EQ);
|
|
3452
|
+
"value" (required) is a non-empty array of numbers. Example:
|
|
3453
|
+
[{"items":[{"type":"CpuUsage","op":"GTE","value":[90]}]}]. Invalid rule sets are rejected. Null or empty
|
|
3454
|
+
leaves the rule unevaluated.
|
|
3455
|
+
"""
|
|
3456
|
+
ruleSet: String
|
|
3457
|
+
"Indicates if the alert rule is enabled."
|
|
3458
|
+
isEnabled: Boolean
|
|
3459
|
+
"""
|
|
3460
|
+
The look-back / evaluation period, in minutes, used by time-window based conditions
|
|
3461
|
+
such as NoContent. Ignored by conditions that read the current value.
|
|
3462
|
+
"""
|
|
3463
|
+
period: Int
|
|
3464
|
+
"""
|
|
3465
|
+
A legacy scalar threshold value retained for backward compatibility. New rules should
|
|
3466
|
+
express thresholds inside RuleSet via each item's "value" instead.
|
|
3467
|
+
"""
|
|
3468
|
+
threshold: Int
|
|
3469
|
+
"Optional webhook URL that is invoked when the rule triggers."
|
|
3470
|
+
webhookUrl: String
|
|
3471
|
+
"If true, the rule applies to all devices in the account."
|
|
3472
|
+
allDevices: Boolean
|
|
3473
|
+
"If true, the rule notifies all users in the account."
|
|
3474
|
+
allUsers: Boolean
|
|
3475
|
+
"The devices to associate with the rule (encrypted ids). Ignored when AllDevices is true."
|
|
3476
|
+
deviceIds: [String]
|
|
3477
|
+
"The users to notify (encrypted ids). Ignored when AllUsers is true."
|
|
3478
|
+
userIds: [String]
|
|
3479
|
+
}
|
|
3480
|
+
|
|
3481
|
+
"Full alert rule model. An alert rule defines the conditions that trigger alerts."
|
|
3482
|
+
input AlertRuleSortInput {
|
|
3483
|
+
"The alert rule id (encrypted)"
|
|
3484
|
+
id: SortEnumType @cost(weight: "10")
|
|
3485
|
+
"The name of the alert rule"
|
|
3486
|
+
name: SortEnumType @cost(weight: "10")
|
|
3487
|
+
"""
|
|
3488
|
+
The rule set configuration as a JSON string. See AlertRuleInput.ruleSet for the full
|
|
3489
|
+
schema, supported condition types, operators, and value semantics.
|
|
3490
|
+
"""
|
|
3491
|
+
ruleSet: SortEnumType @cost(weight: "10")
|
|
3492
|
+
"""
|
|
3493
|
+
Indicates whether the alert rule is currently enabled and will be evaluated.
|
|
3494
|
+
When false, the rule is stored but never triggers alerts.
|
|
3495
|
+
"""
|
|
3496
|
+
isEnabled: SortEnumType @cost(weight: "10")
|
|
3497
|
+
"The look-back / evaluation period, in minutes, used by time-window based conditions."
|
|
3498
|
+
period: SortEnumType @cost(weight: "10")
|
|
3499
|
+
"""
|
|
3500
|
+
A legacy scalar threshold value retained for backward compatibility. Thresholds for new
|
|
3501
|
+
rules are expressed inside the rule set (AlertRuleInput.ruleSet) via each item's "value" instead.
|
|
3502
|
+
"""
|
|
3503
|
+
threshold: SortEnumType @cost(weight: "10")
|
|
3504
|
+
"Optional HTTPS webhook URL that is invoked (HTTP POST) when the rule triggers."
|
|
3505
|
+
webhookUrl: SortEnumType @cost(weight: "10")
|
|
3506
|
+
"""
|
|
3507
|
+
When true, the rule is evaluated against every device in the account and
|
|
3508
|
+
DeviceIds is empty. When false, only DeviceIds are evaluated.
|
|
3509
|
+
"""
|
|
3510
|
+
allDevices: SortEnumType @cost(weight: "10")
|
|
3511
|
+
"""
|
|
3512
|
+
When true, all users in the account are notified and UserIds is empty.
|
|
3513
|
+
When false, only the users in UserIds are notified.
|
|
3514
|
+
"""
|
|
3515
|
+
allUsers: SortEnumType @cost(weight: "10")
|
|
3516
|
+
"The date and time the alert rule was created"
|
|
3517
|
+
createdOn: SortEnumType @cost(weight: "10")
|
|
3518
|
+
"The date and time the alert rule was last updated"
|
|
3519
|
+
updatedOn: SortEnumType @cost(weight: "10")
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3249
3522
|
"Alert rule summary (minimal info included with alerts)"
|
|
3250
3523
|
input AlertRuleSummaryFilterInput {
|
|
3251
3524
|
and: [AlertRuleSummaryFilterInput!]
|