@camstack/addon-provider-reolink 1.2.13 → 1.2.15

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 +3 -2
package/dist/addon.mjs CHANGED
@@ -21,7 +21,7 @@ import netImpl from "net";
21
21
  import { fileURLToPath } from "url";
22
22
  import { mkdir } from "fs/promises";
23
23
  import os from "node:os";
24
- //#region ../types/dist/event-category-BLcNejAE.mjs
24
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
25
25
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
26
26
  EventCategory["SystemBoot"] = "system.boot";
27
27
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -292,6 +292,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
292
292
  */
293
293
  EventCategory["DeviceStateChanged"] = "device.state-changed";
294
294
  /**
295
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
296
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
297
+ *
298
+ * Emitted only on a change, so a steady scene is silent. It exists so a
299
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
300
+ * one live badge with no push signal at all, and it cost a request every
301
+ * four seconds per visible camera.
302
+ *
303
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
304
+ * keeps a slow reconcile rather than trusting it alone.
305
+ */
306
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
307
+ /**
295
308
  * Cap event fired by every device that registers the `battery`
296
309
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
297
310
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7408,35 +7421,22 @@ function findTimezone(id) {
7408
7421
  */
7409
7422
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7410
7423
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7411
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7412
- kind: literal("timeOfDay"),
7413
- start: string().regex(HHMM),
7414
- end: string().regex(HHMM),
7415
- /** Restrict to these weekdays; omit = every day. */
7416
- days: array(RecordingWeekdaySchema).optional()
7417
- })]);
7418
- var RecordingModeSchema = _enum([
7419
- "continuous",
7420
- "onMotion",
7421
- "onAudioThreshold"
7422
- ]);
7423
7424
  /**
7424
- * First-class, authoritative per-camera storage mode — the explicit choice the
7425
- * UI reads directly (never inferred from `rules`):
7426
- * - `off` — not recording.
7427
- * - `events` — record only around triggers (motion / audio threshold),
7428
- * with pre/post-buffer.
7429
- * - `continuous` — record 24/7 within the schedule.
7425
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7426
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7427
+ * - `off` — no band covers the camera (or it is disabled).
7428
+ * - `events` — every band records around triggers only.
7429
+ * - `continuous` — at least one band records continuously.
7430
7430
  *
7431
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7432
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7431
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7432
+ * every save (`activeModeForConfig`). Writing it has no effect.
7433
7433
  */
7434
7434
  var RecordingStorageModeSchema = _enum([
7435
7435
  "off",
7436
7436
  "events",
7437
7437
  "continuous"
7438
7438
  ]);
7439
- /** Which detectors trigger an `events`-mode recording. */
7439
+ /** Which detectors trigger an `events`-mode band. */
7440
7440
  var RecordingTriggersSchema = object({
7441
7441
  motion: boolean().optional(),
7442
7442
  audioThresholdDbfs: number().optional()
@@ -7472,18 +7472,6 @@ var RecordingBandSchema = object({
7472
7472
  preBufferSec: number().min(0).optional(),
7473
7473
  postBufferSec: number().min(0).optional()
7474
7474
  });
7475
- var RecordingRuleSchema = object({
7476
- schedule: RecordingScheduleSchema,
7477
- mode: RecordingModeSchema,
7478
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7479
- preBufferSec: number().min(0).default(0),
7480
- /** Keep recording until this many seconds after the last trigger. */
7481
- postBufferSec: number().min(0).default(0),
7482
- /** Each new trigger restarts the post-buffer window. */
7483
- resetTimeoutOnNewEvent: boolean().default(true),
7484
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7485
- thresholdDbfs: number().optional()
7486
- });
7487
7475
  /**
7488
7476
  * Per-device retention overrides. Every field is optional; an unset or `0`
7489
7477
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7517,40 +7505,28 @@ var ScrubThumbnailPresetSchema = _enum([
7517
7505
  /**
7518
7506
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7519
7507
  *
7520
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7521
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7522
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7523
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7508
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7509
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7510
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7511
+ *
7512
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7513
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7514
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7515
+ * persist a band-less config, i.e. silently stop recording the camera.
7524
7516
  */
7525
7517
  var RecordingConfigSchema = object({
7526
7518
  enabled: boolean(),
7527
- /** Authoritative storage mode. Absent on legacy targets derived once via
7528
- * `migrateRulesToMode`, then persisted. */
7519
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7520
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7529
7521
  mode: RecordingStorageModeSchema.optional(),
7530
7522
  profiles: array(CamProfileSchema).optional(),
7531
7523
  segmentSeconds: number().int().positive().optional(),
7532
- /** Shared recording time-bands for `events` & `continuous` — record only when
7533
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7534
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7535
- schedules: array(RecordingScheduleSchema).optional(),
7536
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7537
- * normalized into `schedules` on read and never written going forward. (Not
7538
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7539
- schedule: RecordingScheduleSchema.optional(),
7540
- /** `events`-mode only — which detectors trigger a recording. */
7541
- triggers: RecordingTriggersSchema.optional(),
7542
- /** `events`-mode only — seconds retained before / after a trigger. */
7543
- preBufferSec: number().min(0).optional(),
7544
- postBufferSec: number().min(0).optional(),
7545
- /** DEPRECATED authoring input; retained for migration/transition. */
7546
- rules: array(RecordingRuleSchema).optional(),
7547
7524
  /**
7548
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7549
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7550
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7551
- * derived into bands once via `migrateConfigToBands`.
7525
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7526
+ * the recorder's band engine consumes. An empty array = record nothing;
7527
+ * "off" is the absence of a covering band, never a band value.
7552
7528
  */
7553
- bands: array(RecordingBandSchema).optional(),
7529
+ bands: array(RecordingBandSchema).default([]),
7554
7530
  retention: RecordingRetentionSchema.optional(),
7555
7531
  /**
7556
7532
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7558,8 +7534,15 @@ var RecordingConfigSchema = object({
7558
7534
  * windows only — existing sheets are immutable, and each window's index
7559
7535
  * carries its own tile dims so mixed-preset history renders correctly.
7560
7536
  */
7561
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7562
- });
7537
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7538
+ /**
7539
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7540
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7541
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7542
+ * are written and scrub reads exact keyframes at every velocity.
7543
+ */
7544
+ stripsEnabled: boolean().optional()
7545
+ }).strict();
7563
7546
  /**
7564
7547
  * Ops-log — the durable, append-only operations audit shared by the
7565
7548
  * recordings and events management surfaces.
@@ -7578,7 +7561,8 @@ var OpsLogOpSchema = _enum([
7578
7561
  "prune",
7579
7562
  "manual-delete",
7580
7563
  "rescan",
7581
- "retention-run"
7564
+ "retention-run",
7565
+ "relocate"
7582
7566
  ]);
7583
7567
  /** Why the operation ran. */
7584
7568
  var OpsLogReasonSchema = _enum([
@@ -7617,6 +7601,55 @@ var OpsLogQueryInputSchema = object({
7617
7601
  limit: number().int().min(1).max(1e3).optional()
7618
7602
  });
7619
7603
  /**
7604
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7605
+ *
7606
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7607
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7608
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7609
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7610
+ * after verify) and each completed/failed run also lands one durable ops-log
7611
+ * row on the owning addon's surface.
7612
+ */
7613
+ var RelocateJobStateSchema = _enum([
7614
+ "running",
7615
+ "done",
7616
+ "failed",
7617
+ "cancelled"
7618
+ ]);
7619
+ var RelocateJobSchema = object({
7620
+ jobId: string(),
7621
+ state: RelocateJobStateSchema,
7622
+ /** Source location — for media relocation this is informational ('*': rows
7623
+ * move from wherever they are to the target). */
7624
+ fromLocationId: string(),
7625
+ toLocationId: string(),
7626
+ /** Scoped device, or null = every device. */
7627
+ deviceId: number().nullable(),
7628
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7629
+ entities: array(string()),
7630
+ filesMoved: number().int(),
7631
+ bytesMoved: number().int(),
7632
+ /** Total files discovered up front; null while (or when) unknown. */
7633
+ filesTotal: number().int().nullable(),
7634
+ startedAt: number(),
7635
+ finishedAt: number().nullable(),
7636
+ error: string().nullable()
7637
+ });
7638
+ var RelocateFootageInputSchema = object({
7639
+ deviceId: number().optional(),
7640
+ fromLocationId: string(),
7641
+ toLocationId: string(),
7642
+ entities: array(_enum(["segments", "strips"])).optional(),
7643
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7644
+ * never allowed to starve live writers. */
7645
+ throttleMbps: number().min(1).max(1e3).optional()
7646
+ });
7647
+ var RelocateMediaInputSchema = object({
7648
+ deviceId: number().optional(),
7649
+ toLocationId: string(),
7650
+ throttleMbps: number().min(1).max(1e3).optional()
7651
+ });
7652
+ /**
7620
7653
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7621
7654
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7622
7655
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7666,6 +7699,13 @@ var StorageLocationSchema = object({
7666
7699
  nodeId: string().optional(),
7667
7700
  isDefault: boolean().default(false),
7668
7701
  isSystem: boolean().default(false),
7702
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7703
+ * for node-local locations it can reach) — never persisted, absent when the
7704
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7705
+ capacity: object({
7706
+ totalBytes: number(),
7707
+ availableBytes: number()
7708
+ }).nullable().optional(),
7669
7709
  createdAt: number(),
7670
7710
  updatedAt: number()
7671
7711
  });
@@ -8433,7 +8473,8 @@ var NcTaxonomyEntrySchema = object({
8433
8473
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8434
8474
  parentKind: string().nullable()
8435
8475
  });
8436
- object({
8476
+ /** The complete NC picker taxonomy — three grouped buckets. */
8477
+ var NcTaxonomySchema = object({
8437
8478
  videoClasses: array(NcTaxonomyEntrySchema),
8438
8479
  audioKinds: array(NcTaxonomyEntrySchema),
8439
8480
  labels: array(NcTaxonomyEntrySchema)
@@ -9375,6 +9416,7 @@ function createRuntimeStateBridge(params) {
9375
9416
  getStatus
9376
9417
  };
9377
9418
  }
9419
+ new Set(["devices", "classes"]);
9378
9420
  /**
9379
9421
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9380
9422
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9533,6 +9575,29 @@ var NcOccupancyConditionSchema = object({
9533
9575
  count: number().int().min(0).default(1),
9534
9576
  sustainSeconds: number().int().min(0).max(3600).default(15)
9535
9577
  });
9578
+ /**
9579
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9580
+ *
9581
+ * The values are not symmetric, and deliberately so — the absent value has to
9582
+ * mean exactly what every rule authored before this condition existed already
9583
+ * does:
9584
+ * - `enter` — entries and every NON-crossing record (movement state,
9585
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9586
+ * an operator who never asked for exits must not start receiving them.
9587
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9588
+ * fails closed, because "the car left the drive" is a question about a
9589
+ * boundary, not about a detection.
9590
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9591
+ *
9592
+ * A rule asking for a direction should normally also scope `zones`, which the
9593
+ * engine evaluates against the crossed zone as well as the current membership
9594
+ * (an exit's membership no longer contains the zone it just left).
9595
+ */
9596
+ var NcCrossingSchema = _enum([
9597
+ "enter",
9598
+ "exit",
9599
+ "any"
9600
+ ]);
9536
9601
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9537
9602
  var NcZoneConditionSchema = object({
9538
9603
  ids: array(string().min(1)).min(1),
@@ -9557,6 +9622,13 @@ var NcConditionsSchema = object({
9557
9622
  /** Veto zones — any hit fails the rule. */
9558
9623
  zonesExclude: array(string().min(1)).optional(),
9559
9624
  /**
9625
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9626
+ * and a closed track carries none, so a `track-end` rule asking for one
9627
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9628
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9629
+ */
9630
+ crossing: NcCrossingSchema.optional(),
9631
+ /**
9560
9632
  * Exact (case-insensitive) match on the record's collapsed `label`
9561
9633
  * (identity name / plate text / subclass).
9562
9634
  */
@@ -9691,17 +9763,85 @@ var NcRuleTargetSchema = object({
9691
9763
  * - `keyFrame` — the clean scene frame (no subject box).
9692
9764
  * - `none` — no attachment.
9693
9765
  */
9694
- var NcMediaPolicySchema = object({ attach: _enum([
9695
- "best",
9696
- "best-matching",
9697
- "keyFrame",
9698
- "none"
9699
- ]).default("best") });
9766
+ /**
9767
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9768
+ * conflate it with the selection strategy and betray the request: asking for
9769
+ * the clean scene frame on an object-event owner used to start at
9770
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9771
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9772
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9773
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9774
+ * the pipeline actually saw.
9775
+ */
9776
+ var NcMediaFrameSchema = _enum([
9777
+ "cropped",
9778
+ "full",
9779
+ "boxed"
9780
+ ]);
9781
+ var NcMediaPolicySchema = object({
9782
+ attach: _enum([
9783
+ "best",
9784
+ "best-matching",
9785
+ "keyFrame",
9786
+ "none"
9787
+ ]).default("best"),
9788
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9789
+ frame: NcMediaFrameSchema.optional(),
9790
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9791
+ * "show me the ZONE", not the whole scene or the subject crop. */
9792
+ zoneCrop: boolean().optional(),
9793
+ /**
9794
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9795
+ * event — NOT from the recording, so the camera does not have to be
9796
+ * recording, and the window sits AROUND the moment instead of a segment
9797
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9798
+ * gif, never a failed notification.
9799
+ */
9800
+ gif: boolean().optional(),
9801
+ /**
9802
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9803
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9804
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9805
+ * the degrade engine, which drops the video and keeps the still.
9806
+ */
9807
+ clip: boolean().optional(),
9808
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9809
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9810
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9811
+ /**
9812
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9813
+ * assigned profile: a notification is watched on a phone, so the 4K
9814
+ * rendition would burn CPU to produce a file the client downscales anyway.
9815
+ * A profile that is not assigned falls back to the cheapest, and the render
9816
+ * reports which one actually ran.
9817
+ */
9818
+ profile: CamProfileSchema.optional()
9819
+ });
9820
+ /**
9821
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9822
+ * notification suppresses.
9823
+ * - `shared` (default, and the absent value) — one window for the whole
9824
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9825
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9826
+ * at once and cat→cat still waits.
9827
+ *
9828
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9829
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9830
+ * see `cooldownKey` in the rule engine).
9831
+ */
9832
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9700
9833
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9701
9834
  var NcThrottleSchema = object({
9702
9835
  cooldownSec: number().int().min(0).max(86400).default(60),
9703
9836
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9704
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9837
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9838
+ /**
9839
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9840
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9841
+ * rule authored before this field simply carries none — and the engine
9842
+ * reads absent as `shared`, the pre-existing behaviour.
9843
+ */
9844
+ granularity: NcThrottleGranularitySchema.optional()
9705
9845
  });
9706
9846
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9707
9847
  var NcRuleInputSchema = object({
@@ -9710,7 +9850,19 @@ var NcRuleInputSchema = object({
9710
9850
  delivery: NcDeliverySchema,
9711
9851
  conditions: NcConditionsSchema.default({}),
9712
9852
  schedule: NcScheduleSchema.optional(),
9713
- targets: array(NcRuleTargetSchema).min(1),
9853
+ /** May be empty when `targetUsers` addresses at least one user — the
9854
+ * "at least one addressee" invariant is enforced by the provider, because
9855
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9856
+ targets: array(NcRuleTargetSchema),
9857
+ /**
9858
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9859
+ * time each user fans out to the personal targets they own
9860
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9861
+ * firing camera — a user is never notified about a device they cannot open.
9862
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9863
+ * targets.
9864
+ */
9865
+ targetUsers: array(string()).optional(),
9714
9866
  media: NcMediaPolicySchema.default({ attach: "best" }),
9715
9867
  throttle: NcThrottleSchema.default({
9716
9868
  cooldownSec: 60,
@@ -9797,6 +9949,7 @@ var NcConditionDescriptorSchema = object({
9797
9949
  "schedule",
9798
9950
  "plateMatcher",
9799
9951
  "packagePhase",
9952
+ "crossingSelect",
9800
9953
  "polygonDraw",
9801
9954
  "occupancy"
9802
9955
  ]),
@@ -9923,7 +10076,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9923
10076
  }), object({ results: array(NcTestResultSchema) }), {
9924
10077
  kind: "mutation",
9925
10078
  auth: "admin"
9926
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
10079
+ }), method(object({}), object({
10080
+ catalog: array(NcConditionDescriptorSchema),
10081
+ taxonomy: NcTaxonomySchema.optional()
10082
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9927
10083
  /**
9928
10084
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9929
10085
  *
@@ -10932,6 +11088,28 @@ method(object({
10932
11088
  }), object({ success: literal(true) }), {
10933
11089
  kind: "mutation",
10934
11090
  auth: "admin"
11091
+ }), method(object({
11092
+ deviceId: number(),
11093
+ /** Absent = the LOWEST assigned profile — a notification attachment is
11094
+ * watched on a phone, and the cheap rendition is the right default. */
11095
+ profile: CamProfileSchema.optional(),
11096
+ aroundMs: number(),
11097
+ preRollSec: number().min(0).max(20).default(3),
11098
+ postRollSec: number().min(0).max(20).default(5),
11099
+ format: _enum(["gif", "mp4"]).default("gif"),
11100
+ maxWidth: number().int().min(120).max(1920).default(480),
11101
+ /** GIF only — MP4 keeps the source cadence. */
11102
+ fps: number().int().min(1).max(15).default(5)
11103
+ }), object({
11104
+ base64: string(),
11105
+ mime: string(),
11106
+ bytes: number().int(),
11107
+ /** The profile actually rendered (what the default resolved to). */
11108
+ profile: CamProfileSchema,
11109
+ durationMs: number()
11110
+ }), {
11111
+ kind: "mutation",
11112
+ auth: "admin"
10935
11113
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10936
11114
  probed: boolean(),
10937
11115
  summary: string()
@@ -19006,7 +19184,10 @@ method(object({
19006
19184
  }), method(object({
19007
19185
  deviceId: number(),
19008
19186
  caps: array(string()).readonly().optional()
19009
- }), record(string(), unknown().nullable()));
19187
+ }), record(string(), unknown().nullable())), method(object({
19188
+ deviceIds: array(number()).readonly(),
19189
+ caps: array(string()).readonly().optional()
19190
+ }), record(string(), record(string(), unknown().nullable())));
19010
19191
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
19011
19192
  deviceId: number(),
19012
19193
  capName: string()
@@ -19937,6 +20118,36 @@ var TargetKindSchema = object({
19937
20118
  icon: string(),
19938
20119
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19939
20120
  addonId: string(),
20121
+ /**
20122
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
20123
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
20124
+ * when the addon bundles no icon for that kind — the client then falls back
20125
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
20126
+ *
20127
+ * Root-relative on purpose: it resolves against whatever origin serves a web
20128
+ * client, and a native client joins it onto its own hub base.
20129
+ *
20130
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
20131
+ * field that survived only because the runtime cap-router forwards provider
20132
+ * output verbatim — so every consumer had to re-declare it by hand to stop
20133
+ * its own Zod parse from stripping it, and the whole arrangement would have
20134
+ * broken silently the moment output validation was tightened anywhere.
20135
+ */
20136
+ iconUrl: string().optional(),
20137
+ /**
20138
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
20139
+ *
20140
+ * The server knows this and therefore says it, because the client cannot
20141
+ * safely guess: a React-Native client renders SVG and raster through two
20142
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
20143
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
20144
+ * placeholder glyph for every vector icon while the web build looked fine.
20145
+ *
20146
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
20147
+ * not been updated — a client that cannot determine the type should prefer
20148
+ * its raster path, which is the safe default for an unknown image.
20149
+ */
20150
+ iconMediaType: string().optional(),
19940
20151
  configSchema: ConfigSchemaPassthrough,
19941
20152
  supportsDiscovery: boolean(),
19942
20153
  caps: TargetKindCapsSchema
@@ -20384,6 +20595,29 @@ var MotionEventSchema = object({
20384
20595
  * Absent on legacy rows ⇒ treat as `pipeline`.
20385
20596
  */
20386
20597
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
20598
+ /**
20599
+ * The confirmed zone crossing that produced an object event. Present ONLY on
20600
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
20601
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
20602
+ * appearance event carry none, so a rule asking for a direction fails closed
20603
+ * on them.
20604
+ *
20605
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
20606
+ * into its own event, so a frame in which a track enters A while leaving B
20607
+ * produces two events with two directions — never one ambiguous row.
20608
+ *
20609
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
20610
+ * membership the box has NOW, and by definition it no longer contains the zone
20611
+ * that was just left. Without the id here, a zone-scoped rule could never match
20612
+ * the exit it asked for.
20613
+ */
20614
+ var ZoneCrossingSchema = object({
20615
+ direction: _enum(["enter", "exit"]),
20616
+ /** Admin zone id crossed. */
20617
+ zoneId: string(),
20618
+ /** Zone display name at crossing time (falls back to the id). */
20619
+ zoneName: string().optional()
20620
+ });
20387
20621
  var ObjectEventSchema = object({
20388
20622
  ...BaseEventFields,
20389
20623
  kind: literal("object"),
@@ -20410,6 +20644,12 @@ var ObjectEventSchema = object({
20410
20644
  zones: array(string()).readonly().optional(),
20411
20645
  /** Omitted in slim projection. */
20412
20646
  state: TrackStateSchema.optional(),
20647
+ /**
20648
+ * The zone crossing this event IS, when it is one. Absent on every other
20649
+ * event kind (movement state, appearance, package) — see
20650
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
20651
+ */
20652
+ zoneCrossing: ZoneCrossingSchema.optional(),
20413
20653
  /** Detection-frame dimensions in pixels — let consumers normalize the
20414
20654
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
20415
20655
  frameWidth: number().optional(),
@@ -20668,6 +20908,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20668
20908
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
20669
20909
  kind: "mutation",
20670
20910
  auth: "admin"
20911
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
20912
+ kind: "mutation",
20913
+ auth: "admin"
20914
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
20915
+ kind: "query",
20916
+ auth: "admin"
20917
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
20918
+ kind: "mutation",
20919
+ auth: "admin"
20671
20920
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20672
20921
  kind: "query",
20673
20922
  auth: "admin"
@@ -23249,6 +23498,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23249
23498
  */
23250
23499
  priority: number()
23251
23500
  })).readonly() });
23501
+ /**
23502
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23503
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
23504
+ * what AUTO currently picks, so the UI can show the effective value either way.
23505
+ */
23506
+ var NotificationEndpointSchema = object({
23507
+ /** The operator's explicit choice, or null for AUTO. */
23508
+ baseUrl: string().nullable(),
23509
+ /** What the ranking currently resolves to (null when nothing is reachable). */
23510
+ resolved: string().nullable()
23511
+ });
23252
23512
  var AllowedAddressesSchema = object({
23253
23513
  /**
23254
23514
  * Allowlist of interface addresses operators have explicitly opted
@@ -23271,7 +23531,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
23271
23531
  * to avoid mixed-content blocks in the browser. The public
23272
23532
  * tunnel always emits `https://` regardless. */
23273
23533
  scheme: _enum(["http", "https"]).optional()
23274
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
23534
+ }), 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" });
23275
23535
  /**
23276
23536
  * mesh-network — collection cap for mesh-VPN providers.
23277
23537
  *
@@ -24137,7 +24397,12 @@ var RecordingDeviceUsageSchema = object({
24137
24397
  var RecordingLocationUsageSchema = object({
24138
24398
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
24139
24399
  locationId: string().nullable(),
24140
- /** Bytes of recordings stored on this location. */
24400
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
24401
+ * is emitted per physical disk (2026-07-29): two locations on one root
24402
+ * previously rendered as two identical "disks" with a nonsensical used
24403
+ * split — hydrate attribution across aliases is arbitrary by nature. */
24404
+ locationIds: array(string()).optional(),
24405
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
24141
24406
  usedBytes: number(),
24142
24407
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
24143
24408
  availableBytes: number().nullable(),
@@ -24249,6 +24514,44 @@ method(object({
24249
24514
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
24250
24515
  kind: "query",
24251
24516
  auth: "admin"
24517
+ }), method(object({
24518
+ deviceId: number(),
24519
+ aroundMs: number(),
24520
+ preRollSec: number().min(0).max(30).default(2),
24521
+ postRollSec: number().min(0).max(30).default(5),
24522
+ maxWidth: number().int().min(120).max(1280).default(480),
24523
+ fps: number().int().min(1).max(15).default(5)
24524
+ }), object({
24525
+ gifBase64: string(),
24526
+ fromMs: number(),
24527
+ toMs: number()
24528
+ }), {
24529
+ kind: "mutation",
24530
+ auth: "admin"
24531
+ }), method(object({
24532
+ deviceId: number(),
24533
+ aroundMs: number(),
24534
+ preRollSec: number().min(0).max(30).default(3),
24535
+ postRollSec: number().min(0).max(30).default(7),
24536
+ maxWidth: number().int().min(160).max(1920).default(640)
24537
+ }), object({
24538
+ clipBase64: string(),
24539
+ mime: string(),
24540
+ fromMs: number(),
24541
+ toMs: number(),
24542
+ bytes: number().int()
24543
+ }), {
24544
+ kind: "mutation",
24545
+ auth: "admin"
24546
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
24547
+ kind: "mutation",
24548
+ auth: "admin"
24549
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
24550
+ kind: "query",
24551
+ auth: "admin"
24552
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24553
+ kind: "mutation",
24554
+ auth: "admin"
24252
24555
  });
24253
24556
  /**
24254
24557
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -26051,6 +26354,12 @@ Object.freeze({
26051
26354
  addonId: null,
26052
26355
  access: "view"
26053
26356
  },
26357
+ "deviceManager.getDeviceStatusAggregateBatch": {
26358
+ capName: "device-manager",
26359
+ capScope: "system",
26360
+ addonId: null,
26361
+ access: "view"
26362
+ },
26054
26363
  "deviceManager.getLinkedDevices": {
26055
26364
  capName: "device-manager",
26056
26365
  capScope: "system",
@@ -26945,6 +27254,12 @@ Object.freeze({
26945
27254
  addonId: null,
26946
27255
  access: "view"
26947
27256
  },
27257
+ "localNetwork.getNotificationEndpoint": {
27258
+ capName: "local-network",
27259
+ capScope: "system",
27260
+ addonId: null,
27261
+ access: "view"
27262
+ },
26948
27263
  "localNetwork.getPreferred": {
26949
27264
  capName: "local-network",
26950
27265
  capScope: "system",
@@ -26969,6 +27284,12 @@ Object.freeze({
26969
27284
  addonId: null,
26970
27285
  access: "create"
26971
27286
  },
27287
+ "localNetwork.setNotificationEndpoint": {
27288
+ capName: "local-network",
27289
+ capScope: "system",
27290
+ addonId: null,
27291
+ access: "create"
27292
+ },
26972
27293
  "lockControl.lock": {
26973
27294
  capName: "lock-control",
26974
27295
  capScope: "device",
@@ -27611,6 +27932,12 @@ Object.freeze({
27611
27932
  addonId: null,
27612
27933
  access: "create"
27613
27934
  },
27935
+ "pipelineAnalytics.cancelMediaRelocate": {
27936
+ capName: "pipeline-analytics",
27937
+ capScope: "device",
27938
+ addonId: null,
27939
+ access: "create"
27940
+ },
27614
27941
  "pipelineAnalytics.clearTracks": {
27615
27942
  capName: "pipeline-analytics",
27616
27943
  capScope: "device",
@@ -27665,6 +27992,12 @@ Object.freeze({
27665
27992
  addonId: null,
27666
27993
  access: "view"
27667
27994
  },
27995
+ "pipelineAnalytics.getMediaRelocateStatus": {
27996
+ capName: "pipeline-analytics",
27997
+ capScope: "device",
27998
+ addonId: null,
27999
+ access: "view"
28000
+ },
27668
28001
  "pipelineAnalytics.getMotionEvents": {
27669
28002
  capName: "pipeline-analytics",
27670
28003
  capScope: "device",
@@ -27737,6 +28070,12 @@ Object.freeze({
27737
28070
  addonId: null,
27738
28071
  access: "create"
27739
28072
  },
28073
+ "pipelineAnalytics.relocateMedia": {
28074
+ capName: "pipeline-analytics",
28075
+ capScope: "device",
28076
+ addonId: null,
28077
+ access: "create"
28078
+ },
27740
28079
  "pipelineAnalytics.searchObjectEvents": {
27741
28080
  capName: "pipeline-analytics",
27742
28081
  capScope: "device",
@@ -28499,6 +28838,12 @@ Object.freeze({
28499
28838
  addonId: null,
28500
28839
  access: "create"
28501
28840
  },
28841
+ "recording.cancelRelocate": {
28842
+ capName: "recording",
28843
+ capScope: "system",
28844
+ addonId: null,
28845
+ access: "create"
28846
+ },
28502
28847
  "recording.deleteFootprint": {
28503
28848
  capName: "recording",
28504
28849
  capScope: "system",
@@ -28529,6 +28874,12 @@ Object.freeze({
28529
28874
  addonId: null,
28530
28875
  access: "view"
28531
28876
  },
28877
+ "recording.getRelocateStatus": {
28878
+ capName: "recording",
28879
+ capScope: "system",
28880
+ addonId: null,
28881
+ access: "view"
28882
+ },
28532
28883
  "recording.getStorageUsage": {
28533
28884
  capName: "recording",
28534
28885
  capScope: "system",
@@ -28559,6 +28910,24 @@ Object.freeze({
28559
28910
  addonId: null,
28560
28911
  access: "view"
28561
28912
  },
28913
+ "recording.relocateFootage": {
28914
+ capName: "recording",
28915
+ capScope: "system",
28916
+ addonId: null,
28917
+ access: "create"
28918
+ },
28919
+ "recording.renderClip": {
28920
+ capName: "recording",
28921
+ capScope: "system",
28922
+ addonId: null,
28923
+ access: "create"
28924
+ },
28925
+ "recording.renderGif": {
28926
+ capName: "recording",
28927
+ capScope: "system",
28928
+ addonId: null,
28929
+ access: "create"
28930
+ },
28562
28931
  "recording.rescanStorage": {
28563
28932
  capName: "recording",
28564
28933
  capScope: "system",
@@ -29153,6 +29522,12 @@ Object.freeze({
29153
29522
  addonId: null,
29154
29523
  access: "create"
29155
29524
  },
29525
+ "streamBroker.renderPreBufferClip": {
29526
+ capName: "stream-broker",
29527
+ capScope: "system",
29528
+ addonId: null,
29529
+ access: "create"
29530
+ },
29156
29531
  "streamBroker.restartProfile": {
29157
29532
  capName: "stream-broker",
29158
29533
  capScope: "system",