unifi-protect 5.1.0 → 5.2.0
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/client/client.d.ts +1 -1
- package/dist/client/client.js +1 -1
- package/dist/client/connection.d.ts +1 -1
- package/dist/client/connection.js +3 -3
- package/dist/client/connection.js.map +1 -1
- package/dist/client/livestream-pool.d.ts +1 -1
- package/dist/client/livestream-pool.d.ts.map +1 -1
- package/dist/client/livestream-pool.js +11 -3
- package/dist/client/livestream-pool.js.map +1 -1
- package/dist/devices/camera.js +2 -2
- package/dist/devices/camera.js.map +1 -1
- package/dist/devices/chime.js +2 -2
- package/dist/devices/chime.js.map +1 -1
- package/dist/devices/device.d.ts +6 -5
- package/dist/devices/device.d.ts.map +1 -1
- package/dist/devices/device.js +1 -1
- package/dist/devices/device.js.map +1 -1
- package/dist/devices/fob.js +2 -2
- package/dist/devices/fob.js.map +1 -1
- package/dist/devices/light.js +2 -2
- package/dist/devices/light.js.map +1 -1
- package/dist/devices/registry.d.ts.map +1 -1
- package/dist/devices/registry.js +32 -21
- package/dist/devices/registry.js.map +1 -1
- package/dist/devices/relay.js +2 -2
- package/dist/devices/relay.js.map +1 -1
- package/dist/devices/sensor.js +2 -2
- package/dist/devices/sensor.js.map +1 -1
- package/dist/devices/viewer.js +2 -2
- package/dist/devices/viewer.js.map +1 -1
- package/dist/diagnostics.d.ts +12 -2
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/errors.d.ts +4 -4
- package/dist/errors.js +4 -4
- package/dist/errors.js.map +1 -1
- package/dist/event-bus.d.ts +1 -1
- package/dist/event-bus.js +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/protocol/events.d.ts +15 -8
- package/dist/protocol/events.d.ts.map +1 -1
- package/dist/protocol/events.js +13 -9
- package/dist/protocol/events.js.map +1 -1
- package/dist/protocol/packet.js +3 -3
- package/dist/protocol/packet.js.map +1 -1
- package/dist/protocol/reducer.d.ts +4 -4
- package/dist/protocol/reducer.js +1 -1
- package/dist/state/selectors.d.ts +47 -352
- package/dist/state/selectors.d.ts.map +1 -1
- package/dist/state/selectors.js +33 -56
- package/dist/state/selectors.js.map +1 -1
- package/dist/state/store.d.ts +16 -2
- package/dist/state/store.d.ts.map +1 -1
- package/dist/state/store.js +18 -2
- package/dist/state/store.js.map +1 -1
- package/dist/transport/events-stream.d.ts +2 -2
- package/dist/transport/events-stream.js +1 -1
- package/dist/transport/http.d.ts +1 -1
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/http.js +7 -6
- package/dist/transport/http.js.map +1 -1
- package/dist/transport/livestream-session.d.ts +13 -4
- package/dist/transport/livestream-session.d.ts.map +1 -1
- package/dist/transport/livestream-session.js +35 -14
- package/dist/transport/livestream-session.js.map +1 -1
- package/dist/transport/talkback-session.d.ts +1 -1
- package/dist/transport/talkback-session.js +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/util/cli/commands/watch-events.js +1 -1
- package/dist/util/cli/commands/watch-state.d.ts.map +1 -1
- package/dist/util/cli/commands/watch-state.js +8 -8
- package/dist/util/cli/commands/watch-state.js.map +1 -1
- package/dist/util/cli/lookup.d.ts.map +1 -1
- package/dist/util/cli/lookup.js +1 -0
- package/dist/util/cli/lookup.js.map +1 -1
- package/dist/util/cli/shared.d.ts +1 -1
- package/package.json +2 -2
- package/src/client/client.ts +1 -1
- package/src/client/connection.ts +3 -3
- package/src/client/livestream-pool.ts +15 -5
- package/src/devices/camera.ts +2 -2
- package/src/devices/chime.ts +2 -2
- package/src/devices/device.ts +6 -7
- package/src/devices/fob.ts +2 -2
- package/src/devices/light.ts +2 -2
- package/src/devices/registry.ts +47 -25
- package/src/devices/relay.ts +2 -2
- package/src/devices/sensor.ts +2 -2
- package/src/devices/viewer.ts +2 -2
- package/src/diagnostics.ts +13 -2
- package/src/errors.ts +5 -5
- package/src/event-bus.ts +1 -1
- package/src/index.ts +18 -13
- package/src/protocol/events.ts +24 -12
- package/src/protocol/packet.ts +3 -3
- package/src/protocol/reducer.ts +4 -4
- package/src/state/selectors.ts +59 -82
- package/src/state/store.ts +20 -2
- package/src/transport/events-stream.ts +2 -2
- package/src/transport/http.ts +8 -7
- package/src/transport/livestream-session.ts +51 -19
- package/src/transport/talkback-session.ts +1 -1
- package/src/types/index.ts +2 -2
- package/src/util/cli/commands/watch-events.ts +1 -1
- package/src/util/cli/commands/watch-state.ts +8 -10
- package/src/util/cli/lookup.ts +8 -2
- package/src/util/cli/shared.ts +1 -1
package/dist/devices/registry.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
*
|
|
3
3
|
* registry.ts: The projection factory - typed device lookup and iteration over the current state.
|
|
4
4
|
*/
|
|
5
|
-
import { selectCamera, selectCameras, selectChime, selectChimes, selectFob, selectFobs, selectLight, selectLights, selectRelay, selectRelays, selectSensor, selectSensors, selectViewer, selectViewers } from "../state/selectors.js";
|
|
6
5
|
import { Camera } from "./camera.js";
|
|
7
6
|
import { Chime } from "./chime.js";
|
|
8
7
|
import { Fob } from "./fob.js";
|
|
@@ -11,6 +10,18 @@ import { Nvr } from "./nvr.js";
|
|
|
11
10
|
import { Relay } from "./relay.js";
|
|
12
11
|
import { Sensor } from "./sensor.js";
|
|
13
12
|
import { Viewer } from "./viewer.js";
|
|
13
|
+
import { deviceSelectors } from "../state/selectors.js";
|
|
14
|
+
// The projection constructor for each category, keyed by the collection vocabulary. The mapped type pins each entry to its category's class, so the generic #lookup and
|
|
15
|
+
// #all can construct over an abstract key while every public accessor keeps its exact projection return type; a missing or transposed row is a compile error.
|
|
16
|
+
const PROJECTIONS = {
|
|
17
|
+
camera: Camera,
|
|
18
|
+
chime: Chime,
|
|
19
|
+
fob: Fob,
|
|
20
|
+
light: Light,
|
|
21
|
+
relay: Relay,
|
|
22
|
+
sensor: Sensor,
|
|
23
|
+
viewer: Viewer
|
|
24
|
+
};
|
|
14
25
|
/**
|
|
15
26
|
* The projection factory the client composes. It turns ids into live {@link DeviceProjection} handles for every device category - looked up by id or iterated as a
|
|
16
27
|
* collection against the current store snapshot - plus the id-free NVR singleton handle. This is where projection construction lives - at Layer 3 - so `StateStore`
|
|
@@ -28,31 +39,31 @@ export class DeviceRegistry {
|
|
|
28
39
|
}
|
|
29
40
|
/** Look up a camera by id, or `undefined` when no such camera is in the current state. */
|
|
30
41
|
camera(id) {
|
|
31
|
-
return this.#lookup(
|
|
42
|
+
return this.#lookup("camera", id);
|
|
32
43
|
}
|
|
33
44
|
/** Look up a chime by id, or `undefined` when absent. */
|
|
34
45
|
chime(id) {
|
|
35
|
-
return this.#lookup(
|
|
46
|
+
return this.#lookup("chime", id);
|
|
36
47
|
}
|
|
37
48
|
/** Look up a fob by id, or `undefined` when absent. */
|
|
38
49
|
fob(id) {
|
|
39
|
-
return this.#lookup(
|
|
50
|
+
return this.#lookup("fob", id);
|
|
40
51
|
}
|
|
41
52
|
/** Look up a light by id, or `undefined` when absent. */
|
|
42
53
|
light(id) {
|
|
43
|
-
return this.#lookup(
|
|
54
|
+
return this.#lookup("light", id);
|
|
44
55
|
}
|
|
45
56
|
/** Look up a relay by id, or `undefined` when absent. */
|
|
46
57
|
relay(id) {
|
|
47
|
-
return this.#lookup(
|
|
58
|
+
return this.#lookup("relay", id);
|
|
48
59
|
}
|
|
49
60
|
/** Look up a sensor by id, or `undefined` when absent. */
|
|
50
61
|
sensor(id) {
|
|
51
|
-
return this.#lookup(
|
|
62
|
+
return this.#lookup("sensor", id);
|
|
52
63
|
}
|
|
53
64
|
/** Look up a viewer by id, or `undefined` when absent. */
|
|
54
65
|
viewer(id) {
|
|
55
|
-
return this.#lookup(
|
|
66
|
+
return this.#lookup("viewer", id);
|
|
56
67
|
}
|
|
57
68
|
/**
|
|
58
69
|
* The NVR singleton projection. Unlike the device lookups there is no id and no `undefined`: the NVR is a singleton, so this always returns a handle. Its getters throw
|
|
@@ -63,40 +74,40 @@ export class DeviceRegistry {
|
|
|
63
74
|
}
|
|
64
75
|
/** Every camera in the current state, as live projections. */
|
|
65
76
|
cameras() {
|
|
66
|
-
return this.#all(
|
|
77
|
+
return this.#all("camera");
|
|
67
78
|
}
|
|
68
79
|
/** Every chime in the current state, as live projections. */
|
|
69
80
|
chimes() {
|
|
70
|
-
return this.#all(
|
|
81
|
+
return this.#all("chime");
|
|
71
82
|
}
|
|
72
83
|
/** Every fob in the current state, as live projections. */
|
|
73
84
|
fobs() {
|
|
74
|
-
return this.#all(
|
|
85
|
+
return this.#all("fob");
|
|
75
86
|
}
|
|
76
87
|
/** Every light in the current state, as live projections. */
|
|
77
88
|
lights() {
|
|
78
|
-
return this.#all(
|
|
89
|
+
return this.#all("light");
|
|
79
90
|
}
|
|
80
91
|
/** Every relay in the current state, as live projections. */
|
|
81
92
|
relays() {
|
|
82
|
-
return this.#all(
|
|
93
|
+
return this.#all("relay");
|
|
83
94
|
}
|
|
84
95
|
/** Every sensor in the current state, as live projections. */
|
|
85
96
|
sensors() {
|
|
86
|
-
return this.#all(
|
|
97
|
+
return this.#all("sensor");
|
|
87
98
|
}
|
|
88
99
|
/** Every viewer in the current state, as live projections. */
|
|
89
100
|
viewers() {
|
|
90
|
-
return this.#all(
|
|
101
|
+
return this.#all("viewer");
|
|
91
102
|
}
|
|
92
|
-
// Build one projection if its id is present in the current snapshot, else undefined. The presence check reads through the by-id selector so lookup and the
|
|
93
|
-
// share one notion of "exists".
|
|
94
|
-
#lookup(
|
|
95
|
-
return (byId(id)(this.#ctx.store.snapshot()) !== undefined) ? new
|
|
103
|
+
// Build one projection if its id is present in the current snapshot, else undefined. The presence check reads through the category's by-id selector so lookup and the
|
|
104
|
+
// projection share one notion of "exists"; the key correlates the selector and the constructor through PROJECTIONS, so a mismatched pair cannot compile.
|
|
105
|
+
#lookup(key, id) {
|
|
106
|
+
return (deviceSelectors[key].byId(id)(this.#ctx.store.snapshot()) !== undefined) ? new PROJECTIONS[key](this.#ctx, id) : undefined;
|
|
96
107
|
}
|
|
97
108
|
// Map the memoized config array for a collection to fresh projection handles. One helper for every device collection keeps the construction logic single-source.
|
|
98
|
-
#all(
|
|
99
|
-
return all(this.#ctx.store.snapshot()).map((config) => new
|
|
109
|
+
#all(key) {
|
|
110
|
+
return deviceSelectors[key].all(this.#ctx.store.snapshot()).map((config) => new PROJECTIONS[key](this.#ctx, config.id));
|
|
100
111
|
}
|
|
101
112
|
}
|
|
102
113
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/devices/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/devices/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAexD,wKAAwK;AACxK,8JAA8J;AAC9J,MAAM,WAAW,GAA8G;IAE7H,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,KAAK;IACZ,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;CACf,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,OAAO,cAAc;IA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/selectors.js";
|
|
3
3
|
/**
|
|
4
4
|
* A relay projection. Inherits the read-through getters, live `observe`, and write-through `update` / `reboot` from {@link DeviceProjection}, and adds the one
|
|
5
5
|
* relay-specific command: {@link Relay.toggleOutput}, the faithful primitive over the controller's per-output activate endpoint.
|
|
@@ -9,7 +9,7 @@ import { selectRelay } from "../state/selectors.js";
|
|
|
9
9
|
export class Relay extends DeviceProjection {
|
|
10
10
|
modelKey = "relay";
|
|
11
11
|
constructor(ctx, id) {
|
|
12
|
-
super(ctx, id,
|
|
12
|
+
super(ctx, id, deviceSelectors.relay.byId);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Toggle one of the relay's outputs. The controller exposes a single latching toggle per output: each call flips that output's `state` (off becomes on, on becomes off)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay.js","sourceRoot":"","sources":["../../src/devices/relay.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"relay.js","sourceRoot":"","sources":["../../src/devices/relay.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,OAAO,KAAM,SAAQ,gBAAoC;IAEpD,QAAQ,GAAG,OAAO,CAAC;IAE5B,YAAY,GAAkB,EAAE,EAAU;QAExC,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,YAAY,CAAC,QAAgB,EAAE,OAAiC,EAAE;QAEtE,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,QAAQ,EAAE,GAAG,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;CACF"}
|
package/dist/devices/sensor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceProjection } from "./device.js";
|
|
2
|
-
import {
|
|
2
|
+
import { deviceSelectors } from "../state/selectors.js";
|
|
3
3
|
/**
|
|
4
4
|
* A sensor projection. Inherits the read-through getters, live `observe`, and write-through `update` from {@link DeviceProjection}; sensor-specific behavior
|
|
5
5
|
* (sensitivity, mount type, thresholds) is expressed through `update` payloads.
|
|
@@ -9,7 +9,7 @@ import { selectSensor } from "../state/selectors.js";
|
|
|
9
9
|
export class Sensor extends DeviceProjection {
|
|
10
10
|
modelKey = "sensor";
|
|
11
11
|
constructor(ctx, id) {
|
|
12
|
-
super(ctx, id,
|
|
12
|
+
super(ctx, id, deviceSelectors.sensor.byId);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=sensor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sensor.js","sourceRoot":"","sources":["../../src/devices/sensor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sensor.js","sourceRoot":"","sources":["../../src/devices/sensor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,OAAO,MAAO,SAAQ,gBAAqC;IAEtD,QAAQ,GAAG,QAAQ,CAAC;IAE7B,YAAY,GAAkB,EAAE,EAAU;QAExC,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
package/dist/devices/viewer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceProjection } from "./device.js";
|
|
2
|
-
import {
|
|
2
|
+
import { deviceSelectors } from "../state/selectors.js";
|
|
3
3
|
/**
|
|
4
4
|
* A viewer projection. Inherits the read-through getters, live `observe`, and write-through `update` from {@link DeviceProjection}; viewer-specific behavior
|
|
5
5
|
* (assigned liveview) is expressed through `update` payloads.
|
|
@@ -9,7 +9,7 @@ import { selectViewer } from "../state/selectors.js";
|
|
|
9
9
|
export class Viewer extends DeviceProjection {
|
|
10
10
|
modelKey = "viewer";
|
|
11
11
|
constructor(ctx, id) {
|
|
12
|
-
super(ctx, id,
|
|
12
|
+
super(ctx, id, deviceSelectors.viewer.byId);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=viewer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../../src/devices/viewer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../../src/devices/viewer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,OAAO,MAAO,SAAQ,gBAAqC;IAEtD,QAAQ,GAAG,QAAQ,CAAC;IAE7B,YAAY,GAAkB,EAAE,EAAU;QAExC,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
package/dist/diagnostics.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export interface EventsClosedPayload {
|
|
|
135
135
|
reason: string;
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
* Payload published on {@link channels.eventsPacket}. `kind` is a `TypedEvent`
|
|
138
|
+
* Payload published on {@link channels.eventsPacket}. `kind` is a `TypedEvent` tag; `modelKey` and `id` are present for device-scoped events.
|
|
139
139
|
*
|
|
140
140
|
* @category Diagnostics
|
|
141
141
|
*/
|
|
@@ -161,6 +161,11 @@ export interface EventsReconnectingPayload {
|
|
|
161
161
|
export interface HttpRequestEndPayload {
|
|
162
162
|
durationMs: number;
|
|
163
163
|
error?: string;
|
|
164
|
+
/**
|
|
165
|
+
* The controller address this client was built against, verbatim as supplied to `ProtectClient.connect()`. The structured identity that scopes a payload to one
|
|
166
|
+
* controller on the process-global diagnostics channel, mirroring `cameraId` on the livestream payloads.
|
|
167
|
+
*/
|
|
168
|
+
host: string;
|
|
164
169
|
method: string;
|
|
165
170
|
requestId: string;
|
|
166
171
|
statusCode?: number;
|
|
@@ -172,6 +177,11 @@ export interface HttpRequestEndPayload {
|
|
|
172
177
|
* @category Diagnostics
|
|
173
178
|
*/
|
|
174
179
|
export interface HttpRequestStartPayload {
|
|
180
|
+
/**
|
|
181
|
+
* The controller address this client was built against, verbatim as supplied to `ProtectClient.connect()`. The structured identity that scopes a payload to one
|
|
182
|
+
* controller on the process-global diagnostics channel, mirroring `cameraId` on the livestream payloads.
|
|
183
|
+
*/
|
|
184
|
+
host: string;
|
|
175
185
|
method: string;
|
|
176
186
|
requestId: string;
|
|
177
187
|
url: string;
|
|
@@ -285,7 +295,7 @@ export interface LivestreamSubscriptionDisposedPayload {
|
|
|
285
295
|
subscriptionId: string;
|
|
286
296
|
}
|
|
287
297
|
/**
|
|
288
|
-
* Payload published on {@link channels.schemaUnknownModelKey}. `action` and `exampleId` are the
|
|
298
|
+
* Payload published on {@link channels.schemaUnknownModelKey}. `action` and `exampleId` are the identifying fields from the offending packet's header so a consumer
|
|
289
299
|
* can correlate the drift signal with concrete wire activity (e.g., "modelKey 'garage' first seen at action 'add' with id <uuid>"). The library does not accumulate or
|
|
290
300
|
* aggregate beyond the first-occurrence dedup; consumers building dashboards add their own counters from this channel.
|
|
291
301
|
*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AAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,2BAA2B,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAE3C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gCAAgC;IAE/C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAE3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAE3C,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -180,13 +180,13 @@ export declare class ProtectProtocolError extends FatalError {
|
|
|
180
180
|
*
|
|
181
181
|
* @returns Never returns - always throws.
|
|
182
182
|
*
|
|
183
|
-
* @throws {@link ProtectProtocolError} always, naming the unhandled variant's
|
|
183
|
+
* @throws {@link ProtectProtocolError} always, naming the unhandled variant's tag.
|
|
184
184
|
*
|
|
185
185
|
* @category Errors
|
|
186
186
|
*/
|
|
187
187
|
export declare function assertNever(value: never): never;
|
|
188
188
|
/**
|
|
189
|
-
* The bootstrap sequence failed while fetching or parsing the controller bootstrap document. `stage`
|
|
189
|
+
* The bootstrap sequence failed while fetching or parsing the controller bootstrap document. `stage` marks which - `"fetch"` when the bootstrap endpoint returns
|
|
190
190
|
* a non-2xx status or the transport fails reaching it, `"parse"` when the body cannot be decoded - so the caller and the diagnostics surface can report the precise point
|
|
191
191
|
* of failure rather than a generic "connect failed." A login or reachability failure is not wrapped here; it propagates as its own typed fatal.
|
|
192
192
|
*
|
|
@@ -201,7 +201,7 @@ export declare class ProtectBootstrapError extends FatalError {
|
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
|
-
* The stages of the `connect()` sequence, used to
|
|
204
|
+
* The stages of the `connect()` sequence, used to tag a {@link ProtectBootstrapError}. The sequence authenticates, fetches the bootstrap document, parses it,
|
|
205
205
|
* then subscribes to the realtime stream; only the fetch and parse stages are wrapped as a bootstrap error, because a login or reachability failure already propagates as
|
|
206
206
|
* its own typed fatal (`ProtectAuthError` / `ProtectNetworkError`).
|
|
207
207
|
*
|
|
@@ -228,7 +228,7 @@ export declare class ProtectCodecChangeError extends FatalError {
|
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
231
|
-
* A pooled livestream's recovery policy gave up. The `phase`
|
|
231
|
+
* A pooled livestream's recovery policy gave up. The `phase` names which of the two regimes the pool runs: `establishing` means the first segment never arrived within
|
|
232
232
|
* the bounded establishment deadline (the stream that never produced media), and `recovering` means a previously-live stream could not be re-established and the policy
|
|
233
233
|
* elected to stop. Fatal because the policy - the single authority over whether to keep trying - has declared the stream unrecoverable; the consumer re-subscribes if it
|
|
234
234
|
* still wants the stream. `attempts` carries how many consecutive reconnect attempts the episode made before the policy returned `giveUp`.
|
package/dist/errors.js
CHANGED
|
@@ -183,19 +183,19 @@ export class ProtectProtocolError extends FatalError {
|
|
|
183
183
|
*
|
|
184
184
|
* @returns Never returns - always throws.
|
|
185
185
|
*
|
|
186
|
-
* @throws {@link ProtectProtocolError} always, naming the unhandled variant's
|
|
186
|
+
* @throws {@link ProtectProtocolError} always, naming the unhandled variant's tag.
|
|
187
187
|
*
|
|
188
188
|
* @category Errors
|
|
189
189
|
*/
|
|
190
190
|
export function assertNever(value) {
|
|
191
|
-
// `value` is statically `never`, so we read its runtime shape defensively: an object variant surfaces its `kind`
|
|
191
|
+
// `value` is statically `never`, so we read its runtime shape defensively: an object variant surfaces its `kind` tag, anything else (a bare string such as a
|
|
192
192
|
// modelKey) surfaces its string form.
|
|
193
193
|
const variant = value;
|
|
194
194
|
const detail = ((typeof variant === "object") && (variant !== null) && ("kind" in variant)) ? String(variant.kind) : String(variant);
|
|
195
195
|
throw new ProtectProtocolError("Encountered an unhandled variant in an exhaustive switch: " + detail + ".");
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
|
-
* The bootstrap sequence failed while fetching or parsing the controller bootstrap document. `stage`
|
|
198
|
+
* The bootstrap sequence failed while fetching or parsing the controller bootstrap document. `stage` marks which - `"fetch"` when the bootstrap endpoint returns
|
|
199
199
|
* a non-2xx status or the transport fails reaching it, `"parse"` when the body cannot be decoded - so the caller and the diagnostics surface can report the precise point
|
|
200
200
|
* of failure rather than a generic "connect failed." A login or reachability failure is not wrapped here; it propagates as its own typed fatal.
|
|
201
201
|
*
|
|
@@ -229,7 +229,7 @@ export class ProtectCodecChangeError extends FatalError {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
232
|
-
* A pooled livestream's recovery policy gave up. The `phase`
|
|
232
|
+
* A pooled livestream's recovery policy gave up. The `phase` names which of the two regimes the pool runs: `establishing` means the first segment never arrived within
|
|
233
233
|
* the bounded establishment deadline (the stream that never produced media), and `recovering` means a previously-live stream could not be re-established and the policy
|
|
234
234
|
* elected to stop. Fatal because the policy - the single authority over whether to keep trying - has declared the stream unrecoverable; the consumer re-subscribes if it
|
|
235
235
|
* still wants the stream. `attempts` carries how many consecutive reconnect attempts the episode made before the policy returned `giveUp`.
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAgB,YAAa,SAAQ,KAAK;IAE9C,iKAAiK;IACjK,+JAA+J;IAC/J,+CAA+C;IAC/C,YAAsB,OAAe,EAAE,OAA6B;QAElE,KAAK,CAAC,OAAO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AAK,QAAQ,CAAC,EAAE,CAAC;QAEhH,OAAO,KAA8B,CAAC;IACxC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/event-bus.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface StreamOptions {
|
|
|
11
11
|
* A typed facade over `node:events.EventEmitter` that exposes exactly three subscription shapes - the canonical contract every event-producing subsystem in this
|
|
12
12
|
* library presents (`Transport`, `EventStream`, `ConnectionMonitor`, `LivestreamSession`, `ProtectClient`).
|
|
13
13
|
*
|
|
14
|
-
* We *compose* `EventEmitter` rather than *extend* it, for several
|
|
14
|
+
* We *compose* `EventEmitter` rather than *extend* it, for several concrete reasons:
|
|
15
15
|
*
|
|
16
16
|
* 1. {@link on} returns a `Disposable`, not `this`. `using sub = bus.on(...)` auto-cleans at scope exit, so listener leaks are prevented structurally rather than by
|
|
17
17
|
* discipline - and inline arrow handlers are fine because the handle, not the function identity, is what unsubscribes.
|
package/dist/event-bus.js
CHANGED
|
@@ -13,7 +13,7 @@ const EVENT_NAME_PREFIX = "ufp:event:";
|
|
|
13
13
|
* A typed facade over `node:events.EventEmitter` that exposes exactly three subscription shapes - the canonical contract every event-producing subsystem in this
|
|
14
14
|
* library presents (`Transport`, `EventStream`, `ConnectionMonitor`, `LivestreamSession`, `ProtectClient`).
|
|
15
15
|
*
|
|
16
|
-
* We *compose* `EventEmitter` rather than *extend* it, for several
|
|
16
|
+
* We *compose* `EventEmitter` rather than *extend* it, for several concrete reasons:
|
|
17
17
|
*
|
|
18
18
|
* 1. {@link on} returns a `Disposable`, not `this`. `using sub = bus.on(...)` auto-cleans at scope exit, so listener leaks are prevented structurally rather than by
|
|
19
19
|
* discipline - and inline arrow handlers are fine because the handle, not the function identity, is what unsubscribes.
|
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,14 @@ export { wallClock } from "./clock.ts";
|
|
|
9
9
|
export type { Clock } from "./clock.ts";
|
|
10
10
|
export type { ProtectEventHeader, RawPacket } from "./protocol/packet.ts";
|
|
11
11
|
export type { LivestreamSource, Segment } from "./transport/livestream-session.ts";
|
|
12
|
-
export
|
|
12
|
+
export { DEVICE_COLLECTION_KEYS } from "./protocol/events.ts";
|
|
13
|
+
export type { AuthMethod, DeviceCollectionKey, SmartDetectType, StateModelKey, TypedEvent } from "./protocol/events.ts";
|
|
13
14
|
export type { TalkbackSession, TalkbackState } from "./transport/talkback-session.ts";
|
|
14
15
|
export type { ProtectState } from "./protocol/reducer.ts";
|
|
15
|
-
export { isDeviceAdopted, isDeviceOnline,
|
|
16
|
-
export type {
|
|
16
|
+
export { deviceSelectors, isDeviceAdopted, isDeviceOnline, livestreamAudioSampleRate, selectAuthUser, selectControllerName, selectIsAdmin, selectLiveview, selectLiveviews, selectNvr, selectRingtone, selectRingtones } from "./state/selectors.ts";
|
|
17
|
+
export type { CollectionSelectors, CollectionViews, ProtectDeviceConfigMap } from "./state/selectors.ts";
|
|
18
|
+
export { createStateStore } from "./state/store.ts";
|
|
19
|
+
export type { StateStore, StateStoreOptions } from "./state/store.ts";
|
|
17
20
|
export type { Camera, LivestreamOptions, SnapshotOptions } from "./devices/camera.ts";
|
|
18
21
|
export type { Chime, PlaySpeakerOptions } from "./devices/chime.ts";
|
|
19
22
|
export type { DeviceProjection, Projection, ProtectDeviceConfig } from "./devices/device.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,YAAY,EACjJ,iCAAiC,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAChK,uB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,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,2BAA2B,EACvJ,gCAAgC,EAAE,iCAAiC,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,uBAAuB,EACnJ,gCAAgC,EAAE,+BAA+B,EAAE,wCAAwC,EAAE,mBAAmB,EAAE,4BAA4B,EAC9J,gCAAgC,EAAE,yCAAyC,EAAE,wBAAwB,EAAE,iCAAiC,EAAE,gBAAgB,EAC1J,yBAAyB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,iCAAiC,EAC1G,mBAAmB,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,mCAAmC,EAAE,2BAA2B,EAC/I,oCAAoC,EAAE,iCAAiC,EAAE,0CAA0C,EAAE,8BAA8B,EACnJ,uCAAuC,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,22 +9,29 @@
|
|
|
9
9
|
// - `export type` only for what a consumer receives but never builds: the device projections, the getter-return classes (StateStore / ConnectionMonitor / Transport /
|
|
10
10
|
// ProtectResponse / LivestreamSubscription), and every event, state, option, and domain type reachable from a public signature. Exporting these as types makes a
|
|
11
11
|
// second composition path unrepresentable - there is exactly one way to build a client, ProtectClient.connect() - so the single-source-of-truth rule is enforced by
|
|
12
|
-
// the compiler rather than by documentation.
|
|
12
|
+
// the compiler rather than by documentation. The one blessed exception is `createStateStore`, a value export that constructs the real store standalone for test
|
|
13
|
+
// harnesses; it widens only the store's own construction, never the client's, which stays the single `connect()` path.
|
|
13
14
|
// - Export nothing that is pure composition internals: AuthSession, EventStream, EventBus, LivestreamSession, LivestreamPool, DeviceRegistry, the free codec/reducer
|
|
14
15
|
// functions, and the internal seams and helpers. They are reachable in source for the reader, never on the published surface.
|
|
15
16
|
//
|
|
16
17
|
// The test the next contributor applies to any new symbol: does a consumer construct or call it (value), receive it (type), or neither (internal)? That keeps this file
|
|
17
18
|
// a deliberate, reviewable contract rather than whatever each module happens to export.
|
|
18
|
-
// Errors - the typed hierarchy. Consumers branch on these with `instanceof`, so they are value exports; the bootstrap-stage
|
|
19
|
+
// Errors - the typed hierarchy. Consumers branch on these with `instanceof`, so they are value exports; the bootstrap-stage tag is a type.
|
|
19
20
|
export { FatalError, ProtectAbortedError, ProtectAuthError, ProtectAuthorizationError, ProtectBootstrapError, ProtectCodecChangeError, ProtectError, ProtectLivestreamUnavailableError, ProtectNetworkError, ProtectProtocolError, ProtectRequestError, ProtectStallError, ProtectThrottledError, ProtectTimeoutError, ProtectUnsupportedError, RecoverableError } from "./errors.js";
|
|
20
21
|
// Logging - the consumer-injectable logger interface and the silent default a consumer may pass to suppress output.
|
|
21
22
|
export { noopLog } from "./logging.js";
|
|
22
23
|
// Clock - the time abstraction (a ConnectOptions seam) and its production implementation a consumer may reuse.
|
|
23
24
|
export { wallClock } from "./clock.js";
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
// The id-keyed device-collection vocabulary - the category key set the selector catalog and every per-category consumer iterate over. A value export (a consumer iterates
|
|
26
|
+
// the runtime array to reach a category's selectors) plus its type; `DeviceModelKey` stays internal, since the collection vocabulary is the consumer-facing surface.
|
|
27
|
+
export { DEVICE_COLLECTION_KEYS } from "./protocol/events.js";
|
|
28
|
+
// State - the observable store a consumer receives from `client.state`, and the memoized selectors a consumer passes to `observe` (or calls directly). `deviceSelectors`
|
|
29
|
+
// is the category-keyed catalog: `deviceSelectors.<category>` exposes that collection's quartet (`all`, `byId`, `online`, `adoptedIds`), and `adoptedIds` is the
|
|
30
|
+
// content-memoized membership set - it changes reference only when a device is adopted or removed, so a consumer can `observe` one to drive accessory add/remove without
|
|
31
|
+
// waking on routine config churn. `ProtectDeviceConfigMap` and the `CollectionSelectors` / `CollectionViews` shapes type a consumer's own generic iteration over it.
|
|
32
|
+
// `livestreamAudioSampleRate` is the single source for a camera's fMP4 livestream audio sample rate - a doorbell's 48 kHz versus every other camera's 16 kHz.
|
|
33
|
+
export { deviceSelectors, isDeviceAdopted, isDeviceOnline, livestreamAudioSampleRate, selectAuthUser, selectControllerName, selectIsAdmin, selectLiveview, selectLiveviews, selectNvr, selectRingtone, selectRingtones } from "./state/selectors.js";
|
|
34
|
+
export { createStateStore } from "./state/store.js";
|
|
28
35
|
// Client - the one entry point. ProtectClient is a value export for its static `connect()` factory and `instanceof`; everything reachable through its getters
|
|
29
36
|
// (ConnectionMonitor, LivestreamSubscription) and its method signatures is a type.
|
|
30
37
|
export { ProtectClient } from "./client/client.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wJAAwJ;AACxJ,EAAE;AACF,qKAAqK;AACrK,8GAA8G;AAC9G,wKAAwK;AACxK,qKAAqK;AACrK,wKAAwK;AACxK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wJAAwJ;AACxJ,EAAE;AACF,qKAAqK;AACrK,8GAA8G;AAC9G,wKAAwK;AACxK,qKAAqK;AACrK,wKAAwK;AACxK,oKAAoK;AACpK,2HAA2H;AAC3H,uKAAuK;AACvK,kIAAkI;AAClI,EAAE;AACF,wKAAwK;AACxK,wFAAwF;AAExF,2IAA2I;AAC3I,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,YAAY,EACjJ,iCAAiC,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAChK,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGjE,oHAAoH;AACpH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAcvC,+GAA+G;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AASvC,0KAA0K;AAC1K,qKAAqK;AACrK,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAO9D,yKAAyK;AACzK,iKAAiK;AACjK,yKAAyK;AACzK,qKAAqK;AACrK,8JAA8J;AAC9J,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,yBAAyB,EAAE,cAAc,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EACvJ,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAepD,8JAA8J;AAC9J,mFAAmF;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,0KAA0K;AAC1K,gGAAgG;AAChG,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAI9E,mIAAmI;AACnI,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAQ5C,8IAA8I;AAC9I,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,kCAAkC,EAAE,+BAA+B,EACpJ,kCAAkC,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,uCAAuC,EAC7I,uCAAuC,EAAE,wCAAwC,EAAE,oCAAoC,EAAE,sCAAsC,EAC/J,qCAAqC,EACrC,kCAAkC,EAAE,iCAAiC,EAAE,mCAAmC,EAAE,mCAAmC,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -12,19 +12,26 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { DeepPartial, ProtectNvrBootstrap, ProtectStateRecord } from "../types/index.ts";
|
|
14
14
|
import type { RawPacket } from "./packet.ts";
|
|
15
|
-
declare const
|
|
15
|
+
export declare const DEVICE_COLLECTION_KEYS: readonly ["camera", "chime", "fob", "light", "relay", "sensor", "viewer"];
|
|
16
|
+
declare const DEVICE_MODEL_KEYS: readonly ["camera", "chime", "fob", "light", "relay", "sensor", "viewer", "nvr"];
|
|
16
17
|
/** @internal */
|
|
17
|
-
declare const STATE_MODEL_KEYS: readonly ["camera", "chime", "fob", "light", "
|
|
18
|
-
declare const KNOWN_MODEL_KEYS: readonly ["camera", "chime", "fob", "light", "
|
|
18
|
+
declare const STATE_MODEL_KEYS: readonly ["camera", "chime", "fob", "light", "relay", "sensor", "viewer", "nvr", "liveview", "user"];
|
|
19
|
+
declare const KNOWN_MODEL_KEYS: readonly ["camera", "chime", "fob", "light", "relay", "sensor", "viewer", "nvr", "liveview", "user", "activeSessionStat", "aiport", "aiprocessor", "bridge", "event", "group", "linkstation", "smartDetectObject"];
|
|
19
20
|
/**
|
|
20
|
-
* The
|
|
21
|
+
* The id-keyed device collections - every `DeviceModelKey` except the NVR singleton. The vocabulary the device selectors, the projections, and every per-category
|
|
22
|
+
* consumer iterate over; the innermost tier of the modelKey taxonomy.
|
|
23
|
+
*/
|
|
24
|
+
export type DeviceCollectionKey = typeof DEVICE_COLLECTION_KEYS[number];
|
|
25
|
+
/**
|
|
26
|
+
* The model keys addressable via a REST endpoint and a Layer-3 projection: the {@link DeviceCollectionKey} collections plus the NVR singleton. A superset of
|
|
27
|
+
* `DeviceCollectionKey` and a subset of {@link StateModelKey}.
|
|
21
28
|
*/
|
|
22
29
|
export type DeviceModelKey = typeof DEVICE_MODEL_KEYS[number];
|
|
23
30
|
/**
|
|
24
31
|
* The model keys the library reduces into canonical {@link ProtectState} *from the realtime stream*: the devices, the NVR, the user roster, and the liveview collection.
|
|
25
32
|
* A superset of `DeviceModelKey` (it adds `user` and `liveview`, reduced but not device-addressed) and a subset of `ModelKey` (the full observed wire vocabulary).
|
|
26
33
|
*
|
|
27
|
-
* "Reduced into state" and "is a `StateModelKey`" are two
|
|
34
|
+
* "Reduced into state" and "is a `StateModelKey`" are two independent axes. `applyBootstrap` reconciles *every* reduced collection (it is the universal input), so a
|
|
28
35
|
* collection can live in {@link ProtectState} without being a `StateModelKey`: `ringtones` is reduced and observable, but the controller broadcasts no `ringtone` packet,
|
|
29
36
|
* so it advances bootstrap-only and is intentionally excluded here (and from `ModelKey`). `StateModelKey` is precisely the subset the controller *also* emits
|
|
30
37
|
* realtime deltas for - the keys the reducer's realtime upsert/patch/remove path touches.
|
|
@@ -79,7 +86,7 @@ export type AuthMethod = "fingerprint" | "nfc";
|
|
|
79
86
|
* the classifier's own answer rather than re-deriving it from metadata shape, exactly as `smartDetect` lifts `objectTypes`; whether the scan succeeded and which
|
|
80
87
|
* identity matched stay metadata reads (an unrecognized scan still classifies, carrying e.g. `metadata.fingerprint.ulpId: null`).
|
|
81
88
|
* - `doorbellRing` - a doorbell was pressed.
|
|
82
|
-
* - `accessEvent` - a UniFi Access occurrence (door, reader, lock),
|
|
89
|
+
* - `accessEvent` - a UniFi Access occurrence (door, reader, lock), distinguished within the `event` channel by its access metadata.
|
|
83
90
|
* - `buttonPressed` - a security-action button was pressed on a fob (or a sensor with a button). Device-attributed (the pressing device, from the
|
|
84
91
|
* payload's `device` field), so it routes by `deviceId` like `accessEvent`; the classifier lifts `button` (which button) and `pressType` (how it was pressed), and
|
|
85
92
|
* the device family rides in `metadata.deviceModelKey` since the wire event type is shared across button-bearing devices.
|
|
@@ -153,12 +160,12 @@ export type TypedEvent = {
|
|
|
153
160
|
/**
|
|
154
161
|
* Classify a decoded {@link RawPacket} into a {@link TypedEvent}, or `null` if the packet is valid but describes something the library does not model.
|
|
155
162
|
*
|
|
156
|
-
* This is a pure, stateless, total function. It reads only the packet's own self-description - the action, the model key, and the payload's
|
|
163
|
+
* This is a pure, stateless, total function. It reads only the packet's own self-description - the action, the model key, and the payload's distinguishing fields -
|
|
157
164
|
* and never consults prior state, never holds state, and never throws. Returning `null` is the documented signal for "a well-formed packet we do not (yet) model":
|
|
158
165
|
* an unknown model key, an action we do not handle, a device transition whose payload is not an object, or an `event` packet that does not self-describe as one of
|
|
159
166
|
* the modeled occurrences. The caller observes the `null` and moves on (logging at debug if it wishes).
|
|
160
167
|
*
|
|
161
|
-
* Statelessness is
|
|
168
|
+
* Statelessness is what keeps this correct. Activity signals (`motionDetected`, `smartDetect`, `tamperDetected`, `authDetected`, `doorbellRing`, `accessEvent`) are
|
|
162
169
|
* derived *exclusively* from the `event` model key, because that is the only packet that carries an occurrence's identity and metadata. Camera state - `lastMotion`,
|
|
163
170
|
* `lastRing`, `isMotionDetected` - flows through the same classifier as a `devicePatched`; it is never re-synthesized into an activity signal, which would require
|
|
164
171
|
* remembering the previous value and thus break purity. "Did motion happen?" has exactly one home (the occurrence); "what is the camera's current `lastMotion`?" has
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/protocol/events.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/protocol/events.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAU7C,eAAO,MAAM,sBAAsB,2EAA8E,CAAC;AAGlH,QAAA,MAAM,iBAAiB,kFAAgD,CAAC;AAMxE,gBAAgB;AAChB,QAAA,MAAM,gBAAgB,sGAAwD,CAAC;AAQ/E,QAAA,MAAM,gBAAgB,oNAAiJ,CAAC;AAExK;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAExE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;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