@camstack/addon-provider-petkit 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
@@ -20214,6 +20214,50 @@ var EventStoreFootprintSchema = object({
20214
20214
  totalBytes: number().int(),
20215
20215
  devices: array(EventStoreDeviceFootprintSchema).readonly()
20216
20216
  });
20217
+ /** Event-media footprint for one {@link MediaFileKind}. */
20218
+ var EventMediaKindFootprintSchema = object({
20219
+ kind: MediaFileKindEnum,
20220
+ /** Media rows of this kind. */
20221
+ rows: number().int(),
20222
+ /** Bytes on disk held by those rows. */
20223
+ bytes: number().int()
20224
+ });
20225
+ /**
20226
+ * The media footprint broken down by KIND — the axis a deletion decision
20227
+ * actually turns on.
20228
+ *
20229
+ * A byte total says how much there is; it cannot say what is safe to remove.
20230
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
20231
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
20232
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
20233
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
20234
+ * nothing else, so sizing a deletion means summing per kind.
20235
+ *
20236
+ * ## Why `unaccounted*` exists
20237
+ *
20238
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
20239
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
20240
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
20241
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
20242
+ * retired code path, or by a version that knew a kind this one does not) would
20243
+ * otherwise vanish from the total silently, and an operator would delete
20244
+ * against a denominator smaller than the disk.
20245
+ *
20246
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
20247
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
20248
+ */
20249
+ var EventMediaKindBreakdownSchema = object({
20250
+ /** Every media row in scope, from one unfiltered aggregate. */
20251
+ totalRows: number().int(),
20252
+ /** Every media byte in scope, from that same aggregate. */
20253
+ totalBytes: number().int(),
20254
+ /** Per-kind footprint, ordered by bytes descending. */
20255
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
20256
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
20257
+ unaccountedRows: number().int(),
20258
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
20259
+ unaccountedBytes: number().int()
20260
+ });
20217
20261
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
20218
20262
  var EventPruneCountsSchema = object({
20219
20263
  motion: number().int(),
@@ -20417,6 +20461,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20417
20461
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
20418
20462
  kind: "query",
20419
20463
  auth: "admin"
20464
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
20465
+ kind: "query",
20466
+ auth: "admin"
20420
20467
  }), method(object({
20421
20468
  olderThanMs: number(),
20422
20469
  reason: OpsLogReasonSchema.optional()
@@ -22368,6 +22415,20 @@ method(object({
22368
22415
  error: string().optional()
22369
22416
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
22370
22417
  providerId: string(),
22418
+ /**
22419
+ * The location this config is an UNSAVED edit of, when there is one.
22420
+ *
22421
+ * `listLocations` replaces every declared secret with the redaction
22422
+ * sentinel, so the edit modal's form state holds the sentinel for any
22423
+ * credential the operator did not retype — and posting that here
22424
+ * without a way to resolve it makes the provider try to authenticate
22425
+ * as `__camstack_redacted__` and report the operator's own working
22426
+ * password as wrong. Given this id, the orchestrator restores each
22427
+ * sentinel from the stored config (same rule as `upsertLocation`)
22428
+ * before dispatching. Omitted by the "Add location" wizard, where
22429
+ * every value was typed just now and nothing is stored yet.
22430
+ */
22431
+ locationId: string().optional(),
22371
22432
  config: record(string(), unknown())
22372
22433
  }), object({
22373
22434
  ok: boolean(),
@@ -36414,6 +36475,12 @@ Object.freeze({
36414
36475
  addonId: null,
36415
36476
  access: "view"
36416
36477
  },
36478
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
36479
+ capName: "pipeline-analytics",
36480
+ capScope: "device",
36481
+ addonId: null,
36482
+ access: "view"
36483
+ },
36417
36484
  "pipelineAnalytics.getEventStoreFootprint": {
36418
36485
  capName: "pipeline-analytics",
36419
36486
  capScope: "device",
@@ -40079,6 +40146,11 @@ Object.freeze({
40079
40146
  form: "single",
40080
40147
  optional: false
40081
40148
  }],
40149
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
40150
+ name: "deviceId",
40151
+ form: "single",
40152
+ optional: true
40153
+ }],
40082
40154
  "pipelineAnalytics.getGroup": [{
40083
40155
  name: "deviceId",
40084
40156
  form: "single",
package/dist/addon.mjs CHANGED
@@ -20213,6 +20213,50 @@ var EventStoreFootprintSchema = object({
20213
20213
  totalBytes: number().int(),
20214
20214
  devices: array(EventStoreDeviceFootprintSchema).readonly()
20215
20215
  });
20216
+ /** Event-media footprint for one {@link MediaFileKind}. */
20217
+ var EventMediaKindFootprintSchema = object({
20218
+ kind: MediaFileKindEnum,
20219
+ /** Media rows of this kind. */
20220
+ rows: number().int(),
20221
+ /** Bytes on disk held by those rows. */
20222
+ bytes: number().int()
20223
+ });
20224
+ /**
20225
+ * The media footprint broken down by KIND — the axis a deletion decision
20226
+ * actually turns on.
20227
+ *
20228
+ * A byte total says how much there is; it cannot say what is safe to remove.
20229
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
20230
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
20231
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
20232
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
20233
+ * nothing else, so sizing a deletion means summing per kind.
20234
+ *
20235
+ * ## Why `unaccounted*` exists
20236
+ *
20237
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
20238
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
20239
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
20240
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
20241
+ * retired code path, or by a version that knew a kind this one does not) would
20242
+ * otherwise vanish from the total silently, and an operator would delete
20243
+ * against a denominator smaller than the disk.
20244
+ *
20245
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
20246
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
20247
+ */
20248
+ var EventMediaKindBreakdownSchema = object({
20249
+ /** Every media row in scope, from one unfiltered aggregate. */
20250
+ totalRows: number().int(),
20251
+ /** Every media byte in scope, from that same aggregate. */
20252
+ totalBytes: number().int(),
20253
+ /** Per-kind footprint, ordered by bytes descending. */
20254
+ kinds: array(EventMediaKindFootprintSchema).readonly(),
20255
+ /** `totalRows` minus the summed `kinds` rows — see the schema note. */
20256
+ unaccountedRows: number().int(),
20257
+ /** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
20258
+ unaccountedBytes: number().int()
20259
+ });
20216
20260
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
20217
20261
  var EventPruneCountsSchema = object({
20218
20262
  motion: number().int(),
@@ -20416,6 +20460,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20416
20460
  }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
20417
20461
  kind: "query",
20418
20462
  auth: "admin"
20463
+ }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
20464
+ kind: "query",
20465
+ auth: "admin"
20419
20466
  }), method(object({
20420
20467
  olderThanMs: number(),
20421
20468
  reason: OpsLogReasonSchema.optional()
@@ -22367,6 +22414,20 @@ method(object({
22367
22414
  error: string().optional()
22368
22415
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
22369
22416
  providerId: string(),
22417
+ /**
22418
+ * The location this config is an UNSAVED edit of, when there is one.
22419
+ *
22420
+ * `listLocations` replaces every declared secret with the redaction
22421
+ * sentinel, so the edit modal's form state holds the sentinel for any
22422
+ * credential the operator did not retype — and posting that here
22423
+ * without a way to resolve it makes the provider try to authenticate
22424
+ * as `__camstack_redacted__` and report the operator's own working
22425
+ * password as wrong. Given this id, the orchestrator restores each
22426
+ * sentinel from the stored config (same rule as `upsertLocation`)
22427
+ * before dispatching. Omitted by the "Add location" wizard, where
22428
+ * every value was typed just now and nothing is stored yet.
22429
+ */
22430
+ locationId: string().optional(),
22370
22431
  config: record(string(), unknown())
22371
22432
  }), object({
22372
22433
  ok: boolean(),
@@ -36413,6 +36474,12 @@ Object.freeze({
36413
36474
  addonId: null,
36414
36475
  access: "view"
36415
36476
  },
36477
+ "pipelineAnalytics.getEventMediaFootprintByKind": {
36478
+ capName: "pipeline-analytics",
36479
+ capScope: "device",
36480
+ addonId: null,
36481
+ access: "view"
36482
+ },
36416
36483
  "pipelineAnalytics.getEventStoreFootprint": {
36417
36484
  capName: "pipeline-analytics",
36418
36485
  capScope: "device",
@@ -40078,6 +40145,11 @@ Object.freeze({
40078
40145
  form: "single",
40079
40146
  optional: false
40080
40147
  }],
40148
+ "pipelineAnalytics.getEventMediaFootprintByKind": [{
40149
+ name: "deviceId",
40150
+ form: "single",
40151
+ optional: true
40152
+ }],
40081
40153
  "pipelineAnalytics.getGroup": [{
40082
40154
  name: "deviceId",
40083
40155
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.47",
3
+ "version": "0.2.48",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",