@camstack/addon-export-alexa 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.
@@ -7495,6 +7495,62 @@ var RecordingConfigSchema = object({
7495
7495
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7496
7496
  });
7497
7497
  /**
7498
+ * Ops-log — the durable, append-only operations audit shared by the
7499
+ * recordings and events management surfaces.
7500
+ *
7501
+ * ONE row shape is reused for both domains so a single "Activity" view can
7502
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7503
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7504
+ * management operation, WHY it ran (reason), and its measurable effect
7505
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7506
+ * never fail the operation it records.
7507
+ */
7508
+ /** Which management domain the operation belongs to. */
7509
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7510
+ /** The kind of management operation performed. */
7511
+ var OpsLogOpSchema = _enum([
7512
+ "prune",
7513
+ "manual-delete",
7514
+ "rescan",
7515
+ "retention-run"
7516
+ ]);
7517
+ /** Why the operation ran. */
7518
+ var OpsLogReasonSchema = _enum([
7519
+ "retention",
7520
+ "quota",
7521
+ "manual",
7522
+ "operator"
7523
+ ]);
7524
+ /** One audit row, shared verbatim by both domains. */
7525
+ var OpsLogEntrySchema = object({
7526
+ /** Unique row id. */
7527
+ id: string(),
7528
+ /** Epoch ms the operation completed. */
7529
+ at: number(),
7530
+ domain: OpsLogDomainSchema,
7531
+ op: OpsLogOpSchema,
7532
+ reason: OpsLogReasonSchema,
7533
+ /** The camera the op targeted; null for a cluster/global op. */
7534
+ deviceId: number().nullable(),
7535
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7536
+ nodeId: string(),
7537
+ /** Buckets / rows deleted (op-specific unit). */
7538
+ itemsAffected: number(),
7539
+ /** Bytes reclaimed by the op (0 when not measurable). */
7540
+ bytesReclaimed: number(),
7541
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7542
+ detail: string().nullable(),
7543
+ /** Who/what triggered the op. */
7544
+ actor: string()
7545
+ });
7546
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7547
+ var OpsLogQueryInputSchema = object({
7548
+ /** Restrict to a single camera; omit for every row. */
7549
+ deviceId: number().optional(),
7550
+ /** Max rows returned, newest-first. */
7551
+ limit: number().int().min(1).max(1e3).optional()
7552
+ });
7553
+ /**
7498
7554
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7499
7555
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7500
7556
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16420,6 +16476,26 @@ var TrackCascadeCountsSchema = object({
16420
16476
  /** Per-track CLIP search vectors removed (best-effort). */
16421
16477
  embeddings: number().int()
16422
16478
  });
16479
+ /** Event-store footprint for one camera. */
16480
+ var EventStoreDeviceFootprintSchema = object({
16481
+ deviceId: number(),
16482
+ /** Persisted event rows (motion + object + audio) for the camera. */
16483
+ rows: number().int(),
16484
+ /** Event-owned media bytes on disk for the camera. */
16485
+ bytes: number().int()
16486
+ });
16487
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16488
+ var EventStoreFootprintSchema = object({
16489
+ totalRows: number().int(),
16490
+ totalBytes: number().int(),
16491
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16492
+ });
16493
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16494
+ var EventPruneCountsSchema = object({
16495
+ motion: number().int(),
16496
+ object: number().int(),
16497
+ audio: number().int()
16498
+ });
16423
16499
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16424
16500
  deviceId: number(),
16425
16501
  trackId: string()
@@ -16483,6 +16559,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16483
16559
  }), {
16484
16560
  kind: "mutation",
16485
16561
  auth: "admin"
16562
+ }), method(object({}), EventStoreFootprintSchema, {
16563
+ kind: "query",
16564
+ auth: "admin"
16565
+ }), method(object({
16566
+ olderThanMs: number(),
16567
+ reason: OpsLogReasonSchema.optional()
16568
+ }), EventPruneCountsSchema, {
16569
+ kind: "mutation",
16570
+ auth: "admin"
16571
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16572
+ kind: "mutation",
16573
+ auth: "admin"
16574
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16575
+ kind: "query",
16576
+ auth: "admin"
16486
16577
  }), method(object({
16487
16578
  eventId: string(),
16488
16579
  kind: MediaFileKindEnum.optional()
@@ -19716,13 +19807,29 @@ method(object({
19716
19807
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19717
19808
  kind: "mutation",
19718
19809
  auth: "admin"
19719
- }), method(object({ deviceId: number() }), object({
19810
+ }), method(object({
19811
+ deviceId: number(),
19812
+ reason: OpsLogReasonSchema.optional()
19813
+ }), object({
19720
19814
  floorMs: number().nullable(),
19721
19815
  deletedBuckets: number().int(),
19722
19816
  reclaimedBytes: number().int()
19723
19817
  }), {
19724
19818
  kind: "mutation",
19725
19819
  auth: "admin"
19820
+ }), method(object({
19821
+ deviceId: number(),
19822
+ fromMs: number().optional(),
19823
+ toMs: number().optional()
19824
+ }), object({
19825
+ deletedBuckets: number().int(),
19826
+ reclaimedBytes: number().int()
19827
+ }), {
19828
+ kind: "mutation",
19829
+ auth: "admin"
19830
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19831
+ kind: "query",
19832
+ auth: "admin"
19726
19833
  });
19727
19834
  /**
19728
19835
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22844,6 +22951,12 @@ Object.freeze({
22844
22951
  addonId: null,
22845
22952
  access: "delete"
22846
22953
  },
22954
+ "pipelineAnalytics.deleteDeviceEvents": {
22955
+ capName: "pipeline-analytics",
22956
+ capScope: "device",
22957
+ addonId: null,
22958
+ access: "delete"
22959
+ },
22847
22960
  "pipelineAnalytics.deleteTracks": {
22848
22961
  capName: "pipeline-analytics",
22849
22962
  capScope: "device",
@@ -22874,6 +22987,12 @@ Object.freeze({
22874
22987
  addonId: null,
22875
22988
  access: "view"
22876
22989
  },
22990
+ "pipelineAnalytics.getEventStoreFootprint": {
22991
+ capName: "pipeline-analytics",
22992
+ capScope: "device",
22993
+ addonId: null,
22994
+ access: "view"
22995
+ },
22877
22996
  "pipelineAnalytics.getKeyEvents": {
22878
22997
  capName: "pipeline-analytics",
22879
22998
  capScope: "device",
@@ -22916,6 +23035,12 @@ Object.freeze({
22916
23035
  addonId: null,
22917
23036
  access: "view"
22918
23037
  },
23038
+ "pipelineAnalytics.listOpsLog": {
23039
+ capName: "pipeline-analytics",
23040
+ capScope: "device",
23041
+ addonId: null,
23042
+ access: "view"
23043
+ },
22919
23044
  "pipelineAnalytics.listRecentTracks": {
22920
23045
  capName: "pipeline-analytics",
22921
23046
  capScope: "device",
@@ -22928,6 +23053,12 @@ Object.freeze({
22928
23053
  addonId: null,
22929
23054
  access: "view"
22930
23055
  },
23056
+ "pipelineAnalytics.pruneEvents": {
23057
+ capName: "pipeline-analytics",
23058
+ capScope: "device",
23059
+ addonId: null,
23060
+ access: "create"
23061
+ },
22931
23062
  "pipelineAnalytics.pruneEventsBefore": {
22932
23063
  capName: "pipeline-analytics",
22933
23064
  capScope: "device",
@@ -23690,6 +23821,12 @@ Object.freeze({
23690
23821
  addonId: null,
23691
23822
  access: "create"
23692
23823
  },
23824
+ "recording.deleteFootprint": {
23825
+ capName: "recording",
23826
+ capScope: "system",
23827
+ addonId: null,
23828
+ access: "delete"
23829
+ },
23693
23830
  "recording.getAvailability": {
23694
23831
  capName: "recording",
23695
23832
  capScope: "system",
@@ -23720,6 +23857,12 @@ Object.freeze({
23720
23857
  addonId: null,
23721
23858
  access: "view"
23722
23859
  },
23860
+ "recording.listOpsLog": {
23861
+ capName: "recording",
23862
+ capScope: "system",
23863
+ addonId: null,
23864
+ access: "view"
23865
+ },
23723
23866
  "recording.locateSegment": {
23724
23867
  capName: "recording",
23725
23868
  capScope: "system",
@@ -7469,6 +7469,62 @@ var RecordingConfigSchema = object({
7469
7469
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7470
7470
  });
7471
7471
  /**
7472
+ * Ops-log — the durable, append-only operations audit shared by the
7473
+ * recordings and events management surfaces.
7474
+ *
7475
+ * ONE row shape is reused for both domains so a single "Activity" view can
7476
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7477
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7478
+ * management operation, WHY it ran (reason), and its measurable effect
7479
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7480
+ * never fail the operation it records.
7481
+ */
7482
+ /** Which management domain the operation belongs to. */
7483
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7484
+ /** The kind of management operation performed. */
7485
+ var OpsLogOpSchema = _enum([
7486
+ "prune",
7487
+ "manual-delete",
7488
+ "rescan",
7489
+ "retention-run"
7490
+ ]);
7491
+ /** Why the operation ran. */
7492
+ var OpsLogReasonSchema = _enum([
7493
+ "retention",
7494
+ "quota",
7495
+ "manual",
7496
+ "operator"
7497
+ ]);
7498
+ /** One audit row, shared verbatim by both domains. */
7499
+ var OpsLogEntrySchema = object({
7500
+ /** Unique row id. */
7501
+ id: string(),
7502
+ /** Epoch ms the operation completed. */
7503
+ at: number(),
7504
+ domain: OpsLogDomainSchema,
7505
+ op: OpsLogOpSchema,
7506
+ reason: OpsLogReasonSchema,
7507
+ /** The camera the op targeted; null for a cluster/global op. */
7508
+ deviceId: number().nullable(),
7509
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7510
+ nodeId: string(),
7511
+ /** Buckets / rows deleted (op-specific unit). */
7512
+ itemsAffected: number(),
7513
+ /** Bytes reclaimed by the op (0 when not measurable). */
7514
+ bytesReclaimed: number(),
7515
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7516
+ detail: string().nullable(),
7517
+ /** Who/what triggered the op. */
7518
+ actor: string()
7519
+ });
7520
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7521
+ var OpsLogQueryInputSchema = object({
7522
+ /** Restrict to a single camera; omit for every row. */
7523
+ deviceId: number().optional(),
7524
+ /** Max rows returned, newest-first. */
7525
+ limit: number().int().min(1).max(1e3).optional()
7526
+ });
7527
+ /**
7472
7528
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7473
7529
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7474
7530
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16394,6 +16450,26 @@ var TrackCascadeCountsSchema = object({
16394
16450
  /** Per-track CLIP search vectors removed (best-effort). */
16395
16451
  embeddings: number().int()
16396
16452
  });
16453
+ /** Event-store footprint for one camera. */
16454
+ var EventStoreDeviceFootprintSchema = object({
16455
+ deviceId: number(),
16456
+ /** Persisted event rows (motion + object + audio) for the camera. */
16457
+ rows: number().int(),
16458
+ /** Event-owned media bytes on disk for the camera. */
16459
+ bytes: number().int()
16460
+ });
16461
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16462
+ var EventStoreFootprintSchema = object({
16463
+ totalRows: number().int(),
16464
+ totalBytes: number().int(),
16465
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16466
+ });
16467
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16468
+ var EventPruneCountsSchema = object({
16469
+ motion: number().int(),
16470
+ object: number().int(),
16471
+ audio: number().int()
16472
+ });
16397
16473
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16398
16474
  deviceId: number(),
16399
16475
  trackId: string()
@@ -16457,6 +16533,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16457
16533
  }), {
16458
16534
  kind: "mutation",
16459
16535
  auth: "admin"
16536
+ }), method(object({}), EventStoreFootprintSchema, {
16537
+ kind: "query",
16538
+ auth: "admin"
16539
+ }), method(object({
16540
+ olderThanMs: number(),
16541
+ reason: OpsLogReasonSchema.optional()
16542
+ }), EventPruneCountsSchema, {
16543
+ kind: "mutation",
16544
+ auth: "admin"
16545
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16546
+ kind: "mutation",
16547
+ auth: "admin"
16548
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16549
+ kind: "query",
16550
+ auth: "admin"
16460
16551
  }), method(object({
16461
16552
  eventId: string(),
16462
16553
  kind: MediaFileKindEnum.optional()
@@ -19690,13 +19781,29 @@ method(object({
19690
19781
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19691
19782
  kind: "mutation",
19692
19783
  auth: "admin"
19693
- }), method(object({ deviceId: number() }), object({
19784
+ }), method(object({
19785
+ deviceId: number(),
19786
+ reason: OpsLogReasonSchema.optional()
19787
+ }), object({
19694
19788
  floorMs: number().nullable(),
19695
19789
  deletedBuckets: number().int(),
19696
19790
  reclaimedBytes: number().int()
19697
19791
  }), {
19698
19792
  kind: "mutation",
19699
19793
  auth: "admin"
19794
+ }), method(object({
19795
+ deviceId: number(),
19796
+ fromMs: number().optional(),
19797
+ toMs: number().optional()
19798
+ }), object({
19799
+ deletedBuckets: number().int(),
19800
+ reclaimedBytes: number().int()
19801
+ }), {
19802
+ kind: "mutation",
19803
+ auth: "admin"
19804
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19805
+ kind: "query",
19806
+ auth: "admin"
19700
19807
  });
19701
19808
  /**
19702
19809
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22818,6 +22925,12 @@ Object.freeze({
22818
22925
  addonId: null,
22819
22926
  access: "delete"
22820
22927
  },
22928
+ "pipelineAnalytics.deleteDeviceEvents": {
22929
+ capName: "pipeline-analytics",
22930
+ capScope: "device",
22931
+ addonId: null,
22932
+ access: "delete"
22933
+ },
22821
22934
  "pipelineAnalytics.deleteTracks": {
22822
22935
  capName: "pipeline-analytics",
22823
22936
  capScope: "device",
@@ -22848,6 +22961,12 @@ Object.freeze({
22848
22961
  addonId: null,
22849
22962
  access: "view"
22850
22963
  },
22964
+ "pipelineAnalytics.getEventStoreFootprint": {
22965
+ capName: "pipeline-analytics",
22966
+ capScope: "device",
22967
+ addonId: null,
22968
+ access: "view"
22969
+ },
22851
22970
  "pipelineAnalytics.getKeyEvents": {
22852
22971
  capName: "pipeline-analytics",
22853
22972
  capScope: "device",
@@ -22890,6 +23009,12 @@ Object.freeze({
22890
23009
  addonId: null,
22891
23010
  access: "view"
22892
23011
  },
23012
+ "pipelineAnalytics.listOpsLog": {
23013
+ capName: "pipeline-analytics",
23014
+ capScope: "device",
23015
+ addonId: null,
23016
+ access: "view"
23017
+ },
22893
23018
  "pipelineAnalytics.listRecentTracks": {
22894
23019
  capName: "pipeline-analytics",
22895
23020
  capScope: "device",
@@ -22902,6 +23027,12 @@ Object.freeze({
22902
23027
  addonId: null,
22903
23028
  access: "view"
22904
23029
  },
23030
+ "pipelineAnalytics.pruneEvents": {
23031
+ capName: "pipeline-analytics",
23032
+ capScope: "device",
23033
+ addonId: null,
23034
+ access: "create"
23035
+ },
22905
23036
  "pipelineAnalytics.pruneEventsBefore": {
22906
23037
  capName: "pipeline-analytics",
22907
23038
  capScope: "device",
@@ -23664,6 +23795,12 @@ Object.freeze({
23664
23795
  addonId: null,
23665
23796
  access: "create"
23666
23797
  },
23798
+ "recording.deleteFootprint": {
23799
+ capName: "recording",
23800
+ capScope: "system",
23801
+ addonId: null,
23802
+ access: "delete"
23803
+ },
23667
23804
  "recording.getAvailability": {
23668
23805
  capName: "recording",
23669
23806
  capScope: "system",
@@ -23694,6 +23831,12 @@ Object.freeze({
23694
23831
  addonId: null,
23695
23832
  access: "view"
23696
23833
  },
23834
+ "recording.listOpsLog": {
23835
+ capName: "recording",
23836
+ capScope: "system",
23837
+ addonId: null,
23838
+ access: "view"
23839
+ },
23697
23840
  "recording.locateSegment": {
23698
23841
  capName: "recording",
23699
23842
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",