@camstack/addon-static-turn 1.1.23 → 1.1.24
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/static-turn.addon.js +176 -12
- package/dist/static-turn.addon.mjs +176 -12
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-H4AVePnn.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -149,6 +149,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
149
149
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
150
150
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
151
151
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
152
|
+
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
153
|
+
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
154
|
+
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
152
155
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
153
156
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
154
157
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -9813,7 +9816,7 @@ object({
|
|
|
9813
9816
|
deviceId: number(),
|
|
9814
9817
|
timestamp: number()
|
|
9815
9818
|
});
|
|
9816
|
-
DeviceType.Button;
|
|
9819
|
+
DeviceType.Button, DeviceType.Camera;
|
|
9817
9820
|
/**
|
|
9818
9821
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
9819
9822
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -14183,6 +14186,14 @@ var ConfigEntrySchema = object({
|
|
|
14183
14186
|
value: unknown(),
|
|
14184
14187
|
description: string().optional()
|
|
14185
14188
|
});
|
|
14189
|
+
var DeviceLinkModeSchema = _enum(["auto", "manual"]);
|
|
14190
|
+
/** One resolved linked device — the compact projection consumers need. */
|
|
14191
|
+
var LinkedDeviceSchema = object({
|
|
14192
|
+
deviceId: number(),
|
|
14193
|
+
name: string(),
|
|
14194
|
+
location: string().nullable(),
|
|
14195
|
+
features: array(string())
|
|
14196
|
+
});
|
|
14186
14197
|
var SavedDeviceRowSchema = object({
|
|
14187
14198
|
/** Numeric id reserved at allocateDeviceId time. */
|
|
14188
14199
|
id: number(),
|
|
@@ -14404,7 +14415,10 @@ method(object({
|
|
|
14404
14415
|
}), _void(), {
|
|
14405
14416
|
kind: "mutation",
|
|
14406
14417
|
auth: "admin"
|
|
14407
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }),
|
|
14418
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
14419
|
+
mode: DeviceLinkModeSchema,
|
|
14420
|
+
devices: array(LinkedDeviceSchema)
|
|
14421
|
+
})), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
14408
14422
|
deviceId: number(),
|
|
14409
14423
|
values: record(string(), unknown())
|
|
14410
14424
|
}), object({ success: literal(true) }), {
|
|
@@ -15673,6 +15687,61 @@ var EventKindSchema = _enum([
|
|
|
15673
15687
|
"object",
|
|
15674
15688
|
"audio"
|
|
15675
15689
|
]);
|
|
15690
|
+
/**
|
|
15691
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
15692
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
15693
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
15694
|
+
*/
|
|
15695
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
15696
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
15697
|
+
var EventKindIconSchema = _enum([
|
|
15698
|
+
"motion",
|
|
15699
|
+
"audio",
|
|
15700
|
+
"person",
|
|
15701
|
+
"vehicle",
|
|
15702
|
+
"animal",
|
|
15703
|
+
"door",
|
|
15704
|
+
"pir",
|
|
15705
|
+
"smoke",
|
|
15706
|
+
"water",
|
|
15707
|
+
"button",
|
|
15708
|
+
"generic"
|
|
15709
|
+
]);
|
|
15710
|
+
var EventKindCategorySchema = _enum([
|
|
15711
|
+
"motion",
|
|
15712
|
+
"audio",
|
|
15713
|
+
"detection",
|
|
15714
|
+
"sensor",
|
|
15715
|
+
"custom"
|
|
15716
|
+
]);
|
|
15717
|
+
var EventKindDescriptorSchema = object({
|
|
15718
|
+
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
15719
|
+
kind: string(),
|
|
15720
|
+
label: string(),
|
|
15721
|
+
/** Hex color for timeline/legend rendering. */
|
|
15722
|
+
color: string(),
|
|
15723
|
+
icon: EventKindIconSchema,
|
|
15724
|
+
category: EventKindCategorySchema,
|
|
15725
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15726
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
15727
|
+
source: object({
|
|
15728
|
+
capName: string(),
|
|
15729
|
+
deviceId: number()
|
|
15730
|
+
})
|
|
15731
|
+
});
|
|
15732
|
+
var SensorEventSchema = object({
|
|
15733
|
+
id: string(),
|
|
15734
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
15735
|
+
* yields N rows, one per camera). */
|
|
15736
|
+
deviceId: number(),
|
|
15737
|
+
/** The linked sensor device whose state changed. */
|
|
15738
|
+
sourceDeviceId: number(),
|
|
15739
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
15740
|
+
kind: string(),
|
|
15741
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
15742
|
+
value: record(string(), unknown()).nullable(),
|
|
15743
|
+
timestamp: number()
|
|
15744
|
+
});
|
|
15676
15745
|
var TrackPositionSchema = object({
|
|
15677
15746
|
x: number(),
|
|
15678
15747
|
y: number(),
|
|
@@ -15686,6 +15755,30 @@ var TrackSnapshotSchema = object({
|
|
|
15686
15755
|
mediaKey: string()
|
|
15687
15756
|
});
|
|
15688
15757
|
/**
|
|
15758
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
15759
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
15760
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
15761
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
15762
|
+
*/
|
|
15763
|
+
var TrackEnvelopeSchema = object({
|
|
15764
|
+
minX: number(),
|
|
15765
|
+
minY: number(),
|
|
15766
|
+
maxX: number(),
|
|
15767
|
+
maxY: number()
|
|
15768
|
+
});
|
|
15769
|
+
/**
|
|
15770
|
+
* Row projection for track list queries. `full` (default) returns the
|
|
15771
|
+
* complete Track including the frame-rate `positions[]` history and the
|
|
15772
|
+
* `snapshots[]` references — megabytes across a page of tracks. `slim`
|
|
15773
|
+
* keeps every scalar the list surfaces actually render (ids, class(es),
|
|
15774
|
+
* label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
|
|
15775
|
+
* zonesVisited, bestEventId, envelope) and returns `positions` /
|
|
15776
|
+
* `snapshots` as EMPTY arrays — detail views re-fetch the full row via
|
|
15777
|
+
* `getTrack`. Mirrors the event-store `projection` convention
|
|
15778
|
+
* (`getObjectEvents` et al.).
|
|
15779
|
+
*/
|
|
15780
|
+
var TrackProjectionSchema = _enum(["full", "slim"]);
|
|
15781
|
+
/**
|
|
15689
15782
|
* One audio-classification label heard on the track's camera while the
|
|
15690
15783
|
* track was alive, aggregated per label. An "episode" is one persisted
|
|
15691
15784
|
* audio event (the confident-classification path: score ≥ the device's
|
|
@@ -15736,7 +15829,11 @@ var TrackSchema = object({
|
|
|
15736
15829
|
/** Audio-classification labels heard on the camera during the track's
|
|
15737
15830
|
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
15738
15831
|
* Absent on legacy rows / tracks with no confident audio. */
|
|
15739
|
-
audioLabels: array(TrackAudioLabelSchema).readonly().optional()
|
|
15832
|
+
audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
|
|
15833
|
+
/** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
|
|
15834
|
+
* Populated from the persisted envelope columns on historical reads;
|
|
15835
|
+
* absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
|
|
15836
|
+
envelope: TrackEnvelopeSchema.optional()
|
|
15740
15837
|
});
|
|
15741
15838
|
var BaseEventFields = {
|
|
15742
15839
|
id: string(),
|
|
@@ -15846,11 +15943,13 @@ var MediaFileSchema = object({
|
|
|
15846
15943
|
sizeBytes: number(),
|
|
15847
15944
|
timestamp: number()
|
|
15848
15945
|
});
|
|
15946
|
+
var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
|
|
15947
|
+
var MAX_EVENT_QUERY_LIMIT = 5e3;
|
|
15849
15948
|
var DeviceEventQueryInput = object({
|
|
15850
15949
|
deviceId: number(),
|
|
15851
15950
|
since: number().optional(),
|
|
15852
15951
|
until: number().optional(),
|
|
15853
|
-
limit: number().int().min(1).max(
|
|
15952
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
|
|
15854
15953
|
/** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
|
|
15855
15954
|
* optional `mediaUrl` (populated by B5). `full` (default) keeps today's
|
|
15856
15955
|
* exact behaviour. Callers may omit this field — the store defaults to
|
|
@@ -15858,6 +15957,27 @@ var DeviceEventQueryInput = object({
|
|
|
15858
15957
|
projection: _enum(["full", "slim"]).optional()
|
|
15859
15958
|
});
|
|
15860
15959
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15960
|
+
var RecentTracksQueryInput = object({
|
|
15961
|
+
/** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
|
|
15962
|
+
deviceIds: array(number()),
|
|
15963
|
+
/** Window lower bound on `lastSeen` (inclusive). */
|
|
15964
|
+
since: number().optional(),
|
|
15965
|
+
/** Window upper bound on `lastSeen` (inclusive). */
|
|
15966
|
+
until: number().optional(),
|
|
15967
|
+
/** Page size. Default 200, max 1000. */
|
|
15968
|
+
limit: number().int().min(1).max(1e3).default(200),
|
|
15969
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`.
|
|
15970
|
+
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
15971
|
+
cursor: string().optional(),
|
|
15972
|
+
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
15973
|
+
projection: TrackProjectionSchema.optional()
|
|
15974
|
+
});
|
|
15975
|
+
var RecentTracksPageSchema = object({
|
|
15976
|
+
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
15977
|
+
tracks: array(TrackSchema).readonly(),
|
|
15978
|
+
/** Cursor for the next page, or null when this page is the last. */
|
|
15979
|
+
nextCursor: string().nullable()
|
|
15980
|
+
});
|
|
15861
15981
|
var KeyEventQueryInput = object({
|
|
15862
15982
|
deviceId: number(),
|
|
15863
15983
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
@@ -15940,11 +16060,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15940
16060
|
deviceId: number(),
|
|
15941
16061
|
since: number().optional(),
|
|
15942
16062
|
until: number().optional(),
|
|
15943
|
-
limit: number().optional()
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
16063
|
+
limit: number().optional(),
|
|
16064
|
+
/** Spatial filter — only tracks whose trajectory intersects the zone
|
|
16065
|
+
* (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
|
|
16066
|
+
* envelope columns, then precisely tested per position. Tracks with
|
|
16067
|
+
* an unknown envelope (no frame dims at persist time) always match. */
|
|
16068
|
+
zone: TrackZoneFilterSchema.optional(),
|
|
16069
|
+
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
16070
|
+
* compatible — omitting the field keeps today's exact behaviour). */
|
|
16071
|
+
projection: TrackProjectionSchema.optional()
|
|
16072
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
16073
|
+
kind: "mutation",
|
|
16074
|
+
auth: "admin"
|
|
16075
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
|
|
16076
|
+
deviceId: number(),
|
|
16077
|
+
since: number().optional(),
|
|
16078
|
+
until: number().optional(),
|
|
16079
|
+
kinds: array(string()).optional(),
|
|
16080
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
16081
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
15948
16082
|
deviceId: number(),
|
|
15949
16083
|
since: number(),
|
|
15950
16084
|
until: number(),
|
|
@@ -19168,7 +19302,12 @@ var RecordingStorageUsageSchema = object({
|
|
|
19168
19302
|
/**
|
|
19169
19303
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
19170
19304
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
19171
|
-
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19305
|
+
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19306
|
+
* and the backward covered edge `prevEndMs` (exclusive end of the nearest
|
|
19307
|
+
* footage behind the epoch; `null` when none — optional so older providers
|
|
19308
|
+
* that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
|
|
19309
|
+
* small inter-segment cracks (durMs under-covers the span to the next
|
|
19310
|
+
* startMs by ~11-17 ms) instead of no-opping at a segment head.
|
|
19172
19311
|
*/
|
|
19173
19312
|
var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
19174
19313
|
kind: literal("segment"),
|
|
@@ -19177,7 +19316,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
|
19177
19316
|
bytes: number()
|
|
19178
19317
|
}), object({
|
|
19179
19318
|
kind: literal("gap"),
|
|
19180
|
-
nearestEdgeMs: number().nullable()
|
|
19319
|
+
nearestEdgeMs: number().nullable(),
|
|
19320
|
+
prevEndMs: number().nullable().optional()
|
|
19181
19321
|
})]);
|
|
19182
19322
|
/** Raw bytes of one finalized footage segment (read off disk on the recording node). */
|
|
19183
19323
|
var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
|
|
@@ -20746,6 +20886,12 @@ Object.freeze({
|
|
|
20746
20886
|
addonId: null,
|
|
20747
20887
|
access: "view"
|
|
20748
20888
|
},
|
|
20889
|
+
"deviceManager.getLinkedDevices": {
|
|
20890
|
+
capName: "device-manager",
|
|
20891
|
+
capScope: "system",
|
|
20892
|
+
addonId: null,
|
|
20893
|
+
access: "view"
|
|
20894
|
+
},
|
|
20749
20895
|
"deviceManager.getRoleDisplayDefaults": {
|
|
20750
20896
|
capName: "device-manager",
|
|
20751
20897
|
capScope: "system",
|
|
@@ -22300,6 +22446,12 @@ Object.freeze({
|
|
|
22300
22446
|
addonId: null,
|
|
22301
22447
|
access: "view"
|
|
22302
22448
|
},
|
|
22449
|
+
"pipelineAnalytics.getSensorEvents": {
|
|
22450
|
+
capName: "pipeline-analytics",
|
|
22451
|
+
capScope: "device",
|
|
22452
|
+
addonId: null,
|
|
22453
|
+
access: "view"
|
|
22454
|
+
},
|
|
22303
22455
|
"pipelineAnalytics.getTrack": {
|
|
22304
22456
|
capName: "pipeline-analytics",
|
|
22305
22457
|
capScope: "device",
|
|
@@ -22312,6 +22464,18 @@ Object.freeze({
|
|
|
22312
22464
|
addonId: null,
|
|
22313
22465
|
access: "view"
|
|
22314
22466
|
},
|
|
22467
|
+
"pipelineAnalytics.listEventKinds": {
|
|
22468
|
+
capName: "pipeline-analytics",
|
|
22469
|
+
capScope: "device",
|
|
22470
|
+
addonId: null,
|
|
22471
|
+
access: "view"
|
|
22472
|
+
},
|
|
22473
|
+
"pipelineAnalytics.listRecentTracks": {
|
|
22474
|
+
capName: "pipeline-analytics",
|
|
22475
|
+
capScope: "device",
|
|
22476
|
+
addonId: null,
|
|
22477
|
+
access: "view"
|
|
22478
|
+
},
|
|
22315
22479
|
"pipelineAnalytics.listTracks": {
|
|
22316
22480
|
capName: "pipeline-analytics",
|
|
22317
22481
|
capScope: "device",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-H4AVePnn.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -148,6 +148,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
148
148
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
149
149
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
150
150
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
151
|
+
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
152
|
+
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
153
|
+
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
151
154
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
152
155
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
153
156
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -9812,7 +9815,7 @@ object({
|
|
|
9812
9815
|
deviceId: number(),
|
|
9813
9816
|
timestamp: number()
|
|
9814
9817
|
});
|
|
9815
|
-
DeviceType.Button;
|
|
9818
|
+
DeviceType.Button, DeviceType.Camera;
|
|
9816
9819
|
/**
|
|
9817
9820
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
9818
9821
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -14182,6 +14185,14 @@ var ConfigEntrySchema = object({
|
|
|
14182
14185
|
value: unknown(),
|
|
14183
14186
|
description: string().optional()
|
|
14184
14187
|
});
|
|
14188
|
+
var DeviceLinkModeSchema = _enum(["auto", "manual"]);
|
|
14189
|
+
/** One resolved linked device — the compact projection consumers need. */
|
|
14190
|
+
var LinkedDeviceSchema = object({
|
|
14191
|
+
deviceId: number(),
|
|
14192
|
+
name: string(),
|
|
14193
|
+
location: string().nullable(),
|
|
14194
|
+
features: array(string())
|
|
14195
|
+
});
|
|
14185
14196
|
var SavedDeviceRowSchema = object({
|
|
14186
14197
|
/** Numeric id reserved at allocateDeviceId time. */
|
|
14187
14198
|
id: number(),
|
|
@@ -14403,7 +14414,10 @@ method(object({
|
|
|
14403
14414
|
}), _void(), {
|
|
14404
14415
|
kind: "mutation",
|
|
14405
14416
|
auth: "admin"
|
|
14406
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }),
|
|
14417
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
14418
|
+
mode: DeviceLinkModeSchema,
|
|
14419
|
+
devices: array(LinkedDeviceSchema)
|
|
14420
|
+
})), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
14407
14421
|
deviceId: number(),
|
|
14408
14422
|
values: record(string(), unknown())
|
|
14409
14423
|
}), object({ success: literal(true) }), {
|
|
@@ -15672,6 +15686,61 @@ var EventKindSchema = _enum([
|
|
|
15672
15686
|
"object",
|
|
15673
15687
|
"audio"
|
|
15674
15688
|
]);
|
|
15689
|
+
/**
|
|
15690
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
15691
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
15692
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
15693
|
+
*/
|
|
15694
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
15695
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
15696
|
+
var EventKindIconSchema = _enum([
|
|
15697
|
+
"motion",
|
|
15698
|
+
"audio",
|
|
15699
|
+
"person",
|
|
15700
|
+
"vehicle",
|
|
15701
|
+
"animal",
|
|
15702
|
+
"door",
|
|
15703
|
+
"pir",
|
|
15704
|
+
"smoke",
|
|
15705
|
+
"water",
|
|
15706
|
+
"button",
|
|
15707
|
+
"generic"
|
|
15708
|
+
]);
|
|
15709
|
+
var EventKindCategorySchema = _enum([
|
|
15710
|
+
"motion",
|
|
15711
|
+
"audio",
|
|
15712
|
+
"detection",
|
|
15713
|
+
"sensor",
|
|
15714
|
+
"custom"
|
|
15715
|
+
]);
|
|
15716
|
+
var EventKindDescriptorSchema = object({
|
|
15717
|
+
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
15718
|
+
kind: string(),
|
|
15719
|
+
label: string(),
|
|
15720
|
+
/** Hex color for timeline/legend rendering. */
|
|
15721
|
+
color: string(),
|
|
15722
|
+
icon: EventKindIconSchema,
|
|
15723
|
+
category: EventKindCategorySchema,
|
|
15724
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15725
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
15726
|
+
source: object({
|
|
15727
|
+
capName: string(),
|
|
15728
|
+
deviceId: number()
|
|
15729
|
+
})
|
|
15730
|
+
});
|
|
15731
|
+
var SensorEventSchema = object({
|
|
15732
|
+
id: string(),
|
|
15733
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
15734
|
+
* yields N rows, one per camera). */
|
|
15735
|
+
deviceId: number(),
|
|
15736
|
+
/** The linked sensor device whose state changed. */
|
|
15737
|
+
sourceDeviceId: number(),
|
|
15738
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
15739
|
+
kind: string(),
|
|
15740
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
15741
|
+
value: record(string(), unknown()).nullable(),
|
|
15742
|
+
timestamp: number()
|
|
15743
|
+
});
|
|
15675
15744
|
var TrackPositionSchema = object({
|
|
15676
15745
|
x: number(),
|
|
15677
15746
|
y: number(),
|
|
@@ -15685,6 +15754,30 @@ var TrackSnapshotSchema = object({
|
|
|
15685
15754
|
mediaKey: string()
|
|
15686
15755
|
});
|
|
15687
15756
|
/**
|
|
15757
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
15758
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
15759
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
15760
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
15761
|
+
*/
|
|
15762
|
+
var TrackEnvelopeSchema = object({
|
|
15763
|
+
minX: number(),
|
|
15764
|
+
minY: number(),
|
|
15765
|
+
maxX: number(),
|
|
15766
|
+
maxY: number()
|
|
15767
|
+
});
|
|
15768
|
+
/**
|
|
15769
|
+
* Row projection for track list queries. `full` (default) returns the
|
|
15770
|
+
* complete Track including the frame-rate `positions[]` history and the
|
|
15771
|
+
* `snapshots[]` references — megabytes across a page of tracks. `slim`
|
|
15772
|
+
* keeps every scalar the list surfaces actually render (ids, class(es),
|
|
15773
|
+
* label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
|
|
15774
|
+
* zonesVisited, bestEventId, envelope) and returns `positions` /
|
|
15775
|
+
* `snapshots` as EMPTY arrays — detail views re-fetch the full row via
|
|
15776
|
+
* `getTrack`. Mirrors the event-store `projection` convention
|
|
15777
|
+
* (`getObjectEvents` et al.).
|
|
15778
|
+
*/
|
|
15779
|
+
var TrackProjectionSchema = _enum(["full", "slim"]);
|
|
15780
|
+
/**
|
|
15688
15781
|
* One audio-classification label heard on the track's camera while the
|
|
15689
15782
|
* track was alive, aggregated per label. An "episode" is one persisted
|
|
15690
15783
|
* audio event (the confident-classification path: score ≥ the device's
|
|
@@ -15735,7 +15828,11 @@ var TrackSchema = object({
|
|
|
15735
15828
|
/** Audio-classification labels heard on the camera during the track's
|
|
15736
15829
|
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
15737
15830
|
* Absent on legacy rows / tracks with no confident audio. */
|
|
15738
|
-
audioLabels: array(TrackAudioLabelSchema).readonly().optional()
|
|
15831
|
+
audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
|
|
15832
|
+
/** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
|
|
15833
|
+
* Populated from the persisted envelope columns on historical reads;
|
|
15834
|
+
* absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
|
|
15835
|
+
envelope: TrackEnvelopeSchema.optional()
|
|
15739
15836
|
});
|
|
15740
15837
|
var BaseEventFields = {
|
|
15741
15838
|
id: string(),
|
|
@@ -15845,11 +15942,13 @@ var MediaFileSchema = object({
|
|
|
15845
15942
|
sizeBytes: number(),
|
|
15846
15943
|
timestamp: number()
|
|
15847
15944
|
});
|
|
15945
|
+
var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
|
|
15946
|
+
var MAX_EVENT_QUERY_LIMIT = 5e3;
|
|
15848
15947
|
var DeviceEventQueryInput = object({
|
|
15849
15948
|
deviceId: number(),
|
|
15850
15949
|
since: number().optional(),
|
|
15851
15950
|
until: number().optional(),
|
|
15852
|
-
limit: number().int().min(1).max(
|
|
15951
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
|
|
15853
15952
|
/** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
|
|
15854
15953
|
* optional `mediaUrl` (populated by B5). `full` (default) keeps today's
|
|
15855
15954
|
* exact behaviour. Callers may omit this field — the store defaults to
|
|
@@ -15857,6 +15956,27 @@ var DeviceEventQueryInput = object({
|
|
|
15857
15956
|
projection: _enum(["full", "slim"]).optional()
|
|
15858
15957
|
});
|
|
15859
15958
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15959
|
+
var RecentTracksQueryInput = object({
|
|
15960
|
+
/** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
|
|
15961
|
+
deviceIds: array(number()),
|
|
15962
|
+
/** Window lower bound on `lastSeen` (inclusive). */
|
|
15963
|
+
since: number().optional(),
|
|
15964
|
+
/** Window upper bound on `lastSeen` (inclusive). */
|
|
15965
|
+
until: number().optional(),
|
|
15966
|
+
/** Page size. Default 200, max 1000. */
|
|
15967
|
+
limit: number().int().min(1).max(1e3).default(200),
|
|
15968
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`.
|
|
15969
|
+
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
15970
|
+
cursor: string().optional(),
|
|
15971
|
+
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
15972
|
+
projection: TrackProjectionSchema.optional()
|
|
15973
|
+
});
|
|
15974
|
+
var RecentTracksPageSchema = object({
|
|
15975
|
+
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
15976
|
+
tracks: array(TrackSchema).readonly(),
|
|
15977
|
+
/** Cursor for the next page, or null when this page is the last. */
|
|
15978
|
+
nextCursor: string().nullable()
|
|
15979
|
+
});
|
|
15860
15980
|
var KeyEventQueryInput = object({
|
|
15861
15981
|
deviceId: number(),
|
|
15862
15982
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
@@ -15939,11 +16059,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15939
16059
|
deviceId: number(),
|
|
15940
16060
|
since: number().optional(),
|
|
15941
16061
|
until: number().optional(),
|
|
15942
|
-
limit: number().optional()
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
16062
|
+
limit: number().optional(),
|
|
16063
|
+
/** Spatial filter — only tracks whose trajectory intersects the zone
|
|
16064
|
+
* (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
|
|
16065
|
+
* envelope columns, then precisely tested per position. Tracks with
|
|
16066
|
+
* an unknown envelope (no frame dims at persist time) always match. */
|
|
16067
|
+
zone: TrackZoneFilterSchema.optional(),
|
|
16068
|
+
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
16069
|
+
* compatible — omitting the field keeps today's exact behaviour). */
|
|
16070
|
+
projection: TrackProjectionSchema.optional()
|
|
16071
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
16072
|
+
kind: "mutation",
|
|
16073
|
+
auth: "admin"
|
|
16074
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
|
|
16075
|
+
deviceId: number(),
|
|
16076
|
+
since: number().optional(),
|
|
16077
|
+
until: number().optional(),
|
|
16078
|
+
kinds: array(string()).optional(),
|
|
16079
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
16080
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
15947
16081
|
deviceId: number(),
|
|
15948
16082
|
since: number(),
|
|
15949
16083
|
until: number(),
|
|
@@ -19167,7 +19301,12 @@ var RecordingStorageUsageSchema = object({
|
|
|
19167
19301
|
/**
|
|
19168
19302
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
19169
19303
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
19170
|
-
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19304
|
+
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
19305
|
+
* and the backward covered edge `prevEndMs` (exclusive end of the nearest
|
|
19306
|
+
* footage behind the epoch; `null` when none — optional so older providers
|
|
19307
|
+
* that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
|
|
19308
|
+
* small inter-segment cracks (durMs under-covers the span to the next
|
|
19309
|
+
* startMs by ~11-17 ms) instead of no-opping at a segment head.
|
|
19171
19310
|
*/
|
|
19172
19311
|
var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
19173
19312
|
kind: literal("segment"),
|
|
@@ -19176,7 +19315,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
|
19176
19315
|
bytes: number()
|
|
19177
19316
|
}), object({
|
|
19178
19317
|
kind: literal("gap"),
|
|
19179
|
-
nearestEdgeMs: number().nullable()
|
|
19318
|
+
nearestEdgeMs: number().nullable(),
|
|
19319
|
+
prevEndMs: number().nullable().optional()
|
|
19180
19320
|
})]);
|
|
19181
19321
|
/** Raw bytes of one finalized footage segment (read off disk on the recording node). */
|
|
19182
19322
|
var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
|
|
@@ -20745,6 +20885,12 @@ Object.freeze({
|
|
|
20745
20885
|
addonId: null,
|
|
20746
20886
|
access: "view"
|
|
20747
20887
|
},
|
|
20888
|
+
"deviceManager.getLinkedDevices": {
|
|
20889
|
+
capName: "device-manager",
|
|
20890
|
+
capScope: "system",
|
|
20891
|
+
addonId: null,
|
|
20892
|
+
access: "view"
|
|
20893
|
+
},
|
|
20748
20894
|
"deviceManager.getRoleDisplayDefaults": {
|
|
20749
20895
|
capName: "device-manager",
|
|
20750
20896
|
capScope: "system",
|
|
@@ -22299,6 +22445,12 @@ Object.freeze({
|
|
|
22299
22445
|
addonId: null,
|
|
22300
22446
|
access: "view"
|
|
22301
22447
|
},
|
|
22448
|
+
"pipelineAnalytics.getSensorEvents": {
|
|
22449
|
+
capName: "pipeline-analytics",
|
|
22450
|
+
capScope: "device",
|
|
22451
|
+
addonId: null,
|
|
22452
|
+
access: "view"
|
|
22453
|
+
},
|
|
22302
22454
|
"pipelineAnalytics.getTrack": {
|
|
22303
22455
|
capName: "pipeline-analytics",
|
|
22304
22456
|
capScope: "device",
|
|
@@ -22311,6 +22463,18 @@ Object.freeze({
|
|
|
22311
22463
|
addonId: null,
|
|
22312
22464
|
access: "view"
|
|
22313
22465
|
},
|
|
22466
|
+
"pipelineAnalytics.listEventKinds": {
|
|
22467
|
+
capName: "pipeline-analytics",
|
|
22468
|
+
capScope: "device",
|
|
22469
|
+
addonId: null,
|
|
22470
|
+
access: "view"
|
|
22471
|
+
},
|
|
22472
|
+
"pipelineAnalytics.listRecentTracks": {
|
|
22473
|
+
capName: "pipeline-analytics",
|
|
22474
|
+
capScope: "device",
|
|
22475
|
+
addonId: null,
|
|
22476
|
+
access: "view"
|
|
22477
|
+
},
|
|
22314
22478
|
"pipelineAnalytics.listTracks": {
|
|
22315
22479
|
capName: "pipeline-analytics",
|
|
22316
22480
|
capScope: "device",
|