@camstack/addon-static-turn 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.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region ../types/dist/event-category-BLcNejAE.mjs
2
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -270,6 +270,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
270
270
  */
271
271
  EventCategory["DeviceStateChanged"] = "device.state-changed";
272
272
  /**
273
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
274
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
275
+ *
276
+ * Emitted only on a change, so a steady scene is silent. It exists so a
277
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
278
+ * one live badge with no push signal at all, and it cost a request every
279
+ * four seconds per visible camera.
280
+ *
281
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
282
+ * keeps a slow reconcile rather than trusting it alone.
283
+ */
284
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
285
+ /**
273
286
  * Cap event fired by every device that registers the `battery`
274
287
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
275
288
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7183,35 +7196,22 @@ var ConvertResultSchema = object({
7183
7196
  */
7184
7197
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7185
7198
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7186
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7187
- kind: literal("timeOfDay"),
7188
- start: string().regex(HHMM),
7189
- end: string().regex(HHMM),
7190
- /** Restrict to these weekdays; omit = every day. */
7191
- days: array(RecordingWeekdaySchema).optional()
7192
- })]);
7193
- var RecordingModeSchema = _enum([
7194
- "continuous",
7195
- "onMotion",
7196
- "onAudioThreshold"
7197
- ]);
7198
7199
  /**
7199
- * First-class, authoritative per-camera storage mode — the explicit choice the
7200
- * UI reads directly (never inferred from `rules`):
7201
- * - `off` — not recording.
7202
- * - `events` — record only around triggers (motion / audio threshold),
7203
- * with pre/post-buffer.
7204
- * - `continuous` — record 24/7 within the schedule.
7200
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7201
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7202
+ * - `off` — no band covers the camera (or it is disabled).
7203
+ * - `events` — every band records around triggers only.
7204
+ * - `continuous` — at least one band records continuously.
7205
7205
  *
7206
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7207
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7206
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7207
+ * every save (`activeModeForConfig`). Writing it has no effect.
7208
7208
  */
7209
7209
  var RecordingStorageModeSchema = _enum([
7210
7210
  "off",
7211
7211
  "events",
7212
7212
  "continuous"
7213
7213
  ]);
7214
- /** Which detectors trigger an `events`-mode recording. */
7214
+ /** Which detectors trigger an `events`-mode band. */
7215
7215
  var RecordingTriggersSchema = object({
7216
7216
  motion: boolean().optional(),
7217
7217
  audioThresholdDbfs: number().optional()
@@ -7247,18 +7247,6 @@ var RecordingBandSchema = object({
7247
7247
  preBufferSec: number().min(0).optional(),
7248
7248
  postBufferSec: number().min(0).optional()
7249
7249
  });
7250
- var RecordingRuleSchema = object({
7251
- schedule: RecordingScheduleSchema,
7252
- mode: RecordingModeSchema,
7253
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7254
- preBufferSec: number().min(0).default(0),
7255
- /** Keep recording until this many seconds after the last trigger. */
7256
- postBufferSec: number().min(0).default(0),
7257
- /** Each new trigger restarts the post-buffer window. */
7258
- resetTimeoutOnNewEvent: boolean().default(true),
7259
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7260
- thresholdDbfs: number().optional()
7261
- });
7262
7250
  /**
7263
7251
  * Per-device retention overrides. Every field is optional; an unset or `0`
7264
7252
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7292,40 +7280,28 @@ var ScrubThumbnailPresetSchema = _enum([
7292
7280
  /**
7293
7281
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7294
7282
  *
7295
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7296
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7297
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7298
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7283
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7284
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7285
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7286
+ *
7287
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7288
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7289
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7290
+ * persist a band-less config, i.e. silently stop recording the camera.
7299
7291
  */
7300
7292
  var RecordingConfigSchema = object({
7301
7293
  enabled: boolean(),
7302
- /** Authoritative storage mode. Absent on legacy targets derived once via
7303
- * `migrateRulesToMode`, then persisted. */
7294
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7295
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7304
7296
  mode: RecordingStorageModeSchema.optional(),
7305
7297
  profiles: array(CamProfileSchema).optional(),
7306
7298
  segmentSeconds: number().int().positive().optional(),
7307
- /** Shared recording time-bands for `events` & `continuous` — record only when
7308
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7309
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7310
- schedules: array(RecordingScheduleSchema).optional(),
7311
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7312
- * normalized into `schedules` on read and never written going forward. (Not
7313
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7314
- schedule: RecordingScheduleSchema.optional(),
7315
- /** `events`-mode only — which detectors trigger a recording. */
7316
- triggers: RecordingTriggersSchema.optional(),
7317
- /** `events`-mode only — seconds retained before / after a trigger. */
7318
- preBufferSec: number().min(0).optional(),
7319
- postBufferSec: number().min(0).optional(),
7320
- /** DEPRECATED authoring input; retained for migration/transition. */
7321
- rules: array(RecordingRuleSchema).optional(),
7322
7299
  /**
7323
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7324
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7325
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7326
- * derived into bands once via `migrateConfigToBands`.
7300
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7301
+ * the recorder's band engine consumes. An empty array = record nothing;
7302
+ * "off" is the absence of a covering band, never a band value.
7327
7303
  */
7328
- bands: array(RecordingBandSchema).optional(),
7304
+ bands: array(RecordingBandSchema).default([]),
7329
7305
  retention: RecordingRetentionSchema.optional(),
7330
7306
  /**
7331
7307
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7333,8 +7309,15 @@ var RecordingConfigSchema = object({
7333
7309
  * windows only — existing sheets are immutable, and each window's index
7334
7310
  * carries its own tile dims so mixed-preset history renders correctly.
7335
7311
  */
7336
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7337
- });
7312
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7313
+ /**
7314
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7315
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7316
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7317
+ * are written and scrub reads exact keyframes at every velocity.
7318
+ */
7319
+ stripsEnabled: boolean().optional()
7320
+ }).strict();
7338
7321
  /**
7339
7322
  * Ops-log — the durable, append-only operations audit shared by the
7340
7323
  * recordings and events management surfaces.
@@ -7353,7 +7336,8 @@ var OpsLogOpSchema = _enum([
7353
7336
  "prune",
7354
7337
  "manual-delete",
7355
7338
  "rescan",
7356
- "retention-run"
7339
+ "retention-run",
7340
+ "relocate"
7357
7341
  ]);
7358
7342
  /** Why the operation ran. */
7359
7343
  var OpsLogReasonSchema = _enum([
@@ -7392,6 +7376,55 @@ var OpsLogQueryInputSchema = object({
7392
7376
  limit: number().int().min(1).max(1e3).optional()
7393
7377
  });
7394
7378
  /**
7379
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7380
+ *
7381
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7382
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7383
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7384
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7385
+ * after verify) and each completed/failed run also lands one durable ops-log
7386
+ * row on the owning addon's surface.
7387
+ */
7388
+ var RelocateJobStateSchema = _enum([
7389
+ "running",
7390
+ "done",
7391
+ "failed",
7392
+ "cancelled"
7393
+ ]);
7394
+ var RelocateJobSchema = object({
7395
+ jobId: string(),
7396
+ state: RelocateJobStateSchema,
7397
+ /** Source location — for media relocation this is informational ('*': rows
7398
+ * move from wherever they are to the target). */
7399
+ fromLocationId: string(),
7400
+ toLocationId: string(),
7401
+ /** Scoped device, or null = every device. */
7402
+ deviceId: number().nullable(),
7403
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7404
+ entities: array(string()),
7405
+ filesMoved: number().int(),
7406
+ bytesMoved: number().int(),
7407
+ /** Total files discovered up front; null while (or when) unknown. */
7408
+ filesTotal: number().int().nullable(),
7409
+ startedAt: number(),
7410
+ finishedAt: number().nullable(),
7411
+ error: string().nullable()
7412
+ });
7413
+ var RelocateFootageInputSchema = object({
7414
+ deviceId: number().optional(),
7415
+ fromLocationId: string(),
7416
+ toLocationId: string(),
7417
+ entities: array(_enum(["segments", "strips"])).optional(),
7418
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7419
+ * never allowed to starve live writers. */
7420
+ throttleMbps: number().min(1).max(1e3).optional()
7421
+ });
7422
+ var RelocateMediaInputSchema = object({
7423
+ deviceId: number().optional(),
7424
+ toLocationId: string(),
7425
+ throttleMbps: number().min(1).max(1e3).optional()
7426
+ });
7427
+ /**
7395
7428
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7396
7429
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7397
7430
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7441,6 +7474,13 @@ var StorageLocationSchema = object({
7441
7474
  nodeId: string().optional(),
7442
7475
  isDefault: boolean().default(false),
7443
7476
  isSystem: boolean().default(false),
7477
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7478
+ * for node-local locations it can reach) — never persisted, absent when the
7479
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7480
+ capacity: object({
7481
+ totalBytes: number(),
7482
+ availableBytes: number()
7483
+ }).nullable().optional(),
7444
7484
  createdAt: number(),
7445
7485
  updatedAt: number()
7446
7486
  });
@@ -8208,7 +8248,8 @@ var NcTaxonomyEntrySchema = object({
8208
8248
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8209
8249
  parentKind: string().nullable()
8210
8250
  });
8211
- object({
8251
+ /** The complete NC picker taxonomy — three grouped buckets. */
8252
+ var NcTaxonomySchema = object({
8212
8253
  videoClasses: array(NcTaxonomyEntrySchema),
8213
8254
  audioKinds: array(NcTaxonomyEntrySchema),
8214
8255
  labels: array(NcTaxonomyEntrySchema)
@@ -8868,6 +8909,7 @@ var AccessoryKind = {
8868
8909
  };
8869
8910
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8870
8911
  DeviceFeature.BatteryOperated;
8912
+ new Set(["devices", "classes"]);
8871
8913
  /**
8872
8914
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8873
8915
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9026,6 +9068,29 @@ var NcOccupancyConditionSchema = object({
9026
9068
  count: number().int().min(0).default(1),
9027
9069
  sustainSeconds: number().int().min(0).max(3600).default(15)
9028
9070
  });
9071
+ /**
9072
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9073
+ *
9074
+ * The values are not symmetric, and deliberately so — the absent value has to
9075
+ * mean exactly what every rule authored before this condition existed already
9076
+ * does:
9077
+ * - `enter` — entries and every NON-crossing record (movement state,
9078
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9079
+ * an operator who never asked for exits must not start receiving them.
9080
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9081
+ * fails closed, because "the car left the drive" is a question about a
9082
+ * boundary, not about a detection.
9083
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9084
+ *
9085
+ * A rule asking for a direction should normally also scope `zones`, which the
9086
+ * engine evaluates against the crossed zone as well as the current membership
9087
+ * (an exit's membership no longer contains the zone it just left).
9088
+ */
9089
+ var NcCrossingSchema = _enum([
9090
+ "enter",
9091
+ "exit",
9092
+ "any"
9093
+ ]);
9029
9094
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9030
9095
  var NcZoneConditionSchema = object({
9031
9096
  ids: array(string().min(1)).min(1),
@@ -9050,6 +9115,13 @@ var NcConditionsSchema = object({
9050
9115
  /** Veto zones — any hit fails the rule. */
9051
9116
  zonesExclude: array(string().min(1)).optional(),
9052
9117
  /**
9118
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9119
+ * and a closed track carries none, so a `track-end` rule asking for one
9120
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9121
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9122
+ */
9123
+ crossing: NcCrossingSchema.optional(),
9124
+ /**
9053
9125
  * Exact (case-insensitive) match on the record's collapsed `label`
9054
9126
  * (identity name / plate text / subclass).
9055
9127
  */
@@ -9184,17 +9256,85 @@ var NcRuleTargetSchema = object({
9184
9256
  * - `keyFrame` — the clean scene frame (no subject box).
9185
9257
  * - `none` — no attachment.
9186
9258
  */
9187
- var NcMediaPolicySchema = object({ attach: _enum([
9188
- "best",
9189
- "best-matching",
9190
- "keyFrame",
9191
- "none"
9192
- ]).default("best") });
9259
+ /**
9260
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9261
+ * conflate it with the selection strategy and betray the request: asking for
9262
+ * the clean scene frame on an object-event owner used to start at
9263
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9264
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9265
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9266
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9267
+ * the pipeline actually saw.
9268
+ */
9269
+ var NcMediaFrameSchema = _enum([
9270
+ "cropped",
9271
+ "full",
9272
+ "boxed"
9273
+ ]);
9274
+ var NcMediaPolicySchema = object({
9275
+ attach: _enum([
9276
+ "best",
9277
+ "best-matching",
9278
+ "keyFrame",
9279
+ "none"
9280
+ ]).default("best"),
9281
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9282
+ frame: NcMediaFrameSchema.optional(),
9283
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9284
+ * "show me the ZONE", not the whole scene or the subject crop. */
9285
+ zoneCrop: boolean().optional(),
9286
+ /**
9287
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9288
+ * event — NOT from the recording, so the camera does not have to be
9289
+ * recording, and the window sits AROUND the moment instead of a segment
9290
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9291
+ * gif, never a failed notification.
9292
+ */
9293
+ gif: boolean().optional(),
9294
+ /**
9295
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9296
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9297
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9298
+ * the degrade engine, which drops the video and keeps the still.
9299
+ */
9300
+ clip: boolean().optional(),
9301
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9302
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9303
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9304
+ /**
9305
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9306
+ * assigned profile: a notification is watched on a phone, so the 4K
9307
+ * rendition would burn CPU to produce a file the client downscales anyway.
9308
+ * A profile that is not assigned falls back to the cheapest, and the render
9309
+ * reports which one actually ran.
9310
+ */
9311
+ profile: CamProfileSchema.optional()
9312
+ });
9313
+ /**
9314
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9315
+ * notification suppresses.
9316
+ * - `shared` (default, and the absent value) — one window for the whole
9317
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9318
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9319
+ * at once and cat→cat still waits.
9320
+ *
9321
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9322
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9323
+ * see `cooldownKey` in the rule engine).
9324
+ */
9325
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9193
9326
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9194
9327
  var NcThrottleSchema = object({
9195
9328
  cooldownSec: number().int().min(0).max(86400).default(60),
9196
9329
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9197
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9330
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9331
+ /**
9332
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9333
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9334
+ * rule authored before this field simply carries none — and the engine
9335
+ * reads absent as `shared`, the pre-existing behaviour.
9336
+ */
9337
+ granularity: NcThrottleGranularitySchema.optional()
9198
9338
  });
9199
9339
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9200
9340
  var NcRuleInputSchema = object({
@@ -9203,7 +9343,19 @@ var NcRuleInputSchema = object({
9203
9343
  delivery: NcDeliverySchema,
9204
9344
  conditions: NcConditionsSchema.default({}),
9205
9345
  schedule: NcScheduleSchema.optional(),
9206
- targets: array(NcRuleTargetSchema).min(1),
9346
+ /** May be empty when `targetUsers` addresses at least one user — the
9347
+ * "at least one addressee" invariant is enforced by the provider, because
9348
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9349
+ targets: array(NcRuleTargetSchema),
9350
+ /**
9351
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9352
+ * time each user fans out to the personal targets they own
9353
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9354
+ * firing camera — a user is never notified about a device they cannot open.
9355
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9356
+ * targets.
9357
+ */
9358
+ targetUsers: array(string()).optional(),
9207
9359
  media: NcMediaPolicySchema.default({ attach: "best" }),
9208
9360
  throttle: NcThrottleSchema.default({
9209
9361
  cooldownSec: 60,
@@ -9290,6 +9442,7 @@ var NcConditionDescriptorSchema = object({
9290
9442
  "schedule",
9291
9443
  "plateMatcher",
9292
9444
  "packagePhase",
9445
+ "crossingSelect",
9293
9446
  "polygonDraw",
9294
9447
  "occupancy"
9295
9448
  ]),
@@ -9416,7 +9569,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9416
9569
  }), object({ results: array(NcTestResultSchema) }), {
9417
9570
  kind: "mutation",
9418
9571
  auth: "admin"
9419
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9572
+ }), method(object({}), object({
9573
+ catalog: array(NcConditionDescriptorSchema),
9574
+ taxonomy: NcTaxonomySchema.optional()
9575
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9420
9576
  /**
9421
9577
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9422
9578
  *
@@ -10153,6 +10309,28 @@ method(object({
10153
10309
  }), object({ success: literal(true) }), {
10154
10310
  kind: "mutation",
10155
10311
  auth: "admin"
10312
+ }), method(object({
10313
+ deviceId: number(),
10314
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10315
+ * watched on a phone, and the cheap rendition is the right default. */
10316
+ profile: CamProfileSchema.optional(),
10317
+ aroundMs: number(),
10318
+ preRollSec: number().min(0).max(20).default(3),
10319
+ postRollSec: number().min(0).max(20).default(5),
10320
+ format: _enum(["gif", "mp4"]).default("gif"),
10321
+ maxWidth: number().int().min(120).max(1920).default(480),
10322
+ /** GIF only — MP4 keeps the source cadence. */
10323
+ fps: number().int().min(1).max(15).default(5)
10324
+ }), object({
10325
+ base64: string(),
10326
+ mime: string(),
10327
+ bytes: number().int(),
10328
+ /** The profile actually rendered (what the default resolved to). */
10329
+ profile: CamProfileSchema,
10330
+ durationMs: number()
10331
+ }), {
10332
+ kind: "mutation",
10333
+ auth: "admin"
10156
10334
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10157
10335
  probed: boolean(),
10158
10336
  summary: string()
@@ -15747,7 +15925,10 @@ method(object({
15747
15925
  }), method(object({
15748
15926
  deviceId: number(),
15749
15927
  caps: array(string()).readonly().optional()
15750
- }), record(string(), unknown().nullable()));
15928
+ }), record(string(), unknown().nullable())), method(object({
15929
+ deviceIds: array(number()).readonly(),
15930
+ caps: array(string()).readonly().optional()
15931
+ }), record(string(), record(string(), unknown().nullable())));
15751
15932
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15752
15933
  deviceId: number(),
15753
15934
  capName: string()
@@ -16678,6 +16859,36 @@ var TargetKindSchema = object({
16678
16859
  icon: string(),
16679
16860
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16680
16861
  addonId: string(),
16862
+ /**
16863
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16864
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16865
+ * when the addon bundles no icon for that kind — the client then falls back
16866
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16867
+ *
16868
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16869
+ * client, and a native client joins it onto its own hub base.
16870
+ *
16871
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16872
+ * field that survived only because the runtime cap-router forwards provider
16873
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16874
+ * its own Zod parse from stripping it, and the whole arrangement would have
16875
+ * broken silently the moment output validation was tightened anywhere.
16876
+ */
16877
+ iconUrl: string().optional(),
16878
+ /**
16879
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16880
+ *
16881
+ * The server knows this and therefore says it, because the client cannot
16882
+ * safely guess: a React-Native client renders SVG and raster through two
16883
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16884
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16885
+ * placeholder glyph for every vector icon while the web build looked fine.
16886
+ *
16887
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16888
+ * not been updated — a client that cannot determine the type should prefer
16889
+ * its raster path, which is the safe default for an unknown image.
16890
+ */
16891
+ iconMediaType: string().optional(),
16681
16892
  configSchema: ConfigSchemaPassthrough,
16682
16893
  supportsDiscovery: boolean(),
16683
16894
  caps: TargetKindCapsSchema
@@ -17125,6 +17336,29 @@ var MotionEventSchema = object({
17125
17336
  * Absent on legacy rows ⇒ treat as `pipeline`.
17126
17337
  */
17127
17338
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17339
+ /**
17340
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17341
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17342
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17343
+ * appearance event carry none, so a rule asking for a direction fails closed
17344
+ * on them.
17345
+ *
17346
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17347
+ * into its own event, so a frame in which a track enters A while leaving B
17348
+ * produces two events with two directions — never one ambiguous row.
17349
+ *
17350
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17351
+ * membership the box has NOW, and by definition it no longer contains the zone
17352
+ * that was just left. Without the id here, a zone-scoped rule could never match
17353
+ * the exit it asked for.
17354
+ */
17355
+ var ZoneCrossingSchema = object({
17356
+ direction: _enum(["enter", "exit"]),
17357
+ /** Admin zone id crossed. */
17358
+ zoneId: string(),
17359
+ /** Zone display name at crossing time (falls back to the id). */
17360
+ zoneName: string().optional()
17361
+ });
17128
17362
  var ObjectEventSchema = object({
17129
17363
  ...BaseEventFields,
17130
17364
  kind: literal("object"),
@@ -17151,6 +17385,12 @@ var ObjectEventSchema = object({
17151
17385
  zones: array(string()).readonly().optional(),
17152
17386
  /** Omitted in slim projection. */
17153
17387
  state: TrackStateSchema.optional(),
17388
+ /**
17389
+ * The zone crossing this event IS, when it is one. Absent on every other
17390
+ * event kind (movement state, appearance, package) — see
17391
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17392
+ */
17393
+ zoneCrossing: ZoneCrossingSchema.optional(),
17154
17394
  /** Detection-frame dimensions in pixels — let consumers normalize the
17155
17395
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17156
17396
  frameWidth: number().optional(),
@@ -17409,6 +17649,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17409
17649
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17410
17650
  kind: "mutation",
17411
17651
  auth: "admin"
17652
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17653
+ kind: "mutation",
17654
+ auth: "admin"
17655
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17656
+ kind: "query",
17657
+ auth: "admin"
17658
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17659
+ kind: "mutation",
17660
+ auth: "admin"
17412
17661
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17413
17662
  kind: "query",
17414
17663
  auth: "admin"
@@ -19911,6 +20160,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
19911
20160
  */
19912
20161
  priority: number()
19913
20162
  })).readonly() });
20163
+ /**
20164
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20165
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20166
+ * what AUTO currently picks, so the UI can show the effective value either way.
20167
+ */
20168
+ var NotificationEndpointSchema = object({
20169
+ /** The operator's explicit choice, or null for AUTO. */
20170
+ baseUrl: string().nullable(),
20171
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20172
+ resolved: string().nullable()
20173
+ });
19914
20174
  var AllowedAddressesSchema = object({
19915
20175
  /**
19916
20176
  * Allowlist of interface addresses operators have explicitly opted
@@ -19933,7 +20193,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
19933
20193
  * to avoid mixed-content blocks in the browser. The public
19934
20194
  * tunnel always emits `https://` regardless. */
19935
20195
  scheme: _enum(["http", "https"]).optional()
19936
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20196
+ }), 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" });
19937
20197
  /**
19938
20198
  * mesh-network — collection cap for mesh-VPN providers.
19939
20199
  *
@@ -20732,7 +20992,12 @@ var RecordingDeviceUsageSchema = object({
20732
20992
  var RecordingLocationUsageSchema = object({
20733
20993
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20734
20994
  locationId: string().nullable(),
20735
- /** Bytes of recordings stored on this location. */
20995
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
20996
+ * is emitted per physical disk (2026-07-29): two locations on one root
20997
+ * previously rendered as two identical "disks" with a nonsensical used
20998
+ * split — hydrate attribution across aliases is arbitrary by nature. */
20999
+ locationIds: array(string()).optional(),
21000
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20736
21001
  usedBytes: number(),
20737
21002
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20738
21003
  availableBytes: number().nullable(),
@@ -20844,6 +21109,44 @@ method(object({
20844
21109
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20845
21110
  kind: "query",
20846
21111
  auth: "admin"
21112
+ }), method(object({
21113
+ deviceId: number(),
21114
+ aroundMs: number(),
21115
+ preRollSec: number().min(0).max(30).default(2),
21116
+ postRollSec: number().min(0).max(30).default(5),
21117
+ maxWidth: number().int().min(120).max(1280).default(480),
21118
+ fps: number().int().min(1).max(15).default(5)
21119
+ }), object({
21120
+ gifBase64: string(),
21121
+ fromMs: number(),
21122
+ toMs: number()
21123
+ }), {
21124
+ kind: "mutation",
21125
+ auth: "admin"
21126
+ }), method(object({
21127
+ deviceId: number(),
21128
+ aroundMs: number(),
21129
+ preRollSec: number().min(0).max(30).default(3),
21130
+ postRollSec: number().min(0).max(30).default(7),
21131
+ maxWidth: number().int().min(160).max(1920).default(640)
21132
+ }), object({
21133
+ clipBase64: string(),
21134
+ mime: string(),
21135
+ fromMs: number(),
21136
+ toMs: number(),
21137
+ bytes: number().int()
21138
+ }), {
21139
+ kind: "mutation",
21140
+ auth: "admin"
21141
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21142
+ kind: "mutation",
21143
+ auth: "admin"
21144
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21145
+ kind: "query",
21146
+ auth: "admin"
21147
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21148
+ kind: "mutation",
21149
+ auth: "admin"
20847
21150
  });
20848
21151
  /**
20849
21152
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22435,6 +22738,12 @@ Object.freeze({
22435
22738
  addonId: null,
22436
22739
  access: "view"
22437
22740
  },
22741
+ "deviceManager.getDeviceStatusAggregateBatch": {
22742
+ capName: "device-manager",
22743
+ capScope: "system",
22744
+ addonId: null,
22745
+ access: "view"
22746
+ },
22438
22747
  "deviceManager.getLinkedDevices": {
22439
22748
  capName: "device-manager",
22440
22749
  capScope: "system",
@@ -23329,6 +23638,12 @@ Object.freeze({
23329
23638
  addonId: null,
23330
23639
  access: "view"
23331
23640
  },
23641
+ "localNetwork.getNotificationEndpoint": {
23642
+ capName: "local-network",
23643
+ capScope: "system",
23644
+ addonId: null,
23645
+ access: "view"
23646
+ },
23332
23647
  "localNetwork.getPreferred": {
23333
23648
  capName: "local-network",
23334
23649
  capScope: "system",
@@ -23353,6 +23668,12 @@ Object.freeze({
23353
23668
  addonId: null,
23354
23669
  access: "create"
23355
23670
  },
23671
+ "localNetwork.setNotificationEndpoint": {
23672
+ capName: "local-network",
23673
+ capScope: "system",
23674
+ addonId: null,
23675
+ access: "create"
23676
+ },
23356
23677
  "lockControl.lock": {
23357
23678
  capName: "lock-control",
23358
23679
  capScope: "device",
@@ -23995,6 +24316,12 @@ Object.freeze({
23995
24316
  addonId: null,
23996
24317
  access: "create"
23997
24318
  },
24319
+ "pipelineAnalytics.cancelMediaRelocate": {
24320
+ capName: "pipeline-analytics",
24321
+ capScope: "device",
24322
+ addonId: null,
24323
+ access: "create"
24324
+ },
23998
24325
  "pipelineAnalytics.clearTracks": {
23999
24326
  capName: "pipeline-analytics",
24000
24327
  capScope: "device",
@@ -24049,6 +24376,12 @@ Object.freeze({
24049
24376
  addonId: null,
24050
24377
  access: "view"
24051
24378
  },
24379
+ "pipelineAnalytics.getMediaRelocateStatus": {
24380
+ capName: "pipeline-analytics",
24381
+ capScope: "device",
24382
+ addonId: null,
24383
+ access: "view"
24384
+ },
24052
24385
  "pipelineAnalytics.getMotionEvents": {
24053
24386
  capName: "pipeline-analytics",
24054
24387
  capScope: "device",
@@ -24121,6 +24454,12 @@ Object.freeze({
24121
24454
  addonId: null,
24122
24455
  access: "create"
24123
24456
  },
24457
+ "pipelineAnalytics.relocateMedia": {
24458
+ capName: "pipeline-analytics",
24459
+ capScope: "device",
24460
+ addonId: null,
24461
+ access: "create"
24462
+ },
24124
24463
  "pipelineAnalytics.searchObjectEvents": {
24125
24464
  capName: "pipeline-analytics",
24126
24465
  capScope: "device",
@@ -24883,6 +25222,12 @@ Object.freeze({
24883
25222
  addonId: null,
24884
25223
  access: "create"
24885
25224
  },
25225
+ "recording.cancelRelocate": {
25226
+ capName: "recording",
25227
+ capScope: "system",
25228
+ addonId: null,
25229
+ access: "create"
25230
+ },
24886
25231
  "recording.deleteFootprint": {
24887
25232
  capName: "recording",
24888
25233
  capScope: "system",
@@ -24913,6 +25258,12 @@ Object.freeze({
24913
25258
  addonId: null,
24914
25259
  access: "view"
24915
25260
  },
25261
+ "recording.getRelocateStatus": {
25262
+ capName: "recording",
25263
+ capScope: "system",
25264
+ addonId: null,
25265
+ access: "view"
25266
+ },
24916
25267
  "recording.getStorageUsage": {
24917
25268
  capName: "recording",
24918
25269
  capScope: "system",
@@ -24943,6 +25294,24 @@ Object.freeze({
24943
25294
  addonId: null,
24944
25295
  access: "view"
24945
25296
  },
25297
+ "recording.relocateFootage": {
25298
+ capName: "recording",
25299
+ capScope: "system",
25300
+ addonId: null,
25301
+ access: "create"
25302
+ },
25303
+ "recording.renderClip": {
25304
+ capName: "recording",
25305
+ capScope: "system",
25306
+ addonId: null,
25307
+ access: "create"
25308
+ },
25309
+ "recording.renderGif": {
25310
+ capName: "recording",
25311
+ capScope: "system",
25312
+ addonId: null,
25313
+ access: "create"
25314
+ },
24946
25315
  "recording.rescanStorage": {
24947
25316
  capName: "recording",
24948
25317
  capScope: "system",
@@ -25537,6 +25906,12 @@ Object.freeze({
25537
25906
  addonId: null,
25538
25907
  access: "create"
25539
25908
  },
25909
+ "streamBroker.renderPreBufferClip": {
25910
+ capName: "stream-broker",
25911
+ capScope: "system",
25912
+ addonId: null,
25913
+ access: "create"
25914
+ },
25540
25915
  "streamBroker.restartProfile": {
25541
25916
  capName: "stream-broker",
25542
25917
  capScope: "system",