@camstack/addon-advanced-notifier 1.1.28 → 1.1.29

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 CHANGED
@@ -7332,6 +7332,62 @@ var RecordingConfigSchema = object({
7332
7332
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7333
7333
  });
7334
7334
  /**
7335
+ * Ops-log — the durable, append-only operations audit shared by the
7336
+ * recordings and events management surfaces.
7337
+ *
7338
+ * ONE row shape is reused for both domains so a single "Activity" view can
7339
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7340
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7341
+ * management operation, WHY it ran (reason), and its measurable effect
7342
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7343
+ * never fail the operation it records.
7344
+ */
7345
+ /** Which management domain the operation belongs to. */
7346
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7347
+ /** The kind of management operation performed. */
7348
+ var OpsLogOpSchema = _enum([
7349
+ "prune",
7350
+ "manual-delete",
7351
+ "rescan",
7352
+ "retention-run"
7353
+ ]);
7354
+ /** Why the operation ran. */
7355
+ var OpsLogReasonSchema = _enum([
7356
+ "retention",
7357
+ "quota",
7358
+ "manual",
7359
+ "operator"
7360
+ ]);
7361
+ /** One audit row, shared verbatim by both domains. */
7362
+ var OpsLogEntrySchema = object({
7363
+ /** Unique row id. */
7364
+ id: string(),
7365
+ /** Epoch ms the operation completed. */
7366
+ at: number(),
7367
+ domain: OpsLogDomainSchema,
7368
+ op: OpsLogOpSchema,
7369
+ reason: OpsLogReasonSchema,
7370
+ /** The camera the op targeted; null for a cluster/global op. */
7371
+ deviceId: number().nullable(),
7372
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7373
+ nodeId: string(),
7374
+ /** Buckets / rows deleted (op-specific unit). */
7375
+ itemsAffected: number(),
7376
+ /** Bytes reclaimed by the op (0 when not measurable). */
7377
+ bytesReclaimed: number(),
7378
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7379
+ detail: string().nullable(),
7380
+ /** Who/what triggered the op. */
7381
+ actor: string()
7382
+ });
7383
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7384
+ var OpsLogQueryInputSchema = object({
7385
+ /** Restrict to a single camera; omit for every row. */
7386
+ deviceId: number().optional(),
7387
+ /** Max rows returned, newest-first. */
7388
+ limit: number().int().min(1).max(1e3).optional()
7389
+ });
7390
+ /**
7335
7391
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7336
7392
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7337
7393
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16172,6 +16228,26 @@ var TrackCascadeCountsSchema = object({
16172
16228
  /** Per-track CLIP search vectors removed (best-effort). */
16173
16229
  embeddings: number().int()
16174
16230
  });
16231
+ /** Event-store footprint for one camera. */
16232
+ var EventStoreDeviceFootprintSchema = object({
16233
+ deviceId: number(),
16234
+ /** Persisted event rows (motion + object + audio) for the camera. */
16235
+ rows: number().int(),
16236
+ /** Event-owned media bytes on disk for the camera. */
16237
+ bytes: number().int()
16238
+ });
16239
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16240
+ var EventStoreFootprintSchema = object({
16241
+ totalRows: number().int(),
16242
+ totalBytes: number().int(),
16243
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16244
+ });
16245
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16246
+ var EventPruneCountsSchema = object({
16247
+ motion: number().int(),
16248
+ object: number().int(),
16249
+ audio: number().int()
16250
+ });
16175
16251
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16176
16252
  deviceId: number(),
16177
16253
  trackId: string()
@@ -16235,6 +16311,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16235
16311
  }), {
16236
16312
  kind: "mutation",
16237
16313
  auth: "admin"
16314
+ }), method(object({}), EventStoreFootprintSchema, {
16315
+ kind: "query",
16316
+ auth: "admin"
16317
+ }), method(object({
16318
+ olderThanMs: number(),
16319
+ reason: OpsLogReasonSchema.optional()
16320
+ }), EventPruneCountsSchema, {
16321
+ kind: "mutation",
16322
+ auth: "admin"
16323
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16324
+ kind: "mutation",
16325
+ auth: "admin"
16326
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16327
+ kind: "query",
16328
+ auth: "admin"
16238
16329
  }), method(object({
16239
16330
  eventId: string(),
16240
16331
  kind: MediaFileKindEnum.optional()
@@ -19468,13 +19559,29 @@ method(object({
19468
19559
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19469
19560
  kind: "mutation",
19470
19561
  auth: "admin"
19471
- }), method(object({ deviceId: number() }), object({
19562
+ }), method(object({
19563
+ deviceId: number(),
19564
+ reason: OpsLogReasonSchema.optional()
19565
+ }), object({
19472
19566
  floorMs: number().nullable(),
19473
19567
  deletedBuckets: number().int(),
19474
19568
  reclaimedBytes: number().int()
19475
19569
  }), {
19476
19570
  kind: "mutation",
19477
19571
  auth: "admin"
19572
+ }), method(object({
19573
+ deviceId: number(),
19574
+ fromMs: number().optional(),
19575
+ toMs: number().optional()
19576
+ }), object({
19577
+ deletedBuckets: number().int(),
19578
+ reclaimedBytes: number().int()
19579
+ }), {
19580
+ kind: "mutation",
19581
+ auth: "admin"
19582
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19583
+ kind: "query",
19584
+ auth: "admin"
19478
19585
  });
19479
19586
  /**
19480
19587
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22596,6 +22703,12 @@ Object.freeze({
22596
22703
  addonId: null,
22597
22704
  access: "delete"
22598
22705
  },
22706
+ "pipelineAnalytics.deleteDeviceEvents": {
22707
+ capName: "pipeline-analytics",
22708
+ capScope: "device",
22709
+ addonId: null,
22710
+ access: "delete"
22711
+ },
22599
22712
  "pipelineAnalytics.deleteTracks": {
22600
22713
  capName: "pipeline-analytics",
22601
22714
  capScope: "device",
@@ -22626,6 +22739,12 @@ Object.freeze({
22626
22739
  addonId: null,
22627
22740
  access: "view"
22628
22741
  },
22742
+ "pipelineAnalytics.getEventStoreFootprint": {
22743
+ capName: "pipeline-analytics",
22744
+ capScope: "device",
22745
+ addonId: null,
22746
+ access: "view"
22747
+ },
22629
22748
  "pipelineAnalytics.getKeyEvents": {
22630
22749
  capName: "pipeline-analytics",
22631
22750
  capScope: "device",
@@ -22668,6 +22787,12 @@ Object.freeze({
22668
22787
  addonId: null,
22669
22788
  access: "view"
22670
22789
  },
22790
+ "pipelineAnalytics.listOpsLog": {
22791
+ capName: "pipeline-analytics",
22792
+ capScope: "device",
22793
+ addonId: null,
22794
+ access: "view"
22795
+ },
22671
22796
  "pipelineAnalytics.listRecentTracks": {
22672
22797
  capName: "pipeline-analytics",
22673
22798
  capScope: "device",
@@ -22680,6 +22805,12 @@ Object.freeze({
22680
22805
  addonId: null,
22681
22806
  access: "view"
22682
22807
  },
22808
+ "pipelineAnalytics.pruneEvents": {
22809
+ capName: "pipeline-analytics",
22810
+ capScope: "device",
22811
+ addonId: null,
22812
+ access: "create"
22813
+ },
22683
22814
  "pipelineAnalytics.pruneEventsBefore": {
22684
22815
  capName: "pipeline-analytics",
22685
22816
  capScope: "device",
@@ -23442,6 +23573,12 @@ Object.freeze({
23442
23573
  addonId: null,
23443
23574
  access: "create"
23444
23575
  },
23576
+ "recording.deleteFootprint": {
23577
+ capName: "recording",
23578
+ capScope: "system",
23579
+ addonId: null,
23580
+ access: "delete"
23581
+ },
23445
23582
  "recording.getAvailability": {
23446
23583
  capName: "recording",
23447
23584
  capScope: "system",
@@ -23472,6 +23609,12 @@ Object.freeze({
23472
23609
  addonId: null,
23473
23610
  access: "view"
23474
23611
  },
23612
+ "recording.listOpsLog": {
23613
+ capName: "recording",
23614
+ capScope: "system",
23615
+ addonId: null,
23616
+ access: "view"
23617
+ },
23475
23618
  "recording.locateSegment": {
23476
23619
  capName: "recording",
23477
23620
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7328,6 +7328,62 @@ var RecordingConfigSchema = object({
7328
7328
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7329
7329
  });
7330
7330
  /**
7331
+ * Ops-log — the durable, append-only operations audit shared by the
7332
+ * recordings and events management surfaces.
7333
+ *
7334
+ * ONE row shape is reused for both domains so a single "Activity" view can
7335
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7336
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7337
+ * management operation, WHY it ran (reason), and its measurable effect
7338
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7339
+ * never fail the operation it records.
7340
+ */
7341
+ /** Which management domain the operation belongs to. */
7342
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7343
+ /** The kind of management operation performed. */
7344
+ var OpsLogOpSchema = _enum([
7345
+ "prune",
7346
+ "manual-delete",
7347
+ "rescan",
7348
+ "retention-run"
7349
+ ]);
7350
+ /** Why the operation ran. */
7351
+ var OpsLogReasonSchema = _enum([
7352
+ "retention",
7353
+ "quota",
7354
+ "manual",
7355
+ "operator"
7356
+ ]);
7357
+ /** One audit row, shared verbatim by both domains. */
7358
+ var OpsLogEntrySchema = object({
7359
+ /** Unique row id. */
7360
+ id: string(),
7361
+ /** Epoch ms the operation completed. */
7362
+ at: number(),
7363
+ domain: OpsLogDomainSchema,
7364
+ op: OpsLogOpSchema,
7365
+ reason: OpsLogReasonSchema,
7366
+ /** The camera the op targeted; null for a cluster/global op. */
7367
+ deviceId: number().nullable(),
7368
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7369
+ nodeId: string(),
7370
+ /** Buckets / rows deleted (op-specific unit). */
7371
+ itemsAffected: number(),
7372
+ /** Bytes reclaimed by the op (0 when not measurable). */
7373
+ bytesReclaimed: number(),
7374
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7375
+ detail: string().nullable(),
7376
+ /** Who/what triggered the op. */
7377
+ actor: string()
7378
+ });
7379
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7380
+ var OpsLogQueryInputSchema = object({
7381
+ /** Restrict to a single camera; omit for every row. */
7382
+ deviceId: number().optional(),
7383
+ /** Max rows returned, newest-first. */
7384
+ limit: number().int().min(1).max(1e3).optional()
7385
+ });
7386
+ /**
7331
7387
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7332
7388
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7333
7389
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16168,6 +16224,26 @@ var TrackCascadeCountsSchema = object({
16168
16224
  /** Per-track CLIP search vectors removed (best-effort). */
16169
16225
  embeddings: number().int()
16170
16226
  });
16227
+ /** Event-store footprint for one camera. */
16228
+ var EventStoreDeviceFootprintSchema = object({
16229
+ deviceId: number(),
16230
+ /** Persisted event rows (motion + object + audio) for the camera. */
16231
+ rows: number().int(),
16232
+ /** Event-owned media bytes on disk for the camera. */
16233
+ bytes: number().int()
16234
+ });
16235
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16236
+ var EventStoreFootprintSchema = object({
16237
+ totalRows: number().int(),
16238
+ totalBytes: number().int(),
16239
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16240
+ });
16241
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16242
+ var EventPruneCountsSchema = object({
16243
+ motion: number().int(),
16244
+ object: number().int(),
16245
+ audio: number().int()
16246
+ });
16171
16247
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16172
16248
  deviceId: number(),
16173
16249
  trackId: string()
@@ -16231,6 +16307,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16231
16307
  }), {
16232
16308
  kind: "mutation",
16233
16309
  auth: "admin"
16310
+ }), method(object({}), EventStoreFootprintSchema, {
16311
+ kind: "query",
16312
+ auth: "admin"
16313
+ }), method(object({
16314
+ olderThanMs: number(),
16315
+ reason: OpsLogReasonSchema.optional()
16316
+ }), EventPruneCountsSchema, {
16317
+ kind: "mutation",
16318
+ auth: "admin"
16319
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16320
+ kind: "mutation",
16321
+ auth: "admin"
16322
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16323
+ kind: "query",
16324
+ auth: "admin"
16234
16325
  }), method(object({
16235
16326
  eventId: string(),
16236
16327
  kind: MediaFileKindEnum.optional()
@@ -19464,13 +19555,29 @@ method(object({
19464
19555
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19465
19556
  kind: "mutation",
19466
19557
  auth: "admin"
19467
- }), method(object({ deviceId: number() }), object({
19558
+ }), method(object({
19559
+ deviceId: number(),
19560
+ reason: OpsLogReasonSchema.optional()
19561
+ }), object({
19468
19562
  floorMs: number().nullable(),
19469
19563
  deletedBuckets: number().int(),
19470
19564
  reclaimedBytes: number().int()
19471
19565
  }), {
19472
19566
  kind: "mutation",
19473
19567
  auth: "admin"
19568
+ }), method(object({
19569
+ deviceId: number(),
19570
+ fromMs: number().optional(),
19571
+ toMs: number().optional()
19572
+ }), object({
19573
+ deletedBuckets: number().int(),
19574
+ reclaimedBytes: number().int()
19575
+ }), {
19576
+ kind: "mutation",
19577
+ auth: "admin"
19578
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19579
+ kind: "query",
19580
+ auth: "admin"
19474
19581
  });
19475
19582
  /**
19476
19583
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22592,6 +22699,12 @@ Object.freeze({
22592
22699
  addonId: null,
22593
22700
  access: "delete"
22594
22701
  },
22702
+ "pipelineAnalytics.deleteDeviceEvents": {
22703
+ capName: "pipeline-analytics",
22704
+ capScope: "device",
22705
+ addonId: null,
22706
+ access: "delete"
22707
+ },
22595
22708
  "pipelineAnalytics.deleteTracks": {
22596
22709
  capName: "pipeline-analytics",
22597
22710
  capScope: "device",
@@ -22622,6 +22735,12 @@ Object.freeze({
22622
22735
  addonId: null,
22623
22736
  access: "view"
22624
22737
  },
22738
+ "pipelineAnalytics.getEventStoreFootprint": {
22739
+ capName: "pipeline-analytics",
22740
+ capScope: "device",
22741
+ addonId: null,
22742
+ access: "view"
22743
+ },
22625
22744
  "pipelineAnalytics.getKeyEvents": {
22626
22745
  capName: "pipeline-analytics",
22627
22746
  capScope: "device",
@@ -22664,6 +22783,12 @@ Object.freeze({
22664
22783
  addonId: null,
22665
22784
  access: "view"
22666
22785
  },
22786
+ "pipelineAnalytics.listOpsLog": {
22787
+ capName: "pipeline-analytics",
22788
+ capScope: "device",
22789
+ addonId: null,
22790
+ access: "view"
22791
+ },
22667
22792
  "pipelineAnalytics.listRecentTracks": {
22668
22793
  capName: "pipeline-analytics",
22669
22794
  capScope: "device",
@@ -22676,6 +22801,12 @@ Object.freeze({
22676
22801
  addonId: null,
22677
22802
  access: "view"
22678
22803
  },
22804
+ "pipelineAnalytics.pruneEvents": {
22805
+ capName: "pipeline-analytics",
22806
+ capScope: "device",
22807
+ addonId: null,
22808
+ access: "create"
22809
+ },
22679
22810
  "pipelineAnalytics.pruneEventsBefore": {
22680
22811
  capName: "pipeline-analytics",
22681
22812
  capScope: "device",
@@ -23438,6 +23569,12 @@ Object.freeze({
23438
23569
  addonId: null,
23439
23570
  access: "create"
23440
23571
  },
23572
+ "recording.deleteFootprint": {
23573
+ capName: "recording",
23574
+ capScope: "system",
23575
+ addonId: null,
23576
+ access: "delete"
23577
+ },
23441
23578
  "recording.getAvailability": {
23442
23579
  capName: "recording",
23443
23580
  capScope: "system",
@@ -23468,6 +23605,12 @@ Object.freeze({
23468
23605
  addonId: null,
23469
23606
  access: "view"
23470
23607
  },
23608
+ "recording.listOpsLog": {
23609
+ capName: "recording",
23610
+ capScope: "system",
23611
+ addonId: null,
23612
+ access: "view"
23613
+ },
23471
23614
  "recording.locateSegment": {
23472
23615
  capName: "recording",
23473
23616
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-advanced-notifier",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "description": "Rules-based notification engine for CamStack",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",