@camstack/addon-decoder-nodeav 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/index.js +451 -76
  2. package/dist/index.mjs +451 -76
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  let node_crypto = require("node:crypto");
6
- //#region ../types/dist/event-category-BLcNejAE.mjs
6
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
7
7
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
8
8
  EventCategory["SystemBoot"] = "system.boot";
9
9
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -274,6 +274,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
274
274
  */
275
275
  EventCategory["DeviceStateChanged"] = "device.state-changed";
276
276
  /**
277
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
278
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
279
+ *
280
+ * Emitted only on a change, so a steady scene is silent. It exists so a
281
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
282
+ * one live badge with no push signal at all, and it cost a request every
283
+ * four seconds per visible camera.
284
+ *
285
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
286
+ * keeps a slow reconcile rather than trusting it alone.
287
+ */
288
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
289
+ /**
277
290
  * Cap event fired by every device that registers the `battery`
278
291
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
279
292
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7199,35 +7212,22 @@ var ConvertResultSchema = object({
7199
7212
  */
7200
7213
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7201
7214
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7202
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7203
- kind: literal("timeOfDay"),
7204
- start: string().regex(HHMM),
7205
- end: string().regex(HHMM),
7206
- /** Restrict to these weekdays; omit = every day. */
7207
- days: array(RecordingWeekdaySchema).optional()
7208
- })]);
7209
- var RecordingModeSchema = _enum([
7210
- "continuous",
7211
- "onMotion",
7212
- "onAudioThreshold"
7213
- ]);
7214
7215
  /**
7215
- * First-class, authoritative per-camera storage mode — the explicit choice the
7216
- * UI reads directly (never inferred from `rules`):
7217
- * - `off` — not recording.
7218
- * - `events` — record only around triggers (motion / audio threshold),
7219
- * with pre/post-buffer.
7220
- * - `continuous` — record 24/7 within the schedule.
7216
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7217
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7218
+ * - `off` — no band covers the camera (or it is disabled).
7219
+ * - `events` — every band records around triggers only.
7220
+ * - `continuous` — at least one band records continuously.
7221
7221
  *
7222
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7223
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7222
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7223
+ * every save (`activeModeForConfig`). Writing it has no effect.
7224
7224
  */
7225
7225
  var RecordingStorageModeSchema = _enum([
7226
7226
  "off",
7227
7227
  "events",
7228
7228
  "continuous"
7229
7229
  ]);
7230
- /** Which detectors trigger an `events`-mode recording. */
7230
+ /** Which detectors trigger an `events`-mode band. */
7231
7231
  var RecordingTriggersSchema = object({
7232
7232
  motion: boolean().optional(),
7233
7233
  audioThresholdDbfs: number().optional()
@@ -7263,18 +7263,6 @@ var RecordingBandSchema = object({
7263
7263
  preBufferSec: number().min(0).optional(),
7264
7264
  postBufferSec: number().min(0).optional()
7265
7265
  });
7266
- var RecordingRuleSchema = object({
7267
- schedule: RecordingScheduleSchema,
7268
- mode: RecordingModeSchema,
7269
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7270
- preBufferSec: number().min(0).default(0),
7271
- /** Keep recording until this many seconds after the last trigger. */
7272
- postBufferSec: number().min(0).default(0),
7273
- /** Each new trigger restarts the post-buffer window. */
7274
- resetTimeoutOnNewEvent: boolean().default(true),
7275
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7276
- thresholdDbfs: number().optional()
7277
- });
7278
7266
  /**
7279
7267
  * Per-device retention overrides. Every field is optional; an unset or `0`
7280
7268
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7308,40 +7296,28 @@ var ScrubThumbnailPresetSchema = _enum([
7308
7296
  /**
7309
7297
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7310
7298
  *
7311
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7312
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7313
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7314
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7299
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7300
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7301
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7302
+ *
7303
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7304
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7305
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7306
+ * persist a band-less config, i.e. silently stop recording the camera.
7315
7307
  */
7316
7308
  var RecordingConfigSchema = object({
7317
7309
  enabled: boolean(),
7318
- /** Authoritative storage mode. Absent on legacy targets derived once via
7319
- * `migrateRulesToMode`, then persisted. */
7310
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7311
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7320
7312
  mode: RecordingStorageModeSchema.optional(),
7321
7313
  profiles: array(CamProfileSchema).optional(),
7322
7314
  segmentSeconds: number().int().positive().optional(),
7323
- /** Shared recording time-bands for `events` & `continuous` — record only when
7324
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7325
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7326
- schedules: array(RecordingScheduleSchema).optional(),
7327
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7328
- * normalized into `schedules` on read and never written going forward. (Not
7329
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7330
- schedule: RecordingScheduleSchema.optional(),
7331
- /** `events`-mode only — which detectors trigger a recording. */
7332
- triggers: RecordingTriggersSchema.optional(),
7333
- /** `events`-mode only — seconds retained before / after a trigger. */
7334
- preBufferSec: number().min(0).optional(),
7335
- postBufferSec: number().min(0).optional(),
7336
- /** DEPRECATED authoring input; retained for migration/transition. */
7337
- rules: array(RecordingRuleSchema).optional(),
7338
7315
  /**
7339
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7340
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7341
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7342
- * derived into bands once via `migrateConfigToBands`.
7316
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7317
+ * the recorder's band engine consumes. An empty array = record nothing;
7318
+ * "off" is the absence of a covering band, never a band value.
7343
7319
  */
7344
- bands: array(RecordingBandSchema).optional(),
7320
+ bands: array(RecordingBandSchema).default([]),
7345
7321
  retention: RecordingRetentionSchema.optional(),
7346
7322
  /**
7347
7323
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7349,8 +7325,15 @@ var RecordingConfigSchema = object({
7349
7325
  * windows only — existing sheets are immutable, and each window's index
7350
7326
  * carries its own tile dims so mixed-preset history renders correctly.
7351
7327
  */
7352
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7353
- });
7328
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7329
+ /**
7330
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7331
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7332
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7333
+ * are written and scrub reads exact keyframes at every velocity.
7334
+ */
7335
+ stripsEnabled: boolean().optional()
7336
+ }).strict();
7354
7337
  /**
7355
7338
  * Ops-log — the durable, append-only operations audit shared by the
7356
7339
  * recordings and events management surfaces.
@@ -7369,7 +7352,8 @@ var OpsLogOpSchema = _enum([
7369
7352
  "prune",
7370
7353
  "manual-delete",
7371
7354
  "rescan",
7372
- "retention-run"
7355
+ "retention-run",
7356
+ "relocate"
7373
7357
  ]);
7374
7358
  /** Why the operation ran. */
7375
7359
  var OpsLogReasonSchema = _enum([
@@ -7408,6 +7392,55 @@ var OpsLogQueryInputSchema = object({
7408
7392
  limit: number().int().min(1).max(1e3).optional()
7409
7393
  });
7410
7394
  /**
7395
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7396
+ *
7397
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7398
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7399
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7400
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7401
+ * after verify) and each completed/failed run also lands one durable ops-log
7402
+ * row on the owning addon's surface.
7403
+ */
7404
+ var RelocateJobStateSchema = _enum([
7405
+ "running",
7406
+ "done",
7407
+ "failed",
7408
+ "cancelled"
7409
+ ]);
7410
+ var RelocateJobSchema = object({
7411
+ jobId: string(),
7412
+ state: RelocateJobStateSchema,
7413
+ /** Source location — for media relocation this is informational ('*': rows
7414
+ * move from wherever they are to the target). */
7415
+ fromLocationId: string(),
7416
+ toLocationId: string(),
7417
+ /** Scoped device, or null = every device. */
7418
+ deviceId: number().nullable(),
7419
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7420
+ entities: array(string()),
7421
+ filesMoved: number().int(),
7422
+ bytesMoved: number().int(),
7423
+ /** Total files discovered up front; null while (or when) unknown. */
7424
+ filesTotal: number().int().nullable(),
7425
+ startedAt: number(),
7426
+ finishedAt: number().nullable(),
7427
+ error: string().nullable()
7428
+ });
7429
+ var RelocateFootageInputSchema = object({
7430
+ deviceId: number().optional(),
7431
+ fromLocationId: string(),
7432
+ toLocationId: string(),
7433
+ entities: array(_enum(["segments", "strips"])).optional(),
7434
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7435
+ * never allowed to starve live writers. */
7436
+ throttleMbps: number().min(1).max(1e3).optional()
7437
+ });
7438
+ var RelocateMediaInputSchema = object({
7439
+ deviceId: number().optional(),
7440
+ toLocationId: string(),
7441
+ throttleMbps: number().min(1).max(1e3).optional()
7442
+ });
7443
+ /**
7411
7444
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7412
7445
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7413
7446
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7457,6 +7490,13 @@ var StorageLocationSchema = object({
7457
7490
  nodeId: string().optional(),
7458
7491
  isDefault: boolean().default(false),
7459
7492
  isSystem: boolean().default(false),
7493
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7494
+ * for node-local locations it can reach) — never persisted, absent when the
7495
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7496
+ capacity: object({
7497
+ totalBytes: number(),
7498
+ availableBytes: number()
7499
+ }).nullable().optional(),
7460
7500
  createdAt: number(),
7461
7501
  updatedAt: number()
7462
7502
  });
@@ -8224,7 +8264,8 @@ var NcTaxonomyEntrySchema = object({
8224
8264
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8225
8265
  parentKind: string().nullable()
8226
8266
  });
8227
- object({
8267
+ /** The complete NC picker taxonomy — three grouped buckets. */
8268
+ var NcTaxonomySchema = object({
8228
8269
  videoClasses: array(NcTaxonomyEntrySchema),
8229
8270
  audioKinds: array(NcTaxonomyEntrySchema),
8230
8271
  labels: array(NcTaxonomyEntrySchema)
@@ -8884,6 +8925,7 @@ var AccessoryKind = {
8884
8925
  };
8885
8926
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8886
8927
  DeviceFeature.BatteryOperated;
8928
+ new Set(["devices", "classes"]);
8887
8929
  /**
8888
8930
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8889
8931
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9042,6 +9084,29 @@ var NcOccupancyConditionSchema = object({
9042
9084
  count: number().int().min(0).default(1),
9043
9085
  sustainSeconds: number().int().min(0).max(3600).default(15)
9044
9086
  });
9087
+ /**
9088
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9089
+ *
9090
+ * The values are not symmetric, and deliberately so — the absent value has to
9091
+ * mean exactly what every rule authored before this condition existed already
9092
+ * does:
9093
+ * - `enter` — entries and every NON-crossing record (movement state,
9094
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9095
+ * an operator who never asked for exits must not start receiving them.
9096
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9097
+ * fails closed, because "the car left the drive" is a question about a
9098
+ * boundary, not about a detection.
9099
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9100
+ *
9101
+ * A rule asking for a direction should normally also scope `zones`, which the
9102
+ * engine evaluates against the crossed zone as well as the current membership
9103
+ * (an exit's membership no longer contains the zone it just left).
9104
+ */
9105
+ var NcCrossingSchema = _enum([
9106
+ "enter",
9107
+ "exit",
9108
+ "any"
9109
+ ]);
9045
9110
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9046
9111
  var NcZoneConditionSchema = object({
9047
9112
  ids: array(string().min(1)).min(1),
@@ -9066,6 +9131,13 @@ var NcConditionsSchema = object({
9066
9131
  /** Veto zones — any hit fails the rule. */
9067
9132
  zonesExclude: array(string().min(1)).optional(),
9068
9133
  /**
9134
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9135
+ * and a closed track carries none, so a `track-end` rule asking for one
9136
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9137
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9138
+ */
9139
+ crossing: NcCrossingSchema.optional(),
9140
+ /**
9069
9141
  * Exact (case-insensitive) match on the record's collapsed `label`
9070
9142
  * (identity name / plate text / subclass).
9071
9143
  */
@@ -9200,17 +9272,85 @@ var NcRuleTargetSchema = object({
9200
9272
  * - `keyFrame` — the clean scene frame (no subject box).
9201
9273
  * - `none` — no attachment.
9202
9274
  */
9203
- var NcMediaPolicySchema = object({ attach: _enum([
9204
- "best",
9205
- "best-matching",
9206
- "keyFrame",
9207
- "none"
9208
- ]).default("best") });
9275
+ /**
9276
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9277
+ * conflate it with the selection strategy and betray the request: asking for
9278
+ * the clean scene frame on an object-event owner used to start at
9279
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9280
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9281
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9282
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9283
+ * the pipeline actually saw.
9284
+ */
9285
+ var NcMediaFrameSchema = _enum([
9286
+ "cropped",
9287
+ "full",
9288
+ "boxed"
9289
+ ]);
9290
+ var NcMediaPolicySchema = object({
9291
+ attach: _enum([
9292
+ "best",
9293
+ "best-matching",
9294
+ "keyFrame",
9295
+ "none"
9296
+ ]).default("best"),
9297
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9298
+ frame: NcMediaFrameSchema.optional(),
9299
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9300
+ * "show me the ZONE", not the whole scene or the subject crop. */
9301
+ zoneCrop: boolean().optional(),
9302
+ /**
9303
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9304
+ * event — NOT from the recording, so the camera does not have to be
9305
+ * recording, and the window sits AROUND the moment instead of a segment
9306
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9307
+ * gif, never a failed notification.
9308
+ */
9309
+ gif: boolean().optional(),
9310
+ /**
9311
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9312
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9313
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9314
+ * the degrade engine, which drops the video and keeps the still.
9315
+ */
9316
+ clip: boolean().optional(),
9317
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9318
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9319
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9320
+ /**
9321
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9322
+ * assigned profile: a notification is watched on a phone, so the 4K
9323
+ * rendition would burn CPU to produce a file the client downscales anyway.
9324
+ * A profile that is not assigned falls back to the cheapest, and the render
9325
+ * reports which one actually ran.
9326
+ */
9327
+ profile: CamProfileSchema.optional()
9328
+ });
9329
+ /**
9330
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9331
+ * notification suppresses.
9332
+ * - `shared` (default, and the absent value) — one window for the whole
9333
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9334
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9335
+ * at once and cat→cat still waits.
9336
+ *
9337
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9338
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9339
+ * see `cooldownKey` in the rule engine).
9340
+ */
9341
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9209
9342
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9210
9343
  var NcThrottleSchema = object({
9211
9344
  cooldownSec: number().int().min(0).max(86400).default(60),
9212
9345
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9213
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9346
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9347
+ /**
9348
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9349
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9350
+ * rule authored before this field simply carries none — and the engine
9351
+ * reads absent as `shared`, the pre-existing behaviour.
9352
+ */
9353
+ granularity: NcThrottleGranularitySchema.optional()
9214
9354
  });
9215
9355
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9216
9356
  var NcRuleInputSchema = object({
@@ -9219,7 +9359,19 @@ var NcRuleInputSchema = object({
9219
9359
  delivery: NcDeliverySchema,
9220
9360
  conditions: NcConditionsSchema.default({}),
9221
9361
  schedule: NcScheduleSchema.optional(),
9222
- targets: array(NcRuleTargetSchema).min(1),
9362
+ /** May be empty when `targetUsers` addresses at least one user — the
9363
+ * "at least one addressee" invariant is enforced by the provider, because
9364
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9365
+ targets: array(NcRuleTargetSchema),
9366
+ /**
9367
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9368
+ * time each user fans out to the personal targets they own
9369
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9370
+ * firing camera — a user is never notified about a device they cannot open.
9371
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9372
+ * targets.
9373
+ */
9374
+ targetUsers: array(string()).optional(),
9223
9375
  media: NcMediaPolicySchema.default({ attach: "best" }),
9224
9376
  throttle: NcThrottleSchema.default({
9225
9377
  cooldownSec: 60,
@@ -9306,6 +9458,7 @@ var NcConditionDescriptorSchema = object({
9306
9458
  "schedule",
9307
9459
  "plateMatcher",
9308
9460
  "packagePhase",
9461
+ "crossingSelect",
9309
9462
  "polygonDraw",
9310
9463
  "occupancy"
9311
9464
  ]),
@@ -9432,7 +9585,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9432
9585
  }), object({ results: array(NcTestResultSchema) }), {
9433
9586
  kind: "mutation",
9434
9587
  auth: "admin"
9435
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9588
+ }), method(object({}), object({
9589
+ catalog: array(NcConditionDescriptorSchema),
9590
+ taxonomy: NcTaxonomySchema.optional()
9591
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9436
9592
  /**
9437
9593
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9438
9594
  *
@@ -10169,6 +10325,28 @@ method(object({
10169
10325
  }), object({ success: literal(true) }), {
10170
10326
  kind: "mutation",
10171
10327
  auth: "admin"
10328
+ }), method(object({
10329
+ deviceId: number(),
10330
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10331
+ * watched on a phone, and the cheap rendition is the right default. */
10332
+ profile: CamProfileSchema.optional(),
10333
+ aroundMs: number(),
10334
+ preRollSec: number().min(0).max(20).default(3),
10335
+ postRollSec: number().min(0).max(20).default(5),
10336
+ format: _enum(["gif", "mp4"]).default("gif"),
10337
+ maxWidth: number().int().min(120).max(1920).default(480),
10338
+ /** GIF only — MP4 keeps the source cadence. */
10339
+ fps: number().int().min(1).max(15).default(5)
10340
+ }), object({
10341
+ base64: string(),
10342
+ mime: string(),
10343
+ bytes: number().int(),
10344
+ /** The profile actually rendered (what the default resolved to). */
10345
+ profile: CamProfileSchema,
10346
+ durationMs: number()
10347
+ }), {
10348
+ kind: "mutation",
10349
+ auth: "admin"
10172
10350
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10173
10351
  probed: boolean(),
10174
10352
  summary: string()
@@ -15893,7 +16071,10 @@ method(object({
15893
16071
  }), method(object({
15894
16072
  deviceId: number(),
15895
16073
  caps: array(string()).readonly().optional()
15896
- }), record(string(), unknown().nullable()));
16074
+ }), record(string(), unknown().nullable())), method(object({
16075
+ deviceIds: array(number()).readonly(),
16076
+ caps: array(string()).readonly().optional()
16077
+ }), record(string(), record(string(), unknown().nullable())));
15897
16078
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15898
16079
  deviceId: number(),
15899
16080
  capName: string()
@@ -16824,6 +17005,36 @@ var TargetKindSchema = object({
16824
17005
  icon: string(),
16825
17006
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16826
17007
  addonId: string(),
17008
+ /**
17009
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
17010
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
17011
+ * when the addon bundles no icon for that kind — the client then falls back
17012
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
17013
+ *
17014
+ * Root-relative on purpose: it resolves against whatever origin serves a web
17015
+ * client, and a native client joins it onto its own hub base.
17016
+ *
17017
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
17018
+ * field that survived only because the runtime cap-router forwards provider
17019
+ * output verbatim — so every consumer had to re-declare it by hand to stop
17020
+ * its own Zod parse from stripping it, and the whole arrangement would have
17021
+ * broken silently the moment output validation was tightened anywhere.
17022
+ */
17023
+ iconUrl: string().optional(),
17024
+ /**
17025
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
17026
+ *
17027
+ * The server knows this and therefore says it, because the client cannot
17028
+ * safely guess: a React-Native client renders SVG and raster through two
17029
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
17030
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
17031
+ * placeholder glyph for every vector icon while the web build looked fine.
17032
+ *
17033
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
17034
+ * not been updated — a client that cannot determine the type should prefer
17035
+ * its raster path, which is the safe default for an unknown image.
17036
+ */
17037
+ iconMediaType: string().optional(),
16827
17038
  configSchema: ConfigSchemaPassthrough,
16828
17039
  supportsDiscovery: boolean(),
16829
17040
  caps: TargetKindCapsSchema
@@ -17271,6 +17482,29 @@ var MotionEventSchema = object({
17271
17482
  * Absent on legacy rows ⇒ treat as `pipeline`.
17272
17483
  */
17273
17484
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17485
+ /**
17486
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17487
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17488
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17489
+ * appearance event carry none, so a rule asking for a direction fails closed
17490
+ * on them.
17491
+ *
17492
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17493
+ * into its own event, so a frame in which a track enters A while leaving B
17494
+ * produces two events with two directions — never one ambiguous row.
17495
+ *
17496
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17497
+ * membership the box has NOW, and by definition it no longer contains the zone
17498
+ * that was just left. Without the id here, a zone-scoped rule could never match
17499
+ * the exit it asked for.
17500
+ */
17501
+ var ZoneCrossingSchema = object({
17502
+ direction: _enum(["enter", "exit"]),
17503
+ /** Admin zone id crossed. */
17504
+ zoneId: string(),
17505
+ /** Zone display name at crossing time (falls back to the id). */
17506
+ zoneName: string().optional()
17507
+ });
17274
17508
  var ObjectEventSchema = object({
17275
17509
  ...BaseEventFields,
17276
17510
  kind: literal("object"),
@@ -17297,6 +17531,12 @@ var ObjectEventSchema = object({
17297
17531
  zones: array(string()).readonly().optional(),
17298
17532
  /** Omitted in slim projection. */
17299
17533
  state: TrackStateSchema.optional(),
17534
+ /**
17535
+ * The zone crossing this event IS, when it is one. Absent on every other
17536
+ * event kind (movement state, appearance, package) — see
17537
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17538
+ */
17539
+ zoneCrossing: ZoneCrossingSchema.optional(),
17300
17540
  /** Detection-frame dimensions in pixels — let consumers normalize the
17301
17541
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17302
17542
  frameWidth: number().optional(),
@@ -17555,6 +17795,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17555
17795
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17556
17796
  kind: "mutation",
17557
17797
  auth: "admin"
17798
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17799
+ kind: "mutation",
17800
+ auth: "admin"
17801
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17802
+ kind: "query",
17803
+ auth: "admin"
17804
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17805
+ kind: "mutation",
17806
+ auth: "admin"
17558
17807
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17559
17808
  kind: "query",
17560
17809
  auth: "admin"
@@ -20034,6 +20283,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
20034
20283
  */
20035
20284
  priority: number()
20036
20285
  })).readonly() });
20286
+ /**
20287
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20288
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20289
+ * what AUTO currently picks, so the UI can show the effective value either way.
20290
+ */
20291
+ var NotificationEndpointSchema = object({
20292
+ /** The operator's explicit choice, or null for AUTO. */
20293
+ baseUrl: string().nullable(),
20294
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20295
+ resolved: string().nullable()
20296
+ });
20037
20297
  var AllowedAddressesSchema = object({
20038
20298
  /**
20039
20299
  * Allowlist of interface addresses operators have explicitly opted
@@ -20056,7 +20316,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20056
20316
  * to avoid mixed-content blocks in the browser. The public
20057
20317
  * tunnel always emits `https://` regardless. */
20058
20318
  scheme: _enum(["http", "https"]).optional()
20059
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20319
+ }), 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" });
20060
20320
  /**
20061
20321
  * mesh-network — collection cap for mesh-VPN providers.
20062
20322
  *
@@ -20855,7 +21115,12 @@ var RecordingDeviceUsageSchema = object({
20855
21115
  var RecordingLocationUsageSchema = object({
20856
21116
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20857
21117
  locationId: string().nullable(),
20858
- /** Bytes of recordings stored on this location. */
21118
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21119
+ * is emitted per physical disk (2026-07-29): two locations on one root
21120
+ * previously rendered as two identical "disks" with a nonsensical used
21121
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21122
+ locationIds: array(string()).optional(),
21123
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20859
21124
  usedBytes: number(),
20860
21125
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20861
21126
  availableBytes: number().nullable(),
@@ -20967,6 +21232,44 @@ method(object({
20967
21232
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20968
21233
  kind: "query",
20969
21234
  auth: "admin"
21235
+ }), method(object({
21236
+ deviceId: number(),
21237
+ aroundMs: number(),
21238
+ preRollSec: number().min(0).max(30).default(2),
21239
+ postRollSec: number().min(0).max(30).default(5),
21240
+ maxWidth: number().int().min(120).max(1280).default(480),
21241
+ fps: number().int().min(1).max(15).default(5)
21242
+ }), object({
21243
+ gifBase64: string(),
21244
+ fromMs: number(),
21245
+ toMs: number()
21246
+ }), {
21247
+ kind: "mutation",
21248
+ auth: "admin"
21249
+ }), method(object({
21250
+ deviceId: number(),
21251
+ aroundMs: number(),
21252
+ preRollSec: number().min(0).max(30).default(3),
21253
+ postRollSec: number().min(0).max(30).default(7),
21254
+ maxWidth: number().int().min(160).max(1920).default(640)
21255
+ }), object({
21256
+ clipBase64: string(),
21257
+ mime: string(),
21258
+ fromMs: number(),
21259
+ toMs: number(),
21260
+ bytes: number().int()
21261
+ }), {
21262
+ kind: "mutation",
21263
+ auth: "admin"
21264
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21265
+ kind: "mutation",
21266
+ auth: "admin"
21267
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21268
+ kind: "query",
21269
+ auth: "admin"
21270
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21271
+ kind: "mutation",
21272
+ auth: "admin"
20970
21273
  });
20971
21274
  /**
20972
21275
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22558,6 +22861,12 @@ Object.freeze({
22558
22861
  addonId: null,
22559
22862
  access: "view"
22560
22863
  },
22864
+ "deviceManager.getDeviceStatusAggregateBatch": {
22865
+ capName: "device-manager",
22866
+ capScope: "system",
22867
+ addonId: null,
22868
+ access: "view"
22869
+ },
22561
22870
  "deviceManager.getLinkedDevices": {
22562
22871
  capName: "device-manager",
22563
22872
  capScope: "system",
@@ -23452,6 +23761,12 @@ Object.freeze({
23452
23761
  addonId: null,
23453
23762
  access: "view"
23454
23763
  },
23764
+ "localNetwork.getNotificationEndpoint": {
23765
+ capName: "local-network",
23766
+ capScope: "system",
23767
+ addonId: null,
23768
+ access: "view"
23769
+ },
23455
23770
  "localNetwork.getPreferred": {
23456
23771
  capName: "local-network",
23457
23772
  capScope: "system",
@@ -23476,6 +23791,12 @@ Object.freeze({
23476
23791
  addonId: null,
23477
23792
  access: "create"
23478
23793
  },
23794
+ "localNetwork.setNotificationEndpoint": {
23795
+ capName: "local-network",
23796
+ capScope: "system",
23797
+ addonId: null,
23798
+ access: "create"
23799
+ },
23479
23800
  "lockControl.lock": {
23480
23801
  capName: "lock-control",
23481
23802
  capScope: "device",
@@ -24118,6 +24439,12 @@ Object.freeze({
24118
24439
  addonId: null,
24119
24440
  access: "create"
24120
24441
  },
24442
+ "pipelineAnalytics.cancelMediaRelocate": {
24443
+ capName: "pipeline-analytics",
24444
+ capScope: "device",
24445
+ addonId: null,
24446
+ access: "create"
24447
+ },
24121
24448
  "pipelineAnalytics.clearTracks": {
24122
24449
  capName: "pipeline-analytics",
24123
24450
  capScope: "device",
@@ -24172,6 +24499,12 @@ Object.freeze({
24172
24499
  addonId: null,
24173
24500
  access: "view"
24174
24501
  },
24502
+ "pipelineAnalytics.getMediaRelocateStatus": {
24503
+ capName: "pipeline-analytics",
24504
+ capScope: "device",
24505
+ addonId: null,
24506
+ access: "view"
24507
+ },
24175
24508
  "pipelineAnalytics.getMotionEvents": {
24176
24509
  capName: "pipeline-analytics",
24177
24510
  capScope: "device",
@@ -24244,6 +24577,12 @@ Object.freeze({
24244
24577
  addonId: null,
24245
24578
  access: "create"
24246
24579
  },
24580
+ "pipelineAnalytics.relocateMedia": {
24581
+ capName: "pipeline-analytics",
24582
+ capScope: "device",
24583
+ addonId: null,
24584
+ access: "create"
24585
+ },
24247
24586
  "pipelineAnalytics.searchObjectEvents": {
24248
24587
  capName: "pipeline-analytics",
24249
24588
  capScope: "device",
@@ -25006,6 +25345,12 @@ Object.freeze({
25006
25345
  addonId: null,
25007
25346
  access: "create"
25008
25347
  },
25348
+ "recording.cancelRelocate": {
25349
+ capName: "recording",
25350
+ capScope: "system",
25351
+ addonId: null,
25352
+ access: "create"
25353
+ },
25009
25354
  "recording.deleteFootprint": {
25010
25355
  capName: "recording",
25011
25356
  capScope: "system",
@@ -25036,6 +25381,12 @@ Object.freeze({
25036
25381
  addonId: null,
25037
25382
  access: "view"
25038
25383
  },
25384
+ "recording.getRelocateStatus": {
25385
+ capName: "recording",
25386
+ capScope: "system",
25387
+ addonId: null,
25388
+ access: "view"
25389
+ },
25039
25390
  "recording.getStorageUsage": {
25040
25391
  capName: "recording",
25041
25392
  capScope: "system",
@@ -25066,6 +25417,24 @@ Object.freeze({
25066
25417
  addonId: null,
25067
25418
  access: "view"
25068
25419
  },
25420
+ "recording.relocateFootage": {
25421
+ capName: "recording",
25422
+ capScope: "system",
25423
+ addonId: null,
25424
+ access: "create"
25425
+ },
25426
+ "recording.renderClip": {
25427
+ capName: "recording",
25428
+ capScope: "system",
25429
+ addonId: null,
25430
+ access: "create"
25431
+ },
25432
+ "recording.renderGif": {
25433
+ capName: "recording",
25434
+ capScope: "system",
25435
+ addonId: null,
25436
+ access: "create"
25437
+ },
25069
25438
  "recording.rescanStorage": {
25070
25439
  capName: "recording",
25071
25440
  capScope: "system",
@@ -25660,6 +26029,12 @@ Object.freeze({
25660
26029
  addonId: null,
25661
26030
  access: "create"
25662
26031
  },
26032
+ "streamBroker.renderPreBufferClip": {
26033
+ capName: "stream-broker",
26034
+ capScope: "system",
26035
+ addonId: null,
26036
+ access: "create"
26037
+ },
25663
26038
  "streamBroker.restartProfile": {
25664
26039
  capName: "stream-broker",
25665
26040
  capScope: "system",