@camstack/addon-export-ha-mqtt 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.
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
36
36
  //#endregion
37
- //#region ../types/dist/event-category-BLcNejAE.mjs
37
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
38
38
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
39
39
  EventCategory["SystemBoot"] = "system.boot";
40
40
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -305,6 +305,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
305
305
  */
306
306
  EventCategory["DeviceStateChanged"] = "device.state-changed";
307
307
  /**
308
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
309
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
310
+ *
311
+ * Emitted only on a change, so a steady scene is silent. It exists so a
312
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
313
+ * one live badge with no push signal at all, and it cost a request every
314
+ * four seconds per visible camera.
315
+ *
316
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
317
+ * keeps a slow reconcile rather than trusting it alone.
318
+ */
319
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
320
+ /**
308
321
  * Cap event fired by every device that registers the `battery`
309
322
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
310
323
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7232,35 +7245,22 @@ var ConvertResultSchema = object({
7232
7245
  */
7233
7246
  var RecordingWeekdaySchema = number$1().int().min(0).max(6);
7234
7247
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7235
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7236
- kind: literal("timeOfDay"),
7237
- start: string().regex(HHMM),
7238
- end: string().regex(HHMM),
7239
- /** Restrict to these weekdays; omit = every day. */
7240
- days: array(RecordingWeekdaySchema).optional()
7241
- })]);
7242
- var RecordingModeSchema = _enum([
7243
- "continuous",
7244
- "onMotion",
7245
- "onAudioThreshold"
7246
- ]);
7247
7248
  /**
7248
- * First-class, authoritative per-camera storage mode — the explicit choice the
7249
- * UI reads directly (never inferred from `rules`):
7250
- * - `off` — not recording.
7251
- * - `events` — record only around triggers (motion / audio threshold),
7252
- * with pre/post-buffer.
7253
- * - `continuous` — record 24/7 within the schedule.
7249
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7250
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7251
+ * - `off` — no band covers the camera (or it is disabled).
7252
+ * - `events` — every band records around triggers only.
7253
+ * - `continuous` — at least one band records continuously.
7254
7254
  *
7255
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7256
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7255
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7256
+ * every save (`activeModeForConfig`). Writing it has no effect.
7257
7257
  */
7258
7258
  var RecordingStorageModeSchema = _enum([
7259
7259
  "off",
7260
7260
  "events",
7261
7261
  "continuous"
7262
7262
  ]);
7263
- /** Which detectors trigger an `events`-mode recording. */
7263
+ /** Which detectors trigger an `events`-mode band. */
7264
7264
  var RecordingTriggersSchema = object({
7265
7265
  motion: boolean().optional(),
7266
7266
  audioThresholdDbfs: number$1().optional()
@@ -7296,18 +7296,6 @@ var RecordingBandSchema = object({
7296
7296
  preBufferSec: number$1().min(0).optional(),
7297
7297
  postBufferSec: number$1().min(0).optional()
7298
7298
  });
7299
- var RecordingRuleSchema = object({
7300
- schedule: RecordingScheduleSchema,
7301
- mode: RecordingModeSchema,
7302
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7303
- preBufferSec: number$1().min(0).default(0),
7304
- /** Keep recording until this many seconds after the last trigger. */
7305
- postBufferSec: number$1().min(0).default(0),
7306
- /** Each new trigger restarts the post-buffer window. */
7307
- resetTimeoutOnNewEvent: boolean().default(true),
7308
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7309
- thresholdDbfs: number$1().optional()
7310
- });
7311
7299
  /**
7312
7300
  * Per-device retention overrides. Every field is optional; an unset or `0`
7313
7301
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7341,40 +7329,28 @@ var ScrubThumbnailPresetSchema = _enum([
7341
7329
  /**
7342
7330
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7343
7331
  *
7344
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7345
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7346
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7347
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7332
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7333
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7334
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7335
+ *
7336
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7337
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7338
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7339
+ * persist a band-less config, i.e. silently stop recording the camera.
7348
7340
  */
7349
7341
  var RecordingConfigSchema = object({
7350
7342
  enabled: boolean(),
7351
- /** Authoritative storage mode. Absent on legacy targets derived once via
7352
- * `migrateRulesToMode`, then persisted. */
7343
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7344
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7353
7345
  mode: RecordingStorageModeSchema.optional(),
7354
7346
  profiles: array(CamProfileSchema).optional(),
7355
7347
  segmentSeconds: number$1().int().positive().optional(),
7356
- /** Shared recording time-bands for `events` & `continuous` — record only when
7357
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7358
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7359
- schedules: array(RecordingScheduleSchema).optional(),
7360
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7361
- * normalized into `schedules` on read and never written going forward. (Not
7362
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7363
- schedule: RecordingScheduleSchema.optional(),
7364
- /** `events`-mode only — which detectors trigger a recording. */
7365
- triggers: RecordingTriggersSchema.optional(),
7366
- /** `events`-mode only — seconds retained before / after a trigger. */
7367
- preBufferSec: number$1().min(0).optional(),
7368
- postBufferSec: number$1().min(0).optional(),
7369
- /** DEPRECATED authoring input; retained for migration/transition. */
7370
- rules: array(RecordingRuleSchema).optional(),
7371
7348
  /**
7372
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7373
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7374
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7375
- * derived into bands once via `migrateConfigToBands`.
7349
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7350
+ * the recorder's band engine consumes. An empty array = record nothing;
7351
+ * "off" is the absence of a covering band, never a band value.
7376
7352
  */
7377
- bands: array(RecordingBandSchema).optional(),
7353
+ bands: array(RecordingBandSchema).default([]),
7378
7354
  retention: RecordingRetentionSchema.optional(),
7379
7355
  /**
7380
7356
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7382,8 +7358,15 @@ var RecordingConfigSchema = object({
7382
7358
  * windows only — existing sheets are immutable, and each window's index
7383
7359
  * carries its own tile dims so mixed-preset history renders correctly.
7384
7360
  */
7385
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7386
- });
7361
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7362
+ /**
7363
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7364
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7365
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7366
+ * are written and scrub reads exact keyframes at every velocity.
7367
+ */
7368
+ stripsEnabled: boolean().optional()
7369
+ }).strict();
7387
7370
  /**
7388
7371
  * Ops-log — the durable, append-only operations audit shared by the
7389
7372
  * recordings and events management surfaces.
@@ -7402,7 +7385,8 @@ var OpsLogOpSchema = _enum([
7402
7385
  "prune",
7403
7386
  "manual-delete",
7404
7387
  "rescan",
7405
- "retention-run"
7388
+ "retention-run",
7389
+ "relocate"
7406
7390
  ]);
7407
7391
  /** Why the operation ran. */
7408
7392
  var OpsLogReasonSchema = _enum([
@@ -7441,6 +7425,55 @@ var OpsLogQueryInputSchema = object({
7441
7425
  limit: number$1().int().min(1).max(1e3).optional()
7442
7426
  });
7443
7427
  /**
7428
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7429
+ *
7430
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7431
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7432
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7433
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7434
+ * after verify) and each completed/failed run also lands one durable ops-log
7435
+ * row on the owning addon's surface.
7436
+ */
7437
+ var RelocateJobStateSchema = _enum([
7438
+ "running",
7439
+ "done",
7440
+ "failed",
7441
+ "cancelled"
7442
+ ]);
7443
+ var RelocateJobSchema = object({
7444
+ jobId: string(),
7445
+ state: RelocateJobStateSchema,
7446
+ /** Source location — for media relocation this is informational ('*': rows
7447
+ * move from wherever they are to the target). */
7448
+ fromLocationId: string(),
7449
+ toLocationId: string(),
7450
+ /** Scoped device, or null = every device. */
7451
+ deviceId: number$1().nullable(),
7452
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7453
+ entities: array(string()),
7454
+ filesMoved: number$1().int(),
7455
+ bytesMoved: number$1().int(),
7456
+ /** Total files discovered up front; null while (or when) unknown. */
7457
+ filesTotal: number$1().int().nullable(),
7458
+ startedAt: number$1(),
7459
+ finishedAt: number$1().nullable(),
7460
+ error: string().nullable()
7461
+ });
7462
+ var RelocateFootageInputSchema = object({
7463
+ deviceId: number$1().optional(),
7464
+ fromLocationId: string(),
7465
+ toLocationId: string(),
7466
+ entities: array(_enum(["segments", "strips"])).optional(),
7467
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7468
+ * never allowed to starve live writers. */
7469
+ throttleMbps: number$1().min(1).max(1e3).optional()
7470
+ });
7471
+ var RelocateMediaInputSchema = object({
7472
+ deviceId: number$1().optional(),
7473
+ toLocationId: string(),
7474
+ throttleMbps: number$1().min(1).max(1e3).optional()
7475
+ });
7476
+ /**
7444
7477
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7445
7478
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7446
7479
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7490,6 +7523,13 @@ var StorageLocationSchema = object({
7490
7523
  nodeId: string().optional(),
7491
7524
  isDefault: boolean().default(false),
7492
7525
  isSystem: boolean().default(false),
7526
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7527
+ * for node-local locations it can reach) — never persisted, absent when the
7528
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7529
+ capacity: object({
7530
+ totalBytes: number$1(),
7531
+ availableBytes: number$1()
7532
+ }).nullable().optional(),
7493
7533
  createdAt: number$1(),
7494
7534
  updatedAt: number$1()
7495
7535
  });
@@ -8257,7 +8297,8 @@ var NcTaxonomyEntrySchema = object({
8257
8297
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8258
8298
  parentKind: string().nullable()
8259
8299
  });
8260
- object({
8300
+ /** The complete NC picker taxonomy — three grouped buckets. */
8301
+ var NcTaxonomySchema = object({
8261
8302
  videoClasses: array(NcTaxonomyEntrySchema),
8262
8303
  audioKinds: array(NcTaxonomyEntrySchema),
8263
8304
  labels: array(NcTaxonomyEntrySchema)
@@ -8917,6 +8958,7 @@ var AccessoryKind = {
8917
8958
  };
8918
8959
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8919
8960
  DeviceFeature.BatteryOperated;
8961
+ new Set(["devices", "classes"]);
8920
8962
  /**
8921
8963
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8922
8964
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9075,6 +9117,29 @@ var NcOccupancyConditionSchema = object({
9075
9117
  count: number$1().int().min(0).default(1),
9076
9118
  sustainSeconds: number$1().int().min(0).max(3600).default(15)
9077
9119
  });
9120
+ /**
9121
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9122
+ *
9123
+ * The values are not symmetric, and deliberately so — the absent value has to
9124
+ * mean exactly what every rule authored before this condition existed already
9125
+ * does:
9126
+ * - `enter` — entries and every NON-crossing record (movement state,
9127
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9128
+ * an operator who never asked for exits must not start receiving them.
9129
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9130
+ * fails closed, because "the car left the drive" is a question about a
9131
+ * boundary, not about a detection.
9132
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9133
+ *
9134
+ * A rule asking for a direction should normally also scope `zones`, which the
9135
+ * engine evaluates against the crossed zone as well as the current membership
9136
+ * (an exit's membership no longer contains the zone it just left).
9137
+ */
9138
+ var NcCrossingSchema = _enum([
9139
+ "enter",
9140
+ "exit",
9141
+ "any"
9142
+ ]);
9078
9143
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9079
9144
  var NcZoneConditionSchema = object({
9080
9145
  ids: array(string().min(1)).min(1),
@@ -9099,6 +9164,13 @@ var NcConditionsSchema = object({
9099
9164
  /** Veto zones — any hit fails the rule. */
9100
9165
  zonesExclude: array(string().min(1)).optional(),
9101
9166
  /**
9167
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9168
+ * and a closed track carries none, so a `track-end` rule asking for one
9169
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9170
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9171
+ */
9172
+ crossing: NcCrossingSchema.optional(),
9173
+ /**
9102
9174
  * Exact (case-insensitive) match on the record's collapsed `label`
9103
9175
  * (identity name / plate text / subclass).
9104
9176
  */
@@ -9233,17 +9305,85 @@ var NcRuleTargetSchema = object({
9233
9305
  * - `keyFrame` — the clean scene frame (no subject box).
9234
9306
  * - `none` — no attachment.
9235
9307
  */
9236
- var NcMediaPolicySchema = object({ attach: _enum([
9237
- "best",
9238
- "best-matching",
9239
- "keyFrame",
9240
- "none"
9241
- ]).default("best") });
9308
+ /**
9309
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9310
+ * conflate it with the selection strategy and betray the request: asking for
9311
+ * the clean scene frame on an object-event owner used to start at
9312
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9313
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9314
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9315
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9316
+ * the pipeline actually saw.
9317
+ */
9318
+ var NcMediaFrameSchema = _enum([
9319
+ "cropped",
9320
+ "full",
9321
+ "boxed"
9322
+ ]);
9323
+ var NcMediaPolicySchema = object({
9324
+ attach: _enum([
9325
+ "best",
9326
+ "best-matching",
9327
+ "keyFrame",
9328
+ "none"
9329
+ ]).default("best"),
9330
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9331
+ frame: NcMediaFrameSchema.optional(),
9332
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9333
+ * "show me the ZONE", not the whole scene or the subject crop. */
9334
+ zoneCrop: boolean().optional(),
9335
+ /**
9336
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9337
+ * event — NOT from the recording, so the camera does not have to be
9338
+ * recording, and the window sits AROUND the moment instead of a segment
9339
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9340
+ * gif, never a failed notification.
9341
+ */
9342
+ gif: boolean().optional(),
9343
+ /**
9344
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9345
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9346
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9347
+ * the degrade engine, which drops the video and keeps the still.
9348
+ */
9349
+ clip: boolean().optional(),
9350
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9351
+ clipPreRollSec: number$1().int().min(0).max(30).optional(),
9352
+ clipPostRollSec: number$1().int().min(0).max(30).optional(),
9353
+ /**
9354
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9355
+ * assigned profile: a notification is watched on a phone, so the 4K
9356
+ * rendition would burn CPU to produce a file the client downscales anyway.
9357
+ * A profile that is not assigned falls back to the cheapest, and the render
9358
+ * reports which one actually ran.
9359
+ */
9360
+ profile: CamProfileSchema.optional()
9361
+ });
9362
+ /**
9363
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9364
+ * notification suppresses.
9365
+ * - `shared` (default, and the absent value) — one window for the whole
9366
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9367
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9368
+ * at once and cat→cat still waits.
9369
+ *
9370
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9371
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9372
+ * see `cooldownKey` in the rule engine).
9373
+ */
9374
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9242
9375
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9243
9376
  var NcThrottleSchema = object({
9244
9377
  cooldownSec: number$1().int().min(0).max(86400).default(60),
9245
9378
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9246
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9379
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9380
+ /**
9381
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9382
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9383
+ * rule authored before this field simply carries none — and the engine
9384
+ * reads absent as `shared`, the pre-existing behaviour.
9385
+ */
9386
+ granularity: NcThrottleGranularitySchema.optional()
9247
9387
  });
9248
9388
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9249
9389
  var NcRuleInputSchema = object({
@@ -9252,7 +9392,19 @@ var NcRuleInputSchema = object({
9252
9392
  delivery: NcDeliverySchema,
9253
9393
  conditions: NcConditionsSchema.default({}),
9254
9394
  schedule: NcScheduleSchema.optional(),
9255
- targets: array(NcRuleTargetSchema).min(1),
9395
+ /** May be empty when `targetUsers` addresses at least one user — the
9396
+ * "at least one addressee" invariant is enforced by the provider, because
9397
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9398
+ targets: array(NcRuleTargetSchema),
9399
+ /**
9400
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9401
+ * time each user fans out to the personal targets they own
9402
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9403
+ * firing camera — a user is never notified about a device they cannot open.
9404
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9405
+ * targets.
9406
+ */
9407
+ targetUsers: array(string()).optional(),
9256
9408
  media: NcMediaPolicySchema.default({ attach: "best" }),
9257
9409
  throttle: NcThrottleSchema.default({
9258
9410
  cooldownSec: 60,
@@ -9339,6 +9491,7 @@ var NcConditionDescriptorSchema = object({
9339
9491
  "schedule",
9340
9492
  "plateMatcher",
9341
9493
  "packagePhase",
9494
+ "crossingSelect",
9342
9495
  "polygonDraw",
9343
9496
  "occupancy"
9344
9497
  ]),
@@ -9465,7 +9618,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9465
9618
  }), object({ results: array(NcTestResultSchema) }), {
9466
9619
  kind: "mutation",
9467
9620
  auth: "admin"
9468
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9621
+ }), method(object({}), object({
9622
+ catalog: array(NcConditionDescriptorSchema),
9623
+ taxonomy: NcTaxonomySchema.optional()
9624
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9469
9625
  /**
9470
9626
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9471
9627
  *
@@ -10202,6 +10358,28 @@ method(object({
10202
10358
  }), object({ success: literal(true) }), {
10203
10359
  kind: "mutation",
10204
10360
  auth: "admin"
10361
+ }), method(object({
10362
+ deviceId: number$1(),
10363
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10364
+ * watched on a phone, and the cheap rendition is the right default. */
10365
+ profile: CamProfileSchema.optional(),
10366
+ aroundMs: number$1(),
10367
+ preRollSec: number$1().min(0).max(20).default(3),
10368
+ postRollSec: number$1().min(0).max(20).default(5),
10369
+ format: _enum(["gif", "mp4"]).default("gif"),
10370
+ maxWidth: number$1().int().min(120).max(1920).default(480),
10371
+ /** GIF only — MP4 keeps the source cadence. */
10372
+ fps: number$1().int().min(1).max(15).default(5)
10373
+ }), object({
10374
+ base64: string(),
10375
+ mime: string(),
10376
+ bytes: number$1().int(),
10377
+ /** The profile actually rendered (what the default resolved to). */
10378
+ profile: CamProfileSchema,
10379
+ durationMs: number$1()
10380
+ }), {
10381
+ kind: "mutation",
10382
+ auth: "admin"
10205
10383
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10206
10384
  probed: boolean(),
10207
10385
  summary: string()
@@ -15821,7 +15999,10 @@ method(object({
15821
15999
  }), method(object({
15822
16000
  deviceId: number$1(),
15823
16001
  caps: array(string()).readonly().optional()
15824
- }), record(string(), unknown().nullable()));
16002
+ }), record(string(), unknown().nullable())), method(object({
16003
+ deviceIds: array(number$1()).readonly(),
16004
+ caps: array(string()).readonly().optional()
16005
+ }), record(string(), record(string(), unknown().nullable())));
15825
16006
  method(object({ deviceId: number$1() }), record(string(), record(string(), unknown()))), method(object({
15826
16007
  deviceId: number$1(),
15827
16008
  capName: string()
@@ -16752,6 +16933,36 @@ var TargetKindSchema = object({
16752
16933
  icon: string(),
16753
16934
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16754
16935
  addonId: string(),
16936
+ /**
16937
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16938
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16939
+ * when the addon bundles no icon for that kind — the client then falls back
16940
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16941
+ *
16942
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16943
+ * client, and a native client joins it onto its own hub base.
16944
+ *
16945
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16946
+ * field that survived only because the runtime cap-router forwards provider
16947
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16948
+ * its own Zod parse from stripping it, and the whole arrangement would have
16949
+ * broken silently the moment output validation was tightened anywhere.
16950
+ */
16951
+ iconUrl: string().optional(),
16952
+ /**
16953
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16954
+ *
16955
+ * The server knows this and therefore says it, because the client cannot
16956
+ * safely guess: a React-Native client renders SVG and raster through two
16957
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16958
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16959
+ * placeholder glyph for every vector icon while the web build looked fine.
16960
+ *
16961
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16962
+ * not been updated — a client that cannot determine the type should prefer
16963
+ * its raster path, which is the safe default for an unknown image.
16964
+ */
16965
+ iconMediaType: string().optional(),
16755
16966
  configSchema: ConfigSchemaPassthrough,
16756
16967
  supportsDiscovery: boolean(),
16757
16968
  caps: TargetKindCapsSchema
@@ -17199,6 +17410,29 @@ var MotionEventSchema = object({
17199
17410
  * Absent on legacy rows ⇒ treat as `pipeline`.
17200
17411
  */
17201
17412
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17413
+ /**
17414
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17415
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17416
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17417
+ * appearance event carry none, so a rule asking for a direction fails closed
17418
+ * on them.
17419
+ *
17420
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17421
+ * into its own event, so a frame in which a track enters A while leaving B
17422
+ * produces two events with two directions — never one ambiguous row.
17423
+ *
17424
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17425
+ * membership the box has NOW, and by definition it no longer contains the zone
17426
+ * that was just left. Without the id here, a zone-scoped rule could never match
17427
+ * the exit it asked for.
17428
+ */
17429
+ var ZoneCrossingSchema = object({
17430
+ direction: _enum(["enter", "exit"]),
17431
+ /** Admin zone id crossed. */
17432
+ zoneId: string(),
17433
+ /** Zone display name at crossing time (falls back to the id). */
17434
+ zoneName: string().optional()
17435
+ });
17202
17436
  var ObjectEventSchema = object({
17203
17437
  ...BaseEventFields,
17204
17438
  kind: literal("object"),
@@ -17225,6 +17459,12 @@ var ObjectEventSchema = object({
17225
17459
  zones: array(string()).readonly().optional(),
17226
17460
  /** Omitted in slim projection. */
17227
17461
  state: TrackStateSchema.optional(),
17462
+ /**
17463
+ * The zone crossing this event IS, when it is one. Absent on every other
17464
+ * event kind (movement state, appearance, package) — see
17465
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17466
+ */
17467
+ zoneCrossing: ZoneCrossingSchema.optional(),
17228
17468
  /** Detection-frame dimensions in pixels — let consumers normalize the
17229
17469
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17230
17470
  frameWidth: number$1().optional(),
@@ -17483,6 +17723,15 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
17483
17723
  }), method(object({ deviceId: number$1() }), EventPruneCountsSchema, {
17484
17724
  kind: "mutation",
17485
17725
  auth: "admin"
17726
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17727
+ kind: "mutation",
17728
+ auth: "admin"
17729
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17730
+ kind: "query",
17731
+ auth: "admin"
17732
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17733
+ kind: "mutation",
17734
+ auth: "admin"
17486
17735
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17487
17736
  kind: "query",
17488
17737
  auth: "admin"
@@ -19962,6 +20211,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
19962
20211
  */
19963
20212
  priority: number$1()
19964
20213
  })).readonly() });
20214
+ /**
20215
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20216
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20217
+ * what AUTO currently picks, so the UI can show the effective value either way.
20218
+ */
20219
+ var NotificationEndpointSchema = object({
20220
+ /** The operator's explicit choice, or null for AUTO. */
20221
+ baseUrl: string().nullable(),
20222
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20223
+ resolved: string().nullable()
20224
+ });
19965
20225
  var AllowedAddressesSchema = object({
19966
20226
  /**
19967
20227
  * Allowlist of interface addresses operators have explicitly opted
@@ -19984,7 +20244,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
19984
20244
  * to avoid mixed-content blocks in the browser. The public
19985
20245
  * tunnel always emits `https://` regardless. */
19986
20246
  scheme: _enum(["http", "https"]).optional()
19987
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20247
+ }), 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" });
19988
20248
  /**
19989
20249
  * mesh-network — collection cap for mesh-VPN providers.
19990
20250
  *
@@ -20783,7 +21043,12 @@ var RecordingDeviceUsageSchema = object({
20783
21043
  var RecordingLocationUsageSchema = object({
20784
21044
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20785
21045
  locationId: string().nullable(),
20786
- /** Bytes of recordings stored on this location. */
21046
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21047
+ * is emitted per physical disk (2026-07-29): two locations on one root
21048
+ * previously rendered as two identical "disks" with a nonsensical used
21049
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21050
+ locationIds: array(string()).optional(),
21051
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20787
21052
  usedBytes: number$1(),
20788
21053
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20789
21054
  availableBytes: number$1().nullable(),
@@ -20895,6 +21160,44 @@ method(object({
20895
21160
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20896
21161
  kind: "query",
20897
21162
  auth: "admin"
21163
+ }), method(object({
21164
+ deviceId: number$1(),
21165
+ aroundMs: number$1(),
21166
+ preRollSec: number$1().min(0).max(30).default(2),
21167
+ postRollSec: number$1().min(0).max(30).default(5),
21168
+ maxWidth: number$1().int().min(120).max(1280).default(480),
21169
+ fps: number$1().int().min(1).max(15).default(5)
21170
+ }), object({
21171
+ gifBase64: string(),
21172
+ fromMs: number$1(),
21173
+ toMs: number$1()
21174
+ }), {
21175
+ kind: "mutation",
21176
+ auth: "admin"
21177
+ }), method(object({
21178
+ deviceId: number$1(),
21179
+ aroundMs: number$1(),
21180
+ preRollSec: number$1().min(0).max(30).default(3),
21181
+ postRollSec: number$1().min(0).max(30).default(7),
21182
+ maxWidth: number$1().int().min(160).max(1920).default(640)
21183
+ }), object({
21184
+ clipBase64: string(),
21185
+ mime: string(),
21186
+ fromMs: number$1(),
21187
+ toMs: number$1(),
21188
+ bytes: number$1().int()
21189
+ }), {
21190
+ kind: "mutation",
21191
+ auth: "admin"
21192
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21193
+ kind: "mutation",
21194
+ auth: "admin"
21195
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21196
+ kind: "query",
21197
+ auth: "admin"
21198
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21199
+ kind: "mutation",
21200
+ auth: "admin"
20898
21201
  });
20899
21202
  /**
20900
21203
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22486,6 +22789,12 @@ Object.freeze({
22486
22789
  addonId: null,
22487
22790
  access: "view"
22488
22791
  },
22792
+ "deviceManager.getDeviceStatusAggregateBatch": {
22793
+ capName: "device-manager",
22794
+ capScope: "system",
22795
+ addonId: null,
22796
+ access: "view"
22797
+ },
22489
22798
  "deviceManager.getLinkedDevices": {
22490
22799
  capName: "device-manager",
22491
22800
  capScope: "system",
@@ -23380,6 +23689,12 @@ Object.freeze({
23380
23689
  addonId: null,
23381
23690
  access: "view"
23382
23691
  },
23692
+ "localNetwork.getNotificationEndpoint": {
23693
+ capName: "local-network",
23694
+ capScope: "system",
23695
+ addonId: null,
23696
+ access: "view"
23697
+ },
23383
23698
  "localNetwork.getPreferred": {
23384
23699
  capName: "local-network",
23385
23700
  capScope: "system",
@@ -23404,6 +23719,12 @@ Object.freeze({
23404
23719
  addonId: null,
23405
23720
  access: "create"
23406
23721
  },
23722
+ "localNetwork.setNotificationEndpoint": {
23723
+ capName: "local-network",
23724
+ capScope: "system",
23725
+ addonId: null,
23726
+ access: "create"
23727
+ },
23407
23728
  "lockControl.lock": {
23408
23729
  capName: "lock-control",
23409
23730
  capScope: "device",
@@ -24046,6 +24367,12 @@ Object.freeze({
24046
24367
  addonId: null,
24047
24368
  access: "create"
24048
24369
  },
24370
+ "pipelineAnalytics.cancelMediaRelocate": {
24371
+ capName: "pipeline-analytics",
24372
+ capScope: "device",
24373
+ addonId: null,
24374
+ access: "create"
24375
+ },
24049
24376
  "pipelineAnalytics.clearTracks": {
24050
24377
  capName: "pipeline-analytics",
24051
24378
  capScope: "device",
@@ -24100,6 +24427,12 @@ Object.freeze({
24100
24427
  addonId: null,
24101
24428
  access: "view"
24102
24429
  },
24430
+ "pipelineAnalytics.getMediaRelocateStatus": {
24431
+ capName: "pipeline-analytics",
24432
+ capScope: "device",
24433
+ addonId: null,
24434
+ access: "view"
24435
+ },
24103
24436
  "pipelineAnalytics.getMotionEvents": {
24104
24437
  capName: "pipeline-analytics",
24105
24438
  capScope: "device",
@@ -24172,6 +24505,12 @@ Object.freeze({
24172
24505
  addonId: null,
24173
24506
  access: "create"
24174
24507
  },
24508
+ "pipelineAnalytics.relocateMedia": {
24509
+ capName: "pipeline-analytics",
24510
+ capScope: "device",
24511
+ addonId: null,
24512
+ access: "create"
24513
+ },
24175
24514
  "pipelineAnalytics.searchObjectEvents": {
24176
24515
  capName: "pipeline-analytics",
24177
24516
  capScope: "device",
@@ -24934,6 +25273,12 @@ Object.freeze({
24934
25273
  addonId: null,
24935
25274
  access: "create"
24936
25275
  },
25276
+ "recording.cancelRelocate": {
25277
+ capName: "recording",
25278
+ capScope: "system",
25279
+ addonId: null,
25280
+ access: "create"
25281
+ },
24937
25282
  "recording.deleteFootprint": {
24938
25283
  capName: "recording",
24939
25284
  capScope: "system",
@@ -24964,6 +25309,12 @@ Object.freeze({
24964
25309
  addonId: null,
24965
25310
  access: "view"
24966
25311
  },
25312
+ "recording.getRelocateStatus": {
25313
+ capName: "recording",
25314
+ capScope: "system",
25315
+ addonId: null,
25316
+ access: "view"
25317
+ },
24967
25318
  "recording.getStorageUsage": {
24968
25319
  capName: "recording",
24969
25320
  capScope: "system",
@@ -24994,6 +25345,24 @@ Object.freeze({
24994
25345
  addonId: null,
24995
25346
  access: "view"
24996
25347
  },
25348
+ "recording.relocateFootage": {
25349
+ capName: "recording",
25350
+ capScope: "system",
25351
+ addonId: null,
25352
+ access: "create"
25353
+ },
25354
+ "recording.renderClip": {
25355
+ capName: "recording",
25356
+ capScope: "system",
25357
+ addonId: null,
25358
+ access: "create"
25359
+ },
25360
+ "recording.renderGif": {
25361
+ capName: "recording",
25362
+ capScope: "system",
25363
+ addonId: null,
25364
+ access: "create"
25365
+ },
24997
25366
  "recording.rescanStorage": {
24998
25367
  capName: "recording",
24999
25368
  capScope: "system",
@@ -25588,6 +25957,12 @@ Object.freeze({
25588
25957
  addonId: null,
25589
25958
  access: "create"
25590
25959
  },
25960
+ "streamBroker.renderPreBufferClip": {
25961
+ capName: "stream-broker",
25962
+ capScope: "system",
25963
+ addonId: null,
25964
+ access: "create"
25965
+ },
25591
25966
  "streamBroker.restartProfile": {
25592
25967
  capName: "stream-broker",
25593
25968
  capScope: "system",