@camstack/addon-provider-dreo 0.2.47 → 0.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
@@ -19148,6 +19148,50 @@ var EventStoreFootprintSchema = object({
19148
19148
  totalBytes: number().int(),
19149
19149
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19150
19150
  });
19151
+ /** Event-media footprint for one {@link MediaFileKind}. */
19152
+ var EventMediaKindFootprintSchema = object({
19153
+ kind: MediaFileKindEnum,
19154
+ /** Media rows of this kind. */
19155
+ rows: number().int(),
19156
+ /** Bytes on disk held by those rows. */
19157
+ bytes: number().int()
19158
+ });
19159
+ /**
19160
+ * The media footprint broken down by KIND — the axis a deletion decision
19161
+ * actually turns on.
19162
+ *
19163
+ * A byte total says how much there is; it cannot say what is safe to remove.
19164
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19165
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19166
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19167
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19168
+ * nothing else, so sizing a deletion means summing per kind.
19169
+ *
19170
+ * ## Why `unaccounted*` exists
19171
+ *
19172
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19173
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19174
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19175
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19176
+ * retired code path, or by a version that knew a kind this one does not) would
19177
+ * otherwise vanish from the total silently, and an operator would delete
19178
+ * against a denominator smaller than the disk.
19179
+ *
19180
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19181
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19182
+ */
19183
+ var EventMediaKindBreakdownSchema = object({
19184
+ /** Every media row in scope, from one unfiltered aggregate. */
19185
+ totalRows: number().int(),
19186
+ /** Every media byte in scope, from that same aggregate. */
19187
+ totalBytes: number().int(),
19188
+ /** Per-kind footprint, ordered by bytes descending. */
19189
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19190
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19191
+ unaccountedRows: number().int(),
19192
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19193
+ unaccountedBytes: number().int()
19194
+ });
19151
19195
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19152
19196
  var EventPruneCountsSchema = object({
19153
19197
  motion: number().int(),
@@ -19351,6 +19395,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19351
19395
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19352
19396
  kind: "query",
19353
19397
  auth: "admin"
19398
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19399
+ kind: "query",
19400
+ auth: "admin"
19354
19401
  }), method(object({
19355
19402
  olderThanMs: number(),
19356
19403
  reason: OpsLogReasonSchema.optional()
@@ -21302,6 +21349,20 @@ method(object({
21302
21349
  error: string().optional()
21303
21350
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21304
21351
  providerId: string(),
21352
+ /**
21353
+ * The location this config is an UNSAVED edit of, when there is one.
21354
+ *
21355
+ * `listLocations` replaces every declared secret with the redaction
21356
+ * sentinel, so the edit modal's form state holds the sentinel for any
21357
+ * credential the operator did not retype — and posting that here
21358
+ * without a way to resolve it makes the provider try to authenticate
21359
+ * as `__camstack_redacted__` and report the operator's own working
21360
+ * password as wrong. Given this id, the orchestrator restores each
21361
+ * sentinel from the stored config (same rule as `upsertLocation`)
21362
+ * before dispatching. Omitted by the "Add location" wizard, where
21363
+ * every value was typed just now and nothing is stored yet.
21364
+ */
21365
+ locationId: string().optional(),
21305
21366
  config: record(string(), unknown())
21306
21367
  }), object({
21307
21368
  ok: boolean(),
@@ -35348,6 +35409,12 @@ Object.freeze({
35348
35409
  addonId: null,
35349
35410
  access: "view"
35350
35411
  },
35412
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
35413
+ capName: "pipeline-analytics",
35414
+ capScope: "device",
35415
+ addonId: null,
35416
+ access: "view"
35417
+ },
35351
35418
  "pipelineAnalytics.getEventStoreFootprint": {
35352
35419
  capName: "pipeline-analytics",
35353
35420
  capScope: "device",
@@ -39013,6 +39080,11 @@ Object.freeze({
39013
39080
  form: "single",
39014
39081
  optional: false
39015
39082
  }],
39083
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39084
+ name: "deviceId",
39085
+ form: "single",
39086
+ optional: true
39087
+ }],
39016
39088
  "pipelineAnalytics.getGroup": [{
39017
39089
  name: "deviceId",
39018
39090
  form: "single",
package/dist/addon.mjs CHANGED
@@ -19149,6 +19149,50 @@ var EventStoreFootprintSchema = object({
19149
19149
  totalBytes: number().int(),
19150
19150
  devices: array(EventStoreDeviceFootprintSchema).readonly()
19151
19151
  });
19152
+ /** Event-media footprint for one {@link MediaFileKind}. */
19153
+ var EventMediaKindFootprintSchema = object({
19154
+ kind: MediaFileKindEnum,
19155
+ /** Media rows of this kind. */
19156
+ rows: number().int(),
19157
+ /** Bytes on disk held by those rows. */
19158
+ bytes: number().int()
19159
+ });
19160
+ /**
19161
+ * The media footprint broken down by KIND — the axis a deletion decision
19162
+ * actually turns on.
19163
+ *
19164
+ * A byte total says how much there is; it cannot say what is safe to remove.
19165
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
19166
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
19167
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
19168
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
19169
+ * nothing else, so sizing a deletion means summing per kind.
19170
+ *
19171
+ * ## Why `unaccounted*` exists
19172
+ *
19173
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
19174
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
19175
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
19176
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
19177
+ * retired code path, or by a version that knew a kind this one does not) would
19178
+ * otherwise vanish from the total silently, and an operator would delete
19179
+ * against a denominator smaller than the disk.
19180
+ *
19181
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
19182
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
19183
+ */
19184
+ var EventMediaKindBreakdownSchema = object({
19185
+ /** Every media row in scope, from one unfiltered aggregate. */
19186
+ totalRows: number().int(),
19187
+ /** Every media byte in scope, from that same aggregate. */
19188
+ totalBytes: number().int(),
19189
+ /** Per-kind footprint, ordered by bytes descending. */
19190
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
19191
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
19192
+ unaccountedRows: number().int(),
19193
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
19194
+ unaccountedBytes: number().int()
19195
+ });
19152
19196
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
19153
19197
  var EventPruneCountsSchema = object({
19154
19198
  motion: number().int(),
@@ -19352,6 +19396,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19352
19396
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
19353
19397
  kind: "query",
19354
19398
  auth: "admin"
19399
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
19400
+ kind: "query",
19401
+ auth: "admin"
19355
19402
  }), method(object({
19356
19403
  olderThanMs: number(),
19357
19404
  reason: OpsLogReasonSchema.optional()
@@ -21303,6 +21350,20 @@ method(object({
21303
21350
  error: string().optional()
21304
21351
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
21305
21352
  providerId: string(),
21353
+ /**
21354
+ * The location this config is an UNSAVED edit of, when there is one.
21355
+ *
21356
+ * `listLocations` replaces every declared secret with the redaction
21357
+ * sentinel, so the edit modal's form state holds the sentinel for any
21358
+ * credential the operator did not retype — and posting that here
21359
+ * without a way to resolve it makes the provider try to authenticate
21360
+ * as `__camstack_redacted__` and report the operator's own working
21361
+ * password as wrong. Given this id, the orchestrator restores each
21362
+ * sentinel from the stored config (same rule as `upsertLocation`)
21363
+ * before dispatching. Omitted by the "Add location" wizard, where
21364
+ * every value was typed just now and nothing is stored yet.
21365
+ */
21366
+ locationId: string().optional(),
21306
21367
  config: record(string(), unknown())
21307
21368
  }), object({
21308
21369
  ok: boolean(),
@@ -35349,6 +35410,12 @@ Object.freeze({
35349
35410
  addonId: null,
35350
35411
  access: "view"
35351
35412
  },
35413
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
35414
+ capName: "pipeline-analytics",
35415
+ capScope: "device",
35416
+ addonId: null,
35417
+ access: "view"
35418
+ },
35352
35419
  "pipelineAnalytics.getEventStoreFootprint": {
35353
35420
  capName: "pipeline-analytics",
35354
35421
  capScope: "device",
@@ -39014,6 +39081,11 @@ Object.freeze({
39014
39081
  form: "single",
39015
39082
  optional: false
39016
39083
  }],
39084
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
39085
+ name: "deviceId",
39086
+ form: "single",
39087
+ optional: true
39088
+ }],
39017
39089
  "pipelineAnalytics.getGroup": [{
39018
39090
  name: "deviceId",
39019
39091
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.47",
3
+ "version": "0.2.48",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",