@camstack/addon-static-turn 1.1.26 → 1.1.27

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.
@@ -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
@@ -16128,6 +16184,26 @@ var TrackCascadeCountsSchema = object({
16128
16184
  /** Per-track CLIP search vectors removed (best-effort). */
16129
16185
  embeddings: number().int()
16130
16186
  });
16187
+ /** Event-store footprint for one camera. */
16188
+ var EventStoreDeviceFootprintSchema = object({
16189
+ deviceId: number(),
16190
+ /** Persisted event rows (motion + object + audio) for the camera. */
16191
+ rows: number().int(),
16192
+ /** Event-owned media bytes on disk for the camera. */
16193
+ bytes: number().int()
16194
+ });
16195
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16196
+ var EventStoreFootprintSchema = object({
16197
+ totalRows: number().int(),
16198
+ totalBytes: number().int(),
16199
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16200
+ });
16201
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16202
+ var EventPruneCountsSchema = object({
16203
+ motion: number().int(),
16204
+ object: number().int(),
16205
+ audio: number().int()
16206
+ });
16131
16207
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16132
16208
  deviceId: number(),
16133
16209
  trackId: string()
@@ -16191,6 +16267,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16191
16267
  }), {
16192
16268
  kind: "mutation",
16193
16269
  auth: "admin"
16270
+ }), method(object({}), EventStoreFootprintSchema, {
16271
+ kind: "query",
16272
+ auth: "admin"
16273
+ }), method(object({
16274
+ olderThanMs: number(),
16275
+ reason: OpsLogReasonSchema.optional()
16276
+ }), EventPruneCountsSchema, {
16277
+ kind: "mutation",
16278
+ auth: "admin"
16279
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16280
+ kind: "mutation",
16281
+ auth: "admin"
16282
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16283
+ kind: "query",
16284
+ auth: "admin"
16194
16285
  }), method(object({
16195
16286
  eventId: string(),
16196
16287
  kind: MediaFileKindEnum.optional()
@@ -19447,13 +19538,29 @@ method(object({
19447
19538
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19448
19539
  kind: "mutation",
19449
19540
  auth: "admin"
19450
- }), method(object({ deviceId: number() }), object({
19541
+ }), method(object({
19542
+ deviceId: number(),
19543
+ reason: OpsLogReasonSchema.optional()
19544
+ }), object({
19451
19545
  floorMs: number().nullable(),
19452
19546
  deletedBuckets: number().int(),
19453
19547
  reclaimedBytes: number().int()
19454
19548
  }), {
19455
19549
  kind: "mutation",
19456
19550
  auth: "admin"
19551
+ }), method(object({
19552
+ deviceId: number(),
19553
+ fromMs: number().optional(),
19554
+ toMs: number().optional()
19555
+ }), object({
19556
+ deletedBuckets: number().int(),
19557
+ reclaimedBytes: number().int()
19558
+ }), {
19559
+ kind: "mutation",
19560
+ auth: "admin"
19561
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19562
+ kind: "query",
19563
+ auth: "admin"
19457
19564
  });
19458
19565
  /**
19459
19566
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22575,6 +22682,12 @@ Object.freeze({
22575
22682
  addonId: null,
22576
22683
  access: "delete"
22577
22684
  },
22685
+ "pipelineAnalytics.deleteDeviceEvents": {
22686
+ capName: "pipeline-analytics",
22687
+ capScope: "device",
22688
+ addonId: null,
22689
+ access: "delete"
22690
+ },
22578
22691
  "pipelineAnalytics.deleteTracks": {
22579
22692
  capName: "pipeline-analytics",
22580
22693
  capScope: "device",
@@ -22605,6 +22718,12 @@ Object.freeze({
22605
22718
  addonId: null,
22606
22719
  access: "view"
22607
22720
  },
22721
+ "pipelineAnalytics.getEventStoreFootprint": {
22722
+ capName: "pipeline-analytics",
22723
+ capScope: "device",
22724
+ addonId: null,
22725
+ access: "view"
22726
+ },
22608
22727
  "pipelineAnalytics.getKeyEvents": {
22609
22728
  capName: "pipeline-analytics",
22610
22729
  capScope: "device",
@@ -22647,6 +22766,12 @@ Object.freeze({
22647
22766
  addonId: null,
22648
22767
  access: "view"
22649
22768
  },
22769
+ "pipelineAnalytics.listOpsLog": {
22770
+ capName: "pipeline-analytics",
22771
+ capScope: "device",
22772
+ addonId: null,
22773
+ access: "view"
22774
+ },
22650
22775
  "pipelineAnalytics.listRecentTracks": {
22651
22776
  capName: "pipeline-analytics",
22652
22777
  capScope: "device",
@@ -22659,6 +22784,12 @@ Object.freeze({
22659
22784
  addonId: null,
22660
22785
  access: "view"
22661
22786
  },
22787
+ "pipelineAnalytics.pruneEvents": {
22788
+ capName: "pipeline-analytics",
22789
+ capScope: "device",
22790
+ addonId: null,
22791
+ access: "create"
22792
+ },
22662
22793
  "pipelineAnalytics.pruneEventsBefore": {
22663
22794
  capName: "pipeline-analytics",
22664
22795
  capScope: "device",
@@ -23421,6 +23552,12 @@ Object.freeze({
23421
23552
  addonId: null,
23422
23553
  access: "create"
23423
23554
  },
23555
+ "recording.deleteFootprint": {
23556
+ capName: "recording",
23557
+ capScope: "system",
23558
+ addonId: null,
23559
+ access: "delete"
23560
+ },
23424
23561
  "recording.getAvailability": {
23425
23562
  capName: "recording",
23426
23563
  capScope: "system",
@@ -23451,6 +23588,12 @@ Object.freeze({
23451
23588
  addonId: null,
23452
23589
  access: "view"
23453
23590
  },
23591
+ "recording.listOpsLog": {
23592
+ capName: "recording",
23593
+ capScope: "system",
23594
+ addonId: null,
23595
+ access: "view"
23596
+ },
23454
23597
  "recording.locateSegment": {
23455
23598
  capName: "recording",
23456
23599
  capScope: "system",
@@ -7327,6 +7327,62 @@ var RecordingConfigSchema = object({
7327
7327
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7328
7328
  });
7329
7329
  /**
7330
+ * Ops-log — the durable, append-only operations audit shared by the
7331
+ * recordings and events management surfaces.
7332
+ *
7333
+ * ONE row shape is reused for both domains so a single "Activity" view can
7334
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7335
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7336
+ * management operation, WHY it ran (reason), and its measurable effect
7337
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7338
+ * never fail the operation it records.
7339
+ */
7340
+ /** Which management domain the operation belongs to. */
7341
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7342
+ /** The kind of management operation performed. */
7343
+ var OpsLogOpSchema = _enum([
7344
+ "prune",
7345
+ "manual-delete",
7346
+ "rescan",
7347
+ "retention-run"
7348
+ ]);
7349
+ /** Why the operation ran. */
7350
+ var OpsLogReasonSchema = _enum([
7351
+ "retention",
7352
+ "quota",
7353
+ "manual",
7354
+ "operator"
7355
+ ]);
7356
+ /** One audit row, shared verbatim by both domains. */
7357
+ var OpsLogEntrySchema = object({
7358
+ /** Unique row id. */
7359
+ id: string(),
7360
+ /** Epoch ms the operation completed. */
7361
+ at: number(),
7362
+ domain: OpsLogDomainSchema,
7363
+ op: OpsLogOpSchema,
7364
+ reason: OpsLogReasonSchema,
7365
+ /** The camera the op targeted; null for a cluster/global op. */
7366
+ deviceId: number().nullable(),
7367
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7368
+ nodeId: string(),
7369
+ /** Buckets / rows deleted (op-specific unit). */
7370
+ itemsAffected: number(),
7371
+ /** Bytes reclaimed by the op (0 when not measurable). */
7372
+ bytesReclaimed: number(),
7373
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7374
+ detail: string().nullable(),
7375
+ /** Who/what triggered the op. */
7376
+ actor: string()
7377
+ });
7378
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7379
+ var OpsLogQueryInputSchema = object({
7380
+ /** Restrict to a single camera; omit for every row. */
7381
+ deviceId: number().optional(),
7382
+ /** Max rows returned, newest-first. */
7383
+ limit: number().int().min(1).max(1e3).optional()
7384
+ });
7385
+ /**
7330
7386
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7331
7387
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7332
7388
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16127,6 +16183,26 @@ var TrackCascadeCountsSchema = object({
16127
16183
  /** Per-track CLIP search vectors removed (best-effort). */
16128
16184
  embeddings: number().int()
16129
16185
  });
16186
+ /** Event-store footprint for one camera. */
16187
+ var EventStoreDeviceFootprintSchema = object({
16188
+ deviceId: number(),
16189
+ /** Persisted event rows (motion + object + audio) for the camera. */
16190
+ rows: number().int(),
16191
+ /** Event-owned media bytes on disk for the camera. */
16192
+ bytes: number().int()
16193
+ });
16194
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16195
+ var EventStoreFootprintSchema = object({
16196
+ totalRows: number().int(),
16197
+ totalBytes: number().int(),
16198
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16199
+ });
16200
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16201
+ var EventPruneCountsSchema = object({
16202
+ motion: number().int(),
16203
+ object: number().int(),
16204
+ audio: number().int()
16205
+ });
16130
16206
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16131
16207
  deviceId: number(),
16132
16208
  trackId: string()
@@ -16190,6 +16266,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16190
16266
  }), {
16191
16267
  kind: "mutation",
16192
16268
  auth: "admin"
16269
+ }), method(object({}), EventStoreFootprintSchema, {
16270
+ kind: "query",
16271
+ auth: "admin"
16272
+ }), method(object({
16273
+ olderThanMs: number(),
16274
+ reason: OpsLogReasonSchema.optional()
16275
+ }), EventPruneCountsSchema, {
16276
+ kind: "mutation",
16277
+ auth: "admin"
16278
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16279
+ kind: "mutation",
16280
+ auth: "admin"
16281
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16282
+ kind: "query",
16283
+ auth: "admin"
16193
16284
  }), method(object({
16194
16285
  eventId: string(),
16195
16286
  kind: MediaFileKindEnum.optional()
@@ -19446,13 +19537,29 @@ method(object({
19446
19537
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19447
19538
  kind: "mutation",
19448
19539
  auth: "admin"
19449
- }), method(object({ deviceId: number() }), object({
19540
+ }), method(object({
19541
+ deviceId: number(),
19542
+ reason: OpsLogReasonSchema.optional()
19543
+ }), object({
19450
19544
  floorMs: number().nullable(),
19451
19545
  deletedBuckets: number().int(),
19452
19546
  reclaimedBytes: number().int()
19453
19547
  }), {
19454
19548
  kind: "mutation",
19455
19549
  auth: "admin"
19550
+ }), method(object({
19551
+ deviceId: number(),
19552
+ fromMs: number().optional(),
19553
+ toMs: number().optional()
19554
+ }), object({
19555
+ deletedBuckets: number().int(),
19556
+ reclaimedBytes: number().int()
19557
+ }), {
19558
+ kind: "mutation",
19559
+ auth: "admin"
19560
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19561
+ kind: "query",
19562
+ auth: "admin"
19456
19563
  });
19457
19564
  /**
19458
19565
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22574,6 +22681,12 @@ Object.freeze({
22574
22681
  addonId: null,
22575
22682
  access: "delete"
22576
22683
  },
22684
+ "pipelineAnalytics.deleteDeviceEvents": {
22685
+ capName: "pipeline-analytics",
22686
+ capScope: "device",
22687
+ addonId: null,
22688
+ access: "delete"
22689
+ },
22577
22690
  "pipelineAnalytics.deleteTracks": {
22578
22691
  capName: "pipeline-analytics",
22579
22692
  capScope: "device",
@@ -22604,6 +22717,12 @@ Object.freeze({
22604
22717
  addonId: null,
22605
22718
  access: "view"
22606
22719
  },
22720
+ "pipelineAnalytics.getEventStoreFootprint": {
22721
+ capName: "pipeline-analytics",
22722
+ capScope: "device",
22723
+ addonId: null,
22724
+ access: "view"
22725
+ },
22607
22726
  "pipelineAnalytics.getKeyEvents": {
22608
22727
  capName: "pipeline-analytics",
22609
22728
  capScope: "device",
@@ -22646,6 +22765,12 @@ Object.freeze({
22646
22765
  addonId: null,
22647
22766
  access: "view"
22648
22767
  },
22768
+ "pipelineAnalytics.listOpsLog": {
22769
+ capName: "pipeline-analytics",
22770
+ capScope: "device",
22771
+ addonId: null,
22772
+ access: "view"
22773
+ },
22649
22774
  "pipelineAnalytics.listRecentTracks": {
22650
22775
  capName: "pipeline-analytics",
22651
22776
  capScope: "device",
@@ -22658,6 +22783,12 @@ Object.freeze({
22658
22783
  addonId: null,
22659
22784
  access: "view"
22660
22785
  },
22786
+ "pipelineAnalytics.pruneEvents": {
22787
+ capName: "pipeline-analytics",
22788
+ capScope: "device",
22789
+ addonId: null,
22790
+ access: "create"
22791
+ },
22661
22792
  "pipelineAnalytics.pruneEventsBefore": {
22662
22793
  capName: "pipeline-analytics",
22663
22794
  capScope: "device",
@@ -23420,6 +23551,12 @@ Object.freeze({
23420
23551
  addonId: null,
23421
23552
  access: "create"
23422
23553
  },
23554
+ "recording.deleteFootprint": {
23555
+ capName: "recording",
23556
+ capScope: "system",
23557
+ addonId: null,
23558
+ access: "delete"
23559
+ },
23423
23560
  "recording.getAvailability": {
23424
23561
  capName: "recording",
23425
23562
  capScope: "system",
@@ -23450,6 +23587,12 @@ Object.freeze({
23450
23587
  addonId: null,
23451
23588
  access: "view"
23452
23589
  },
23590
+ "recording.listOpsLog": {
23591
+ capName: "recording",
23592
+ capScope: "system",
23593
+ addonId: null,
23594
+ access: "view"
23595
+ },
23453
23596
  "recording.locateSegment": {
23454
23597
  capName: "recording",
23455
23598
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-static-turn",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "Static / self-hosted (coturn) TURN provider for CamStack",
5
5
  "keywords": [
6
6
  "camstack",