@camstack/addon-provider-homematic 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.
Files changed (3) hide show
  1. package/dist/addon.js +451 -76
  2. package/dist/addon.mjs +451 -76
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -9,7 +9,7 @@ import { join } from "path";
9
9
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
11
11
  //#endregion
12
- //#region ../types/dist/event-category-BLcNejAE.mjs
12
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
13
13
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  EventCategory["SystemBoot"] = "system.boot";
15
15
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -280,6 +280,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
280
280
  */
281
281
  EventCategory["DeviceStateChanged"] = "device.state-changed";
282
282
  /**
283
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
284
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
285
+ *
286
+ * Emitted only on a change, so a steady scene is silent. It exists so a
287
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
288
+ * one live badge with no push signal at all, and it cost a request every
289
+ * four seconds per visible camera.
290
+ *
291
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
292
+ * keeps a slow reconcile rather than trusting it alone.
293
+ */
294
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
295
+ /**
283
296
  * Cap event fired by every device that registers the `battery`
284
297
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
285
298
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7223,35 +7236,22 @@ var ConvertResultSchema = object({
7223
7236
  */
7224
7237
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7225
7238
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7226
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7227
- kind: literal("timeOfDay"),
7228
- start: string().regex(HHMM),
7229
- end: string().regex(HHMM),
7230
- /** Restrict to these weekdays; omit = every day. */
7231
- days: array(RecordingWeekdaySchema).optional()
7232
- })]);
7233
- var RecordingModeSchema = _enum([
7234
- "continuous",
7235
- "onMotion",
7236
- "onAudioThreshold"
7237
- ]);
7238
7239
  /**
7239
- * First-class, authoritative per-camera storage mode — the explicit choice the
7240
- * UI reads directly (never inferred from `rules`):
7241
- * - `off` — not recording.
7242
- * - `events` — record only around triggers (motion / audio threshold),
7243
- * with pre/post-buffer.
7244
- * - `continuous` — record 24/7 within the schedule.
7240
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7241
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7242
+ * - `off` — no band covers the camera (or it is disabled).
7243
+ * - `events` — every band records around triggers only.
7244
+ * - `continuous` — at least one band records continuously.
7245
7245
  *
7246
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7247
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7246
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7247
+ * every save (`activeModeForConfig`). Writing it has no effect.
7248
7248
  */
7249
7249
  var RecordingStorageModeSchema = _enum([
7250
7250
  "off",
7251
7251
  "events",
7252
7252
  "continuous"
7253
7253
  ]);
7254
- /** Which detectors trigger an `events`-mode recording. */
7254
+ /** Which detectors trigger an `events`-mode band. */
7255
7255
  var RecordingTriggersSchema = object({
7256
7256
  motion: boolean().optional(),
7257
7257
  audioThresholdDbfs: number().optional()
@@ -7287,18 +7287,6 @@ var RecordingBandSchema = object({
7287
7287
  preBufferSec: number().min(0).optional(),
7288
7288
  postBufferSec: number().min(0).optional()
7289
7289
  });
7290
- var RecordingRuleSchema = object({
7291
- schedule: RecordingScheduleSchema,
7292
- mode: RecordingModeSchema,
7293
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7294
- preBufferSec: number().min(0).default(0),
7295
- /** Keep recording until this many seconds after the last trigger. */
7296
- postBufferSec: number().min(0).default(0),
7297
- /** Each new trigger restarts the post-buffer window. */
7298
- resetTimeoutOnNewEvent: boolean().default(true),
7299
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7300
- thresholdDbfs: number().optional()
7301
- });
7302
7290
  /**
7303
7291
  * Per-device retention overrides. Every field is optional; an unset or `0`
7304
7292
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7332,40 +7320,28 @@ var ScrubThumbnailPresetSchema = _enum([
7332
7320
  /**
7333
7321
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7334
7322
  *
7335
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7336
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7337
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7338
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7323
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7324
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7325
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7326
+ *
7327
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7328
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7329
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7330
+ * persist a band-less config, i.e. silently stop recording the camera.
7339
7331
  */
7340
7332
  var RecordingConfigSchema = object({
7341
7333
  enabled: boolean(),
7342
- /** Authoritative storage mode. Absent on legacy targets → derived once via
7343
- * `migrateRulesToMode`, then persisted. */
7334
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7335
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7344
7336
  mode: RecordingStorageModeSchema.optional(),
7345
7337
  profiles: array(CamProfileSchema).optional(),
7346
7338
  segmentSeconds: number().int().positive().optional(),
7347
- /** Shared recording time-bands for `events` & `continuous` — record only when
7348
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7349
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7350
- schedules: array(RecordingScheduleSchema).optional(),
7351
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7352
- * normalized into `schedules` on read and never written going forward. (Not
7353
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7354
- schedule: RecordingScheduleSchema.optional(),
7355
- /** `events`-mode only — which detectors trigger a recording. */
7356
- triggers: RecordingTriggersSchema.optional(),
7357
- /** `events`-mode only — seconds retained before / after a trigger. */
7358
- preBufferSec: number().min(0).optional(),
7359
- postBufferSec: number().min(0).optional(),
7360
- /** DEPRECATED authoring input; retained for migration/transition. */
7361
- rules: array(RecordingRuleSchema).optional(),
7362
7339
  /**
7363
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7364
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7365
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7366
- * derived into bands once via `migrateConfigToBands`.
7340
+ * AUTHORITATIVE mode-per-band recording model — the single source of truth
7341
+ * the recorder's band engine consumes. An empty array = record nothing;
7342
+ * "off" is the absence of a covering band, never a band value.
7367
7343
  */
7368
- bands: array(RecordingBandSchema).optional(),
7344
+ bands: array(RecordingBandSchema).default([]),
7369
7345
  retention: RecordingRetentionSchema.optional(),
7370
7346
  /**
7371
7347
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7373,8 +7349,15 @@ var RecordingConfigSchema = object({
7373
7349
  * windows only — existing sheets are immutable, and each window's index
7374
7350
  * carries its own tile dims so mixed-preset history renders correctly.
7375
7351
  */
7376
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7377
- });
7352
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7353
+ /**
7354
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7355
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7356
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7357
+ * are written and scrub reads exact keyframes at every velocity.
7358
+ */
7359
+ stripsEnabled: boolean().optional()
7360
+ }).strict();
7378
7361
  /**
7379
7362
  * Ops-log — the durable, append-only operations audit shared by the
7380
7363
  * recordings and events management surfaces.
@@ -7393,7 +7376,8 @@ var OpsLogOpSchema = _enum([
7393
7376
  "prune",
7394
7377
  "manual-delete",
7395
7378
  "rescan",
7396
- "retention-run"
7379
+ "retention-run",
7380
+ "relocate"
7397
7381
  ]);
7398
7382
  /** Why the operation ran. */
7399
7383
  var OpsLogReasonSchema = _enum([
@@ -7432,6 +7416,55 @@ var OpsLogQueryInputSchema = object({
7432
7416
  limit: number().int().min(1).max(1e3).optional()
7433
7417
  });
7434
7418
  /**
7419
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7420
+ *
7421
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7422
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7423
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7424
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7425
+ * after verify) and each completed/failed run also lands one durable ops-log
7426
+ * row on the owning addon's surface.
7427
+ */
7428
+ var RelocateJobStateSchema = _enum([
7429
+ "running",
7430
+ "done",
7431
+ "failed",
7432
+ "cancelled"
7433
+ ]);
7434
+ var RelocateJobSchema = object({
7435
+ jobId: string(),
7436
+ state: RelocateJobStateSchema,
7437
+ /** Source location — for media relocation this is informational ('*': rows
7438
+ * move from wherever they are to the target). */
7439
+ fromLocationId: string(),
7440
+ toLocationId: string(),
7441
+ /** Scoped device, or null = every device. */
7442
+ deviceId: number().nullable(),
7443
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7444
+ entities: array(string()),
7445
+ filesMoved: number().int(),
7446
+ bytesMoved: number().int(),
7447
+ /** Total files discovered up front; null while (or when) unknown. */
7448
+ filesTotal: number().int().nullable(),
7449
+ startedAt: number(),
7450
+ finishedAt: number().nullable(),
7451
+ error: string().nullable()
7452
+ });
7453
+ var RelocateFootageInputSchema = object({
7454
+ deviceId: number().optional(),
7455
+ fromLocationId: string(),
7456
+ toLocationId: string(),
7457
+ entities: array(_enum(["segments", "strips"])).optional(),
7458
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7459
+ * never allowed to starve live writers. */
7460
+ throttleMbps: number().min(1).max(1e3).optional()
7461
+ });
7462
+ var RelocateMediaInputSchema = object({
7463
+ deviceId: number().optional(),
7464
+ toLocationId: string(),
7465
+ throttleMbps: number().min(1).max(1e3).optional()
7466
+ });
7467
+ /**
7435
7468
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7436
7469
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7437
7470
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7481,6 +7514,13 @@ var StorageLocationSchema = object({
7481
7514
  nodeId: string().optional(),
7482
7515
  isDefault: boolean().default(false),
7483
7516
  isSystem: boolean().default(false),
7517
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7518
+ * for node-local locations it can reach) — never persisted, absent when the
7519
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7520
+ capacity: object({
7521
+ totalBytes: number(),
7522
+ availableBytes: number()
7523
+ }).nullable().optional(),
7484
7524
  createdAt: number(),
7485
7525
  updatedAt: number()
7486
7526
  });
@@ -8248,7 +8288,8 @@ var NcTaxonomyEntrySchema = object({
8248
8288
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8249
8289
  parentKind: string().nullable()
8250
8290
  });
8251
- object({
8291
+ /** The complete NC picker taxonomy — three grouped buckets. */
8292
+ var NcTaxonomySchema = object({
8252
8293
  videoClasses: array(NcTaxonomyEntrySchema),
8253
8294
  audioKinds: array(NcTaxonomyEntrySchema),
8254
8295
  labels: array(NcTaxonomyEntrySchema)
@@ -9151,6 +9192,7 @@ function shallowEqual(a, b) {
9151
9192
  for (const k of ak) if (a[k] !== b[k]) return false;
9152
9193
  return true;
9153
9194
  }
9195
+ new Set(["devices", "classes"]);
9154
9196
  /**
9155
9197
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9156
9198
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9309,6 +9351,29 @@ var NcOccupancyConditionSchema = object({
9309
9351
  count: number().int().min(0).default(1),
9310
9352
  sustainSeconds: number().int().min(0).max(3600).default(15)
9311
9353
  });
9354
+ /**
9355
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9356
+ *
9357
+ * The values are not symmetric, and deliberately so — the absent value has to
9358
+ * mean exactly what every rule authored before this condition existed already
9359
+ * does:
9360
+ * - `enter` — entries and every NON-crossing record (movement state,
9361
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9362
+ * an operator who never asked for exits must not start receiving them.
9363
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9364
+ * fails closed, because "the car left the drive" is a question about a
9365
+ * boundary, not about a detection.
9366
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9367
+ *
9368
+ * A rule asking for a direction should normally also scope `zones`, which the
9369
+ * engine evaluates against the crossed zone as well as the current membership
9370
+ * (an exit's membership no longer contains the zone it just left).
9371
+ */
9372
+ var NcCrossingSchema = _enum([
9373
+ "enter",
9374
+ "exit",
9375
+ "any"
9376
+ ]);
9312
9377
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9313
9378
  var NcZoneConditionSchema = object({
9314
9379
  ids: array(string().min(1)).min(1),
@@ -9333,6 +9398,13 @@ var NcConditionsSchema = object({
9333
9398
  /** Veto zones — any hit fails the rule. */
9334
9399
  zonesExclude: array(string().min(1)).optional(),
9335
9400
  /**
9401
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9402
+ * and a closed track carries none, so a `track-end` rule asking for one
9403
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9404
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9405
+ */
9406
+ crossing: NcCrossingSchema.optional(),
9407
+ /**
9336
9408
  * Exact (case-insensitive) match on the record's collapsed `label`
9337
9409
  * (identity name / plate text / subclass).
9338
9410
  */
@@ -9467,17 +9539,85 @@ var NcRuleTargetSchema = object({
9467
9539
  * - `keyFrame` — the clean scene frame (no subject box).
9468
9540
  * - `none` — no attachment.
9469
9541
  */
9470
- var NcMediaPolicySchema = object({ attach: _enum([
9471
- "best",
9472
- "best-matching",
9473
- "keyFrame",
9474
- "none"
9475
- ]).default("best") });
9542
+ /**
9543
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9544
+ * conflate it with the selection strategy and betray the request: asking for
9545
+ * the clean scene frame on an object-event owner used to start at
9546
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9547
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9548
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9549
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9550
+ * the pipeline actually saw.
9551
+ */
9552
+ var NcMediaFrameSchema = _enum([
9553
+ "cropped",
9554
+ "full",
9555
+ "boxed"
9556
+ ]);
9557
+ var NcMediaPolicySchema = object({
9558
+ attach: _enum([
9559
+ "best",
9560
+ "best-matching",
9561
+ "keyFrame",
9562
+ "none"
9563
+ ]).default("best"),
9564
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9565
+ frame: NcMediaFrameSchema.optional(),
9566
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9567
+ * "show me the ZONE", not the whole scene or the subject crop. */
9568
+ zoneCrop: boolean().optional(),
9569
+ /**
9570
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9571
+ * event — NOT from the recording, so the camera does not have to be
9572
+ * recording, and the window sits AROUND the moment instead of a segment
9573
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9574
+ * gif, never a failed notification.
9575
+ */
9576
+ gif: boolean().optional(),
9577
+ /**
9578
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9579
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9580
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9581
+ * the degrade engine, which drops the video and keeps the still.
9582
+ */
9583
+ clip: boolean().optional(),
9584
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9585
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9586
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9587
+ /**
9588
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9589
+ * assigned profile: a notification is watched on a phone, so the 4K
9590
+ * rendition would burn CPU to produce a file the client downscales anyway.
9591
+ * A profile that is not assigned falls back to the cheapest, and the render
9592
+ * reports which one actually ran.
9593
+ */
9594
+ profile: CamProfileSchema.optional()
9595
+ });
9596
+ /**
9597
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9598
+ * notification suppresses.
9599
+ * - `shared` (default, and the absent value) — one window for the whole
9600
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9601
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9602
+ * at once and cat→cat still waits.
9603
+ *
9604
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9605
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9606
+ * see `cooldownKey` in the rule engine).
9607
+ */
9608
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9476
9609
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9477
9610
  var NcThrottleSchema = object({
9478
9611
  cooldownSec: number().int().min(0).max(86400).default(60),
9479
9612
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9480
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9613
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9614
+ /**
9615
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9616
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9617
+ * rule authored before this field simply carries none — and the engine
9618
+ * reads absent as `shared`, the pre-existing behaviour.
9619
+ */
9620
+ granularity: NcThrottleGranularitySchema.optional()
9481
9621
  });
9482
9622
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9483
9623
  var NcRuleInputSchema = object({
@@ -9486,7 +9626,19 @@ var NcRuleInputSchema = object({
9486
9626
  delivery: NcDeliverySchema,
9487
9627
  conditions: NcConditionsSchema.default({}),
9488
9628
  schedule: NcScheduleSchema.optional(),
9489
- targets: array(NcRuleTargetSchema).min(1),
9629
+ /** May be empty when `targetUsers` addresses at least one user — the
9630
+ * "at least one addressee" invariant is enforced by the provider, because
9631
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9632
+ targets: array(NcRuleTargetSchema),
9633
+ /**
9634
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9635
+ * time each user fans out to the personal targets they own
9636
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9637
+ * firing camera — a user is never notified about a device they cannot open.
9638
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9639
+ * targets.
9640
+ */
9641
+ targetUsers: array(string()).optional(),
9490
9642
  media: NcMediaPolicySchema.default({ attach: "best" }),
9491
9643
  throttle: NcThrottleSchema.default({
9492
9644
  cooldownSec: 60,
@@ -9573,6 +9725,7 @@ var NcConditionDescriptorSchema = object({
9573
9725
  "schedule",
9574
9726
  "plateMatcher",
9575
9727
  "packagePhase",
9728
+ "crossingSelect",
9576
9729
  "polygonDraw",
9577
9730
  "occupancy"
9578
9731
  ]),
@@ -9699,7 +9852,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9699
9852
  }), object({ results: array(NcTestResultSchema) }), {
9700
9853
  kind: "mutation",
9701
9854
  auth: "admin"
9702
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9855
+ }), method(object({}), object({
9856
+ catalog: array(NcConditionDescriptorSchema),
9857
+ taxonomy: NcTaxonomySchema.optional()
9858
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9703
9859
  /**
9704
9860
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9705
9861
  *
@@ -10708,6 +10864,28 @@ method(object({
10708
10864
  }), object({ success: literal(true) }), {
10709
10865
  kind: "mutation",
10710
10866
  auth: "admin"
10867
+ }), method(object({
10868
+ deviceId: number(),
10869
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10870
+ * watched on a phone, and the cheap rendition is the right default. */
10871
+ profile: CamProfileSchema.optional(),
10872
+ aroundMs: number(),
10873
+ preRollSec: number().min(0).max(20).default(3),
10874
+ postRollSec: number().min(0).max(20).default(5),
10875
+ format: _enum(["gif", "mp4"]).default("gif"),
10876
+ maxWidth: number().int().min(120).max(1920).default(480),
10877
+ /** GIF only — MP4 keeps the source cadence. */
10878
+ fps: number().int().min(1).max(15).default(5)
10879
+ }), object({
10880
+ base64: string(),
10881
+ mime: string(),
10882
+ bytes: number().int(),
10883
+ /** The profile actually rendered (what the default resolved to). */
10884
+ profile: CamProfileSchema,
10885
+ durationMs: number()
10886
+ }), {
10887
+ kind: "mutation",
10888
+ auth: "admin"
10711
10889
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10712
10890
  probed: boolean(),
10713
10891
  summary: string()
@@ -18836,7 +19014,10 @@ method(object({
18836
19014
  }), method(object({
18837
19015
  deviceId: number(),
18838
19016
  caps: array(string()).readonly().optional()
18839
- }), record(string(), unknown().nullable()));
19017
+ }), record(string(), unknown().nullable())), method(object({
19018
+ deviceIds: array(number()).readonly(),
19019
+ caps: array(string()).readonly().optional()
19020
+ }), record(string(), record(string(), unknown().nullable())));
18840
19021
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
18841
19022
  deviceId: number(),
18842
19023
  capName: string()
@@ -19767,6 +19948,36 @@ var TargetKindSchema = object({
19767
19948
  icon: string(),
19768
19949
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19769
19950
  addonId: string(),
19951
+ /**
19952
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
19953
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
19954
+ * when the addon bundles no icon for that kind — the client then falls back
19955
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
19956
+ *
19957
+ * Root-relative on purpose: it resolves against whatever origin serves a web
19958
+ * client, and a native client joins it onto its own hub base.
19959
+ *
19960
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
19961
+ * field that survived only because the runtime cap-router forwards provider
19962
+ * output verbatim — so every consumer had to re-declare it by hand to stop
19963
+ * its own Zod parse from stripping it, and the whole arrangement would have
19964
+ * broken silently the moment output validation was tightened anywhere.
19965
+ */
19966
+ iconUrl: string().optional(),
19967
+ /**
19968
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
19969
+ *
19970
+ * The server knows this and therefore says it, because the client cannot
19971
+ * safely guess: a React-Native client renders SVG and raster through two
19972
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
19973
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
19974
+ * placeholder glyph for every vector icon while the web build looked fine.
19975
+ *
19976
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
19977
+ * not been updated — a client that cannot determine the type should prefer
19978
+ * its raster path, which is the safe default for an unknown image.
19979
+ */
19980
+ iconMediaType: string().optional(),
19770
19981
  configSchema: ConfigSchemaPassthrough,
19771
19982
  supportsDiscovery: boolean(),
19772
19983
  caps: TargetKindCapsSchema
@@ -20214,6 +20425,29 @@ var MotionEventSchema = object({
20214
20425
  * Absent on legacy rows ⇒ treat as `pipeline`.
20215
20426
  */
20216
20427
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
20428
+ /**
20429
+ * The confirmed zone crossing that produced an object event. Present ONLY on
20430
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
20431
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
20432
+ * appearance event carry none, so a rule asking for a direction fails closed
20433
+ * on them.
20434
+ *
20435
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
20436
+ * into its own event, so a frame in which a track enters A while leaving B
20437
+ * produces two events with two directions — never one ambiguous row.
20438
+ *
20439
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
20440
+ * membership the box has NOW, and by definition it no longer contains the zone
20441
+ * that was just left. Without the id here, a zone-scoped rule could never match
20442
+ * the exit it asked for.
20443
+ */
20444
+ var ZoneCrossingSchema = object({
20445
+ direction: _enum(["enter", "exit"]),
20446
+ /** Admin zone id crossed. */
20447
+ zoneId: string(),
20448
+ /** Zone display name at crossing time (falls back to the id). */
20449
+ zoneName: string().optional()
20450
+ });
20217
20451
  var ObjectEventSchema = object({
20218
20452
  ...BaseEventFields,
20219
20453
  kind: literal("object"),
@@ -20240,6 +20474,12 @@ var ObjectEventSchema = object({
20240
20474
  zones: array(string()).readonly().optional(),
20241
20475
  /** Omitted in slim projection. */
20242
20476
  state: TrackStateSchema.optional(),
20477
+ /**
20478
+ * The zone crossing this event IS, when it is one. Absent on every other
20479
+ * event kind (movement state, appearance, package) — see
20480
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
20481
+ */
20482
+ zoneCrossing: ZoneCrossingSchema.optional(),
20243
20483
  /** Detection-frame dimensions in pixels — let consumers normalize the
20244
20484
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
20245
20485
  frameWidth: number().optional(),
@@ -20498,6 +20738,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20498
20738
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
20499
20739
  kind: "mutation",
20500
20740
  auth: "admin"
20741
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
20742
+ kind: "mutation",
20743
+ auth: "admin"
20744
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
20745
+ kind: "query",
20746
+ auth: "admin"
20747
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
20748
+ kind: "mutation",
20749
+ auth: "admin"
20501
20750
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20502
20751
  kind: "query",
20503
20752
  auth: "admin"
@@ -22977,6 +23226,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22977
23226
  */
22978
23227
  priority: number()
22979
23228
  })).readonly() });
23229
+ /**
23230
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23231
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
23232
+ * what AUTO currently picks, so the UI can show the effective value either way.
23233
+ */
23234
+ var NotificationEndpointSchema = object({
23235
+ /** The operator's explicit choice, or null for AUTO. */
23236
+ baseUrl: string().nullable(),
23237
+ /** What the ranking currently resolves to (null when nothing is reachable). */
23238
+ resolved: string().nullable()
23239
+ });
22980
23240
  var AllowedAddressesSchema = object({
22981
23241
  /**
22982
23242
  * Allowlist of interface addresses operators have explicitly opted
@@ -22999,7 +23259,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
22999
23259
  * to avoid mixed-content blocks in the browser. The public
23000
23260
  * tunnel always emits `https://` regardless. */
23001
23261
  scheme: _enum(["http", "https"]).optional()
23002
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
23262
+ }), 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" });
23003
23263
  /**
23004
23264
  * mesh-network — collection cap for mesh-VPN providers.
23005
23265
  *
@@ -23798,7 +24058,12 @@ var RecordingDeviceUsageSchema = object({
23798
24058
  var RecordingLocationUsageSchema = object({
23799
24059
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
23800
24060
  locationId: string().nullable(),
23801
- /** Bytes of recordings stored on this location. */
24061
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
24062
+ * is emitted per physical disk (2026-07-29): two locations on one root
24063
+ * previously rendered as two identical "disks" with a nonsensical used
24064
+ * split — hydrate attribution across aliases is arbitrary by nature. */
24065
+ locationIds: array(string()).optional(),
24066
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
23802
24067
  usedBytes: number(),
23803
24068
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
23804
24069
  availableBytes: number().nullable(),
@@ -23910,6 +24175,44 @@ method(object({
23910
24175
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
23911
24176
  kind: "query",
23912
24177
  auth: "admin"
24178
+ }), method(object({
24179
+ deviceId: number(),
24180
+ aroundMs: number(),
24181
+ preRollSec: number().min(0).max(30).default(2),
24182
+ postRollSec: number().min(0).max(30).default(5),
24183
+ maxWidth: number().int().min(120).max(1280).default(480),
24184
+ fps: number().int().min(1).max(15).default(5)
24185
+ }), object({
24186
+ gifBase64: string(),
24187
+ fromMs: number(),
24188
+ toMs: number()
24189
+ }), {
24190
+ kind: "mutation",
24191
+ auth: "admin"
24192
+ }), method(object({
24193
+ deviceId: number(),
24194
+ aroundMs: number(),
24195
+ preRollSec: number().min(0).max(30).default(3),
24196
+ postRollSec: number().min(0).max(30).default(7),
24197
+ maxWidth: number().int().min(160).max(1920).default(640)
24198
+ }), object({
24199
+ clipBase64: string(),
24200
+ mime: string(),
24201
+ fromMs: number(),
24202
+ toMs: number(),
24203
+ bytes: number().int()
24204
+ }), {
24205
+ kind: "mutation",
24206
+ auth: "admin"
24207
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
24208
+ kind: "mutation",
24209
+ auth: "admin"
24210
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
24211
+ kind: "query",
24212
+ auth: "admin"
24213
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24214
+ kind: "mutation",
24215
+ auth: "admin"
23913
24216
  });
23914
24217
  /**
23915
24218
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25501,6 +25804,12 @@ Object.freeze({
25501
25804
  addonId: null,
25502
25805
  access: "view"
25503
25806
  },
25807
+ "deviceManager.getDeviceStatusAggregateBatch": {
25808
+ capName: "device-manager",
25809
+ capScope: "system",
25810
+ addonId: null,
25811
+ access: "view"
25812
+ },
25504
25813
  "deviceManager.getLinkedDevices": {
25505
25814
  capName: "device-manager",
25506
25815
  capScope: "system",
@@ -26395,6 +26704,12 @@ Object.freeze({
26395
26704
  addonId: null,
26396
26705
  access: "view"
26397
26706
  },
26707
+ "localNetwork.getNotificationEndpoint": {
26708
+ capName: "local-network",
26709
+ capScope: "system",
26710
+ addonId: null,
26711
+ access: "view"
26712
+ },
26398
26713
  "localNetwork.getPreferred": {
26399
26714
  capName: "local-network",
26400
26715
  capScope: "system",
@@ -26419,6 +26734,12 @@ Object.freeze({
26419
26734
  addonId: null,
26420
26735
  access: "create"
26421
26736
  },
26737
+ "localNetwork.setNotificationEndpoint": {
26738
+ capName: "local-network",
26739
+ capScope: "system",
26740
+ addonId: null,
26741
+ access: "create"
26742
+ },
26422
26743
  "lockControl.lock": {
26423
26744
  capName: "lock-control",
26424
26745
  capScope: "device",
@@ -27061,6 +27382,12 @@ Object.freeze({
27061
27382
  addonId: null,
27062
27383
  access: "create"
27063
27384
  },
27385
+ "pipelineAnalytics.cancelMediaRelocate": {
27386
+ capName: "pipeline-analytics",
27387
+ capScope: "device",
27388
+ addonId: null,
27389
+ access: "create"
27390
+ },
27064
27391
  "pipelineAnalytics.clearTracks": {
27065
27392
  capName: "pipeline-analytics",
27066
27393
  capScope: "device",
@@ -27115,6 +27442,12 @@ Object.freeze({
27115
27442
  addonId: null,
27116
27443
  access: "view"
27117
27444
  },
27445
+ "pipelineAnalytics.getMediaRelocateStatus": {
27446
+ capName: "pipeline-analytics",
27447
+ capScope: "device",
27448
+ addonId: null,
27449
+ access: "view"
27450
+ },
27118
27451
  "pipelineAnalytics.getMotionEvents": {
27119
27452
  capName: "pipeline-analytics",
27120
27453
  capScope: "device",
@@ -27187,6 +27520,12 @@ Object.freeze({
27187
27520
  addonId: null,
27188
27521
  access: "create"
27189
27522
  },
27523
+ "pipelineAnalytics.relocateMedia": {
27524
+ capName: "pipeline-analytics",
27525
+ capScope: "device",
27526
+ addonId: null,
27527
+ access: "create"
27528
+ },
27190
27529
  "pipelineAnalytics.searchObjectEvents": {
27191
27530
  capName: "pipeline-analytics",
27192
27531
  capScope: "device",
@@ -27949,6 +28288,12 @@ Object.freeze({
27949
28288
  addonId: null,
27950
28289
  access: "create"
27951
28290
  },
28291
+ "recording.cancelRelocate": {
28292
+ capName: "recording",
28293
+ capScope: "system",
28294
+ addonId: null,
28295
+ access: "create"
28296
+ },
27952
28297
  "recording.deleteFootprint": {
27953
28298
  capName: "recording",
27954
28299
  capScope: "system",
@@ -27979,6 +28324,12 @@ Object.freeze({
27979
28324
  addonId: null,
27980
28325
  access: "view"
27981
28326
  },
28327
+ "recording.getRelocateStatus": {
28328
+ capName: "recording",
28329
+ capScope: "system",
28330
+ addonId: null,
28331
+ access: "view"
28332
+ },
27982
28333
  "recording.getStorageUsage": {
27983
28334
  capName: "recording",
27984
28335
  capScope: "system",
@@ -28009,6 +28360,24 @@ Object.freeze({
28009
28360
  addonId: null,
28010
28361
  access: "view"
28011
28362
  },
28363
+ "recording.relocateFootage": {
28364
+ capName: "recording",
28365
+ capScope: "system",
28366
+ addonId: null,
28367
+ access: "create"
28368
+ },
28369
+ "recording.renderClip": {
28370
+ capName: "recording",
28371
+ capScope: "system",
28372
+ addonId: null,
28373
+ access: "create"
28374
+ },
28375
+ "recording.renderGif": {
28376
+ capName: "recording",
28377
+ capScope: "system",
28378
+ addonId: null,
28379
+ access: "create"
28380
+ },
28012
28381
  "recording.rescanStorage": {
28013
28382
  capName: "recording",
28014
28383
  capScope: "system",
@@ -28603,6 +28972,12 @@ Object.freeze({
28603
28972
  addonId: null,
28604
28973
  access: "create"
28605
28974
  },
28975
+ "streamBroker.renderPreBufferClip": {
28976
+ capName: "stream-broker",
28977
+ capScope: "system",
28978
+ addonId: null,
28979
+ access: "create"
28980
+ },
28606
28981
  "streamBroker.restartProfile": {
28607
28982
  capName: "stream-broker",
28608
28983
  capScope: "system",