@camstack/addon-export-hap 1.2.58 → 1.2.59

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.
@@ -19554,6 +19554,50 @@ var EventStoreFootprintSchema = object({
19554
19554
  totalBytes: number().int(),
19555
19555
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19556
19556
  });
19557
+ /** Event-media footprint for one {@link MediaFileKind}. */
19558
+ var EventMediaKindFootprintSchema = object({
19559
+ kind: MediaFileKindEnum,
19560
+ /** Media rows of this kind. */
19561
+ rows: number().int(),
19562
+ /** Bytes on disk held by those rows. */
19563
+ bytes: number().int()
19564
+ });
19565
+ /**
19566
+ * The media footprint broken down by KIND — the axis a deletion decision
19567
+ * actually turns on.
19568
+ *
19569
+ * A byte total says how much there is; it cannot say what is safe to remove.
19570
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19571
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19572
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19573
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19574
+ * nothing else, so sizing a deletion means summing per kind.
19575
+ *
19576
+ * ## Why `unaccounted*` exists
19577
+ *
19578
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19579
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19580
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19581
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19582
+ * retired code path, or by a version that knew a kind this one does not) would
19583
+ * otherwise vanish from the total silently, and an operator would delete
19584
+ * against a denominator smaller than the disk.
19585
+ *
19586
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19587
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19588
+ */
19589
+ var EventMediaKindBreakdownSchema = object({
19590
+ /** Every media row in scope, from one unfiltered aggregate. */
19591
+ totalRows: number().int(),
19592
+ /** Every media byte in scope, from that same aggregate. */
19593
+ totalBytes: number().int(),
19594
+ /** Per-kind footprint, ordered by bytes descending. */
19595
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19596
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19597
+ unaccountedRows: number().int(),
19598
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19599
+ unaccountedBytes: number().int()
19600
+ });
19557
19601
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19558
19602
  var EventPruneCountsSchema = object({
19559
19603
  motion: number().int(),
@@ -19757,6 +19801,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19757
19801
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19758
19802
  kind: "query",
19759
19803
  auth: "admin"
19804
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19805
+ kind: "query",
19806
+ auth: "admin"
19760
19807
  }), method(object({
19761
19808
  olderThanMs: number(),
19762
19809
  reason: OpsLogReasonSchema.optional()
@@ -21708,6 +21755,20 @@ method(object({
21708
21755
  error: string().optional()
21709
21756
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21710
21757
  providerId: string(),
21758
+ /**
21759
+ * The location this config is an UNSAVED edit of, when there is one.
21760
+ *
21761
+ * `listLocations` replaces every declared secret with the redaction
21762
+ * sentinel, so the edit modal's form state holds the sentinel for any
21763
+ * credential the operator did not retype — and posting that here
21764
+ * without a way to resolve it makes the provider try to authenticate
21765
+ * as `__camstack_redacted__` and report the operator's own working
21766
+ * password as wrong. Given this id, the orchestrator restores each
21767
+ * sentinel from the stored config (same rule as `upsertLocation`)
21768
+ * before dispatching. Omitted by the "Add location" wizard, where
21769
+ * every value was typed just now and nothing is stored yet.
21770
+ */
21771
+ locationId: string().optional(),
21711
21772
  config: record(string(), unknown())
21712
21773
  }), object({
21713
21774
  ok: boolean(),
@@ -32435,6 +32496,12 @@ Object.freeze({
32435
32496
  addonId: null,
32436
32497
  access: "view"
32437
32498
  },
32499
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
32500
+ capName: "pipeline-analytics",
32501
+ capScope: "device",
32502
+ addonId: null,
32503
+ access: "view"
32504
+ },
32438
32505
  "pipelineAnalytics.getEventStoreFootprint": {
32439
32506
  capName: "pipeline-analytics",
32440
32507
  capScope: "device",
@@ -36100,6 +36167,11 @@ Object.freeze({
36100
36167
  form: "single",
36101
36168
  optional: false
36102
36169
  }],
36170
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
36171
+ name: "deviceId",
36172
+ form: "single",
36173
+ optional: true
36174
+ }],
36103
36175
  "pipelineAnalytics.getGroup": [{
36104
36176
  name: "deviceId",
36105
36177
  form: "single",
@@ -19542,6 +19542,50 @@ var EventStoreFootprintSchema = object({
19542
19542
  totalBytes: number().int(),
19543
19543
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19544
19544
  });
19545
+ /** Event-media footprint for one {@link MediaFileKind}. */
19546
+ var EventMediaKindFootprintSchema = object({
19547
+ kind: MediaFileKindEnum,
19548
+ /** Media rows of this kind. */
19549
+ rows: number().int(),
19550
+ /** Bytes on disk held by those rows. */
19551
+ bytes: number().int()
19552
+ });
19553
+ /**
19554
+ * The media footprint broken down by KIND — the axis a deletion decision
19555
+ * actually turns on.
19556
+ *
19557
+ * A byte total says how much there is; it cannot say what is safe to remove.
19558
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19559
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19560
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19561
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19562
+ * nothing else, so sizing a deletion means summing per kind.
19563
+ *
19564
+ * ## Why `unaccounted*` exists
19565
+ *
19566
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19567
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19568
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19569
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19570
+ * retired code path, or by a version that knew a kind this one does not) would
19571
+ * otherwise vanish from the total silently, and an operator would delete
19572
+ * against a denominator smaller than the disk.
19573
+ *
19574
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19575
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19576
+ */
19577
+ var EventMediaKindBreakdownSchema = object({
19578
+ /** Every media row in scope, from one unfiltered aggregate. */
19579
+ totalRows: number().int(),
19580
+ /** Every media byte in scope, from that same aggregate. */
19581
+ totalBytes: number().int(),
19582
+ /** Per-kind footprint, ordered by bytes descending. */
19583
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19584
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19585
+ unaccountedRows: number().int(),
19586
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19587
+ unaccountedBytes: number().int()
19588
+ });
19545
19589
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19546
19590
  var EventPruneCountsSchema = object({
19547
19591
  motion: number().int(),
@@ -19745,6 +19789,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19745
19789
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19746
19790
  kind: "query",
19747
19791
  auth: "admin"
19792
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19793
+ kind: "query",
19794
+ auth: "admin"
19748
19795
  }), method(object({
19749
19796
  olderThanMs: number(),
19750
19797
  reason: OpsLogReasonSchema.optional()
@@ -21696,6 +21743,20 @@ method(object({
21696
21743
  error: string().optional()
21697
21744
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21698
21745
  providerId: string(),
21746
+ /**
21747
+ * The location this config is an UNSAVED edit of, when there is one.
21748
+ *
21749
+ * `listLocations` replaces every declared secret with the redaction
21750
+ * sentinel, so the edit modal's form state holds the sentinel for any
21751
+ * credential the operator did not retype — and posting that here
21752
+ * without a way to resolve it makes the provider try to authenticate
21753
+ * as `__camstack_redacted__` and report the operator's own working
21754
+ * password as wrong. Given this id, the orchestrator restores each
21755
+ * sentinel from the stored config (same rule as `upsertLocation`)
21756
+ * before dispatching. Omitted by the "Add location" wizard, where
21757
+ * every value was typed just now and nothing is stored yet.
21758
+ */
21759
+ locationId: string().optional(),
21699
21760
  config: record(string(), unknown())
21700
21761
  }), object({
21701
21762
  ok: boolean(),
@@ -32423,6 +32484,12 @@ Object.freeze({
32423
32484
  addonId: null,
32424
32485
  access: "view"
32425
32486
  },
32487
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
32488
+ capName: "pipeline-analytics",
32489
+ capScope: "device",
32490
+ addonId: null,
32491
+ access: "view"
32492
+ },
32426
32493
  "pipelineAnalytics.getEventStoreFootprint": {
32427
32494
  capName: "pipeline-analytics",
32428
32495
  capScope: "device",
@@ -36088,6 +36155,11 @@ Object.freeze({
36088
36155
  form: "single",
36089
36156
  optional: false
36090
36157
  }],
36158
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
36159
+ name: "deviceId",
36160
+ form: "single",
36161
+ optional: true
36162
+ }],
36091
36163
  "pipelineAnalytics.getGroup": [{
36092
36164
  name: "deviceId",
36093
36165
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.58",
3
+ "version": "1.2.59",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",