@camstack/addon-provider-unifi 0.2.75 → 0.2.76
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 +47 -34
- package/dist/addon.mjs +47 -34
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7849,17 +7849,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7849
7849
|
/**
|
|
7850
7850
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7851
7851
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7852
|
-
* - `off`
|
|
7853
|
-
* - `events`
|
|
7854
|
-
* - `continuous`
|
|
7855
|
-
*
|
|
7856
|
-
*
|
|
7857
|
-
*
|
|
7852
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7853
|
+
* - `events` — every band records around triggers only.
|
|
7854
|
+
* - `continuous` — at least one band records continuously.
|
|
7855
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7856
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7857
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7858
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7859
|
+
*
|
|
7860
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7861
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7862
|
+
* has no effect.
|
|
7863
|
+
*
|
|
7864
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7865
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7866
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7867
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7868
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7858
7869
|
*/
|
|
7859
7870
|
var RecordingStorageModeSchema = _enum([
|
|
7860
7871
|
"off",
|
|
7861
7872
|
"events",
|
|
7862
|
-
"continuous"
|
|
7873
|
+
"continuous",
|
|
7874
|
+
"on-device-decision"
|
|
7863
7875
|
]);
|
|
7864
7876
|
/**
|
|
7865
7877
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7909,22 +7921,7 @@ var RecordingTriggersSchema = object({
|
|
|
7909
7921
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7910
7922
|
* registrare.
|
|
7911
7923
|
*/
|
|
7912
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7913
|
-
/**
|
|
7914
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7915
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7916
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7917
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7918
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7919
|
-
*
|
|
7920
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7921
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7922
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7923
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7924
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7925
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7926
|
-
*/
|
|
7927
|
-
deviceSignal: boolean().optional()
|
|
7924
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7928
7925
|
});
|
|
7929
7926
|
/**
|
|
7930
7927
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8008,8 +8005,29 @@ var RecordingConfigSchema = object({
|
|
|
8008
8005
|
* "off" is the absence of a covering band, never a band value.
|
|
8009
8006
|
*/
|
|
8010
8007
|
bands: array(RecordingBandSchema).default([]),
|
|
8008
|
+
/**
|
|
8009
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8010
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8011
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8012
|
+
* recording intent that is not a band.
|
|
8013
|
+
*
|
|
8014
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8015
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8016
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8017
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8018
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8019
|
+
* job however long it is, and closes one pad after the fall.
|
|
8020
|
+
*
|
|
8021
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8022
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8023
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8024
|
+
*/
|
|
8025
|
+
deviceDecision: boolean().optional(),
|
|
8011
8026
|
retention: RecordingRetentionSchema.optional()
|
|
8012
|
-
}).strict()
|
|
8027
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8028
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8029
|
+
path: ["bands"]
|
|
8030
|
+
});
|
|
8013
8031
|
/**
|
|
8014
8032
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8015
8033
|
*
|
|
@@ -21025,11 +21043,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21025
21043
|
});
|
|
21026
21044
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21027
21045
|
var CameraRecordingStatusSchema = object({
|
|
21028
|
-
mode:
|
|
21029
|
-
"off",
|
|
21030
|
-
"continuous",
|
|
21031
|
-
"events"
|
|
21032
|
-
]),
|
|
21046
|
+
mode: RecordingStorageModeSchema,
|
|
21033
21047
|
active: boolean(),
|
|
21034
21048
|
storageBytes: number()
|
|
21035
21049
|
});
|
|
@@ -29300,11 +29314,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29300
29314
|
var RecordingStatusSchema = object({
|
|
29301
29315
|
deviceId: number(),
|
|
29302
29316
|
enabled: boolean(),
|
|
29303
|
-
|
|
29304
|
-
|
|
29305
|
-
|
|
29306
|
-
|
|
29307
|
-
]),
|
|
29317
|
+
/** THE derived storage mode, from the one definition
|
|
29318
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29319
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29320
|
+
activeMode: RecordingStorageModeSchema,
|
|
29308
29321
|
nodeId: string(),
|
|
29309
29322
|
storageBytes: number()
|
|
29310
29323
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -7848,17 +7848,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7848
7848
|
/**
|
|
7849
7849
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7850
7850
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7851
|
-
* - `off`
|
|
7852
|
-
* - `events`
|
|
7853
|
-
* - `continuous`
|
|
7854
|
-
*
|
|
7855
|
-
*
|
|
7856
|
-
*
|
|
7851
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7852
|
+
* - `events` — every band records around triggers only.
|
|
7853
|
+
* - `continuous` — at least one band records continuously.
|
|
7854
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7855
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7856
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7857
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7858
|
+
*
|
|
7859
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7860
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7861
|
+
* has no effect.
|
|
7862
|
+
*
|
|
7863
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7864
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7865
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7866
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7867
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7857
7868
|
*/
|
|
7858
7869
|
var RecordingStorageModeSchema = _enum([
|
|
7859
7870
|
"off",
|
|
7860
7871
|
"events",
|
|
7861
|
-
"continuous"
|
|
7872
|
+
"continuous",
|
|
7873
|
+
"on-device-decision"
|
|
7862
7874
|
]);
|
|
7863
7875
|
/**
|
|
7864
7876
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7908,22 +7920,7 @@ var RecordingTriggersSchema = object({
|
|
|
7908
7920
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7909
7921
|
* registrare.
|
|
7910
7922
|
*/
|
|
7911
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7912
|
-
/**
|
|
7913
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7914
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7915
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7916
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7917
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7918
|
-
*
|
|
7919
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7920
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7921
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7922
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7923
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7924
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7925
|
-
*/
|
|
7926
|
-
deviceSignal: boolean().optional()
|
|
7923
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7927
7924
|
});
|
|
7928
7925
|
/**
|
|
7929
7926
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8007,8 +8004,29 @@ var RecordingConfigSchema = object({
|
|
|
8007
8004
|
* "off" is the absence of a covering band, never a band value.
|
|
8008
8005
|
*/
|
|
8009
8006
|
bands: array(RecordingBandSchema).default([]),
|
|
8007
|
+
/**
|
|
8008
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8009
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8010
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8011
|
+
* recording intent that is not a band.
|
|
8012
|
+
*
|
|
8013
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8014
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8015
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8016
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8017
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8018
|
+
* job however long it is, and closes one pad after the fall.
|
|
8019
|
+
*
|
|
8020
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8021
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8022
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8023
|
+
*/
|
|
8024
|
+
deviceDecision: boolean().optional(),
|
|
8010
8025
|
retention: RecordingRetentionSchema.optional()
|
|
8011
|
-
}).strict()
|
|
8026
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8027
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8028
|
+
path: ["bands"]
|
|
8029
|
+
});
|
|
8012
8030
|
/**
|
|
8013
8031
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8014
8032
|
*
|
|
@@ -21024,11 +21042,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21024
21042
|
});
|
|
21025
21043
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21026
21044
|
var CameraRecordingStatusSchema = object({
|
|
21027
|
-
mode:
|
|
21028
|
-
"off",
|
|
21029
|
-
"continuous",
|
|
21030
|
-
"events"
|
|
21031
|
-
]),
|
|
21045
|
+
mode: RecordingStorageModeSchema,
|
|
21032
21046
|
active: boolean(),
|
|
21033
21047
|
storageBytes: number()
|
|
21034
21048
|
});
|
|
@@ -29299,11 +29313,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29299
29313
|
var RecordingStatusSchema = object({
|
|
29300
29314
|
deviceId: number(),
|
|
29301
29315
|
enabled: boolean(),
|
|
29302
|
-
|
|
29303
|
-
|
|
29304
|
-
|
|
29305
|
-
|
|
29306
|
-
]),
|
|
29316
|
+
/** THE derived storage mode, from the one definition
|
|
29317
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29318
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29319
|
+
activeMode: RecordingStorageModeSchema,
|
|
29307
29320
|
nodeId: string(),
|
|
29308
29321
|
storageBytes: number()
|
|
29309
29322
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.76",
|
|
4
4
|
"description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|