@camstack/addon-waste-collections 0.1.21 → 0.1.23

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.
@@ -6,7 +6,7 @@ let node_fs = require("node:fs");
6
6
  let node_path = require("node:path");
7
7
  let node_child_process = require("node:child_process");
8
8
  let node_url = require("node:url");
9
- //#region ../types/dist/event-category-DOl51-Ij.mjs
9
+ //#region ../types/dist/event-category-BfJwUd2S.mjs
10
10
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
11
11
  EventCategory["SystemBoot"] = "system.boot";
12
12
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -323,6 +323,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
323
323
  */
324
324
  EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
325
325
  /**
326
+ * A camera's motion source has fired constantly with no subject for an hour
327
+ * (motion duty or session count over the bar, zero detections) — it is not
328
+ * blind, its motion zones or sensitivity want tuning (D907). Paired with
329
+ * {@link PipelineMotionCalm}.
330
+ */
331
+ EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
332
+ /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
333
+ EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
334
+ /**
326
335
  * Per-camera pipeline config was mutated by the orchestrator
327
336
  * (3-level settings change via `setAgentAddonDefaults` /
328
337
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -694,6 +703,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
694
703
  EventCategory["BackupRestored"] = "backup.restored";
695
704
  EventCategory["NotificationDispatched"] = "notification.dispatched";
696
705
  EventCategory["NotificationFailed"] = "notification.failed";
706
+ /**
707
+ * A notification rule that cannot work (D905): its stored row does not load,
708
+ * or it still names a device / delivery target the prune CONFIRMED deleted.
709
+ * One edge per rule per distinct set of reasons; never on an unanswered read.
710
+ */
711
+ EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
712
+ /** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
713
+ EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
697
714
  EventCategory["DeviceUpdated"] = "device.updated";
698
715
  /**
699
716
  * Transport-level connectivity. Emitted by the device driver when
@@ -5554,7 +5571,7 @@ var ZodIssueCode = {
5554
5571
  var ZodFirstPartyTypeKind;
5555
5572
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5556
5573
  //#endregion
5557
- //#region ../types/dist/sleep-_sV1BE2f.mjs
5574
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
5558
5575
  /**
5559
5576
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5560
5577
  * window to float samples (D455).
@@ -8163,7 +8180,7 @@ var EntryDescriptorSchema = object({
8163
8180
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
8164
8181
  fields: record(string(), unknown())
8165
8182
  }).strict();
8166
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
8183
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
8167
8184
  var RecordKindDeclarationSchema = object({
8168
8185
  database: _enum(RECORD_DATABASES).default("settings"),
8169
8186
  class: _enum(RECORD_CLASSES),
@@ -8182,14 +8199,6 @@ var RecordKindDeclarationSchema = object({
8182
8199
  secretPaths: array(string().min(1)).default([]),
8183
8200
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
8184
8201
  secretArrayKeys: record(string(), string()).default({}),
8185
- /**
8186
- * RETIRED (D900): the legacy table a kind adopted from during the records
8187
- * migration. Nothing declares it any more and nothing reads it; the schema
8188
- * still ACCEPTS it because the catalog rows the migration wrote carry it
8189
- * (an orphaned kind is never redeclared) and an addon built before the
8190
- * removal still sends it. Never set it.
8191
- */
8192
- adoptsFrom: string().min(1).optional(),
8193
8202
  /** Kinds that must agree through `transact` sit in one file under one family name. */
8194
8203
  transactFamily: string().min(1).optional(),
8195
8204
  entry: EntryDescriptorSchema.optional()
@@ -12993,17 +13002,6 @@ object({
12993
13002
  createdAt: number(),
12994
13003
  updatedAt: number()
12995
13004
  });
12996
- object({
12997
- id: string(),
12998
- label: string(),
12999
- isAdmin: boolean().default(false),
13000
- allowedProviders: AllowedProviderSchema,
13001
- allowedDevices: AllowedDevicesSchema,
13002
- tokenHash: string(),
13003
- tokenPrefix: string(),
13004
- createdAt: number(),
13005
- lastUsedAt: number().optional()
13006
- });
13007
13005
  object({
13008
13006
  id: string(),
13009
13007
  userId: string(),
@@ -16879,16 +16877,36 @@ var RecordKindStateSchema = _enum([
16879
16877
  var DeclareKindResultSchema = object({
16880
16878
  kindId: number().int(),
16881
16879
  state: RecordKindStateSchema,
16882
- createdIndexes: array(string()),
16883
- /**
16884
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
16885
- * it stays on the wire, null, because an addon built before the removal reads
16886
- * an ABSENT field as "adoption pending" and refuses to start.
16887
- */
16888
- adoptionPending: _null()
16880
+ createdIndexes: array(string())
16889
16881
  });
16890
16882
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16891
16883
  var SecretRefsList = array(string());
16884
+ /**
16885
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
16886
+ * All ops of one call share ONE database file and ONE `transactFamily`.
16887
+ */
16888
+ var RecordTransactOpSchema = discriminatedUnion("op", [
16889
+ object({
16890
+ op: literal("put"),
16891
+ kind: RecordKindNameSchema,
16892
+ record: RecordInputSchema,
16893
+ ifRev: number().int().min(0).optional()
16894
+ }),
16895
+ object({
16896
+ op: literal("patch"),
16897
+ kind: RecordKindNameSchema,
16898
+ id: RecordIdSchema,
16899
+ data: RecordBodySchema,
16900
+ at: number().int().nullable().optional(),
16901
+ expiresAt: number().int().nullable().optional(),
16902
+ ifRev: number().int().min(1).optional()
16903
+ }),
16904
+ object({
16905
+ op: literal("delete"),
16906
+ kind: RecordKindNameSchema,
16907
+ id: RecordIdSchema
16908
+ })
16909
+ ]);
16892
16910
  var RecordSecretRefsSchema = record(string(), record(string(), string()));
16893
16911
  method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16894
16912
  kind: "mutation",
@@ -16995,6 +17013,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
16995
17013
  }), {
16996
17014
  kind: "mutation",
16997
17015
  auth: "admin"
17016
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
17017
+ results: array(object({
17018
+ rev: number().int().nullable(),
17019
+ deleted: boolean()
17020
+ })),
17021
+ releasedRefs: SecretRefsList,
17022
+ secretRefs: SecretRefsList
17023
+ }), {
17024
+ kind: "mutation",
17025
+ auth: "admin"
16998
17026
  }), method(object({
16999
17027
  deviceId: number().int(),
17000
17028
  kinds: array(RecordKindNameSchema).optional()
@@ -42353,9 +42381,13 @@ var NcSystemEventKindSchema = _enum([
42353
42381
  "node-updating",
42354
42382
  "node-inference-unavailable",
42355
42383
  "detection-blind",
42384
+ "motion-noisy",
42385
+ "motion-calm",
42356
42386
  "recording-stalled",
42357
42387
  "recording-healthy",
42358
42388
  "recording-degraded",
42389
+ "device-attention-required",
42390
+ "device-attention-resolved",
42359
42391
  "storage-location-low",
42360
42392
  "storage-location-critical",
42361
42393
  "storage-location-ok",
@@ -42379,6 +42411,8 @@ var NcSystemEventKindSchema = _enum([
42379
42411
  "alert-critical",
42380
42412
  "alert-error",
42381
42413
  "alert-critical-resolved",
42414
+ "rule-broken",
42415
+ "rule-repaired",
42382
42416
  "camera-online",
42383
42417
  "camera-offline",
42384
42418
  "camera-disabled",
@@ -54820,6 +54854,16 @@ object({
54820
54854
  powerState: string().nullable(),
54821
54855
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
54822
54856
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
54857
+ /**
54858
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
54859
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
54860
+ * when none is reported. A cleared reminder is not an unknown one.
54861
+ */
54862
+ filterCleaningDue: boolean().nullable(),
54863
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
54864
+ machineCareDue: boolean().nullable(),
54865
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
54866
+ machineCareRemainingRuns: number().int().nonnegative().nullable(),
54823
54867
  /** Option states: null when the appliance does not expose the option or has not said. */
54824
54868
  halfLoad: boolean().nullable(),
54825
54869
  hygienePlus: boolean().nullable(),
@@ -61437,16 +61481,6 @@ var UpdateUserInputSchema = object({
61437
61481
  allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
61438
61482
  scopes: array(TokenScopeSchema).optional()
61439
61483
  });
61440
- var ApiKeySummarySchema = object({
61441
- id: string(),
61442
- label: string(),
61443
- isAdmin: boolean().default(false),
61444
- allowedProviders: union([array(string()), literal("*")]).optional(),
61445
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
61446
- tokenPrefix: string(),
61447
- createdAt: number(),
61448
- lastUsedAt: number().optional()
61449
- });
61450
61484
  var OauthSessionSummarySchema = object({
61451
61485
  id: string(),
61452
61486
  userId: string(),
@@ -61468,8 +61502,7 @@ var TotpStatusSchema = object({
61468
61502
  confirmedAt: number().nullable()
61469
61503
  });
61470
61504
  /**
61471
- * user-management — singleton capability for user accounts and the
61472
- * legacy API-key rows.
61505
+ * user-management — singleton capability for user accounts.
61473
61506
  *
61474
61507
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
61475
61508
  * — the subset check on `setUserScopes` is moot
@@ -61525,10 +61558,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
61525
61558
  }), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
61526
61559
  kind: "mutation",
61527
61560
  access: "view"
61528
- }), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
61529
- kind: "mutation",
61530
- auth: "admin",
61531
- access: "delete"
61532
61561
  }), method(object({ userId: string() }), TotpSetupResultSchema, {
61533
61562
  kind: "mutation",
61534
61563
  auth: "admin",
@@ -69041,6 +69070,12 @@ Object.freeze({
69041
69070
  addonId: null,
69042
69071
  access: "view"
69043
69072
  },
69073
+ "records.transact": {
69074
+ capName: "records",
69075
+ capScope: "system",
69076
+ addonId: null,
69077
+ access: "create"
69078
+ },
69044
69079
  "sceneMonitor.captureReference": {
69045
69080
  capName: "scene-monitor",
69046
69081
  capScope: "device",
@@ -70373,12 +70408,6 @@ Object.freeze({
70373
70408
  addonId: null,
70374
70409
  access: "view"
70375
70410
  },
70376
- "userManagement.listApiKeys": {
70377
- capName: "user-management",
70378
- capScope: "system",
70379
- addonId: null,
70380
- access: "view"
70381
- },
70382
70411
  "userManagement.listExternalIdentities": {
70383
70412
  capName: "user-management",
70384
70413
  capScope: "system",
@@ -70433,12 +70462,6 @@ Object.freeze({
70433
70462
  addonId: null,
70434
70463
  access: "create"
70435
70464
  },
70436
- "userManagement.revokeApiKey": {
70437
- capName: "user-management",
70438
- capScope: "system",
70439
- addonId: null,
70440
- access: "delete"
70441
- },
70442
70465
  "userManagement.revokeOauthSession": {
70443
70466
  capName: "user-management",
70444
70467
  capScope: "system",
@@ -73803,9 +73826,13 @@ new Map(Object.entries({
73803
73826
  "stream-online": "device-events",
73804
73827
  "stream-offline": "device-events",
73805
73828
  "detection-blind": "device-events",
73829
+ "motion-noisy": "device-events",
73830
+ "motion-calm": "device-events",
73806
73831
  "recording-stalled": "device-events",
73807
73832
  "recording-healthy": "device-events",
73808
73833
  "recording-degraded": "device-events",
73834
+ "device-attention-required": "device-events",
73835
+ "device-attention-resolved": "device-events",
73809
73836
  "node-online": "system",
73810
73837
  "node-offline": "system",
73811
73838
  "node-restarting": "system",
@@ -73822,6 +73849,8 @@ new Map(Object.entries({
73822
73849
  "alert-critical": "system",
73823
73850
  "alert-error": "system",
73824
73851
  "alert-critical-resolved": "system",
73852
+ "rule-broken": "system",
73853
+ "rule-repaired": "system",
73825
73854
  "storage-location-low": "system",
73826
73855
  "storage-location-critical": "system",
73827
73856
  "storage-location-ok": "system",
@@ -73886,6 +73915,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73886
73915
  label: "Detecting nothing",
73887
73916
  kinds: ["detection-blind"]
73888
73917
  },
73918
+ {
73919
+ id: "motion-noise",
73920
+ family: "device-events",
73921
+ label: "Motion without a subject",
73922
+ kinds: ["motion-noisy", "motion-calm"]
73923
+ },
73889
73924
  {
73890
73925
  id: "recording",
73891
73926
  family: "device-events",
@@ -73896,6 +73931,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73896
73931
  "recording-degraded"
73897
73932
  ]
73898
73933
  },
73934
+ {
73935
+ id: "device-attention",
73936
+ family: "device-events",
73937
+ label: "Needs attention",
73938
+ kinds: ["device-attention-required", "device-attention-resolved"]
73939
+ },
73899
73940
  {
73900
73941
  id: "nodes",
73901
73942
  family: "system",
@@ -73956,6 +73997,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73956
73997
  "alert-critical-resolved"
73957
73998
  ]
73958
73999
  },
74000
+ {
74001
+ id: "rule-health",
74002
+ family: "system",
74003
+ label: "Notification rules",
74004
+ kinds: ["rule-broken", "rule-repaired"]
74005
+ },
73959
74006
  {
73960
74007
  id: "alarm",
73961
74008
  family: "alarm",
@@ -74029,6 +74076,7 @@ var ALERT_EPISODE = [
74029
74076
  "alert-error",
74030
74077
  "alert-critical-resolved"
74031
74078
  ];
74079
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
74032
74080
  var UPDATES = [
74033
74081
  "addon-update-available",
74034
74082
  "server-update-available",
@@ -74058,9 +74106,12 @@ var DEVICE_EVENTS = [
74058
74106
  "stream-online",
74059
74107
  "stream-offline",
74060
74108
  "detection-blind",
74109
+ "motion-noisy",
74110
+ "motion-calm",
74061
74111
  "recording-stalled",
74062
74112
  "recording-healthy",
74063
74113
  "recording-degraded",
74114
+ ...DEVICE_ATTENTION,
74064
74115
  ...ALARM
74065
74116
  ];
74066
74117
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -74228,7 +74279,13 @@ var STATE_SUMMARY_VARS = [
74228
74279
  [...RULE_TEXT],
74229
74280
  [...RULE_TEXT],
74230
74281
  [...RULE_TEXT],
74231
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74282
+ [...RULE_TEXT],
74283
+ [...RULE_TEXT],
74284
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74285
+ [...RULE_TEXT],
74286
+ [...RULE_TEXT],
74287
+ [...RULE_TEXT],
74288
+ [...RULE_TEXT],
74232
74289
  [...RULE_TEXT],
74233
74290
  [...RULE_TEXT],
74234
74291
  [...RULE_TEXT],
@@ -74246,11 +74303,11 @@ var STATE_SUMMARY_VARS = [
74246
74303
  [...RULE_TEXT],
74247
74304
  [...RULE_TEXT],
74248
74305
  [...RULE_TEXT],
74306
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74249
74307
  ([...RULE_TEXT], [...ALERT_EPISODE]),
74308
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74250
74309
  ([...RULE_TEXT], [...ALERT_EPISODE]),
74251
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74252
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74253
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74310
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74254
74311
  [...RULE_TEXT],
74255
74312
  [...RULE_TEXT],
74256
74313
  [...RULE_TEXT],
@@ -74271,6 +74328,125 @@ var STATE_SUMMARY_VARS = [
74271
74328
  [...RULE_TEXT],
74272
74329
  ...STATE_SUMMARY_VARS
74273
74330
  ];
74331
+ new Map([
74332
+ {
74333
+ id: "device-connectivity",
74334
+ family: "device-events",
74335
+ label: "Device connectivity (offline / back online)",
74336
+ bad: ["device-offline"],
74337
+ recovery: ["device-online"],
74338
+ snapshotLabel: "Devices offline now",
74339
+ snapshotSection: "device-state"
74340
+ },
74341
+ {
74342
+ id: "device-switch",
74343
+ family: "device-events",
74344
+ label: "Device switched off / back on",
74345
+ bad: ["device-disabled"],
74346
+ recovery: ["device-enabled"],
74347
+ snapshotLabel: "Devices switched off now",
74348
+ snapshotSection: "device-state"
74349
+ },
74350
+ {
74351
+ id: "stream-connectivity",
74352
+ family: "device-events",
74353
+ label: "Stream connectivity (offline / back online)",
74354
+ bad: ["stream-offline"],
74355
+ recovery: ["stream-online"],
74356
+ snapshotLabel: "Streams offline now",
74357
+ snapshotSection: "streams"
74358
+ },
74359
+ {
74360
+ id: "battery",
74361
+ family: "device-events",
74362
+ label: "Battery (low / back to normal)",
74363
+ bad: ["device-battery-low"],
74364
+ recovery: ["device-battery-normal"],
74365
+ snapshotLabel: "Batteries low now",
74366
+ snapshotSection: "battery"
74367
+ },
74368
+ {
74369
+ id: "consumables",
74370
+ family: "device-events",
74371
+ label: "Consumables (low / replaced)",
74372
+ bad: ["device-consumable-low"],
74373
+ recovery: ["device-consumable-normal"],
74374
+ snapshotLabel: "Consumables low now",
74375
+ snapshotSection: "consumables"
74376
+ },
74377
+ {
74378
+ id: "tanks",
74379
+ family: "device-events",
74380
+ label: "Tanks (low or full / back to normal)",
74381
+ bad: ["device-tank-low", "device-tank-full"],
74382
+ recovery: ["device-tank-normal"],
74383
+ snapshotLabel: "Tanks low or full now",
74384
+ snapshotSection: "tanks"
74385
+ },
74386
+ {
74387
+ id: "motion-noise",
74388
+ family: "device-events",
74389
+ label: "Motion without a subject (constant / calm again)",
74390
+ bad: ["motion-noisy"],
74391
+ recovery: ["motion-calm"],
74392
+ snapshotLabel: "Cameras with constant motion now",
74393
+ snapshotSection: null
74394
+ },
74395
+ {
74396
+ id: "recording-health",
74397
+ family: "device-events",
74398
+ label: "Recording health (stalled or degraded / recording again)",
74399
+ bad: ["recording-stalled", "recording-degraded"],
74400
+ recovery: ["recording-healthy"],
74401
+ snapshotLabel: "Recordings stalled now",
74402
+ snapshotSection: null
74403
+ },
74404
+ {
74405
+ id: "device-attention",
74406
+ family: "device-events",
74407
+ label: "Device needs attention (raised / resolved)",
74408
+ bad: ["device-attention-required"],
74409
+ recovery: ["device-attention-resolved"],
74410
+ snapshotLabel: "Devices needing attention now",
74411
+ snapshotSection: null
74412
+ },
74413
+ {
74414
+ id: "node-connectivity",
74415
+ family: "system",
74416
+ label: "Node connectivity (offline / back online)",
74417
+ bad: ["node-offline"],
74418
+ recovery: ["node-online"],
74419
+ snapshotLabel: "Nodes offline now",
74420
+ snapshotSection: "nodes"
74421
+ },
74422
+ {
74423
+ id: "storage-space",
74424
+ family: "system",
74425
+ label: "Storage space (low or critical / ok again)",
74426
+ bad: ["storage-location-low", "storage-location-critical"],
74427
+ recovery: ["storage-location-ok"],
74428
+ snapshotLabel: "Storage locations low now",
74429
+ snapshotSection: null
74430
+ },
74431
+ {
74432
+ id: "critical-alerts",
74433
+ family: "system",
74434
+ label: "Critical alerts (raised / resolved)",
74435
+ bad: ["alert-critical"],
74436
+ recovery: ["alert-critical-resolved"],
74437
+ snapshotLabel: "Critical alerts open now",
74438
+ snapshotSection: null
74439
+ },
74440
+ {
74441
+ id: "rule-health",
74442
+ family: "system",
74443
+ label: "Rule health (broken / repaired)",
74444
+ bad: ["rule-broken"],
74445
+ recovery: ["rule-repaired"],
74446
+ snapshotLabel: "Notification rules broken now",
74447
+ snapshotSection: null
74448
+ }
74449
+ ].flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
74274
74450
  new Set([
74275
74451
  "disarmed",
74276
74452
  "armed_home",
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
3
  import { spawn } from "node:child_process";
4
4
  import { fileURLToPath } from "node:url";
5
- //#region ../types/dist/event-category-DOl51-Ij.mjs
5
+ //#region ../types/dist/event-category-BfJwUd2S.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -319,6 +319,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
319
319
  */
320
320
  EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
321
321
  /**
322
+ * A camera's motion source has fired constantly with no subject for an hour
323
+ * (motion duty or session count over the bar, zero detections) — it is not
324
+ * blind, its motion zones or sensitivity want tuning (D907). Paired with
325
+ * {@link PipelineMotionCalm}.
326
+ */
327
+ EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
328
+ /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
329
+ EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
330
+ /**
322
331
  * Per-camera pipeline config was mutated by the orchestrator
323
332
  * (3-level settings change via `setAgentAddonDefaults` /
324
333
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -690,6 +699,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
690
699
  EventCategory["BackupRestored"] = "backup.restored";
691
700
  EventCategory["NotificationDispatched"] = "notification.dispatched";
692
701
  EventCategory["NotificationFailed"] = "notification.failed";
702
+ /**
703
+ * A notification rule that cannot work (D905): its stored row does not load,
704
+ * or it still names a device / delivery target the prune CONFIRMED deleted.
705
+ * One edge per rule per distinct set of reasons; never on an unanswered read.
706
+ */
707
+ EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
708
+ /** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
709
+ EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
693
710
  EventCategory["DeviceUpdated"] = "device.updated";
694
711
  /**
695
712
  * Transport-level connectivity. Emitted by the device driver when
@@ -5550,7 +5567,7 @@ var ZodIssueCode = {
5550
5567
  var ZodFirstPartyTypeKind;
5551
5568
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5552
5569
  //#endregion
5553
- //#region ../types/dist/sleep-_sV1BE2f.mjs
5570
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
5554
5571
  /**
5555
5572
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5556
5573
  * window to float samples (D455).
@@ -8159,7 +8176,7 @@ var EntryDescriptorSchema = object({
8159
8176
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
8160
8177
  fields: record(string(), unknown())
8161
8178
  }).strict();
8162
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
8179
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
8163
8180
  var RecordKindDeclarationSchema = object({
8164
8181
  database: _enum(RECORD_DATABASES).default("settings"),
8165
8182
  class: _enum(RECORD_CLASSES),
@@ -8178,14 +8195,6 @@ var RecordKindDeclarationSchema = object({
8178
8195
  secretPaths: array(string().min(1)).default([]),
8179
8196
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
8180
8197
  secretArrayKeys: record(string(), string()).default({}),
8181
- /**
8182
- * RETIRED (D900): the legacy table a kind adopted from during the records
8183
- * migration. Nothing declares it any more and nothing reads it; the schema
8184
- * still ACCEPTS it because the catalog rows the migration wrote carry it
8185
- * (an orphaned kind is never redeclared) and an addon built before the
8186
- * removal still sends it. Never set it.
8187
- */
8188
- adoptsFrom: string().min(1).optional(),
8189
8198
  /** Kinds that must agree through `transact` sit in one file under one family name. */
8190
8199
  transactFamily: string().min(1).optional(),
8191
8200
  entry: EntryDescriptorSchema.optional()
@@ -12989,17 +12998,6 @@ object({
12989
12998
  createdAt: number(),
12990
12999
  updatedAt: number()
12991
13000
  });
12992
- object({
12993
- id: string(),
12994
- label: string(),
12995
- isAdmin: boolean().default(false),
12996
- allowedProviders: AllowedProviderSchema,
12997
- allowedDevices: AllowedDevicesSchema,
12998
- tokenHash: string(),
12999
- tokenPrefix: string(),
13000
- createdAt: number(),
13001
- lastUsedAt: number().optional()
13002
- });
13003
13001
  object({
13004
13002
  id: string(),
13005
13003
  userId: string(),
@@ -16875,16 +16873,36 @@ var RecordKindStateSchema = _enum([
16875
16873
  var DeclareKindResultSchema = object({
16876
16874
  kindId: number().int(),
16877
16875
  state: RecordKindStateSchema,
16878
- createdIndexes: array(string()),
16879
- /**
16880
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
16881
- * it stays on the wire, null, because an addon built before the removal reads
16882
- * an ABSENT field as "adoption pending" and refuses to start.
16883
- */
16884
- adoptionPending: _null()
16876
+ createdIndexes: array(string())
16885
16877
  });
16886
16878
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16887
16879
  var SecretRefsList = array(string());
16880
+ /**
16881
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
16882
+ * All ops of one call share ONE database file and ONE `transactFamily`.
16883
+ */
16884
+ var RecordTransactOpSchema = discriminatedUnion("op", [
16885
+ object({
16886
+ op: literal("put"),
16887
+ kind: RecordKindNameSchema,
16888
+ record: RecordInputSchema,
16889
+ ifRev: number().int().min(0).optional()
16890
+ }),
16891
+ object({
16892
+ op: literal("patch"),
16893
+ kind: RecordKindNameSchema,
16894
+ id: RecordIdSchema,
16895
+ data: RecordBodySchema,
16896
+ at: number().int().nullable().optional(),
16897
+ expiresAt: number().int().nullable().optional(),
16898
+ ifRev: number().int().min(1).optional()
16899
+ }),
16900
+ object({
16901
+ op: literal("delete"),
16902
+ kind: RecordKindNameSchema,
16903
+ id: RecordIdSchema
16904
+ })
16905
+ ]);
16888
16906
  var RecordSecretRefsSchema = record(string(), record(string(), string()));
16889
16907
  method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16890
16908
  kind: "mutation",
@@ -16991,6 +17009,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
16991
17009
  }), {
16992
17010
  kind: "mutation",
16993
17011
  auth: "admin"
17012
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
17013
+ results: array(object({
17014
+ rev: number().int().nullable(),
17015
+ deleted: boolean()
17016
+ })),
17017
+ releasedRefs: SecretRefsList,
17018
+ secretRefs: SecretRefsList
17019
+ }), {
17020
+ kind: "mutation",
17021
+ auth: "admin"
16994
17022
  }), method(object({
16995
17023
  deviceId: number().int(),
16996
17024
  kinds: array(RecordKindNameSchema).optional()
@@ -42349,9 +42377,13 @@ var NcSystemEventKindSchema = _enum([
42349
42377
  "node-updating",
42350
42378
  "node-inference-unavailable",
42351
42379
  "detection-blind",
42380
+ "motion-noisy",
42381
+ "motion-calm",
42352
42382
  "recording-stalled",
42353
42383
  "recording-healthy",
42354
42384
  "recording-degraded",
42385
+ "device-attention-required",
42386
+ "device-attention-resolved",
42355
42387
  "storage-location-low",
42356
42388
  "storage-location-critical",
42357
42389
  "storage-location-ok",
@@ -42375,6 +42407,8 @@ var NcSystemEventKindSchema = _enum([
42375
42407
  "alert-critical",
42376
42408
  "alert-error",
42377
42409
  "alert-critical-resolved",
42410
+ "rule-broken",
42411
+ "rule-repaired",
42378
42412
  "camera-online",
42379
42413
  "camera-offline",
42380
42414
  "camera-disabled",
@@ -54816,6 +54850,16 @@ object({
54816
54850
  powerState: string().nullable(),
54817
54851
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
54818
54852
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
54853
+ /**
54854
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
54855
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
54856
+ * when none is reported. A cleared reminder is not an unknown one.
54857
+ */
54858
+ filterCleaningDue: boolean().nullable(),
54859
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
54860
+ machineCareDue: boolean().nullable(),
54861
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
54862
+ machineCareRemainingRuns: number().int().nonnegative().nullable(),
54819
54863
  /** Option states: null when the appliance does not expose the option or has not said. */
54820
54864
  halfLoad: boolean().nullable(),
54821
54865
  hygienePlus: boolean().nullable(),
@@ -61433,16 +61477,6 @@ var UpdateUserInputSchema = object({
61433
61477
  allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
61434
61478
  scopes: array(TokenScopeSchema).optional()
61435
61479
  });
61436
- var ApiKeySummarySchema = object({
61437
- id: string(),
61438
- label: string(),
61439
- isAdmin: boolean().default(false),
61440
- allowedProviders: union([array(string()), literal("*")]).optional(),
61441
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
61442
- tokenPrefix: string(),
61443
- createdAt: number(),
61444
- lastUsedAt: number().optional()
61445
- });
61446
61480
  var OauthSessionSummarySchema = object({
61447
61481
  id: string(),
61448
61482
  userId: string(),
@@ -61464,8 +61498,7 @@ var TotpStatusSchema = object({
61464
61498
  confirmedAt: number().nullable()
61465
61499
  });
61466
61500
  /**
61467
- * user-management — singleton capability for user accounts and the
61468
- * legacy API-key rows.
61501
+ * user-management — singleton capability for user accounts.
61469
61502
  *
61470
61503
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
61471
61504
  * — the subset check on `setUserScopes` is moot
@@ -61521,10 +61554,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
61521
61554
  }), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
61522
61555
  kind: "mutation",
61523
61556
  access: "view"
61524
- }), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
61525
- kind: "mutation",
61526
- auth: "admin",
61527
- access: "delete"
61528
61557
  }), method(object({ userId: string() }), TotpSetupResultSchema, {
61529
61558
  kind: "mutation",
61530
61559
  auth: "admin",
@@ -69037,6 +69066,12 @@ Object.freeze({
69037
69066
  addonId: null,
69038
69067
  access: "view"
69039
69068
  },
69069
+ "records.transact": {
69070
+ capName: "records",
69071
+ capScope: "system",
69072
+ addonId: null,
69073
+ access: "create"
69074
+ },
69040
69075
  "sceneMonitor.captureReference": {
69041
69076
  capName: "scene-monitor",
69042
69077
  capScope: "device",
@@ -70369,12 +70404,6 @@ Object.freeze({
70369
70404
  addonId: null,
70370
70405
  access: "view"
70371
70406
  },
70372
- "userManagement.listApiKeys": {
70373
- capName: "user-management",
70374
- capScope: "system",
70375
- addonId: null,
70376
- access: "view"
70377
- },
70378
70407
  "userManagement.listExternalIdentities": {
70379
70408
  capName: "user-management",
70380
70409
  capScope: "system",
@@ -70429,12 +70458,6 @@ Object.freeze({
70429
70458
  addonId: null,
70430
70459
  access: "create"
70431
70460
  },
70432
- "userManagement.revokeApiKey": {
70433
- capName: "user-management",
70434
- capScope: "system",
70435
- addonId: null,
70436
- access: "delete"
70437
- },
70438
70461
  "userManagement.revokeOauthSession": {
70439
70462
  capName: "user-management",
70440
70463
  capScope: "system",
@@ -73799,9 +73822,13 @@ new Map(Object.entries({
73799
73822
  "stream-online": "device-events",
73800
73823
  "stream-offline": "device-events",
73801
73824
  "detection-blind": "device-events",
73825
+ "motion-noisy": "device-events",
73826
+ "motion-calm": "device-events",
73802
73827
  "recording-stalled": "device-events",
73803
73828
  "recording-healthy": "device-events",
73804
73829
  "recording-degraded": "device-events",
73830
+ "device-attention-required": "device-events",
73831
+ "device-attention-resolved": "device-events",
73805
73832
  "node-online": "system",
73806
73833
  "node-offline": "system",
73807
73834
  "node-restarting": "system",
@@ -73818,6 +73845,8 @@ new Map(Object.entries({
73818
73845
  "alert-critical": "system",
73819
73846
  "alert-error": "system",
73820
73847
  "alert-critical-resolved": "system",
73848
+ "rule-broken": "system",
73849
+ "rule-repaired": "system",
73821
73850
  "storage-location-low": "system",
73822
73851
  "storage-location-critical": "system",
73823
73852
  "storage-location-ok": "system",
@@ -73882,6 +73911,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73882
73911
  label: "Detecting nothing",
73883
73912
  kinds: ["detection-blind"]
73884
73913
  },
73914
+ {
73915
+ id: "motion-noise",
73916
+ family: "device-events",
73917
+ label: "Motion without a subject",
73918
+ kinds: ["motion-noisy", "motion-calm"]
73919
+ },
73885
73920
  {
73886
73921
  id: "recording",
73887
73922
  family: "device-events",
@@ -73892,6 +73927,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73892
73927
  "recording-degraded"
73893
73928
  ]
73894
73929
  },
73930
+ {
73931
+ id: "device-attention",
73932
+ family: "device-events",
73933
+ label: "Needs attention",
73934
+ kinds: ["device-attention-required", "device-attention-resolved"]
73935
+ },
73895
73936
  {
73896
73937
  id: "nodes",
73897
73938
  family: "system",
@@ -73952,6 +73993,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73952
73993
  "alert-critical-resolved"
73953
73994
  ]
73954
73995
  },
73996
+ {
73997
+ id: "rule-health",
73998
+ family: "system",
73999
+ label: "Notification rules",
74000
+ kinds: ["rule-broken", "rule-repaired"]
74001
+ },
73955
74002
  {
73956
74003
  id: "alarm",
73957
74004
  family: "alarm",
@@ -74025,6 +74072,7 @@ var ALERT_EPISODE = [
74025
74072
  "alert-error",
74026
74073
  "alert-critical-resolved"
74027
74074
  ];
74075
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
74028
74076
  var UPDATES = [
74029
74077
  "addon-update-available",
74030
74078
  "server-update-available",
@@ -74054,9 +74102,12 @@ var DEVICE_EVENTS = [
74054
74102
  "stream-online",
74055
74103
  "stream-offline",
74056
74104
  "detection-blind",
74105
+ "motion-noisy",
74106
+ "motion-calm",
74057
74107
  "recording-stalled",
74058
74108
  "recording-healthy",
74059
74109
  "recording-degraded",
74110
+ ...DEVICE_ATTENTION,
74060
74111
  ...ALARM
74061
74112
  ];
74062
74113
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -74224,7 +74275,13 @@ var STATE_SUMMARY_VARS = [
74224
74275
  [...RULE_TEXT],
74225
74276
  [...RULE_TEXT],
74226
74277
  [...RULE_TEXT],
74227
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74278
+ [...RULE_TEXT],
74279
+ [...RULE_TEXT],
74280
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74281
+ [...RULE_TEXT],
74282
+ [...RULE_TEXT],
74283
+ [...RULE_TEXT],
74284
+ [...RULE_TEXT],
74228
74285
  [...RULE_TEXT],
74229
74286
  [...RULE_TEXT],
74230
74287
  [...RULE_TEXT],
@@ -74242,11 +74299,11 @@ var STATE_SUMMARY_VARS = [
74242
74299
  [...RULE_TEXT],
74243
74300
  [...RULE_TEXT],
74244
74301
  [...RULE_TEXT],
74302
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74245
74303
  ([...RULE_TEXT], [...ALERT_EPISODE]),
74304
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74246
74305
  ([...RULE_TEXT], [...ALERT_EPISODE]),
74247
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74248
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74249
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74306
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74250
74307
  [...RULE_TEXT],
74251
74308
  [...RULE_TEXT],
74252
74309
  [...RULE_TEXT],
@@ -74267,6 +74324,125 @@ var STATE_SUMMARY_VARS = [
74267
74324
  [...RULE_TEXT],
74268
74325
  ...STATE_SUMMARY_VARS
74269
74326
  ];
74327
+ new Map([
74328
+ {
74329
+ id: "device-connectivity",
74330
+ family: "device-events",
74331
+ label: "Device connectivity (offline / back online)",
74332
+ bad: ["device-offline"],
74333
+ recovery: ["device-online"],
74334
+ snapshotLabel: "Devices offline now",
74335
+ snapshotSection: "device-state"
74336
+ },
74337
+ {
74338
+ id: "device-switch",
74339
+ family: "device-events",
74340
+ label: "Device switched off / back on",
74341
+ bad: ["device-disabled"],
74342
+ recovery: ["device-enabled"],
74343
+ snapshotLabel: "Devices switched off now",
74344
+ snapshotSection: "device-state"
74345
+ },
74346
+ {
74347
+ id: "stream-connectivity",
74348
+ family: "device-events",
74349
+ label: "Stream connectivity (offline / back online)",
74350
+ bad: ["stream-offline"],
74351
+ recovery: ["stream-online"],
74352
+ snapshotLabel: "Streams offline now",
74353
+ snapshotSection: "streams"
74354
+ },
74355
+ {
74356
+ id: "battery",
74357
+ family: "device-events",
74358
+ label: "Battery (low / back to normal)",
74359
+ bad: ["device-battery-low"],
74360
+ recovery: ["device-battery-normal"],
74361
+ snapshotLabel: "Batteries low now",
74362
+ snapshotSection: "battery"
74363
+ },
74364
+ {
74365
+ id: "consumables",
74366
+ family: "device-events",
74367
+ label: "Consumables (low / replaced)",
74368
+ bad: ["device-consumable-low"],
74369
+ recovery: ["device-consumable-normal"],
74370
+ snapshotLabel: "Consumables low now",
74371
+ snapshotSection: "consumables"
74372
+ },
74373
+ {
74374
+ id: "tanks",
74375
+ family: "device-events",
74376
+ label: "Tanks (low or full / back to normal)",
74377
+ bad: ["device-tank-low", "device-tank-full"],
74378
+ recovery: ["device-tank-normal"],
74379
+ snapshotLabel: "Tanks low or full now",
74380
+ snapshotSection: "tanks"
74381
+ },
74382
+ {
74383
+ id: "motion-noise",
74384
+ family: "device-events",
74385
+ label: "Motion without a subject (constant / calm again)",
74386
+ bad: ["motion-noisy"],
74387
+ recovery: ["motion-calm"],
74388
+ snapshotLabel: "Cameras with constant motion now",
74389
+ snapshotSection: null
74390
+ },
74391
+ {
74392
+ id: "recording-health",
74393
+ family: "device-events",
74394
+ label: "Recording health (stalled or degraded / recording again)",
74395
+ bad: ["recording-stalled", "recording-degraded"],
74396
+ recovery: ["recording-healthy"],
74397
+ snapshotLabel: "Recordings stalled now",
74398
+ snapshotSection: null
74399
+ },
74400
+ {
74401
+ id: "device-attention",
74402
+ family: "device-events",
74403
+ label: "Device needs attention (raised / resolved)",
74404
+ bad: ["device-attention-required"],
74405
+ recovery: ["device-attention-resolved"],
74406
+ snapshotLabel: "Devices needing attention now",
74407
+ snapshotSection: null
74408
+ },
74409
+ {
74410
+ id: "node-connectivity",
74411
+ family: "system",
74412
+ label: "Node connectivity (offline / back online)",
74413
+ bad: ["node-offline"],
74414
+ recovery: ["node-online"],
74415
+ snapshotLabel: "Nodes offline now",
74416
+ snapshotSection: "nodes"
74417
+ },
74418
+ {
74419
+ id: "storage-space",
74420
+ family: "system",
74421
+ label: "Storage space (low or critical / ok again)",
74422
+ bad: ["storage-location-low", "storage-location-critical"],
74423
+ recovery: ["storage-location-ok"],
74424
+ snapshotLabel: "Storage locations low now",
74425
+ snapshotSection: null
74426
+ },
74427
+ {
74428
+ id: "critical-alerts",
74429
+ family: "system",
74430
+ label: "Critical alerts (raised / resolved)",
74431
+ bad: ["alert-critical"],
74432
+ recovery: ["alert-critical-resolved"],
74433
+ snapshotLabel: "Critical alerts open now",
74434
+ snapshotSection: null
74435
+ },
74436
+ {
74437
+ id: "rule-health",
74438
+ family: "system",
74439
+ label: "Rule health (broken / repaired)",
74440
+ bad: ["rule-broken"],
74441
+ recovery: ["rule-repaired"],
74442
+ snapshotLabel: "Notification rules broken now",
74443
+ snapshotSection: null
74444
+ }
74445
+ ].flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
74270
74446
  new Set([
74271
74447
  "disarmed",
74272
74448
  "armed_home",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-waste-collections",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Waste collection schedules via the vendored HACS waste_collection_schedule Python core — full source catalog as calendar-source.",
5
5
  "keywords": [
6
6
  "camstack",