@camstack/addon-provider-dreo 0.1.18 → 0.1.19
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 +194 -14
- package/dist/addon.mjs +194 -14
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -35,7 +35,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
|
|
|
35
35
|
//#endregion
|
|
36
36
|
let crypto$1 = require("crypto");
|
|
37
37
|
let events = require("events");
|
|
38
|
-
//#region ../types/dist/event-category-
|
|
38
|
+
//#region ../types/dist/event-category-H4AVePnn.mjs
|
|
39
39
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
40
40
|
EventCategory["SystemBoot"] = "system.boot";
|
|
41
41
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -185,6 +185,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
185
185
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
186
186
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
187
187
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
188
|
+
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
189
|
+
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
190
|
+
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
188
191
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
189
192
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
190
193
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -10818,10 +10821,23 @@ var deviceDiscoveryCapability = {
|
|
|
10818
10821
|
}
|
|
10819
10822
|
};
|
|
10820
10823
|
/**
|
|
10821
|
-
* Doorbell button cap.
|
|
10822
|
-
*
|
|
10823
|
-
*
|
|
10824
|
-
*
|
|
10824
|
+
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
10825
|
+
* name (same pattern as `snapshot`):
|
|
10826
|
+
*
|
|
10827
|
+
* - **Native** providers: registered per-device by device-driver
|
|
10828
|
+
* addons via `ctx.registerNativeCap` — either on a
|
|
10829
|
+
* `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
|
|
10830
|
+
* or directly on the camera (Reolink registers at camera level).
|
|
10831
|
+
* Emits an `onPressed` event every time the firmware pushes a
|
|
10832
|
+
* ring; status tracks the last press and a pressCount since start
|
|
10833
|
+
* (diagnostic).
|
|
10834
|
+
*
|
|
10835
|
+
* - **Wrapper** provider: the `virtual-doorbell` system builtin
|
|
10836
|
+
* (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
|
|
10837
|
+
* device (contact / switch / event-emitter …) into a doorbell for
|
|
10838
|
+
* a camera. `defaultActive: false` — the operator explicitly binds
|
|
10839
|
+
* it per camera in the device-bindings UI, then picks the source
|
|
10840
|
+
* device + trigger in the per-device settings.
|
|
10825
10841
|
*
|
|
10826
10842
|
* The DeviceEventPropagator re-emits `onPressed` on the camera parent
|
|
10827
10843
|
* — subscribers listening at the camera level receive ring events
|
|
@@ -10842,7 +10858,10 @@ var doorbellCapability = {
|
|
|
10842
10858
|
scope: "device",
|
|
10843
10859
|
deviceNative: true,
|
|
10844
10860
|
mode: "singleton",
|
|
10845
|
-
|
|
10861
|
+
kind: "wrapper",
|
|
10862
|
+
defaultActive: false,
|
|
10863
|
+
deviceTypes: [DeviceType.Button, DeviceType.Camera],
|
|
10864
|
+
exposesDeviceSettings: true,
|
|
10846
10865
|
methods: {},
|
|
10847
10866
|
events: {
|
|
10848
10867
|
/**
|
|
@@ -17211,6 +17230,14 @@ var ConfigEntrySchema = object({
|
|
|
17211
17230
|
value: unknown(),
|
|
17212
17231
|
description: string().optional()
|
|
17213
17232
|
});
|
|
17233
|
+
var DeviceLinkModeSchema = _enum(["auto", "manual"]);
|
|
17234
|
+
/** One resolved linked device — the compact projection consumers need. */
|
|
17235
|
+
var LinkedDeviceSchema = object({
|
|
17236
|
+
deviceId: number(),
|
|
17237
|
+
name: string(),
|
|
17238
|
+
location: string().nullable(),
|
|
17239
|
+
features: array(string())
|
|
17240
|
+
});
|
|
17214
17241
|
var SavedDeviceRowSchema = object({
|
|
17215
17242
|
/** Numeric id reserved at allocateDeviceId time. */
|
|
17216
17243
|
id: number(),
|
|
@@ -17432,7 +17459,10 @@ method(object({
|
|
|
17432
17459
|
}), _void(), {
|
|
17433
17460
|
kind: "mutation",
|
|
17434
17461
|
auth: "admin"
|
|
17435
|
-
}), 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() }),
|
|
17462
|
+
}), 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({
|
|
17463
|
+
mode: DeviceLinkModeSchema,
|
|
17464
|
+
devices: array(LinkedDeviceSchema)
|
|
17465
|
+
})), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
17436
17466
|
deviceId: number(),
|
|
17437
17467
|
values: record(string(), unknown())
|
|
17438
17468
|
}), object({ success: literal(true) }), {
|
|
@@ -18701,6 +18731,61 @@ var EventKindSchema = _enum([
|
|
|
18701
18731
|
"object",
|
|
18702
18732
|
"audio"
|
|
18703
18733
|
]);
|
|
18734
|
+
/**
|
|
18735
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
18736
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
18737
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
18738
|
+
*/
|
|
18739
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
18740
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
18741
|
+
var EventKindIconSchema = _enum([
|
|
18742
|
+
"motion",
|
|
18743
|
+
"audio",
|
|
18744
|
+
"person",
|
|
18745
|
+
"vehicle",
|
|
18746
|
+
"animal",
|
|
18747
|
+
"door",
|
|
18748
|
+
"pir",
|
|
18749
|
+
"smoke",
|
|
18750
|
+
"water",
|
|
18751
|
+
"button",
|
|
18752
|
+
"generic"
|
|
18753
|
+
]);
|
|
18754
|
+
var EventKindCategorySchema = _enum([
|
|
18755
|
+
"motion",
|
|
18756
|
+
"audio",
|
|
18757
|
+
"detection",
|
|
18758
|
+
"sensor",
|
|
18759
|
+
"custom"
|
|
18760
|
+
]);
|
|
18761
|
+
var EventKindDescriptorSchema = object({
|
|
18762
|
+
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
18763
|
+
kind: string(),
|
|
18764
|
+
label: string(),
|
|
18765
|
+
/** Hex color for timeline/legend rendering. */
|
|
18766
|
+
color: string(),
|
|
18767
|
+
icon: EventKindIconSchema,
|
|
18768
|
+
category: EventKindCategorySchema,
|
|
18769
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
18770
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
18771
|
+
source: object({
|
|
18772
|
+
capName: string(),
|
|
18773
|
+
deviceId: number()
|
|
18774
|
+
})
|
|
18775
|
+
});
|
|
18776
|
+
var SensorEventSchema = object({
|
|
18777
|
+
id: string(),
|
|
18778
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
18779
|
+
* yields N rows, one per camera). */
|
|
18780
|
+
deviceId: number(),
|
|
18781
|
+
/** The linked sensor device whose state changed. */
|
|
18782
|
+
sourceDeviceId: number(),
|
|
18783
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
18784
|
+
kind: string(),
|
|
18785
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
18786
|
+
value: record(string(), unknown()).nullable(),
|
|
18787
|
+
timestamp: number()
|
|
18788
|
+
});
|
|
18704
18789
|
var TrackPositionSchema = object({
|
|
18705
18790
|
x: number(),
|
|
18706
18791
|
y: number(),
|
|
@@ -18714,6 +18799,30 @@ var TrackSnapshotSchema = object({
|
|
|
18714
18799
|
mediaKey: string()
|
|
18715
18800
|
});
|
|
18716
18801
|
/**
|
|
18802
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
18803
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
18804
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
18805
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
18806
|
+
*/
|
|
18807
|
+
var TrackEnvelopeSchema = object({
|
|
18808
|
+
minX: number(),
|
|
18809
|
+
minY: number(),
|
|
18810
|
+
maxX: number(),
|
|
18811
|
+
maxY: number()
|
|
18812
|
+
});
|
|
18813
|
+
/**
|
|
18814
|
+
* Row projection for track list queries. `full` (default) returns the
|
|
18815
|
+
* complete Track including the frame-rate `positions[]` history and the
|
|
18816
|
+
* `snapshots[]` references — megabytes across a page of tracks. `slim`
|
|
18817
|
+
* keeps every scalar the list surfaces actually render (ids, class(es),
|
|
18818
|
+
* label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
|
|
18819
|
+
* zonesVisited, bestEventId, envelope) and returns `positions` /
|
|
18820
|
+
* `snapshots` as EMPTY arrays — detail views re-fetch the full row via
|
|
18821
|
+
* `getTrack`. Mirrors the event-store `projection` convention
|
|
18822
|
+
* (`getObjectEvents` et al.).
|
|
18823
|
+
*/
|
|
18824
|
+
var TrackProjectionSchema = _enum(["full", "slim"]);
|
|
18825
|
+
/**
|
|
18717
18826
|
* One audio-classification label heard on the track's camera while the
|
|
18718
18827
|
* track was alive, aggregated per label. An "episode" is one persisted
|
|
18719
18828
|
* audio event (the confident-classification path: score ≥ the device's
|
|
@@ -18764,7 +18873,11 @@ var TrackSchema = object({
|
|
|
18764
18873
|
/** Audio-classification labels heard on the camera during the track's
|
|
18765
18874
|
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
18766
18875
|
* Absent on legacy rows / tracks with no confident audio. */
|
|
18767
|
-
audioLabels: array(TrackAudioLabelSchema).readonly().optional()
|
|
18876
|
+
audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
|
|
18877
|
+
/** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
|
|
18878
|
+
* Populated from the persisted envelope columns on historical reads;
|
|
18879
|
+
* absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
|
|
18880
|
+
envelope: TrackEnvelopeSchema.optional()
|
|
18768
18881
|
});
|
|
18769
18882
|
var BaseEventFields = {
|
|
18770
18883
|
id: string(),
|
|
@@ -18874,11 +18987,13 @@ var MediaFileSchema = object({
|
|
|
18874
18987
|
sizeBytes: number(),
|
|
18875
18988
|
timestamp: number()
|
|
18876
18989
|
});
|
|
18990
|
+
var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
|
|
18991
|
+
var MAX_EVENT_QUERY_LIMIT = 5e3;
|
|
18877
18992
|
var DeviceEventQueryInput = object({
|
|
18878
18993
|
deviceId: number(),
|
|
18879
18994
|
since: number().optional(),
|
|
18880
18995
|
until: number().optional(),
|
|
18881
|
-
limit: number().int().min(1).max(
|
|
18996
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
|
|
18882
18997
|
/** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
|
|
18883
18998
|
* optional `mediaUrl` (populated by B5). `full` (default) keeps today's
|
|
18884
18999
|
* exact behaviour. Callers may omit this field — the store defaults to
|
|
@@ -18886,6 +19001,27 @@ var DeviceEventQueryInput = object({
|
|
|
18886
19001
|
projection: _enum(["full", "slim"]).optional()
|
|
18887
19002
|
});
|
|
18888
19003
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
19004
|
+
var RecentTracksQueryInput = object({
|
|
19005
|
+
/** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
|
|
19006
|
+
deviceIds: array(number()),
|
|
19007
|
+
/** Window lower bound on `lastSeen` (inclusive). */
|
|
19008
|
+
since: number().optional(),
|
|
19009
|
+
/** Window upper bound on `lastSeen` (inclusive). */
|
|
19010
|
+
until: number().optional(),
|
|
19011
|
+
/** Page size. Default 200, max 1000. */
|
|
19012
|
+
limit: number().int().min(1).max(1e3).default(200),
|
|
19013
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`.
|
|
19014
|
+
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
19015
|
+
cursor: string().optional(),
|
|
19016
|
+
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
19017
|
+
projection: TrackProjectionSchema.optional()
|
|
19018
|
+
});
|
|
19019
|
+
var RecentTracksPageSchema = object({
|
|
19020
|
+
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
19021
|
+
tracks: array(TrackSchema).readonly(),
|
|
19022
|
+
/** Cursor for the next page, or null when this page is the last. */
|
|
19023
|
+
nextCursor: string().nullable()
|
|
19024
|
+
});
|
|
18889
19025
|
var KeyEventQueryInput = object({
|
|
18890
19026
|
deviceId: number(),
|
|
18891
19027
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
@@ -18968,11 +19104,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18968
19104
|
deviceId: number(),
|
|
18969
19105
|
since: number().optional(),
|
|
18970
19106
|
until: number().optional(),
|
|
18971
|
-
limit: number().optional()
|
|
18972
|
-
|
|
19107
|
+
limit: number().optional(),
|
|
19108
|
+
/** Spatial filter — only tracks whose trajectory intersects the zone
|
|
19109
|
+
* (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
|
|
19110
|
+
* envelope columns, then precisely tested per position. Tracks with
|
|
19111
|
+
* an unknown envelope (no frame dims at persist time) always match. */
|
|
19112
|
+
zone: TrackZoneFilterSchema.optional(),
|
|
19113
|
+
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
19114
|
+
* compatible — omitting the field keeps today's exact behaviour). */
|
|
19115
|
+
projection: TrackProjectionSchema.optional()
|
|
19116
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
18973
19117
|
kind: "mutation",
|
|
18974
19118
|
auth: "admin"
|
|
18975
|
-
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(
|
|
19119
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
|
|
19120
|
+
deviceId: number(),
|
|
19121
|
+
since: number().optional(),
|
|
19122
|
+
until: number().optional(),
|
|
19123
|
+
kinds: array(string()).optional(),
|
|
19124
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19125
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
18976
19126
|
deviceId: number(),
|
|
18977
19127
|
since: number(),
|
|
18978
19128
|
until: number(),
|
|
@@ -22173,7 +22323,12 @@ var RecordingStorageUsageSchema = object({
|
|
|
22173
22323
|
/**
|
|
22174
22324
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
22175
22325
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
22176
|
-
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
22326
|
+
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
22327
|
+
* and the backward covered edge `prevEndMs` (exclusive end of the nearest
|
|
22328
|
+
* footage behind the epoch; `null` when none — optional so older providers
|
|
22329
|
+
* that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
|
|
22330
|
+
* small inter-segment cracks (durMs under-covers the span to the next
|
|
22331
|
+
* startMs by ~11-17 ms) instead of no-opping at a segment head.
|
|
22177
22332
|
*/
|
|
22178
22333
|
var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
22179
22334
|
kind: literal("segment"),
|
|
@@ -22182,7 +22337,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
|
22182
22337
|
bytes: number()
|
|
22183
22338
|
}), object({
|
|
22184
22339
|
kind: literal("gap"),
|
|
22185
|
-
nearestEdgeMs: number().nullable()
|
|
22340
|
+
nearestEdgeMs: number().nullable(),
|
|
22341
|
+
prevEndMs: number().nullable().optional()
|
|
22186
22342
|
})]);
|
|
22187
22343
|
/** Raw bytes of one finalized footage segment (read off disk on the recording node). */
|
|
22188
22344
|
var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
|
|
@@ -23751,6 +23907,12 @@ Object.freeze({
|
|
|
23751
23907
|
addonId: null,
|
|
23752
23908
|
access: "view"
|
|
23753
23909
|
},
|
|
23910
|
+
"deviceManager.getLinkedDevices": {
|
|
23911
|
+
capName: "device-manager",
|
|
23912
|
+
capScope: "system",
|
|
23913
|
+
addonId: null,
|
|
23914
|
+
access: "view"
|
|
23915
|
+
},
|
|
23754
23916
|
"deviceManager.getRoleDisplayDefaults": {
|
|
23755
23917
|
capName: "device-manager",
|
|
23756
23918
|
capScope: "system",
|
|
@@ -25305,6 +25467,12 @@ Object.freeze({
|
|
|
25305
25467
|
addonId: null,
|
|
25306
25468
|
access: "view"
|
|
25307
25469
|
},
|
|
25470
|
+
"pipelineAnalytics.getSensorEvents": {
|
|
25471
|
+
capName: "pipeline-analytics",
|
|
25472
|
+
capScope: "device",
|
|
25473
|
+
addonId: null,
|
|
25474
|
+
access: "view"
|
|
25475
|
+
},
|
|
25308
25476
|
"pipelineAnalytics.getTrack": {
|
|
25309
25477
|
capName: "pipeline-analytics",
|
|
25310
25478
|
capScope: "device",
|
|
@@ -25317,6 +25485,18 @@ Object.freeze({
|
|
|
25317
25485
|
addonId: null,
|
|
25318
25486
|
access: "view"
|
|
25319
25487
|
},
|
|
25488
|
+
"pipelineAnalytics.listEventKinds": {
|
|
25489
|
+
capName: "pipeline-analytics",
|
|
25490
|
+
capScope: "device",
|
|
25491
|
+
addonId: null,
|
|
25492
|
+
access: "view"
|
|
25493
|
+
},
|
|
25494
|
+
"pipelineAnalytics.listRecentTracks": {
|
|
25495
|
+
capName: "pipeline-analytics",
|
|
25496
|
+
capScope: "device",
|
|
25497
|
+
addonId: null,
|
|
25498
|
+
access: "view"
|
|
25499
|
+
},
|
|
25320
25500
|
"pipelineAnalytics.listTracks": {
|
|
25321
25501
|
capName: "pipeline-analytics",
|
|
25322
25502
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
37
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region ../types/dist/event-category-
|
|
39
|
+
//#region ../types/dist/event-category-H4AVePnn.mjs
|
|
40
40
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
41
41
|
EventCategory["SystemBoot"] = "system.boot";
|
|
42
42
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -186,6 +186,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
186
186
|
EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
|
|
187
187
|
EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
|
|
188
188
|
EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
|
|
189
|
+
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
190
|
+
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
191
|
+
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
189
192
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
190
193
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
191
194
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -10819,10 +10822,23 @@ var deviceDiscoveryCapability = {
|
|
|
10819
10822
|
}
|
|
10820
10823
|
};
|
|
10821
10824
|
/**
|
|
10822
|
-
* Doorbell button cap.
|
|
10823
|
-
*
|
|
10824
|
-
*
|
|
10825
|
-
*
|
|
10825
|
+
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
10826
|
+
* name (same pattern as `snapshot`):
|
|
10827
|
+
*
|
|
10828
|
+
* - **Native** providers: registered per-device by device-driver
|
|
10829
|
+
* addons via `ctx.registerNativeCap` — either on a
|
|
10830
|
+
* `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
|
|
10831
|
+
* or directly on the camera (Reolink registers at camera level).
|
|
10832
|
+
* Emits an `onPressed` event every time the firmware pushes a
|
|
10833
|
+
* ring; status tracks the last press and a pressCount since start
|
|
10834
|
+
* (diagnostic).
|
|
10835
|
+
*
|
|
10836
|
+
* - **Wrapper** provider: the `virtual-doorbell` system builtin
|
|
10837
|
+
* (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
|
|
10838
|
+
* device (contact / switch / event-emitter …) into a doorbell for
|
|
10839
|
+
* a camera. `defaultActive: false` — the operator explicitly binds
|
|
10840
|
+
* it per camera in the device-bindings UI, then picks the source
|
|
10841
|
+
* device + trigger in the per-device settings.
|
|
10826
10842
|
*
|
|
10827
10843
|
* The DeviceEventPropagator re-emits `onPressed` on the camera parent
|
|
10828
10844
|
* — subscribers listening at the camera level receive ring events
|
|
@@ -10843,7 +10859,10 @@ var doorbellCapability = {
|
|
|
10843
10859
|
scope: "device",
|
|
10844
10860
|
deviceNative: true,
|
|
10845
10861
|
mode: "singleton",
|
|
10846
|
-
|
|
10862
|
+
kind: "wrapper",
|
|
10863
|
+
defaultActive: false,
|
|
10864
|
+
deviceTypes: [DeviceType.Button, DeviceType.Camera],
|
|
10865
|
+
exposesDeviceSettings: true,
|
|
10847
10866
|
methods: {},
|
|
10848
10867
|
events: {
|
|
10849
10868
|
/**
|
|
@@ -17212,6 +17231,14 @@ var ConfigEntrySchema = object({
|
|
|
17212
17231
|
value: unknown(),
|
|
17213
17232
|
description: string().optional()
|
|
17214
17233
|
});
|
|
17234
|
+
var DeviceLinkModeSchema = _enum(["auto", "manual"]);
|
|
17235
|
+
/** One resolved linked device — the compact projection consumers need. */
|
|
17236
|
+
var LinkedDeviceSchema = object({
|
|
17237
|
+
deviceId: number(),
|
|
17238
|
+
name: string(),
|
|
17239
|
+
location: string().nullable(),
|
|
17240
|
+
features: array(string())
|
|
17241
|
+
});
|
|
17215
17242
|
var SavedDeviceRowSchema = object({
|
|
17216
17243
|
/** Numeric id reserved at allocateDeviceId time. */
|
|
17217
17244
|
id: number(),
|
|
@@ -17433,7 +17460,10 @@ method(object({
|
|
|
17433
17460
|
}), _void(), {
|
|
17434
17461
|
kind: "mutation",
|
|
17435
17462
|
auth: "admin"
|
|
17436
|
-
}), 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() }),
|
|
17463
|
+
}), 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({
|
|
17464
|
+
mode: DeviceLinkModeSchema,
|
|
17465
|
+
devices: array(LinkedDeviceSchema)
|
|
17466
|
+
})), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
17437
17467
|
deviceId: number(),
|
|
17438
17468
|
values: record(string(), unknown())
|
|
17439
17469
|
}), object({ success: literal(true) }), {
|
|
@@ -18702,6 +18732,61 @@ var EventKindSchema = _enum([
|
|
|
18702
18732
|
"object",
|
|
18703
18733
|
"audio"
|
|
18704
18734
|
]);
|
|
18735
|
+
/**
|
|
18736
|
+
* Spatial filter for `listTracks` — the rect + polygon variants of the shared
|
|
18737
|
+
* MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
|
|
18738
|
+
* of the camera frame (top-left origin), matching the drawing-plane editor.
|
|
18739
|
+
*/
|
|
18740
|
+
var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
|
|
18741
|
+
/** Closed icon vocabulary so clients render a known glyph per kind. */
|
|
18742
|
+
var EventKindIconSchema = _enum([
|
|
18743
|
+
"motion",
|
|
18744
|
+
"audio",
|
|
18745
|
+
"person",
|
|
18746
|
+
"vehicle",
|
|
18747
|
+
"animal",
|
|
18748
|
+
"door",
|
|
18749
|
+
"pir",
|
|
18750
|
+
"smoke",
|
|
18751
|
+
"water",
|
|
18752
|
+
"button",
|
|
18753
|
+
"generic"
|
|
18754
|
+
]);
|
|
18755
|
+
var EventKindCategorySchema = _enum([
|
|
18756
|
+
"motion",
|
|
18757
|
+
"audio",
|
|
18758
|
+
"detection",
|
|
18759
|
+
"sensor",
|
|
18760
|
+
"custom"
|
|
18761
|
+
]);
|
|
18762
|
+
var EventKindDescriptorSchema = object({
|
|
18763
|
+
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
18764
|
+
kind: string(),
|
|
18765
|
+
label: string(),
|
|
18766
|
+
/** Hex color for timeline/legend rendering. */
|
|
18767
|
+
color: string(),
|
|
18768
|
+
icon: EventKindIconSchema,
|
|
18769
|
+
category: EventKindCategorySchema,
|
|
18770
|
+
/** Which cap + device contributes this kind. For built-ins the camera
|
|
18771
|
+
* itself; for sensor kinds the LINKED source device. */
|
|
18772
|
+
source: object({
|
|
18773
|
+
capName: string(),
|
|
18774
|
+
deviceId: number()
|
|
18775
|
+
})
|
|
18776
|
+
});
|
|
18777
|
+
var SensorEventSchema = object({
|
|
18778
|
+
id: string(),
|
|
18779
|
+
/** The CAMERA the event is attributed to (a sensor linked to N cameras
|
|
18780
|
+
* yields N rows, one per camera). */
|
|
18781
|
+
deviceId: number(),
|
|
18782
|
+
/** The linked sensor device whose state changed. */
|
|
18783
|
+
sourceDeviceId: number(),
|
|
18784
|
+
/** Event kind id — matches an `EventKindDescriptor.kind`. */
|
|
18785
|
+
kind: string(),
|
|
18786
|
+
/** Snapshot of the sensor cap's runtime-state slice at the change. */
|
|
18787
|
+
value: record(string(), unknown()).nullable(),
|
|
18788
|
+
timestamp: number()
|
|
18789
|
+
});
|
|
18705
18790
|
var TrackPositionSchema = object({
|
|
18706
18791
|
x: number(),
|
|
18707
18792
|
y: number(),
|
|
@@ -18715,6 +18800,30 @@ var TrackSnapshotSchema = object({
|
|
|
18715
18800
|
mediaKey: string()
|
|
18716
18801
|
});
|
|
18717
18802
|
/**
|
|
18803
|
+
* Normalized 0..1 trajectory envelope (min/max over every position bbox,
|
|
18804
|
+
* divided by the track's detection-frame dims), computed at persist time.
|
|
18805
|
+
* Absent when the frame dims were unknown when the track was persisted
|
|
18806
|
+
* (legacy rows / dims-less sources) and on active (in-RAM) tracks.
|
|
18807
|
+
*/
|
|
18808
|
+
var TrackEnvelopeSchema = object({
|
|
18809
|
+
minX: number(),
|
|
18810
|
+
minY: number(),
|
|
18811
|
+
maxX: number(),
|
|
18812
|
+
maxY: number()
|
|
18813
|
+
});
|
|
18814
|
+
/**
|
|
18815
|
+
* Row projection for track list queries. `full` (default) returns the
|
|
18816
|
+
* complete Track including the frame-rate `positions[]` history and the
|
|
18817
|
+
* `snapshots[]` references — megabytes across a page of tracks. `slim`
|
|
18818
|
+
* keeps every scalar the list surfaces actually render (ids, class(es),
|
|
18819
|
+
* label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
|
|
18820
|
+
* zonesVisited, bestEventId, envelope) and returns `positions` /
|
|
18821
|
+
* `snapshots` as EMPTY arrays — detail views re-fetch the full row via
|
|
18822
|
+
* `getTrack`. Mirrors the event-store `projection` convention
|
|
18823
|
+
* (`getObjectEvents` et al.).
|
|
18824
|
+
*/
|
|
18825
|
+
var TrackProjectionSchema = _enum(["full", "slim"]);
|
|
18826
|
+
/**
|
|
18718
18827
|
* One audio-classification label heard on the track's camera while the
|
|
18719
18828
|
* track was alive, aggregated per label. An "episode" is one persisted
|
|
18720
18829
|
* audio event (the confident-classification path: score ≥ the device's
|
|
@@ -18765,7 +18874,11 @@ var TrackSchema = object({
|
|
|
18765
18874
|
/** Audio-classification labels heard on the camera during the track's
|
|
18766
18875
|
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
18767
18876
|
* Absent on legacy rows / tracks with no confident audio. */
|
|
18768
|
-
audioLabels: array(TrackAudioLabelSchema).readonly().optional()
|
|
18877
|
+
audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
|
|
18878
|
+
/** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
|
|
18879
|
+
* Populated from the persisted envelope columns on historical reads;
|
|
18880
|
+
* absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
|
|
18881
|
+
envelope: TrackEnvelopeSchema.optional()
|
|
18769
18882
|
});
|
|
18770
18883
|
var BaseEventFields = {
|
|
18771
18884
|
id: string(),
|
|
@@ -18875,11 +18988,13 @@ var MediaFileSchema = object({
|
|
|
18875
18988
|
sizeBytes: number(),
|
|
18876
18989
|
timestamp: number()
|
|
18877
18990
|
});
|
|
18991
|
+
var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
|
|
18992
|
+
var MAX_EVENT_QUERY_LIMIT = 5e3;
|
|
18878
18993
|
var DeviceEventQueryInput = object({
|
|
18879
18994
|
deviceId: number(),
|
|
18880
18995
|
since: number().optional(),
|
|
18881
18996
|
until: number().optional(),
|
|
18882
|
-
limit: number().int().min(1).max(
|
|
18997
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
|
|
18883
18998
|
/** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
|
|
18884
18999
|
* optional `mediaUrl` (populated by B5). `full` (default) keeps today's
|
|
18885
19000
|
* exact behaviour. Callers may omit this field — the store defaults to
|
|
@@ -18887,6 +19002,27 @@ var DeviceEventQueryInput = object({
|
|
|
18887
19002
|
projection: _enum(["full", "slim"]).optional()
|
|
18888
19003
|
});
|
|
18889
19004
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
19005
|
+
var RecentTracksQueryInput = object({
|
|
19006
|
+
/** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
|
|
19007
|
+
deviceIds: array(number()),
|
|
19008
|
+
/** Window lower bound on `lastSeen` (inclusive). */
|
|
19009
|
+
since: number().optional(),
|
|
19010
|
+
/** Window upper bound on `lastSeen` (inclusive). */
|
|
19011
|
+
until: number().optional(),
|
|
19012
|
+
/** Page size. Default 200, max 1000. */
|
|
19013
|
+
limit: number().int().min(1).max(1e3).default(200),
|
|
19014
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`.
|
|
19015
|
+
* Encodes the (lastSeen, trackId) sort position — treat as opaque. */
|
|
19016
|
+
cursor: string().optional(),
|
|
19017
|
+
/** See {@link TrackProjectionSchema}. Default `full`. */
|
|
19018
|
+
projection: TrackProjectionSchema.optional()
|
|
19019
|
+
});
|
|
19020
|
+
var RecentTracksPageSchema = object({
|
|
19021
|
+
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
19022
|
+
tracks: array(TrackSchema).readonly(),
|
|
19023
|
+
/** Cursor for the next page, or null when this page is the last. */
|
|
19024
|
+
nextCursor: string().nullable()
|
|
19025
|
+
});
|
|
18890
19026
|
var KeyEventQueryInput = object({
|
|
18891
19027
|
deviceId: number(),
|
|
18892
19028
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
@@ -18969,11 +19105,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18969
19105
|
deviceId: number(),
|
|
18970
19106
|
since: number().optional(),
|
|
18971
19107
|
until: number().optional(),
|
|
18972
|
-
limit: number().optional()
|
|
18973
|
-
|
|
19108
|
+
limit: number().optional(),
|
|
19109
|
+
/** Spatial filter — only tracks whose trajectory intersects the zone
|
|
19110
|
+
* (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
|
|
19111
|
+
* envelope columns, then precisely tested per position. Tracks with
|
|
19112
|
+
* an unknown envelope (no frame dims at persist time) always match. */
|
|
19113
|
+
zone: TrackZoneFilterSchema.optional(),
|
|
19114
|
+
/** See {@link TrackProjectionSchema}. Default `full` (backward
|
|
19115
|
+
* compatible — omitting the field keeps today's exact behaviour). */
|
|
19116
|
+
projection: TrackProjectionSchema.optional()
|
|
19117
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
18974
19118
|
kind: "mutation",
|
|
18975
19119
|
auth: "admin"
|
|
18976
|
-
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(
|
|
19120
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
|
|
19121
|
+
deviceId: number(),
|
|
19122
|
+
since: number().optional(),
|
|
19123
|
+
until: number().optional(),
|
|
19124
|
+
kinds: array(string()).optional(),
|
|
19125
|
+
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
19126
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
18977
19127
|
deviceId: number(),
|
|
18978
19128
|
since: number(),
|
|
18979
19129
|
until: number(),
|
|
@@ -22174,7 +22324,12 @@ var RecordingStorageUsageSchema = object({
|
|
|
22174
22324
|
/**
|
|
22175
22325
|
* Result of locating footage at a wall-clock instant for one device/profile.
|
|
22176
22326
|
* `segment` carries the covering segment's window; `gap` reports the forward
|
|
22177
|
-
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
22327
|
+
* nearest covered edge (`null` past the end of footage / when none exists)
|
|
22328
|
+
* and the backward covered edge `prevEndMs` (exclusive end of the nearest
|
|
22329
|
+
* footage behind the epoch; `null` when none — optional so older providers
|
|
22330
|
+
* that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
|
|
22331
|
+
* small inter-segment cracks (durMs under-covers the span to the next
|
|
22332
|
+
* startMs by ~11-17 ms) instead of no-opping at a segment head.
|
|
22178
22333
|
*/
|
|
22179
22334
|
var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
22180
22335
|
kind: literal("segment"),
|
|
@@ -22183,7 +22338,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
|
|
|
22183
22338
|
bytes: number()
|
|
22184
22339
|
}), object({
|
|
22185
22340
|
kind: literal("gap"),
|
|
22186
|
-
nearestEdgeMs: number().nullable()
|
|
22341
|
+
nearestEdgeMs: number().nullable(),
|
|
22342
|
+
prevEndMs: number().nullable().optional()
|
|
22187
22343
|
})]);
|
|
22188
22344
|
/** Raw bytes of one finalized footage segment (read off disk on the recording node). */
|
|
22189
22345
|
var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
|
|
@@ -23752,6 +23908,12 @@ Object.freeze({
|
|
|
23752
23908
|
addonId: null,
|
|
23753
23909
|
access: "view"
|
|
23754
23910
|
},
|
|
23911
|
+
"deviceManager.getLinkedDevices": {
|
|
23912
|
+
capName: "device-manager",
|
|
23913
|
+
capScope: "system",
|
|
23914
|
+
addonId: null,
|
|
23915
|
+
access: "view"
|
|
23916
|
+
},
|
|
23755
23917
|
"deviceManager.getRoleDisplayDefaults": {
|
|
23756
23918
|
capName: "device-manager",
|
|
23757
23919
|
capScope: "system",
|
|
@@ -25306,6 +25468,12 @@ Object.freeze({
|
|
|
25306
25468
|
addonId: null,
|
|
25307
25469
|
access: "view"
|
|
25308
25470
|
},
|
|
25471
|
+
"pipelineAnalytics.getSensorEvents": {
|
|
25472
|
+
capName: "pipeline-analytics",
|
|
25473
|
+
capScope: "device",
|
|
25474
|
+
addonId: null,
|
|
25475
|
+
access: "view"
|
|
25476
|
+
},
|
|
25309
25477
|
"pipelineAnalytics.getTrack": {
|
|
25310
25478
|
capName: "pipeline-analytics",
|
|
25311
25479
|
capScope: "device",
|
|
@@ -25318,6 +25486,18 @@ Object.freeze({
|
|
|
25318
25486
|
addonId: null,
|
|
25319
25487
|
access: "view"
|
|
25320
25488
|
},
|
|
25489
|
+
"pipelineAnalytics.listEventKinds": {
|
|
25490
|
+
capName: "pipeline-analytics",
|
|
25491
|
+
capScope: "device",
|
|
25492
|
+
addonId: null,
|
|
25493
|
+
access: "view"
|
|
25494
|
+
},
|
|
25495
|
+
"pipelineAnalytics.listRecentTracks": {
|
|
25496
|
+
capName: "pipeline-analytics",
|
|
25497
|
+
capScope: "device",
|
|
25498
|
+
addonId: null,
|
|
25499
|
+
access: "view"
|
|
25500
|
+
},
|
|
25321
25501
|
"pipelineAnalytics.listTracks": {
|
|
25322
25502
|
capName: "pipeline-analytics",
|
|
25323
25503
|
capScope: "device",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|