@camstack/addon-provider-dreo 0.2.6 → 0.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.js CHANGED
@@ -35,7 +35,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
35
35
  //#endregion
36
36
  let crypto$1 = require("crypto");
37
37
  let events = require("events");
38
- //#region ../types/dist/event-category-BLcNejAE.mjs
38
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
39
39
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
40
40
  EventCategory["SystemBoot"] = "system.boot";
41
41
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -306,6 +306,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
306
306
  */
307
307
  EventCategory["DeviceStateChanged"] = "device.state-changed";
308
308
  /**
309
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
310
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
311
+ *
312
+ * Emitted only on a change, so a steady scene is silent. It exists so a
313
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
314
+ * one live badge with no push signal at all, and it cost a request every
315
+ * four seconds per visible camera.
316
+ *
317
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
318
+ * keeps a slow reconcile rather than trusting it alone.
319
+ */
320
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
321
+ /**
309
322
  * Cap event fired by every device that registers the `battery`
310
323
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
311
324
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7235,35 +7248,22 @@ var ConvertResultSchema = object({
7235
7248
  */
7236
7249
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7237
7250
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7238
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7239
- kind: literal("timeOfDay"),
7240
- start: string().regex(HHMM),
7241
- end: string().regex(HHMM),
7242
- /** Restrict to these weekdays; omit = every day. */
7243
- days: array(RecordingWeekdaySchema).optional()
7244
- })]);
7245
- var RecordingModeSchema = _enum([
7246
- "continuous",
7247
- "onMotion",
7248
- "onAudioThreshold"
7249
- ]);
7250
7251
  /**
7251
- * First-class, authoritative per-camera storage mode — the explicit choice the
7252
- * UI reads directly (never inferred from `rules`):
7253
- * - `off` — not recording.
7254
- * - `events` — record only around triggers (motion / audio threshold),
7255
- * with pre/post-buffer.
7256
- * - `continuous` — record 24/7 within the schedule.
7252
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7253
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7254
+ * - `off` — no band covers the camera (or it is disabled).
7255
+ * - `events` — every band records around triggers only.
7256
+ * - `continuous` — at least one band records continuously.
7257
7257
  *
7258
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7259
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7258
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7259
+ * every save (`activeModeForConfig`). Writing it has no effect.
7260
7260
  */
7261
7261
  var RecordingStorageModeSchema = _enum([
7262
7262
  "off",
7263
7263
  "events",
7264
7264
  "continuous"
7265
7265
  ]);
7266
- /** Which detectors trigger an `events`-mode recording. */
7266
+ /** Which detectors trigger an `events`-mode band. */
7267
7267
  var RecordingTriggersSchema = object({
7268
7268
  motion: boolean().optional(),
7269
7269
  audioThresholdDbfs: number().optional()
@@ -7299,18 +7299,6 @@ var RecordingBandSchema = object({
7299
7299
  preBufferSec: number().min(0).optional(),
7300
7300
  postBufferSec: number().min(0).optional()
7301
7301
  });
7302
- var RecordingRuleSchema = object({
7303
- schedule: RecordingScheduleSchema,
7304
- mode: RecordingModeSchema,
7305
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7306
- preBufferSec: number().min(0).default(0),
7307
- /** Keep recording until this many seconds after the last trigger. */
7308
- postBufferSec: number().min(0).default(0),
7309
- /** Each new trigger restarts the post-buffer window. */
7310
- resetTimeoutOnNewEvent: boolean().default(true),
7311
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7312
- thresholdDbfs: number().optional()
7313
- });
7314
7302
  /**
7315
7303
  * Per-device retention overrides. Every field is optional; an unset or `0`
7316
7304
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7344,40 +7332,28 @@ var ScrubThumbnailPresetSchema = _enum([
7344
7332
  /**
7345
7333
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7346
7334
  *
7347
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7348
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7349
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7350
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7335
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7336
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7337
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7338
+ *
7339
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7340
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7341
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7342
+ * persist a band-less config, i.e. silently stop recording the camera.
7351
7343
  */
7352
7344
  var RecordingConfigSchema = object({
7353
7345
  enabled: boolean(),
7354
- /** Authoritative storage mode. Absent on legacy targets derived once via
7355
- * `migrateRulesToMode`, then persisted. */
7346
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7347
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7356
7348
  mode: RecordingStorageModeSchema.optional(),
7357
7349
  profiles: array(CamProfileSchema).optional(),
7358
7350
  segmentSeconds: number().int().positive().optional(),
7359
- /** Shared recording time-bands for `events` & `continuous` — record only when
7360
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7361
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7362
- schedules: array(RecordingScheduleSchema).optional(),
7363
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7364
- * normalized into `schedules` on read and never written going forward. (Not
7365
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7366
- schedule: RecordingScheduleSchema.optional(),
7367
- /** `events`-mode only — which detectors trigger a recording. */
7368
- triggers: RecordingTriggersSchema.optional(),
7369
- /** `events`-mode only — seconds retained before / after a trigger. */
7370
- preBufferSec: number().min(0).optional(),
7371
- postBufferSec: number().min(0).optional(),
7372
- /** DEPRECATED authoring input; retained for migration/transition. */
7373
- rules: array(RecordingRuleSchema).optional(),
7374
7351
  /**
7375
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7376
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7377
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7378
- * derived into bands once via `migrateConfigToBands`.
7352
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7353
+ * the recorder's band engine consumes. An empty array = record nothing;
7354
+ * "off" is the absence of a covering band, never a band value.
7379
7355
  */
7380
- bands: array(RecordingBandSchema).optional(),
7356
+ bands: array(RecordingBandSchema).default([]),
7381
7357
  retention: RecordingRetentionSchema.optional(),
7382
7358
  /**
7383
7359
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7385,8 +7361,15 @@ var RecordingConfigSchema = object({
7385
7361
  * windows only — existing sheets are immutable, and each window's index
7386
7362
  * carries its own tile dims so mixed-preset history renders correctly.
7387
7363
  */
7388
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7389
- });
7364
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7365
+ /**
7366
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7367
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7368
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7369
+ * are written and scrub reads exact keyframes at every velocity.
7370
+ */
7371
+ stripsEnabled: boolean().optional()
7372
+ }).strict();
7390
7373
  /**
7391
7374
  * Ops-log — the durable, append-only operations audit shared by the
7392
7375
  * recordings and events management surfaces.
@@ -7405,7 +7388,8 @@ var OpsLogOpSchema = _enum([
7405
7388
  "prune",
7406
7389
  "manual-delete",
7407
7390
  "rescan",
7408
- "retention-run"
7391
+ "retention-run",
7392
+ "relocate"
7409
7393
  ]);
7410
7394
  /** Why the operation ran. */
7411
7395
  var OpsLogReasonSchema = _enum([
@@ -7444,6 +7428,55 @@ var OpsLogQueryInputSchema = object({
7444
7428
  limit: number().int().min(1).max(1e3).optional()
7445
7429
  });
7446
7430
  /**
7431
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7432
+ *
7433
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7434
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7435
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7436
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7437
+ * after verify) and each completed/failed run also lands one durable ops-log
7438
+ * row on the owning addon's surface.
7439
+ */
7440
+ var RelocateJobStateSchema = _enum([
7441
+ "running",
7442
+ "done",
7443
+ "failed",
7444
+ "cancelled"
7445
+ ]);
7446
+ var RelocateJobSchema = object({
7447
+ jobId: string(),
7448
+ state: RelocateJobStateSchema,
7449
+ /** Source location — for media relocation this is informational ('*': rows
7450
+ * move from wherever they are to the target). */
7451
+ fromLocationId: string(),
7452
+ toLocationId: string(),
7453
+ /** Scoped device, or null = every device. */
7454
+ deviceId: number().nullable(),
7455
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7456
+ entities: array(string()),
7457
+ filesMoved: number().int(),
7458
+ bytesMoved: number().int(),
7459
+ /** Total files discovered up front; null while (or when) unknown. */
7460
+ filesTotal: number().int().nullable(),
7461
+ startedAt: number(),
7462
+ finishedAt: number().nullable(),
7463
+ error: string().nullable()
7464
+ });
7465
+ var RelocateFootageInputSchema = object({
7466
+ deviceId: number().optional(),
7467
+ fromLocationId: string(),
7468
+ toLocationId: string(),
7469
+ entities: array(_enum(["segments", "strips"])).optional(),
7470
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7471
+ * never allowed to starve live writers. */
7472
+ throttleMbps: number().min(1).max(1e3).optional()
7473
+ });
7474
+ var RelocateMediaInputSchema = object({
7475
+ deviceId: number().optional(),
7476
+ toLocationId: string(),
7477
+ throttleMbps: number().min(1).max(1e3).optional()
7478
+ });
7479
+ /**
7447
7480
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7448
7481
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7449
7482
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7493,6 +7526,13 @@ var StorageLocationSchema = object({
7493
7526
  nodeId: string().optional(),
7494
7527
  isDefault: boolean().default(false),
7495
7528
  isSystem: boolean().default(false),
7529
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7530
+ * for node-local locations it can reach) — never persisted, absent when the
7531
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7532
+ capacity: object({
7533
+ totalBytes: number(),
7534
+ availableBytes: number()
7535
+ }).nullable().optional(),
7496
7536
  createdAt: number(),
7497
7537
  updatedAt: number()
7498
7538
  });
@@ -8260,7 +8300,8 @@ var NcTaxonomyEntrySchema = object({
8260
8300
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8261
8301
  parentKind: string().nullable()
8262
8302
  });
8263
- object({
8303
+ /** The complete NC picker taxonomy — three grouped buckets. */
8304
+ var NcTaxonomySchema = object({
8264
8305
  videoClasses: array(NcTaxonomyEntrySchema),
8265
8306
  audioKinds: array(NcTaxonomyEntrySchema),
8266
8307
  labels: array(NcTaxonomyEntrySchema)
@@ -9163,6 +9204,7 @@ function shallowEqual(a, b) {
9163
9204
  for (const k of ak) if (a[k] !== b[k]) return false;
9164
9205
  return true;
9165
9206
  }
9207
+ new Set(["devices", "classes"]);
9166
9208
  /**
9167
9209
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9168
9210
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9321,6 +9363,29 @@ var NcOccupancyConditionSchema = object({
9321
9363
  count: number().int().min(0).default(1),
9322
9364
  sustainSeconds: number().int().min(0).max(3600).default(15)
9323
9365
  });
9366
+ /**
9367
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9368
+ *
9369
+ * The values are not symmetric, and deliberately so — the absent value has to
9370
+ * mean exactly what every rule authored before this condition existed already
9371
+ * does:
9372
+ * - `enter` — entries and every NON-crossing record (movement state,
9373
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9374
+ * an operator who never asked for exits must not start receiving them.
9375
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9376
+ * fails closed, because "the car left the drive" is a question about a
9377
+ * boundary, not about a detection.
9378
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9379
+ *
9380
+ * A rule asking for a direction should normally also scope `zones`, which the
9381
+ * engine evaluates against the crossed zone as well as the current membership
9382
+ * (an exit's membership no longer contains the zone it just left).
9383
+ */
9384
+ var NcCrossingSchema = _enum([
9385
+ "enter",
9386
+ "exit",
9387
+ "any"
9388
+ ]);
9324
9389
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9325
9390
  var NcZoneConditionSchema = object({
9326
9391
  ids: array(string().min(1)).min(1),
@@ -9345,6 +9410,13 @@ var NcConditionsSchema = object({
9345
9410
  /** Veto zones — any hit fails the rule. */
9346
9411
  zonesExclude: array(string().min(1)).optional(),
9347
9412
  /**
9413
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9414
+ * and a closed track carries none, so a `track-end` rule asking for one
9415
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9416
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9417
+ */
9418
+ crossing: NcCrossingSchema.optional(),
9419
+ /**
9348
9420
  * Exact (case-insensitive) match on the record's collapsed `label`
9349
9421
  * (identity name / plate text / subclass).
9350
9422
  */
@@ -9479,17 +9551,85 @@ var NcRuleTargetSchema = object({
9479
9551
  * - `keyFrame` — the clean scene frame (no subject box).
9480
9552
  * - `none` — no attachment.
9481
9553
  */
9482
- var NcMediaPolicySchema = object({ attach: _enum([
9483
- "best",
9484
- "best-matching",
9485
- "keyFrame",
9486
- "none"
9487
- ]).default("best") });
9554
+ /**
9555
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9556
+ * conflate it with the selection strategy and betray the request: asking for
9557
+ * the clean scene frame on an object-event owner used to start at
9558
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9559
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9560
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9561
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9562
+ * the pipeline actually saw.
9563
+ */
9564
+ var NcMediaFrameSchema = _enum([
9565
+ "cropped",
9566
+ "full",
9567
+ "boxed"
9568
+ ]);
9569
+ var NcMediaPolicySchema = object({
9570
+ attach: _enum([
9571
+ "best",
9572
+ "best-matching",
9573
+ "keyFrame",
9574
+ "none"
9575
+ ]).default("best"),
9576
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9577
+ frame: NcMediaFrameSchema.optional(),
9578
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9579
+ * "show me the ZONE", not the whole scene or the subject crop. */
9580
+ zoneCrop: boolean().optional(),
9581
+ /**
9582
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9583
+ * event — NOT from the recording, so the camera does not have to be
9584
+ * recording, and the window sits AROUND the moment instead of a segment
9585
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9586
+ * gif, never a failed notification.
9587
+ */
9588
+ gif: boolean().optional(),
9589
+ /**
9590
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9591
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9592
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9593
+ * the degrade engine, which drops the video and keeps the still.
9594
+ */
9595
+ clip: boolean().optional(),
9596
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9597
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9598
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9599
+ /**
9600
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9601
+ * assigned profile: a notification is watched on a phone, so the 4K
9602
+ * rendition would burn CPU to produce a file the client downscales anyway.
9603
+ * A profile that is not assigned falls back to the cheapest, and the render
9604
+ * reports which one actually ran.
9605
+ */
9606
+ profile: CamProfileSchema.optional()
9607
+ });
9608
+ /**
9609
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9610
+ * notification suppresses.
9611
+ * - `shared` (default, and the absent value) — one window for the whole
9612
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9613
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9614
+ * at once and cat→cat still waits.
9615
+ *
9616
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9617
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9618
+ * see `cooldownKey` in the rule engine).
9619
+ */
9620
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9488
9621
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9489
9622
  var NcThrottleSchema = object({
9490
9623
  cooldownSec: number().int().min(0).max(86400).default(60),
9491
9624
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9492
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9625
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9626
+ /**
9627
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9628
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9629
+ * rule authored before this field simply carries none — and the engine
9630
+ * reads absent as `shared`, the pre-existing behaviour.
9631
+ */
9632
+ granularity: NcThrottleGranularitySchema.optional()
9493
9633
  });
9494
9634
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9495
9635
  var NcRuleInputSchema = object({
@@ -9498,7 +9638,19 @@ var NcRuleInputSchema = object({
9498
9638
  delivery: NcDeliverySchema,
9499
9639
  conditions: NcConditionsSchema.default({}),
9500
9640
  schedule: NcScheduleSchema.optional(),
9501
- targets: array(NcRuleTargetSchema).min(1),
9641
+ /** May be empty when `targetUsers` addresses at least one user — the
9642
+ * "at least one addressee" invariant is enforced by the provider, because
9643
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9644
+ targets: array(NcRuleTargetSchema),
9645
+ /**
9646
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9647
+ * time each user fans out to the personal targets they own
9648
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9649
+ * firing camera — a user is never notified about a device they cannot open.
9650
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9651
+ * targets.
9652
+ */
9653
+ targetUsers: array(string()).optional(),
9502
9654
  media: NcMediaPolicySchema.default({ attach: "best" }),
9503
9655
  throttle: NcThrottleSchema.default({
9504
9656
  cooldownSec: 60,
@@ -9585,6 +9737,7 @@ var NcConditionDescriptorSchema = object({
9585
9737
  "schedule",
9586
9738
  "plateMatcher",
9587
9739
  "packagePhase",
9740
+ "crossingSelect",
9588
9741
  "polygonDraw",
9589
9742
  "occupancy"
9590
9743
  ]),
@@ -9711,7 +9864,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9711
9864
  }), object({ results: array(NcTestResultSchema) }), {
9712
9865
  kind: "mutation",
9713
9866
  auth: "admin"
9714
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9867
+ }), method(object({}), object({
9868
+ catalog: array(NcConditionDescriptorSchema),
9869
+ taxonomy: NcTaxonomySchema.optional()
9870
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9715
9871
  /**
9716
9872
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9717
9873
  *
@@ -10720,6 +10876,28 @@ method(object({
10720
10876
  }), object({ success: literal(true) }), {
10721
10877
  kind: "mutation",
10722
10878
  auth: "admin"
10879
+ }), method(object({
10880
+ deviceId: number(),
10881
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10882
+ * watched on a phone, and the cheap rendition is the right default. */
10883
+ profile: CamProfileSchema.optional(),
10884
+ aroundMs: number(),
10885
+ preRollSec: number().min(0).max(20).default(3),
10886
+ postRollSec: number().min(0).max(20).default(5),
10887
+ format: _enum(["gif", "mp4"]).default("gif"),
10888
+ maxWidth: number().int().min(120).max(1920).default(480),
10889
+ /** GIF only — MP4 keeps the source cadence. */
10890
+ fps: number().int().min(1).max(15).default(5)
10891
+ }), object({
10892
+ base64: string(),
10893
+ mime: string(),
10894
+ bytes: number().int(),
10895
+ /** The profile actually rendered (what the default resolved to). */
10896
+ profile: CamProfileSchema,
10897
+ durationMs: number()
10898
+ }), {
10899
+ kind: "mutation",
10900
+ auth: "admin"
10723
10901
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10724
10902
  probed: boolean(),
10725
10903
  summary: string()
@@ -18799,7 +18977,10 @@ method(object({
18799
18977
  }), method(object({
18800
18978
  deviceId: number(),
18801
18979
  caps: array(string()).readonly().optional()
18802
- }), record(string(), unknown().nullable()));
18980
+ }), record(string(), unknown().nullable())), method(object({
18981
+ deviceIds: array(number()).readonly(),
18982
+ caps: array(string()).readonly().optional()
18983
+ }), record(string(), record(string(), unknown().nullable())));
18803
18984
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
18804
18985
  deviceId: number(),
18805
18986
  capName: string()
@@ -19730,6 +19911,36 @@ var TargetKindSchema = object({
19730
19911
  icon: string(),
19731
19912
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19732
19913
  addonId: string(),
19914
+ /**
19915
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
19916
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
19917
+ * when the addon bundles no icon for that kind — the client then falls back
19918
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
19919
+ *
19920
+ * Root-relative on purpose: it resolves against whatever origin serves a web
19921
+ * client, and a native client joins it onto its own hub base.
19922
+ *
19923
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
19924
+ * field that survived only because the runtime cap-router forwards provider
19925
+ * output verbatim — so every consumer had to re-declare it by hand to stop
19926
+ * its own Zod parse from stripping it, and the whole arrangement would have
19927
+ * broken silently the moment output validation was tightened anywhere.
19928
+ */
19929
+ iconUrl: string().optional(),
19930
+ /**
19931
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
19932
+ *
19933
+ * The server knows this and therefore says it, because the client cannot
19934
+ * safely guess: a React-Native client renders SVG and raster through two
19935
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
19936
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
19937
+ * placeholder glyph for every vector icon while the web build looked fine.
19938
+ *
19939
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
19940
+ * not been updated — a client that cannot determine the type should prefer
19941
+ * its raster path, which is the safe default for an unknown image.
19942
+ */
19943
+ iconMediaType: string().optional(),
19733
19944
  configSchema: ConfigSchemaPassthrough,
19734
19945
  supportsDiscovery: boolean(),
19735
19946
  caps: TargetKindCapsSchema
@@ -20177,6 +20388,29 @@ var MotionEventSchema = object({
20177
20388
  * Absent on legacy rows ⇒ treat as `pipeline`.
20178
20389
  */
20179
20390
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
20391
+ /**
20392
+ * The confirmed zone crossing that produced an object event. Present ONLY on
20393
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
20394
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
20395
+ * appearance event carry none, so a rule asking for a direction fails closed
20396
+ * on them.
20397
+ *
20398
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
20399
+ * into its own event, so a frame in which a track enters A while leaving B
20400
+ * produces two events with two directions — never one ambiguous row.
20401
+ *
20402
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
20403
+ * membership the box has NOW, and by definition it no longer contains the zone
20404
+ * that was just left. Without the id here, a zone-scoped rule could never match
20405
+ * the exit it asked for.
20406
+ */
20407
+ var ZoneCrossingSchema = object({
20408
+ direction: _enum(["enter", "exit"]),
20409
+ /** Admin zone id crossed. */
20410
+ zoneId: string(),
20411
+ /** Zone display name at crossing time (falls back to the id). */
20412
+ zoneName: string().optional()
20413
+ });
20180
20414
  var ObjectEventSchema = object({
20181
20415
  ...BaseEventFields,
20182
20416
  kind: literal("object"),
@@ -20203,6 +20437,12 @@ var ObjectEventSchema = object({
20203
20437
  zones: array(string()).readonly().optional(),
20204
20438
  /** Omitted in slim projection. */
20205
20439
  state: TrackStateSchema.optional(),
20440
+ /**
20441
+ * The zone crossing this event IS, when it is one. Absent on every other
20442
+ * event kind (movement state, appearance, package) — see
20443
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
20444
+ */
20445
+ zoneCrossing: ZoneCrossingSchema.optional(),
20206
20446
  /** Detection-frame dimensions in pixels — let consumers normalize the
20207
20447
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
20208
20448
  frameWidth: number().optional(),
@@ -20461,6 +20701,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20461
20701
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
20462
20702
  kind: "mutation",
20463
20703
  auth: "admin"
20704
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
20705
+ kind: "mutation",
20706
+ auth: "admin"
20707
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
20708
+ kind: "query",
20709
+ auth: "admin"
20710
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
20711
+ kind: "mutation",
20712
+ auth: "admin"
20464
20713
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20465
20714
  kind: "query",
20466
20715
  auth: "admin"
@@ -22940,6 +23189,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22940
23189
  */
22941
23190
  priority: number()
22942
23191
  })).readonly() });
23192
+ /**
23193
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23194
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
23195
+ * what AUTO currently picks, so the UI can show the effective value either way.
23196
+ */
23197
+ var NotificationEndpointSchema = object({
23198
+ /** The operator's explicit choice, or null for AUTO. */
23199
+ baseUrl: string().nullable(),
23200
+ /** What the ranking currently resolves to (null when nothing is reachable). */
23201
+ resolved: string().nullable()
23202
+ });
22943
23203
  var AllowedAddressesSchema = object({
22944
23204
  /**
22945
23205
  * Allowlist of interface addresses operators have explicitly opted
@@ -22962,7 +23222,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
22962
23222
  * to avoid mixed-content blocks in the browser. The public
22963
23223
  * tunnel always emits `https://` regardless. */
22964
23224
  scheme: _enum(["http", "https"]).optional()
22965
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
23225
+ }), 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" });
22966
23226
  /**
22967
23227
  * mesh-network — collection cap for mesh-VPN providers.
22968
23228
  *
@@ -23761,7 +24021,12 @@ var RecordingDeviceUsageSchema = object({
23761
24021
  var RecordingLocationUsageSchema = object({
23762
24022
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
23763
24023
  locationId: string().nullable(),
23764
- /** Bytes of recordings stored on this location. */
24024
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
24025
+ * is emitted per physical disk (2026-07-29): two locations on one root
24026
+ * previously rendered as two identical "disks" with a nonsensical used
24027
+ * split — hydrate attribution across aliases is arbitrary by nature. */
24028
+ locationIds: array(string()).optional(),
24029
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
23765
24030
  usedBytes: number(),
23766
24031
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
23767
24032
  availableBytes: number().nullable(),
@@ -23873,6 +24138,44 @@ method(object({
23873
24138
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
23874
24139
  kind: "query",
23875
24140
  auth: "admin"
24141
+ }), method(object({
24142
+ deviceId: number(),
24143
+ aroundMs: number(),
24144
+ preRollSec: number().min(0).max(30).default(2),
24145
+ postRollSec: number().min(0).max(30).default(5),
24146
+ maxWidth: number().int().min(120).max(1280).default(480),
24147
+ fps: number().int().min(1).max(15).default(5)
24148
+ }), object({
24149
+ gifBase64: string(),
24150
+ fromMs: number(),
24151
+ toMs: number()
24152
+ }), {
24153
+ kind: "mutation",
24154
+ auth: "admin"
24155
+ }), method(object({
24156
+ deviceId: number(),
24157
+ aroundMs: number(),
24158
+ preRollSec: number().min(0).max(30).default(3),
24159
+ postRollSec: number().min(0).max(30).default(7),
24160
+ maxWidth: number().int().min(160).max(1920).default(640)
24161
+ }), object({
24162
+ clipBase64: string(),
24163
+ mime: string(),
24164
+ fromMs: number(),
24165
+ toMs: number(),
24166
+ bytes: number().int()
24167
+ }), {
24168
+ kind: "mutation",
24169
+ auth: "admin"
24170
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
24171
+ kind: "mutation",
24172
+ auth: "admin"
24173
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
24174
+ kind: "query",
24175
+ auth: "admin"
24176
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24177
+ kind: "mutation",
24178
+ auth: "admin"
23876
24179
  });
23877
24180
  /**
23878
24181
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25464,6 +25767,12 @@ Object.freeze({
25464
25767
  addonId: null,
25465
25768
  access: "view"
25466
25769
  },
25770
+ "deviceManager.getDeviceStatusAggregateBatch": {
25771
+ capName: "device-manager",
25772
+ capScope: "system",
25773
+ addonId: null,
25774
+ access: "view"
25775
+ },
25467
25776
  "deviceManager.getLinkedDevices": {
25468
25777
  capName: "device-manager",
25469
25778
  capScope: "system",
@@ -26358,6 +26667,12 @@ Object.freeze({
26358
26667
  addonId: null,
26359
26668
  access: "view"
26360
26669
  },
26670
+ "localNetwork.getNotificationEndpoint": {
26671
+ capName: "local-network",
26672
+ capScope: "system",
26673
+ addonId: null,
26674
+ access: "view"
26675
+ },
26361
26676
  "localNetwork.getPreferred": {
26362
26677
  capName: "local-network",
26363
26678
  capScope: "system",
@@ -26382,6 +26697,12 @@ Object.freeze({
26382
26697
  addonId: null,
26383
26698
  access: "create"
26384
26699
  },
26700
+ "localNetwork.setNotificationEndpoint": {
26701
+ capName: "local-network",
26702
+ capScope: "system",
26703
+ addonId: null,
26704
+ access: "create"
26705
+ },
26385
26706
  "lockControl.lock": {
26386
26707
  capName: "lock-control",
26387
26708
  capScope: "device",
@@ -27024,6 +27345,12 @@ Object.freeze({
27024
27345
  addonId: null,
27025
27346
  access: "create"
27026
27347
  },
27348
+ "pipelineAnalytics.cancelMediaRelocate": {
27349
+ capName: "pipeline-analytics",
27350
+ capScope: "device",
27351
+ addonId: null,
27352
+ access: "create"
27353
+ },
27027
27354
  "pipelineAnalytics.clearTracks": {
27028
27355
  capName: "pipeline-analytics",
27029
27356
  capScope: "device",
@@ -27078,6 +27405,12 @@ Object.freeze({
27078
27405
  addonId: null,
27079
27406
  access: "view"
27080
27407
  },
27408
+ "pipelineAnalytics.getMediaRelocateStatus": {
27409
+ capName: "pipeline-analytics",
27410
+ capScope: "device",
27411
+ addonId: null,
27412
+ access: "view"
27413
+ },
27081
27414
  "pipelineAnalytics.getMotionEvents": {
27082
27415
  capName: "pipeline-analytics",
27083
27416
  capScope: "device",
@@ -27150,6 +27483,12 @@ Object.freeze({
27150
27483
  addonId: null,
27151
27484
  access: "create"
27152
27485
  },
27486
+ "pipelineAnalytics.relocateMedia": {
27487
+ capName: "pipeline-analytics",
27488
+ capScope: "device",
27489
+ addonId: null,
27490
+ access: "create"
27491
+ },
27153
27492
  "pipelineAnalytics.searchObjectEvents": {
27154
27493
  capName: "pipeline-analytics",
27155
27494
  capScope: "device",
@@ -27912,6 +28251,12 @@ Object.freeze({
27912
28251
  addonId: null,
27913
28252
  access: "create"
27914
28253
  },
28254
+ "recording.cancelRelocate": {
28255
+ capName: "recording",
28256
+ capScope: "system",
28257
+ addonId: null,
28258
+ access: "create"
28259
+ },
27915
28260
  "recording.deleteFootprint": {
27916
28261
  capName: "recording",
27917
28262
  capScope: "system",
@@ -27942,6 +28287,12 @@ Object.freeze({
27942
28287
  addonId: null,
27943
28288
  access: "view"
27944
28289
  },
28290
+ "recording.getRelocateStatus": {
28291
+ capName: "recording",
28292
+ capScope: "system",
28293
+ addonId: null,
28294
+ access: "view"
28295
+ },
27945
28296
  "recording.getStorageUsage": {
27946
28297
  capName: "recording",
27947
28298
  capScope: "system",
@@ -27972,6 +28323,24 @@ Object.freeze({
27972
28323
  addonId: null,
27973
28324
  access: "view"
27974
28325
  },
28326
+ "recording.relocateFootage": {
28327
+ capName: "recording",
28328
+ capScope: "system",
28329
+ addonId: null,
28330
+ access: "create"
28331
+ },
28332
+ "recording.renderClip": {
28333
+ capName: "recording",
28334
+ capScope: "system",
28335
+ addonId: null,
28336
+ access: "create"
28337
+ },
28338
+ "recording.renderGif": {
28339
+ capName: "recording",
28340
+ capScope: "system",
28341
+ addonId: null,
28342
+ access: "create"
28343
+ },
27975
28344
  "recording.rescanStorage": {
27976
28345
  capName: "recording",
27977
28346
  capScope: "system",
@@ -28566,6 +28935,12 @@ Object.freeze({
28566
28935
  addonId: null,
28567
28936
  access: "create"
28568
28937
  },
28938
+ "streamBroker.renderPreBufferClip": {
28939
+ capName: "stream-broker",
28940
+ capScope: "system",
28941
+ addonId: null,
28942
+ access: "create"
28943
+ },
28569
28944
  "streamBroker.restartProfile": {
28570
28945
  capName: "stream-broker",
28571
28946
  capScope: "system",