@camstack/addon-export-ha-mqtt 1.1.25 → 1.1.26

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.
@@ -7379,6 +7379,62 @@ var RecordingConfigSchema = object({
7379
7379
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7380
7380
  });
7381
7381
  /**
7382
+ * Ops-log — the durable, append-only operations audit shared by the
7383
+ * recordings and events management surfaces.
7384
+ *
7385
+ * ONE row shape is reused for both domains so a single "Activity" view can
7386
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7387
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7388
+ * management operation, WHY it ran (reason), and its measurable effect
7389
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7390
+ * never fail the operation it records.
7391
+ */
7392
+ /** Which management domain the operation belongs to. */
7393
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7394
+ /** The kind of management operation performed. */
7395
+ var OpsLogOpSchema = _enum([
7396
+ "prune",
7397
+ "manual-delete",
7398
+ "rescan",
7399
+ "retention-run"
7400
+ ]);
7401
+ /** Why the operation ran. */
7402
+ var OpsLogReasonSchema = _enum([
7403
+ "retention",
7404
+ "quota",
7405
+ "manual",
7406
+ "operator"
7407
+ ]);
7408
+ /** One audit row, shared verbatim by both domains. */
7409
+ var OpsLogEntrySchema = object({
7410
+ /** Unique row id. */
7411
+ id: string(),
7412
+ /** Epoch ms the operation completed. */
7413
+ at: number$1(),
7414
+ domain: OpsLogDomainSchema,
7415
+ op: OpsLogOpSchema,
7416
+ reason: OpsLogReasonSchema,
7417
+ /** The camera the op targeted; null for a cluster/global op. */
7418
+ deviceId: number$1().nullable(),
7419
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7420
+ nodeId: string(),
7421
+ /** Buckets / rows deleted (op-specific unit). */
7422
+ itemsAffected: number$1(),
7423
+ /** Bytes reclaimed by the op (0 when not measurable). */
7424
+ bytesReclaimed: number$1(),
7425
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7426
+ detail: string().nullable(),
7427
+ /** Who/what triggered the op. */
7428
+ actor: string()
7429
+ });
7430
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7431
+ var OpsLogQueryInputSchema = object({
7432
+ /** Restrict to a single camera; omit for every row. */
7433
+ deviceId: number$1().optional(),
7434
+ /** Max rows returned, newest-first. */
7435
+ limit: number$1().int().min(1).max(1e3).optional()
7436
+ });
7437
+ /**
7382
7438
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7383
7439
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7384
7440
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16204,6 +16260,26 @@ var TrackCascadeCountsSchema = object({
16204
16260
  /** Per-track CLIP search vectors removed (best-effort). */
16205
16261
  embeddings: number$1().int()
16206
16262
  });
16263
+ /** Event-store footprint for one camera. */
16264
+ var EventStoreDeviceFootprintSchema = object({
16265
+ deviceId: number$1(),
16266
+ /** Persisted event rows (motion + object + audio) for the camera. */
16267
+ rows: number$1().int(),
16268
+ /** Event-owned media bytes on disk for the camera. */
16269
+ bytes: number$1().int()
16270
+ });
16271
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16272
+ var EventStoreFootprintSchema = object({
16273
+ totalRows: number$1().int(),
16274
+ totalBytes: number$1().int(),
16275
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16276
+ });
16277
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16278
+ var EventPruneCountsSchema = object({
16279
+ motion: number$1().int(),
16280
+ object: number$1().int(),
16281
+ audio: number$1().int()
16282
+ });
16207
16283
  DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).readonly()), method(object({
16208
16284
  deviceId: number$1(),
16209
16285
  trackId: string()
@@ -16267,6 +16343,21 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
16267
16343
  }), {
16268
16344
  kind: "mutation",
16269
16345
  auth: "admin"
16346
+ }), method(object({}), EventStoreFootprintSchema, {
16347
+ kind: "query",
16348
+ auth: "admin"
16349
+ }), method(object({
16350
+ olderThanMs: number$1(),
16351
+ reason: OpsLogReasonSchema.optional()
16352
+ }), EventPruneCountsSchema, {
16353
+ kind: "mutation",
16354
+ auth: "admin"
16355
+ }), method(object({ deviceId: number$1() }), EventPruneCountsSchema, {
16356
+ kind: "mutation",
16357
+ auth: "admin"
16358
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16359
+ kind: "query",
16360
+ auth: "admin"
16270
16361
  }), method(object({
16271
16362
  eventId: string(),
16272
16363
  kind: MediaFileKindEnum.optional()
@@ -19500,13 +19591,29 @@ method(object({
19500
19591
  }), method(object({ deviceId: number$1() }), RecordingStatusSchema, {
19501
19592
  kind: "mutation",
19502
19593
  auth: "admin"
19503
- }), method(object({ deviceId: number$1() }), object({
19594
+ }), method(object({
19595
+ deviceId: number$1(),
19596
+ reason: OpsLogReasonSchema.optional()
19597
+ }), object({
19504
19598
  floorMs: number$1().nullable(),
19505
19599
  deletedBuckets: number$1().int(),
19506
19600
  reclaimedBytes: number$1().int()
19507
19601
  }), {
19508
19602
  kind: "mutation",
19509
19603
  auth: "admin"
19604
+ }), method(object({
19605
+ deviceId: number$1(),
19606
+ fromMs: number$1().optional(),
19607
+ toMs: number$1().optional()
19608
+ }), object({
19609
+ deletedBuckets: number$1().int(),
19610
+ reclaimedBytes: number$1().int()
19611
+ }), {
19612
+ kind: "mutation",
19613
+ auth: "admin"
19614
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19615
+ kind: "query",
19616
+ auth: "admin"
19510
19617
  });
19511
19618
  /**
19512
19619
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22628,6 +22735,12 @@ Object.freeze({
22628
22735
  addonId: null,
22629
22736
  access: "delete"
22630
22737
  },
22738
+ "pipelineAnalytics.deleteDeviceEvents": {
22739
+ capName: "pipeline-analytics",
22740
+ capScope: "device",
22741
+ addonId: null,
22742
+ access: "delete"
22743
+ },
22631
22744
  "pipelineAnalytics.deleteTracks": {
22632
22745
  capName: "pipeline-analytics",
22633
22746
  capScope: "device",
@@ -22658,6 +22771,12 @@ Object.freeze({
22658
22771
  addonId: null,
22659
22772
  access: "view"
22660
22773
  },
22774
+ "pipelineAnalytics.getEventStoreFootprint": {
22775
+ capName: "pipeline-analytics",
22776
+ capScope: "device",
22777
+ addonId: null,
22778
+ access: "view"
22779
+ },
22661
22780
  "pipelineAnalytics.getKeyEvents": {
22662
22781
  capName: "pipeline-analytics",
22663
22782
  capScope: "device",
@@ -22700,6 +22819,12 @@ Object.freeze({
22700
22819
  addonId: null,
22701
22820
  access: "view"
22702
22821
  },
22822
+ "pipelineAnalytics.listOpsLog": {
22823
+ capName: "pipeline-analytics",
22824
+ capScope: "device",
22825
+ addonId: null,
22826
+ access: "view"
22827
+ },
22703
22828
  "pipelineAnalytics.listRecentTracks": {
22704
22829
  capName: "pipeline-analytics",
22705
22830
  capScope: "device",
@@ -22712,6 +22837,12 @@ Object.freeze({
22712
22837
  addonId: null,
22713
22838
  access: "view"
22714
22839
  },
22840
+ "pipelineAnalytics.pruneEvents": {
22841
+ capName: "pipeline-analytics",
22842
+ capScope: "device",
22843
+ addonId: null,
22844
+ access: "create"
22845
+ },
22715
22846
  "pipelineAnalytics.pruneEventsBefore": {
22716
22847
  capName: "pipeline-analytics",
22717
22848
  capScope: "device",
@@ -23474,6 +23605,12 @@ Object.freeze({
23474
23605
  addonId: null,
23475
23606
  access: "create"
23476
23607
  },
23608
+ "recording.deleteFootprint": {
23609
+ capName: "recording",
23610
+ capScope: "system",
23611
+ addonId: null,
23612
+ access: "delete"
23613
+ },
23477
23614
  "recording.getAvailability": {
23478
23615
  capName: "recording",
23479
23616
  capScope: "system",
@@ -23504,6 +23641,12 @@ Object.freeze({
23504
23641
  addonId: null,
23505
23642
  access: "view"
23506
23643
  },
23644
+ "recording.listOpsLog": {
23645
+ capName: "recording",
23646
+ capScope: "system",
23647
+ addonId: null,
23648
+ access: "view"
23649
+ },
23507
23650
  "recording.locateSegment": {
23508
23651
  capName: "recording",
23509
23652
  capScope: "system",
@@ -7377,6 +7377,62 @@ var RecordingConfigSchema = object({
7377
7377
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7378
7378
  });
7379
7379
  /**
7380
+ * Ops-log — the durable, append-only operations audit shared by the
7381
+ * recordings and events management surfaces.
7382
+ *
7383
+ * ONE row shape is reused for both domains so a single "Activity" view can
7384
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7385
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7386
+ * management operation, WHY it ran (reason), and its measurable effect
7387
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7388
+ * never fail the operation it records.
7389
+ */
7390
+ /** Which management domain the operation belongs to. */
7391
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7392
+ /** The kind of management operation performed. */
7393
+ var OpsLogOpSchema = _enum([
7394
+ "prune",
7395
+ "manual-delete",
7396
+ "rescan",
7397
+ "retention-run"
7398
+ ]);
7399
+ /** Why the operation ran. */
7400
+ var OpsLogReasonSchema = _enum([
7401
+ "retention",
7402
+ "quota",
7403
+ "manual",
7404
+ "operator"
7405
+ ]);
7406
+ /** One audit row, shared verbatim by both domains. */
7407
+ var OpsLogEntrySchema = object({
7408
+ /** Unique row id. */
7409
+ id: string(),
7410
+ /** Epoch ms the operation completed. */
7411
+ at: number$1(),
7412
+ domain: OpsLogDomainSchema,
7413
+ op: OpsLogOpSchema,
7414
+ reason: OpsLogReasonSchema,
7415
+ /** The camera the op targeted; null for a cluster/global op. */
7416
+ deviceId: number$1().nullable(),
7417
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7418
+ nodeId: string(),
7419
+ /** Buckets / rows deleted (op-specific unit). */
7420
+ itemsAffected: number$1(),
7421
+ /** Bytes reclaimed by the op (0 when not measurable). */
7422
+ bytesReclaimed: number$1(),
7423
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7424
+ detail: string().nullable(),
7425
+ /** Who/what triggered the op. */
7426
+ actor: string()
7427
+ });
7428
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7429
+ var OpsLogQueryInputSchema = object({
7430
+ /** Restrict to a single camera; omit for every row. */
7431
+ deviceId: number$1().optional(),
7432
+ /** Max rows returned, newest-first. */
7433
+ limit: number$1().int().min(1).max(1e3).optional()
7434
+ });
7435
+ /**
7380
7436
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7381
7437
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7382
7438
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16202,6 +16258,26 @@ var TrackCascadeCountsSchema = object({
16202
16258
  /** Per-track CLIP search vectors removed (best-effort). */
16203
16259
  embeddings: number$1().int()
16204
16260
  });
16261
+ /** Event-store footprint for one camera. */
16262
+ var EventStoreDeviceFootprintSchema = object({
16263
+ deviceId: number$1(),
16264
+ /** Persisted event rows (motion + object + audio) for the camera. */
16265
+ rows: number$1().int(),
16266
+ /** Event-owned media bytes on disk for the camera. */
16267
+ bytes: number$1().int()
16268
+ });
16269
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16270
+ var EventStoreFootprintSchema = object({
16271
+ totalRows: number$1().int(),
16272
+ totalBytes: number$1().int(),
16273
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16274
+ });
16275
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16276
+ var EventPruneCountsSchema = object({
16277
+ motion: number$1().int(),
16278
+ object: number$1().int(),
16279
+ audio: number$1().int()
16280
+ });
16205
16281
  DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).readonly()), method(object({
16206
16282
  deviceId: number$1(),
16207
16283
  trackId: string()
@@ -16265,6 +16341,21 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
16265
16341
  }), {
16266
16342
  kind: "mutation",
16267
16343
  auth: "admin"
16344
+ }), method(object({}), EventStoreFootprintSchema, {
16345
+ kind: "query",
16346
+ auth: "admin"
16347
+ }), method(object({
16348
+ olderThanMs: number$1(),
16349
+ reason: OpsLogReasonSchema.optional()
16350
+ }), EventPruneCountsSchema, {
16351
+ kind: "mutation",
16352
+ auth: "admin"
16353
+ }), method(object({ deviceId: number$1() }), EventPruneCountsSchema, {
16354
+ kind: "mutation",
16355
+ auth: "admin"
16356
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16357
+ kind: "query",
16358
+ auth: "admin"
16268
16359
  }), method(object({
16269
16360
  eventId: string(),
16270
16361
  kind: MediaFileKindEnum.optional()
@@ -19498,13 +19589,29 @@ method(object({
19498
19589
  }), method(object({ deviceId: number$1() }), RecordingStatusSchema, {
19499
19590
  kind: "mutation",
19500
19591
  auth: "admin"
19501
- }), method(object({ deviceId: number$1() }), object({
19592
+ }), method(object({
19593
+ deviceId: number$1(),
19594
+ reason: OpsLogReasonSchema.optional()
19595
+ }), object({
19502
19596
  floorMs: number$1().nullable(),
19503
19597
  deletedBuckets: number$1().int(),
19504
19598
  reclaimedBytes: number$1().int()
19505
19599
  }), {
19506
19600
  kind: "mutation",
19507
19601
  auth: "admin"
19602
+ }), method(object({
19603
+ deviceId: number$1(),
19604
+ fromMs: number$1().optional(),
19605
+ toMs: number$1().optional()
19606
+ }), object({
19607
+ deletedBuckets: number$1().int(),
19608
+ reclaimedBytes: number$1().int()
19609
+ }), {
19610
+ kind: "mutation",
19611
+ auth: "admin"
19612
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19613
+ kind: "query",
19614
+ auth: "admin"
19508
19615
  });
19509
19616
  /**
19510
19617
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22626,6 +22733,12 @@ Object.freeze({
22626
22733
  addonId: null,
22627
22734
  access: "delete"
22628
22735
  },
22736
+ "pipelineAnalytics.deleteDeviceEvents": {
22737
+ capName: "pipeline-analytics",
22738
+ capScope: "device",
22739
+ addonId: null,
22740
+ access: "delete"
22741
+ },
22629
22742
  "pipelineAnalytics.deleteTracks": {
22630
22743
  capName: "pipeline-analytics",
22631
22744
  capScope: "device",
@@ -22656,6 +22769,12 @@ Object.freeze({
22656
22769
  addonId: null,
22657
22770
  access: "view"
22658
22771
  },
22772
+ "pipelineAnalytics.getEventStoreFootprint": {
22773
+ capName: "pipeline-analytics",
22774
+ capScope: "device",
22775
+ addonId: null,
22776
+ access: "view"
22777
+ },
22659
22778
  "pipelineAnalytics.getKeyEvents": {
22660
22779
  capName: "pipeline-analytics",
22661
22780
  capScope: "device",
@@ -22698,6 +22817,12 @@ Object.freeze({
22698
22817
  addonId: null,
22699
22818
  access: "view"
22700
22819
  },
22820
+ "pipelineAnalytics.listOpsLog": {
22821
+ capName: "pipeline-analytics",
22822
+ capScope: "device",
22823
+ addonId: null,
22824
+ access: "view"
22825
+ },
22701
22826
  "pipelineAnalytics.listRecentTracks": {
22702
22827
  capName: "pipeline-analytics",
22703
22828
  capScope: "device",
@@ -22710,6 +22835,12 @@ Object.freeze({
22710
22835
  addonId: null,
22711
22836
  access: "view"
22712
22837
  },
22838
+ "pipelineAnalytics.pruneEvents": {
22839
+ capName: "pipeline-analytics",
22840
+ capScope: "device",
22841
+ addonId: null,
22842
+ access: "create"
22843
+ },
22713
22844
  "pipelineAnalytics.pruneEventsBefore": {
22714
22845
  capName: "pipeline-analytics",
22715
22846
  capScope: "device",
@@ -23472,6 +23603,12 @@ Object.freeze({
23472
23603
  addonId: null,
23473
23604
  access: "create"
23474
23605
  },
23606
+ "recording.deleteFootprint": {
23607
+ capName: "recording",
23608
+ capScope: "system",
23609
+ addonId: null,
23610
+ access: "delete"
23611
+ },
23475
23612
  "recording.getAvailability": {
23476
23613
  capName: "recording",
23477
23614
  capScope: "system",
@@ -23502,6 +23639,12 @@ Object.freeze({
23502
23639
  addonId: null,
23503
23640
  access: "view"
23504
23641
  },
23642
+ "recording.listOpsLog": {
23643
+ capName: "recording",
23644
+ capScope: "system",
23645
+ addonId: null,
23646
+ access: "view"
23647
+ },
23505
23648
  "recording.locateSegment": {
23506
23649
  capName: "recording",
23507
23650
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-ha-mqtt",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "HomeAssistant MQTT discovery exporter for CamStack devices. Publishes discovery topics so HA auto-creates entities for exposed cameras/switches/intercoms/sensors.",
5
5
  "keywords": [
6
6
  "camstack",