@camstack/addon-provider-onvif 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.
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
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region \0rolldown/runtime.js
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  //#endregion
5
- //#region ../types/dist/event-category-BLcNejAE.mjs
5
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -273,6 +273,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
273
273
  */
274
274
  EventCategory["DeviceStateChanged"] = "device.state-changed";
275
275
  /**
276
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
277
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
278
+ *
279
+ * Emitted only on a change, so a steady scene is silent. It exists so a
280
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
281
+ * one live badge with no push signal at all, and it cost a request every
282
+ * four seconds per visible camera.
283
+ *
284
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
285
+ * keeps a slow reconcile rather than trusting it alone.
286
+ */
287
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
288
+ /**
276
289
  * Cap event fired by every device that registers the `battery`
277
290
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
278
291
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7198,35 +7211,22 @@ var ConvertResultSchema = object({
7198
7211
  */
7199
7212
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7200
7213
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7201
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7202
- kind: literal("timeOfDay"),
7203
- start: string().regex(HHMM),
7204
- end: string().regex(HHMM),
7205
- /** Restrict to these weekdays; omit = every day. */
7206
- days: array(RecordingWeekdaySchema).optional()
7207
- })]);
7208
- var RecordingModeSchema = _enum([
7209
- "continuous",
7210
- "onMotion",
7211
- "onAudioThreshold"
7212
- ]);
7213
7214
  /**
7214
- * First-class, authoritative per-camera storage mode — the explicit choice the
7215
- * UI reads directly (never inferred from `rules`):
7216
- * - `off` — not recording.
7217
- * - `events` — record only around triggers (motion / audio threshold),
7218
- * with pre/post-buffer.
7219
- * - `continuous` — record 24/7 within the schedule.
7215
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7216
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7217
+ * - `off` — no band covers the camera (or it is disabled).
7218
+ * - `events` — every band records around triggers only.
7219
+ * - `continuous` — at least one band records continuously.
7220
7220
  *
7221
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7222
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7221
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7222
+ * every save (`activeModeForConfig`). Writing it has no effect.
7223
7223
  */
7224
7224
  var RecordingStorageModeSchema = _enum([
7225
7225
  "off",
7226
7226
  "events",
7227
7227
  "continuous"
7228
7228
  ]);
7229
- /** Which detectors trigger an `events`-mode recording. */
7229
+ /** Which detectors trigger an `events`-mode band. */
7230
7230
  var RecordingTriggersSchema = object({
7231
7231
  motion: boolean().optional(),
7232
7232
  audioThresholdDbfs: number().optional()
@@ -7262,18 +7262,6 @@ var RecordingBandSchema = object({
7262
7262
  preBufferSec: number().min(0).optional(),
7263
7263
  postBufferSec: number().min(0).optional()
7264
7264
  });
7265
- var RecordingRuleSchema = object({
7266
- schedule: RecordingScheduleSchema,
7267
- mode: RecordingModeSchema,
7268
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7269
- preBufferSec: number().min(0).default(0),
7270
- /** Keep recording until this many seconds after the last trigger. */
7271
- postBufferSec: number().min(0).default(0),
7272
- /** Each new trigger restarts the post-buffer window. */
7273
- resetTimeoutOnNewEvent: boolean().default(true),
7274
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7275
- thresholdDbfs: number().optional()
7276
- });
7277
7265
  /**
7278
7266
  * Per-device retention overrides. Every field is optional; an unset or `0`
7279
7267
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7307,40 +7295,28 @@ var ScrubThumbnailPresetSchema = _enum([
7307
7295
  /**
7308
7296
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7309
7297
  *
7310
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7311
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7312
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7313
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7298
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7299
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7300
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7301
+ *
7302
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7303
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7304
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7305
+ * persist a band-less config, i.e. silently stop recording the camera.
7314
7306
  */
7315
7307
  var RecordingConfigSchema = object({
7316
7308
  enabled: boolean(),
7317
- /** Authoritative storage mode. Absent on legacy targets derived once via
7318
- * `migrateRulesToMode`, then persisted. */
7309
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7310
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7319
7311
  mode: RecordingStorageModeSchema.optional(),
7320
7312
  profiles: array(CamProfileSchema).optional(),
7321
7313
  segmentSeconds: number().int().positive().optional(),
7322
- /** Shared recording time-bands for `events` & `continuous` — record only when
7323
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7324
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7325
- schedules: array(RecordingScheduleSchema).optional(),
7326
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7327
- * normalized into `schedules` on read and never written going forward. (Not
7328
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7329
- schedule: RecordingScheduleSchema.optional(),
7330
- /** `events`-mode only — which detectors trigger a recording. */
7331
- triggers: RecordingTriggersSchema.optional(),
7332
- /** `events`-mode only — seconds retained before / after a trigger. */
7333
- preBufferSec: number().min(0).optional(),
7334
- postBufferSec: number().min(0).optional(),
7335
- /** DEPRECATED authoring input; retained for migration/transition. */
7336
- rules: array(RecordingRuleSchema).optional(),
7337
7314
  /**
7338
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7339
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7340
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7341
- * derived into bands once via `migrateConfigToBands`.
7315
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7316
+ * the recorder's band engine consumes. An empty array = record nothing;
7317
+ * "off" is the absence of a covering band, never a band value.
7342
7318
  */
7343
- bands: array(RecordingBandSchema).optional(),
7319
+ bands: array(RecordingBandSchema).default([]),
7344
7320
  retention: RecordingRetentionSchema.optional(),
7345
7321
  /**
7346
7322
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7348,8 +7324,15 @@ var RecordingConfigSchema = object({
7348
7324
  * windows only — existing sheets are immutable, and each window's index
7349
7325
  * carries its own tile dims so mixed-preset history renders correctly.
7350
7326
  */
7351
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7352
- });
7327
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7328
+ /**
7329
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7330
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7331
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7332
+ * are written and scrub reads exact keyframes at every velocity.
7333
+ */
7334
+ stripsEnabled: boolean().optional()
7335
+ }).strict();
7353
7336
  /**
7354
7337
  * Ops-log — the durable, append-only operations audit shared by the
7355
7338
  * recordings and events management surfaces.
@@ -7368,7 +7351,8 @@ var OpsLogOpSchema = _enum([
7368
7351
  "prune",
7369
7352
  "manual-delete",
7370
7353
  "rescan",
7371
- "retention-run"
7354
+ "retention-run",
7355
+ "relocate"
7372
7356
  ]);
7373
7357
  /** Why the operation ran. */
7374
7358
  var OpsLogReasonSchema = _enum([
@@ -7407,6 +7391,55 @@ var OpsLogQueryInputSchema = object({
7407
7391
  limit: number().int().min(1).max(1e3).optional()
7408
7392
  });
7409
7393
  /**
7394
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7395
+ *
7396
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7397
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7398
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7399
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7400
+ * after verify) and each completed/failed run also lands one durable ops-log
7401
+ * row on the owning addon's surface.
7402
+ */
7403
+ var RelocateJobStateSchema = _enum([
7404
+ "running",
7405
+ "done",
7406
+ "failed",
7407
+ "cancelled"
7408
+ ]);
7409
+ var RelocateJobSchema = object({
7410
+ jobId: string(),
7411
+ state: RelocateJobStateSchema,
7412
+ /** Source location — for media relocation this is informational ('*': rows
7413
+ * move from wherever they are to the target). */
7414
+ fromLocationId: string(),
7415
+ toLocationId: string(),
7416
+ /** Scoped device, or null = every device. */
7417
+ deviceId: number().nullable(),
7418
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7419
+ entities: array(string()),
7420
+ filesMoved: number().int(),
7421
+ bytesMoved: number().int(),
7422
+ /** Total files discovered up front; null while (or when) unknown. */
7423
+ filesTotal: number().int().nullable(),
7424
+ startedAt: number(),
7425
+ finishedAt: number().nullable(),
7426
+ error: string().nullable()
7427
+ });
7428
+ var RelocateFootageInputSchema = object({
7429
+ deviceId: number().optional(),
7430
+ fromLocationId: string(),
7431
+ toLocationId: string(),
7432
+ entities: array(_enum(["segments", "strips"])).optional(),
7433
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7434
+ * never allowed to starve live writers. */
7435
+ throttleMbps: number().min(1).max(1e3).optional()
7436
+ });
7437
+ var RelocateMediaInputSchema = object({
7438
+ deviceId: number().optional(),
7439
+ toLocationId: string(),
7440
+ throttleMbps: number().min(1).max(1e3).optional()
7441
+ });
7442
+ /**
7410
7443
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7411
7444
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7412
7445
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7456,6 +7489,13 @@ var StorageLocationSchema = object({
7456
7489
  nodeId: string().optional(),
7457
7490
  isDefault: boolean().default(false),
7458
7491
  isSystem: boolean().default(false),
7492
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7493
+ * for node-local locations it can reach) — never persisted, absent when the
7494
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7495
+ capacity: object({
7496
+ totalBytes: number(),
7497
+ availableBytes: number()
7498
+ }).nullable().optional(),
7459
7499
  createdAt: number(),
7460
7500
  updatedAt: number()
7461
7501
  });
@@ -8223,7 +8263,8 @@ var NcTaxonomyEntrySchema = object({
8223
8263
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8224
8264
  parentKind: string().nullable()
8225
8265
  });
8226
- object({
8266
+ /** The complete NC picker taxonomy — three grouped buckets. */
8267
+ var NcTaxonomySchema = object({
8227
8268
  videoClasses: array(NcTaxonomyEntrySchema),
8228
8269
  audioKinds: array(NcTaxonomyEntrySchema),
8229
8270
  labels: array(NcTaxonomyEntrySchema)
@@ -9053,6 +9094,7 @@ function startReachabilityPoll(options) {
9053
9094
  timer = void 0;
9054
9095
  } };
9055
9096
  }
9097
+ new Set(["devices", "classes"]);
9056
9098
  /**
9057
9099
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9058
9100
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9211,6 +9253,29 @@ var NcOccupancyConditionSchema = object({
9211
9253
  count: number().int().min(0).default(1),
9212
9254
  sustainSeconds: number().int().min(0).max(3600).default(15)
9213
9255
  });
9256
+ /**
9257
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9258
+ *
9259
+ * The values are not symmetric, and deliberately so — the absent value has to
9260
+ * mean exactly what every rule authored before this condition existed already
9261
+ * does:
9262
+ * - `enter` — entries and every NON-crossing record (movement state,
9263
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9264
+ * an operator who never asked for exits must not start receiving them.
9265
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9266
+ * fails closed, because "the car left the drive" is a question about a
9267
+ * boundary, not about a detection.
9268
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9269
+ *
9270
+ * A rule asking for a direction should normally also scope `zones`, which the
9271
+ * engine evaluates against the crossed zone as well as the current membership
9272
+ * (an exit's membership no longer contains the zone it just left).
9273
+ */
9274
+ var NcCrossingSchema = _enum([
9275
+ "enter",
9276
+ "exit",
9277
+ "any"
9278
+ ]);
9214
9279
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9215
9280
  var NcZoneConditionSchema = object({
9216
9281
  ids: array(string().min(1)).min(1),
@@ -9235,6 +9300,13 @@ var NcConditionsSchema = object({
9235
9300
  /** Veto zones — any hit fails the rule. */
9236
9301
  zonesExclude: array(string().min(1)).optional(),
9237
9302
  /**
9303
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9304
+ * and a closed track carries none, so a `track-end` rule asking for one
9305
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9306
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9307
+ */
9308
+ crossing: NcCrossingSchema.optional(),
9309
+ /**
9238
9310
  * Exact (case-insensitive) match on the record's collapsed `label`
9239
9311
  * (identity name / plate text / subclass).
9240
9312
  */
@@ -9369,17 +9441,85 @@ var NcRuleTargetSchema = object({
9369
9441
  * - `keyFrame` — the clean scene frame (no subject box).
9370
9442
  * - `none` — no attachment.
9371
9443
  */
9372
- var NcMediaPolicySchema = object({ attach: _enum([
9373
- "best",
9374
- "best-matching",
9375
- "keyFrame",
9376
- "none"
9377
- ]).default("best") });
9444
+ /**
9445
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9446
+ * conflate it with the selection strategy and betray the request: asking for
9447
+ * the clean scene frame on an object-event owner used to start at
9448
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9449
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9450
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9451
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9452
+ * the pipeline actually saw.
9453
+ */
9454
+ var NcMediaFrameSchema = _enum([
9455
+ "cropped",
9456
+ "full",
9457
+ "boxed"
9458
+ ]);
9459
+ var NcMediaPolicySchema = object({
9460
+ attach: _enum([
9461
+ "best",
9462
+ "best-matching",
9463
+ "keyFrame",
9464
+ "none"
9465
+ ]).default("best"),
9466
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9467
+ frame: NcMediaFrameSchema.optional(),
9468
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9469
+ * "show me the ZONE", not the whole scene or the subject crop. */
9470
+ zoneCrop: boolean().optional(),
9471
+ /**
9472
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9473
+ * event — NOT from the recording, so the camera does not have to be
9474
+ * recording, and the window sits AROUND the moment instead of a segment
9475
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9476
+ * gif, never a failed notification.
9477
+ */
9478
+ gif: boolean().optional(),
9479
+ /**
9480
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9481
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9482
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9483
+ * the degrade engine, which drops the video and keeps the still.
9484
+ */
9485
+ clip: boolean().optional(),
9486
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9487
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9488
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9489
+ /**
9490
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9491
+ * assigned profile: a notification is watched on a phone, so the 4K
9492
+ * rendition would burn CPU to produce a file the client downscales anyway.
9493
+ * A profile that is not assigned falls back to the cheapest, and the render
9494
+ * reports which one actually ran.
9495
+ */
9496
+ profile: CamProfileSchema.optional()
9497
+ });
9498
+ /**
9499
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9500
+ * notification suppresses.
9501
+ * - `shared` (default, and the absent value) — one window for the whole
9502
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9503
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9504
+ * at once and cat→cat still waits.
9505
+ *
9506
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9507
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9508
+ * see `cooldownKey` in the rule engine).
9509
+ */
9510
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9378
9511
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9379
9512
  var NcThrottleSchema = object({
9380
9513
  cooldownSec: number().int().min(0).max(86400).default(60),
9381
9514
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9382
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9515
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9516
+ /**
9517
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9518
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9519
+ * rule authored before this field simply carries none — and the engine
9520
+ * reads absent as `shared`, the pre-existing behaviour.
9521
+ */
9522
+ granularity: NcThrottleGranularitySchema.optional()
9383
9523
  });
9384
9524
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9385
9525
  var NcRuleInputSchema = object({
@@ -9388,7 +9528,19 @@ var NcRuleInputSchema = object({
9388
9528
  delivery: NcDeliverySchema,
9389
9529
  conditions: NcConditionsSchema.default({}),
9390
9530
  schedule: NcScheduleSchema.optional(),
9391
- targets: array(NcRuleTargetSchema).min(1),
9531
+ /** May be empty when `targetUsers` addresses at least one user — the
9532
+ * "at least one addressee" invariant is enforced by the provider, because
9533
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9534
+ targets: array(NcRuleTargetSchema),
9535
+ /**
9536
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9537
+ * time each user fans out to the personal targets they own
9538
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9539
+ * firing camera — a user is never notified about a device they cannot open.
9540
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9541
+ * targets.
9542
+ */
9543
+ targetUsers: array(string()).optional(),
9392
9544
  media: NcMediaPolicySchema.default({ attach: "best" }),
9393
9545
  throttle: NcThrottleSchema.default({
9394
9546
  cooldownSec: 60,
@@ -9475,6 +9627,7 @@ var NcConditionDescriptorSchema = object({
9475
9627
  "schedule",
9476
9628
  "plateMatcher",
9477
9629
  "packagePhase",
9630
+ "crossingSelect",
9478
9631
  "polygonDraw",
9479
9632
  "occupancy"
9480
9633
  ]),
@@ -9601,7 +9754,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9601
9754
  }), object({ results: array(NcTestResultSchema) }), {
9602
9755
  kind: "mutation",
9603
9756
  auth: "admin"
9604
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9757
+ }), method(object({}), object({
9758
+ catalog: array(NcConditionDescriptorSchema),
9759
+ taxonomy: NcTaxonomySchema.optional()
9760
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9605
9761
  /**
9606
9762
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9607
9763
  *
@@ -10338,6 +10494,28 @@ method(object({
10338
10494
  }), object({ success: literal(true) }), {
10339
10495
  kind: "mutation",
10340
10496
  auth: "admin"
10497
+ }), method(object({
10498
+ deviceId: number(),
10499
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10500
+ * watched on a phone, and the cheap rendition is the right default. */
10501
+ profile: CamProfileSchema.optional(),
10502
+ aroundMs: number(),
10503
+ preRollSec: number().min(0).max(20).default(3),
10504
+ postRollSec: number().min(0).max(20).default(5),
10505
+ format: _enum(["gif", "mp4"]).default("gif"),
10506
+ maxWidth: number().int().min(120).max(1920).default(480),
10507
+ /** GIF only — MP4 keeps the source cadence. */
10508
+ fps: number().int().min(1).max(15).default(5)
10509
+ }), object({
10510
+ base64: string(),
10511
+ mime: string(),
10512
+ bytes: number().int(),
10513
+ /** The profile actually rendered (what the default resolved to). */
10514
+ profile: CamProfileSchema,
10515
+ durationMs: number()
10516
+ }), {
10517
+ kind: "mutation",
10518
+ auth: "admin"
10341
10519
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10342
10520
  probed: boolean(),
10343
10521
  summary: string()
@@ -16226,7 +16404,10 @@ method(object({
16226
16404
  }), method(object({
16227
16405
  deviceId: number(),
16228
16406
  caps: array(string()).readonly().optional()
16229
- }), record(string(), unknown().nullable()));
16407
+ }), record(string(), unknown().nullable())), method(object({
16408
+ deviceIds: array(number()).readonly(),
16409
+ caps: array(string()).readonly().optional()
16410
+ }), record(string(), record(string(), unknown().nullable())));
16230
16411
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
16231
16412
  deviceId: number(),
16232
16413
  capName: string()
@@ -17157,6 +17338,36 @@ var TargetKindSchema = object({
17157
17338
  icon: string(),
17158
17339
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
17159
17340
  addonId: string(),
17341
+ /**
17342
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
17343
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
17344
+ * when the addon bundles no icon for that kind — the client then falls back
17345
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
17346
+ *
17347
+ * Root-relative on purpose: it resolves against whatever origin serves a web
17348
+ * client, and a native client joins it onto its own hub base.
17349
+ *
17350
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
17351
+ * field that survived only because the runtime cap-router forwards provider
17352
+ * output verbatim — so every consumer had to re-declare it by hand to stop
17353
+ * its own Zod parse from stripping it, and the whole arrangement would have
17354
+ * broken silently the moment output validation was tightened anywhere.
17355
+ */
17356
+ iconUrl: string().optional(),
17357
+ /**
17358
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
17359
+ *
17360
+ * The server knows this and therefore says it, because the client cannot
17361
+ * safely guess: a React-Native client renders SVG and raster through two
17362
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
17363
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
17364
+ * placeholder glyph for every vector icon while the web build looked fine.
17365
+ *
17366
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
17367
+ * not been updated — a client that cannot determine the type should prefer
17368
+ * its raster path, which is the safe default for an unknown image.
17369
+ */
17370
+ iconMediaType: string().optional(),
17160
17371
  configSchema: ConfigSchemaPassthrough,
17161
17372
  supportsDiscovery: boolean(),
17162
17373
  caps: TargetKindCapsSchema
@@ -17604,6 +17815,29 @@ var MotionEventSchema = object({
17604
17815
  * Absent on legacy rows ⇒ treat as `pipeline`.
17605
17816
  */
17606
17817
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17818
+ /**
17819
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17820
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17821
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17822
+ * appearance event carry none, so a rule asking for a direction fails closed
17823
+ * on them.
17824
+ *
17825
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17826
+ * into its own event, so a frame in which a track enters A while leaving B
17827
+ * produces two events with two directions — never one ambiguous row.
17828
+ *
17829
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17830
+ * membership the box has NOW, and by definition it no longer contains the zone
17831
+ * that was just left. Without the id here, a zone-scoped rule could never match
17832
+ * the exit it asked for.
17833
+ */
17834
+ var ZoneCrossingSchema = object({
17835
+ direction: _enum(["enter", "exit"]),
17836
+ /** Admin zone id crossed. */
17837
+ zoneId: string(),
17838
+ /** Zone display name at crossing time (falls back to the id). */
17839
+ zoneName: string().optional()
17840
+ });
17607
17841
  var ObjectEventSchema = object({
17608
17842
  ...BaseEventFields,
17609
17843
  kind: literal("object"),
@@ -17630,6 +17864,12 @@ var ObjectEventSchema = object({
17630
17864
  zones: array(string()).readonly().optional(),
17631
17865
  /** Omitted in slim projection. */
17632
17866
  state: TrackStateSchema.optional(),
17867
+ /**
17868
+ * The zone crossing this event IS, when it is one. Absent on every other
17869
+ * event kind (movement state, appearance, package) — see
17870
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17871
+ */
17872
+ zoneCrossing: ZoneCrossingSchema.optional(),
17633
17873
  /** Detection-frame dimensions in pixels — let consumers normalize the
17634
17874
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17635
17875
  frameWidth: number().optional(),
@@ -17888,6 +18128,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17888
18128
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17889
18129
  kind: "mutation",
17890
18130
  auth: "admin"
18131
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18132
+ kind: "mutation",
18133
+ auth: "admin"
18134
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
18135
+ kind: "query",
18136
+ auth: "admin"
18137
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
18138
+ kind: "mutation",
18139
+ auth: "admin"
17891
18140
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17892
18141
  kind: "query",
17893
18142
  auth: "admin"
@@ -20418,6 +20667,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
20418
20667
  */
20419
20668
  priority: number()
20420
20669
  })).readonly() });
20670
+ /**
20671
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20672
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20673
+ * what AUTO currently picks, so the UI can show the effective value either way.
20674
+ */
20675
+ var NotificationEndpointSchema = object({
20676
+ /** The operator's explicit choice, or null for AUTO. */
20677
+ baseUrl: string().nullable(),
20678
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20679
+ resolved: string().nullable()
20680
+ });
20421
20681
  var AllowedAddressesSchema = object({
20422
20682
  /**
20423
20683
  * Allowlist of interface addresses operators have explicitly opted
@@ -20440,7 +20700,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20440
20700
  * to avoid mixed-content blocks in the browser. The public
20441
20701
  * tunnel always emits `https://` regardless. */
20442
20702
  scheme: _enum(["http", "https"]).optional()
20443
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20703
+ }), 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" });
20444
20704
  /**
20445
20705
  * mesh-network — collection cap for mesh-VPN providers.
20446
20706
  *
@@ -21281,7 +21541,12 @@ var RecordingDeviceUsageSchema = object({
21281
21541
  var RecordingLocationUsageSchema = object({
21282
21542
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
21283
21543
  locationId: string().nullable(),
21284
- /** Bytes of recordings stored on this location. */
21544
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21545
+ * is emitted per physical disk (2026-07-29): two locations on one root
21546
+ * previously rendered as two identical "disks" with a nonsensical used
21547
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21548
+ locationIds: array(string()).optional(),
21549
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
21285
21550
  usedBytes: number(),
21286
21551
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
21287
21552
  availableBytes: number().nullable(),
@@ -21393,6 +21658,44 @@ method(object({
21393
21658
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
21394
21659
  kind: "query",
21395
21660
  auth: "admin"
21661
+ }), method(object({
21662
+ deviceId: number(),
21663
+ aroundMs: number(),
21664
+ preRollSec: number().min(0).max(30).default(2),
21665
+ postRollSec: number().min(0).max(30).default(5),
21666
+ maxWidth: number().int().min(120).max(1280).default(480),
21667
+ fps: number().int().min(1).max(15).default(5)
21668
+ }), object({
21669
+ gifBase64: string(),
21670
+ fromMs: number(),
21671
+ toMs: number()
21672
+ }), {
21673
+ kind: "mutation",
21674
+ auth: "admin"
21675
+ }), method(object({
21676
+ deviceId: number(),
21677
+ aroundMs: number(),
21678
+ preRollSec: number().min(0).max(30).default(3),
21679
+ postRollSec: number().min(0).max(30).default(7),
21680
+ maxWidth: number().int().min(160).max(1920).default(640)
21681
+ }), object({
21682
+ clipBase64: string(),
21683
+ mime: string(),
21684
+ fromMs: number(),
21685
+ toMs: number(),
21686
+ bytes: number().int()
21687
+ }), {
21688
+ kind: "mutation",
21689
+ auth: "admin"
21690
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21691
+ kind: "mutation",
21692
+ auth: "admin"
21693
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21694
+ kind: "query",
21695
+ auth: "admin"
21696
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21697
+ kind: "mutation",
21698
+ auth: "admin"
21396
21699
  });
21397
21700
  /**
21398
21701
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22984,6 +23287,12 @@ Object.freeze({
22984
23287
  addonId: null,
22985
23288
  access: "view"
22986
23289
  },
23290
+ "deviceManager.getDeviceStatusAggregateBatch": {
23291
+ capName: "device-manager",
23292
+ capScope: "system",
23293
+ addonId: null,
23294
+ access: "view"
23295
+ },
22987
23296
  "deviceManager.getLinkedDevices": {
22988
23297
  capName: "device-manager",
22989
23298
  capScope: "system",
@@ -23878,6 +24187,12 @@ Object.freeze({
23878
24187
  addonId: null,
23879
24188
  access: "view"
23880
24189
  },
24190
+ "localNetwork.getNotificationEndpoint": {
24191
+ capName: "local-network",
24192
+ capScope: "system",
24193
+ addonId: null,
24194
+ access: "view"
24195
+ },
23881
24196
  "localNetwork.getPreferred": {
23882
24197
  capName: "local-network",
23883
24198
  capScope: "system",
@@ -23902,6 +24217,12 @@ Object.freeze({
23902
24217
  addonId: null,
23903
24218
  access: "create"
23904
24219
  },
24220
+ "localNetwork.setNotificationEndpoint": {
24221
+ capName: "local-network",
24222
+ capScope: "system",
24223
+ addonId: null,
24224
+ access: "create"
24225
+ },
23905
24226
  "lockControl.lock": {
23906
24227
  capName: "lock-control",
23907
24228
  capScope: "device",
@@ -24544,6 +24865,12 @@ Object.freeze({
24544
24865
  addonId: null,
24545
24866
  access: "create"
24546
24867
  },
24868
+ "pipelineAnalytics.cancelMediaRelocate": {
24869
+ capName: "pipeline-analytics",
24870
+ capScope: "device",
24871
+ addonId: null,
24872
+ access: "create"
24873
+ },
24547
24874
  "pipelineAnalytics.clearTracks": {
24548
24875
  capName: "pipeline-analytics",
24549
24876
  capScope: "device",
@@ -24598,6 +24925,12 @@ Object.freeze({
24598
24925
  addonId: null,
24599
24926
  access: "view"
24600
24927
  },
24928
+ "pipelineAnalytics.getMediaRelocateStatus": {
24929
+ capName: "pipeline-analytics",
24930
+ capScope: "device",
24931
+ addonId: null,
24932
+ access: "view"
24933
+ },
24601
24934
  "pipelineAnalytics.getMotionEvents": {
24602
24935
  capName: "pipeline-analytics",
24603
24936
  capScope: "device",
@@ -24670,6 +25003,12 @@ Object.freeze({
24670
25003
  addonId: null,
24671
25004
  access: "create"
24672
25005
  },
25006
+ "pipelineAnalytics.relocateMedia": {
25007
+ capName: "pipeline-analytics",
25008
+ capScope: "device",
25009
+ addonId: null,
25010
+ access: "create"
25011
+ },
24673
25012
  "pipelineAnalytics.searchObjectEvents": {
24674
25013
  capName: "pipeline-analytics",
24675
25014
  capScope: "device",
@@ -25432,6 +25771,12 @@ Object.freeze({
25432
25771
  addonId: null,
25433
25772
  access: "create"
25434
25773
  },
25774
+ "recording.cancelRelocate": {
25775
+ capName: "recording",
25776
+ capScope: "system",
25777
+ addonId: null,
25778
+ access: "create"
25779
+ },
25435
25780
  "recording.deleteFootprint": {
25436
25781
  capName: "recording",
25437
25782
  capScope: "system",
@@ -25462,6 +25807,12 @@ Object.freeze({
25462
25807
  addonId: null,
25463
25808
  access: "view"
25464
25809
  },
25810
+ "recording.getRelocateStatus": {
25811
+ capName: "recording",
25812
+ capScope: "system",
25813
+ addonId: null,
25814
+ access: "view"
25815
+ },
25465
25816
  "recording.getStorageUsage": {
25466
25817
  capName: "recording",
25467
25818
  capScope: "system",
@@ -25492,6 +25843,24 @@ Object.freeze({
25492
25843
  addonId: null,
25493
25844
  access: "view"
25494
25845
  },
25846
+ "recording.relocateFootage": {
25847
+ capName: "recording",
25848
+ capScope: "system",
25849
+ addonId: null,
25850
+ access: "create"
25851
+ },
25852
+ "recording.renderClip": {
25853
+ capName: "recording",
25854
+ capScope: "system",
25855
+ addonId: null,
25856
+ access: "create"
25857
+ },
25858
+ "recording.renderGif": {
25859
+ capName: "recording",
25860
+ capScope: "system",
25861
+ addonId: null,
25862
+ access: "create"
25863
+ },
25495
25864
  "recording.rescanStorage": {
25496
25865
  capName: "recording",
25497
25866
  capScope: "system",
@@ -26086,6 +26455,12 @@ Object.freeze({
26086
26455
  addonId: null,
26087
26456
  access: "create"
26088
26457
  },
26458
+ "streamBroker.renderPreBufferClip": {
26459
+ capName: "stream-broker",
26460
+ capScope: "system",
26461
+ addonId: null,
26462
+ access: "create"
26463
+ },
26089
26464
  "streamBroker.restartProfile": {
26090
26465
  capName: "stream-broker",
26091
26466
  capScope: "system",