@camstack/addon-provider-onvif 1.2.47 → 1.2.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +450 -75
  2. package/dist/addon.mjs +450 -75
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -8018,6 +8018,20 @@ var RelocateJobSchema = object({
8018
8018
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8019
8019
  */
8020
8020
  rowsReconciled: number().int().nonnegative().optional(),
8021
+ /**
8022
+ * Rows this run FORGOT because the file they name is not on disk.
8023
+ *
8024
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8025
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8026
+ * and the durable row is dropped through the same channel eviction uses. It
8027
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8028
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8029
+ * the same failure as one that quietly skips them (D295).
8030
+ *
8031
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8032
+ * ledger claimed 5.65 GB of footage that no longer existed.
8033
+ */
8034
+ rowsForgotten: number().int().nonnegative().optional(),
8021
8035
  startedAt: number(),
8022
8036
  finishedAt: number().nullable(),
8023
8037
  error: string().nullable()
@@ -8082,6 +8096,13 @@ var MediaRelocateModeSchema = _enum([
8082
8096
  ]);
8083
8097
  var RelocateMediaInputSchema = object({
8084
8098
  toLocationId: string(),
8099
+ /**
8100
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8101
+ * every row that is not already on `toLocationId` (the historical
8102
+ * behaviour). A named source is what a from→to migration needs: without it
8103
+ * "move events off disk 2" also emptied disk 1.
8104
+ */
8105
+ fromLocationId: string().optional(),
8085
8106
  throttleMbps: number().min(1).max(1e3).optional(),
8086
8107
  /** Omitted = `move`, the pre-existing behaviour. */
8087
8108
  mode: MediaRelocateModeSchema.optional()
@@ -8149,6 +8170,19 @@ var StorageMigrationDestinationsSchema = object({
8149
8170
  galleryMedia: string().min(1).optional()
8150
8171
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8151
8172
  /**
8173
+ * Optional named source per class. Omitted = the class's current default
8174
+ * (the historical behaviour). A named source that is NOT the default is a
8175
+ * drain of that disk: bytes move, the default stays, and the source is
8176
+ * disabled when the move finishes.
8177
+ */
8178
+ var StorageMigrationSourcesSchema = object({
8179
+ recordings: string().min(1).optional(),
8180
+ recordingsLow: string().min(1).optional(),
8181
+ eventMedia: string().min(1).optional(),
8182
+ backups: string().min(1).optional(),
8183
+ galleryMedia: string().min(1).optional()
8184
+ }).optional();
8185
+ /**
8152
8186
  * How a migration sequences the cutover against the byte move.
8153
8187
  *
8154
8188
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8170,6 +8204,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8170
8204
  /** Shared input for planning and starting an orchestrated storage migration. */
8171
8205
  var StorageMigrationInputSchema = object({
8172
8206
  destinations: StorageMigrationDestinationsSchema,
8207
+ /** Omitted = each class's current default. */
8208
+ sources: StorageMigrationSourcesSchema,
8173
8209
  throttleMbps: number().min(1).max(1e3).optional(),
8174
8210
  /** Omitted = `blocking`, which stays the default. */
8175
8211
  mode: StorageMigrationModeSchema.optional()
@@ -8249,6 +8285,13 @@ var StorageMigrationMoveSchema = object({
8249
8285
  storageClass: StorageMigrationClassSchema,
8250
8286
  fromLocationId: string(),
8251
8287
  toLocationId: string(),
8288
+ /**
8289
+ * True when `from` was NOT the class default at plan time. The move still
8290
+ * copies bytes, but the default is left alone and the source is disabled
8291
+ * once the copy verifies. Absent on jobs planned before this field existed
8292
+ * — those jobs always repointed, which is `false`.
8293
+ */
8294
+ freezeSource: boolean().optional(),
8252
8295
  moverJobId: string().nullable(),
8253
8296
  state: RelocateJobStateSchema.nullable(),
8254
8297
  error: string().nullable(),
@@ -8262,6 +8305,7 @@ var StorageMigrationJobSchema = object({
8262
8305
  * can tell a seconds-long cutover from a thirty-hour one. */
8263
8306
  mode: StorageMigrationModeSchema,
8264
8307
  destinations: StorageMigrationDestinationsSchema,
8308
+ sources: StorageMigrationSourcesSchema,
8265
8309
  throttleMbps: number(),
8266
8310
  moves: array(StorageMigrationMoveSchema),
8267
8311
  pauseLeaseId: string().nullable(),
@@ -8287,6 +8331,7 @@ var StorageMigrationFindingSchema = object({
8287
8331
  });
8288
8332
  var StorageMigrationPlanSchema = object({
8289
8333
  destinations: StorageMigrationDestinationsSchema,
8334
+ sources: StorageMigrationSourcesSchema,
8290
8335
  /** The mode this plan was built for. A plan is only valid for its mode: the
8291
8336
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8292
8337
  * it. */
@@ -8294,7 +8339,8 @@ var StorageMigrationPlanSchema = object({
8294
8339
  moves: array(object({
8295
8340
  storageClass: StorageMigrationClassSchema,
8296
8341
  fromLocationId: string(),
8297
- toLocationId: string()
8342
+ toLocationId: string(),
8343
+ freezeSource: boolean().optional()
8298
8344
  })),
8299
8345
  findings: array(StorageMigrationFindingSchema)
8300
8346
  });
@@ -8381,16 +8427,142 @@ var RelocateResidueSchema = object({
8381
8427
  segments: number().int().nonnegative(),
8382
8428
  bytes: number().int().nonnegative()
8383
8429
  }).nullable();
8430
+ /**
8431
+ * Ask one location whether its durable hour rows describe the disk — the walk
8432
+ * (D319).
8433
+ *
8434
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8435
+ * missing tool is the question, and the dry run is how they sanity-check the
8436
+ * destructive run before authorising it.
8437
+ */
8438
+ var LedgerWalkInputSchema = object({
8439
+ locationId: string().min(1),
8440
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8441
+ apply: boolean().optional(),
8442
+ /** Narrow to one camera. */
8443
+ deviceId: number().int().positive().optional(),
8444
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8445
+ profiles: array(string().min(1)).optional()
8446
+ });
8447
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8448
+ var LedgerWalkRefusalSchema = _enum([
8449
+ "location-unknown",
8450
+ "source-writable",
8451
+ "no-ledger",
8452
+ "archive-unreadable",
8453
+ "anchor-absent",
8454
+ "anchor-unreadable",
8455
+ "anchor-moved"
8456
+ ]);
8457
+ _enum([
8458
+ "live-tail",
8459
+ "listing-error",
8460
+ "path-mismatch",
8461
+ "durable-refused"
8462
+ ]);
8463
+ /** Every skip reason, always present, always a number — so a reason that never
8464
+ * fired reports as zero rather than absent and the report shape is constant
8465
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8466
+ var LedgerWalkSkipCountsSchema = object({
8467
+ "live-tail": number().int().nonnegative(),
8468
+ "listing-error": number().int().nonnegative(),
8469
+ "path-mismatch": number().int().nonnegative(),
8470
+ "durable-refused": number().int().nonnegative()
8471
+ });
8472
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8473
+ var LedgerWalkDeviceReportSchema = object({
8474
+ deviceId: number().int(),
8475
+ hoursWalked: number().int().nonnegative(),
8476
+ hoursMissing: number().int().nonnegative(),
8477
+ ghostSegments: number().int().nonnegative(),
8478
+ ghostBytes: number().int().nonnegative(),
8479
+ forgottenSegments: number().int().nonnegative(),
8480
+ orphanFiles: number().int().nonnegative()
8481
+ });
8482
+ /**
8483
+ * What one walk claimed, listed, found and (only when armed) forgot.
8484
+ *
8485
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8486
+ * walk that saw a fraction of the location is visible in its own report rather
8487
+ * than in the absence of one.
8488
+ */
8489
+ var LedgerWalkReportSchema = object({
8490
+ locationId: string(),
8491
+ applied: boolean(),
8492
+ refused: LedgerWalkRefusalSchema.nullable(),
8493
+ archiveSegments: number().int().nonnegative().nullable(),
8494
+ archiveBytes: number().int().nonnegative().nullable(),
8495
+ hoursClaimed: number().int().nonnegative(),
8496
+ hoursWalked: number().int().nonnegative(),
8497
+ hoursMissing: number().int().nonnegative(),
8498
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8499
+ listings: number().int().nonnegative(),
8500
+ segmentsClaimed: number().int().nonnegative(),
8501
+ ghostSegments: number().int().nonnegative(),
8502
+ ghostBytes: number().int().nonnegative(),
8503
+ ghostHoursWhole: number().int().nonnegative(),
8504
+ forgottenSegments: number().int().nonnegative(),
8505
+ forgottenBytes: number().int().nonnegative(),
8506
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8507
+ orphanFiles: number().int().nonnegative(),
8508
+ orphanSample: array(string()).readonly(),
8509
+ hoursSkipped: number().int().nonnegative(),
8510
+ skippedByReason: LedgerWalkSkipCountsSchema,
8511
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8512
+ bounded: boolean(),
8513
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8514
+ });
8384
8515
  /** How many rows a media pass would still act on against a given target — the
8385
8516
  * media lane's denominator AND its residue, from ONE derivation so the two can
8386
8517
  * never disagree. `null` = the count could not be taken. */
8387
8518
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8388
8519
  var RelocatableMediaCountInputSchema = object({
8389
8520
  toLocationId: string().min(1),
8521
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8522
+ fromLocationId: string().optional(),
8390
8523
  /** Omitted = `move`. */
8391
8524
  mode: MediaRelocateModeSchema.optional()
8392
8525
  });
8393
8526
  /**
8527
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8528
+ * ghost ledger entries on frozen footage locations.
8529
+ *
8530
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8531
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8532
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8533
+ * with no operator-visible status.
8534
+ */
8535
+ var StorageCleanupPhaseSchema = _enum([
8536
+ "orphans",
8537
+ "debug-media",
8538
+ "ghost-ledger",
8539
+ "done",
8540
+ "failed",
8541
+ "cancelled"
8542
+ ]);
8543
+ var StorageCleanupInputSchema = object({
8544
+ /** Also walk motion stills / track filmstrips. Off by default. */
8545
+ includeDebugMedia: boolean().optional() });
8546
+ var StorageCleanupJobSchema = object({
8547
+ jobId: string(),
8548
+ phase: StorageCleanupPhaseSchema,
8549
+ includeDebugMedia: boolean(),
8550
+ orphansReclaimed: number().int().nonnegative(),
8551
+ orphanBytesReclaimed: number().int().nonnegative(),
8552
+ debugMediaReclaimed: number().int().nonnegative(),
8553
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8554
+ ghostsForgotten: number().int().nonnegative(),
8555
+ ghostBytesForgotten: number().int().nonnegative(),
8556
+ /** Short operator-facing line: current collection, pass, or location. */
8557
+ detail: string().nullable(),
8558
+ cancelRequested: boolean(),
8559
+ startedAt: number(),
8560
+ updatedAt: number(),
8561
+ finishedAt: number().nullable(),
8562
+ error: string().nullable()
8563
+ });
8564
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8565
+ /**
8394
8566
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8395
8567
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8396
8568
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8418,11 +8590,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8418
8590
  * The default location for a type uses `id === <type>:default` by
8419
8591
  * convention (the bare type ref like `'backups'` resolves to it).
8420
8592
  *
8421
- * `isSystem: true` marks a location as orchestrator-seeded and
8422
- * undeletable. The bootstrap-installed defaults (one per type) carry
8423
- * this flag; operator-added locations don't. Editing the config of
8424
- * a system location is allowed (path migration, provider swap) but
8425
- * deleting it is rejected at the cap level.
8593
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8594
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8595
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8596
+ * / last-enabled, not on this bit.
8426
8597
  */
8427
8598
  var StorageLocationSchema = object({
8428
8599
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -12739,6 +12910,12 @@ method(object({
12739
12910
  }), _void(), {
12740
12911
  kind: "mutation",
12741
12912
  auth: "admin"
12913
+ }), method(object({
12914
+ from: string(),
12915
+ to: string()
12916
+ }), object({ moved: number() }), {
12917
+ kind: "mutation",
12918
+ auth: "admin"
12742
12919
  }), method(object({
12743
12920
  deviceId: number(),
12744
12921
  disabled: boolean()
@@ -18669,53 +18846,15 @@ var RecentTracksPageSchema = object({
18669
18846
  /** Cursor for the next page, or null when this page is the last. */
18670
18847
  nextCursor: string().nullable()
18671
18848
  });
18672
- var LIST_GROUPS_DEFAULT_LIMIT = 40;
18673
- var LIST_GROUPS_MAX_LIMIT = 100;
18674
- var AnalyticsGroupRecordSchema = object({
18675
- id: string(),
18676
- deviceId: number().int(),
18677
- openedAt: number().int(),
18678
- closedAt: number().int(),
18679
- timestamp: number().int(),
18680
- memberCount: number().int(),
18681
- memberTrackIds: array(string()).readonly(),
18682
- className: string(),
18683
- classes: array(string()).readonly(),
18684
- /** Relative event-media path, or null when the group has no picture yet. */
18685
- mediaUrl: string().nullable(),
18686
- singleton: boolean()
18687
- });
18688
- var AnalyticsGroupMemberSchema = object({
18689
- trackId: string(),
18690
- deviceId: number().int(),
18691
- className: string(),
18692
- firstSeen: number().int(),
18693
- lastSeen: number().int(),
18694
- mediaUrl: string().nullable()
18695
- });
18696
- var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
18697
- var ListGroupsQueryInput = object({
18698
- /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
18699
- deviceIds: array(number()),
18700
- /** Window lower bound on `closedAt` (inclusive). */
18701
- since: number().optional(),
18702
- /** Window upper bound on `openedAt` (inclusive). */
18703
- until: number().optional(),
18704
- limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
18705
- /** Opaque continuation cursor from a previous page's `nextCursor`. */
18706
- cursor: string().optional()
18707
- });
18708
- var ListGroupsPageSchema = object({
18709
- groups: array(AnalyticsGroupRecordSchema).readonly(),
18710
- nextCursor: string().nullable()
18711
- });
18849
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
18850
+ var KEY_EVENTS_MAX_LIMIT = 200;
18712
18851
  var KeyEventQueryInput = object({
18713
18852
  deviceId: number(),
18714
18853
  /** Window lower bound (track firstSeen ≥ since). */
18715
18854
  since: number(),
18716
18855
  /** Window upper bound (track firstSeen ≤ until). */
18717
18856
  until: number(),
18718
- limit: number().int().min(1).max(200).default(50),
18857
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18719
18858
  /** Drop tracks scoring below this importance. */
18720
18859
  minImportance: number().min(0).max(1).optional(),
18721
18860
  /** Restrict to a single class (e.g. 'person'). */
@@ -18737,6 +18876,32 @@ var KeyEventSchema = object({
18737
18876
  ...TrackFlagFields,
18738
18877
  ...TrackRetrainFields
18739
18878
  });
18879
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
18880
+ var KeyEventBatchQueryInput = object({
18881
+ deviceIds: array(number()).min(1).max(200),
18882
+ since: number(),
18883
+ until: number(),
18884
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
18885
+ * across the set, which would let a busy camera starve a quiet one of its
18886
+ * rows and change what the merged feed contains. */
18887
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18888
+ minImportance: number().min(0).max(1).optional(),
18889
+ classFilter: string().optional()
18890
+ });
18891
+ /**
18892
+ * One camera's key events in a batch answer.
18893
+ *
18894
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
18895
+ * error rather than throwing, so a camera whose store read failed and one with
18896
+ * no events in the window were ALREADY indistinguishable per camera — the
18897
+ * batch does not make that worse, and the row keeps the deviceId the single
18898
+ * method's output never carried (the caller used to stamp it from the fan-out
18899
+ * key, which only worked because there was one query per camera).
18900
+ */
18901
+ var KeyEventsForDeviceSchema = object({
18902
+ deviceId: number(),
18903
+ events: array(KeyEventSchema).readonly()
18904
+ });
18740
18905
  object({
18741
18906
  trackId: string(),
18742
18907
  className: string(),
@@ -18784,9 +18949,7 @@ var TrackCascadeCountsSchema = object({
18784
18949
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
18785
18950
  plates: number().int(),
18786
18951
  /** Per-track CLIP search vectors removed (best-effort). */
18787
- embeddings: number().int(),
18788
- /** Group membership + group rows removed with their last member (best-effort). */
18789
- groups: number().int()
18952
+ embeddings: number().int()
18790
18953
  });
18791
18954
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
18792
18955
  var DiskReconcileCountsSchema = object({
@@ -18956,6 +19119,47 @@ var RebuildStatusSchema = object({
18956
19119
  /** Present when the pass ended by throwing. */
18957
19120
  error: string().nullable()
18958
19121
  });
19122
+ /**
19123
+ * Acknowledgement that a debug-media reclaim STARTED.
19124
+ *
19125
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
19126
+ * it runs detached and this returns immediately. Awaiting it is how the
19127
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
19128
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
19129
+ */
19130
+ var MediaReclaimStartResultSchema = object({
19131
+ started: boolean(),
19132
+ /** True when a pass was already running; the new request is ignored. */
19133
+ alreadyRunning: boolean()
19134
+ });
19135
+ var MediaReclaimInputSchema = object({
19136
+ mode: _enum(["report", "reclaim"]).default("report"),
19137
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
19138
+ deviceIds: array(number().int()).min(1).optional(),
19139
+ restart: boolean().optional(),
19140
+ pageSize: number().int().min(50).max(5e3).optional(),
19141
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
19142
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
19143
+ maxBytesPerRun: number().int().min(1).optional(),
19144
+ budgetMinutes: number().int().min(1).max(720).optional(),
19145
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
19146
+ graceMinutes: number().int().min(1).max(10080).optional()
19147
+ });
19148
+ var MediaReclaimStatusSchema = object({
19149
+ running: boolean(),
19150
+ mode: _enum(["report", "reclaim"]).nullable(),
19151
+ totalExamined: number(),
19152
+ totalEligible: number(),
19153
+ totalReclaimed: number(),
19154
+ totalBytesReclaimed: number(),
19155
+ totalRefused: number(),
19156
+ /** Device+scope windows finished in this pass. */
19157
+ devicesDone: number(),
19158
+ complete: boolean().nullable(),
19159
+ startedAtMs: number().nullable(),
19160
+ finishedAtMs: number().nullable(),
19161
+ error: string().nullable()
19162
+ });
18959
19163
  var ReplayFrameInputSchema = object({
18960
19164
  timestamp: number(),
18961
19165
  frame: PipelineRunResultBridge
@@ -18994,10 +19198,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18994
19198
  * stationary registry). Default false: the timeline lists passages,
18995
19199
  * not parking records (operator decision, 2026-08-15). */
18996
19200
  includeStationary: boolean().optional()
18997
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
18998
- deviceId: number(),
18999
- groupId: string().min(1)
19000
- }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19201
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19001
19202
  kind: "mutation",
19002
19203
  auth: "admin"
19003
19204
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -19006,7 +19207,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19006
19207
  until: number().optional(),
19007
19208
  kinds: array(string()).optional(),
19008
19209
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19009
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19210
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19010
19211
  deviceId: number(),
19011
19212
  since: number(),
19012
19213
  until: number(),
@@ -19097,6 +19298,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19097
19298
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19098
19299
  kind: "query",
19099
19300
  auth: "admin"
19301
+ }), method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
19302
+ kind: "mutation",
19303
+ auth: "admin"
19304
+ }), method(object({}), MediaReclaimStatusSchema, {
19305
+ kind: "query",
19306
+ auth: "admin"
19100
19307
  }), method(object({ deviceIds: array(number()).optional() }), TrainingExportSummarySchema, {
19101
19308
  kind: "query",
19102
19309
  auth: "admin"
@@ -21171,7 +21378,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21171
21378
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21172
21379
  kind: "mutation",
21173
21380
  auth: "admin"
21174
- });
21381
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
21382
+ kind: "mutation",
21383
+ auth: "admin"
21384
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21385
+ kind: "mutation",
21386
+ auth: "admin"
21387
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21175
21388
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21176
21389
  providerId: string().min(1),
21177
21390
  displayName: string().min(1),
@@ -26591,6 +26804,33 @@ var RecordingRebalanceInputSchema = object({
26591
26804
  minMoveGb: number().min(0).optional()
26592
26805
  });
26593
26806
  /**
26807
+ * Operator-facing placement of one camera onto a recordings location.
26808
+ *
26809
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
26810
+ * Auto (the planner may move this camera). `locationId` is where high/mid
26811
+ * currently write — the plan, which may disagree with the pin when Auto.
26812
+ */
26813
+ var RecordingDevicePlacementSchema = object({
26814
+ deviceId: number().int(),
26815
+ profile: string(),
26816
+ locationId: string()
26817
+ });
26818
+ var RecordingDevicePinSchema = object({
26819
+ deviceId: number().int(),
26820
+ /** Recordings-class location this camera is pinned to. */
26821
+ locationId: string()
26822
+ });
26823
+ var RecordingPlacementViewSchema = object({
26824
+ assignments: array(RecordingDevicePlacementSchema),
26825
+ pins: array(RecordingDevicePinSchema),
26826
+ defaultLocations: record(string(), string())
26827
+ });
26828
+ var RecordingSetDevicePlacementInputSchema = object({
26829
+ deviceId: number().int(),
26830
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
26831
+ locationId: string().nullable()
26832
+ });
26833
+ /**
26594
26834
  * Result of locating footage at a wall-clock instant for one device/profile.
26595
26835
  * `segment` carries the covering segment's window; `gap` reports the forward
26596
26836
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -26804,6 +27044,9 @@ method(object({
26804
27044
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26805
27045
  kind: "query",
26806
27046
  auth: "admin"
27047
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
27048
+ kind: "mutation",
27049
+ auth: "admin"
26807
27050
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26808
27051
  kind: "mutation",
26809
27052
  auth: "admin"
@@ -26813,6 +27056,12 @@ method(object({
26813
27056
  }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
26814
27057
  kind: "mutation",
26815
27058
  auth: "admin"
27059
+ }), method(object({}), RecordingPlacementViewSchema, {
27060
+ kind: "query",
27061
+ auth: "admin"
27062
+ }), method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
27063
+ kind: "mutation",
27064
+ auth: "admin"
26816
27065
  });
26817
27066
  /**
26818
27067
  * `recording-export` cap — render a footage time range into a single downloadable
@@ -27195,7 +27444,26 @@ var SceneMonitorStatusSchema = object({
27195
27444
  monitors: array(SceneMonitorSchema),
27196
27445
  lastFetchedAt: number()
27197
27446
  });
27198
- DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({
27447
+ /**
27448
+ * One camera's row in a `listScenesBatch` answer.
27449
+ *
27450
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
27451
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
27452
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
27453
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
27454
+ * configured. Fanned out per camera the difference was visible — one query
27455
+ * errored while the others resolved — and a batch that returned only the rows
27456
+ * it managed would have destroyed it, silently, by making an unreachable camera
27457
+ * indistinguishable from one that answered `monitors: []`.
27458
+ *
27459
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
27460
+ * could not be read"; `status.monitors: []` means "read, and it has none".
27461
+ */
27462
+ var SceneMonitorStatusForDeviceSchema = object({
27463
+ deviceId: number(),
27464
+ status: SceneMonitorStatusSchema.nullable()
27465
+ });
27466
+ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
27199
27467
  deviceId: number(),
27200
27468
  label: string(),
27201
27469
  roi: MaskRectShapeSchema,
@@ -28519,6 +28787,27 @@ var CameraOccupancySnapshotSchema = object({
28519
28787
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
28520
28788
  });
28521
28789
  /**
28790
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
28791
+ *
28792
+ * THREE outcomes, and the single-camera method could only express two of them
28793
+ * because `snapshot: null` was already spoken for:
28794
+ *
28795
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
28796
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
28797
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
28798
+ * - `read: 'unreadable'` — the owner could not answer for this
28799
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
28800
+ *
28801
+ * Collapsing the last two is the failure this field exists to prevent: a
28802
+ * hydration that threw would otherwise render as an empty Stationary section,
28803
+ * which is a definite claim about a camera nobody could read.
28804
+ */
28805
+ var CameraOccupancySnapshotForDeviceSchema = object({
28806
+ deviceId: number(),
28807
+ read: _enum(["read", "unreadable"]),
28808
+ snapshot: CameraOccupancySnapshotSchema.nullable()
28809
+ });
28810
+ /**
28522
28811
  * Time-series resolution. The history methods return one bucket per
28523
28812
  * step over the requested range. Smaller resolutions cost more
28524
28813
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -28542,7 +28831,7 @@ var HistoryPointSchema = object({
28542
28831
  /** Object count averaged over the bucket (rounded to nearest integer). */
28543
28832
  count: number().int().nonnegative()
28544
28833
  });
28545
- DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
28834
+ DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
28546
28835
  deviceId: number(),
28547
28836
  zoneId: string(),
28548
28837
  className: string().optional()
@@ -30553,6 +30842,12 @@ Object.freeze({
30553
30842
  addonId: null,
30554
30843
  access: "delete"
30555
30844
  },
30845
+ "deviceManager.renameLocation": {
30846
+ capName: "device-manager",
30847
+ capScope: "system",
30848
+ addonId: null,
30849
+ access: "create"
30850
+ },
30556
30851
  "deviceManager.runDeviceAction": {
30557
30852
  capName: "device-manager",
30558
30853
  capScope: "system",
@@ -32245,13 +32540,19 @@ Object.freeze({
32245
32540
  addonId: null,
32246
32541
  access: "view"
32247
32542
  },
32248
- "pipelineAnalytics.getGroup": {
32543
+ "pipelineAnalytics.getKeyEvents": {
32249
32544
  capName: "pipeline-analytics",
32250
32545
  capScope: "device",
32251
32546
  addonId: null,
32252
32547
  access: "view"
32253
32548
  },
32254
- "pipelineAnalytics.getKeyEvents": {
32549
+ "pipelineAnalytics.getKeyEventsBatch": {
32550
+ capName: "pipeline-analytics",
32551
+ capScope: "device",
32552
+ addonId: null,
32553
+ access: "view"
32554
+ },
32555
+ "pipelineAnalytics.getMediaReclaimStatus": {
32255
32556
  capName: "pipeline-analytics",
32256
32557
  capScope: "device",
32257
32558
  addonId: null,
@@ -32341,12 +32642,6 @@ Object.freeze({
32341
32642
  addonId: null,
32342
32643
  access: "view"
32343
32644
  },
32344
- "pipelineAnalytics.listGroups": {
32345
- capName: "pipeline-analytics",
32346
- capScope: "device",
32347
- addonId: null,
32348
- access: "view"
32349
- },
32350
32645
  "pipelineAnalytics.listOpsLog": {
32351
32646
  capName: "pipeline-analytics",
32352
32647
  capScope: "device",
@@ -32431,6 +32726,12 @@ Object.freeze({
32431
32726
  addonId: null,
32432
32727
  access: "create"
32433
32728
  },
32729
+ "pipelineAnalytics.reclaimDebugMedia": {
32730
+ capName: "pipeline-analytics",
32731
+ capScope: "device",
32732
+ addonId: null,
32733
+ access: "create"
32734
+ },
32434
32735
  "pipelineAnalytics.reconcileFromDisk": {
32435
32736
  capName: "pipeline-analytics",
32436
32737
  capScope: "device",
@@ -33355,6 +33656,12 @@ Object.freeze({
33355
33656
  addonId: null,
33356
33657
  access: "view"
33357
33658
  },
33659
+ "recording.getPlacement": {
33660
+ capName: "recording",
33661
+ capScope: "system",
33662
+ addonId: null,
33663
+ access: "view"
33664
+ },
33358
33665
  "recording.getPlaybackManifest": {
33359
33666
  capName: "recording",
33360
33667
  capScope: "system",
@@ -33433,6 +33740,12 @@ Object.freeze({
33433
33740
  addonId: null,
33434
33741
  access: "view"
33435
33742
  },
33743
+ "recording.reconcileLedgerAgainstDisk": {
33744
+ capName: "recording",
33745
+ capScope: "system",
33746
+ addonId: null,
33747
+ access: "create"
33748
+ },
33436
33749
  "recording.refreshStorageLocationsForMigration": {
33437
33750
  capName: "recording",
33438
33751
  capScope: "system",
@@ -33475,6 +33788,12 @@ Object.freeze({
33475
33788
  addonId: null,
33476
33789
  access: "create"
33477
33790
  },
33791
+ "recording.setDevicePlacement": {
33792
+ capName: "recording",
33793
+ capScope: "system",
33794
+ addonId: null,
33795
+ access: "create"
33796
+ },
33478
33797
  "recording.startStorageMigrationMove": {
33479
33798
  capName: "recording",
33480
33799
  capScope: "system",
@@ -33559,6 +33878,12 @@ Object.freeze({
33559
33878
  addonId: null,
33560
33879
  access: "view"
33561
33880
  },
33881
+ "sceneMonitor.listScenesBatch": {
33882
+ capName: "scene-monitor",
33883
+ capScope: "device",
33884
+ addonId: null,
33885
+ access: "view"
33886
+ },
33562
33887
  "sceneMonitor.recheckNow": {
33563
33888
  capName: "scene-monitor",
33564
33889
  capScope: "device",
@@ -33913,12 +34238,36 @@ Object.freeze({
33913
34238
  addonId: null,
33914
34239
  access: "create"
33915
34240
  },
34241
+ "storageMigration.cleanupCancel": {
34242
+ capName: "storage-migration",
34243
+ capScope: "system",
34244
+ addonId: null,
34245
+ access: "create"
34246
+ },
34247
+ "storageMigration.cleanupStart": {
34248
+ capName: "storage-migration",
34249
+ capScope: "system",
34250
+ addonId: null,
34251
+ access: "create"
34252
+ },
34253
+ "storageMigration.cleanupStatus": {
34254
+ capName: "storage-migration",
34255
+ capScope: "system",
34256
+ addonId: null,
34257
+ access: "view"
34258
+ },
33916
34259
  "storageMigration.drain": {
33917
34260
  capName: "storage-migration",
33918
34261
  capScope: "system",
33919
34262
  addonId: null,
33920
34263
  access: "create"
33921
34264
  },
34265
+ "storageMigration.history": {
34266
+ capName: "storage-migration",
34267
+ capScope: "system",
34268
+ addonId: null,
34269
+ access: "view"
34270
+ },
33922
34271
  "storageMigration.movers": {
33923
34272
  capName: "storage-migration",
33924
34273
  capScope: "system",
@@ -34915,6 +35264,12 @@ Object.freeze({
34915
35264
  addonId: null,
34916
35265
  access: "view"
34917
35266
  },
35267
+ "zoneAnalytics.getCurrentSnapshotBatch": {
35268
+ capName: "zone-analytics",
35269
+ capScope: "device",
35270
+ addonId: null,
35271
+ access: "view"
35272
+ },
34918
35273
  "zoneAnalytics.getUnzonedHistory": {
34919
35274
  capName: "zone-analytics",
34920
35275
  capScope: "device",
@@ -35909,14 +36264,14 @@ Object.freeze({
35909
36264
  form: "single",
35910
36265
  optional: true
35911
36266
  }],
35912
- "pipelineAnalytics.getGroup": [{
36267
+ "pipelineAnalytics.getKeyEvents": [{
35913
36268
  name: "deviceId",
35914
36269
  form: "single",
35915
36270
  optional: false
35916
36271
  }],
35917
- "pipelineAnalytics.getKeyEvents": [{
35918
- name: "deviceId",
35919
- form: "single",
36272
+ "pipelineAnalytics.getKeyEventsBatch": [{
36273
+ name: "deviceIds",
36274
+ form: "array",
35920
36275
  optional: false
35921
36276
  }],
35922
36277
  "pipelineAnalytics.getMotionEvents": [{
@@ -35974,11 +36329,6 @@ Object.freeze({
35974
36329
  form: "single",
35975
36330
  optional: false
35976
36331
  }],
35977
- "pipelineAnalytics.listGroups": [{
35978
- name: "deviceIds",
35979
- form: "array",
35980
- optional: false
35981
- }],
35982
36332
  "pipelineAnalytics.listOpsLog": [{
35983
36333
  name: "deviceId",
35984
36334
  form: "single",
@@ -36024,6 +36374,11 @@ Object.freeze({
36024
36374
  form: "single",
36025
36375
  optional: true
36026
36376
  }],
36377
+ "pipelineAnalytics.reclaimDebugMedia": [{
36378
+ name: "deviceIds",
36379
+ form: "array",
36380
+ optional: true
36381
+ }],
36027
36382
  "pipelineAnalytics.reconcileFromDisk": [{
36028
36383
  name: "deviceId",
36029
36384
  form: "single",
@@ -36359,6 +36714,11 @@ Object.freeze({
36359
36714
  form: "single",
36360
36715
  optional: false
36361
36716
  }],
36717
+ "recording.reconcileLedgerAgainstDisk": [{
36718
+ name: "deviceId",
36719
+ form: "single",
36720
+ optional: true
36721
+ }],
36362
36722
  "recording.relocateFootage": [{
36363
36723
  name: "deviceId",
36364
36724
  form: "single",
@@ -36384,6 +36744,11 @@ Object.freeze({
36384
36744
  form: "single",
36385
36745
  optional: false
36386
36746
  }],
36747
+ "recording.setDevicePlacement": [{
36748
+ name: "deviceId",
36749
+ form: "single",
36750
+ optional: false
36751
+ }],
36387
36752
  "recording.startStorageMigrationMove": [{
36388
36753
  name: "deviceId",
36389
36754
  form: "single",
@@ -36424,6 +36789,11 @@ Object.freeze({
36424
36789
  form: "single",
36425
36790
  optional: false
36426
36791
  }],
36792
+ "sceneMonitor.listScenesBatch": [{
36793
+ name: "deviceIds",
36794
+ form: "array",
36795
+ optional: false
36796
+ }],
36427
36797
  "sceneMonitor.recheckNow": [{
36428
36798
  name: "deviceId",
36429
36799
  form: "single",
@@ -36685,6 +37055,11 @@ Object.freeze({
36685
37055
  form: "single",
36686
37056
  optional: false
36687
37057
  }],
37058
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
37059
+ name: "deviceIds",
37060
+ form: "array",
37061
+ optional: false
37062
+ }],
36688
37063
  "zoneAnalytics.getUnzonedHistory": [{
36689
37064
  name: "deviceId",
36690
37065
  form: "single",