@camstack/addon-provider-hikvision 1.2.55 → 1.2.56

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
@@ -19402,6 +19402,50 @@ var EventStoreFootprintSchema = object({
19402
19402
  totalBytes: number().int(),
19403
19403
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19404
19404
  });
19405
+ /** Event-media footprint for one {@link MediaFileKind}. */
19406
+ var EventMediaKindFootprintSchema = object({
19407
+ kind: MediaFileKindEnum,
19408
+ /** Media rows of this kind. */
19409
+ rows: number().int(),
19410
+ /** Bytes on disk held by those rows. */
19411
+ bytes: number().int()
19412
+ });
19413
+ /**
19414
+ * The media footprint broken down by KIND — the axis a deletion decision
19415
+ * actually turns on.
19416
+ *
19417
+ * A byte total says how much there is; it cannot say what is safe to remove.
19418
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19419
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19420
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19421
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19422
+ * nothing else, so sizing a deletion means summing per kind.
19423
+ *
19424
+ * ## Why `unaccounted*` exists
19425
+ *
19426
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19427
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19428
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19429
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19430
+ * retired code path, or by a version that knew a kind this one does not) would
19431
+ * otherwise vanish from the total silently, and an operator would delete
19432
+ * against a denominator smaller than the disk.
19433
+ *
19434
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19435
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19436
+ */
19437
+ var EventMediaKindBreakdownSchema = object({
19438
+ /** Every media row in scope, from one unfiltered aggregate. */
19439
+ totalRows: number().int(),
19440
+ /** Every media byte in scope, from that same aggregate. */
19441
+ totalBytes: number().int(),
19442
+ /** Per-kind footprint, ordered by bytes descending. */
19443
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19444
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19445
+ unaccountedRows: number().int(),
19446
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19447
+ unaccountedBytes: number().int()
19448
+ });
19405
19449
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19406
19450
  var EventPruneCountsSchema = object({
19407
19451
  motion: number().int(),
@@ -19605,6 +19649,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19605
19649
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19606
19650
  kind: "query",
19607
19651
  auth: "admin"
19652
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19653
+ kind: "query",
19654
+ auth: "admin"
19608
19655
  }), method(object({
19609
19656
  olderThanMs: number(),
19610
19657
  reason: OpsLogReasonSchema.optional()
@@ -21660,6 +21707,20 @@ method(object({
21660
21707
  error: string().optional()
21661
21708
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21662
21709
  providerId: string(),
21710
+ /**
21711
+ * The location this config is an UNSAVED edit of, when there is one.
21712
+ *
21713
+ * `listLocations` replaces every declared secret with the redaction
21714
+ * sentinel, so the edit modal's form state holds the sentinel for any
21715
+ * credential the operator did not retype — and posting that here
21716
+ * without a way to resolve it makes the provider try to authenticate
21717
+ * as `__camstack_redacted__` and report the operator's own working
21718
+ * password as wrong. Given this id, the orchestrator restores each
21719
+ * sentinel from the stored config (same rule as `upsertLocation`)
21720
+ * before dispatching. Omitted by the "Add location" wizard, where
21721
+ * every value was typed just now and nothing is stored yet.
21722
+ */
21723
+ locationId: string().optional(),
21663
21724
  config: record(string(), unknown())
21664
21725
  }), object({
21665
21726
  ok: boolean(),
@@ -36262,6 +36323,12 @@ Object.freeze({
36262
36323
  addonId: null,
36263
36324
  access: "view"
36264
36325
  },
36326
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
36327
+ capName: "pipeline-analytics",
36328
+ capScope: "device",
36329
+ addonId: null,
36330
+ access: "view"
36331
+ },
36265
36332
  "pipelineAnalytics.getEventStoreFootprint": {
36266
36333
  capName: "pipeline-analytics",
36267
36334
  capScope: "device",
@@ -39927,6 +39994,11 @@ Object.freeze({
39927
39994
  form: "single",
39928
39995
  optional: false
39929
39996
  }],
39997
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39998
+ name: "deviceId",
39999
+ form: "single",
40000
+ optional: true
40001
+ }],
39930
40002
  "pipelineAnalytics.getGroup": [{
39931
40003
  name: "deviceId",
39932
40004
  form: "single",
package/dist/addon.mjs CHANGED
@@ -19403,6 +19403,50 @@ var EventStoreFootprintSchema = object({
19403
19403
  totalBytes: number().int(),
19404
19404
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19405
19405
  });
19406
+ /** Event-media footprint for one {@link MediaFileKind}. */
19407
+ var EventMediaKindFootprintSchema = object({
19408
+ kind: MediaFileKindEnum,
19409
+ /** Media rows of this kind. */
19410
+ rows: number().int(),
19411
+ /** Bytes on disk held by those rows. */
19412
+ bytes: number().int()
19413
+ });
19414
+ /**
19415
+ * The media footprint broken down by KIND — the axis a deletion decision
19416
+ * actually turns on.
19417
+ *
19418
+ * A byte total says how much there is; it cannot say what is safe to remove.
19419
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19420
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19421
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19422
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19423
+ * nothing else, so sizing a deletion means summing per kind.
19424
+ *
19425
+ * ## Why `unaccounted*` exists
19426
+ *
19427
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19428
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19429
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19430
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19431
+ * retired code path, or by a version that knew a kind this one does not) would
19432
+ * otherwise vanish from the total silently, and an operator would delete
19433
+ * against a denominator smaller than the disk.
19434
+ *
19435
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19436
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19437
+ */
19438
+ var EventMediaKindBreakdownSchema = object({
19439
+ /** Every media row in scope, from one unfiltered aggregate. */
19440
+ totalRows: number().int(),
19441
+ /** Every media byte in scope, from that same aggregate. */
19442
+ totalBytes: number().int(),
19443
+ /** Per-kind footprint, ordered by bytes descending. */
19444
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19445
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19446
+ unaccountedRows: number().int(),
19447
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19448
+ unaccountedBytes: number().int()
19449
+ });
19406
19450
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19407
19451
  var EventPruneCountsSchema = object({
19408
19452
  motion: number().int(),
@@ -19606,6 +19650,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19606
19650
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19607
19651
  kind: "query",
19608
19652
  auth: "admin"
19653
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19654
+ kind: "query",
19655
+ auth: "admin"
19609
19656
  }), method(object({
19610
19657
  olderThanMs: number(),
19611
19658
  reason: OpsLogReasonSchema.optional()
@@ -21661,6 +21708,20 @@ method(object({
21661
21708
  error: string().optional()
21662
21709
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21663
21710
  providerId: string(),
21711
+ /**
21712
+ * The location this config is an UNSAVED edit of, when there is one.
21713
+ *
21714
+ * `listLocations` replaces every declared secret with the redaction
21715
+ * sentinel, so the edit modal's form state holds the sentinel for any
21716
+ * credential the operator did not retype — and posting that here
21717
+ * without a way to resolve it makes the provider try to authenticate
21718
+ * as `__camstack_redacted__` and report the operator's own working
21719
+ * password as wrong. Given this id, the orchestrator restores each
21720
+ * sentinel from the stored config (same rule as `upsertLocation`)
21721
+ * before dispatching. Omitted by the "Add location" wizard, where
21722
+ * every value was typed just now and nothing is stored yet.
21723
+ */
21724
+ locationId: string().optional(),
21664
21725
  config: record(string(), unknown())
21665
21726
  }), object({
21666
21727
  ok: boolean(),
@@ -36263,6 +36324,12 @@ Object.freeze({
36263
36324
  addonId: null,
36264
36325
  access: "view"
36265
36326
  },
36327
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
36328
+ capName: "pipeline-analytics",
36329
+ capScope: "device",
36330
+ addonId: null,
36331
+ access: "view"
36332
+ },
36266
36333
  "pipelineAnalytics.getEventStoreFootprint": {
36267
36334
  capName: "pipeline-analytics",
36268
36335
  capScope: "device",
@@ -39928,6 +39995,11 @@ Object.freeze({
39928
39995
  form: "single",
39929
39996
  optional: false
39930
39997
  }],
39998
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39999
+ name: "deviceId",
40000
+ form: "single",
40001
+ optional: true
40002
+ }],
39931
40003
  "pipelineAnalytics.getGroup": [{
39932
40004
  name: "deviceId",
39933
40005
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.55",
3
+ "version": "1.2.56",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",