@camstack/types 1.2.396 → 1.2.398
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/addon.js +17 -2
- package/dist/addon.mjs +15 -3
- package/dist/capabilities/dishwasher.cap.d.ts +9 -0
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/notification-rules.cap.d.ts +138 -0
- package/dist/capabilities/osd-manager.cap.d.ts +36 -0
- package/dist/capabilities/records.cap.d.ts +67 -3
- package/dist/capabilities/storage-admin.cap.d.ts +0 -2
- package/dist/capabilities/user-management.cap.d.ts +2 -28
- package/dist/client.d.ts +1 -1
- package/dist/client.js +324 -13
- package/dist/client.mjs +320 -14
- package/dist/enums/event-category.d.ts +17 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-eSqkye-K.js → event-category-7AwNbPjm.js} +17 -0
- package/dist/{event-category-DOl51-Ij.mjs → event-category-BfJwUd2S.mjs} +17 -0
- package/dist/generated/addon-api.d.ts +7 -14
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +426 -62
- package/dist/index.mjs +415 -61
- package/dist/interfaces/auth.d.ts +1 -1
- package/dist/interfaces/event-bus.d.ts +43 -5
- package/dist/notification/alert-episode.d.ts +7 -0
- package/dist/notification/system-event-classes.d.ts +73 -0
- package/dist/records/errors.d.ts +9 -1
- package/dist/records/index.d.ts +1 -0
- package/dist/records/record-kind.d.ts +62 -2
- package/dist/records/records-access.d.ts +36 -1
- package/dist/records/transact-rules.d.ts +7 -0
- package/dist/schemas/auth-records.d.ts +0 -12
- package/dist/{sleep-Re8daN0Y.js → sleep-CD18m9HF.js} +478 -311
- package/dist/{sleep-_sV1BE2f.mjs → sleep-DJFUfKvA.mjs} +461 -312
- package/package.json +1 -1
package/dist/client.mjs
CHANGED
|
@@ -22264,9 +22264,13 @@ var NcSystemEventKindSchema = z.enum([
|
|
|
22264
22264
|
"node-updating",
|
|
22265
22265
|
"node-inference-unavailable",
|
|
22266
22266
|
"detection-blind",
|
|
22267
|
+
"motion-noisy",
|
|
22268
|
+
"motion-calm",
|
|
22267
22269
|
"recording-stalled",
|
|
22268
22270
|
"recording-healthy",
|
|
22269
22271
|
"recording-degraded",
|
|
22272
|
+
"device-attention-required",
|
|
22273
|
+
"device-attention-resolved",
|
|
22270
22274
|
"storage-location-low",
|
|
22271
22275
|
"storage-location-critical",
|
|
22272
22276
|
"storage-location-ok",
|
|
@@ -22290,6 +22294,8 @@ var NcSystemEventKindSchema = z.enum([
|
|
|
22290
22294
|
"alert-critical",
|
|
22291
22295
|
"alert-error",
|
|
22292
22296
|
"alert-critical-resolved",
|
|
22297
|
+
"rule-broken",
|
|
22298
|
+
"rule-repaired",
|
|
22293
22299
|
"camera-online",
|
|
22294
22300
|
"camera-offline",
|
|
22295
22301
|
"camera-disabled",
|
|
@@ -28388,8 +28394,6 @@ function createSystemProxy(api) {
|
|
|
28388
28394
|
resetPassword: (input) => dispatch("userManagement", "resetPassword", "mutation", input),
|
|
28389
28395
|
setUserScopes: (input) => dispatch("userManagement", "setUserScopes", "mutation", input),
|
|
28390
28396
|
validateCredentials: (input) => dispatch("userManagement", "validateCredentials", "mutation", input),
|
|
28391
|
-
listApiKeys: (input) => dispatch("userManagement", "listApiKeys", "query", input),
|
|
28392
|
-
revokeApiKey: (input) => dispatch("userManagement", "revokeApiKey", "mutation", input),
|
|
28393
28397
|
setupTotp: (input) => dispatch("userManagement", "setupTotp", "mutation", input),
|
|
28394
28398
|
confirmTotp: (input) => dispatch("userManagement", "confirmTotp", "mutation", input),
|
|
28395
28399
|
disableTotp: (input) => dispatch("userManagement", "disableTotp", "mutation", input),
|
|
@@ -28740,8 +28744,8 @@ var NC_SYSTEM_EVENT_FILTER_KEYS = [
|
|
|
28740
28744
|
*/
|
|
28741
28745
|
function systemEventFilterApplies(kind, filter) {
|
|
28742
28746
|
switch (filter) {
|
|
28743
|
-
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("recording-") || kind === "alarm-triggered";
|
|
28744
|
-
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind";
|
|
28747
|
+
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("recording-") || kind === "alarm-triggered";
|
|
28748
|
+
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind" || kind.startsWith("motion-");
|
|
28745
28749
|
case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated" || kind.startsWith("storage-location-") || kind.startsWith("alert-");
|
|
28746
28750
|
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
|
|
28747
28751
|
case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
|
|
@@ -28783,8 +28787,8 @@ var NC_SYSTEM_EVENT_FAMILIES = [
|
|
|
28783
28787
|
function isSystemEventFamily(value) {
|
|
28784
28788
|
return NC_SYSTEM_EVENT_FAMILIES.some((family) => family === value);
|
|
28785
28789
|
}
|
|
28786
|
-
/**
|
|
28787
|
-
var
|
|
28790
|
+
/** Total over the enum: a kind added to the cap without a family fails tsc here. */
|
|
28791
|
+
var NC_SYSTEM_EVENT_FAMILY = {
|
|
28788
28792
|
"device-online": "device-events",
|
|
28789
28793
|
"device-offline": "device-events",
|
|
28790
28794
|
"device-disabled": "device-events",
|
|
@@ -28799,9 +28803,13 @@ var FAMILY_BY_NAME = new Map(Object.entries({
|
|
|
28799
28803
|
"stream-online": "device-events",
|
|
28800
28804
|
"stream-offline": "device-events",
|
|
28801
28805
|
"detection-blind": "device-events",
|
|
28806
|
+
"motion-noisy": "device-events",
|
|
28807
|
+
"motion-calm": "device-events",
|
|
28802
28808
|
"recording-stalled": "device-events",
|
|
28803
28809
|
"recording-healthy": "device-events",
|
|
28804
28810
|
"recording-degraded": "device-events",
|
|
28811
|
+
"device-attention-required": "device-events",
|
|
28812
|
+
"device-attention-resolved": "device-events",
|
|
28805
28813
|
"node-online": "system",
|
|
28806
28814
|
"node-offline": "system",
|
|
28807
28815
|
"node-restarting": "system",
|
|
@@ -28818,6 +28826,8 @@ var FAMILY_BY_NAME = new Map(Object.entries({
|
|
|
28818
28826
|
"alert-critical": "system",
|
|
28819
28827
|
"alert-error": "system",
|
|
28820
28828
|
"alert-critical-resolved": "system",
|
|
28829
|
+
"rule-broken": "system",
|
|
28830
|
+
"rule-repaired": "system",
|
|
28821
28831
|
"storage-location-low": "system",
|
|
28822
28832
|
"storage-location-critical": "system",
|
|
28823
28833
|
"storage-location-ok": "system",
|
|
@@ -28834,7 +28844,9 @@ var FAMILY_BY_NAME = new Map(Object.entries({
|
|
|
28834
28844
|
"camera-offline": null,
|
|
28835
28845
|
"camera-disabled": null,
|
|
28836
28846
|
"camera-enabled": null
|
|
28837
|
-
}
|
|
28847
|
+
};
|
|
28848
|
+
/** Read by NAME, for kinds that arrive as plain strings (a newer hub, the viewer's mirror). */
|
|
28849
|
+
var FAMILY_BY_NAME = new Map(Object.entries(NC_SYSTEM_EVENT_FAMILY));
|
|
28838
28850
|
[...NC_SYSTEM_EVENT_FILTER_KEYS];
|
|
28839
28851
|
/**
|
|
28840
28852
|
* The filters a family may carry. The base filters are the union of
|
|
@@ -28898,6 +28910,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
28898
28910
|
label: "Detecting nothing",
|
|
28899
28911
|
kinds: ["detection-blind"]
|
|
28900
28912
|
},
|
|
28913
|
+
{
|
|
28914
|
+
id: "motion-noise",
|
|
28915
|
+
family: "device-events",
|
|
28916
|
+
label: "Motion without a subject",
|
|
28917
|
+
kinds: ["motion-noisy", "motion-calm"]
|
|
28918
|
+
},
|
|
28901
28919
|
{
|
|
28902
28920
|
id: "recording",
|
|
28903
28921
|
family: "device-events",
|
|
@@ -28908,6 +28926,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
28908
28926
|
"recording-degraded"
|
|
28909
28927
|
]
|
|
28910
28928
|
},
|
|
28929
|
+
{
|
|
28930
|
+
id: "device-attention",
|
|
28931
|
+
family: "device-events",
|
|
28932
|
+
label: "Needs attention",
|
|
28933
|
+
kinds: ["device-attention-required", "device-attention-resolved"]
|
|
28934
|
+
},
|
|
28911
28935
|
{
|
|
28912
28936
|
id: "nodes",
|
|
28913
28937
|
family: "system",
|
|
@@ -28968,6 +28992,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
28968
28992
|
"alert-critical-resolved"
|
|
28969
28993
|
]
|
|
28970
28994
|
},
|
|
28995
|
+
{
|
|
28996
|
+
id: "rule-health",
|
|
28997
|
+
family: "system",
|
|
28998
|
+
label: "Notification rules",
|
|
28999
|
+
kinds: ["rule-broken", "rule-repaired"]
|
|
29000
|
+
},
|
|
28971
29001
|
{
|
|
28972
29002
|
id: "alarm",
|
|
28973
29003
|
family: "alarm",
|
|
@@ -29857,6 +29887,7 @@ var ALERT_EPISODE = [
|
|
|
29857
29887
|
"alert-error",
|
|
29858
29888
|
"alert-critical-resolved"
|
|
29859
29889
|
];
|
|
29890
|
+
var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
|
|
29860
29891
|
var UPDATES = [
|
|
29861
29892
|
"addon-update-available",
|
|
29862
29893
|
"server-update-available",
|
|
@@ -29886,9 +29917,12 @@ var DEVICE_EVENTS = [
|
|
|
29886
29917
|
"stream-online",
|
|
29887
29918
|
"stream-offline",
|
|
29888
29919
|
"detection-blind",
|
|
29920
|
+
"motion-noisy",
|
|
29921
|
+
"motion-calm",
|
|
29889
29922
|
"recording-stalled",
|
|
29890
29923
|
"recording-healthy",
|
|
29891
29924
|
"recording-degraded",
|
|
29925
|
+
...DEVICE_ATTENTION,
|
|
29892
29926
|
...ALARM
|
|
29893
29927
|
];
|
|
29894
29928
|
/** Every kind a summary may speak about — the two summarisable families. */
|
|
@@ -30462,7 +30496,36 @@ var NC_TEMPLATE_VARS = [
|
|
|
30462
30496
|
families: ["rule"],
|
|
30463
30497
|
fields: [...RULE_TEXT],
|
|
30464
30498
|
kinds: ["system"],
|
|
30465
|
-
systemEventKinds: [
|
|
30499
|
+
systemEventKinds: [
|
|
30500
|
+
"detection-blind",
|
|
30501
|
+
"motion-noisy",
|
|
30502
|
+
"motion-calm",
|
|
30503
|
+
"recording-stalled"
|
|
30504
|
+
]
|
|
30505
|
+
},
|
|
30506
|
+
{
|
|
30507
|
+
name: "duty",
|
|
30508
|
+
label: "Motion share (%)",
|
|
30509
|
+
example: "55",
|
|
30510
|
+
group: "system",
|
|
30511
|
+
families: ["rule"],
|
|
30512
|
+
fields: [...RULE_TEXT],
|
|
30513
|
+
kinds: ["system"],
|
|
30514
|
+
systemEventKinds: ["motion-noisy", "motion-calm"]
|
|
30515
|
+
},
|
|
30516
|
+
{
|
|
30517
|
+
name: "sessions",
|
|
30518
|
+
label: "Detection sessions",
|
|
30519
|
+
example: "96",
|
|
30520
|
+
group: "system",
|
|
30521
|
+
families: ["rule"],
|
|
30522
|
+
fields: [...RULE_TEXT],
|
|
30523
|
+
kinds: ["system"],
|
|
30524
|
+
systemEventKinds: [
|
|
30525
|
+
"detection-blind",
|
|
30526
|
+
"motion-noisy",
|
|
30527
|
+
"motion-calm"
|
|
30528
|
+
]
|
|
30466
30529
|
},
|
|
30467
30530
|
{
|
|
30468
30531
|
name: "message",
|
|
@@ -30472,7 +30535,52 @@ var NC_TEMPLATE_VARS = [
|
|
|
30472
30535
|
families: ["rule"],
|
|
30473
30536
|
fields: [...RULE_TEXT],
|
|
30474
30537
|
kinds: ["system"],
|
|
30475
|
-
systemEventKinds: [
|
|
30538
|
+
systemEventKinds: [
|
|
30539
|
+
"recording-degraded",
|
|
30540
|
+
...DEVICE_ATTENTION,
|
|
30541
|
+
...ALERT_EPISODE
|
|
30542
|
+
]
|
|
30543
|
+
},
|
|
30544
|
+
{
|
|
30545
|
+
name: "ruleName",
|
|
30546
|
+
label: "Rule name",
|
|
30547
|
+
example: "Robot",
|
|
30548
|
+
group: "system",
|
|
30549
|
+
families: ["rule"],
|
|
30550
|
+
fields: [...RULE_TEXT],
|
|
30551
|
+
kinds: ["system"],
|
|
30552
|
+
systemEventKinds: ["rule-broken", "rule-repaired"]
|
|
30553
|
+
},
|
|
30554
|
+
{
|
|
30555
|
+
name: "ruleId",
|
|
30556
|
+
label: "Rule id",
|
|
30557
|
+
example: "3db3e226-9b82-4681-a200-de13b260aa48",
|
|
30558
|
+
group: "system",
|
|
30559
|
+
families: ["rule"],
|
|
30560
|
+
fields: [...RULE_TEXT],
|
|
30561
|
+
kinds: ["system"],
|
|
30562
|
+
systemEventKinds: ["rule-broken", "rule-repaired"]
|
|
30563
|
+
},
|
|
30564
|
+
{
|
|
30565
|
+
name: "brokenReason",
|
|
30566
|
+
label: "Why the rule is broken",
|
|
30567
|
+
description: "unparseable, device-deleted or target-deleted",
|
|
30568
|
+
example: "device-deleted",
|
|
30569
|
+
group: "system",
|
|
30570
|
+
families: ["rule"],
|
|
30571
|
+
fields: [...RULE_TEXT],
|
|
30572
|
+
kinds: ["system"],
|
|
30573
|
+
systemEventKinds: ["rule-broken"]
|
|
30574
|
+
},
|
|
30575
|
+
{
|
|
30576
|
+
name: "offendingIds",
|
|
30577
|
+
label: "Deleted devices or destinations",
|
|
30578
|
+
example: "4483",
|
|
30579
|
+
group: "system",
|
|
30580
|
+
families: ["rule"],
|
|
30581
|
+
fields: [...RULE_TEXT],
|
|
30582
|
+
kinds: ["system"],
|
|
30583
|
+
systemEventKinds: ["rule-broken"]
|
|
30476
30584
|
},
|
|
30477
30585
|
{
|
|
30478
30586
|
name: "locationName",
|
|
@@ -30675,7 +30783,11 @@ var NC_TEMPLATE_VARS = [
|
|
|
30675
30783
|
families: ["rule"],
|
|
30676
30784
|
fields: [...RULE_TEXT],
|
|
30677
30785
|
kinds: ["system"],
|
|
30678
|
-
systemEventKinds: [
|
|
30786
|
+
systemEventKinds: [
|
|
30787
|
+
"export-completed",
|
|
30788
|
+
...DEVICE_ATTENTION,
|
|
30789
|
+
...ALERT_EPISODE
|
|
30790
|
+
]
|
|
30679
30791
|
},
|
|
30680
30792
|
{
|
|
30681
30793
|
name: "severity",
|
|
@@ -30695,7 +30807,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
30695
30807
|
families: ["rule"],
|
|
30696
30808
|
fields: [...RULE_TEXT],
|
|
30697
30809
|
kinds: ["system"],
|
|
30698
|
-
systemEventKinds: [...ALERT_EPISODE]
|
|
30810
|
+
systemEventKinds: [...DEVICE_ATTENTION, ...ALERT_EPISODE]
|
|
30699
30811
|
},
|
|
30700
30812
|
{
|
|
30701
30813
|
name: "source",
|
|
@@ -30715,7 +30827,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
30715
30827
|
families: ["rule"],
|
|
30716
30828
|
fields: [...RULE_TEXT],
|
|
30717
30829
|
kinds: ["system"],
|
|
30718
|
-
systemEventKinds: [...ALERT_EPISODE]
|
|
30830
|
+
systemEventKinds: [...DEVICE_ATTENTION, ...ALERT_EPISODE]
|
|
30719
30831
|
},
|
|
30720
30832
|
{
|
|
30721
30833
|
name: "exportId",
|
|
@@ -30929,7 +31041,11 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
|
30929
31041
|
"node-updating",
|
|
30930
31042
|
"alert-critical",
|
|
30931
31043
|
"alert-error",
|
|
30932
|
-
"alert-critical-resolved"
|
|
31044
|
+
"alert-critical-resolved",
|
|
31045
|
+
"device-attention-required",
|
|
31046
|
+
"device-attention-resolved",
|
|
31047
|
+
"rule-broken",
|
|
31048
|
+
"rule-repaired"
|
|
30933
31049
|
];
|
|
30934
31050
|
/**
|
|
30935
31051
|
* Is this descriptor held back from the SERVED catalog as a whole (D647)?
|
|
@@ -30986,6 +31102,196 @@ function templateVarSystemEventApplies(d, ctx) {
|
|
|
30986
31102
|
return declared.some((k) => own.includes(k));
|
|
30987
31103
|
}
|
|
30988
31104
|
//#endregion
|
|
31105
|
+
//#region src/notification/system-event-classes.ts
|
|
31106
|
+
var NC_SYSTEM_EVENT_CLASS_SPECS = [
|
|
31107
|
+
{
|
|
31108
|
+
id: "device-connectivity",
|
|
31109
|
+
family: "device-events",
|
|
31110
|
+
label: "Device connectivity (offline / back online)",
|
|
31111
|
+
bad: ["device-offline"],
|
|
31112
|
+
recovery: ["device-online"],
|
|
31113
|
+
snapshotLabel: "Devices offline now",
|
|
31114
|
+
snapshotSection: "device-state"
|
|
31115
|
+
},
|
|
31116
|
+
{
|
|
31117
|
+
id: "device-switch",
|
|
31118
|
+
family: "device-events",
|
|
31119
|
+
label: "Device switched off / back on",
|
|
31120
|
+
bad: ["device-disabled"],
|
|
31121
|
+
recovery: ["device-enabled"],
|
|
31122
|
+
snapshotLabel: "Devices switched off now",
|
|
31123
|
+
snapshotSection: "device-state"
|
|
31124
|
+
},
|
|
31125
|
+
{
|
|
31126
|
+
id: "stream-connectivity",
|
|
31127
|
+
family: "device-events",
|
|
31128
|
+
label: "Stream connectivity (offline / back online)",
|
|
31129
|
+
bad: ["stream-offline"],
|
|
31130
|
+
recovery: ["stream-online"],
|
|
31131
|
+
snapshotLabel: "Streams offline now",
|
|
31132
|
+
snapshotSection: "streams"
|
|
31133
|
+
},
|
|
31134
|
+
{
|
|
31135
|
+
id: "battery",
|
|
31136
|
+
family: "device-events",
|
|
31137
|
+
label: "Battery (low / back to normal)",
|
|
31138
|
+
bad: ["device-battery-low"],
|
|
31139
|
+
recovery: ["device-battery-normal"],
|
|
31140
|
+
snapshotLabel: "Batteries low now",
|
|
31141
|
+
snapshotSection: "battery"
|
|
31142
|
+
},
|
|
31143
|
+
{
|
|
31144
|
+
id: "consumables",
|
|
31145
|
+
family: "device-events",
|
|
31146
|
+
label: "Consumables (low / replaced)",
|
|
31147
|
+
bad: ["device-consumable-low"],
|
|
31148
|
+
recovery: ["device-consumable-normal"],
|
|
31149
|
+
snapshotLabel: "Consumables low now",
|
|
31150
|
+
snapshotSection: "consumables"
|
|
31151
|
+
},
|
|
31152
|
+
{
|
|
31153
|
+
id: "tanks",
|
|
31154
|
+
family: "device-events",
|
|
31155
|
+
label: "Tanks (low or full / back to normal)",
|
|
31156
|
+
bad: ["device-tank-low", "device-tank-full"],
|
|
31157
|
+
recovery: ["device-tank-normal"],
|
|
31158
|
+
snapshotLabel: "Tanks low or full now",
|
|
31159
|
+
snapshotSection: "tanks"
|
|
31160
|
+
},
|
|
31161
|
+
{
|
|
31162
|
+
id: "motion-noise",
|
|
31163
|
+
family: "device-events",
|
|
31164
|
+
label: "Motion without a subject (constant / calm again)",
|
|
31165
|
+
bad: ["motion-noisy"],
|
|
31166
|
+
recovery: ["motion-calm"],
|
|
31167
|
+
snapshotLabel: "Cameras with constant motion now",
|
|
31168
|
+
snapshotSection: null
|
|
31169
|
+
},
|
|
31170
|
+
{
|
|
31171
|
+
id: "recording-health",
|
|
31172
|
+
family: "device-events",
|
|
31173
|
+
label: "Recording health (stalled or degraded / recording again)",
|
|
31174
|
+
bad: ["recording-stalled", "recording-degraded"],
|
|
31175
|
+
recovery: ["recording-healthy"],
|
|
31176
|
+
snapshotLabel: "Recordings stalled now",
|
|
31177
|
+
snapshotSection: null
|
|
31178
|
+
},
|
|
31179
|
+
{
|
|
31180
|
+
id: "device-attention",
|
|
31181
|
+
family: "device-events",
|
|
31182
|
+
label: "Device needs attention (raised / resolved)",
|
|
31183
|
+
bad: ["device-attention-required"],
|
|
31184
|
+
recovery: ["device-attention-resolved"],
|
|
31185
|
+
snapshotLabel: "Devices needing attention now",
|
|
31186
|
+
snapshotSection: null
|
|
31187
|
+
},
|
|
31188
|
+
{
|
|
31189
|
+
id: "node-connectivity",
|
|
31190
|
+
family: "system",
|
|
31191
|
+
label: "Node connectivity (offline / back online)",
|
|
31192
|
+
bad: ["node-offline"],
|
|
31193
|
+
recovery: ["node-online"],
|
|
31194
|
+
snapshotLabel: "Nodes offline now",
|
|
31195
|
+
snapshotSection: "nodes"
|
|
31196
|
+
},
|
|
31197
|
+
{
|
|
31198
|
+
id: "storage-space",
|
|
31199
|
+
family: "system",
|
|
31200
|
+
label: "Storage space (low or critical / ok again)",
|
|
31201
|
+
bad: ["storage-location-low", "storage-location-critical"],
|
|
31202
|
+
recovery: ["storage-location-ok"],
|
|
31203
|
+
snapshotLabel: "Storage locations low now",
|
|
31204
|
+
snapshotSection: null
|
|
31205
|
+
},
|
|
31206
|
+
{
|
|
31207
|
+
id: "critical-alerts",
|
|
31208
|
+
family: "system",
|
|
31209
|
+
label: "Critical alerts (raised / resolved)",
|
|
31210
|
+
bad: ["alert-critical"],
|
|
31211
|
+
recovery: ["alert-critical-resolved"],
|
|
31212
|
+
snapshotLabel: "Critical alerts open now",
|
|
31213
|
+
snapshotSection: null
|
|
31214
|
+
},
|
|
31215
|
+
{
|
|
31216
|
+
id: "rule-health",
|
|
31217
|
+
family: "system",
|
|
31218
|
+
label: "Rule health (broken / repaired)",
|
|
31219
|
+
bad: ["rule-broken"],
|
|
31220
|
+
recovery: ["rule-repaired"],
|
|
31221
|
+
snapshotLabel: "Notification rules broken now",
|
|
31222
|
+
snapshotSection: null
|
|
31223
|
+
}
|
|
31224
|
+
];
|
|
31225
|
+
var CLASS_BY_KIND = new Map(NC_SYSTEM_EVENT_CLASS_SPECS.flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
|
|
31226
|
+
/** Every edge of a class: what an instant rule selecting it listens to. */
|
|
31227
|
+
function systemEventClassKinds(spec) {
|
|
31228
|
+
return [...spec.bad, ...spec.recovery];
|
|
31229
|
+
}
|
|
31230
|
+
/** The class a kind belongs to, or `undefined` for a one-edge kind. */
|
|
31231
|
+
function systemEventClassOf(kind) {
|
|
31232
|
+
return CLASS_BY_KIND.get(kind);
|
|
31233
|
+
}
|
|
31234
|
+
/** The classes of ONE family, for that family's editor. */
|
|
31235
|
+
function systemEventClassesFor(family) {
|
|
31236
|
+
return NC_SYSTEM_EVENT_CLASS_SPECS.filter((spec) => spec.family === family);
|
|
31237
|
+
}
|
|
31238
|
+
/**
|
|
31239
|
+
* A kind list with the OTHER front of every class it touches: a bad edge
|
|
31240
|
+
* brings the class's recovery, a recovery brings the class's bad edges. A
|
|
31241
|
+
* sibling bad edge is never added by a bad edge — a rule on
|
|
31242
|
+
* `storage-location-critical` does not start hearing `storage-location-low`.
|
|
31243
|
+
* Input order is kept, each added edge right after the kind that brought it.
|
|
31244
|
+
* Kinds of no class (and legacy names) pass through.
|
|
31245
|
+
*/
|
|
31246
|
+
function expandSystemEventClasses(kinds) {
|
|
31247
|
+
const out = [];
|
|
31248
|
+
const seen = /* @__PURE__ */ new Set();
|
|
31249
|
+
const push = (kind) => {
|
|
31250
|
+
if (seen.has(kind)) return;
|
|
31251
|
+
seen.add(kind);
|
|
31252
|
+
out.push(kind);
|
|
31253
|
+
};
|
|
31254
|
+
const listed = new Set(kinds);
|
|
31255
|
+
for (const kind of kinds) {
|
|
31256
|
+
push(kind);
|
|
31257
|
+
const spec = systemEventClassOf(kind);
|
|
31258
|
+
if (spec === void 0) continue;
|
|
31259
|
+
const hasBad = spec.bad.some((k) => listed.has(k));
|
|
31260
|
+
if (spec.bad.some((k) => k === kind)) for (const edge of spec.recovery) push(edge);
|
|
31261
|
+
else if (!hasBad) for (const edge of spec.bad) push(edge);
|
|
31262
|
+
}
|
|
31263
|
+
return out;
|
|
31264
|
+
}
|
|
31265
|
+
/** Does this rule speak per EVENT (not a scheduled summary)? */
|
|
31266
|
+
function isInstantSystemRule(rule) {
|
|
31267
|
+
if (rule.delivery !== "system-event") return false;
|
|
31268
|
+
return rule.systemEventDelivery?.mode !== "summary";
|
|
31269
|
+
}
|
|
31270
|
+
/**
|
|
31271
|
+
* An INSTANT system rule with each class it touches completed with both edges;
|
|
31272
|
+
* the rule itself (same object) when there is nothing to add, a summary rule,
|
|
31273
|
+
* or a rule spanning families (`mixed` stays read-only, D637). A copy, never a
|
|
31274
|
+
* mutation.
|
|
31275
|
+
*/
|
|
31276
|
+
function withSystemEventClasses(rule) {
|
|
31277
|
+
const condition = rule.conditions.systemEvent;
|
|
31278
|
+
if (condition === void 0 || !isInstantSystemRule(rule)) return rule;
|
|
31279
|
+
const families = new Set(condition.kinds.map((kind) => NC_SYSTEM_EVENT_FAMILY[kind]));
|
|
31280
|
+
if (families.size !== 1 || families.has(null)) return rule;
|
|
31281
|
+
const kinds = expandSystemEventClasses(condition.kinds);
|
|
31282
|
+
if (kinds.length === condition.kinds.length) return rule;
|
|
31283
|
+
return {
|
|
31284
|
+
...rule,
|
|
31285
|
+
conditions: {
|
|
31286
|
+
...rule.conditions,
|
|
31287
|
+
systemEvent: {
|
|
31288
|
+
...condition,
|
|
31289
|
+
kinds
|
|
31290
|
+
}
|
|
31291
|
+
}
|
|
31292
|
+
};
|
|
31293
|
+
}
|
|
31294
|
+
//#endregion
|
|
30989
31295
|
//#region src/notification/system-event-summary.ts
|
|
30990
31296
|
/** The families a rule may summarise. The alarm is not one of them. */
|
|
30991
31297
|
var NC_SYSTEM_EVENT_SUMMARY_FAMILIES = ["device-events", "system"];
|
|
@@ -31521,4 +31827,4 @@ var TimelapseRuleSchema = TimelapseRuleInputSchema.extend({
|
|
|
31521
31827
|
updatedAt: z.number()
|
|
31522
31828
|
});
|
|
31523
31829
|
//#endregion
|
|
31524
|
-
export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFINITIVE_DEVICE_REFUSALS, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, LOCATION_ICON_FALLBACK, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, RETRAIN_REVIEW_ADJUSTED_IOU, RETRAIN_REVIEW_MATCH_IOU, RETRAIN_REVIEW_STATUSES, RETRAIN_REVISION_CONFLICT, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, buildDeviceEnrollmentLink, buildDeviceSignatureMessage, buildSubjectPath, canonicalIconKey, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, deviceRefusalFromMessage, droppedConditionsForKind, iconCategoryLabel, iconEntry, iconsInCategory, isDefinitiveDeviceRefusal, isDrawableSubjectPath, isHeldBackTemplateVar, isIconKey, isSystemRuleKind, kindsForDiscriminator, knownValues, locationIconKey, nodePickerItems, packagePickerItems, parseDeviceEnrollmentLink, parseRetrainRevisionConflict, pickerForCondition, pickerForRuleClasses, projectSubjectPath, resolveIconKey, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, searchIcons, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, subjectPathSampleFromBox, subjectPathSvgPoints, summarizeReview, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies };
|
|
31830
|
+
export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFINITIVE_DEVICE_REFUSALS, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, LOCATION_ICON_FALLBACK, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_CLASS_SPECS, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, RETRAIN_REVIEW_ADJUSTED_IOU, RETRAIN_REVIEW_MATCH_IOU, RETRAIN_REVIEW_STATUSES, RETRAIN_REVISION_CONFLICT, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, buildDeviceEnrollmentLink, buildDeviceSignatureMessage, buildSubjectPath, canonicalIconKey, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, deviceRefusalFromMessage, droppedConditionsForKind, expandSystemEventClasses, iconCategoryLabel, iconEntry, iconsInCategory, isDefinitiveDeviceRefusal, isDrawableSubjectPath, isHeldBackTemplateVar, isIconKey, isSystemRuleKind, kindsForDiscriminator, knownValues, locationIconKey, nodePickerItems, packagePickerItems, parseDeviceEnrollmentLink, parseRetrainRevisionConflict, pickerForCondition, pickerForRuleClasses, projectSubjectPath, resolveIconKey, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, searchIcons, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, subjectPathSampleFromBox, subjectPathSvgPoints, summarizeReview, systemEventClassKinds, systemEventClassesFor, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, withSystemEventClasses };
|
|
@@ -313,6 +313,15 @@ export declare enum EventCategory {
|
|
|
313
313
|
* camera" produce byte-identical silence.
|
|
314
314
|
*/
|
|
315
315
|
PipelineDetectionBlind = "pipeline.detection-blind",
|
|
316
|
+
/**
|
|
317
|
+
* A camera's motion source has fired constantly with no subject for an hour
|
|
318
|
+
* (motion duty or session count over the bar, zero detections) — it is not
|
|
319
|
+
* blind, its motion zones or sensitivity want tuning (D907). Paired with
|
|
320
|
+
* {@link PipelineMotionCalm}.
|
|
321
|
+
*/
|
|
322
|
+
PipelineMotionNoisy = "pipeline.motion-noisy",
|
|
323
|
+
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
324
|
+
PipelineMotionCalm = "pipeline.motion-calm",
|
|
316
325
|
/**
|
|
317
326
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
318
327
|
* (3-level settings change via `setAgentAddonDefaults` /
|
|
@@ -685,6 +694,14 @@ export declare enum EventCategory {
|
|
|
685
694
|
BackupRestored = "backup.restored",
|
|
686
695
|
NotificationDispatched = "notification.dispatched",
|
|
687
696
|
NotificationFailed = "notification.failed",
|
|
697
|
+
/**
|
|
698
|
+
* A notification rule that cannot work (D905): its stored row does not load,
|
|
699
|
+
* or it still names a device / delivery target the prune CONFIRMED deleted.
|
|
700
|
+
* One edge per rule per distinct set of reasons; never on an unanswered read.
|
|
701
|
+
*/
|
|
702
|
+
NotificationRuleBroken = "notification.rule-broken",
|
|
703
|
+
/** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
|
|
704
|
+
NotificationRuleRepaired = "notification.rule-repaired",
|
|
688
705
|
DeviceUpdated = "device.updated",
|
|
689
706
|
/**
|
|
690
707
|
* Transport-level connectivity. Emitted by the device driver when
|
package/dist/enums.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_category = require("./event-category-
|
|
2
|
+
const require_event_category = require("./event-category-7AwNbPjm.js");
|
|
3
3
|
//#region src/enums/event-source-type.ts
|
|
4
4
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
5
5
|
EventSourceType["Addon"] = "addon";
|
package/dist/enums.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as EventCategory } from "./event-category-
|
|
1
|
+
import { t as EventCategory } from "./event-category-BfJwUd2S.mjs";
|
|
2
2
|
//#region src/enums/event-source-type.ts
|
|
3
3
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
4
4
|
EventSourceType["Addon"] = "addon";
|
|
@@ -315,6 +315,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
315
315
|
*/
|
|
316
316
|
EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
|
|
317
317
|
/**
|
|
318
|
+
* A camera's motion source has fired constantly with no subject for an hour
|
|
319
|
+
* (motion duty or session count over the bar, zero detections) — it is not
|
|
320
|
+
* blind, its motion zones or sensitivity want tuning (D907). Paired with
|
|
321
|
+
* {@link PipelineMotionCalm}.
|
|
322
|
+
*/
|
|
323
|
+
EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
|
|
324
|
+
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
325
|
+
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
326
|
+
/**
|
|
318
327
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
319
328
|
* (3-level settings change via `setAgentAddonDefaults` /
|
|
320
329
|
* `setCameraStepToggle` / `setCameraPipelineForAgent` or a
|
|
@@ -686,6 +695,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
686
695
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
687
696
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
688
697
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
698
|
+
/**
|
|
699
|
+
* A notification rule that cannot work (D905): its stored row does not load,
|
|
700
|
+
* or it still names a device / delivery target the prune CONFIRMED deleted.
|
|
701
|
+
* One edge per rule per distinct set of reasons; never on an unanswered read.
|
|
702
|
+
*/
|
|
703
|
+
EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
|
|
704
|
+
/** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
|
|
705
|
+
EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
|
|
689
706
|
EventCategory["DeviceUpdated"] = "device.updated";
|
|
690
707
|
/**
|
|
691
708
|
* Transport-level connectivity. Emitted by the device driver when
|
|
@@ -315,6 +315,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
315
315
|
*/
|
|
316
316
|
EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
|
|
317
317
|
/**
|
|
318
|
+
* A camera's motion source has fired constantly with no subject for an hour
|
|
319
|
+
* (motion duty or session count over the bar, zero detections) — it is not
|
|
320
|
+
* blind, its motion zones or sensitivity want tuning (D907). Paired with
|
|
321
|
+
* {@link PipelineMotionCalm}.
|
|
322
|
+
*/
|
|
323
|
+
EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
|
|
324
|
+
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
325
|
+
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
326
|
+
/**
|
|
318
327
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
319
328
|
* (3-level settings change via `setAgentAddonDefaults` /
|
|
320
329
|
* `setCameraStepToggle` / `setCameraPipelineForAgent` or a
|
|
@@ -686,6 +695,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
686
695
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
687
696
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
688
697
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
698
|
+
/**
|
|
699
|
+
* A notification rule that cannot work (D905): its stored row does not load,
|
|
700
|
+
* or it still names a device / delivery target the prune CONFIRMED deleted.
|
|
701
|
+
* One edge per rule per distinct set of reasons; never on an unanswered read.
|
|
702
|
+
*/
|
|
703
|
+
EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
|
|
704
|
+
/** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
|
|
705
|
+
EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
|
|
689
706
|
EventCategory["DeviceUpdated"] = "device.updated";
|
|
690
707
|
/**
|
|
691
708
|
* Transport-level connectivity. Emitted by the device driver when
|
|
@@ -8540,6 +8540,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
8540
8540
|
output: z.infer<typeof recordsCapability.methods.deleteWhere.output>;
|
|
8541
8541
|
meta: object;
|
|
8542
8542
|
}>;
|
|
8543
|
+
transact: TRPCMutationProcedure<{
|
|
8544
|
+
input: {
|
|
8545
|
+
[x: string]: unknown;
|
|
8546
|
+
} & z.input<typeof recordsCapability.methods.transact.input>;
|
|
8547
|
+
output: z.infer<typeof recordsCapability.methods.transact.output>;
|
|
8548
|
+
meta: object;
|
|
8549
|
+
}>;
|
|
8543
8550
|
deleteDevice: TRPCMutationProcedure<{
|
|
8544
8551
|
input: {
|
|
8545
8552
|
[x: string]: unknown;
|
|
@@ -10316,20 +10323,6 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
10316
10323
|
output: z.infer<typeof userManagementCapability.methods.validateCredentials.output>;
|
|
10317
10324
|
meta: object;
|
|
10318
10325
|
}>;
|
|
10319
|
-
listApiKeys: TRPCQueryProcedure<{
|
|
10320
|
-
input: {
|
|
10321
|
-
nodeId?: string | undefined;
|
|
10322
|
-
} | undefined;
|
|
10323
|
-
output: z.infer<typeof userManagementCapability.methods.listApiKeys.output>;
|
|
10324
|
-
meta: object;
|
|
10325
|
-
}>;
|
|
10326
|
-
revokeApiKey: TRPCMutationProcedure<{
|
|
10327
|
-
input: {
|
|
10328
|
-
[x: string]: unknown;
|
|
10329
|
-
} & z.input<typeof userManagementCapability.methods.revokeApiKey.input>;
|
|
10330
|
-
output: z.infer<typeof userManagementCapability.methods.revokeApiKey.output>;
|
|
10331
|
-
meta: object;
|
|
10332
|
-
}>;
|
|
10333
10326
|
setupTotp: TRPCMutationProcedure<{
|
|
10334
10327
|
input: {
|
|
10335
10328
|
[x: string]: unknown;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* `ALL_CAPABILITY_DEFINITIONS` (the whole Zod schema graph, ~+100 MB heap per
|
|
6
6
|
* runner). See docs/decisions/adr-0028.md.
|
|
7
7
|
*
|
|
8
|
-
* Coverage: 1 advance-derived caps, 73 caps with
|
|
8
|
+
* Coverage: 1 advance-derived caps, 73 caps with 373 state leaves.
|
|
9
9
|
*/
|
|
10
10
|
/** A bindable scalar in a capability's runtime state. */
|
|
11
11
|
export interface CapStateLeaf {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 1380 method paths across 179 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -114,7 +114,7 @@ export interface SystemProxy {
|
|
|
114
114
|
readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
|
|
115
115
|
readonly training: Pick<InferProvider<typeof trainingCapability>, 'listBaseModels' | 'planJob' | 'startJob' | 'startJobBatch' | 'listJobs' | 'getJob' | 'cancelJob' | 'getJobResult' | 'registerResult' | 'canaryResult' | 'rollbackCanary' | 'discardResult'>;
|
|
116
116
|
readonly turnProvider: Pick<InferProvider<typeof turnProviderCapability>, 'getTurnServers'>;
|
|
117
|
-
readonly userManagement: Pick<InferProvider<typeof userManagementCapability>, 'listUsers' | 'createUser' | 'updateUser' | 'deleteUser' | 'resetPassword' | 'setUserScopes' | 'validateCredentials' | '
|
|
117
|
+
readonly userManagement: Pick<InferProvider<typeof userManagementCapability>, 'listUsers' | 'createUser' | 'updateUser' | 'deleteUser' | 'resetPassword' | 'setUserScopes' | 'validateCredentials' | 'setupTotp' | 'confirmTotp' | 'disableTotp' | 'getTotpStatus' | 'migrateRawSecrets' | 'verifyTotp' | 'oauthIssueCode' | 'oauthExchangeCode' | 'oauthRefresh' | 'oauthVerifyAccessToken' | 'listExternalIdentities' | 'findUserByExternalIdentity' | 'unlinkExternalIdentity' | 'listOauthSessions' | 'revokeOauthSession'>;
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
120
|
* Build a `SystemProxy` that dispatches every namespace method through
|