@camstack/addon-provider-amcrest 0.2.48 → 0.2.49

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
@@ -19088,6 +19088,50 @@ var EventStoreFootprintSchema = object({
19088
19088
  totalBytes: number().int(),
19089
19089
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19090
19090
  });
19091
+ /** Event-media footprint for one {@link MediaFileKind}. */
19092
+ var EventMediaKindFootprintSchema = object({
19093
+ kind: MediaFileKindEnum,
19094
+ /** Media rows of this kind. */
19095
+ rows: number().int(),
19096
+ /** Bytes on disk held by those rows. */
19097
+ bytes: number().int()
19098
+ });
19099
+ /**
19100
+ * The media footprint broken down by KIND — the axis a deletion decision
19101
+ * actually turns on.
19102
+ *
19103
+ * A byte total says how much there is; it cannot say what is safe to remove.
19104
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19105
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19106
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19107
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19108
+ * nothing else, so sizing a deletion means summing per kind.
19109
+ *
19110
+ * ## Why `unaccounted*` exists
19111
+ *
19112
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19113
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19114
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19115
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19116
+ * retired code path, or by a version that knew a kind this one does not) would
19117
+ * otherwise vanish from the total silently, and an operator would delete
19118
+ * against a denominator smaller than the disk.
19119
+ *
19120
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19121
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19122
+ */
19123
+ var EventMediaKindBreakdownSchema = object({
19124
+ /** Every media row in scope, from one unfiltered aggregate. */
19125
+ totalRows: number().int(),
19126
+ /** Every media byte in scope, from that same aggregate. */
19127
+ totalBytes: number().int(),
19128
+ /** Per-kind footprint, ordered by bytes descending. */
19129
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19130
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19131
+ unaccountedRows: number().int(),
19132
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19133
+ unaccountedBytes: number().int()
19134
+ });
19091
19135
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19092
19136
  var EventPruneCountsSchema = object({
19093
19137
  motion: number().int(),
@@ -19291,6 +19335,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19291
19335
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19292
19336
  kind: "query",
19293
19337
  auth: "admin"
19338
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19339
+ kind: "query",
19340
+ auth: "admin"
19294
19341
  }), method(object({
19295
19342
  olderThanMs: number(),
19296
19343
  reason: OpsLogReasonSchema.optional()
@@ -21346,6 +21393,20 @@ method(object({
21346
21393
  error: string().optional()
21347
21394
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21348
21395
  providerId: string(),
21396
+ /**
21397
+ * The location this config is an UNSAVED edit of, when there is one.
21398
+ *
21399
+ * `listLocations` replaces every declared secret with the redaction
21400
+ * sentinel, so the edit modal's form state holds the sentinel for any
21401
+ * credential the operator did not retype — and posting that here
21402
+ * without a way to resolve it makes the provider try to authenticate
21403
+ * as `__camstack_redacted__` and report the operator's own working
21404
+ * password as wrong. Given this id, the orchestrator restores each
21405
+ * sentinel from the stored config (same rule as `upsertLocation`)
21406
+ * before dispatching. Omitted by the "Add location" wizard, where
21407
+ * every value was typed just now and nothing is stored yet.
21408
+ */
21409
+ locationId: string().optional(),
21349
21410
  config: record(string(), unknown())
21350
21411
  }), object({
21351
21412
  ok: boolean(),
@@ -35876,6 +35937,12 @@ Object.freeze({
35876
35937
  addonId: null,
35877
35938
  access: "view"
35878
35939
  },
35940
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
35941
+ capName: "pipeline-analytics",
35942
+ capScope: "device",
35943
+ addonId: null,
35944
+ access: "view"
35945
+ },
35879
35946
  "pipelineAnalytics.getEventStoreFootprint": {
35880
35947
  capName: "pipeline-analytics",
35881
35948
  capScope: "device",
@@ -39541,6 +39608,11 @@ Object.freeze({
39541
39608
  form: "single",
39542
39609
  optional: false
39543
39610
  }],
39611
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39612
+ name: "deviceId",
39613
+ form: "single",
39614
+ optional: true
39615
+ }],
39544
39616
  "pipelineAnalytics.getGroup": [{
39545
39617
  name: "deviceId",
39546
39618
  form: "single",
package/dist/addon.mjs CHANGED
@@ -19089,6 +19089,50 @@ var EventStoreFootprintSchema = object({
19089
19089
  totalBytes: number().int(),
19090
19090
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19091
19091
  });
19092
+ /** Event-media footprint for one {@link MediaFileKind}. */
19093
+ var EventMediaKindFootprintSchema = object({
19094
+ kind: MediaFileKindEnum,
19095
+ /** Media rows of this kind. */
19096
+ rows: number().int(),
19097
+ /** Bytes on disk held by those rows. */
19098
+ bytes: number().int()
19099
+ });
19100
+ /**
19101
+ * The media footprint broken down by KIND — the axis a deletion decision
19102
+ * actually turns on.
19103
+ *
19104
+ * A byte total says how much there is; it cannot say what is safe to remove.
19105
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19106
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19107
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19108
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19109
+ * nothing else, so sizing a deletion means summing per kind.
19110
+ *
19111
+ * ## Why `unaccounted*` exists
19112
+ *
19113
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19114
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19115
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19116
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19117
+ * retired code path, or by a version that knew a kind this one does not) would
19118
+ * otherwise vanish from the total silently, and an operator would delete
19119
+ * against a denominator smaller than the disk.
19120
+ *
19121
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19122
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19123
+ */
19124
+ var EventMediaKindBreakdownSchema = object({
19125
+ /** Every media row in scope, from one unfiltered aggregate. */
19126
+ totalRows: number().int(),
19127
+ /** Every media byte in scope, from that same aggregate. */
19128
+ totalBytes: number().int(),
19129
+ /** Per-kind footprint, ordered by bytes descending. */
19130
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19131
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19132
+ unaccountedRows: number().int(),
19133
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19134
+ unaccountedBytes: number().int()
19135
+ });
19092
19136
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19093
19137
  var EventPruneCountsSchema = object({
19094
19138
  motion: number().int(),
@@ -19292,6 +19336,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19292
19336
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19293
19337
  kind: "query",
19294
19338
  auth: "admin"
19339
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19340
+ kind: "query",
19341
+ auth: "admin"
19295
19342
  }), method(object({
19296
19343
  olderThanMs: number(),
19297
19344
  reason: OpsLogReasonSchema.optional()
@@ -21347,6 +21394,20 @@ method(object({
21347
21394
  error: string().optional()
21348
21395
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21349
21396
  providerId: string(),
21397
+ /**
21398
+ * The location this config is an UNSAVED edit of, when there is one.
21399
+ *
21400
+ * `listLocations` replaces every declared secret with the redaction
21401
+ * sentinel, so the edit modal's form state holds the sentinel for any
21402
+ * credential the operator did not retype — and posting that here
21403
+ * without a way to resolve it makes the provider try to authenticate
21404
+ * as `__camstack_redacted__` and report the operator's own working
21405
+ * password as wrong. Given this id, the orchestrator restores each
21406
+ * sentinel from the stored config (same rule as `upsertLocation`)
21407
+ * before dispatching. Omitted by the "Add location" wizard, where
21408
+ * every value was typed just now and nothing is stored yet.
21409
+ */
21410
+ locationId: string().optional(),
21350
21411
  config: record(string(), unknown())
21351
21412
  }), object({
21352
21413
  ok: boolean(),
@@ -35877,6 +35938,12 @@ Object.freeze({
35877
35938
  addonId: null,
35878
35939
  access: "view"
35879
35940
  },
35941
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
35942
+ capName: "pipeline-analytics",
35943
+ capScope: "device",
35944
+ addonId: null,
35945
+ access: "view"
35946
+ },
35880
35947
  "pipelineAnalytics.getEventStoreFootprint": {
35881
35948
  capName: "pipeline-analytics",
35882
35949
  capScope: "device",
@@ -39542,6 +39609,11 @@ Object.freeze({
39542
39609
  form: "single",
39543
39610
  optional: false
39544
39611
  }],
39612
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39613
+ name: "deviceId",
39614
+ form: "single",
39615
+ optional: true
39616
+ }],
39545
39617
  "pipelineAnalytics.getGroup": [{
39546
39618
  name: "deviceId",
39547
39619
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.48",
3
+ "version": "0.2.49",
4
4
  "description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
5
5
  "keywords": [
6
6
  "camstack",