@camstack/addon-provider-onvif 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
@@ -7343,6 +7343,62 @@ var RecordingConfigSchema = object({
7343
7343
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7344
7344
  });
7345
7345
  /**
7346
+ * Ops-log — the durable, append-only operations audit shared by the
7347
+ * recordings and events management surfaces.
7348
+ *
7349
+ * ONE row shape is reused for both domains so a single "Activity" view can
7350
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7351
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7352
+ * management operation, WHY it ran (reason), and its measurable effect
7353
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7354
+ * never fail the operation it records.
7355
+ */
7356
+ /** Which management domain the operation belongs to. */
7357
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7358
+ /** The kind of management operation performed. */
7359
+ var OpsLogOpSchema = _enum([
7360
+ "prune",
7361
+ "manual-delete",
7362
+ "rescan",
7363
+ "retention-run"
7364
+ ]);
7365
+ /** Why the operation ran. */
7366
+ var OpsLogReasonSchema = _enum([
7367
+ "retention",
7368
+ "quota",
7369
+ "manual",
7370
+ "operator"
7371
+ ]);
7372
+ /** One audit row, shared verbatim by both domains. */
7373
+ var OpsLogEntrySchema = object({
7374
+ /** Unique row id. */
7375
+ id: string(),
7376
+ /** Epoch ms the operation completed. */
7377
+ at: number(),
7378
+ domain: OpsLogDomainSchema,
7379
+ op: OpsLogOpSchema,
7380
+ reason: OpsLogReasonSchema,
7381
+ /** The camera the op targeted; null for a cluster/global op. */
7382
+ deviceId: number().nullable(),
7383
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7384
+ nodeId: string(),
7385
+ /** Buckets / rows deleted (op-specific unit). */
7386
+ itemsAffected: number(),
7387
+ /** Bytes reclaimed by the op (0 when not measurable). */
7388
+ bytesReclaimed: number(),
7389
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7390
+ detail: string().nullable(),
7391
+ /** Who/what triggered the op. */
7392
+ actor: string()
7393
+ });
7394
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7395
+ var OpsLogQueryInputSchema = object({
7396
+ /** Restrict to a single camera; omit for every row. */
7397
+ deviceId: number().optional(),
7398
+ /** Max rows returned, newest-first. */
7399
+ limit: number().int().min(1).max(1e3).optional()
7400
+ });
7401
+ /**
7346
7402
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7347
7403
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7348
7404
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16607,6 +16663,26 @@ var TrackCascadeCountsSchema = object({
16607
16663
  /** Per-track CLIP search vectors removed (best-effort). */
16608
16664
  embeddings: number().int()
16609
16665
  });
16666
+ /** Event-store footprint for one camera. */
16667
+ var EventStoreDeviceFootprintSchema = object({
16668
+ deviceId: number(),
16669
+ /** Persisted event rows (motion + object + audio) for the camera. */
16670
+ rows: number().int(),
16671
+ /** Event-owned media bytes on disk for the camera. */
16672
+ bytes: number().int()
16673
+ });
16674
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16675
+ var EventStoreFootprintSchema = object({
16676
+ totalRows: number().int(),
16677
+ totalBytes: number().int(),
16678
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16679
+ });
16680
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16681
+ var EventPruneCountsSchema = object({
16682
+ motion: number().int(),
16683
+ object: number().int(),
16684
+ audio: number().int()
16685
+ });
16610
16686
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16611
16687
  deviceId: number(),
16612
16688
  trackId: string()
@@ -16670,6 +16746,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16670
16746
  }), {
16671
16747
  kind: "mutation",
16672
16748
  auth: "admin"
16749
+ }), method(object({}), EventStoreFootprintSchema, {
16750
+ kind: "query",
16751
+ auth: "admin"
16752
+ }), method(object({
16753
+ olderThanMs: number(),
16754
+ reason: OpsLogReasonSchema.optional()
16755
+ }), EventPruneCountsSchema, {
16756
+ kind: "mutation",
16757
+ auth: "admin"
16758
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16759
+ kind: "mutation",
16760
+ auth: "admin"
16761
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16762
+ kind: "query",
16763
+ auth: "admin"
16673
16764
  }), method(object({
16674
16765
  eventId: string(),
16675
16766
  kind: MediaFileKindEnum.optional()
@@ -19996,13 +20087,29 @@ method(object({
19996
20087
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19997
20088
  kind: "mutation",
19998
20089
  auth: "admin"
19999
- }), method(object({ deviceId: number() }), object({
20090
+ }), method(object({
20091
+ deviceId: number(),
20092
+ reason: OpsLogReasonSchema.optional()
20093
+ }), object({
20000
20094
  floorMs: number().nullable(),
20001
20095
  deletedBuckets: number().int(),
20002
20096
  reclaimedBytes: number().int()
20003
20097
  }), {
20004
20098
  kind: "mutation",
20005
20099
  auth: "admin"
20100
+ }), method(object({
20101
+ deviceId: number(),
20102
+ fromMs: number().optional(),
20103
+ toMs: number().optional()
20104
+ }), object({
20105
+ deletedBuckets: number().int(),
20106
+ reclaimedBytes: number().int()
20107
+ }), {
20108
+ kind: "mutation",
20109
+ auth: "admin"
20110
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20111
+ kind: "query",
20112
+ auth: "admin"
20006
20113
  });
20007
20114
  /**
20008
20115
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -23124,6 +23231,12 @@ Object.freeze({
23124
23231
  addonId: null,
23125
23232
  access: "delete"
23126
23233
  },
23234
+ "pipelineAnalytics.deleteDeviceEvents": {
23235
+ capName: "pipeline-analytics",
23236
+ capScope: "device",
23237
+ addonId: null,
23238
+ access: "delete"
23239
+ },
23127
23240
  "pipelineAnalytics.deleteTracks": {
23128
23241
  capName: "pipeline-analytics",
23129
23242
  capScope: "device",
@@ -23154,6 +23267,12 @@ Object.freeze({
23154
23267
  addonId: null,
23155
23268
  access: "view"
23156
23269
  },
23270
+ "pipelineAnalytics.getEventStoreFootprint": {
23271
+ capName: "pipeline-analytics",
23272
+ capScope: "device",
23273
+ addonId: null,
23274
+ access: "view"
23275
+ },
23157
23276
  "pipelineAnalytics.getKeyEvents": {
23158
23277
  capName: "pipeline-analytics",
23159
23278
  capScope: "device",
@@ -23196,6 +23315,12 @@ Object.freeze({
23196
23315
  addonId: null,
23197
23316
  access: "view"
23198
23317
  },
23318
+ "pipelineAnalytics.listOpsLog": {
23319
+ capName: "pipeline-analytics",
23320
+ capScope: "device",
23321
+ addonId: null,
23322
+ access: "view"
23323
+ },
23199
23324
  "pipelineAnalytics.listRecentTracks": {
23200
23325
  capName: "pipeline-analytics",
23201
23326
  capScope: "device",
@@ -23208,6 +23333,12 @@ Object.freeze({
23208
23333
  addonId: null,
23209
23334
  access: "view"
23210
23335
  },
23336
+ "pipelineAnalytics.pruneEvents": {
23337
+ capName: "pipeline-analytics",
23338
+ capScope: "device",
23339
+ addonId: null,
23340
+ access: "create"
23341
+ },
23211
23342
  "pipelineAnalytics.pruneEventsBefore": {
23212
23343
  capName: "pipeline-analytics",
23213
23344
  capScope: "device",
@@ -23970,6 +24101,12 @@ Object.freeze({
23970
24101
  addonId: null,
23971
24102
  access: "create"
23972
24103
  },
24104
+ "recording.deleteFootprint": {
24105
+ capName: "recording",
24106
+ capScope: "system",
24107
+ addonId: null,
24108
+ access: "delete"
24109
+ },
23973
24110
  "recording.getAvailability": {
23974
24111
  capName: "recording",
23975
24112
  capScope: "system",
@@ -24000,6 +24137,12 @@ Object.freeze({
24000
24137
  addonId: null,
24001
24138
  access: "view"
24002
24139
  },
24140
+ "recording.listOpsLog": {
24141
+ capName: "recording",
24142
+ capScope: "system",
24143
+ addonId: null,
24144
+ access: "view"
24145
+ },
24003
24146
  "recording.locateSegment": {
24004
24147
  capName: "recording",
24005
24148
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7344,6 +7344,62 @@ var RecordingConfigSchema = object({
7344
7344
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7345
7345
  });
7346
7346
  /**
7347
+ * Ops-log — the durable, append-only operations audit shared by the
7348
+ * recordings and events management surfaces.
7349
+ *
7350
+ * ONE row shape is reused for both domains so a single "Activity" view can
7351
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7352
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7353
+ * management operation, WHY it ran (reason), and its measurable effect
7354
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7355
+ * never fail the operation it records.
7356
+ */
7357
+ /** Which management domain the operation belongs to. */
7358
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7359
+ /** The kind of management operation performed. */
7360
+ var OpsLogOpSchema = _enum([
7361
+ "prune",
7362
+ "manual-delete",
7363
+ "rescan",
7364
+ "retention-run"
7365
+ ]);
7366
+ /** Why the operation ran. */
7367
+ var OpsLogReasonSchema = _enum([
7368
+ "retention",
7369
+ "quota",
7370
+ "manual",
7371
+ "operator"
7372
+ ]);
7373
+ /** One audit row, shared verbatim by both domains. */
7374
+ var OpsLogEntrySchema = object({
7375
+ /** Unique row id. */
7376
+ id: string(),
7377
+ /** Epoch ms the operation completed. */
7378
+ at: number(),
7379
+ domain: OpsLogDomainSchema,
7380
+ op: OpsLogOpSchema,
7381
+ reason: OpsLogReasonSchema,
7382
+ /** The camera the op targeted; null for a cluster/global op. */
7383
+ deviceId: number().nullable(),
7384
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7385
+ nodeId: string(),
7386
+ /** Buckets / rows deleted (op-specific unit). */
7387
+ itemsAffected: number(),
7388
+ /** Bytes reclaimed by the op (0 when not measurable). */
7389
+ bytesReclaimed: number(),
7390
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7391
+ detail: string().nullable(),
7392
+ /** Who/what triggered the op. */
7393
+ actor: string()
7394
+ });
7395
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7396
+ var OpsLogQueryInputSchema = object({
7397
+ /** Restrict to a single camera; omit for every row. */
7398
+ deviceId: number().optional(),
7399
+ /** Max rows returned, newest-first. */
7400
+ limit: number().int().min(1).max(1e3).optional()
7401
+ });
7402
+ /**
7347
7403
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7348
7404
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7349
7405
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16608,6 +16664,26 @@ var TrackCascadeCountsSchema = object({
16608
16664
  /** Per-track CLIP search vectors removed (best-effort). */
16609
16665
  embeddings: number().int()
16610
16666
  });
16667
+ /** Event-store footprint for one camera. */
16668
+ var EventStoreDeviceFootprintSchema = object({
16669
+ deviceId: number(),
16670
+ /** Persisted event rows (motion + object + audio) for the camera. */
16671
+ rows: number().int(),
16672
+ /** Event-owned media bytes on disk for the camera. */
16673
+ bytes: number().int()
16674
+ });
16675
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16676
+ var EventStoreFootprintSchema = object({
16677
+ totalRows: number().int(),
16678
+ totalBytes: number().int(),
16679
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16680
+ });
16681
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16682
+ var EventPruneCountsSchema = object({
16683
+ motion: number().int(),
16684
+ object: number().int(),
16685
+ audio: number().int()
16686
+ });
16611
16687
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16612
16688
  deviceId: number(),
16613
16689
  trackId: string()
@@ -16671,6 +16747,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16671
16747
  }), {
16672
16748
  kind: "mutation",
16673
16749
  auth: "admin"
16750
+ }), method(object({}), EventStoreFootprintSchema, {
16751
+ kind: "query",
16752
+ auth: "admin"
16753
+ }), method(object({
16754
+ olderThanMs: number(),
16755
+ reason: OpsLogReasonSchema.optional()
16756
+ }), EventPruneCountsSchema, {
16757
+ kind: "mutation",
16758
+ auth: "admin"
16759
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16760
+ kind: "mutation",
16761
+ auth: "admin"
16762
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16763
+ kind: "query",
16764
+ auth: "admin"
16674
16765
  }), method(object({
16675
16766
  eventId: string(),
16676
16767
  kind: MediaFileKindEnum.optional()
@@ -19997,13 +20088,29 @@ method(object({
19997
20088
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19998
20089
  kind: "mutation",
19999
20090
  auth: "admin"
20000
- }), method(object({ deviceId: number() }), object({
20091
+ }), method(object({
20092
+ deviceId: number(),
20093
+ reason: OpsLogReasonSchema.optional()
20094
+ }), object({
20001
20095
  floorMs: number().nullable(),
20002
20096
  deletedBuckets: number().int(),
20003
20097
  reclaimedBytes: number().int()
20004
20098
  }), {
20005
20099
  kind: "mutation",
20006
20100
  auth: "admin"
20101
+ }), method(object({
20102
+ deviceId: number(),
20103
+ fromMs: number().optional(),
20104
+ toMs: number().optional()
20105
+ }), object({
20106
+ deletedBuckets: number().int(),
20107
+ reclaimedBytes: number().int()
20108
+ }), {
20109
+ kind: "mutation",
20110
+ auth: "admin"
20111
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20112
+ kind: "query",
20113
+ auth: "admin"
20007
20114
  });
20008
20115
  /**
20009
20116
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -23125,6 +23232,12 @@ Object.freeze({
23125
23232
  addonId: null,
23126
23233
  access: "delete"
23127
23234
  },
23235
+ "pipelineAnalytics.deleteDeviceEvents": {
23236
+ capName: "pipeline-analytics",
23237
+ capScope: "device",
23238
+ addonId: null,
23239
+ access: "delete"
23240
+ },
23128
23241
  "pipelineAnalytics.deleteTracks": {
23129
23242
  capName: "pipeline-analytics",
23130
23243
  capScope: "device",
@@ -23155,6 +23268,12 @@ Object.freeze({
23155
23268
  addonId: null,
23156
23269
  access: "view"
23157
23270
  },
23271
+ "pipelineAnalytics.getEventStoreFootprint": {
23272
+ capName: "pipeline-analytics",
23273
+ capScope: "device",
23274
+ addonId: null,
23275
+ access: "view"
23276
+ },
23158
23277
  "pipelineAnalytics.getKeyEvents": {
23159
23278
  capName: "pipeline-analytics",
23160
23279
  capScope: "device",
@@ -23197,6 +23316,12 @@ Object.freeze({
23197
23316
  addonId: null,
23198
23317
  access: "view"
23199
23318
  },
23319
+ "pipelineAnalytics.listOpsLog": {
23320
+ capName: "pipeline-analytics",
23321
+ capScope: "device",
23322
+ addonId: null,
23323
+ access: "view"
23324
+ },
23200
23325
  "pipelineAnalytics.listRecentTracks": {
23201
23326
  capName: "pipeline-analytics",
23202
23327
  capScope: "device",
@@ -23209,6 +23334,12 @@ Object.freeze({
23209
23334
  addonId: null,
23210
23335
  access: "view"
23211
23336
  },
23337
+ "pipelineAnalytics.pruneEvents": {
23338
+ capName: "pipeline-analytics",
23339
+ capScope: "device",
23340
+ addonId: null,
23341
+ access: "create"
23342
+ },
23212
23343
  "pipelineAnalytics.pruneEventsBefore": {
23213
23344
  capName: "pipeline-analytics",
23214
23345
  capScope: "device",
@@ -23971,6 +24102,12 @@ Object.freeze({
23971
24102
  addonId: null,
23972
24103
  access: "create"
23973
24104
  },
24105
+ "recording.deleteFootprint": {
24106
+ capName: "recording",
24107
+ capScope: "system",
24108
+ addonId: null,
24109
+ access: "delete"
24110
+ },
23974
24111
  "recording.getAvailability": {
23975
24112
  capName: "recording",
23976
24113
  capScope: "system",
@@ -24001,6 +24138,12 @@ Object.freeze({
24001
24138
  addonId: null,
24002
24139
  access: "view"
24003
24140
  },
24141
+ "recording.listOpsLog": {
24142
+ capName: "recording",
24143
+ capScope: "system",
24144
+ addonId: null,
24145
+ access: "view"
24146
+ },
24004
24147
  "recording.locateSegment": {
24005
24148
  capName: "recording",
24006
24149
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",