@camstack/addon-export-alexa 1.2.6 → 1.2.8

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.
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  //#endregion
27
27
  let node_crypto = require("node:crypto");
28
28
  node_crypto = __toESM(node_crypto);
29
- //#region ../types/dist/event-category-BLcNejAE.mjs
29
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
30
30
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
31
31
  EventCategory["SystemBoot"] = "system.boot";
32
32
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -297,6 +297,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
297
297
  */
298
298
  EventCategory["DeviceStateChanged"] = "device.state-changed";
299
299
  /**
300
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
301
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
302
+ *
303
+ * Emitted only on a change, so a steady scene is silent. It exists so a
304
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
305
+ * one live badge with no push signal at all, and it cost a request every
306
+ * four seconds per visible camera.
307
+ *
308
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
309
+ * keeps a slow reconcile rather than trusting it alone.
310
+ */
311
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
312
+ /**
300
313
  * Cap event fired by every device that registers the `battery`
301
314
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
302
315
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7350,35 +7363,22 @@ function buildCapturingReply(envelope) {
7350
7363
  */
7351
7364
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7352
7365
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7353
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7354
- kind: literal("timeOfDay"),
7355
- start: string().regex(HHMM),
7356
- end: string().regex(HHMM),
7357
- /** Restrict to these weekdays; omit = every day. */
7358
- days: array(RecordingWeekdaySchema).optional()
7359
- })]);
7360
- var RecordingModeSchema = _enum([
7361
- "continuous",
7362
- "onMotion",
7363
- "onAudioThreshold"
7364
- ]);
7365
7366
  /**
7366
- * First-class, authoritative per-camera storage mode — the explicit choice the
7367
- * UI reads directly (never inferred from `rules`):
7368
- * - `off` — not recording.
7369
- * - `events` — record only around triggers (motion / audio threshold),
7370
- * with pre/post-buffer.
7371
- * - `continuous` — record 24/7 within the schedule.
7367
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7368
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7369
+ * - `off` — no band covers the camera (or it is disabled).
7370
+ * - `events` — every band records around triggers only.
7371
+ * - `continuous` — at least one band records continuously.
7372
7372
  *
7373
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7374
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7373
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7374
+ * every save (`activeModeForConfig`). Writing it has no effect.
7375
7375
  */
7376
7376
  var RecordingStorageModeSchema = _enum([
7377
7377
  "off",
7378
7378
  "events",
7379
7379
  "continuous"
7380
7380
  ]);
7381
- /** Which detectors trigger an `events`-mode recording. */
7381
+ /** Which detectors trigger an `events`-mode band. */
7382
7382
  var RecordingTriggersSchema = object({
7383
7383
  motion: boolean().optional(),
7384
7384
  audioThresholdDbfs: number().optional()
@@ -7414,18 +7414,6 @@ var RecordingBandSchema = object({
7414
7414
  preBufferSec: number().min(0).optional(),
7415
7415
  postBufferSec: number().min(0).optional()
7416
7416
  });
7417
- var RecordingRuleSchema = object({
7418
- schedule: RecordingScheduleSchema,
7419
- mode: RecordingModeSchema,
7420
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7421
- preBufferSec: number().min(0).default(0),
7422
- /** Keep recording until this many seconds after the last trigger. */
7423
- postBufferSec: number().min(0).default(0),
7424
- /** Each new trigger restarts the post-buffer window. */
7425
- resetTimeoutOnNewEvent: boolean().default(true),
7426
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7427
- thresholdDbfs: number().optional()
7428
- });
7429
7417
  /**
7430
7418
  * Per-device retention overrides. Every field is optional; an unset or `0`
7431
7419
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7459,40 +7447,28 @@ var ScrubThumbnailPresetSchema = _enum([
7459
7447
  /**
7460
7448
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7461
7449
  *
7462
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7463
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7464
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7465
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7450
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7451
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7452
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7453
+ *
7454
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7455
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7456
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7457
+ * persist a band-less config, i.e. silently stop recording the camera.
7466
7458
  */
7467
7459
  var RecordingConfigSchema = object({
7468
7460
  enabled: boolean(),
7469
- /** Authoritative storage mode. Absent on legacy targets derived once via
7470
- * `migrateRulesToMode`, then persisted. */
7461
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7462
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7471
7463
  mode: RecordingStorageModeSchema.optional(),
7472
7464
  profiles: array(CamProfileSchema).optional(),
7473
7465
  segmentSeconds: number().int().positive().optional(),
7474
- /** Shared recording time-bands for `events` & `continuous` — record only when
7475
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7476
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7477
- schedules: array(RecordingScheduleSchema).optional(),
7478
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7479
- * normalized into `schedules` on read and never written going forward. (Not
7480
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7481
- schedule: RecordingScheduleSchema.optional(),
7482
- /** `events`-mode only — which detectors trigger a recording. */
7483
- triggers: RecordingTriggersSchema.optional(),
7484
- /** `events`-mode only — seconds retained before / after a trigger. */
7485
- preBufferSec: number().min(0).optional(),
7486
- postBufferSec: number().min(0).optional(),
7487
- /** DEPRECATED authoring input; retained for migration/transition. */
7488
- rules: array(RecordingRuleSchema).optional(),
7489
7466
  /**
7490
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7491
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7492
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7493
- * derived into bands once via `migrateConfigToBands`.
7467
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7468
+ * the recorder's band engine consumes. An empty array = record nothing;
7469
+ * "off" is the absence of a covering band, never a band value.
7494
7470
  */
7495
- bands: array(RecordingBandSchema).optional(),
7471
+ bands: array(RecordingBandSchema).default([]),
7496
7472
  retention: RecordingRetentionSchema.optional(),
7497
7473
  /**
7498
7474
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7500,8 +7476,15 @@ var RecordingConfigSchema = object({
7500
7476
  * windows only — existing sheets are immutable, and each window's index
7501
7477
  * carries its own tile dims so mixed-preset history renders correctly.
7502
7478
  */
7503
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7504
- });
7479
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7480
+ /**
7481
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7482
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7483
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7484
+ * are written and scrub reads exact keyframes at every velocity.
7485
+ */
7486
+ stripsEnabled: boolean().optional()
7487
+ }).strict();
7505
7488
  /**
7506
7489
  * Ops-log — the durable, append-only operations audit shared by the
7507
7490
  * recordings and events management surfaces.
@@ -7520,7 +7503,8 @@ var OpsLogOpSchema = _enum([
7520
7503
  "prune",
7521
7504
  "manual-delete",
7522
7505
  "rescan",
7523
- "retention-run"
7506
+ "retention-run",
7507
+ "relocate"
7524
7508
  ]);
7525
7509
  /** Why the operation ran. */
7526
7510
  var OpsLogReasonSchema = _enum([
@@ -7559,6 +7543,55 @@ var OpsLogQueryInputSchema = object({
7559
7543
  limit: number().int().min(1).max(1e3).optional()
7560
7544
  });
7561
7545
  /**
7546
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7547
+ *
7548
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7549
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7550
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7551
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7552
+ * after verify) and each completed/failed run also lands one durable ops-log
7553
+ * row on the owning addon's surface.
7554
+ */
7555
+ var RelocateJobStateSchema = _enum([
7556
+ "running",
7557
+ "done",
7558
+ "failed",
7559
+ "cancelled"
7560
+ ]);
7561
+ var RelocateJobSchema = object({
7562
+ jobId: string(),
7563
+ state: RelocateJobStateSchema,
7564
+ /** Source location — for media relocation this is informational ('*': rows
7565
+ * move from wherever they are to the target). */
7566
+ fromLocationId: string(),
7567
+ toLocationId: string(),
7568
+ /** Scoped device, or null = every device. */
7569
+ deviceId: number().nullable(),
7570
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7571
+ entities: array(string()),
7572
+ filesMoved: number().int(),
7573
+ bytesMoved: number().int(),
7574
+ /** Total files discovered up front; null while (or when) unknown. */
7575
+ filesTotal: number().int().nullable(),
7576
+ startedAt: number(),
7577
+ finishedAt: number().nullable(),
7578
+ error: string().nullable()
7579
+ });
7580
+ var RelocateFootageInputSchema = object({
7581
+ deviceId: number().optional(),
7582
+ fromLocationId: string(),
7583
+ toLocationId: string(),
7584
+ entities: array(_enum(["segments", "strips"])).optional(),
7585
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7586
+ * never allowed to starve live writers. */
7587
+ throttleMbps: number().min(1).max(1e3).optional()
7588
+ });
7589
+ var RelocateMediaInputSchema = object({
7590
+ deviceId: number().optional(),
7591
+ toLocationId: string(),
7592
+ throttleMbps: number().min(1).max(1e3).optional()
7593
+ });
7594
+ /**
7562
7595
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7563
7596
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7564
7597
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7608,6 +7641,13 @@ var StorageLocationSchema = object({
7608
7641
  nodeId: string().optional(),
7609
7642
  isDefault: boolean().default(false),
7610
7643
  isSystem: boolean().default(false),
7644
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7645
+ * for node-local locations it can reach) — never persisted, absent when the
7646
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7647
+ capacity: object({
7648
+ totalBytes: number(),
7649
+ availableBytes: number()
7650
+ }).nullable().optional(),
7611
7651
  createdAt: number(),
7612
7652
  updatedAt: number()
7613
7653
  });
@@ -8429,7 +8469,8 @@ var NcTaxonomyEntrySchema = object({
8429
8469
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8430
8470
  parentKind: string().nullable()
8431
8471
  });
8432
- object({
8472
+ /** The complete NC picker taxonomy — three grouped buckets. */
8473
+ var NcTaxonomySchema = object({
8433
8474
  videoClasses: array(NcTaxonomyEntrySchema),
8434
8475
  audioKinds: array(NcTaxonomyEntrySchema),
8435
8476
  labels: array(NcTaxonomyEntrySchema)
@@ -9089,6 +9130,7 @@ var AccessoryKind = {
9089
9130
  };
9090
9131
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
9091
9132
  DeviceFeature.BatteryOperated;
9133
+ new Set(["devices", "classes"]);
9092
9134
  /**
9093
9135
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9094
9136
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9247,6 +9289,29 @@ var NcOccupancyConditionSchema = object({
9247
9289
  count: number().int().min(0).default(1),
9248
9290
  sustainSeconds: number().int().min(0).max(3600).default(15)
9249
9291
  });
9292
+ /**
9293
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9294
+ *
9295
+ * The values are not symmetric, and deliberately so — the absent value has to
9296
+ * mean exactly what every rule authored before this condition existed already
9297
+ * does:
9298
+ * - `enter` — entries and every NON-crossing record (movement state,
9299
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9300
+ * an operator who never asked for exits must not start receiving them.
9301
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9302
+ * fails closed, because "the car left the drive" is a question about a
9303
+ * boundary, not about a detection.
9304
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9305
+ *
9306
+ * A rule asking for a direction should normally also scope `zones`, which the
9307
+ * engine evaluates against the crossed zone as well as the current membership
9308
+ * (an exit's membership no longer contains the zone it just left).
9309
+ */
9310
+ var NcCrossingSchema = _enum([
9311
+ "enter",
9312
+ "exit",
9313
+ "any"
9314
+ ]);
9250
9315
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9251
9316
  var NcZoneConditionSchema = object({
9252
9317
  ids: array(string().min(1)).min(1),
@@ -9271,6 +9336,13 @@ var NcConditionsSchema = object({
9271
9336
  /** Veto zones — any hit fails the rule. */
9272
9337
  zonesExclude: array(string().min(1)).optional(),
9273
9338
  /**
9339
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9340
+ * and a closed track carries none, so a `track-end` rule asking for one
9341
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9342
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9343
+ */
9344
+ crossing: NcCrossingSchema.optional(),
9345
+ /**
9274
9346
  * Exact (case-insensitive) match on the record's collapsed `label`
9275
9347
  * (identity name / plate text / subclass).
9276
9348
  */
@@ -9405,17 +9477,85 @@ var NcRuleTargetSchema = object({
9405
9477
  * - `keyFrame` — the clean scene frame (no subject box).
9406
9478
  * - `none` — no attachment.
9407
9479
  */
9408
- var NcMediaPolicySchema = object({ attach: _enum([
9409
- "best",
9410
- "best-matching",
9411
- "keyFrame",
9412
- "none"
9413
- ]).default("best") });
9480
+ /**
9481
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9482
+ * conflate it with the selection strategy and betray the request: asking for
9483
+ * the clean scene frame on an object-event owner used to start at
9484
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9485
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9486
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9487
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9488
+ * the pipeline actually saw.
9489
+ */
9490
+ var NcMediaFrameSchema = _enum([
9491
+ "cropped",
9492
+ "full",
9493
+ "boxed"
9494
+ ]);
9495
+ var NcMediaPolicySchema = object({
9496
+ attach: _enum([
9497
+ "best",
9498
+ "best-matching",
9499
+ "keyFrame",
9500
+ "none"
9501
+ ]).default("best"),
9502
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9503
+ frame: NcMediaFrameSchema.optional(),
9504
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9505
+ * "show me the ZONE", not the whole scene or the subject crop. */
9506
+ zoneCrop: boolean().optional(),
9507
+ /**
9508
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9509
+ * event — NOT from the recording, so the camera does not have to be
9510
+ * recording, and the window sits AROUND the moment instead of a segment
9511
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9512
+ * gif, never a failed notification.
9513
+ */
9514
+ gif: boolean().optional(),
9515
+ /**
9516
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9517
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9518
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9519
+ * the degrade engine, which drops the video and keeps the still.
9520
+ */
9521
+ clip: boolean().optional(),
9522
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9523
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9524
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9525
+ /**
9526
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9527
+ * assigned profile: a notification is watched on a phone, so the 4K
9528
+ * rendition would burn CPU to produce a file the client downscales anyway.
9529
+ * A profile that is not assigned falls back to the cheapest, and the render
9530
+ * reports which one actually ran.
9531
+ */
9532
+ profile: CamProfileSchema.optional()
9533
+ });
9534
+ /**
9535
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9536
+ * notification suppresses.
9537
+ * - `shared` (default, and the absent value) — one window for the whole
9538
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9539
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9540
+ * at once and cat→cat still waits.
9541
+ *
9542
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9543
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9544
+ * see `cooldownKey` in the rule engine).
9545
+ */
9546
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9414
9547
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9415
9548
  var NcThrottleSchema = object({
9416
9549
  cooldownSec: number().int().min(0).max(86400).default(60),
9417
9550
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9418
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9551
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9552
+ /**
9553
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9554
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9555
+ * rule authored before this field simply carries none — and the engine
9556
+ * reads absent as `shared`, the pre-existing behaviour.
9557
+ */
9558
+ granularity: NcThrottleGranularitySchema.optional()
9419
9559
  });
9420
9560
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9421
9561
  var NcRuleInputSchema = object({
@@ -9424,7 +9564,19 @@ var NcRuleInputSchema = object({
9424
9564
  delivery: NcDeliverySchema,
9425
9565
  conditions: NcConditionsSchema.default({}),
9426
9566
  schedule: NcScheduleSchema.optional(),
9427
- targets: array(NcRuleTargetSchema).min(1),
9567
+ /** May be empty when `targetUsers` addresses at least one user — the
9568
+ * "at least one addressee" invariant is enforced by the provider, because
9569
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9570
+ targets: array(NcRuleTargetSchema),
9571
+ /**
9572
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9573
+ * time each user fans out to the personal targets they own
9574
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9575
+ * firing camera — a user is never notified about a device they cannot open.
9576
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9577
+ * targets.
9578
+ */
9579
+ targetUsers: array(string()).optional(),
9428
9580
  media: NcMediaPolicySchema.default({ attach: "best" }),
9429
9581
  throttle: NcThrottleSchema.default({
9430
9582
  cooldownSec: 60,
@@ -9511,6 +9663,7 @@ var NcConditionDescriptorSchema = object({
9511
9663
  "schedule",
9512
9664
  "plateMatcher",
9513
9665
  "packagePhase",
9666
+ "crossingSelect",
9514
9667
  "polygonDraw",
9515
9668
  "occupancy"
9516
9669
  ]),
@@ -9637,7 +9790,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9637
9790
  }), object({ results: array(NcTestResultSchema) }), {
9638
9791
  kind: "mutation",
9639
9792
  auth: "admin"
9640
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9793
+ }), method(object({}), object({
9794
+ catalog: array(NcConditionDescriptorSchema),
9795
+ taxonomy: NcTaxonomySchema.optional()
9796
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9641
9797
  /**
9642
9798
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9643
9799
  *
@@ -10374,6 +10530,28 @@ method(object({
10374
10530
  }), object({ success: literal(true) }), {
10375
10531
  kind: "mutation",
10376
10532
  auth: "admin"
10533
+ }), method(object({
10534
+ deviceId: number(),
10535
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10536
+ * watched on a phone, and the cheap rendition is the right default. */
10537
+ profile: CamProfileSchema.optional(),
10538
+ aroundMs: number(),
10539
+ preRollSec: number().min(0).max(20).default(3),
10540
+ postRollSec: number().min(0).max(20).default(5),
10541
+ format: _enum(["gif", "mp4"]).default("gif"),
10542
+ maxWidth: number().int().min(120).max(1920).default(480),
10543
+ /** GIF only — MP4 keeps the source cadence. */
10544
+ fps: number().int().min(1).max(15).default(5)
10545
+ }), object({
10546
+ base64: string(),
10547
+ mime: string(),
10548
+ bytes: number().int(),
10549
+ /** The profile actually rendered (what the default resolved to). */
10550
+ profile: CamProfileSchema,
10551
+ durationMs: number()
10552
+ }), {
10553
+ kind: "mutation",
10554
+ auth: "admin"
10377
10555
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10378
10556
  probed: boolean(),
10379
10557
  summary: string()
@@ -16034,7 +16212,10 @@ method(object({
16034
16212
  }), method(object({
16035
16213
  deviceId: number(),
16036
16214
  caps: array(string()).readonly().optional()
16037
- }), record(string(), unknown().nullable()));
16215
+ }), record(string(), unknown().nullable())), method(object({
16216
+ deviceIds: array(number()).readonly(),
16217
+ caps: array(string()).readonly().optional()
16218
+ }), record(string(), record(string(), unknown().nullable())));
16038
16219
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
16039
16220
  deviceId: number(),
16040
16221
  capName: string()
@@ -16965,6 +17146,36 @@ var TargetKindSchema = object({
16965
17146
  icon: string(),
16966
17147
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16967
17148
  addonId: string(),
17149
+ /**
17150
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
17151
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
17152
+ * when the addon bundles no icon for that kind — the client then falls back
17153
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
17154
+ *
17155
+ * Root-relative on purpose: it resolves against whatever origin serves a web
17156
+ * client, and a native client joins it onto its own hub base.
17157
+ *
17158
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
17159
+ * field that survived only because the runtime cap-router forwards provider
17160
+ * output verbatim — so every consumer had to re-declare it by hand to stop
17161
+ * its own Zod parse from stripping it, and the whole arrangement would have
17162
+ * broken silently the moment output validation was tightened anywhere.
17163
+ */
17164
+ iconUrl: string().optional(),
17165
+ /**
17166
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
17167
+ *
17168
+ * The server knows this and therefore says it, because the client cannot
17169
+ * safely guess: a React-Native client renders SVG and raster through two
17170
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
17171
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
17172
+ * placeholder glyph for every vector icon while the web build looked fine.
17173
+ *
17174
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
17175
+ * not been updated — a client that cannot determine the type should prefer
17176
+ * its raster path, which is the safe default for an unknown image.
17177
+ */
17178
+ iconMediaType: string().optional(),
16968
17179
  configSchema: ConfigSchemaPassthrough,
16969
17180
  supportsDiscovery: boolean(),
16970
17181
  caps: TargetKindCapsSchema
@@ -17418,6 +17629,29 @@ var MotionEventSchema = object({
17418
17629
  * Absent on legacy rows ⇒ treat as `pipeline`.
17419
17630
  */
17420
17631
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17632
+ /**
17633
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17634
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17635
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17636
+ * appearance event carry none, so a rule asking for a direction fails closed
17637
+ * on them.
17638
+ *
17639
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17640
+ * into its own event, so a frame in which a track enters A while leaving B
17641
+ * produces two events with two directions — never one ambiguous row.
17642
+ *
17643
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17644
+ * membership the box has NOW, and by definition it no longer contains the zone
17645
+ * that was just left. Without the id here, a zone-scoped rule could never match
17646
+ * the exit it asked for.
17647
+ */
17648
+ var ZoneCrossingSchema = object({
17649
+ direction: _enum(["enter", "exit"]),
17650
+ /** Admin zone id crossed. */
17651
+ zoneId: string(),
17652
+ /** Zone display name at crossing time (falls back to the id). */
17653
+ zoneName: string().optional()
17654
+ });
17421
17655
  var ObjectEventSchema = object({
17422
17656
  ...BaseEventFields,
17423
17657
  kind: literal("object"),
@@ -17444,6 +17678,12 @@ var ObjectEventSchema = object({
17444
17678
  zones: array(string()).readonly().optional(),
17445
17679
  /** Omitted in slim projection. */
17446
17680
  state: TrackStateSchema.optional(),
17681
+ /**
17682
+ * The zone crossing this event IS, when it is one. Absent on every other
17683
+ * event kind (movement state, appearance, package) — see
17684
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17685
+ */
17686
+ zoneCrossing: ZoneCrossingSchema.optional(),
17447
17687
  /** Detection-frame dimensions in pixels — let consumers normalize the
17448
17688
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17449
17689
  frameWidth: number().optional(),
@@ -17702,6 +17942,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17702
17942
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17703
17943
  kind: "mutation",
17704
17944
  auth: "admin"
17945
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17946
+ kind: "mutation",
17947
+ auth: "admin"
17948
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17949
+ kind: "query",
17950
+ auth: "admin"
17951
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17952
+ kind: "mutation",
17953
+ auth: "admin"
17705
17954
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17706
17955
  kind: "query",
17707
17956
  auth: "admin"
@@ -20181,6 +20430,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
20181
20430
  */
20182
20431
  priority: number()
20183
20432
  })).readonly() });
20433
+ /**
20434
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20435
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20436
+ * what AUTO currently picks, so the UI can show the effective value either way.
20437
+ */
20438
+ var NotificationEndpointSchema = object({
20439
+ /** The operator's explicit choice, or null for AUTO. */
20440
+ baseUrl: string().nullable(),
20441
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20442
+ resolved: string().nullable()
20443
+ });
20184
20444
  var AllowedAddressesSchema = object({
20185
20445
  /**
20186
20446
  * Allowlist of interface addresses operators have explicitly opted
@@ -20203,7 +20463,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20203
20463
  * to avoid mixed-content blocks in the browser. The public
20204
20464
  * tunnel always emits `https://` regardless. */
20205
20465
  scheme: _enum(["http", "https"]).optional()
20206
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20466
+ }), 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" });
20207
20467
  /**
20208
20468
  * mesh-network — collection cap for mesh-VPN providers.
20209
20469
  *
@@ -21002,7 +21262,12 @@ var RecordingDeviceUsageSchema = object({
21002
21262
  var RecordingLocationUsageSchema = object({
21003
21263
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
21004
21264
  locationId: string().nullable(),
21005
- /** Bytes of recordings stored on this location. */
21265
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21266
+ * is emitted per physical disk (2026-07-29): two locations on one root
21267
+ * previously rendered as two identical "disks" with a nonsensical used
21268
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21269
+ locationIds: array(string()).optional(),
21270
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
21006
21271
  usedBytes: number(),
21007
21272
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
21008
21273
  availableBytes: number().nullable(),
@@ -21114,6 +21379,44 @@ method(object({
21114
21379
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
21115
21380
  kind: "query",
21116
21381
  auth: "admin"
21382
+ }), method(object({
21383
+ deviceId: number(),
21384
+ aroundMs: number(),
21385
+ preRollSec: number().min(0).max(30).default(2),
21386
+ postRollSec: number().min(0).max(30).default(5),
21387
+ maxWidth: number().int().min(120).max(1280).default(480),
21388
+ fps: number().int().min(1).max(15).default(5)
21389
+ }), object({
21390
+ gifBase64: string(),
21391
+ fromMs: number(),
21392
+ toMs: number()
21393
+ }), {
21394
+ kind: "mutation",
21395
+ auth: "admin"
21396
+ }), method(object({
21397
+ deviceId: number(),
21398
+ aroundMs: number(),
21399
+ preRollSec: number().min(0).max(30).default(3),
21400
+ postRollSec: number().min(0).max(30).default(7),
21401
+ maxWidth: number().int().min(160).max(1920).default(640)
21402
+ }), object({
21403
+ clipBase64: string(),
21404
+ mime: string(),
21405
+ fromMs: number(),
21406
+ toMs: number(),
21407
+ bytes: number().int()
21408
+ }), {
21409
+ kind: "mutation",
21410
+ auth: "admin"
21411
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21412
+ kind: "mutation",
21413
+ auth: "admin"
21414
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21415
+ kind: "query",
21416
+ auth: "admin"
21417
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21418
+ kind: "mutation",
21419
+ auth: "admin"
21117
21420
  });
21118
21421
  /**
21119
21422
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22705,6 +23008,12 @@ Object.freeze({
22705
23008
  addonId: null,
22706
23009
  access: "view"
22707
23010
  },
23011
+ "deviceManager.getDeviceStatusAggregateBatch": {
23012
+ capName: "device-manager",
23013
+ capScope: "system",
23014
+ addonId: null,
23015
+ access: "view"
23016
+ },
22708
23017
  "deviceManager.getLinkedDevices": {
22709
23018
  capName: "device-manager",
22710
23019
  capScope: "system",
@@ -23599,6 +23908,12 @@ Object.freeze({
23599
23908
  addonId: null,
23600
23909
  access: "view"
23601
23910
  },
23911
+ "localNetwork.getNotificationEndpoint": {
23912
+ capName: "local-network",
23913
+ capScope: "system",
23914
+ addonId: null,
23915
+ access: "view"
23916
+ },
23602
23917
  "localNetwork.getPreferred": {
23603
23918
  capName: "local-network",
23604
23919
  capScope: "system",
@@ -23623,6 +23938,12 @@ Object.freeze({
23623
23938
  addonId: null,
23624
23939
  access: "create"
23625
23940
  },
23941
+ "localNetwork.setNotificationEndpoint": {
23942
+ capName: "local-network",
23943
+ capScope: "system",
23944
+ addonId: null,
23945
+ access: "create"
23946
+ },
23626
23947
  "lockControl.lock": {
23627
23948
  capName: "lock-control",
23628
23949
  capScope: "device",
@@ -24265,6 +24586,12 @@ Object.freeze({
24265
24586
  addonId: null,
24266
24587
  access: "create"
24267
24588
  },
24589
+ "pipelineAnalytics.cancelMediaRelocate": {
24590
+ capName: "pipeline-analytics",
24591
+ capScope: "device",
24592
+ addonId: null,
24593
+ access: "create"
24594
+ },
24268
24595
  "pipelineAnalytics.clearTracks": {
24269
24596
  capName: "pipeline-analytics",
24270
24597
  capScope: "device",
@@ -24319,6 +24646,12 @@ Object.freeze({
24319
24646
  addonId: null,
24320
24647
  access: "view"
24321
24648
  },
24649
+ "pipelineAnalytics.getMediaRelocateStatus": {
24650
+ capName: "pipeline-analytics",
24651
+ capScope: "device",
24652
+ addonId: null,
24653
+ access: "view"
24654
+ },
24322
24655
  "pipelineAnalytics.getMotionEvents": {
24323
24656
  capName: "pipeline-analytics",
24324
24657
  capScope: "device",
@@ -24391,6 +24724,12 @@ Object.freeze({
24391
24724
  addonId: null,
24392
24725
  access: "create"
24393
24726
  },
24727
+ "pipelineAnalytics.relocateMedia": {
24728
+ capName: "pipeline-analytics",
24729
+ capScope: "device",
24730
+ addonId: null,
24731
+ access: "create"
24732
+ },
24394
24733
  "pipelineAnalytics.searchObjectEvents": {
24395
24734
  capName: "pipeline-analytics",
24396
24735
  capScope: "device",
@@ -25153,6 +25492,12 @@ Object.freeze({
25153
25492
  addonId: null,
25154
25493
  access: "create"
25155
25494
  },
25495
+ "recording.cancelRelocate": {
25496
+ capName: "recording",
25497
+ capScope: "system",
25498
+ addonId: null,
25499
+ access: "create"
25500
+ },
25156
25501
  "recording.deleteFootprint": {
25157
25502
  capName: "recording",
25158
25503
  capScope: "system",
@@ -25183,6 +25528,12 @@ Object.freeze({
25183
25528
  addonId: null,
25184
25529
  access: "view"
25185
25530
  },
25531
+ "recording.getRelocateStatus": {
25532
+ capName: "recording",
25533
+ capScope: "system",
25534
+ addonId: null,
25535
+ access: "view"
25536
+ },
25186
25537
  "recording.getStorageUsage": {
25187
25538
  capName: "recording",
25188
25539
  capScope: "system",
@@ -25213,6 +25564,24 @@ Object.freeze({
25213
25564
  addonId: null,
25214
25565
  access: "view"
25215
25566
  },
25567
+ "recording.relocateFootage": {
25568
+ capName: "recording",
25569
+ capScope: "system",
25570
+ addonId: null,
25571
+ access: "create"
25572
+ },
25573
+ "recording.renderClip": {
25574
+ capName: "recording",
25575
+ capScope: "system",
25576
+ addonId: null,
25577
+ access: "create"
25578
+ },
25579
+ "recording.renderGif": {
25580
+ capName: "recording",
25581
+ capScope: "system",
25582
+ addonId: null,
25583
+ access: "create"
25584
+ },
25216
25585
  "recording.rescanStorage": {
25217
25586
  capName: "recording",
25218
25587
  capScope: "system",
@@ -25807,6 +26176,12 @@ Object.freeze({
25807
26176
  addonId: null,
25808
26177
  access: "create"
25809
26178
  },
26179
+ "streamBroker.renderPreBufferClip": {
26180
+ capName: "stream-broker",
26181
+ capScope: "system",
26182
+ addonId: null,
26183
+ access: "create"
26184
+ },
25810
26185
  "streamBroker.restartProfile": {
25811
26186
  capName: "stream-broker",
25812
26187
  capScope: "system",