@camstack/addon-remote-storage 1.2.6 → 1.2.7

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.
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  let node_path = require("node:path");
24
24
  node_path = __toESM(node_path);
25
25
  let node_crypto = require("node:crypto");
26
- //#region ../types/dist/event-category-BLcNejAE.mjs
26
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
27
27
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
28
28
  EventCategory["SystemBoot"] = "system.boot";
29
29
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -294,6 +294,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
294
294
  */
295
295
  EventCategory["DeviceStateChanged"] = "device.state-changed";
296
296
  /**
297
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
298
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
299
+ *
300
+ * Emitted only on a change, so a steady scene is silent. It exists so a
301
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
302
+ * one live badge with no push signal at all, and it cost a request every
303
+ * four seconds per visible camera.
304
+ *
305
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
306
+ * keeps a slow reconcile rather than trusting it alone.
307
+ */
308
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
309
+ /**
297
310
  * Cap event fired by every device that registers the `battery`
298
311
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
299
312
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7207,35 +7220,22 @@ var ConvertResultSchema = object({
7207
7220
  */
7208
7221
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7209
7222
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7210
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7211
- kind: literal("timeOfDay"),
7212
- start: string().regex(HHMM),
7213
- end: string().regex(HHMM),
7214
- /** Restrict to these weekdays; omit = every day. */
7215
- days: array(RecordingWeekdaySchema).optional()
7216
- })]);
7217
- var RecordingModeSchema = _enum([
7218
- "continuous",
7219
- "onMotion",
7220
- "onAudioThreshold"
7221
- ]);
7222
7223
  /**
7223
- * First-class, authoritative per-camera storage mode — the explicit choice the
7224
- * UI reads directly (never inferred from `rules`):
7225
- * - `off` — not recording.
7226
- * - `events` — record only around triggers (motion / audio threshold),
7227
- * with pre/post-buffer.
7228
- * - `continuous` — record 24/7 within the schedule.
7224
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7225
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7226
+ * - `off` — no band covers the camera (or it is disabled).
7227
+ * - `events` — every band records around triggers only.
7228
+ * - `continuous` — at least one band records continuously.
7229
7229
  *
7230
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7231
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7230
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7231
+ * every save (`activeModeForConfig`). Writing it has no effect.
7232
7232
  */
7233
7233
  var RecordingStorageModeSchema = _enum([
7234
7234
  "off",
7235
7235
  "events",
7236
7236
  "continuous"
7237
7237
  ]);
7238
- /** Which detectors trigger an `events`-mode recording. */
7238
+ /** Which detectors trigger an `events`-mode band. */
7239
7239
  var RecordingTriggersSchema = object({
7240
7240
  motion: boolean().optional(),
7241
7241
  audioThresholdDbfs: number().optional()
@@ -7271,18 +7271,6 @@ var RecordingBandSchema = object({
7271
7271
  preBufferSec: number().min(0).optional(),
7272
7272
  postBufferSec: number().min(0).optional()
7273
7273
  });
7274
- var RecordingRuleSchema = object({
7275
- schedule: RecordingScheduleSchema,
7276
- mode: RecordingModeSchema,
7277
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7278
- preBufferSec: number().min(0).default(0),
7279
- /** Keep recording until this many seconds after the last trigger. */
7280
- postBufferSec: number().min(0).default(0),
7281
- /** Each new trigger restarts the post-buffer window. */
7282
- resetTimeoutOnNewEvent: boolean().default(true),
7283
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7284
- thresholdDbfs: number().optional()
7285
- });
7286
7274
  /**
7287
7275
  * Per-device retention overrides. Every field is optional; an unset or `0`
7288
7276
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7316,40 +7304,28 @@ var ScrubThumbnailPresetSchema = _enum([
7316
7304
  /**
7317
7305
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7318
7306
  *
7319
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7320
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7321
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7322
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7307
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7308
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7309
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7310
+ *
7311
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7312
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7313
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7314
+ * persist a band-less config, i.e. silently stop recording the camera.
7323
7315
  */
7324
7316
  var RecordingConfigSchema = object({
7325
7317
  enabled: boolean(),
7326
- /** Authoritative storage mode. Absent on legacy targets derived once via
7327
- * `migrateRulesToMode`, then persisted. */
7318
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7319
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7328
7320
  mode: RecordingStorageModeSchema.optional(),
7329
7321
  profiles: array(CamProfileSchema).optional(),
7330
7322
  segmentSeconds: number().int().positive().optional(),
7331
- /** Shared recording time-bands for `events` & `continuous` — record only when
7332
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7333
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7334
- schedules: array(RecordingScheduleSchema).optional(),
7335
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7336
- * normalized into `schedules` on read and never written going forward. (Not
7337
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7338
- schedule: RecordingScheduleSchema.optional(),
7339
- /** `events`-mode only — which detectors trigger a recording. */
7340
- triggers: RecordingTriggersSchema.optional(),
7341
- /** `events`-mode only — seconds retained before / after a trigger. */
7342
- preBufferSec: number().min(0).optional(),
7343
- postBufferSec: number().min(0).optional(),
7344
- /** DEPRECATED authoring input; retained for migration/transition. */
7345
- rules: array(RecordingRuleSchema).optional(),
7346
7323
  /**
7347
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7348
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7349
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7350
- * derived into bands once via `migrateConfigToBands`.
7324
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7325
+ * the recorder's band engine consumes. An empty array = record nothing;
7326
+ * "off" is the absence of a covering band, never a band value.
7351
7327
  */
7352
- bands: array(RecordingBandSchema).optional(),
7328
+ bands: array(RecordingBandSchema).default([]),
7353
7329
  retention: RecordingRetentionSchema.optional(),
7354
7330
  /**
7355
7331
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7357,8 +7333,15 @@ var RecordingConfigSchema = object({
7357
7333
  * windows only — existing sheets are immutable, and each window's index
7358
7334
  * carries its own tile dims so mixed-preset history renders correctly.
7359
7335
  */
7360
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7361
- });
7336
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7337
+ /**
7338
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7339
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7340
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7341
+ * are written and scrub reads exact keyframes at every velocity.
7342
+ */
7343
+ stripsEnabled: boolean().optional()
7344
+ }).strict();
7362
7345
  /**
7363
7346
  * Ops-log — the durable, append-only operations audit shared by the
7364
7347
  * recordings and events management surfaces.
@@ -7377,7 +7360,8 @@ var OpsLogOpSchema = _enum([
7377
7360
  "prune",
7378
7361
  "manual-delete",
7379
7362
  "rescan",
7380
- "retention-run"
7363
+ "retention-run",
7364
+ "relocate"
7381
7365
  ]);
7382
7366
  /** Why the operation ran. */
7383
7367
  var OpsLogReasonSchema = _enum([
@@ -7416,6 +7400,55 @@ var OpsLogQueryInputSchema = object({
7416
7400
  limit: number().int().min(1).max(1e3).optional()
7417
7401
  });
7418
7402
  /**
7403
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7404
+ *
7405
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7406
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7407
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7408
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7409
+ * after verify) and each completed/failed run also lands one durable ops-log
7410
+ * row on the owning addon's surface.
7411
+ */
7412
+ var RelocateJobStateSchema = _enum([
7413
+ "running",
7414
+ "done",
7415
+ "failed",
7416
+ "cancelled"
7417
+ ]);
7418
+ var RelocateJobSchema = object({
7419
+ jobId: string(),
7420
+ state: RelocateJobStateSchema,
7421
+ /** Source location — for media relocation this is informational ('*': rows
7422
+ * move from wherever they are to the target). */
7423
+ fromLocationId: string(),
7424
+ toLocationId: string(),
7425
+ /** Scoped device, or null = every device. */
7426
+ deviceId: number().nullable(),
7427
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7428
+ entities: array(string()),
7429
+ filesMoved: number().int(),
7430
+ bytesMoved: number().int(),
7431
+ /** Total files discovered up front; null while (or when) unknown. */
7432
+ filesTotal: number().int().nullable(),
7433
+ startedAt: number(),
7434
+ finishedAt: number().nullable(),
7435
+ error: string().nullable()
7436
+ });
7437
+ var RelocateFootageInputSchema = object({
7438
+ deviceId: number().optional(),
7439
+ fromLocationId: string(),
7440
+ toLocationId: string(),
7441
+ entities: array(_enum(["segments", "strips"])).optional(),
7442
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7443
+ * never allowed to starve live writers. */
7444
+ throttleMbps: number().min(1).max(1e3).optional()
7445
+ });
7446
+ var RelocateMediaInputSchema = object({
7447
+ deviceId: number().optional(),
7448
+ toLocationId: string(),
7449
+ throttleMbps: number().min(1).max(1e3).optional()
7450
+ });
7451
+ /**
7419
7452
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7420
7453
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7421
7454
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7465,6 +7498,13 @@ var StorageLocationSchema = object({
7465
7498
  nodeId: string().optional(),
7466
7499
  isDefault: boolean().default(false),
7467
7500
  isSystem: boolean().default(false),
7501
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7502
+ * for node-local locations it can reach) — never persisted, absent when the
7503
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7504
+ capacity: object({
7505
+ totalBytes: number(),
7506
+ availableBytes: number()
7507
+ }).nullable().optional(),
7468
7508
  createdAt: number(),
7469
7509
  updatedAt: number()
7470
7510
  });
@@ -8232,7 +8272,8 @@ var NcTaxonomyEntrySchema = object({
8232
8272
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8233
8273
  parentKind: string().nullable()
8234
8274
  });
8235
- object({
8275
+ /** The complete NC picker taxonomy — three grouped buckets. */
8276
+ var NcTaxonomySchema = object({
8236
8277
  videoClasses: array(NcTaxonomyEntrySchema),
8237
8278
  audioKinds: array(NcTaxonomyEntrySchema),
8238
8279
  labels: array(NcTaxonomyEntrySchema)
@@ -8892,6 +8933,7 @@ var AccessoryKind = {
8892
8933
  };
8893
8934
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8894
8935
  DeviceFeature.BatteryOperated;
8936
+ new Set(["devices", "classes"]);
8895
8937
  /**
8896
8938
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8897
8939
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9050,6 +9092,29 @@ var NcOccupancyConditionSchema = object({
9050
9092
  count: number().int().min(0).default(1),
9051
9093
  sustainSeconds: number().int().min(0).max(3600).default(15)
9052
9094
  });
9095
+ /**
9096
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9097
+ *
9098
+ * The values are not symmetric, and deliberately so — the absent value has to
9099
+ * mean exactly what every rule authored before this condition existed already
9100
+ * does:
9101
+ * - `enter` — entries and every NON-crossing record (movement state,
9102
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9103
+ * an operator who never asked for exits must not start receiving them.
9104
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9105
+ * fails closed, because "the car left the drive" is a question about a
9106
+ * boundary, not about a detection.
9107
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9108
+ *
9109
+ * A rule asking for a direction should normally also scope `zones`, which the
9110
+ * engine evaluates against the crossed zone as well as the current membership
9111
+ * (an exit's membership no longer contains the zone it just left).
9112
+ */
9113
+ var NcCrossingSchema = _enum([
9114
+ "enter",
9115
+ "exit",
9116
+ "any"
9117
+ ]);
9053
9118
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9054
9119
  var NcZoneConditionSchema = object({
9055
9120
  ids: array(string().min(1)).min(1),
@@ -9074,6 +9139,13 @@ var NcConditionsSchema = object({
9074
9139
  /** Veto zones — any hit fails the rule. */
9075
9140
  zonesExclude: array(string().min(1)).optional(),
9076
9141
  /**
9142
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9143
+ * and a closed track carries none, so a `track-end` rule asking for one
9144
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9145
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9146
+ */
9147
+ crossing: NcCrossingSchema.optional(),
9148
+ /**
9077
9149
  * Exact (case-insensitive) match on the record's collapsed `label`
9078
9150
  * (identity name / plate text / subclass).
9079
9151
  */
@@ -9208,17 +9280,85 @@ var NcRuleTargetSchema = object({
9208
9280
  * - `keyFrame` — the clean scene frame (no subject box).
9209
9281
  * - `none` — no attachment.
9210
9282
  */
9211
- var NcMediaPolicySchema = object({ attach: _enum([
9212
- "best",
9213
- "best-matching",
9214
- "keyFrame",
9215
- "none"
9216
- ]).default("best") });
9283
+ /**
9284
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9285
+ * conflate it with the selection strategy and betray the request: asking for
9286
+ * the clean scene frame on an object-event owner used to start at
9287
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9288
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9289
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9290
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9291
+ * the pipeline actually saw.
9292
+ */
9293
+ var NcMediaFrameSchema = _enum([
9294
+ "cropped",
9295
+ "full",
9296
+ "boxed"
9297
+ ]);
9298
+ var NcMediaPolicySchema = object({
9299
+ attach: _enum([
9300
+ "best",
9301
+ "best-matching",
9302
+ "keyFrame",
9303
+ "none"
9304
+ ]).default("best"),
9305
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9306
+ frame: NcMediaFrameSchema.optional(),
9307
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9308
+ * "show me the ZONE", not the whole scene or the subject crop. */
9309
+ zoneCrop: boolean().optional(),
9310
+ /**
9311
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9312
+ * event — NOT from the recording, so the camera does not have to be
9313
+ * recording, and the window sits AROUND the moment instead of a segment
9314
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9315
+ * gif, never a failed notification.
9316
+ */
9317
+ gif: boolean().optional(),
9318
+ /**
9319
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9320
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9321
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9322
+ * the degrade engine, which drops the video and keeps the still.
9323
+ */
9324
+ clip: boolean().optional(),
9325
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9326
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9327
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9328
+ /**
9329
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9330
+ * assigned profile: a notification is watched on a phone, so the 4K
9331
+ * rendition would burn CPU to produce a file the client downscales anyway.
9332
+ * A profile that is not assigned falls back to the cheapest, and the render
9333
+ * reports which one actually ran.
9334
+ */
9335
+ profile: CamProfileSchema.optional()
9336
+ });
9337
+ /**
9338
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9339
+ * notification suppresses.
9340
+ * - `shared` (default, and the absent value) — one window for the whole
9341
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9342
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9343
+ * at once and cat→cat still waits.
9344
+ *
9345
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9346
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9347
+ * see `cooldownKey` in the rule engine).
9348
+ */
9349
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9217
9350
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9218
9351
  var NcThrottleSchema = object({
9219
9352
  cooldownSec: number().int().min(0).max(86400).default(60),
9220
9353
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9221
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9354
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9355
+ /**
9356
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9357
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9358
+ * rule authored before this field simply carries none — and the engine
9359
+ * reads absent as `shared`, the pre-existing behaviour.
9360
+ */
9361
+ granularity: NcThrottleGranularitySchema.optional()
9222
9362
  });
9223
9363
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9224
9364
  var NcRuleInputSchema = object({
@@ -9227,7 +9367,19 @@ var NcRuleInputSchema = object({
9227
9367
  delivery: NcDeliverySchema,
9228
9368
  conditions: NcConditionsSchema.default({}),
9229
9369
  schedule: NcScheduleSchema.optional(),
9230
- targets: array(NcRuleTargetSchema).min(1),
9370
+ /** May be empty when `targetUsers` addresses at least one user — the
9371
+ * "at least one addressee" invariant is enforced by the provider, because
9372
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9373
+ targets: array(NcRuleTargetSchema),
9374
+ /**
9375
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9376
+ * time each user fans out to the personal targets they own
9377
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9378
+ * firing camera — a user is never notified about a device they cannot open.
9379
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9380
+ * targets.
9381
+ */
9382
+ targetUsers: array(string()).optional(),
9231
9383
  media: NcMediaPolicySchema.default({ attach: "best" }),
9232
9384
  throttle: NcThrottleSchema.default({
9233
9385
  cooldownSec: 60,
@@ -9314,6 +9466,7 @@ var NcConditionDescriptorSchema = object({
9314
9466
  "schedule",
9315
9467
  "plateMatcher",
9316
9468
  "packagePhase",
9469
+ "crossingSelect",
9317
9470
  "polygonDraw",
9318
9471
  "occupancy"
9319
9472
  ]),
@@ -9440,7 +9593,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9440
9593
  }), object({ results: array(NcTestResultSchema) }), {
9441
9594
  kind: "mutation",
9442
9595
  auth: "admin"
9443
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9596
+ }), method(object({}), object({
9597
+ catalog: array(NcConditionDescriptorSchema),
9598
+ taxonomy: NcTaxonomySchema.optional()
9599
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9444
9600
  /**
9445
9601
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9446
9602
  *
@@ -10177,6 +10333,28 @@ method(object({
10177
10333
  }), object({ success: literal(true) }), {
10178
10334
  kind: "mutation",
10179
10335
  auth: "admin"
10336
+ }), method(object({
10337
+ deviceId: number(),
10338
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10339
+ * watched on a phone, and the cheap rendition is the right default. */
10340
+ profile: CamProfileSchema.optional(),
10341
+ aroundMs: number(),
10342
+ preRollSec: number().min(0).max(20).default(3),
10343
+ postRollSec: number().min(0).max(20).default(5),
10344
+ format: _enum(["gif", "mp4"]).default("gif"),
10345
+ maxWidth: number().int().min(120).max(1920).default(480),
10346
+ /** GIF only — MP4 keeps the source cadence. */
10347
+ fps: number().int().min(1).max(15).default(5)
10348
+ }), object({
10349
+ base64: string(),
10350
+ mime: string(),
10351
+ bytes: number().int(),
10352
+ /** The profile actually rendered (what the default resolved to). */
10353
+ profile: CamProfileSchema,
10354
+ durationMs: number()
10355
+ }), {
10356
+ kind: "mutation",
10357
+ auth: "admin"
10180
10358
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10181
10359
  probed: boolean(),
10182
10360
  summary: string()
@@ -15771,7 +15949,10 @@ method(object({
15771
15949
  }), method(object({
15772
15950
  deviceId: number(),
15773
15951
  caps: array(string()).readonly().optional()
15774
- }), record(string(), unknown().nullable()));
15952
+ }), record(string(), unknown().nullable())), method(object({
15953
+ deviceIds: array(number()).readonly(),
15954
+ caps: array(string()).readonly().optional()
15955
+ }), record(string(), record(string(), unknown().nullable())));
15775
15956
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15776
15957
  deviceId: number(),
15777
15958
  capName: string()
@@ -16702,6 +16883,36 @@ var TargetKindSchema = object({
16702
16883
  icon: string(),
16703
16884
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16704
16885
  addonId: string(),
16886
+ /**
16887
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16888
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16889
+ * when the addon bundles no icon for that kind — the client then falls back
16890
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16891
+ *
16892
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16893
+ * client, and a native client joins it onto its own hub base.
16894
+ *
16895
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16896
+ * field that survived only because the runtime cap-router forwards provider
16897
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16898
+ * its own Zod parse from stripping it, and the whole arrangement would have
16899
+ * broken silently the moment output validation was tightened anywhere.
16900
+ */
16901
+ iconUrl: string().optional(),
16902
+ /**
16903
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16904
+ *
16905
+ * The server knows this and therefore says it, because the client cannot
16906
+ * safely guess: a React-Native client renders SVG and raster through two
16907
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16908
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16909
+ * placeholder glyph for every vector icon while the web build looked fine.
16910
+ *
16911
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16912
+ * not been updated — a client that cannot determine the type should prefer
16913
+ * its raster path, which is the safe default for an unknown image.
16914
+ */
16915
+ iconMediaType: string().optional(),
16705
16916
  configSchema: ConfigSchemaPassthrough,
16706
16917
  supportsDiscovery: boolean(),
16707
16918
  caps: TargetKindCapsSchema
@@ -17149,6 +17360,29 @@ var MotionEventSchema = object({
17149
17360
  * Absent on legacy rows ⇒ treat as `pipeline`.
17150
17361
  */
17151
17362
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17363
+ /**
17364
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17365
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17366
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17367
+ * appearance event carry none, so a rule asking for a direction fails closed
17368
+ * on them.
17369
+ *
17370
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17371
+ * into its own event, so a frame in which a track enters A while leaving B
17372
+ * produces two events with two directions — never one ambiguous row.
17373
+ *
17374
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17375
+ * membership the box has NOW, and by definition it no longer contains the zone
17376
+ * that was just left. Without the id here, a zone-scoped rule could never match
17377
+ * the exit it asked for.
17378
+ */
17379
+ var ZoneCrossingSchema = object({
17380
+ direction: _enum(["enter", "exit"]),
17381
+ /** Admin zone id crossed. */
17382
+ zoneId: string(),
17383
+ /** Zone display name at crossing time (falls back to the id). */
17384
+ zoneName: string().optional()
17385
+ });
17152
17386
  var ObjectEventSchema = object({
17153
17387
  ...BaseEventFields,
17154
17388
  kind: literal("object"),
@@ -17175,6 +17409,12 @@ var ObjectEventSchema = object({
17175
17409
  zones: array(string()).readonly().optional(),
17176
17410
  /** Omitted in slim projection. */
17177
17411
  state: TrackStateSchema.optional(),
17412
+ /**
17413
+ * The zone crossing this event IS, when it is one. Absent on every other
17414
+ * event kind (movement state, appearance, package) — see
17415
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17416
+ */
17417
+ zoneCrossing: ZoneCrossingSchema.optional(),
17178
17418
  /** Detection-frame dimensions in pixels — let consumers normalize the
17179
17419
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17180
17420
  frameWidth: number().optional(),
@@ -17433,6 +17673,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17433
17673
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17434
17674
  kind: "mutation",
17435
17675
  auth: "admin"
17676
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17677
+ kind: "mutation",
17678
+ auth: "admin"
17679
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17680
+ kind: "query",
17681
+ auth: "admin"
17682
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17683
+ kind: "mutation",
17684
+ auth: "admin"
17436
17685
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17437
17686
  kind: "query",
17438
17687
  auth: "admin"
@@ -19957,6 +20206,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
19957
20206
  */
19958
20207
  priority: number()
19959
20208
  })).readonly() });
20209
+ /**
20210
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20211
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20212
+ * what AUTO currently picks, so the UI can show the effective value either way.
20213
+ */
20214
+ var NotificationEndpointSchema = object({
20215
+ /** The operator's explicit choice, or null for AUTO. */
20216
+ baseUrl: string().nullable(),
20217
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20218
+ resolved: string().nullable()
20219
+ });
19960
20220
  var AllowedAddressesSchema = object({
19961
20221
  /**
19962
20222
  * Allowlist of interface addresses operators have explicitly opted
@@ -19979,7 +20239,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
19979
20239
  * to avoid mixed-content blocks in the browser. The public
19980
20240
  * tunnel always emits `https://` regardless. */
19981
20241
  scheme: _enum(["http", "https"]).optional()
19982
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20242
+ }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
19983
20243
  /**
19984
20244
  * mesh-network — collection cap for mesh-VPN providers.
19985
20245
  *
@@ -20778,7 +21038,12 @@ var RecordingDeviceUsageSchema = object({
20778
21038
  var RecordingLocationUsageSchema = object({
20779
21039
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20780
21040
  locationId: string().nullable(),
20781
- /** Bytes of recordings stored on this location. */
21041
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21042
+ * is emitted per physical disk (2026-07-29): two locations on one root
21043
+ * previously rendered as two identical "disks" with a nonsensical used
21044
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21045
+ locationIds: array(string()).optional(),
21046
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20782
21047
  usedBytes: number(),
20783
21048
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20784
21049
  availableBytes: number().nullable(),
@@ -20890,6 +21155,44 @@ method(object({
20890
21155
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20891
21156
  kind: "query",
20892
21157
  auth: "admin"
21158
+ }), method(object({
21159
+ deviceId: number(),
21160
+ aroundMs: number(),
21161
+ preRollSec: number().min(0).max(30).default(2),
21162
+ postRollSec: number().min(0).max(30).default(5),
21163
+ maxWidth: number().int().min(120).max(1280).default(480),
21164
+ fps: number().int().min(1).max(15).default(5)
21165
+ }), object({
21166
+ gifBase64: string(),
21167
+ fromMs: number(),
21168
+ toMs: number()
21169
+ }), {
21170
+ kind: "mutation",
21171
+ auth: "admin"
21172
+ }), method(object({
21173
+ deviceId: number(),
21174
+ aroundMs: number(),
21175
+ preRollSec: number().min(0).max(30).default(3),
21176
+ postRollSec: number().min(0).max(30).default(7),
21177
+ maxWidth: number().int().min(160).max(1920).default(640)
21178
+ }), object({
21179
+ clipBase64: string(),
21180
+ mime: string(),
21181
+ fromMs: number(),
21182
+ toMs: number(),
21183
+ bytes: number().int()
21184
+ }), {
21185
+ kind: "mutation",
21186
+ auth: "admin"
21187
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21188
+ kind: "mutation",
21189
+ auth: "admin"
21190
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21191
+ kind: "query",
21192
+ auth: "admin"
21193
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21194
+ kind: "mutation",
21195
+ auth: "admin"
20893
21196
  });
20894
21197
  /**
20895
21198
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22481,6 +22784,12 @@ Object.freeze({
22481
22784
  addonId: null,
22482
22785
  access: "view"
22483
22786
  },
22787
+ "deviceManager.getDeviceStatusAggregateBatch": {
22788
+ capName: "device-manager",
22789
+ capScope: "system",
22790
+ addonId: null,
22791
+ access: "view"
22792
+ },
22484
22793
  "deviceManager.getLinkedDevices": {
22485
22794
  capName: "device-manager",
22486
22795
  capScope: "system",
@@ -23375,6 +23684,12 @@ Object.freeze({
23375
23684
  addonId: null,
23376
23685
  access: "view"
23377
23686
  },
23687
+ "localNetwork.getNotificationEndpoint": {
23688
+ capName: "local-network",
23689
+ capScope: "system",
23690
+ addonId: null,
23691
+ access: "view"
23692
+ },
23378
23693
  "localNetwork.getPreferred": {
23379
23694
  capName: "local-network",
23380
23695
  capScope: "system",
@@ -23399,6 +23714,12 @@ Object.freeze({
23399
23714
  addonId: null,
23400
23715
  access: "create"
23401
23716
  },
23717
+ "localNetwork.setNotificationEndpoint": {
23718
+ capName: "local-network",
23719
+ capScope: "system",
23720
+ addonId: null,
23721
+ access: "create"
23722
+ },
23402
23723
  "lockControl.lock": {
23403
23724
  capName: "lock-control",
23404
23725
  capScope: "device",
@@ -24041,6 +24362,12 @@ Object.freeze({
24041
24362
  addonId: null,
24042
24363
  access: "create"
24043
24364
  },
24365
+ "pipelineAnalytics.cancelMediaRelocate": {
24366
+ capName: "pipeline-analytics",
24367
+ capScope: "device",
24368
+ addonId: null,
24369
+ access: "create"
24370
+ },
24044
24371
  "pipelineAnalytics.clearTracks": {
24045
24372
  capName: "pipeline-analytics",
24046
24373
  capScope: "device",
@@ -24095,6 +24422,12 @@ Object.freeze({
24095
24422
  addonId: null,
24096
24423
  access: "view"
24097
24424
  },
24425
+ "pipelineAnalytics.getMediaRelocateStatus": {
24426
+ capName: "pipeline-analytics",
24427
+ capScope: "device",
24428
+ addonId: null,
24429
+ access: "view"
24430
+ },
24098
24431
  "pipelineAnalytics.getMotionEvents": {
24099
24432
  capName: "pipeline-analytics",
24100
24433
  capScope: "device",
@@ -24167,6 +24500,12 @@ Object.freeze({
24167
24500
  addonId: null,
24168
24501
  access: "create"
24169
24502
  },
24503
+ "pipelineAnalytics.relocateMedia": {
24504
+ capName: "pipeline-analytics",
24505
+ capScope: "device",
24506
+ addonId: null,
24507
+ access: "create"
24508
+ },
24170
24509
  "pipelineAnalytics.searchObjectEvents": {
24171
24510
  capName: "pipeline-analytics",
24172
24511
  capScope: "device",
@@ -24929,6 +25268,12 @@ Object.freeze({
24929
25268
  addonId: null,
24930
25269
  access: "create"
24931
25270
  },
25271
+ "recording.cancelRelocate": {
25272
+ capName: "recording",
25273
+ capScope: "system",
25274
+ addonId: null,
25275
+ access: "create"
25276
+ },
24932
25277
  "recording.deleteFootprint": {
24933
25278
  capName: "recording",
24934
25279
  capScope: "system",
@@ -24959,6 +25304,12 @@ Object.freeze({
24959
25304
  addonId: null,
24960
25305
  access: "view"
24961
25306
  },
25307
+ "recording.getRelocateStatus": {
25308
+ capName: "recording",
25309
+ capScope: "system",
25310
+ addonId: null,
25311
+ access: "view"
25312
+ },
24962
25313
  "recording.getStorageUsage": {
24963
25314
  capName: "recording",
24964
25315
  capScope: "system",
@@ -24989,6 +25340,24 @@ Object.freeze({
24989
25340
  addonId: null,
24990
25341
  access: "view"
24991
25342
  },
25343
+ "recording.relocateFootage": {
25344
+ capName: "recording",
25345
+ capScope: "system",
25346
+ addonId: null,
25347
+ access: "create"
25348
+ },
25349
+ "recording.renderClip": {
25350
+ capName: "recording",
25351
+ capScope: "system",
25352
+ addonId: null,
25353
+ access: "create"
25354
+ },
25355
+ "recording.renderGif": {
25356
+ capName: "recording",
25357
+ capScope: "system",
25358
+ addonId: null,
25359
+ access: "create"
25360
+ },
24992
25361
  "recording.rescanStorage": {
24993
25362
  capName: "recording",
24994
25363
  capScope: "system",
@@ -25583,6 +25952,12 @@ Object.freeze({
25583
25952
  addonId: null,
25584
25953
  access: "create"
25585
25954
  },
25955
+ "streamBroker.renderPreBufferClip": {
25956
+ capName: "stream-broker",
25957
+ capScope: "system",
25958
+ addonId: null,
25959
+ access: "create"
25960
+ },
25586
25961
  "streamBroker.restartProfile": {
25587
25962
  capName: "stream-broker",
25588
25963
  capScope: "system",