@camstack/addon-tailscale 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()
@@ -16694,6 +16875,36 @@ var TargetKindSchema = object({
16694
16875
  icon: string(),
16695
16876
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16696
16877
  addonId: string(),
16878
+ /**
16879
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16880
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16881
+ * when the addon bundles no icon for that kind — the client then falls back
16882
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16883
+ *
16884
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16885
+ * client, and a native client joins it onto its own hub base.
16886
+ *
16887
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16888
+ * field that survived only because the runtime cap-router forwards provider
16889
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16890
+ * its own Zod parse from stripping it, and the whole arrangement would have
16891
+ * broken silently the moment output validation was tightened anywhere.
16892
+ */
16893
+ iconUrl: string().optional(),
16894
+ /**
16895
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16896
+ *
16897
+ * The server knows this and therefore says it, because the client cannot
16898
+ * safely guess: a React-Native client renders SVG and raster through two
16899
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16900
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16901
+ * placeholder glyph for every vector icon while the web build looked fine.
16902
+ *
16903
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16904
+ * not been updated — a client that cannot determine the type should prefer
16905
+ * its raster path, which is the safe default for an unknown image.
16906
+ */
16907
+ iconMediaType: string().optional(),
16697
16908
  configSchema: ConfigSchemaPassthrough,
16698
16909
  supportsDiscovery: boolean(),
16699
16910
  caps: TargetKindCapsSchema
@@ -17141,6 +17352,29 @@ var MotionEventSchema = object({
17141
17352
  * Absent on legacy rows ⇒ treat as `pipeline`.
17142
17353
  */
17143
17354
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17355
+ /**
17356
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17357
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17358
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17359
+ * appearance event carry none, so a rule asking for a direction fails closed
17360
+ * on them.
17361
+ *
17362
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17363
+ * into its own event, so a frame in which a track enters A while leaving B
17364
+ * produces two events with two directions — never one ambiguous row.
17365
+ *
17366
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17367
+ * membership the box has NOW, and by definition it no longer contains the zone
17368
+ * that was just left. Without the id here, a zone-scoped rule could never match
17369
+ * the exit it asked for.
17370
+ */
17371
+ var ZoneCrossingSchema = object({
17372
+ direction: _enum(["enter", "exit"]),
17373
+ /** Admin zone id crossed. */
17374
+ zoneId: string(),
17375
+ /** Zone display name at crossing time (falls back to the id). */
17376
+ zoneName: string().optional()
17377
+ });
17144
17378
  var ObjectEventSchema = object({
17145
17379
  ...BaseEventFields,
17146
17380
  kind: literal("object"),
@@ -17167,6 +17401,12 @@ var ObjectEventSchema = object({
17167
17401
  zones: array(string()).readonly().optional(),
17168
17402
  /** Omitted in slim projection. */
17169
17403
  state: TrackStateSchema.optional(),
17404
+ /**
17405
+ * The zone crossing this event IS, when it is one. Absent on every other
17406
+ * event kind (movement state, appearance, package) — see
17407
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17408
+ */
17409
+ zoneCrossing: ZoneCrossingSchema.optional(),
17170
17410
  /** Detection-frame dimensions in pixels — let consumers normalize the
17171
17411
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17172
17412
  frameWidth: number().optional(),
@@ -17425,6 +17665,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17425
17665
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17426
17666
  kind: "mutation",
17427
17667
  auth: "admin"
17668
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17669
+ kind: "mutation",
17670
+ auth: "admin"
17671
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17672
+ kind: "query",
17673
+ auth: "admin"
17674
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17675
+ kind: "mutation",
17676
+ auth: "admin"
17428
17677
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17429
17678
  kind: "query",
17430
17679
  auth: "admin"
@@ -19904,6 +20153,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
19904
20153
  */
19905
20154
  priority: number()
19906
20155
  })).readonly() });
20156
+ /**
20157
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20158
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20159
+ * what AUTO currently picks, so the UI can show the effective value either way.
20160
+ */
20161
+ var NotificationEndpointSchema = object({
20162
+ /** The operator's explicit choice, or null for AUTO. */
20163
+ baseUrl: string().nullable(),
20164
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20165
+ resolved: string().nullable()
20166
+ });
19907
20167
  var AllowedAddressesSchema = object({
19908
20168
  /**
19909
20169
  * Allowlist of interface addresses operators have explicitly opted
@@ -19926,7 +20186,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
19926
20186
  * to avoid mixed-content blocks in the browser. The public
19927
20187
  * tunnel always emits `https://` regardless. */
19928
20188
  scheme: _enum(["http", "https"]).optional()
19929
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20189
+ }), 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" });
19930
20190
  /**
19931
20191
  * mesh-network — collection cap for mesh-VPN providers.
19932
20192
  *
@@ -20786,7 +21046,12 @@ var RecordingDeviceUsageSchema = object({
20786
21046
  var RecordingLocationUsageSchema = object({
20787
21047
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20788
21048
  locationId: string().nullable(),
20789
- /** Bytes of recordings stored on this location. */
21049
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21050
+ * is emitted per physical disk (2026-07-29): two locations on one root
21051
+ * previously rendered as two identical "disks" with a nonsensical used
21052
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21053
+ locationIds: array(string()).optional(),
21054
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20790
21055
  usedBytes: number(),
20791
21056
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20792
21057
  availableBytes: number().nullable(),
@@ -20898,6 +21163,44 @@ method(object({
20898
21163
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20899
21164
  kind: "query",
20900
21165
  auth: "admin"
21166
+ }), method(object({
21167
+ deviceId: number(),
21168
+ aroundMs: number(),
21169
+ preRollSec: number().min(0).max(30).default(2),
21170
+ postRollSec: number().min(0).max(30).default(5),
21171
+ maxWidth: number().int().min(120).max(1280).default(480),
21172
+ fps: number().int().min(1).max(15).default(5)
21173
+ }), object({
21174
+ gifBase64: string(),
21175
+ fromMs: number(),
21176
+ toMs: number()
21177
+ }), {
21178
+ kind: "mutation",
21179
+ auth: "admin"
21180
+ }), method(object({
21181
+ deviceId: number(),
21182
+ aroundMs: number(),
21183
+ preRollSec: number().min(0).max(30).default(3),
21184
+ postRollSec: number().min(0).max(30).default(7),
21185
+ maxWidth: number().int().min(160).max(1920).default(640)
21186
+ }), object({
21187
+ clipBase64: string(),
21188
+ mime: string(),
21189
+ fromMs: number(),
21190
+ toMs: number(),
21191
+ bytes: number().int()
21192
+ }), {
21193
+ kind: "mutation",
21194
+ auth: "admin"
21195
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21196
+ kind: "mutation",
21197
+ auth: "admin"
21198
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21199
+ kind: "query",
21200
+ auth: "admin"
21201
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21202
+ kind: "mutation",
21203
+ auth: "admin"
20901
21204
  });
20902
21205
  /**
20903
21206
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22489,6 +22792,12 @@ Object.freeze({
22489
22792
  addonId: null,
22490
22793
  access: "view"
22491
22794
  },
22795
+ "deviceManager.getDeviceStatusAggregateBatch": {
22796
+ capName: "device-manager",
22797
+ capScope: "system",
22798
+ addonId: null,
22799
+ access: "view"
22800
+ },
22492
22801
  "deviceManager.getLinkedDevices": {
22493
22802
  capName: "device-manager",
22494
22803
  capScope: "system",
@@ -23383,6 +23692,12 @@ Object.freeze({
23383
23692
  addonId: null,
23384
23693
  access: "view"
23385
23694
  },
23695
+ "localNetwork.getNotificationEndpoint": {
23696
+ capName: "local-network",
23697
+ capScope: "system",
23698
+ addonId: null,
23699
+ access: "view"
23700
+ },
23386
23701
  "localNetwork.getPreferred": {
23387
23702
  capName: "local-network",
23388
23703
  capScope: "system",
@@ -23407,6 +23722,12 @@ Object.freeze({
23407
23722
  addonId: null,
23408
23723
  access: "create"
23409
23724
  },
23725
+ "localNetwork.setNotificationEndpoint": {
23726
+ capName: "local-network",
23727
+ capScope: "system",
23728
+ addonId: null,
23729
+ access: "create"
23730
+ },
23410
23731
  "lockControl.lock": {
23411
23732
  capName: "lock-control",
23412
23733
  capScope: "device",
@@ -24049,6 +24370,12 @@ Object.freeze({
24049
24370
  addonId: null,
24050
24371
  access: "create"
24051
24372
  },
24373
+ "pipelineAnalytics.cancelMediaRelocate": {
24374
+ capName: "pipeline-analytics",
24375
+ capScope: "device",
24376
+ addonId: null,
24377
+ access: "create"
24378
+ },
24052
24379
  "pipelineAnalytics.clearTracks": {
24053
24380
  capName: "pipeline-analytics",
24054
24381
  capScope: "device",
@@ -24103,6 +24430,12 @@ Object.freeze({
24103
24430
  addonId: null,
24104
24431
  access: "view"
24105
24432
  },
24433
+ "pipelineAnalytics.getMediaRelocateStatus": {
24434
+ capName: "pipeline-analytics",
24435
+ capScope: "device",
24436
+ addonId: null,
24437
+ access: "view"
24438
+ },
24106
24439
  "pipelineAnalytics.getMotionEvents": {
24107
24440
  capName: "pipeline-analytics",
24108
24441
  capScope: "device",
@@ -24175,6 +24508,12 @@ Object.freeze({
24175
24508
  addonId: null,
24176
24509
  access: "create"
24177
24510
  },
24511
+ "pipelineAnalytics.relocateMedia": {
24512
+ capName: "pipeline-analytics",
24513
+ capScope: "device",
24514
+ addonId: null,
24515
+ access: "create"
24516
+ },
24178
24517
  "pipelineAnalytics.searchObjectEvents": {
24179
24518
  capName: "pipeline-analytics",
24180
24519
  capScope: "device",
@@ -24937,6 +25276,12 @@ Object.freeze({
24937
25276
  addonId: null,
24938
25277
  access: "create"
24939
25278
  },
25279
+ "recording.cancelRelocate": {
25280
+ capName: "recording",
25281
+ capScope: "system",
25282
+ addonId: null,
25283
+ access: "create"
25284
+ },
24940
25285
  "recording.deleteFootprint": {
24941
25286
  capName: "recording",
24942
25287
  capScope: "system",
@@ -24967,6 +25312,12 @@ Object.freeze({
24967
25312
  addonId: null,
24968
25313
  access: "view"
24969
25314
  },
25315
+ "recording.getRelocateStatus": {
25316
+ capName: "recording",
25317
+ capScope: "system",
25318
+ addonId: null,
25319
+ access: "view"
25320
+ },
24970
25321
  "recording.getStorageUsage": {
24971
25322
  capName: "recording",
24972
25323
  capScope: "system",
@@ -24997,6 +25348,24 @@ Object.freeze({
24997
25348
  addonId: null,
24998
25349
  access: "view"
24999
25350
  },
25351
+ "recording.relocateFootage": {
25352
+ capName: "recording",
25353
+ capScope: "system",
25354
+ addonId: null,
25355
+ access: "create"
25356
+ },
25357
+ "recording.renderClip": {
25358
+ capName: "recording",
25359
+ capScope: "system",
25360
+ addonId: null,
25361
+ access: "create"
25362
+ },
25363
+ "recording.renderGif": {
25364
+ capName: "recording",
25365
+ capScope: "system",
25366
+ addonId: null,
25367
+ access: "create"
25368
+ },
25000
25369
  "recording.rescanStorage": {
25001
25370
  capName: "recording",
25002
25371
  capScope: "system",
@@ -25591,6 +25960,12 @@ Object.freeze({
25591
25960
  addonId: null,
25592
25961
  access: "create"
25593
25962
  },
25963
+ "streamBroker.renderPreBufferClip": {
25964
+ capName: "stream-broker",
25965
+ capScope: "system",
25966
+ addonId: null,
25967
+ access: "create"
25968
+ },
25594
25969
  "streamBroker.restartProfile": {
25595
25970
  capName: "stream-broker",
25596
25971
  capScope: "system",