@camstack/addon-auth 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,
@@ -7311,35 +7324,22 @@ function buildCapturingReply(envelope) {
7311
7324
  */
7312
7325
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7313
7326
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7314
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7315
- kind: literal("timeOfDay"),
7316
- start: string().regex(HHMM),
7317
- end: string().regex(HHMM),
7318
- /** Restrict to these weekdays; omit = every day. */
7319
- days: array(RecordingWeekdaySchema).optional()
7320
- })]);
7321
- var RecordingModeSchema = _enum([
7322
- "continuous",
7323
- "onMotion",
7324
- "onAudioThreshold"
7325
- ]);
7326
7327
  /**
7327
- * First-class, authoritative per-camera storage mode — the explicit choice the
7328
- * UI reads directly (never inferred from `rules`):
7329
- * - `off` — not recording.
7330
- * - `events` — record only around triggers (motion / audio threshold),
7331
- * with pre/post-buffer.
7332
- * - `continuous` — record 24/7 within the schedule.
7328
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7329
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7330
+ * - `off` — no band covers the camera (or it is disabled).
7331
+ * - `events` — every band records around triggers only.
7332
+ * - `continuous` — at least one band records continuously.
7333
7333
  *
7334
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7335
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7334
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7335
+ * every save (`activeModeForConfig`). Writing it has no effect.
7336
7336
  */
7337
7337
  var RecordingStorageModeSchema = _enum([
7338
7338
  "off",
7339
7339
  "events",
7340
7340
  "continuous"
7341
7341
  ]);
7342
- /** Which detectors trigger an `events`-mode recording. */
7342
+ /** Which detectors trigger an `events`-mode band. */
7343
7343
  var RecordingTriggersSchema = object({
7344
7344
  motion: boolean().optional(),
7345
7345
  audioThresholdDbfs: number().optional()
@@ -7375,18 +7375,6 @@ var RecordingBandSchema = object({
7375
7375
  preBufferSec: number().min(0).optional(),
7376
7376
  postBufferSec: number().min(0).optional()
7377
7377
  });
7378
- var RecordingRuleSchema = object({
7379
- schedule: RecordingScheduleSchema,
7380
- mode: RecordingModeSchema,
7381
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7382
- preBufferSec: number().min(0).default(0),
7383
- /** Keep recording until this many seconds after the last trigger. */
7384
- postBufferSec: number().min(0).default(0),
7385
- /** Each new trigger restarts the post-buffer window. */
7386
- resetTimeoutOnNewEvent: boolean().default(true),
7387
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7388
- thresholdDbfs: number().optional()
7389
- });
7390
7378
  /**
7391
7379
  * Per-device retention overrides. Every field is optional; an unset or `0`
7392
7380
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7420,40 +7408,28 @@ var ScrubThumbnailPresetSchema = _enum([
7420
7408
  /**
7421
7409
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7422
7410
  *
7423
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7424
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7425
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7426
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7411
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7412
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7413
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7414
+ *
7415
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7416
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7417
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7418
+ * persist a band-less config, i.e. silently stop recording the camera.
7427
7419
  */
7428
7420
  var RecordingConfigSchema = object({
7429
7421
  enabled: boolean(),
7430
- /** Authoritative storage mode. Absent on legacy targets derived once via
7431
- * `migrateRulesToMode`, then persisted. */
7422
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7423
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7432
7424
  mode: RecordingStorageModeSchema.optional(),
7433
7425
  profiles: array(CamProfileSchema).optional(),
7434
7426
  segmentSeconds: number().int().positive().optional(),
7435
- /** Shared recording time-bands for `events` & `continuous` — record only when
7436
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7437
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7438
- schedules: array(RecordingScheduleSchema).optional(),
7439
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7440
- * normalized into `schedules` on read and never written going forward. (Not
7441
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7442
- schedule: RecordingScheduleSchema.optional(),
7443
- /** `events`-mode only — which detectors trigger a recording. */
7444
- triggers: RecordingTriggersSchema.optional(),
7445
- /** `events`-mode only — seconds retained before / after a trigger. */
7446
- preBufferSec: number().min(0).optional(),
7447
- postBufferSec: number().min(0).optional(),
7448
- /** DEPRECATED authoring input; retained for migration/transition. */
7449
- rules: array(RecordingRuleSchema).optional(),
7450
7427
  /**
7451
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7452
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7453
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7454
- * derived into bands once via `migrateConfigToBands`.
7428
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7429
+ * the recorder's band engine consumes. An empty array = record nothing;
7430
+ * "off" is the absence of a covering band, never a band value.
7455
7431
  */
7456
- bands: array(RecordingBandSchema).optional(),
7432
+ bands: array(RecordingBandSchema).default([]),
7457
7433
  retention: RecordingRetentionSchema.optional(),
7458
7434
  /**
7459
7435
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7461,8 +7437,15 @@ var RecordingConfigSchema = object({
7461
7437
  * windows only — existing sheets are immutable, and each window's index
7462
7438
  * carries its own tile dims so mixed-preset history renders correctly.
7463
7439
  */
7464
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7465
- });
7440
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7441
+ /**
7442
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7443
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7444
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7445
+ * are written and scrub reads exact keyframes at every velocity.
7446
+ */
7447
+ stripsEnabled: boolean().optional()
7448
+ }).strict();
7466
7449
  /**
7467
7450
  * Ops-log — the durable, append-only operations audit shared by the
7468
7451
  * recordings and events management surfaces.
@@ -7481,7 +7464,8 @@ var OpsLogOpSchema = _enum([
7481
7464
  "prune",
7482
7465
  "manual-delete",
7483
7466
  "rescan",
7484
- "retention-run"
7467
+ "retention-run",
7468
+ "relocate"
7485
7469
  ]);
7486
7470
  /** Why the operation ran. */
7487
7471
  var OpsLogReasonSchema = _enum([
@@ -7520,6 +7504,55 @@ var OpsLogQueryInputSchema = object({
7520
7504
  limit: number().int().min(1).max(1e3).optional()
7521
7505
  });
7522
7506
  /**
7507
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7508
+ *
7509
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7510
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7511
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7512
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7513
+ * after verify) and each completed/failed run also lands one durable ops-log
7514
+ * row on the owning addon's surface.
7515
+ */
7516
+ var RelocateJobStateSchema = _enum([
7517
+ "running",
7518
+ "done",
7519
+ "failed",
7520
+ "cancelled"
7521
+ ]);
7522
+ var RelocateJobSchema = object({
7523
+ jobId: string(),
7524
+ state: RelocateJobStateSchema,
7525
+ /** Source location — for media relocation this is informational ('*': rows
7526
+ * move from wherever they are to the target). */
7527
+ fromLocationId: string(),
7528
+ toLocationId: string(),
7529
+ /** Scoped device, or null = every device. */
7530
+ deviceId: number().nullable(),
7531
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7532
+ entities: array(string()),
7533
+ filesMoved: number().int(),
7534
+ bytesMoved: number().int(),
7535
+ /** Total files discovered up front; null while (or when) unknown. */
7536
+ filesTotal: number().int().nullable(),
7537
+ startedAt: number(),
7538
+ finishedAt: number().nullable(),
7539
+ error: string().nullable()
7540
+ });
7541
+ var RelocateFootageInputSchema = object({
7542
+ deviceId: number().optional(),
7543
+ fromLocationId: string(),
7544
+ toLocationId: string(),
7545
+ entities: array(_enum(["segments", "strips"])).optional(),
7546
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7547
+ * never allowed to starve live writers. */
7548
+ throttleMbps: number().min(1).max(1e3).optional()
7549
+ });
7550
+ var RelocateMediaInputSchema = object({
7551
+ deviceId: number().optional(),
7552
+ toLocationId: string(),
7553
+ throttleMbps: number().min(1).max(1e3).optional()
7554
+ });
7555
+ /**
7523
7556
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7524
7557
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7525
7558
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7569,6 +7602,13 @@ var StorageLocationSchema = object({
7569
7602
  nodeId: string().optional(),
7570
7603
  isDefault: boolean().default(false),
7571
7604
  isSystem: boolean().default(false),
7605
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7606
+ * for node-local locations it can reach) — never persisted, absent when the
7607
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7608
+ capacity: object({
7609
+ totalBytes: number(),
7610
+ availableBytes: number()
7611
+ }).nullable().optional(),
7572
7612
  createdAt: number(),
7573
7613
  updatedAt: number()
7574
7614
  });
@@ -8336,7 +8376,8 @@ var NcTaxonomyEntrySchema = object({
8336
8376
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8337
8377
  parentKind: string().nullable()
8338
8378
  });
8339
- object({
8379
+ /** The complete NC picker taxonomy — three grouped buckets. */
8380
+ var NcTaxonomySchema = object({
8340
8381
  videoClasses: array(NcTaxonomyEntrySchema),
8341
8382
  audioKinds: array(NcTaxonomyEntrySchema),
8342
8383
  labels: array(NcTaxonomyEntrySchema)
@@ -8996,6 +9037,7 @@ var AccessoryKind = {
8996
9037
  };
8997
9038
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8998
9039
  DeviceFeature.BatteryOperated;
9040
+ new Set(["devices", "classes"]);
8999
9041
  /**
9000
9042
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9001
9043
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9154,6 +9196,29 @@ var NcOccupancyConditionSchema = object({
9154
9196
  count: number().int().min(0).default(1),
9155
9197
  sustainSeconds: number().int().min(0).max(3600).default(15)
9156
9198
  });
9199
+ /**
9200
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9201
+ *
9202
+ * The values are not symmetric, and deliberately so — the absent value has to
9203
+ * mean exactly what every rule authored before this condition existed already
9204
+ * does:
9205
+ * - `enter` — entries and every NON-crossing record (movement state,
9206
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9207
+ * an operator who never asked for exits must not start receiving them.
9208
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9209
+ * fails closed, because "the car left the drive" is a question about a
9210
+ * boundary, not about a detection.
9211
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9212
+ *
9213
+ * A rule asking for a direction should normally also scope `zones`, which the
9214
+ * engine evaluates against the crossed zone as well as the current membership
9215
+ * (an exit's membership no longer contains the zone it just left).
9216
+ */
9217
+ var NcCrossingSchema = _enum([
9218
+ "enter",
9219
+ "exit",
9220
+ "any"
9221
+ ]);
9157
9222
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9158
9223
  var NcZoneConditionSchema = object({
9159
9224
  ids: array(string().min(1)).min(1),
@@ -9178,6 +9243,13 @@ var NcConditionsSchema = object({
9178
9243
  /** Veto zones — any hit fails the rule. */
9179
9244
  zonesExclude: array(string().min(1)).optional(),
9180
9245
  /**
9246
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9247
+ * and a closed track carries none, so a `track-end` rule asking for one
9248
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9249
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9250
+ */
9251
+ crossing: NcCrossingSchema.optional(),
9252
+ /**
9181
9253
  * Exact (case-insensitive) match on the record's collapsed `label`
9182
9254
  * (identity name / plate text / subclass).
9183
9255
  */
@@ -9312,17 +9384,85 @@ var NcRuleTargetSchema = object({
9312
9384
  * - `keyFrame` — the clean scene frame (no subject box).
9313
9385
  * - `none` — no attachment.
9314
9386
  */
9315
- var NcMediaPolicySchema = object({ attach: _enum([
9316
- "best",
9317
- "best-matching",
9318
- "keyFrame",
9319
- "none"
9320
- ]).default("best") });
9387
+ /**
9388
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9389
+ * conflate it with the selection strategy and betray the request: asking for
9390
+ * the clean scene frame on an object-event owner used to start at
9391
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9392
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9393
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9394
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9395
+ * the pipeline actually saw.
9396
+ */
9397
+ var NcMediaFrameSchema = _enum([
9398
+ "cropped",
9399
+ "full",
9400
+ "boxed"
9401
+ ]);
9402
+ var NcMediaPolicySchema = object({
9403
+ attach: _enum([
9404
+ "best",
9405
+ "best-matching",
9406
+ "keyFrame",
9407
+ "none"
9408
+ ]).default("best"),
9409
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9410
+ frame: NcMediaFrameSchema.optional(),
9411
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9412
+ * "show me the ZONE", not the whole scene or the subject crop. */
9413
+ zoneCrop: boolean().optional(),
9414
+ /**
9415
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9416
+ * event — NOT from the recording, so the camera does not have to be
9417
+ * recording, and the window sits AROUND the moment instead of a segment
9418
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9419
+ * gif, never a failed notification.
9420
+ */
9421
+ gif: boolean().optional(),
9422
+ /**
9423
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9424
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9425
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9426
+ * the degrade engine, which drops the video and keeps the still.
9427
+ */
9428
+ clip: boolean().optional(),
9429
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9430
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9431
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9432
+ /**
9433
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9434
+ * assigned profile: a notification is watched on a phone, so the 4K
9435
+ * rendition would burn CPU to produce a file the client downscales anyway.
9436
+ * A profile that is not assigned falls back to the cheapest, and the render
9437
+ * reports which one actually ran.
9438
+ */
9439
+ profile: CamProfileSchema.optional()
9440
+ });
9441
+ /**
9442
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9443
+ * notification suppresses.
9444
+ * - `shared` (default, and the absent value) — one window for the whole
9445
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9446
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9447
+ * at once and cat→cat still waits.
9448
+ *
9449
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9450
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9451
+ * see `cooldownKey` in the rule engine).
9452
+ */
9453
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9321
9454
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9322
9455
  var NcThrottleSchema = object({
9323
9456
  cooldownSec: number().int().min(0).max(86400).default(60),
9324
9457
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9325
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9458
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9459
+ /**
9460
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9461
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9462
+ * rule authored before this field simply carries none — and the engine
9463
+ * reads absent as `shared`, the pre-existing behaviour.
9464
+ */
9465
+ granularity: NcThrottleGranularitySchema.optional()
9326
9466
  });
9327
9467
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9328
9468
  var NcRuleInputSchema = object({
@@ -9331,7 +9471,19 @@ var NcRuleInputSchema = object({
9331
9471
  delivery: NcDeliverySchema,
9332
9472
  conditions: NcConditionsSchema.default({}),
9333
9473
  schedule: NcScheduleSchema.optional(),
9334
- targets: array(NcRuleTargetSchema).min(1),
9474
+ /** May be empty when `targetUsers` addresses at least one user — the
9475
+ * "at least one addressee" invariant is enforced by the provider, because
9476
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9477
+ targets: array(NcRuleTargetSchema),
9478
+ /**
9479
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9480
+ * time each user fans out to the personal targets they own
9481
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9482
+ * firing camera — a user is never notified about a device they cannot open.
9483
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9484
+ * targets.
9485
+ */
9486
+ targetUsers: array(string()).optional(),
9335
9487
  media: NcMediaPolicySchema.default({ attach: "best" }),
9336
9488
  throttle: NcThrottleSchema.default({
9337
9489
  cooldownSec: 60,
@@ -9418,6 +9570,7 @@ var NcConditionDescriptorSchema = object({
9418
9570
  "schedule",
9419
9571
  "plateMatcher",
9420
9572
  "packagePhase",
9573
+ "crossingSelect",
9421
9574
  "polygonDraw",
9422
9575
  "occupancy"
9423
9576
  ]),
@@ -9544,7 +9697,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9544
9697
  }), object({ results: array(NcTestResultSchema) }), {
9545
9698
  kind: "mutation",
9546
9699
  auth: "admin"
9547
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9700
+ }), method(object({}), object({
9701
+ catalog: array(NcConditionDescriptorSchema),
9702
+ taxonomy: NcTaxonomySchema.optional()
9703
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9548
9704
  /**
9549
9705
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9550
9706
  *
@@ -10281,6 +10437,28 @@ method(object({
10281
10437
  }), object({ success: literal(true) }), {
10282
10438
  kind: "mutation",
10283
10439
  auth: "admin"
10440
+ }), method(object({
10441
+ deviceId: number(),
10442
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10443
+ * watched on a phone, and the cheap rendition is the right default. */
10444
+ profile: CamProfileSchema.optional(),
10445
+ aroundMs: number(),
10446
+ preRollSec: number().min(0).max(20).default(3),
10447
+ postRollSec: number().min(0).max(20).default(5),
10448
+ format: _enum(["gif", "mp4"]).default("gif"),
10449
+ maxWidth: number().int().min(120).max(1920).default(480),
10450
+ /** GIF only — MP4 keeps the source cadence. */
10451
+ fps: number().int().min(1).max(15).default(5)
10452
+ }), object({
10453
+ base64: string(),
10454
+ mime: string(),
10455
+ bytes: number().int(),
10456
+ /** The profile actually rendered (what the default resolved to). */
10457
+ profile: CamProfileSchema,
10458
+ durationMs: number()
10459
+ }), {
10460
+ kind: "mutation",
10461
+ auth: "admin"
10284
10462
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10285
10463
  probed: boolean(),
10286
10464
  summary: string()
@@ -15913,7 +16091,10 @@ method(object({
15913
16091
  }), method(object({
15914
16092
  deviceId: number(),
15915
16093
  caps: array(string()).readonly().optional()
15916
- }), record(string(), unknown().nullable()));
16094
+ }), record(string(), unknown().nullable())), method(object({
16095
+ deviceIds: array(number()).readonly(),
16096
+ caps: array(string()).readonly().optional()
16097
+ }), record(string(), record(string(), unknown().nullable())));
15917
16098
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15918
16099
  deviceId: number(),
15919
16100
  capName: string()
@@ -16852,6 +17033,36 @@ var TargetKindSchema = object({
16852
17033
  icon: string(),
16853
17034
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16854
17035
  addonId: string(),
17036
+ /**
17037
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
17038
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
17039
+ * when the addon bundles no icon for that kind — the client then falls back
17040
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
17041
+ *
17042
+ * Root-relative on purpose: it resolves against whatever origin serves a web
17043
+ * client, and a native client joins it onto its own hub base.
17044
+ *
17045
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
17046
+ * field that survived only because the runtime cap-router forwards provider
17047
+ * output verbatim — so every consumer had to re-declare it by hand to stop
17048
+ * its own Zod parse from stripping it, and the whole arrangement would have
17049
+ * broken silently the moment output validation was tightened anywhere.
17050
+ */
17051
+ iconUrl: string().optional(),
17052
+ /**
17053
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
17054
+ *
17055
+ * The server knows this and therefore says it, because the client cannot
17056
+ * safely guess: a React-Native client renders SVG and raster through two
17057
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
17058
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
17059
+ * placeholder glyph for every vector icon while the web build looked fine.
17060
+ *
17061
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
17062
+ * not been updated — a client that cannot determine the type should prefer
17063
+ * its raster path, which is the safe default for an unknown image.
17064
+ */
17065
+ iconMediaType: string().optional(),
16855
17066
  configSchema: ConfigSchemaPassthrough,
16856
17067
  supportsDiscovery: boolean(),
16857
17068
  caps: TargetKindCapsSchema
@@ -17299,6 +17510,29 @@ var MotionEventSchema = object({
17299
17510
  * Absent on legacy rows ⇒ treat as `pipeline`.
17300
17511
  */
17301
17512
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17513
+ /**
17514
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17515
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17516
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17517
+ * appearance event carry none, so a rule asking for a direction fails closed
17518
+ * on them.
17519
+ *
17520
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17521
+ * into its own event, so a frame in which a track enters A while leaving B
17522
+ * produces two events with two directions — never one ambiguous row.
17523
+ *
17524
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17525
+ * membership the box has NOW, and by definition it no longer contains the zone
17526
+ * that was just left. Without the id here, a zone-scoped rule could never match
17527
+ * the exit it asked for.
17528
+ */
17529
+ var ZoneCrossingSchema = object({
17530
+ direction: _enum(["enter", "exit"]),
17531
+ /** Admin zone id crossed. */
17532
+ zoneId: string(),
17533
+ /** Zone display name at crossing time (falls back to the id). */
17534
+ zoneName: string().optional()
17535
+ });
17302
17536
  var ObjectEventSchema = object({
17303
17537
  ...BaseEventFields,
17304
17538
  kind: literal("object"),
@@ -17325,6 +17559,12 @@ var ObjectEventSchema = object({
17325
17559
  zones: array(string()).readonly().optional(),
17326
17560
  /** Omitted in slim projection. */
17327
17561
  state: TrackStateSchema.optional(),
17562
+ /**
17563
+ * The zone crossing this event IS, when it is one. Absent on every other
17564
+ * event kind (movement state, appearance, package) — see
17565
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17566
+ */
17567
+ zoneCrossing: ZoneCrossingSchema.optional(),
17328
17568
  /** Detection-frame dimensions in pixels — let consumers normalize the
17329
17569
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17330
17570
  frameWidth: number().optional(),
@@ -17583,6 +17823,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17583
17823
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17584
17824
  kind: "mutation",
17585
17825
  auth: "admin"
17826
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17827
+ kind: "mutation",
17828
+ auth: "admin"
17829
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17830
+ kind: "query",
17831
+ auth: "admin"
17832
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17833
+ kind: "mutation",
17834
+ auth: "admin"
17586
17835
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17587
17836
  kind: "query",
17588
17837
  auth: "admin"
@@ -20079,6 +20328,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
20079
20328
  */
20080
20329
  priority: number()
20081
20330
  })).readonly() });
20331
+ /**
20332
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20333
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20334
+ * what AUTO currently picks, so the UI can show the effective value either way.
20335
+ */
20336
+ var NotificationEndpointSchema = object({
20337
+ /** The operator's explicit choice, or null for AUTO. */
20338
+ baseUrl: string().nullable(),
20339
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20340
+ resolved: string().nullable()
20341
+ });
20082
20342
  var AllowedAddressesSchema = object({
20083
20343
  /**
20084
20344
  * Allowlist of interface addresses operators have explicitly opted
@@ -20101,7 +20361,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20101
20361
  * to avoid mixed-content blocks in the browser. The public
20102
20362
  * tunnel always emits `https://` regardless. */
20103
20363
  scheme: _enum(["http", "https"]).optional()
20104
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20364
+ }), 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" });
20105
20365
  /**
20106
20366
  * mesh-network — collection cap for mesh-VPN providers.
20107
20367
  *
@@ -20900,7 +21160,12 @@ var RecordingDeviceUsageSchema = object({
20900
21160
  var RecordingLocationUsageSchema = object({
20901
21161
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20902
21162
  locationId: string().nullable(),
20903
- /** Bytes of recordings stored on this location. */
21163
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21164
+ * is emitted per physical disk (2026-07-29): two locations on one root
21165
+ * previously rendered as two identical "disks" with a nonsensical used
21166
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21167
+ locationIds: array(string()).optional(),
21168
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20904
21169
  usedBytes: number(),
20905
21170
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20906
21171
  availableBytes: number().nullable(),
@@ -21012,6 +21277,44 @@ method(object({
21012
21277
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
21013
21278
  kind: "query",
21014
21279
  auth: "admin"
21280
+ }), method(object({
21281
+ deviceId: number(),
21282
+ aroundMs: number(),
21283
+ preRollSec: number().min(0).max(30).default(2),
21284
+ postRollSec: number().min(0).max(30).default(5),
21285
+ maxWidth: number().int().min(120).max(1280).default(480),
21286
+ fps: number().int().min(1).max(15).default(5)
21287
+ }), object({
21288
+ gifBase64: string(),
21289
+ fromMs: number(),
21290
+ toMs: number()
21291
+ }), {
21292
+ kind: "mutation",
21293
+ auth: "admin"
21294
+ }), method(object({
21295
+ deviceId: number(),
21296
+ aroundMs: number(),
21297
+ preRollSec: number().min(0).max(30).default(3),
21298
+ postRollSec: number().min(0).max(30).default(7),
21299
+ maxWidth: number().int().min(160).max(1920).default(640)
21300
+ }), object({
21301
+ clipBase64: string(),
21302
+ mime: string(),
21303
+ fromMs: number(),
21304
+ toMs: number(),
21305
+ bytes: number().int()
21306
+ }), {
21307
+ kind: "mutation",
21308
+ auth: "admin"
21309
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21310
+ kind: "mutation",
21311
+ auth: "admin"
21312
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21313
+ kind: "query",
21314
+ auth: "admin"
21315
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21316
+ kind: "mutation",
21317
+ auth: "admin"
21015
21318
  });
21016
21319
  /**
21017
21320
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22603,6 +22906,12 @@ Object.freeze({
22603
22906
  addonId: null,
22604
22907
  access: "view"
22605
22908
  },
22909
+ "deviceManager.getDeviceStatusAggregateBatch": {
22910
+ capName: "device-manager",
22911
+ capScope: "system",
22912
+ addonId: null,
22913
+ access: "view"
22914
+ },
22606
22915
  "deviceManager.getLinkedDevices": {
22607
22916
  capName: "device-manager",
22608
22917
  capScope: "system",
@@ -23497,6 +23806,12 @@ Object.freeze({
23497
23806
  addonId: null,
23498
23807
  access: "view"
23499
23808
  },
23809
+ "localNetwork.getNotificationEndpoint": {
23810
+ capName: "local-network",
23811
+ capScope: "system",
23812
+ addonId: null,
23813
+ access: "view"
23814
+ },
23500
23815
  "localNetwork.getPreferred": {
23501
23816
  capName: "local-network",
23502
23817
  capScope: "system",
@@ -23521,6 +23836,12 @@ Object.freeze({
23521
23836
  addonId: null,
23522
23837
  access: "create"
23523
23838
  },
23839
+ "localNetwork.setNotificationEndpoint": {
23840
+ capName: "local-network",
23841
+ capScope: "system",
23842
+ addonId: null,
23843
+ access: "create"
23844
+ },
23524
23845
  "lockControl.lock": {
23525
23846
  capName: "lock-control",
23526
23847
  capScope: "device",
@@ -24163,6 +24484,12 @@ Object.freeze({
24163
24484
  addonId: null,
24164
24485
  access: "create"
24165
24486
  },
24487
+ "pipelineAnalytics.cancelMediaRelocate": {
24488
+ capName: "pipeline-analytics",
24489
+ capScope: "device",
24490
+ addonId: null,
24491
+ access: "create"
24492
+ },
24166
24493
  "pipelineAnalytics.clearTracks": {
24167
24494
  capName: "pipeline-analytics",
24168
24495
  capScope: "device",
@@ -24217,6 +24544,12 @@ Object.freeze({
24217
24544
  addonId: null,
24218
24545
  access: "view"
24219
24546
  },
24547
+ "pipelineAnalytics.getMediaRelocateStatus": {
24548
+ capName: "pipeline-analytics",
24549
+ capScope: "device",
24550
+ addonId: null,
24551
+ access: "view"
24552
+ },
24220
24553
  "pipelineAnalytics.getMotionEvents": {
24221
24554
  capName: "pipeline-analytics",
24222
24555
  capScope: "device",
@@ -24289,6 +24622,12 @@ Object.freeze({
24289
24622
  addonId: null,
24290
24623
  access: "create"
24291
24624
  },
24625
+ "pipelineAnalytics.relocateMedia": {
24626
+ capName: "pipeline-analytics",
24627
+ capScope: "device",
24628
+ addonId: null,
24629
+ access: "create"
24630
+ },
24292
24631
  "pipelineAnalytics.searchObjectEvents": {
24293
24632
  capName: "pipeline-analytics",
24294
24633
  capScope: "device",
@@ -25051,6 +25390,12 @@ Object.freeze({
25051
25390
  addonId: null,
25052
25391
  access: "create"
25053
25392
  },
25393
+ "recording.cancelRelocate": {
25394
+ capName: "recording",
25395
+ capScope: "system",
25396
+ addonId: null,
25397
+ access: "create"
25398
+ },
25054
25399
  "recording.deleteFootprint": {
25055
25400
  capName: "recording",
25056
25401
  capScope: "system",
@@ -25081,6 +25426,12 @@ Object.freeze({
25081
25426
  addonId: null,
25082
25427
  access: "view"
25083
25428
  },
25429
+ "recording.getRelocateStatus": {
25430
+ capName: "recording",
25431
+ capScope: "system",
25432
+ addonId: null,
25433
+ access: "view"
25434
+ },
25084
25435
  "recording.getStorageUsage": {
25085
25436
  capName: "recording",
25086
25437
  capScope: "system",
@@ -25111,6 +25462,24 @@ Object.freeze({
25111
25462
  addonId: null,
25112
25463
  access: "view"
25113
25464
  },
25465
+ "recording.relocateFootage": {
25466
+ capName: "recording",
25467
+ capScope: "system",
25468
+ addonId: null,
25469
+ access: "create"
25470
+ },
25471
+ "recording.renderClip": {
25472
+ capName: "recording",
25473
+ capScope: "system",
25474
+ addonId: null,
25475
+ access: "create"
25476
+ },
25477
+ "recording.renderGif": {
25478
+ capName: "recording",
25479
+ capScope: "system",
25480
+ addonId: null,
25481
+ access: "create"
25482
+ },
25114
25483
  "recording.rescanStorage": {
25115
25484
  capName: "recording",
25116
25485
  capScope: "system",
@@ -25705,6 +26074,12 @@ Object.freeze({
25705
26074
  addonId: null,
25706
26075
  access: "create"
25707
26076
  },
26077
+ "streamBroker.renderPreBufferClip": {
26078
+ capName: "stream-broker",
26079
+ capScope: "system",
26080
+ addonId: null,
26081
+ access: "create"
26082
+ },
25708
26083
  "streamBroker.restartProfile": {
25709
26084
  capName: "stream-broker",
25710
26085
  capScope: "system",