@camstack/addon-notifiers 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
@@ -7449,6 +7449,62 @@ var RecordingConfigSchema = object({
7449
7449
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7450
7450
  });
7451
7451
  /**
7452
+ * Ops-log — the durable, append-only operations audit shared by the
7453
+ * recordings and events management surfaces.
7454
+ *
7455
+ * ONE row shape is reused for both domains so a single "Activity" view can
7456
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7457
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7458
+ * management operation, WHY it ran (reason), and its measurable effect
7459
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7460
+ * never fail the operation it records.
7461
+ */
7462
+ /** Which management domain the operation belongs to. */
7463
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7464
+ /** The kind of management operation performed. */
7465
+ var OpsLogOpSchema = _enum([
7466
+ "prune",
7467
+ "manual-delete",
7468
+ "rescan",
7469
+ "retention-run"
7470
+ ]);
7471
+ /** Why the operation ran. */
7472
+ var OpsLogReasonSchema = _enum([
7473
+ "retention",
7474
+ "quota",
7475
+ "manual",
7476
+ "operator"
7477
+ ]);
7478
+ /** One audit row, shared verbatim by both domains. */
7479
+ var OpsLogEntrySchema = object({
7480
+ /** Unique row id. */
7481
+ id: string(),
7482
+ /** Epoch ms the operation completed. */
7483
+ at: number(),
7484
+ domain: OpsLogDomainSchema,
7485
+ op: OpsLogOpSchema,
7486
+ reason: OpsLogReasonSchema,
7487
+ /** The camera the op targeted; null for a cluster/global op. */
7488
+ deviceId: number().nullable(),
7489
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7490
+ nodeId: string(),
7491
+ /** Buckets / rows deleted (op-specific unit). */
7492
+ itemsAffected: number(),
7493
+ /** Bytes reclaimed by the op (0 when not measurable). */
7494
+ bytesReclaimed: number(),
7495
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7496
+ detail: string().nullable(),
7497
+ /** Who/what triggered the op. */
7498
+ actor: string()
7499
+ });
7500
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7501
+ var OpsLogQueryInputSchema = object({
7502
+ /** Restrict to a single camera; omit for every row. */
7503
+ deviceId: number().optional(),
7504
+ /** Max rows returned, newest-first. */
7505
+ limit: number().int().min(1).max(1e3).optional()
7506
+ });
7507
+ /**
7452
7508
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7453
7509
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7454
7510
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16475,6 +16531,26 @@ var TrackCascadeCountsSchema = object({
16475
16531
  /** Per-track CLIP search vectors removed (best-effort). */
16476
16532
  embeddings: number().int()
16477
16533
  });
16534
+ /** Event-store footprint for one camera. */
16535
+ var EventStoreDeviceFootprintSchema = object({
16536
+ deviceId: number(),
16537
+ /** Persisted event rows (motion + object + audio) for the camera. */
16538
+ rows: number().int(),
16539
+ /** Event-owned media bytes on disk for the camera. */
16540
+ bytes: number().int()
16541
+ });
16542
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16543
+ var EventStoreFootprintSchema = object({
16544
+ totalRows: number().int(),
16545
+ totalBytes: number().int(),
16546
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16547
+ });
16548
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16549
+ var EventPruneCountsSchema = object({
16550
+ motion: number().int(),
16551
+ object: number().int(),
16552
+ audio: number().int()
16553
+ });
16478
16554
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16479
16555
  deviceId: number(),
16480
16556
  trackId: string()
@@ -16538,6 +16614,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16538
16614
  }), {
16539
16615
  kind: "mutation",
16540
16616
  auth: "admin"
16617
+ }), method(object({}), EventStoreFootprintSchema, {
16618
+ kind: "query",
16619
+ auth: "admin"
16620
+ }), method(object({
16621
+ olderThanMs: number(),
16622
+ reason: OpsLogReasonSchema.optional()
16623
+ }), EventPruneCountsSchema, {
16624
+ kind: "mutation",
16625
+ auth: "admin"
16626
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16627
+ kind: "mutation",
16628
+ auth: "admin"
16629
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16630
+ kind: "query",
16631
+ auth: "admin"
16541
16632
  }), method(object({
16542
16633
  eventId: string(),
16543
16634
  kind: MediaFileKindEnum.optional()
@@ -19771,13 +19862,29 @@ method(object({
19771
19862
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19772
19863
  kind: "mutation",
19773
19864
  auth: "admin"
19774
- }), method(object({ deviceId: number() }), object({
19865
+ }), method(object({
19866
+ deviceId: number(),
19867
+ reason: OpsLogReasonSchema.optional()
19868
+ }), object({
19775
19869
  floorMs: number().nullable(),
19776
19870
  deletedBuckets: number().int(),
19777
19871
  reclaimedBytes: number().int()
19778
19872
  }), {
19779
19873
  kind: "mutation",
19780
19874
  auth: "admin"
19875
+ }), method(object({
19876
+ deviceId: number(),
19877
+ fromMs: number().optional(),
19878
+ toMs: number().optional()
19879
+ }), object({
19880
+ deletedBuckets: number().int(),
19881
+ reclaimedBytes: number().int()
19882
+ }), {
19883
+ kind: "mutation",
19884
+ auth: "admin"
19885
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19886
+ kind: "query",
19887
+ auth: "admin"
19781
19888
  });
19782
19889
  /**
19783
19890
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22899,6 +23006,12 @@ Object.freeze({
22899
23006
  addonId: null,
22900
23007
  access: "delete"
22901
23008
  },
23009
+ "pipelineAnalytics.deleteDeviceEvents": {
23010
+ capName: "pipeline-analytics",
23011
+ capScope: "device",
23012
+ addonId: null,
23013
+ access: "delete"
23014
+ },
22902
23015
  "pipelineAnalytics.deleteTracks": {
22903
23016
  capName: "pipeline-analytics",
22904
23017
  capScope: "device",
@@ -22929,6 +23042,12 @@ Object.freeze({
22929
23042
  addonId: null,
22930
23043
  access: "view"
22931
23044
  },
23045
+ "pipelineAnalytics.getEventStoreFootprint": {
23046
+ capName: "pipeline-analytics",
23047
+ capScope: "device",
23048
+ addonId: null,
23049
+ access: "view"
23050
+ },
22932
23051
  "pipelineAnalytics.getKeyEvents": {
22933
23052
  capName: "pipeline-analytics",
22934
23053
  capScope: "device",
@@ -22971,6 +23090,12 @@ Object.freeze({
22971
23090
  addonId: null,
22972
23091
  access: "view"
22973
23092
  },
23093
+ "pipelineAnalytics.listOpsLog": {
23094
+ capName: "pipeline-analytics",
23095
+ capScope: "device",
23096
+ addonId: null,
23097
+ access: "view"
23098
+ },
22974
23099
  "pipelineAnalytics.listRecentTracks": {
22975
23100
  capName: "pipeline-analytics",
22976
23101
  capScope: "device",
@@ -22983,6 +23108,12 @@ Object.freeze({
22983
23108
  addonId: null,
22984
23109
  access: "view"
22985
23110
  },
23111
+ "pipelineAnalytics.pruneEvents": {
23112
+ capName: "pipeline-analytics",
23113
+ capScope: "device",
23114
+ addonId: null,
23115
+ access: "create"
23116
+ },
22986
23117
  "pipelineAnalytics.pruneEventsBefore": {
22987
23118
  capName: "pipeline-analytics",
22988
23119
  capScope: "device",
@@ -23745,6 +23876,12 @@ Object.freeze({
23745
23876
  addonId: null,
23746
23877
  access: "create"
23747
23878
  },
23879
+ "recording.deleteFootprint": {
23880
+ capName: "recording",
23881
+ capScope: "system",
23882
+ addonId: null,
23883
+ access: "delete"
23884
+ },
23748
23885
  "recording.getAvailability": {
23749
23886
  capName: "recording",
23750
23887
  capScope: "system",
@@ -23775,6 +23912,12 @@ Object.freeze({
23775
23912
  addonId: null,
23776
23913
  access: "view"
23777
23914
  },
23915
+ "recording.listOpsLog": {
23916
+ capName: "recording",
23917
+ capScope: "system",
23918
+ addonId: null,
23919
+ access: "view"
23920
+ },
23778
23921
  "recording.locateSegment": {
23779
23922
  capName: "recording",
23780
23923
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7445,6 +7445,62 @@ var RecordingConfigSchema = object({
7445
7445
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7446
7446
  });
7447
7447
  /**
7448
+ * Ops-log — the durable, append-only operations audit shared by the
7449
+ * recordings and events management surfaces.
7450
+ *
7451
+ * ONE row shape is reused for both domains so a single "Activity" view can
7452
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7453
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7454
+ * management operation, WHY it ran (reason), and its measurable effect
7455
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7456
+ * never fail the operation it records.
7457
+ */
7458
+ /** Which management domain the operation belongs to. */
7459
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7460
+ /** The kind of management operation performed. */
7461
+ var OpsLogOpSchema = _enum([
7462
+ "prune",
7463
+ "manual-delete",
7464
+ "rescan",
7465
+ "retention-run"
7466
+ ]);
7467
+ /** Why the operation ran. */
7468
+ var OpsLogReasonSchema = _enum([
7469
+ "retention",
7470
+ "quota",
7471
+ "manual",
7472
+ "operator"
7473
+ ]);
7474
+ /** One audit row, shared verbatim by both domains. */
7475
+ var OpsLogEntrySchema = object({
7476
+ /** Unique row id. */
7477
+ id: string(),
7478
+ /** Epoch ms the operation completed. */
7479
+ at: number(),
7480
+ domain: OpsLogDomainSchema,
7481
+ op: OpsLogOpSchema,
7482
+ reason: OpsLogReasonSchema,
7483
+ /** The camera the op targeted; null for a cluster/global op. */
7484
+ deviceId: number().nullable(),
7485
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7486
+ nodeId: string(),
7487
+ /** Buckets / rows deleted (op-specific unit). */
7488
+ itemsAffected: number(),
7489
+ /** Bytes reclaimed by the op (0 when not measurable). */
7490
+ bytesReclaimed: number(),
7491
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7492
+ detail: string().nullable(),
7493
+ /** Who/what triggered the op. */
7494
+ actor: string()
7495
+ });
7496
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7497
+ var OpsLogQueryInputSchema = object({
7498
+ /** Restrict to a single camera; omit for every row. */
7499
+ deviceId: number().optional(),
7500
+ /** Max rows returned, newest-first. */
7501
+ limit: number().int().min(1).max(1e3).optional()
7502
+ });
7503
+ /**
7448
7504
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7449
7505
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7450
7506
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16471,6 +16527,26 @@ var TrackCascadeCountsSchema = object({
16471
16527
  /** Per-track CLIP search vectors removed (best-effort). */
16472
16528
  embeddings: number().int()
16473
16529
  });
16530
+ /** Event-store footprint for one camera. */
16531
+ var EventStoreDeviceFootprintSchema = object({
16532
+ deviceId: number(),
16533
+ /** Persisted event rows (motion + object + audio) for the camera. */
16534
+ rows: number().int(),
16535
+ /** Event-owned media bytes on disk for the camera. */
16536
+ bytes: number().int()
16537
+ });
16538
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16539
+ var EventStoreFootprintSchema = object({
16540
+ totalRows: number().int(),
16541
+ totalBytes: number().int(),
16542
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16543
+ });
16544
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16545
+ var EventPruneCountsSchema = object({
16546
+ motion: number().int(),
16547
+ object: number().int(),
16548
+ audio: number().int()
16549
+ });
16474
16550
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16475
16551
  deviceId: number(),
16476
16552
  trackId: string()
@@ -16534,6 +16610,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16534
16610
  }), {
16535
16611
  kind: "mutation",
16536
16612
  auth: "admin"
16613
+ }), method(object({}), EventStoreFootprintSchema, {
16614
+ kind: "query",
16615
+ auth: "admin"
16616
+ }), method(object({
16617
+ olderThanMs: number(),
16618
+ reason: OpsLogReasonSchema.optional()
16619
+ }), EventPruneCountsSchema, {
16620
+ kind: "mutation",
16621
+ auth: "admin"
16622
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16623
+ kind: "mutation",
16624
+ auth: "admin"
16625
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16626
+ kind: "query",
16627
+ auth: "admin"
16537
16628
  }), method(object({
16538
16629
  eventId: string(),
16539
16630
  kind: MediaFileKindEnum.optional()
@@ -19767,13 +19858,29 @@ method(object({
19767
19858
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19768
19859
  kind: "mutation",
19769
19860
  auth: "admin"
19770
- }), method(object({ deviceId: number() }), object({
19861
+ }), method(object({
19862
+ deviceId: number(),
19863
+ reason: OpsLogReasonSchema.optional()
19864
+ }), object({
19771
19865
  floorMs: number().nullable(),
19772
19866
  deletedBuckets: number().int(),
19773
19867
  reclaimedBytes: number().int()
19774
19868
  }), {
19775
19869
  kind: "mutation",
19776
19870
  auth: "admin"
19871
+ }), method(object({
19872
+ deviceId: number(),
19873
+ fromMs: number().optional(),
19874
+ toMs: number().optional()
19875
+ }), object({
19876
+ deletedBuckets: number().int(),
19877
+ reclaimedBytes: number().int()
19878
+ }), {
19879
+ kind: "mutation",
19880
+ auth: "admin"
19881
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19882
+ kind: "query",
19883
+ auth: "admin"
19777
19884
  });
19778
19885
  /**
19779
19886
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22895,6 +23002,12 @@ Object.freeze({
22895
23002
  addonId: null,
22896
23003
  access: "delete"
22897
23004
  },
23005
+ "pipelineAnalytics.deleteDeviceEvents": {
23006
+ capName: "pipeline-analytics",
23007
+ capScope: "device",
23008
+ addonId: null,
23009
+ access: "delete"
23010
+ },
22898
23011
  "pipelineAnalytics.deleteTracks": {
22899
23012
  capName: "pipeline-analytics",
22900
23013
  capScope: "device",
@@ -22925,6 +23038,12 @@ Object.freeze({
22925
23038
  addonId: null,
22926
23039
  access: "view"
22927
23040
  },
23041
+ "pipelineAnalytics.getEventStoreFootprint": {
23042
+ capName: "pipeline-analytics",
23043
+ capScope: "device",
23044
+ addonId: null,
23045
+ access: "view"
23046
+ },
22928
23047
  "pipelineAnalytics.getKeyEvents": {
22929
23048
  capName: "pipeline-analytics",
22930
23049
  capScope: "device",
@@ -22967,6 +23086,12 @@ Object.freeze({
22967
23086
  addonId: null,
22968
23087
  access: "view"
22969
23088
  },
23089
+ "pipelineAnalytics.listOpsLog": {
23090
+ capName: "pipeline-analytics",
23091
+ capScope: "device",
23092
+ addonId: null,
23093
+ access: "view"
23094
+ },
22970
23095
  "pipelineAnalytics.listRecentTracks": {
22971
23096
  capName: "pipeline-analytics",
22972
23097
  capScope: "device",
@@ -22979,6 +23104,12 @@ Object.freeze({
22979
23104
  addonId: null,
22980
23105
  access: "view"
22981
23106
  },
23107
+ "pipelineAnalytics.pruneEvents": {
23108
+ capName: "pipeline-analytics",
23109
+ capScope: "device",
23110
+ addonId: null,
23111
+ access: "create"
23112
+ },
22982
23113
  "pipelineAnalytics.pruneEventsBefore": {
22983
23114
  capName: "pipeline-analytics",
22984
23115
  capScope: "device",
@@ -23741,6 +23872,12 @@ Object.freeze({
23741
23872
  addonId: null,
23742
23873
  access: "create"
23743
23874
  },
23875
+ "recording.deleteFootprint": {
23876
+ capName: "recording",
23877
+ capScope: "system",
23878
+ addonId: null,
23879
+ access: "delete"
23880
+ },
23744
23881
  "recording.getAvailability": {
23745
23882
  capName: "recording",
23746
23883
  capScope: "system",
@@ -23771,6 +23908,12 @@ Object.freeze({
23771
23908
  addonId: null,
23772
23909
  access: "view"
23773
23910
  },
23911
+ "recording.listOpsLog": {
23912
+ capName: "recording",
23913
+ capScope: "system",
23914
+ addonId: null,
23915
+ access: "view"
23916
+ },
23774
23917
  "recording.locateSegment": {
23775
23918
  capName: "recording",
23776
23919
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",