@camstack/types 1.2.396 → 1.2.397
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 +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/notification-rules.cap.d.ts +46 -0
- package/dist/capabilities/osd-manager.cap.d.ts +12 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +236 -4
- package/dist/client.mjs +232 -5
- package/dist/enums/event-category.d.ts +8 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-DOl51-Ij.mjs → event-category-7pZEBmVg.mjs} +8 -0
- package/dist/{event-category-eSqkye-K.js → event-category-kpu1bZMs.js} +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +247 -3
- package/dist/index.mjs +241 -4
- package/dist/interfaces/event-bus.d.ts +19 -0
- package/dist/notification/system-event-classes.d.ts +73 -0
- package/dist/{sleep-Re8daN0Y.js → sleep-Bo7fq491.js} +1 -1
- package/dist/{sleep-_sV1BE2f.mjs → sleep-CueztlR1.mjs} +1 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
3
|
-
const require_event_category = require("./event-category-
|
|
2
|
+
const require_sleep = require("./sleep-Bo7fq491.js");
|
|
3
|
+
const require_event_category = require("./event-category-kpu1bZMs.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-BhVbr0NX.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
6
6
|
/**
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $n as DisposerChain, $t as recordSecretRef, A as HF_REPO, An as RECORD_MAX_INDEXES, B as describeCustomActions, Bn as clearKnownSecrets, Br as toSecretFieldView, Bt as RecordIndexSchema, C as addonSliceHandleApi, Cn as RECORD_BATCH_MAX_BYTES, Cr as emitReadiness, Dn as RECORD_DELETE_BATCH, En as RECORD_DEFAULT_MAX_DATA_BYTES, F as DEVICE_CHILDREN_BATCH_MAX, Fn as RECORD_SWEEP_INTERVAL_MS, Fr as isSecretClear, Ft as defineEntryKind, Gn as shortSecretRefHash, Gt as declarationsOf, H as adminUiCapability, Hn as knownSecretCount, Ht as RecordKindNameSchema, I as CALLER_STAMPED_CAPABILITIES, In as resolveSecretViewsIn, Ir as isSecretFieldView, It as entryBody, Jn as PEER_BYTES_STALL_MS, Jt as collectSecretLeaves, Kn as PEER_BYTES_CHUNK_BYTES, Kt as defineRecordKinds, L as withoutCallerStamp, Ln as REVALIDATE_AFTER_MS, Lr as isSecretMarker, Lt as createRecordsAccess, Mn as RECORD_QUERY_MAX, N as deviceOpsCapability, Nn as RECORD_SECRET_COLLECTION_PREFIX, Nr as SECRET_CLEAR, On as RECORD_ID_MAX_LENGTH, P as viewerUiCapability, Pn as RECORD_SETTINGS_MAX_ROWS, Pr as classifySecretWrite, Pt as makeInMemoryRecords, Qt as recordSecretCollection, Rn as createSecretsAccess, Rr as isSecretMarkerLike, Rt as EntryDescriptorSchema, Sn as RECORD_BATCH_MAX, Sr as createEvent, Tn as RECORD_DATABASES, Un as registerKnownSecret, Ut as RecordRetentionSchema, Vn as forgetKnownSecret, Vt as RecordKindDeclarationSchema, Wn as scrubKnownSecrets, Wt as assertValidDeclaration, X as expandCapMethods, Xt as parseSecretPath, Yn as PEER_BYTES_TICKET_TTL_MS, Yt as mapSecretLeaves, Zn as DATAPLANE_SECRET_HEADER, Zt as recordArrayItemPath, _ as readErrorI18n, _n as RevConflictError, _r as isSecretRef, an as DeclarationRefusedError, b as isDeviceScopedCap, bn as asRecordsError, c as asString, cn as InvalidRecordError, ct as ReadinessTimeoutError, d as parseJsonUnknown, dn as RECORDS_ERROR_CODES, dt as scopeKey, en as secretArrayPrefixes, er as BaseAddon, f as hfModelUrl, fn as RecordNotFoundError, fr as SECRET_REF_SCHEME, g as ErrorI18nPayloadSchema, gn as RecordsError, gr as globalSecretScope, hn as RecordUniqueViolationError, hr as formatSecretScope, in as BatchTooLargeError, it as readNodePin, jn as RECORD_MAX_INDEX_FIELDS, kn as RECORD_MAX_DATA_BYTES, ln as NoCallerError, mn as RecordTooLargeError, mr as buildSecretRef, nn as collectZodSecretPaths, nr as normalizeAddonInitResult, o as asJsonObject, on as FilterRequiredError, ot as MODEL_FORMATS, p as BOOT_RECOVERY_BACKOFF_MS, pn as RecordSecretUnavailableError, pr as arrayItemFieldPath, qn as PEER_BYTES_MAX_OUTSTANDING, qt as REMOVE_LEAF, r as maskUrlCredentials, rn as isZodSecret, rt as nodePin, sn as ForeignSecretMarkerError, st as ReadinessRegistry, t as sleep, un as PlaintextSecretError, vn as UnindexedFilterError, vr as normalizeSecretOwner, w as createEventBusSliceSource, wn as RECORD_CLASSES, x as createDeviceProxy, xn as recordsErrorFromMessage, y as DEVICE_SCOPED_CAPS, yn as UnknownRecordKindError, yr as parseSecretRef, zn as MIN_SCRUBBED_LENGTH, zr as makeSecretMarker, zt as RecordFieldPathSchema } from "./sleep-
|
|
2
|
-
import { t as EventCategory } from "./event-category-
|
|
1
|
+
import { $n as DisposerChain, $t as recordSecretRef, A as HF_REPO, An as RECORD_MAX_INDEXES, B as describeCustomActions, Bn as clearKnownSecrets, Br as toSecretFieldView, Bt as RecordIndexSchema, C as addonSliceHandleApi, Cn as RECORD_BATCH_MAX_BYTES, Cr as emitReadiness, Dn as RECORD_DELETE_BATCH, En as RECORD_DEFAULT_MAX_DATA_BYTES, F as DEVICE_CHILDREN_BATCH_MAX, Fn as RECORD_SWEEP_INTERVAL_MS, Fr as isSecretClear, Ft as defineEntryKind, Gn as shortSecretRefHash, Gt as declarationsOf, H as adminUiCapability, Hn as knownSecretCount, Ht as RecordKindNameSchema, I as CALLER_STAMPED_CAPABILITIES, In as resolveSecretViewsIn, Ir as isSecretFieldView, It as entryBody, Jn as PEER_BYTES_STALL_MS, Jt as collectSecretLeaves, Kn as PEER_BYTES_CHUNK_BYTES, Kt as defineRecordKinds, L as withoutCallerStamp, Ln as REVALIDATE_AFTER_MS, Lr as isSecretMarker, Lt as createRecordsAccess, Mn as RECORD_QUERY_MAX, N as deviceOpsCapability, Nn as RECORD_SECRET_COLLECTION_PREFIX, Nr as SECRET_CLEAR, On as RECORD_ID_MAX_LENGTH, P as viewerUiCapability, Pn as RECORD_SETTINGS_MAX_ROWS, Pr as classifySecretWrite, Pt as makeInMemoryRecords, Qt as recordSecretCollection, Rn as createSecretsAccess, Rr as isSecretMarkerLike, Rt as EntryDescriptorSchema, Sn as RECORD_BATCH_MAX, Sr as createEvent, Tn as RECORD_DATABASES, Un as registerKnownSecret, Ut as RecordRetentionSchema, Vn as forgetKnownSecret, Vt as RecordKindDeclarationSchema, Wn as scrubKnownSecrets, Wt as assertValidDeclaration, X as expandCapMethods, Xt as parseSecretPath, Yn as PEER_BYTES_TICKET_TTL_MS, Yt as mapSecretLeaves, Zn as DATAPLANE_SECRET_HEADER, Zt as recordArrayItemPath, _ as readErrorI18n, _n as RevConflictError, _r as isSecretRef, an as DeclarationRefusedError, b as isDeviceScopedCap, bn as asRecordsError, c as asString, cn as InvalidRecordError, ct as ReadinessTimeoutError, d as parseJsonUnknown, dn as RECORDS_ERROR_CODES, dt as scopeKey, en as secretArrayPrefixes, er as BaseAddon, f as hfModelUrl, fn as RecordNotFoundError, fr as SECRET_REF_SCHEME, g as ErrorI18nPayloadSchema, gn as RecordsError, gr as globalSecretScope, hn as RecordUniqueViolationError, hr as formatSecretScope, in as BatchTooLargeError, it as readNodePin, jn as RECORD_MAX_INDEX_FIELDS, kn as RECORD_MAX_DATA_BYTES, ln as NoCallerError, mn as RecordTooLargeError, mr as buildSecretRef, nn as collectZodSecretPaths, nr as normalizeAddonInitResult, o as asJsonObject, on as FilterRequiredError, ot as MODEL_FORMATS, p as BOOT_RECOVERY_BACKOFF_MS, pn as RecordSecretUnavailableError, pr as arrayItemFieldPath, qn as PEER_BYTES_MAX_OUTSTANDING, qt as REMOVE_LEAF, r as maskUrlCredentials, rn as isZodSecret, rt as nodePin, sn as ForeignSecretMarkerError, st as ReadinessRegistry, t as sleep, un as PlaintextSecretError, vn as UnindexedFilterError, vr as normalizeSecretOwner, w as createEventBusSliceSource, wn as RECORD_CLASSES, x as createDeviceProxy, xn as recordsErrorFromMessage, y as DEVICE_SCOPED_CAPS, yn as UnknownRecordKindError, yr as parseSecretRef, zn as MIN_SCRUBBED_LENGTH, zr as makeSecretMarker, zt as RecordFieldPathSchema } from "./sleep-CueztlR1.mjs";
|
|
2
|
+
import { t as EventCategory } from "./event-category-7pZEBmVg.mjs";
|
|
3
3
|
import { a as DeviceType, t as errMsg } from "./err-msg-BXKzRBwg.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
5
5
|
/**
|
|
@@ -107,6 +107,8 @@ export declare const NcSystemEventKindSchema: z.ZodEnum<{
|
|
|
107
107
|
"recording-degraded": "recording-degraded";
|
|
108
108
|
"recording-healthy": "recording-healthy";
|
|
109
109
|
"recording-stalled": "recording-stalled";
|
|
110
|
+
"rule-broken": "rule-broken";
|
|
111
|
+
"rule-repaired": "rule-repaired";
|
|
110
112
|
"server-update-available": "server-update-available";
|
|
111
113
|
"server-updated": "server-updated";
|
|
112
114
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -215,6 +217,8 @@ export declare const NcSystemEventConditionSchema: z.ZodObject<{
|
|
|
215
217
|
"recording-degraded": "recording-degraded";
|
|
216
218
|
"recording-healthy": "recording-healthy";
|
|
217
219
|
"recording-stalled": "recording-stalled";
|
|
220
|
+
"rule-broken": "rule-broken";
|
|
221
|
+
"rule-repaired": "rule-repaired";
|
|
218
222
|
"server-update-available": "server-update-available";
|
|
219
223
|
"server-updated": "server-updated";
|
|
220
224
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -944,6 +948,8 @@ export declare const NcConditionsSchema: z.ZodObject<{
|
|
|
944
948
|
"recording-degraded": "recording-degraded";
|
|
945
949
|
"recording-healthy": "recording-healthy";
|
|
946
950
|
"recording-stalled": "recording-stalled";
|
|
951
|
+
"rule-broken": "rule-broken";
|
|
952
|
+
"rule-repaired": "rule-repaired";
|
|
947
953
|
"server-update-available": "server-update-available";
|
|
948
954
|
"server-updated": "server-updated";
|
|
949
955
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -1351,6 +1357,8 @@ export declare const NcRuleInputSchema: z.ZodObject<{
|
|
|
1351
1357
|
"recording-degraded": "recording-degraded";
|
|
1352
1358
|
"recording-healthy": "recording-healthy";
|
|
1353
1359
|
"recording-stalled": "recording-stalled";
|
|
1360
|
+
"rule-broken": "rule-broken";
|
|
1361
|
+
"rule-repaired": "rule-repaired";
|
|
1354
1362
|
"server-update-available": "server-update-available";
|
|
1355
1363
|
"server-updated": "server-updated";
|
|
1356
1364
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -1874,6 +1882,8 @@ export declare const NcRulePatchSchema: z.ZodObject<{
|
|
|
1874
1882
|
"recording-degraded": "recording-degraded";
|
|
1875
1883
|
"recording-healthy": "recording-healthy";
|
|
1876
1884
|
"recording-stalled": "recording-stalled";
|
|
1885
|
+
"rule-broken": "rule-broken";
|
|
1886
|
+
"rule-repaired": "rule-repaired";
|
|
1877
1887
|
"server-update-available": "server-update-available";
|
|
1878
1888
|
"server-updated": "server-updated";
|
|
1879
1889
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -2274,6 +2284,8 @@ export declare const NcRuleUpdateInputSchema: z.ZodObject<{
|
|
|
2274
2284
|
"recording-degraded": "recording-degraded";
|
|
2275
2285
|
"recording-healthy": "recording-healthy";
|
|
2276
2286
|
"recording-stalled": "recording-stalled";
|
|
2287
|
+
"rule-broken": "rule-broken";
|
|
2288
|
+
"rule-repaired": "rule-repaired";
|
|
2277
2289
|
"server-update-available": "server-update-available";
|
|
2278
2290
|
"server-updated": "server-updated";
|
|
2279
2291
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -2495,6 +2507,8 @@ export declare const NcRuleSchema: z.ZodObject<{
|
|
|
2495
2507
|
"recording-degraded": "recording-degraded";
|
|
2496
2508
|
"recording-healthy": "recording-healthy";
|
|
2497
2509
|
"recording-stalled": "recording-stalled";
|
|
2510
|
+
"rule-broken": "rule-broken";
|
|
2511
|
+
"rule-repaired": "rule-repaired";
|
|
2498
2512
|
"server-update-available": "server-update-available";
|
|
2499
2513
|
"server-updated": "server-updated";
|
|
2500
2514
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -3035,6 +3049,8 @@ export declare const NcTemplateVarDescriptorSchema: z.ZodObject<{
|
|
|
3035
3049
|
"recording-degraded": "recording-degraded";
|
|
3036
3050
|
"recording-healthy": "recording-healthy";
|
|
3037
3051
|
"recording-stalled": "recording-stalled";
|
|
3052
|
+
"rule-broken": "rule-broken";
|
|
3053
|
+
"rule-repaired": "rule-repaired";
|
|
3038
3054
|
"server-update-available": "server-update-available";
|
|
3039
3055
|
"server-updated": "server-updated";
|
|
3040
3056
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -3126,6 +3142,8 @@ export declare const NcTemplateVarContextSchema: z.ZodObject<{
|
|
|
3126
3142
|
"recording-degraded": "recording-degraded";
|
|
3127
3143
|
"recording-healthy": "recording-healthy";
|
|
3128
3144
|
"recording-stalled": "recording-stalled";
|
|
3145
|
+
"rule-broken": "rule-broken";
|
|
3146
|
+
"rule-repaired": "rule-repaired";
|
|
3129
3147
|
"server-update-available": "server-update-available";
|
|
3130
3148
|
"server-updated": "server-updated";
|
|
3131
3149
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -3214,6 +3232,8 @@ export declare const NcTemplatePreviewInputSchema: z.ZodObject<{
|
|
|
3214
3232
|
"recording-degraded": "recording-degraded";
|
|
3215
3233
|
"recording-healthy": "recording-healthy";
|
|
3216
3234
|
"recording-stalled": "recording-stalled";
|
|
3235
|
+
"rule-broken": "rule-broken";
|
|
3236
|
+
"rule-repaired": "rule-repaired";
|
|
3217
3237
|
"server-update-available": "server-update-available";
|
|
3218
3238
|
"server-updated": "server-updated";
|
|
3219
3239
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -3384,6 +3404,8 @@ export declare const NcHistorySubjectSchema: z.ZodObject<{
|
|
|
3384
3404
|
"recording-degraded": "recording-degraded";
|
|
3385
3405
|
"recording-healthy": "recording-healthy";
|
|
3386
3406
|
"recording-stalled": "recording-stalled";
|
|
3407
|
+
"rule-broken": "rule-broken";
|
|
3408
|
+
"rule-repaired": "rule-repaired";
|
|
3387
3409
|
"server-update-available": "server-update-available";
|
|
3388
3410
|
"server-updated": "server-updated";
|
|
3389
3411
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -3491,6 +3513,8 @@ export declare const NcHistoryEntrySchema: z.ZodObject<{
|
|
|
3491
3513
|
"recording-degraded": "recording-degraded";
|
|
3492
3514
|
"recording-healthy": "recording-healthy";
|
|
3493
3515
|
"recording-stalled": "recording-stalled";
|
|
3516
|
+
"rule-broken": "rule-broken";
|
|
3517
|
+
"rule-repaired": "rule-repaired";
|
|
3494
3518
|
"server-update-available": "server-update-available";
|
|
3495
3519
|
"server-updated": "server-updated";
|
|
3496
3520
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -4627,6 +4651,8 @@ export declare const notificationRulesCapability: {
|
|
|
4627
4651
|
"recording-degraded": "recording-degraded";
|
|
4628
4652
|
"recording-healthy": "recording-healthy";
|
|
4629
4653
|
"recording-stalled": "recording-stalled";
|
|
4654
|
+
"rule-broken": "rule-broken";
|
|
4655
|
+
"rule-repaired": "rule-repaired";
|
|
4630
4656
|
"server-update-available": "server-update-available";
|
|
4631
4657
|
"server-updated": "server-updated";
|
|
4632
4658
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -4995,6 +5021,8 @@ export declare const notificationRulesCapability: {
|
|
|
4995
5021
|
"recording-degraded": "recording-degraded";
|
|
4996
5022
|
"recording-healthy": "recording-healthy";
|
|
4997
5023
|
"recording-stalled": "recording-stalled";
|
|
5024
|
+
"rule-broken": "rule-broken";
|
|
5025
|
+
"rule-repaired": "rule-repaired";
|
|
4998
5026
|
"server-update-available": "server-update-available";
|
|
4999
5027
|
"server-updated": "server-updated";
|
|
5000
5028
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -5361,6 +5389,8 @@ export declare const notificationRulesCapability: {
|
|
|
5361
5389
|
"recording-degraded": "recording-degraded";
|
|
5362
5390
|
"recording-healthy": "recording-healthy";
|
|
5363
5391
|
"recording-stalled": "recording-stalled";
|
|
5392
|
+
"rule-broken": "rule-broken";
|
|
5393
|
+
"rule-repaired": "rule-repaired";
|
|
5364
5394
|
"server-update-available": "server-update-available";
|
|
5365
5395
|
"server-updated": "server-updated";
|
|
5366
5396
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -5721,6 +5751,8 @@ export declare const notificationRulesCapability: {
|
|
|
5721
5751
|
"recording-degraded": "recording-degraded";
|
|
5722
5752
|
"recording-healthy": "recording-healthy";
|
|
5723
5753
|
"recording-stalled": "recording-stalled";
|
|
5754
|
+
"rule-broken": "rule-broken";
|
|
5755
|
+
"rule-repaired": "rule-repaired";
|
|
5724
5756
|
"server-update-available": "server-update-available";
|
|
5725
5757
|
"server-updated": "server-updated";
|
|
5726
5758
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -6244,6 +6276,8 @@ export declare const notificationRulesCapability: {
|
|
|
6244
6276
|
"recording-degraded": "recording-degraded";
|
|
6245
6277
|
"recording-healthy": "recording-healthy";
|
|
6246
6278
|
"recording-stalled": "recording-stalled";
|
|
6279
|
+
"rule-broken": "rule-broken";
|
|
6280
|
+
"rule-repaired": "rule-repaired";
|
|
6247
6281
|
"server-update-available": "server-update-available";
|
|
6248
6282
|
"server-updated": "server-updated";
|
|
6249
6283
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -6463,6 +6497,8 @@ export declare const notificationRulesCapability: {
|
|
|
6463
6497
|
"recording-degraded": "recording-degraded";
|
|
6464
6498
|
"recording-healthy": "recording-healthy";
|
|
6465
6499
|
"recording-stalled": "recording-stalled";
|
|
6500
|
+
"rule-broken": "rule-broken";
|
|
6501
|
+
"rule-repaired": "rule-repaired";
|
|
6466
6502
|
"server-update-available": "server-update-available";
|
|
6467
6503
|
"server-updated": "server-updated";
|
|
6468
6504
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -7022,6 +7058,8 @@ export declare const notificationRulesCapability: {
|
|
|
7022
7058
|
"recording-degraded": "recording-degraded";
|
|
7023
7059
|
"recording-healthy": "recording-healthy";
|
|
7024
7060
|
"recording-stalled": "recording-stalled";
|
|
7061
|
+
"rule-broken": "rule-broken";
|
|
7062
|
+
"rule-repaired": "rule-repaired";
|
|
7025
7063
|
"server-update-available": "server-update-available";
|
|
7026
7064
|
"server-updated": "server-updated";
|
|
7027
7065
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -7407,6 +7445,8 @@ export declare const notificationRulesCapability: {
|
|
|
7407
7445
|
"recording-degraded": "recording-degraded";
|
|
7408
7446
|
"recording-healthy": "recording-healthy";
|
|
7409
7447
|
"recording-stalled": "recording-stalled";
|
|
7448
|
+
"rule-broken": "rule-broken";
|
|
7449
|
+
"rule-repaired": "rule-repaired";
|
|
7410
7450
|
"server-update-available": "server-update-available";
|
|
7411
7451
|
"server-updated": "server-updated";
|
|
7412
7452
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -7877,6 +7917,8 @@ export declare const notificationRulesCapability: {
|
|
|
7877
7917
|
"recording-degraded": "recording-degraded";
|
|
7878
7918
|
"recording-healthy": "recording-healthy";
|
|
7879
7919
|
"recording-stalled": "recording-stalled";
|
|
7920
|
+
"rule-broken": "rule-broken";
|
|
7921
|
+
"rule-repaired": "rule-repaired";
|
|
7880
7922
|
"server-update-available": "server-update-available";
|
|
7881
7923
|
"server-updated": "server-updated";
|
|
7882
7924
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -7974,6 +8016,8 @@ export declare const notificationRulesCapability: {
|
|
|
7974
8016
|
"recording-degraded": "recording-degraded";
|
|
7975
8017
|
"recording-healthy": "recording-healthy";
|
|
7976
8018
|
"recording-stalled": "recording-stalled";
|
|
8019
|
+
"rule-broken": "rule-broken";
|
|
8020
|
+
"rule-repaired": "rule-repaired";
|
|
7977
8021
|
"server-update-available": "server-update-available";
|
|
7978
8022
|
"server-updated": "server-updated";
|
|
7979
8023
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -8100,6 +8144,8 @@ export declare const notificationRulesCapability: {
|
|
|
8100
8144
|
"recording-degraded": "recording-degraded";
|
|
8101
8145
|
"recording-healthy": "recording-healthy";
|
|
8102
8146
|
"recording-stalled": "recording-stalled";
|
|
8147
|
+
"rule-broken": "rule-broken";
|
|
8148
|
+
"rule-repaired": "rule-repaired";
|
|
8103
8149
|
"server-update-available": "server-update-available";
|
|
8104
8150
|
"server-updated": "server-updated";
|
|
8105
8151
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -251,6 +251,8 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
|
|
|
251
251
|
"recording-degraded": "recording-degraded";
|
|
252
252
|
"recording-healthy": "recording-healthy";
|
|
253
253
|
"recording-stalled": "recording-stalled";
|
|
254
|
+
"rule-broken": "rule-broken";
|
|
255
|
+
"rule-repaired": "rule-repaired";
|
|
254
256
|
"server-update-available": "server-update-available";
|
|
255
257
|
"server-updated": "server-updated";
|
|
256
258
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -450,6 +452,8 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
|
|
|
450
452
|
"recording-degraded": "recording-degraded";
|
|
451
453
|
"recording-healthy": "recording-healthy";
|
|
452
454
|
"recording-stalled": "recording-stalled";
|
|
455
|
+
"rule-broken": "rule-broken";
|
|
456
|
+
"rule-repaired": "rule-repaired";
|
|
453
457
|
"server-update-available": "server-update-available";
|
|
454
458
|
"server-updated": "server-updated";
|
|
455
459
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -721,6 +725,8 @@ export declare const osdManagerCapability: {
|
|
|
721
725
|
"recording-degraded": "recording-degraded";
|
|
722
726
|
"recording-healthy": "recording-healthy";
|
|
723
727
|
"recording-stalled": "recording-stalled";
|
|
728
|
+
"rule-broken": "rule-broken";
|
|
729
|
+
"rule-repaired": "rule-repaired";
|
|
724
730
|
"server-update-available": "server-update-available";
|
|
725
731
|
"server-updated": "server-updated";
|
|
726
732
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -1011,6 +1017,8 @@ export declare const osdManagerCapability: {
|
|
|
1011
1017
|
"recording-degraded": "recording-degraded";
|
|
1012
1018
|
"recording-healthy": "recording-healthy";
|
|
1013
1019
|
"recording-stalled": "recording-stalled";
|
|
1020
|
+
"rule-broken": "rule-broken";
|
|
1021
|
+
"rule-repaired": "rule-repaired";
|
|
1014
1022
|
"server-update-available": "server-update-available";
|
|
1015
1023
|
"server-updated": "server-updated";
|
|
1016
1024
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -1209,6 +1217,8 @@ export declare const osdManagerCapability: {
|
|
|
1209
1217
|
"recording-degraded": "recording-degraded";
|
|
1210
1218
|
"recording-healthy": "recording-healthy";
|
|
1211
1219
|
"recording-stalled": "recording-stalled";
|
|
1220
|
+
"rule-broken": "rule-broken";
|
|
1221
|
+
"rule-repaired": "rule-repaired";
|
|
1212
1222
|
"server-update-available": "server-update-available";
|
|
1213
1223
|
"server-updated": "server-updated";
|
|
1214
1224
|
"storage-location-critical": "storage-location-critical";
|
|
@@ -1451,6 +1461,8 @@ export declare const osdManagerCapability: {
|
|
|
1451
1461
|
"recording-degraded": "recording-degraded";
|
|
1452
1462
|
"recording-healthy": "recording-healthy";
|
|
1453
1463
|
"recording-stalled": "recording-stalled";
|
|
1464
|
+
"rule-broken": "rule-broken";
|
|
1465
|
+
"rule-repaired": "rule-repaired";
|
|
1454
1466
|
"server-update-available": "server-update-available";
|
|
1455
1467
|
"server-updated": "server-updated";
|
|
1456
1468
|
"storage-location-critical": "storage-location-critical";
|
package/dist/client.d.ts
CHANGED
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* value this entry does not export — a missing name here is `undefined` at
|
|
15
15
|
* runtime, not a build error.
|
|
16
16
|
*/
|
|
17
|
-
export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, LOCATION_ICON_FALLBACK, DEFINITIVE_DEVICE_REFUSALS, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, DEVICE_CERT_SIGNATURE, DEVICE_SIGNATURE_MESSAGE_VERSION, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, 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, canonicalIconKey, buildDeviceEnrollmentLink, buildDeviceSignatureMessage, deviceRefusalFromMessage, isDefinitiveDeviceRefusal, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, droppedConditionsForKind, iconCategoryLabel, iconEntry, iconsInCategory, isIconKey, isHeldBackTemplateVar, isSystemRuleKind, kindsForDiscriminator, locationIconKey, knownValues, nodePickerItems, parseDeviceEnrollmentLink, packagePickerItems, pickerForCondition, pickerForRuleClasses, parseRetrainRevisionConflict, resolveIconKey, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, searchIcons, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, summarizeReview, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, buildSubjectPath, isDrawableSubjectPath, projectSubjectPath, subjectPathSampleFromBox, subjectPathSvgPoints, } from './index.js';
|
|
17
|
+
export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, LOCATION_ICON_FALLBACK, DEFINITIVE_DEVICE_REFUSALS, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, DEVICE_CERT_SIGNATURE, DEVICE_SIGNATURE_MESSAGE_VERSION, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, 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_CLASS_SPECS, 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, canonicalIconKey, buildDeviceEnrollmentLink, buildDeviceSignatureMessage, deviceRefusalFromMessage, isDefinitiveDeviceRefusal, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, droppedConditionsForKind, iconCategoryLabel, iconEntry, iconsInCategory, isIconKey, isHeldBackTemplateVar, isSystemRuleKind, kindsForDiscriminator, locationIconKey, knownValues, nodePickerItems, parseDeviceEnrollmentLink, packagePickerItems, pickerForCondition, pickerForRuleClasses, parseRetrainRevisionConflict, resolveIconKey, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, searchIcons, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, summarizeReview, systemEventClassesFor, systemEventClassKinds, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, buildSubjectPath, isDrawableSubjectPath, projectSubjectPath, subjectPathSampleFromBox, subjectPathSvgPoints, expandSystemEventClasses, withSystemEventClasses, } from './index.js';
|
package/dist/client.js
CHANGED
|
@@ -22291,6 +22291,8 @@ var NcSystemEventKindSchema = zod.z.enum([
|
|
|
22291
22291
|
"alert-critical",
|
|
22292
22292
|
"alert-error",
|
|
22293
22293
|
"alert-critical-resolved",
|
|
22294
|
+
"rule-broken",
|
|
22295
|
+
"rule-repaired",
|
|
22294
22296
|
"camera-online",
|
|
22295
22297
|
"camera-offline",
|
|
22296
22298
|
"camera-disabled",
|
|
@@ -28784,8 +28786,8 @@ var NC_SYSTEM_EVENT_FAMILIES = [
|
|
|
28784
28786
|
function isSystemEventFamily(value) {
|
|
28785
28787
|
return NC_SYSTEM_EVENT_FAMILIES.some((family) => family === value);
|
|
28786
28788
|
}
|
|
28787
|
-
/**
|
|
28788
|
-
var
|
|
28789
|
+
/** Total over the enum: a kind added to the cap without a family fails tsc here. */
|
|
28790
|
+
var NC_SYSTEM_EVENT_FAMILY = {
|
|
28789
28791
|
"device-online": "device-events",
|
|
28790
28792
|
"device-offline": "device-events",
|
|
28791
28793
|
"device-disabled": "device-events",
|
|
@@ -28819,6 +28821,8 @@ var FAMILY_BY_NAME = new Map(Object.entries({
|
|
|
28819
28821
|
"alert-critical": "system",
|
|
28820
28822
|
"alert-error": "system",
|
|
28821
28823
|
"alert-critical-resolved": "system",
|
|
28824
|
+
"rule-broken": "system",
|
|
28825
|
+
"rule-repaired": "system",
|
|
28822
28826
|
"storage-location-low": "system",
|
|
28823
28827
|
"storage-location-critical": "system",
|
|
28824
28828
|
"storage-location-ok": "system",
|
|
@@ -28835,7 +28839,9 @@ var FAMILY_BY_NAME = new Map(Object.entries({
|
|
|
28835
28839
|
"camera-offline": null,
|
|
28836
28840
|
"camera-disabled": null,
|
|
28837
28841
|
"camera-enabled": null
|
|
28838
|
-
}
|
|
28842
|
+
};
|
|
28843
|
+
/** Read by NAME, for kinds that arrive as plain strings (a newer hub, the viewer's mirror). */
|
|
28844
|
+
var FAMILY_BY_NAME = new Map(Object.entries(NC_SYSTEM_EVENT_FAMILY));
|
|
28839
28845
|
[...NC_SYSTEM_EVENT_FILTER_KEYS];
|
|
28840
28846
|
/**
|
|
28841
28847
|
* The filters a family may carry. The base filters are the union of
|
|
@@ -28969,6 +28975,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
28969
28975
|
"alert-critical-resolved"
|
|
28970
28976
|
]
|
|
28971
28977
|
},
|
|
28978
|
+
{
|
|
28979
|
+
id: "rule-health",
|
|
28980
|
+
family: "system",
|
|
28981
|
+
label: "Notification rules",
|
|
28982
|
+
kinds: ["rule-broken", "rule-repaired"]
|
|
28983
|
+
},
|
|
28972
28984
|
{
|
|
28973
28985
|
id: "alarm",
|
|
28974
28986
|
family: "alarm",
|
|
@@ -30475,6 +30487,47 @@ var NC_TEMPLATE_VARS = [
|
|
|
30475
30487
|
kinds: ["system"],
|
|
30476
30488
|
systemEventKinds: ["recording-degraded", ...ALERT_EPISODE]
|
|
30477
30489
|
},
|
|
30490
|
+
{
|
|
30491
|
+
name: "ruleName",
|
|
30492
|
+
label: "Rule name",
|
|
30493
|
+
example: "Robot",
|
|
30494
|
+
group: "system",
|
|
30495
|
+
families: ["rule"],
|
|
30496
|
+
fields: [...RULE_TEXT],
|
|
30497
|
+
kinds: ["system"],
|
|
30498
|
+
systemEventKinds: ["rule-broken", "rule-repaired"]
|
|
30499
|
+
},
|
|
30500
|
+
{
|
|
30501
|
+
name: "ruleId",
|
|
30502
|
+
label: "Rule id",
|
|
30503
|
+
example: "3db3e226-9b82-4681-a200-de13b260aa48",
|
|
30504
|
+
group: "system",
|
|
30505
|
+
families: ["rule"],
|
|
30506
|
+
fields: [...RULE_TEXT],
|
|
30507
|
+
kinds: ["system"],
|
|
30508
|
+
systemEventKinds: ["rule-broken", "rule-repaired"]
|
|
30509
|
+
},
|
|
30510
|
+
{
|
|
30511
|
+
name: "brokenReason",
|
|
30512
|
+
label: "Why the rule is broken",
|
|
30513
|
+
description: "unparseable, device-deleted or target-deleted",
|
|
30514
|
+
example: "device-deleted",
|
|
30515
|
+
group: "system",
|
|
30516
|
+
families: ["rule"],
|
|
30517
|
+
fields: [...RULE_TEXT],
|
|
30518
|
+
kinds: ["system"],
|
|
30519
|
+
systemEventKinds: ["rule-broken"]
|
|
30520
|
+
},
|
|
30521
|
+
{
|
|
30522
|
+
name: "offendingIds",
|
|
30523
|
+
label: "Deleted devices or destinations",
|
|
30524
|
+
example: "4483",
|
|
30525
|
+
group: "system",
|
|
30526
|
+
families: ["rule"],
|
|
30527
|
+
fields: [...RULE_TEXT],
|
|
30528
|
+
kinds: ["system"],
|
|
30529
|
+
systemEventKinds: ["rule-broken"]
|
|
30530
|
+
},
|
|
30478
30531
|
{
|
|
30479
30532
|
name: "locationName",
|
|
30480
30533
|
label: "Storage location",
|
|
@@ -30930,7 +30983,9 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
|
30930
30983
|
"node-updating",
|
|
30931
30984
|
"alert-critical",
|
|
30932
30985
|
"alert-error",
|
|
30933
|
-
"alert-critical-resolved"
|
|
30986
|
+
"alert-critical-resolved",
|
|
30987
|
+
"rule-broken",
|
|
30988
|
+
"rule-repaired"
|
|
30934
30989
|
];
|
|
30935
30990
|
/**
|
|
30936
30991
|
* Is this descriptor held back from the SERVED catalog as a whole (D647)?
|
|
@@ -30987,6 +31042,178 @@ function templateVarSystemEventApplies(d, ctx) {
|
|
|
30987
31042
|
return declared.some((k) => own.includes(k));
|
|
30988
31043
|
}
|
|
30989
31044
|
//#endregion
|
|
31045
|
+
//#region src/notification/system-event-classes.ts
|
|
31046
|
+
var NC_SYSTEM_EVENT_CLASS_SPECS = [
|
|
31047
|
+
{
|
|
31048
|
+
id: "device-connectivity",
|
|
31049
|
+
family: "device-events",
|
|
31050
|
+
label: "Device connectivity (offline / back online)",
|
|
31051
|
+
bad: ["device-offline"],
|
|
31052
|
+
recovery: ["device-online"],
|
|
31053
|
+
snapshotLabel: "Devices offline now",
|
|
31054
|
+
snapshotSection: "device-state"
|
|
31055
|
+
},
|
|
31056
|
+
{
|
|
31057
|
+
id: "device-switch",
|
|
31058
|
+
family: "device-events",
|
|
31059
|
+
label: "Device switched off / back on",
|
|
31060
|
+
bad: ["device-disabled"],
|
|
31061
|
+
recovery: ["device-enabled"],
|
|
31062
|
+
snapshotLabel: "Devices switched off now",
|
|
31063
|
+
snapshotSection: "device-state"
|
|
31064
|
+
},
|
|
31065
|
+
{
|
|
31066
|
+
id: "stream-connectivity",
|
|
31067
|
+
family: "device-events",
|
|
31068
|
+
label: "Stream connectivity (offline / back online)",
|
|
31069
|
+
bad: ["stream-offline"],
|
|
31070
|
+
recovery: ["stream-online"],
|
|
31071
|
+
snapshotLabel: "Streams offline now",
|
|
31072
|
+
snapshotSection: "streams"
|
|
31073
|
+
},
|
|
31074
|
+
{
|
|
31075
|
+
id: "battery",
|
|
31076
|
+
family: "device-events",
|
|
31077
|
+
label: "Battery (low / back to normal)",
|
|
31078
|
+
bad: ["device-battery-low"],
|
|
31079
|
+
recovery: ["device-battery-normal"],
|
|
31080
|
+
snapshotLabel: "Batteries low now",
|
|
31081
|
+
snapshotSection: "battery"
|
|
31082
|
+
},
|
|
31083
|
+
{
|
|
31084
|
+
id: "consumables",
|
|
31085
|
+
family: "device-events",
|
|
31086
|
+
label: "Consumables (low / replaced)",
|
|
31087
|
+
bad: ["device-consumable-low"],
|
|
31088
|
+
recovery: ["device-consumable-normal"],
|
|
31089
|
+
snapshotLabel: "Consumables low now",
|
|
31090
|
+
snapshotSection: "consumables"
|
|
31091
|
+
},
|
|
31092
|
+
{
|
|
31093
|
+
id: "tanks",
|
|
31094
|
+
family: "device-events",
|
|
31095
|
+
label: "Tanks (low or full / back to normal)",
|
|
31096
|
+
bad: ["device-tank-low", "device-tank-full"],
|
|
31097
|
+
recovery: ["device-tank-normal"],
|
|
31098
|
+
snapshotLabel: "Tanks low or full now",
|
|
31099
|
+
snapshotSection: "tanks"
|
|
31100
|
+
},
|
|
31101
|
+
{
|
|
31102
|
+
id: "recording-health",
|
|
31103
|
+
family: "device-events",
|
|
31104
|
+
label: "Recording health (stalled or degraded / recording again)",
|
|
31105
|
+
bad: ["recording-stalled", "recording-degraded"],
|
|
31106
|
+
recovery: ["recording-healthy"],
|
|
31107
|
+
snapshotLabel: "Recordings stalled now",
|
|
31108
|
+
snapshotSection: null
|
|
31109
|
+
},
|
|
31110
|
+
{
|
|
31111
|
+
id: "node-connectivity",
|
|
31112
|
+
family: "system",
|
|
31113
|
+
label: "Node connectivity (offline / back online)",
|
|
31114
|
+
bad: ["node-offline"],
|
|
31115
|
+
recovery: ["node-online"],
|
|
31116
|
+
snapshotLabel: "Nodes offline now",
|
|
31117
|
+
snapshotSection: "nodes"
|
|
31118
|
+
},
|
|
31119
|
+
{
|
|
31120
|
+
id: "storage-space",
|
|
31121
|
+
family: "system",
|
|
31122
|
+
label: "Storage space (low or critical / ok again)",
|
|
31123
|
+
bad: ["storage-location-low", "storage-location-critical"],
|
|
31124
|
+
recovery: ["storage-location-ok"],
|
|
31125
|
+
snapshotLabel: "Storage locations low now",
|
|
31126
|
+
snapshotSection: null
|
|
31127
|
+
},
|
|
31128
|
+
{
|
|
31129
|
+
id: "critical-alerts",
|
|
31130
|
+
family: "system",
|
|
31131
|
+
label: "Critical alerts (raised / resolved)",
|
|
31132
|
+
bad: ["alert-critical"],
|
|
31133
|
+
recovery: ["alert-critical-resolved"],
|
|
31134
|
+
snapshotLabel: "Critical alerts open now",
|
|
31135
|
+
snapshotSection: null
|
|
31136
|
+
},
|
|
31137
|
+
{
|
|
31138
|
+
id: "rule-health",
|
|
31139
|
+
family: "system",
|
|
31140
|
+
label: "Rule health (broken / repaired)",
|
|
31141
|
+
bad: ["rule-broken"],
|
|
31142
|
+
recovery: ["rule-repaired"],
|
|
31143
|
+
snapshotLabel: "Notification rules broken now",
|
|
31144
|
+
snapshotSection: null
|
|
31145
|
+
}
|
|
31146
|
+
];
|
|
31147
|
+
var CLASS_BY_KIND = new Map(NC_SYSTEM_EVENT_CLASS_SPECS.flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
|
|
31148
|
+
/** Every edge of a class: what an instant rule selecting it listens to. */
|
|
31149
|
+
function systemEventClassKinds(spec) {
|
|
31150
|
+
return [...spec.bad, ...spec.recovery];
|
|
31151
|
+
}
|
|
31152
|
+
/** The class a kind belongs to, or `undefined` for a one-edge kind. */
|
|
31153
|
+
function systemEventClassOf(kind) {
|
|
31154
|
+
return CLASS_BY_KIND.get(kind);
|
|
31155
|
+
}
|
|
31156
|
+
/** The classes of ONE family, for that family's editor. */
|
|
31157
|
+
function systemEventClassesFor(family) {
|
|
31158
|
+
return NC_SYSTEM_EVENT_CLASS_SPECS.filter((spec) => spec.family === family);
|
|
31159
|
+
}
|
|
31160
|
+
/**
|
|
31161
|
+
* A kind list with the OTHER front of every class it touches: a bad edge
|
|
31162
|
+
* brings the class's recovery, a recovery brings the class's bad edges. A
|
|
31163
|
+
* sibling bad edge is never added by a bad edge — a rule on
|
|
31164
|
+
* `storage-location-critical` does not start hearing `storage-location-low`.
|
|
31165
|
+
* Input order is kept, each added edge right after the kind that brought it.
|
|
31166
|
+
* Kinds of no class (and legacy names) pass through.
|
|
31167
|
+
*/
|
|
31168
|
+
function expandSystemEventClasses(kinds) {
|
|
31169
|
+
const out = [];
|
|
31170
|
+
const seen = /* @__PURE__ */ new Set();
|
|
31171
|
+
const push = (kind) => {
|
|
31172
|
+
if (seen.has(kind)) return;
|
|
31173
|
+
seen.add(kind);
|
|
31174
|
+
out.push(kind);
|
|
31175
|
+
};
|
|
31176
|
+
const listed = new Set(kinds);
|
|
31177
|
+
for (const kind of kinds) {
|
|
31178
|
+
push(kind);
|
|
31179
|
+
const spec = systemEventClassOf(kind);
|
|
31180
|
+
if (spec === void 0) continue;
|
|
31181
|
+
const hasBad = spec.bad.some((k) => listed.has(k));
|
|
31182
|
+
if (spec.bad.some((k) => k === kind)) for (const edge of spec.recovery) push(edge);
|
|
31183
|
+
else if (!hasBad) for (const edge of spec.bad) push(edge);
|
|
31184
|
+
}
|
|
31185
|
+
return out;
|
|
31186
|
+
}
|
|
31187
|
+
/** Does this rule speak per EVENT (not a scheduled summary)? */
|
|
31188
|
+
function isInstantSystemRule(rule) {
|
|
31189
|
+
if (rule.delivery !== "system-event") return false;
|
|
31190
|
+
return rule.systemEventDelivery?.mode !== "summary";
|
|
31191
|
+
}
|
|
31192
|
+
/**
|
|
31193
|
+
* An INSTANT system rule with each class it touches completed with both edges;
|
|
31194
|
+
* the rule itself (same object) when there is nothing to add, a summary rule,
|
|
31195
|
+
* or a rule spanning families (`mixed` stays read-only, D637). A copy, never a
|
|
31196
|
+
* mutation.
|
|
31197
|
+
*/
|
|
31198
|
+
function withSystemEventClasses(rule) {
|
|
31199
|
+
const condition = rule.conditions.systemEvent;
|
|
31200
|
+
if (condition === void 0 || !isInstantSystemRule(rule)) return rule;
|
|
31201
|
+
const families = new Set(condition.kinds.map((kind) => NC_SYSTEM_EVENT_FAMILY[kind]));
|
|
31202
|
+
if (families.size !== 1 || families.has(null)) return rule;
|
|
31203
|
+
const kinds = expandSystemEventClasses(condition.kinds);
|
|
31204
|
+
if (kinds.length === condition.kinds.length) return rule;
|
|
31205
|
+
return {
|
|
31206
|
+
...rule,
|
|
31207
|
+
conditions: {
|
|
31208
|
+
...rule.conditions,
|
|
31209
|
+
systemEvent: {
|
|
31210
|
+
...condition,
|
|
31211
|
+
kinds
|
|
31212
|
+
}
|
|
31213
|
+
}
|
|
31214
|
+
};
|
|
31215
|
+
}
|
|
31216
|
+
//#endregion
|
|
30990
31217
|
//#region src/notification/system-event-summary.ts
|
|
30991
31218
|
/** The families a rule may summarise. The alarm is not one of them. */
|
|
30992
31219
|
var NC_SYSTEM_EVENT_SUMMARY_FAMILIES = ["device-events", "system"];
|
|
@@ -31560,6 +31787,7 @@ exports.NC_GROUPING_MIN_SEC = NC_GROUPING_MIN_SEC;
|
|
|
31560
31787
|
exports.NC_RULE_EDITOR_SECTION_ORDER = NC_RULE_EDITOR_SECTION_ORDER;
|
|
31561
31788
|
exports.NC_RULE_KIND_SPECS = NC_RULE_KIND_SPECS;
|
|
31562
31789
|
exports.NC_SENSOR_TRANSITION_UNSUPPORTED_REASON = NC_SENSOR_TRANSITION_UNSUPPORTED_REASON;
|
|
31790
|
+
exports.NC_SYSTEM_EVENT_CLASS_SPECS = NC_SYSTEM_EVENT_CLASS_SPECS;
|
|
31563
31791
|
exports.NC_SYSTEM_EVENT_FAMILY_FILTERS = NC_SYSTEM_EVENT_FAMILY_FILTERS;
|
|
31564
31792
|
exports.NC_SYSTEM_EVENT_KIND_GROUP_SPECS = NC_SYSTEM_EVENT_KIND_GROUP_SPECS;
|
|
31565
31793
|
exports.NC_SYSTEM_EVENT_SUMMARY_FAMILIES = NC_SYSTEM_EVENT_SUMMARY_FAMILIES;
|
|
@@ -31592,6 +31820,7 @@ exports.conditionVisibleForKind = conditionVisibleForKind;
|
|
|
31592
31820
|
exports.createSystemProxy = createSystemProxy;
|
|
31593
31821
|
exports.deviceRefusalFromMessage = deviceRefusalFromMessage;
|
|
31594
31822
|
exports.droppedConditionsForKind = droppedConditionsForKind;
|
|
31823
|
+
exports.expandSystemEventClasses = expandSystemEventClasses;
|
|
31595
31824
|
exports.iconCategoryLabel = iconCategoryLabel;
|
|
31596
31825
|
exports.iconEntry = iconEntry;
|
|
31597
31826
|
exports.iconsInCategory = iconsInCategory;
|
|
@@ -31627,6 +31856,8 @@ exports.stateLabel = stateLabel;
|
|
|
31627
31856
|
exports.subjectPathSampleFromBox = subjectPathSampleFromBox;
|
|
31628
31857
|
exports.subjectPathSvgPoints = subjectPathSvgPoints;
|
|
31629
31858
|
exports.summarizeReview = summarizeReview;
|
|
31859
|
+
exports.systemEventClassKinds = systemEventClassKinds;
|
|
31860
|
+
exports.systemEventClassesFor = systemEventClassesFor;
|
|
31630
31861
|
exports.systemEventDeliveryProblems = systemEventDeliveryProblems;
|
|
31631
31862
|
exports.systemEventFilterAppliesToAnyKind = systemEventFilterAppliesToAnyKind;
|
|
31632
31863
|
exports.systemEventKindsOfFamily = systemEventKindsOfFamily;
|
|
@@ -31635,3 +31866,4 @@ exports.templateCarriesSummary = templateCarriesSummary;
|
|
|
31635
31866
|
exports.templateVarDeliveryApplies = templateVarDeliveryApplies;
|
|
31636
31867
|
exports.templateVarKindApplies = templateVarKindApplies;
|
|
31637
31868
|
exports.templateVarSystemEventApplies = templateVarSystemEventApplies;
|
|
31869
|
+
exports.withSystemEventClasses = withSystemEventClasses;
|