@camstack/addon-provider-wyze 0.2.51 → 0.2.52

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
@@ -19144,6 +19144,50 @@ var EventStoreFootprintSchema = object({
19144
19144
  totalBytes: number().int(),
19145
19145
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19146
19146
  });
19147
+ /** Event-media footprint for one {@link MediaFileKind}. */
19148
+ var EventMediaKindFootprintSchema = object({
19149
+ kind: MediaFileKindEnum,
19150
+ /** Media rows of this kind. */
19151
+ rows: number().int(),
19152
+ /** Bytes on disk held by those rows. */
19153
+ bytes: number().int()
19154
+ });
19155
+ /**
19156
+ * The media footprint broken down by KIND — the axis a deletion decision
19157
+ * actually turns on.
19158
+ *
19159
+ * A byte total says how much there is; it cannot say what is safe to remove.
19160
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19161
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19162
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19163
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19164
+ * nothing else, so sizing a deletion means summing per kind.
19165
+ *
19166
+ * ## Why `unaccounted*` exists
19167
+ *
19168
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19169
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19170
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19171
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19172
+ * retired code path, or by a version that knew a kind this one does not) would
19173
+ * otherwise vanish from the total silently, and an operator would delete
19174
+ * against a denominator smaller than the disk.
19175
+ *
19176
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19177
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19178
+ */
19179
+ var EventMediaKindBreakdownSchema = object({
19180
+ /** Every media row in scope, from one unfiltered aggregate. */
19181
+ totalRows: number().int(),
19182
+ /** Every media byte in scope, from that same aggregate. */
19183
+ totalBytes: number().int(),
19184
+ /** Per-kind footprint, ordered by bytes descending. */
19185
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19186
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19187
+ unaccountedRows: number().int(),
19188
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19189
+ unaccountedBytes: number().int()
19190
+ });
19147
19191
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19148
19192
  var EventPruneCountsSchema = object({
19149
19193
  motion: number().int(),
@@ -19347,6 +19391,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19347
19391
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19348
19392
  kind: "query",
19349
19393
  auth: "admin"
19394
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19395
+ kind: "query",
19396
+ auth: "admin"
19350
19397
  }), method(object({
19351
19398
  olderThanMs: number(),
19352
19399
  reason: OpsLogReasonSchema.optional()
@@ -21402,6 +21449,20 @@ method(object({
21402
21449
  error: string().optional()
21403
21450
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21404
21451
  providerId: string(),
21452
+ /**
21453
+ * The location this config is an UNSAVED edit of, when there is one.
21454
+ *
21455
+ * `listLocations` replaces every declared secret with the redaction
21456
+ * sentinel, so the edit modal's form state holds the sentinel for any
21457
+ * credential the operator did not retype — and posting that here
21458
+ * without a way to resolve it makes the provider try to authenticate
21459
+ * as `__camstack_redacted__` and report the operator's own working
21460
+ * password as wrong. Given this id, the orchestrator restores each
21461
+ * sentinel from the stored config (same rule as `upsertLocation`)
21462
+ * before dispatching. Omitted by the "Add location" wizard, where
21463
+ * every value was typed just now and nothing is stored yet.
21464
+ */
21465
+ locationId: string().optional(),
21405
21466
  config: record(string(), unknown())
21406
21467
  }), object({
21407
21468
  ok: boolean(),
@@ -35448,6 +35509,12 @@ Object.freeze({
35448
35509
  addonId: null,
35449
35510
  access: "view"
35450
35511
  },
35512
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
35513
+ capName: "pipeline-analytics",
35514
+ capScope: "device",
35515
+ addonId: null,
35516
+ access: "view"
35517
+ },
35451
35518
  "pipelineAnalytics.getEventStoreFootprint": {
35452
35519
  capName: "pipeline-analytics",
35453
35520
  capScope: "device",
@@ -39113,6 +39180,11 @@ Object.freeze({
39113
39180
  form: "single",
39114
39181
  optional: false
39115
39182
  }],
39183
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39184
+ name: "deviceId",
39185
+ form: "single",
39186
+ optional: true
39187
+ }],
39116
39188
  "pipelineAnalytics.getGroup": [{
39117
39189
  name: "deviceId",
39118
39190
  form: "single",
package/dist/addon.mjs CHANGED
@@ -19123,6 +19123,50 @@ var EventStoreFootprintSchema = object({
19123
19123
  totalBytes: number().int(),
19124
19124
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19125
19125
  });
19126
+ /** Event-media footprint for one {@link MediaFileKind}. */
19127
+ var EventMediaKindFootprintSchema = object({
19128
+ kind: MediaFileKindEnum,
19129
+ /** Media rows of this kind. */
19130
+ rows: number().int(),
19131
+ /** Bytes on disk held by those rows. */
19132
+ bytes: number().int()
19133
+ });
19134
+ /**
19135
+ * The media footprint broken down by KIND — the axis a deletion decision
19136
+ * actually turns on.
19137
+ *
19138
+ * A byte total says how much there is; it cannot say what is safe to remove.
19139
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19140
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19141
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19142
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19143
+ * nothing else, so sizing a deletion means summing per kind.
19144
+ *
19145
+ * ## Why `unaccounted*` exists
19146
+ *
19147
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19148
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19149
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19150
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19151
+ * retired code path, or by a version that knew a kind this one does not) would
19152
+ * otherwise vanish from the total silently, and an operator would delete
19153
+ * against a denominator smaller than the disk.
19154
+ *
19155
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19156
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19157
+ */
19158
+ var EventMediaKindBreakdownSchema = object({
19159
+ /** Every media row in scope, from one unfiltered aggregate. */
19160
+ totalRows: number().int(),
19161
+ /** Every media byte in scope, from that same aggregate. */
19162
+ totalBytes: number().int(),
19163
+ /** Per-kind footprint, ordered by bytes descending. */
19164
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19165
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19166
+ unaccountedRows: number().int(),
19167
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19168
+ unaccountedBytes: number().int()
19169
+ });
19126
19170
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19127
19171
  var EventPruneCountsSchema = object({
19128
19172
  motion: number().int(),
@@ -19326,6 +19370,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19326
19370
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19327
19371
  kind: "query",
19328
19372
  auth: "admin"
19373
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19374
+ kind: "query",
19375
+ auth: "admin"
19329
19376
  }), method(object({
19330
19377
  olderThanMs: number(),
19331
19378
  reason: OpsLogReasonSchema.optional()
@@ -21381,6 +21428,20 @@ method(object({
21381
21428
  error: string().optional()
21382
21429
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21383
21430
  providerId: string(),
21431
+ /**
21432
+ * The location this config is an UNSAVED edit of, when there is one.
21433
+ *
21434
+ * `listLocations` replaces every declared secret with the redaction
21435
+ * sentinel, so the edit modal's form state holds the sentinel for any
21436
+ * credential the operator did not retype — and posting that here
21437
+ * without a way to resolve it makes the provider try to authenticate
21438
+ * as `__camstack_redacted__` and report the operator's own working
21439
+ * password as wrong. Given this id, the orchestrator restores each
21440
+ * sentinel from the stored config (same rule as `upsertLocation`)
21441
+ * before dispatching. Omitted by the "Add location" wizard, where
21442
+ * every value was typed just now and nothing is stored yet.
21443
+ */
21444
+ locationId: string().optional(),
21384
21445
  config: record(string(), unknown())
21385
21446
  }), object({
21386
21447
  ok: boolean(),
@@ -35427,6 +35488,12 @@ Object.freeze({
35427
35488
  addonId: null,
35428
35489
  access: "view"
35429
35490
  },
35491
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
35492
+ capName: "pipeline-analytics",
35493
+ capScope: "device",
35494
+ addonId: null,
35495
+ access: "view"
35496
+ },
35430
35497
  "pipelineAnalytics.getEventStoreFootprint": {
35431
35498
  capName: "pipeline-analytics",
35432
35499
  capScope: "device",
@@ -39092,6 +39159,11 @@ Object.freeze({
39092
39159
  form: "single",
39093
39160
  optional: false
39094
39161
  }],
39162
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39163
+ name: "deviceId",
39164
+ form: "single",
39165
+ optional: true
39166
+ }],
39095
39167
  "pipelineAnalytics.getGroup": [{
39096
39168
  name: "deviceId",
39097
39169
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.51",
3
+ "version": "0.2.52",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",