@camstack/addon-provider-rtsp 1.2.47 → 1.2.48

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
@@ -19151,6 +19151,50 @@ var EventStoreFootprintSchema = object({
19151
19151
  totalBytes: number().int(),
19152
19152
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19153
19153
  });
19154
+ /** Event-media footprint for one {@link MediaFileKind}. */
19155
+ var EventMediaKindFootprintSchema = object({
19156
+ kind: MediaFileKindEnum,
19157
+ /** Media rows of this kind. */
19158
+ rows: number().int(),
19159
+ /** Bytes on disk held by those rows. */
19160
+ bytes: number().int()
19161
+ });
19162
+ /**
19163
+ * The media footprint broken down by KIND — the axis a deletion decision
19164
+ * actually turns on.
19165
+ *
19166
+ * A byte total says how much there is; it cannot say what is safe to remove.
19167
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19168
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19169
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19170
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19171
+ * nothing else, so sizing a deletion means summing per kind.
19172
+ *
19173
+ * ## Why `unaccounted*` exists
19174
+ *
19175
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19176
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19177
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19178
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19179
+ * retired code path, or by a version that knew a kind this one does not) would
19180
+ * otherwise vanish from the total silently, and an operator would delete
19181
+ * against a denominator smaller than the disk.
19182
+ *
19183
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19184
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19185
+ */
19186
+ var EventMediaKindBreakdownSchema = object({
19187
+ /** Every media row in scope, from one unfiltered aggregate. */
19188
+ totalRows: number().int(),
19189
+ /** Every media byte in scope, from that same aggregate. */
19190
+ totalBytes: number().int(),
19191
+ /** Per-kind footprint, ordered by bytes descending. */
19192
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19193
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19194
+ unaccountedRows: number().int(),
19195
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19196
+ unaccountedBytes: number().int()
19197
+ });
19154
19198
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19155
19199
  var EventPruneCountsSchema = object({
19156
19200
  motion: number().int(),
@@ -19354,6 +19398,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19354
19398
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19355
19399
  kind: "query",
19356
19400
  auth: "admin"
19401
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19402
+ kind: "query",
19403
+ auth: "admin"
19357
19404
  }), method(object({
19358
19405
  olderThanMs: number(),
19359
19406
  reason: OpsLogReasonSchema.optional()
@@ -21409,6 +21456,20 @@ method(object({
21409
21456
  error: string().optional()
21410
21457
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21411
21458
  providerId: string(),
21459
+ /**
21460
+ * The location this config is an UNSAVED edit of, when there is one.
21461
+ *
21462
+ * `listLocations` replaces every declared secret with the redaction
21463
+ * sentinel, so the edit modal's form state holds the sentinel for any
21464
+ * credential the operator did not retype — and posting that here
21465
+ * without a way to resolve it makes the provider try to authenticate
21466
+ * as `__camstack_redacted__` and report the operator's own working
21467
+ * password as wrong. Given this id, the orchestrator restores each
21468
+ * sentinel from the stored config (same rule as `upsertLocation`)
21469
+ * before dispatching. Omitted by the "Add location" wizard, where
21470
+ * every value was typed just now and nothing is stored yet.
21471
+ */
21472
+ locationId: string().optional(),
21412
21473
  config: record(string(), unknown())
21413
21474
  }), object({
21414
21475
  ok: boolean(),
@@ -35521,6 +35582,12 @@ Object.freeze({
35521
35582
  addonId: null,
35522
35583
  access: "view"
35523
35584
  },
35585
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
35586
+ capName: "pipeline-analytics",
35587
+ capScope: "device",
35588
+ addonId: null,
35589
+ access: "view"
35590
+ },
35524
35591
  "pipelineAnalytics.getEventStoreFootprint": {
35525
35592
  capName: "pipeline-analytics",
35526
35593
  capScope: "device",
@@ -39186,6 +39253,11 @@ Object.freeze({
39186
39253
  form: "single",
39187
39254
  optional: false
39188
39255
  }],
39256
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39257
+ name: "deviceId",
39258
+ form: "single",
39259
+ optional: true
39260
+ }],
39189
39261
  "pipelineAnalytics.getGroup": [{
39190
39262
  name: "deviceId",
39191
39263
  form: "single",
package/dist/addon.mjs CHANGED
@@ -19127,6 +19127,50 @@ var EventStoreFootprintSchema = object({
19127
19127
  totalBytes: number().int(),
19128
19128
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19129
19129
  });
19130
+ /** Event-media footprint for one {@link MediaFileKind}. */
19131
+ var EventMediaKindFootprintSchema = object({
19132
+ kind: MediaFileKindEnum,
19133
+ /** Media rows of this kind. */
19134
+ rows: number().int(),
19135
+ /** Bytes on disk held by those rows. */
19136
+ bytes: number().int()
19137
+ });
19138
+ /**
19139
+ * The media footprint broken down by KIND — the axis a deletion decision
19140
+ * actually turns on.
19141
+ *
19142
+ * A byte total says how much there is; it cannot say what is safe to remove.
19143
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19144
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19145
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19146
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19147
+ * nothing else, so sizing a deletion means summing per kind.
19148
+ *
19149
+ * ## Why `unaccounted*` exists
19150
+ *
19151
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19152
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19153
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19154
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19155
+ * retired code path, or by a version that knew a kind this one does not) would
19156
+ * otherwise vanish from the total silently, and an operator would delete
19157
+ * against a denominator smaller than the disk.
19158
+ *
19159
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19160
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19161
+ */
19162
+ var EventMediaKindBreakdownSchema = object({
19163
+ /** Every media row in scope, from one unfiltered aggregate. */
19164
+ totalRows: number().int(),
19165
+ /** Every media byte in scope, from that same aggregate. */
19166
+ totalBytes: number().int(),
19167
+ /** Per-kind footprint, ordered by bytes descending. */
19168
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19169
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19170
+ unaccountedRows: number().int(),
19171
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19172
+ unaccountedBytes: number().int()
19173
+ });
19130
19174
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19131
19175
  var EventPruneCountsSchema = object({
19132
19176
  motion: number().int(),
@@ -19330,6 +19374,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19330
19374
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19331
19375
  kind: "query",
19332
19376
  auth: "admin"
19377
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19378
+ kind: "query",
19379
+ auth: "admin"
19333
19380
  }), method(object({
19334
19381
  olderThanMs: number(),
19335
19382
  reason: OpsLogReasonSchema.optional()
@@ -21385,6 +21432,20 @@ method(object({
21385
21432
  error: string().optional()
21386
21433
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21387
21434
  providerId: string(),
21435
+ /**
21436
+ * The location this config is an UNSAVED edit of, when there is one.
21437
+ *
21438
+ * `listLocations` replaces every declared secret with the redaction
21439
+ * sentinel, so the edit modal's form state holds the sentinel for any
21440
+ * credential the operator did not retype — and posting that here
21441
+ * without a way to resolve it makes the provider try to authenticate
21442
+ * as `__camstack_redacted__` and report the operator's own working
21443
+ * password as wrong. Given this id, the orchestrator restores each
21444
+ * sentinel from the stored config (same rule as `upsertLocation`)
21445
+ * before dispatching. Omitted by the "Add location" wizard, where
21446
+ * every value was typed just now and nothing is stored yet.
21447
+ */
21448
+ locationId: string().optional(),
21388
21449
  config: record(string(), unknown())
21389
21450
  }), object({
21390
21451
  ok: boolean(),
@@ -35497,6 +35558,12 @@ Object.freeze({
35497
35558
  addonId: null,
35498
35559
  access: "view"
35499
35560
  },
35561
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
35562
+ capName: "pipeline-analytics",
35563
+ capScope: "device",
35564
+ addonId: null,
35565
+ access: "view"
35566
+ },
35500
35567
  "pipelineAnalytics.getEventStoreFootprint": {
35501
35568
  capName: "pipeline-analytics",
35502
35569
  capScope: "device",
@@ -39162,6 +39229,11 @@ Object.freeze({
39162
39229
  form: "single",
39163
39230
  optional: false
39164
39231
  }],
39232
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39233
+ name: "deviceId",
39234
+ form: "single",
39235
+ optional: true
39236
+ }],
39165
39237
  "pipelineAnalytics.getGroup": [{
39166
39238
  name: "deviceId",
39167
39239
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.47",
3
+ "version": "1.2.48",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",