@camstack/addon-provider-unifi 0.2.47 → 0.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.
- package/dist/addon.js +318 -2
- package/dist/addon.mjs +318 -2
- package/package.json +1 -1
package/dist/addon.js
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()
|
|
@@ -8381,6 +8395,91 @@ var RelocateResidueSchema = object({
|
|
|
8381
8395
|
segments: number().int().nonnegative(),
|
|
8382
8396
|
bytes: number().int().nonnegative()
|
|
8383
8397
|
}).nullable();
|
|
8398
|
+
/**
|
|
8399
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8400
|
+
* (D319).
|
|
8401
|
+
*
|
|
8402
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8403
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8404
|
+
* destructive run before authorising it.
|
|
8405
|
+
*/
|
|
8406
|
+
var LedgerWalkInputSchema = object({
|
|
8407
|
+
locationId: string().min(1),
|
|
8408
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8409
|
+
apply: boolean().optional(),
|
|
8410
|
+
/** Narrow to one camera. */
|
|
8411
|
+
deviceId: number().int().positive().optional(),
|
|
8412
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8413
|
+
profiles: array(string().min(1)).optional()
|
|
8414
|
+
});
|
|
8415
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8416
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8417
|
+
"location-unknown",
|
|
8418
|
+
"source-writable",
|
|
8419
|
+
"no-ledger",
|
|
8420
|
+
"archive-unreadable",
|
|
8421
|
+
"anchor-absent",
|
|
8422
|
+
"anchor-unreadable",
|
|
8423
|
+
"anchor-moved"
|
|
8424
|
+
]);
|
|
8425
|
+
_enum([
|
|
8426
|
+
"live-tail",
|
|
8427
|
+
"listing-error",
|
|
8428
|
+
"path-mismatch",
|
|
8429
|
+
"durable-refused"
|
|
8430
|
+
]);
|
|
8431
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8432
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8433
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8434
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8435
|
+
"live-tail": number().int().nonnegative(),
|
|
8436
|
+
"listing-error": number().int().nonnegative(),
|
|
8437
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8438
|
+
"durable-refused": number().int().nonnegative()
|
|
8439
|
+
});
|
|
8440
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8441
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8442
|
+
deviceId: number().int(),
|
|
8443
|
+
hoursWalked: number().int().nonnegative(),
|
|
8444
|
+
hoursMissing: number().int().nonnegative(),
|
|
8445
|
+
ghostSegments: number().int().nonnegative(),
|
|
8446
|
+
ghostBytes: number().int().nonnegative(),
|
|
8447
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8448
|
+
orphanFiles: number().int().nonnegative()
|
|
8449
|
+
});
|
|
8450
|
+
/**
|
|
8451
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8452
|
+
*
|
|
8453
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8454
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8455
|
+
* than in the absence of one.
|
|
8456
|
+
*/
|
|
8457
|
+
var LedgerWalkReportSchema = object({
|
|
8458
|
+
locationId: string(),
|
|
8459
|
+
applied: boolean(),
|
|
8460
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8461
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8462
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8463
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8464
|
+
hoursWalked: number().int().nonnegative(),
|
|
8465
|
+
hoursMissing: number().int().nonnegative(),
|
|
8466
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8467
|
+
listings: number().int().nonnegative(),
|
|
8468
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8469
|
+
ghostSegments: number().int().nonnegative(),
|
|
8470
|
+
ghostBytes: number().int().nonnegative(),
|
|
8471
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8472
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8473
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8474
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8475
|
+
orphanFiles: number().int().nonnegative(),
|
|
8476
|
+
orphanSample: array(string()).readonly(),
|
|
8477
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8478
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8479
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8480
|
+
bounded: boolean(),
|
|
8481
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8482
|
+
});
|
|
8384
8483
|
/** How many rows a media pass would still act on against a given target — the
|
|
8385
8484
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8386
8485
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18996,13 +19095,15 @@ var ListGroupsPageSchema = object({
|
|
|
18996
19095
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18997
19096
|
nextCursor: string().nullable()
|
|
18998
19097
|
});
|
|
19098
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
19099
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18999
19100
|
var KeyEventQueryInput = object({
|
|
19000
19101
|
deviceId: number(),
|
|
19001
19102
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
19002
19103
|
since: number(),
|
|
19003
19104
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
19004
19105
|
until: number(),
|
|
19005
|
-
limit: number().int().min(1).max(
|
|
19106
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19006
19107
|
/** Drop tracks scoring below this importance. */
|
|
19007
19108
|
minImportance: number().min(0).max(1).optional(),
|
|
19008
19109
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -19024,6 +19125,32 @@ var KeyEventSchema = object({
|
|
|
19024
19125
|
...TrackFlagFields,
|
|
19025
19126
|
...TrackRetrainFields
|
|
19026
19127
|
});
|
|
19128
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
19129
|
+
var KeyEventBatchQueryInput = object({
|
|
19130
|
+
deviceIds: array(number()).min(1).max(200),
|
|
19131
|
+
since: number(),
|
|
19132
|
+
until: number(),
|
|
19133
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
19134
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
19135
|
+
* rows and change what the merged feed contains. */
|
|
19136
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19137
|
+
minImportance: number().min(0).max(1).optional(),
|
|
19138
|
+
classFilter: string().optional()
|
|
19139
|
+
});
|
|
19140
|
+
/**
|
|
19141
|
+
* One camera's key events in a batch answer.
|
|
19142
|
+
*
|
|
19143
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
19144
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
19145
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
19146
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
19147
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
19148
|
+
* key, which only worked because there was one query per camera).
|
|
19149
|
+
*/
|
|
19150
|
+
var KeyEventsForDeviceSchema = object({
|
|
19151
|
+
deviceId: number(),
|
|
19152
|
+
events: array(KeyEventSchema).readonly()
|
|
19153
|
+
});
|
|
19027
19154
|
object({
|
|
19028
19155
|
trackId: string(),
|
|
19029
19156
|
className: string(),
|
|
@@ -19095,6 +19222,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19095
19222
|
totalBytes: number().int(),
|
|
19096
19223
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19097
19224
|
});
|
|
19225
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19226
|
+
var EventMediaKindFootprintSchema = object({
|
|
19227
|
+
kind: MediaFileKindEnum,
|
|
19228
|
+
/** Media rows of this kind. */
|
|
19229
|
+
rows: number().int(),
|
|
19230
|
+
/** Bytes on disk held by those rows. */
|
|
19231
|
+
bytes: number().int()
|
|
19232
|
+
});
|
|
19233
|
+
/**
|
|
19234
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19235
|
+
* actually turns on.
|
|
19236
|
+
*
|
|
19237
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19238
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19239
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19240
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19241
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19242
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19243
|
+
*
|
|
19244
|
+
* ## Why `unaccounted*` exists
|
|
19245
|
+
*
|
|
19246
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19247
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19248
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19249
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19250
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19251
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19252
|
+
* against a denominator smaller than the disk.
|
|
19253
|
+
*
|
|
19254
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19255
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19256
|
+
*/
|
|
19257
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19258
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19259
|
+
totalRows: number().int(),
|
|
19260
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19261
|
+
totalBytes: number().int(),
|
|
19262
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19263
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19264
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19265
|
+
unaccountedRows: number().int(),
|
|
19266
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19267
|
+
unaccountedBytes: number().int()
|
|
19268
|
+
});
|
|
19098
19269
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19099
19270
|
var EventPruneCountsSchema = object({
|
|
19100
19271
|
motion: number().int(),
|
|
@@ -19249,7 +19420,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19249
19420
|
until: number().optional(),
|
|
19250
19421
|
kinds: array(string()).optional(),
|
|
19251
19422
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19252
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19423
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19253
19424
|
deviceId: number(),
|
|
19254
19425
|
since: number(),
|
|
19255
19426
|
until: number(),
|
|
@@ -19298,6 +19469,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19298
19469
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19299
19470
|
kind: "query",
|
|
19300
19471
|
auth: "admin"
|
|
19472
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19473
|
+
kind: "query",
|
|
19474
|
+
auth: "admin"
|
|
19301
19475
|
}), method(object({
|
|
19302
19476
|
olderThanMs: number(),
|
|
19303
19477
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21249,6 +21423,20 @@ method(object({
|
|
|
21249
21423
|
error: string().optional()
|
|
21250
21424
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21251
21425
|
providerId: string(),
|
|
21426
|
+
/**
|
|
21427
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21428
|
+
*
|
|
21429
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21430
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21431
|
+
* credential the operator did not retype — and posting that here
|
|
21432
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21433
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21434
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21435
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21436
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21437
|
+
* every value was typed just now and nothing is stored yet.
|
|
21438
|
+
*/
|
|
21439
|
+
locationId: string().optional(),
|
|
21252
21440
|
config: record(string(), unknown())
|
|
21253
21441
|
}), object({
|
|
21254
21442
|
ok: boolean(),
|
|
@@ -28616,6 +28804,9 @@ method(object({
|
|
|
28616
28804
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
28617
28805
|
kind: "query",
|
|
28618
28806
|
auth: "admin"
|
|
28807
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
28808
|
+
kind: "mutation",
|
|
28809
|
+
auth: "admin"
|
|
28619
28810
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
28620
28811
|
kind: "mutation",
|
|
28621
28812
|
auth: "admin"
|
|
@@ -29007,6 +29198,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
29007
29198
|
monitors: array(SceneMonitorSchema),
|
|
29008
29199
|
lastFetchedAt: number()
|
|
29009
29200
|
});
|
|
29201
|
+
/**
|
|
29202
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
29203
|
+
*
|
|
29204
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
29205
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
29206
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
29207
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
29208
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
29209
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
29210
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
29211
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
29212
|
+
*
|
|
29213
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
29214
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
29215
|
+
*/
|
|
29216
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
29217
|
+
deviceId: number(),
|
|
29218
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
29219
|
+
});
|
|
29010
29220
|
var sceneMonitorCapability = {
|
|
29011
29221
|
name: "scene-monitor",
|
|
29012
29222
|
scope: "device",
|
|
@@ -29016,6 +29226,22 @@ var sceneMonitorCapability = {
|
|
|
29016
29226
|
deviceTypes: [DeviceType.Camera],
|
|
29017
29227
|
methods: {
|
|
29018
29228
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
29229
|
+
/**
|
|
29230
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
29231
|
+
*
|
|
29232
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
29233
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
29234
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
29235
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
29236
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
29237
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
29238
|
+
*
|
|
29239
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
29240
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
29241
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
29242
|
+
* tell which two are missing, or that any are.
|
|
29243
|
+
*/
|
|
29244
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
29019
29245
|
createScene: method(object({
|
|
29020
29246
|
deviceId: number(),
|
|
29021
29247
|
label: string(),
|
|
@@ -30851,6 +31077,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
30851
31077
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
30852
31078
|
});
|
|
30853
31079
|
/**
|
|
31080
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
31081
|
+
*
|
|
31082
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
31083
|
+
* because `snapshot: null` was already spoken for:
|
|
31084
|
+
*
|
|
31085
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
31086
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
31087
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
31088
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
31089
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
31090
|
+
*
|
|
31091
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
31092
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
31093
|
+
* which is a definite claim about a camera nobody could read.
|
|
31094
|
+
*/
|
|
31095
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
31096
|
+
deviceId: number(),
|
|
31097
|
+
read: _enum(["read", "unreadable"]),
|
|
31098
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
31099
|
+
});
|
|
31100
|
+
/**
|
|
30854
31101
|
* Time-series resolution. The history methods return one bucket per
|
|
30855
31102
|
* step over the requested range. Smaller resolutions cost more
|
|
30856
31103
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -30907,6 +31154,20 @@ var zoneAnalyticsCapability = {
|
|
|
30907
31154
|
* (no inference result emitted since boot or since binding was
|
|
30908
31155
|
* activated). */
|
|
30909
31156
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
31157
|
+
/**
|
|
31158
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
31159
|
+
*
|
|
31160
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
31161
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
31162
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
31163
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
31164
|
+
* work is unchanged.
|
|
31165
|
+
*
|
|
31166
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
31167
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
31168
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
31169
|
+
*/
|
|
31170
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
30910
31171
|
/** Time-series object count inside one zone. `className` optional —
|
|
30911
31172
|
* omit to count every class in the zone. */
|
|
30912
31173
|
getZoneHistory: method(object({
|
|
@@ -35304,6 +35565,12 @@ Object.freeze({
|
|
|
35304
35565
|
addonId: null,
|
|
35305
35566
|
access: "view"
|
|
35306
35567
|
},
|
|
35568
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35569
|
+
capName: "pipeline-analytics",
|
|
35570
|
+
capScope: "device",
|
|
35571
|
+
addonId: null,
|
|
35572
|
+
access: "view"
|
|
35573
|
+
},
|
|
35307
35574
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35308
35575
|
capName: "pipeline-analytics",
|
|
35309
35576
|
capScope: "device",
|
|
@@ -35322,6 +35589,12 @@ Object.freeze({
|
|
|
35322
35589
|
addonId: null,
|
|
35323
35590
|
access: "view"
|
|
35324
35591
|
},
|
|
35592
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
35593
|
+
capName: "pipeline-analytics",
|
|
35594
|
+
capScope: "device",
|
|
35595
|
+
addonId: null,
|
|
35596
|
+
access: "view"
|
|
35597
|
+
},
|
|
35325
35598
|
"pipelineAnalytics.getMotionEvents": {
|
|
35326
35599
|
capName: "pipeline-analytics",
|
|
35327
35600
|
capScope: "device",
|
|
@@ -36498,6 +36771,12 @@ Object.freeze({
|
|
|
36498
36771
|
addonId: null,
|
|
36499
36772
|
access: "view"
|
|
36500
36773
|
},
|
|
36774
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
36775
|
+
capName: "recording",
|
|
36776
|
+
capScope: "system",
|
|
36777
|
+
addonId: null,
|
|
36778
|
+
access: "create"
|
|
36779
|
+
},
|
|
36501
36780
|
"recording.refreshStorageLocationsForMigration": {
|
|
36502
36781
|
capName: "recording",
|
|
36503
36782
|
capScope: "system",
|
|
@@ -36624,6 +36903,12 @@ Object.freeze({
|
|
|
36624
36903
|
addonId: null,
|
|
36625
36904
|
access: "view"
|
|
36626
36905
|
},
|
|
36906
|
+
"sceneMonitor.listScenesBatch": {
|
|
36907
|
+
capName: "scene-monitor",
|
|
36908
|
+
capScope: "device",
|
|
36909
|
+
addonId: null,
|
|
36910
|
+
access: "view"
|
|
36911
|
+
},
|
|
36627
36912
|
"sceneMonitor.recheckNow": {
|
|
36628
36913
|
capName: "scene-monitor",
|
|
36629
36914
|
capScope: "device",
|
|
@@ -37980,6 +38265,12 @@ Object.freeze({
|
|
|
37980
38265
|
addonId: null,
|
|
37981
38266
|
access: "view"
|
|
37982
38267
|
},
|
|
38268
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
38269
|
+
capName: "zone-analytics",
|
|
38270
|
+
capScope: "device",
|
|
38271
|
+
addonId: null,
|
|
38272
|
+
access: "view"
|
|
38273
|
+
},
|
|
37983
38274
|
"zoneAnalytics.getUnzonedHistory": {
|
|
37984
38275
|
capName: "zone-analytics",
|
|
37985
38276
|
capScope: "device",
|
|
@@ -38969,6 +39260,11 @@ Object.freeze({
|
|
|
38969
39260
|
form: "single",
|
|
38970
39261
|
optional: false
|
|
38971
39262
|
}],
|
|
39263
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39264
|
+
name: "deviceId",
|
|
39265
|
+
form: "single",
|
|
39266
|
+
optional: true
|
|
39267
|
+
}],
|
|
38972
39268
|
"pipelineAnalytics.getGroup": [{
|
|
38973
39269
|
name: "deviceId",
|
|
38974
39270
|
form: "single",
|
|
@@ -38979,6 +39275,11 @@ Object.freeze({
|
|
|
38979
39275
|
form: "single",
|
|
38980
39276
|
optional: false
|
|
38981
39277
|
}],
|
|
39278
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
39279
|
+
name: "deviceIds",
|
|
39280
|
+
form: "array",
|
|
39281
|
+
optional: false
|
|
39282
|
+
}],
|
|
38982
39283
|
"pipelineAnalytics.getMotionEvents": [{
|
|
38983
39284
|
name: "deviceId",
|
|
38984
39285
|
form: "single",
|
|
@@ -39419,6 +39720,11 @@ Object.freeze({
|
|
|
39419
39720
|
form: "single",
|
|
39420
39721
|
optional: false
|
|
39421
39722
|
}],
|
|
39723
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
39724
|
+
name: "deviceId",
|
|
39725
|
+
form: "single",
|
|
39726
|
+
optional: true
|
|
39727
|
+
}],
|
|
39422
39728
|
"recording.relocateFootage": [{
|
|
39423
39729
|
name: "deviceId",
|
|
39424
39730
|
form: "single",
|
|
@@ -39484,6 +39790,11 @@ Object.freeze({
|
|
|
39484
39790
|
form: "single",
|
|
39485
39791
|
optional: false
|
|
39486
39792
|
}],
|
|
39793
|
+
"sceneMonitor.listScenesBatch": [{
|
|
39794
|
+
name: "deviceIds",
|
|
39795
|
+
form: "array",
|
|
39796
|
+
optional: false
|
|
39797
|
+
}],
|
|
39487
39798
|
"sceneMonitor.recheckNow": [{
|
|
39488
39799
|
name: "deviceId",
|
|
39489
39800
|
form: "single",
|
|
@@ -39745,6 +40056,11 @@ Object.freeze({
|
|
|
39745
40056
|
form: "single",
|
|
39746
40057
|
optional: false
|
|
39747
40058
|
}],
|
|
40059
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
40060
|
+
name: "deviceIds",
|
|
40061
|
+
form: "array",
|
|
40062
|
+
optional: false
|
|
40063
|
+
}],
|
|
39748
40064
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
39749
40065
|
name: "deviceId",
|
|
39750
40066
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -8017,6 +8017,20 @@ var RelocateJobSchema = object({
|
|
|
8017
8017
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8018
8018
|
*/
|
|
8019
8019
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8020
|
+
/**
|
|
8021
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8022
|
+
*
|
|
8023
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8024
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8025
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8026
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8027
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8028
|
+
* the same failure as one that quietly skips them (D295).
|
|
8029
|
+
*
|
|
8030
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8031
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8032
|
+
*/
|
|
8033
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8020
8034
|
startedAt: number(),
|
|
8021
8035
|
finishedAt: number().nullable(),
|
|
8022
8036
|
error: string().nullable()
|
|
@@ -8380,6 +8394,91 @@ var RelocateResidueSchema = object({
|
|
|
8380
8394
|
segments: number().int().nonnegative(),
|
|
8381
8395
|
bytes: number().int().nonnegative()
|
|
8382
8396
|
}).nullable();
|
|
8397
|
+
/**
|
|
8398
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8399
|
+
* (D319).
|
|
8400
|
+
*
|
|
8401
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8402
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8403
|
+
* destructive run before authorising it.
|
|
8404
|
+
*/
|
|
8405
|
+
var LedgerWalkInputSchema = object({
|
|
8406
|
+
locationId: string().min(1),
|
|
8407
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8408
|
+
apply: boolean().optional(),
|
|
8409
|
+
/** Narrow to one camera. */
|
|
8410
|
+
deviceId: number().int().positive().optional(),
|
|
8411
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8412
|
+
profiles: array(string().min(1)).optional()
|
|
8413
|
+
});
|
|
8414
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8415
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8416
|
+
"location-unknown",
|
|
8417
|
+
"source-writable",
|
|
8418
|
+
"no-ledger",
|
|
8419
|
+
"archive-unreadable",
|
|
8420
|
+
"anchor-absent",
|
|
8421
|
+
"anchor-unreadable",
|
|
8422
|
+
"anchor-moved"
|
|
8423
|
+
]);
|
|
8424
|
+
_enum([
|
|
8425
|
+
"live-tail",
|
|
8426
|
+
"listing-error",
|
|
8427
|
+
"path-mismatch",
|
|
8428
|
+
"durable-refused"
|
|
8429
|
+
]);
|
|
8430
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8431
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8432
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8433
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8434
|
+
"live-tail": number().int().nonnegative(),
|
|
8435
|
+
"listing-error": number().int().nonnegative(),
|
|
8436
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8437
|
+
"durable-refused": number().int().nonnegative()
|
|
8438
|
+
});
|
|
8439
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8440
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8441
|
+
deviceId: number().int(),
|
|
8442
|
+
hoursWalked: number().int().nonnegative(),
|
|
8443
|
+
hoursMissing: number().int().nonnegative(),
|
|
8444
|
+
ghostSegments: number().int().nonnegative(),
|
|
8445
|
+
ghostBytes: number().int().nonnegative(),
|
|
8446
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8447
|
+
orphanFiles: number().int().nonnegative()
|
|
8448
|
+
});
|
|
8449
|
+
/**
|
|
8450
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8451
|
+
*
|
|
8452
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8453
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8454
|
+
* than in the absence of one.
|
|
8455
|
+
*/
|
|
8456
|
+
var LedgerWalkReportSchema = object({
|
|
8457
|
+
locationId: string(),
|
|
8458
|
+
applied: boolean(),
|
|
8459
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8460
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8461
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8462
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8463
|
+
hoursWalked: number().int().nonnegative(),
|
|
8464
|
+
hoursMissing: number().int().nonnegative(),
|
|
8465
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8466
|
+
listings: number().int().nonnegative(),
|
|
8467
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8468
|
+
ghostSegments: number().int().nonnegative(),
|
|
8469
|
+
ghostBytes: number().int().nonnegative(),
|
|
8470
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8471
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8472
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8473
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8474
|
+
orphanFiles: number().int().nonnegative(),
|
|
8475
|
+
orphanSample: array(string()).readonly(),
|
|
8476
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8477
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8478
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8479
|
+
bounded: boolean(),
|
|
8480
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8481
|
+
});
|
|
8383
8482
|
/** How many rows a media pass would still act on against a given target — the
|
|
8384
8483
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8385
8484
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18995,13 +19094,15 @@ var ListGroupsPageSchema = object({
|
|
|
18995
19094
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18996
19095
|
nextCursor: string().nullable()
|
|
18997
19096
|
});
|
|
19097
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
19098
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18998
19099
|
var KeyEventQueryInput = object({
|
|
18999
19100
|
deviceId: number(),
|
|
19000
19101
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
19001
19102
|
since: number(),
|
|
19002
19103
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
19003
19104
|
until: number(),
|
|
19004
|
-
limit: number().int().min(1).max(
|
|
19105
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19005
19106
|
/** Drop tracks scoring below this importance. */
|
|
19006
19107
|
minImportance: number().min(0).max(1).optional(),
|
|
19007
19108
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -19023,6 +19124,32 @@ var KeyEventSchema = object({
|
|
|
19023
19124
|
...TrackFlagFields,
|
|
19024
19125
|
...TrackRetrainFields
|
|
19025
19126
|
});
|
|
19127
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
19128
|
+
var KeyEventBatchQueryInput = object({
|
|
19129
|
+
deviceIds: array(number()).min(1).max(200),
|
|
19130
|
+
since: number(),
|
|
19131
|
+
until: number(),
|
|
19132
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
19133
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
19134
|
+
* rows and change what the merged feed contains. */
|
|
19135
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
19136
|
+
minImportance: number().min(0).max(1).optional(),
|
|
19137
|
+
classFilter: string().optional()
|
|
19138
|
+
});
|
|
19139
|
+
/**
|
|
19140
|
+
* One camera's key events in a batch answer.
|
|
19141
|
+
*
|
|
19142
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
19143
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
19144
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
19145
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
19146
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
19147
|
+
* key, which only worked because there was one query per camera).
|
|
19148
|
+
*/
|
|
19149
|
+
var KeyEventsForDeviceSchema = object({
|
|
19150
|
+
deviceId: number(),
|
|
19151
|
+
events: array(KeyEventSchema).readonly()
|
|
19152
|
+
});
|
|
19026
19153
|
object({
|
|
19027
19154
|
trackId: string(),
|
|
19028
19155
|
className: string(),
|
|
@@ -19094,6 +19221,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19094
19221
|
totalBytes: number().int(),
|
|
19095
19222
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19096
19223
|
});
|
|
19224
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19225
|
+
var EventMediaKindFootprintSchema = object({
|
|
19226
|
+
kind: MediaFileKindEnum,
|
|
19227
|
+
/** Media rows of this kind. */
|
|
19228
|
+
rows: number().int(),
|
|
19229
|
+
/** Bytes on disk held by those rows. */
|
|
19230
|
+
bytes: number().int()
|
|
19231
|
+
});
|
|
19232
|
+
/**
|
|
19233
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19234
|
+
* actually turns on.
|
|
19235
|
+
*
|
|
19236
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19237
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19238
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19239
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19240
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19241
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19242
|
+
*
|
|
19243
|
+
* ## Why `unaccounted*` exists
|
|
19244
|
+
*
|
|
19245
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19246
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19247
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19248
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19249
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19250
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19251
|
+
* against a denominator smaller than the disk.
|
|
19252
|
+
*
|
|
19253
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19254
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19255
|
+
*/
|
|
19256
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19257
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19258
|
+
totalRows: number().int(),
|
|
19259
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19260
|
+
totalBytes: number().int(),
|
|
19261
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19262
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19263
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19264
|
+
unaccountedRows: number().int(),
|
|
19265
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19266
|
+
unaccountedBytes: number().int()
|
|
19267
|
+
});
|
|
19097
19268
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19098
19269
|
var EventPruneCountsSchema = object({
|
|
19099
19270
|
motion: number().int(),
|
|
@@ -19248,7 +19419,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19248
19419
|
until: number().optional(),
|
|
19249
19420
|
kinds: array(string()).optional(),
|
|
19250
19421
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19251
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19422
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
19252
19423
|
deviceId: number(),
|
|
19253
19424
|
since: number(),
|
|
19254
19425
|
until: number(),
|
|
@@ -19297,6 +19468,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19297
19468
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19298
19469
|
kind: "query",
|
|
19299
19470
|
auth: "admin"
|
|
19471
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19472
|
+
kind: "query",
|
|
19473
|
+
auth: "admin"
|
|
19300
19474
|
}), method(object({
|
|
19301
19475
|
olderThanMs: number(),
|
|
19302
19476
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21248,6 +21422,20 @@ method(object({
|
|
|
21248
21422
|
error: string().optional()
|
|
21249
21423
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21250
21424
|
providerId: string(),
|
|
21425
|
+
/**
|
|
21426
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21427
|
+
*
|
|
21428
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21429
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21430
|
+
* credential the operator did not retype — and posting that here
|
|
21431
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21432
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21433
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21434
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21435
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21436
|
+
* every value was typed just now and nothing is stored yet.
|
|
21437
|
+
*/
|
|
21438
|
+
locationId: string().optional(),
|
|
21251
21439
|
config: record(string(), unknown())
|
|
21252
21440
|
}), object({
|
|
21253
21441
|
ok: boolean(),
|
|
@@ -28615,6 +28803,9 @@ method(object({
|
|
|
28615
28803
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
28616
28804
|
kind: "query",
|
|
28617
28805
|
auth: "admin"
|
|
28806
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
28807
|
+
kind: "mutation",
|
|
28808
|
+
auth: "admin"
|
|
28618
28809
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
28619
28810
|
kind: "mutation",
|
|
28620
28811
|
auth: "admin"
|
|
@@ -29006,6 +29197,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
29006
29197
|
monitors: array(SceneMonitorSchema),
|
|
29007
29198
|
lastFetchedAt: number()
|
|
29008
29199
|
});
|
|
29200
|
+
/**
|
|
29201
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
29202
|
+
*
|
|
29203
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
29204
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
29205
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
29206
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
29207
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
29208
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
29209
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
29210
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
29211
|
+
*
|
|
29212
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
29213
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
29214
|
+
*/
|
|
29215
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
29216
|
+
deviceId: number(),
|
|
29217
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
29218
|
+
});
|
|
29009
29219
|
var sceneMonitorCapability = {
|
|
29010
29220
|
name: "scene-monitor",
|
|
29011
29221
|
scope: "device",
|
|
@@ -29015,6 +29225,22 @@ var sceneMonitorCapability = {
|
|
|
29015
29225
|
deviceTypes: [DeviceType.Camera],
|
|
29016
29226
|
methods: {
|
|
29017
29227
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
29228
|
+
/**
|
|
29229
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
29230
|
+
*
|
|
29231
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
29232
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
29233
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
29234
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
29235
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
29236
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
29237
|
+
*
|
|
29238
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
29239
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
29240
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
29241
|
+
* tell which two are missing, or that any are.
|
|
29242
|
+
*/
|
|
29243
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
29018
29244
|
createScene: method(object({
|
|
29019
29245
|
deviceId: number(),
|
|
29020
29246
|
label: string(),
|
|
@@ -30850,6 +31076,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
30850
31076
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
30851
31077
|
});
|
|
30852
31078
|
/**
|
|
31079
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
31080
|
+
*
|
|
31081
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
31082
|
+
* because `snapshot: null` was already spoken for:
|
|
31083
|
+
*
|
|
31084
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
31085
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
31086
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
31087
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
31088
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
31089
|
+
*
|
|
31090
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
31091
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
31092
|
+
* which is a definite claim about a camera nobody could read.
|
|
31093
|
+
*/
|
|
31094
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
31095
|
+
deviceId: number(),
|
|
31096
|
+
read: _enum(["read", "unreadable"]),
|
|
31097
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
31098
|
+
});
|
|
31099
|
+
/**
|
|
30853
31100
|
* Time-series resolution. The history methods return one bucket per
|
|
30854
31101
|
* step over the requested range. Smaller resolutions cost more
|
|
30855
31102
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -30906,6 +31153,20 @@ var zoneAnalyticsCapability = {
|
|
|
30906
31153
|
* (no inference result emitted since boot or since binding was
|
|
30907
31154
|
* activated). */
|
|
30908
31155
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
31156
|
+
/**
|
|
31157
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
31158
|
+
*
|
|
31159
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
31160
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
31161
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
31162
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
31163
|
+
* work is unchanged.
|
|
31164
|
+
*
|
|
31165
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
31166
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
31167
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
31168
|
+
*/
|
|
31169
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
30909
31170
|
/** Time-series object count inside one zone. `className` optional —
|
|
30910
31171
|
* omit to count every class in the zone. */
|
|
30911
31172
|
getZoneHistory: method(object({
|
|
@@ -35303,6 +35564,12 @@ Object.freeze({
|
|
|
35303
35564
|
addonId: null,
|
|
35304
35565
|
access: "view"
|
|
35305
35566
|
},
|
|
35567
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35568
|
+
capName: "pipeline-analytics",
|
|
35569
|
+
capScope: "device",
|
|
35570
|
+
addonId: null,
|
|
35571
|
+
access: "view"
|
|
35572
|
+
},
|
|
35306
35573
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35307
35574
|
capName: "pipeline-analytics",
|
|
35308
35575
|
capScope: "device",
|
|
@@ -35321,6 +35588,12 @@ Object.freeze({
|
|
|
35321
35588
|
addonId: null,
|
|
35322
35589
|
access: "view"
|
|
35323
35590
|
},
|
|
35591
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
35592
|
+
capName: "pipeline-analytics",
|
|
35593
|
+
capScope: "device",
|
|
35594
|
+
addonId: null,
|
|
35595
|
+
access: "view"
|
|
35596
|
+
},
|
|
35324
35597
|
"pipelineAnalytics.getMotionEvents": {
|
|
35325
35598
|
capName: "pipeline-analytics",
|
|
35326
35599
|
capScope: "device",
|
|
@@ -36497,6 +36770,12 @@ Object.freeze({
|
|
|
36497
36770
|
addonId: null,
|
|
36498
36771
|
access: "view"
|
|
36499
36772
|
},
|
|
36773
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
36774
|
+
capName: "recording",
|
|
36775
|
+
capScope: "system",
|
|
36776
|
+
addonId: null,
|
|
36777
|
+
access: "create"
|
|
36778
|
+
},
|
|
36500
36779
|
"recording.refreshStorageLocationsForMigration": {
|
|
36501
36780
|
capName: "recording",
|
|
36502
36781
|
capScope: "system",
|
|
@@ -36623,6 +36902,12 @@ Object.freeze({
|
|
|
36623
36902
|
addonId: null,
|
|
36624
36903
|
access: "view"
|
|
36625
36904
|
},
|
|
36905
|
+
"sceneMonitor.listScenesBatch": {
|
|
36906
|
+
capName: "scene-monitor",
|
|
36907
|
+
capScope: "device",
|
|
36908
|
+
addonId: null,
|
|
36909
|
+
access: "view"
|
|
36910
|
+
},
|
|
36626
36911
|
"sceneMonitor.recheckNow": {
|
|
36627
36912
|
capName: "scene-monitor",
|
|
36628
36913
|
capScope: "device",
|
|
@@ -37979,6 +38264,12 @@ Object.freeze({
|
|
|
37979
38264
|
addonId: null,
|
|
37980
38265
|
access: "view"
|
|
37981
38266
|
},
|
|
38267
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
38268
|
+
capName: "zone-analytics",
|
|
38269
|
+
capScope: "device",
|
|
38270
|
+
addonId: null,
|
|
38271
|
+
access: "view"
|
|
38272
|
+
},
|
|
37982
38273
|
"zoneAnalytics.getUnzonedHistory": {
|
|
37983
38274
|
capName: "zone-analytics",
|
|
37984
38275
|
capScope: "device",
|
|
@@ -38968,6 +39259,11 @@ Object.freeze({
|
|
|
38968
39259
|
form: "single",
|
|
38969
39260
|
optional: false
|
|
38970
39261
|
}],
|
|
39262
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39263
|
+
name: "deviceId",
|
|
39264
|
+
form: "single",
|
|
39265
|
+
optional: true
|
|
39266
|
+
}],
|
|
38971
39267
|
"pipelineAnalytics.getGroup": [{
|
|
38972
39268
|
name: "deviceId",
|
|
38973
39269
|
form: "single",
|
|
@@ -38978,6 +39274,11 @@ Object.freeze({
|
|
|
38978
39274
|
form: "single",
|
|
38979
39275
|
optional: false
|
|
38980
39276
|
}],
|
|
39277
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
39278
|
+
name: "deviceIds",
|
|
39279
|
+
form: "array",
|
|
39280
|
+
optional: false
|
|
39281
|
+
}],
|
|
38981
39282
|
"pipelineAnalytics.getMotionEvents": [{
|
|
38982
39283
|
name: "deviceId",
|
|
38983
39284
|
form: "single",
|
|
@@ -39418,6 +39719,11 @@ Object.freeze({
|
|
|
39418
39719
|
form: "single",
|
|
39419
39720
|
optional: false
|
|
39420
39721
|
}],
|
|
39722
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
39723
|
+
name: "deviceId",
|
|
39724
|
+
form: "single",
|
|
39725
|
+
optional: true
|
|
39726
|
+
}],
|
|
39421
39727
|
"recording.relocateFootage": [{
|
|
39422
39728
|
name: "deviceId",
|
|
39423
39729
|
form: "single",
|
|
@@ -39483,6 +39789,11 @@ Object.freeze({
|
|
|
39483
39789
|
form: "single",
|
|
39484
39790
|
optional: false
|
|
39485
39791
|
}],
|
|
39792
|
+
"sceneMonitor.listScenesBatch": [{
|
|
39793
|
+
name: "deviceIds",
|
|
39794
|
+
form: "array",
|
|
39795
|
+
optional: false
|
|
39796
|
+
}],
|
|
39486
39797
|
"sceneMonitor.recheckNow": [{
|
|
39487
39798
|
name: "deviceId",
|
|
39488
39799
|
form: "single",
|
|
@@ -39744,6 +40055,11 @@ Object.freeze({
|
|
|
39744
40055
|
form: "single",
|
|
39745
40056
|
optional: false
|
|
39746
40057
|
}],
|
|
40058
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
40059
|
+
name: "deviceIds",
|
|
40060
|
+
form: "array",
|
|
40061
|
+
optional: false
|
|
40062
|
+
}],
|
|
39747
40063
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
39748
40064
|
name: "deviceId",
|
|
39749
40065
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|