@camstack/addon-provider-onvif 1.2.46 → 1.2.47

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
@@ -18807,6 +18807,50 @@ var EventStoreFootprintSchema = object({
18807
18807
  totalBytes: number().int(),
18808
18808
  devices: array(EventStoreDeviceFootprintSchema).readonly()
18809
18809
  });
18810
+ /** Event-media footprint for one {@link MediaFileKind}. */
18811
+ var EventMediaKindFootprintSchema = object({
18812
+ kind: MediaFileKindEnum,
18813
+ /** Media rows of this kind. */
18814
+ rows: number().int(),
18815
+ /** Bytes on disk held by those rows. */
18816
+ bytes: number().int()
18817
+ });
18818
+ /**
18819
+ * The media footprint broken down by KIND — the axis a deletion decision
18820
+ * actually turns on.
18821
+ *
18822
+ * A byte total says how much there is; it cannot say what is safe to remove.
18823
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
18824
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
18825
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
18826
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
18827
+ * nothing else, so sizing a deletion means summing per kind.
18828
+ *
18829
+ * ## Why `unaccounted*` exists
18830
+ *
18831
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
18832
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
18833
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
18834
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
18835
+ * retired code path, or by a version that knew a kind this one does not) would
18836
+ * otherwise vanish from the total silently, and an operator would delete
18837
+ * against a denominator smaller than the disk.
18838
+ *
18839
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
18840
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
18841
+ */
18842
+ var EventMediaKindBreakdownSchema = object({
18843
+ /** Every media row in scope, from one unfiltered aggregate. */
18844
+ totalRows: number().int(),
18845
+ /** Every media byte in scope, from that same aggregate. */
18846
+ totalBytes: number().int(),
18847
+ /** Per-kind footprint, ordered by bytes descending. */
18848
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
18849
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
18850
+ unaccountedRows: number().int(),
18851
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
18852
+ unaccountedBytes: number().int()
18853
+ });
18810
18854
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
18811
18855
  var EventPruneCountsSchema = object({
18812
18856
  motion: number().int(),
@@ -19010,6 +19054,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19010
19054
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19011
19055
  kind: "query",
19012
19056
  auth: "admin"
19057
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19058
+ kind: "query",
19059
+ auth: "admin"
19013
19060
  }), method(object({
19014
19061
  olderThanMs: number(),
19015
19062
  reason: OpsLogReasonSchema.optional()
@@ -21065,6 +21112,20 @@ method(object({
21065
21112
  error: string().optional()
21066
21113
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21067
21114
  providerId: string(),
21115
+ /**
21116
+ * The location this config is an UNSAVED edit of, when there is one.
21117
+ *
21118
+ * `listLocations` replaces every declared secret with the redaction
21119
+ * sentinel, so the edit modal's form state holds the sentinel for any
21120
+ * credential the operator did not retype — and posting that here
21121
+ * without a way to resolve it makes the provider try to authenticate
21122
+ * as `__camstack_redacted__` and report the operator's own working
21123
+ * password as wrong. Given this id, the orchestrator restores each
21124
+ * sentinel from the stored config (same rule as `upsertLocation`)
21125
+ * before dispatching. Omitted by the "Add location" wizard, where
21126
+ * every value was typed just now and nothing is stored yet.
21127
+ */
21128
+ locationId: string().optional(),
21068
21129
  config: record(string(), unknown())
21069
21130
  }), object({
21070
21131
  ok: boolean(),
@@ -32171,6 +32232,12 @@ Object.freeze({
32171
32232
  addonId: null,
32172
32233
  access: "view"
32173
32234
  },
32235
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
32236
+ capName: "pipeline-analytics",
32237
+ capScope: "device",
32238
+ addonId: null,
32239
+ access: "view"
32240
+ },
32174
32241
  "pipelineAnalytics.getEventStoreFootprint": {
32175
32242
  capName: "pipeline-analytics",
32176
32243
  capScope: "device",
@@ -35836,6 +35903,11 @@ Object.freeze({
35836
35903
  form: "single",
35837
35904
  optional: false
35838
35905
  }],
35906
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
35907
+ name: "deviceId",
35908
+ form: "single",
35909
+ optional: true
35910
+ }],
35839
35911
  "pipelineAnalytics.getGroup": [{
35840
35912
  name: "deviceId",
35841
35913
  form: "single",
package/dist/addon.mjs CHANGED
@@ -18808,6 +18808,50 @@ var EventStoreFootprintSchema = object({
18808
18808
  totalBytes: number().int(),
18809
18809
  devices: array(EventStoreDeviceFootprintSchema).readonly()
18810
18810
  });
18811
+ /** Event-media footprint for one {@link MediaFileKind}. */
18812
+ var EventMediaKindFootprintSchema = object({
18813
+ kind: MediaFileKindEnum,
18814
+ /** Media rows of this kind. */
18815
+ rows: number().int(),
18816
+ /** Bytes on disk held by those rows. */
18817
+ bytes: number().int()
18818
+ });
18819
+ /**
18820
+ * The media footprint broken down by KIND — the axis a deletion decision
18821
+ * actually turns on.
18822
+ *
18823
+ * A byte total says how much there is; it cannot say what is safe to remove.
18824
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
18825
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
18826
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
18827
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
18828
+ * nothing else, so sizing a deletion means summing per kind.
18829
+ *
18830
+ * ## Why `unaccounted*` exists
18831
+ *
18832
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
18833
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
18834
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
18835
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
18836
+ * retired code path, or by a version that knew a kind this one does not) would
18837
+ * otherwise vanish from the total silently, and an operator would delete
18838
+ * against a denominator smaller than the disk.
18839
+ *
18840
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
18841
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
18842
+ */
18843
+ var EventMediaKindBreakdownSchema = object({
18844
+ /** Every media row in scope, from one unfiltered aggregate. */
18845
+ totalRows: number().int(),
18846
+ /** Every media byte in scope, from that same aggregate. */
18847
+ totalBytes: number().int(),
18848
+ /** Per-kind footprint, ordered by bytes descending. */
18849
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
18850
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
18851
+ unaccountedRows: number().int(),
18852
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
18853
+ unaccountedBytes: number().int()
18854
+ });
18811
18855
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
18812
18856
  var EventPruneCountsSchema = object({
18813
18857
  motion: number().int(),
@@ -19011,6 +19055,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19011
19055
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19012
19056
  kind: "query",
19013
19057
  auth: "admin"
19058
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19059
+ kind: "query",
19060
+ auth: "admin"
19014
19061
  }), method(object({
19015
19062
  olderThanMs: number(),
19016
19063
  reason: OpsLogReasonSchema.optional()
@@ -21066,6 +21113,20 @@ method(object({
21066
21113
  error: string().optional()
21067
21114
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21068
21115
  providerId: string(),
21116
+ /**
21117
+ * The location this config is an UNSAVED edit of, when there is one.
21118
+ *
21119
+ * `listLocations` replaces every declared secret with the redaction
21120
+ * sentinel, so the edit modal's form state holds the sentinel for any
21121
+ * credential the operator did not retype — and posting that here
21122
+ * without a way to resolve it makes the provider try to authenticate
21123
+ * as `__camstack_redacted__` and report the operator's own working
21124
+ * password as wrong. Given this id, the orchestrator restores each
21125
+ * sentinel from the stored config (same rule as `upsertLocation`)
21126
+ * before dispatching. Omitted by the "Add location" wizard, where
21127
+ * every value was typed just now and nothing is stored yet.
21128
+ */
21129
+ locationId: string().optional(),
21069
21130
  config: record(string(), unknown())
21070
21131
  }), object({
21071
21132
  ok: boolean(),
@@ -32172,6 +32233,12 @@ Object.freeze({
32172
32233
  addonId: null,
32173
32234
  access: "view"
32174
32235
  },
32236
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
32237
+ capName: "pipeline-analytics",
32238
+ capScope: "device",
32239
+ addonId: null,
32240
+ access: "view"
32241
+ },
32175
32242
  "pipelineAnalytics.getEventStoreFootprint": {
32176
32243
  capName: "pipeline-analytics",
32177
32244
  capScope: "device",
@@ -35837,6 +35904,11 @@ Object.freeze({
35837
35904
  form: "single",
35838
35905
  optional: false
35839
35906
  }],
35907
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
35908
+ name: "deviceId",
35909
+ form: "single",
35910
+ optional: true
35911
+ }],
35840
35912
  "pipelineAnalytics.getGroup": [{
35841
35913
  name: "deviceId",
35842
35914
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.46",
3
+ "version": "1.2.47",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",