@camstack/addon-static-turn 1.2.6 → 1.2.7

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