@camstack/addon-provider-amcrest 0.2.76 → 0.2.78
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
|
@@ -7844,17 +7844,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7844
7844
|
/**
|
|
7845
7845
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7846
7846
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7847
|
-
* - `off`
|
|
7848
|
-
* - `events`
|
|
7849
|
-
* - `continuous`
|
|
7850
|
-
*
|
|
7851
|
-
*
|
|
7852
|
-
*
|
|
7847
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7848
|
+
* - `events` — every band records around triggers only.
|
|
7849
|
+
* - `continuous` — at least one band records continuously.
|
|
7850
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7851
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7852
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7853
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7854
|
+
*
|
|
7855
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7856
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7857
|
+
* has no effect.
|
|
7858
|
+
*
|
|
7859
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7860
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7861
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7862
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7863
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7853
7864
|
*/
|
|
7854
7865
|
var RecordingStorageModeSchema = _enum([
|
|
7855
7866
|
"off",
|
|
7856
7867
|
"events",
|
|
7857
|
-
"continuous"
|
|
7868
|
+
"continuous",
|
|
7869
|
+
"on-device-decision"
|
|
7858
7870
|
]);
|
|
7859
7871
|
/**
|
|
7860
7872
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7904,22 +7916,7 @@ var RecordingTriggersSchema = object({
|
|
|
7904
7916
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7905
7917
|
* registrare.
|
|
7906
7918
|
*/
|
|
7907
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7908
|
-
/**
|
|
7909
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7910
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7911
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7912
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7913
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7914
|
-
*
|
|
7915
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7916
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7917
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7918
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7919
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7920
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7921
|
-
*/
|
|
7922
|
-
deviceSignal: boolean().optional()
|
|
7919
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7923
7920
|
});
|
|
7924
7921
|
/**
|
|
7925
7922
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8003,8 +8000,29 @@ var RecordingConfigSchema = object({
|
|
|
8003
8000
|
* "off" is the absence of a covering band, never a band value.
|
|
8004
8001
|
*/
|
|
8005
8002
|
bands: array(RecordingBandSchema).default([]),
|
|
8003
|
+
/**
|
|
8004
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8005
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8006
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8007
|
+
* recording intent that is not a band.
|
|
8008
|
+
*
|
|
8009
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8010
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8011
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8012
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8013
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8014
|
+
* job however long it is, and closes one pad after the fall.
|
|
8015
|
+
*
|
|
8016
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8017
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8018
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8019
|
+
*/
|
|
8020
|
+
deviceDecision: boolean().optional(),
|
|
8006
8021
|
retention: RecordingRetentionSchema.optional()
|
|
8007
|
-
}).strict()
|
|
8022
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8023
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8024
|
+
path: ["bands"]
|
|
8025
|
+
});
|
|
8008
8026
|
/**
|
|
8009
8027
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8010
8028
|
*
|
|
@@ -21020,11 +21038,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21020
21038
|
});
|
|
21021
21039
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21022
21040
|
var CameraRecordingStatusSchema = object({
|
|
21023
|
-
mode:
|
|
21024
|
-
"off",
|
|
21025
|
-
"continuous",
|
|
21026
|
-
"events"
|
|
21027
|
-
]),
|
|
21041
|
+
mode: RecordingStorageModeSchema,
|
|
21028
21042
|
active: boolean(),
|
|
21029
21043
|
storageBytes: number()
|
|
21030
21044
|
});
|
|
@@ -29490,11 +29504,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29490
29504
|
var RecordingStatusSchema = object({
|
|
29491
29505
|
deviceId: number(),
|
|
29492
29506
|
enabled: boolean(),
|
|
29493
|
-
|
|
29494
|
-
|
|
29495
|
-
|
|
29496
|
-
|
|
29497
|
-
]),
|
|
29507
|
+
/** THE derived storage mode, from the one definition
|
|
29508
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29509
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29510
|
+
activeMode: RecordingStorageModeSchema,
|
|
29498
29511
|
nodeId: string(),
|
|
29499
29512
|
storageBytes: number()
|
|
29500
29513
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -7845,17 +7845,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7845
7845
|
/**
|
|
7846
7846
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7847
7847
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7848
|
-
* - `off`
|
|
7849
|
-
* - `events`
|
|
7850
|
-
* - `continuous`
|
|
7851
|
-
*
|
|
7852
|
-
*
|
|
7853
|
-
*
|
|
7848
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7849
|
+
* - `events` — every band records around triggers only.
|
|
7850
|
+
* - `continuous` — at least one band records continuously.
|
|
7851
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7852
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7853
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7854
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7855
|
+
*
|
|
7856
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7857
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7858
|
+
* has no effect.
|
|
7859
|
+
*
|
|
7860
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7861
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7862
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7863
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7864
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7854
7865
|
*/
|
|
7855
7866
|
var RecordingStorageModeSchema = _enum([
|
|
7856
7867
|
"off",
|
|
7857
7868
|
"events",
|
|
7858
|
-
"continuous"
|
|
7869
|
+
"continuous",
|
|
7870
|
+
"on-device-decision"
|
|
7859
7871
|
]);
|
|
7860
7872
|
/**
|
|
7861
7873
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7905,22 +7917,7 @@ var RecordingTriggersSchema = object({
|
|
|
7905
7917
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7906
7918
|
* registrare.
|
|
7907
7919
|
*/
|
|
7908
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7909
|
-
/**
|
|
7910
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7911
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7912
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7913
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7914
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7915
|
-
*
|
|
7916
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7917
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7918
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7919
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7920
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7921
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7922
|
-
*/
|
|
7923
|
-
deviceSignal: boolean().optional()
|
|
7920
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7924
7921
|
});
|
|
7925
7922
|
/**
|
|
7926
7923
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8004,8 +8001,29 @@ var RecordingConfigSchema = object({
|
|
|
8004
8001
|
* "off" is the absence of a covering band, never a band value.
|
|
8005
8002
|
*/
|
|
8006
8003
|
bands: array(RecordingBandSchema).default([]),
|
|
8004
|
+
/**
|
|
8005
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8006
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8007
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8008
|
+
* recording intent that is not a band.
|
|
8009
|
+
*
|
|
8010
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8011
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8012
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8013
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8014
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8015
|
+
* job however long it is, and closes one pad after the fall.
|
|
8016
|
+
*
|
|
8017
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8018
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8019
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8020
|
+
*/
|
|
8021
|
+
deviceDecision: boolean().optional(),
|
|
8007
8022
|
retention: RecordingRetentionSchema.optional()
|
|
8008
|
-
}).strict()
|
|
8023
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8024
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8025
|
+
path: ["bands"]
|
|
8026
|
+
});
|
|
8009
8027
|
/**
|
|
8010
8028
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8011
8029
|
*
|
|
@@ -21021,11 +21039,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21021
21039
|
});
|
|
21022
21040
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21023
21041
|
var CameraRecordingStatusSchema = object({
|
|
21024
|
-
mode:
|
|
21025
|
-
"off",
|
|
21026
|
-
"continuous",
|
|
21027
|
-
"events"
|
|
21028
|
-
]),
|
|
21042
|
+
mode: RecordingStorageModeSchema,
|
|
21029
21043
|
active: boolean(),
|
|
21030
21044
|
storageBytes: number()
|
|
21031
21045
|
});
|
|
@@ -29491,11 +29505,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29491
29505
|
var RecordingStatusSchema = object({
|
|
29492
29506
|
deviceId: number(),
|
|
29493
29507
|
enabled: boolean(),
|
|
29494
|
-
|
|
29495
|
-
|
|
29496
|
-
|
|
29497
|
-
|
|
29498
|
-
]),
|
|
29508
|
+
/** THE derived storage mode, from the one definition
|
|
29509
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29510
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29511
|
+
activeMode: RecordingStorageModeSchema,
|
|
29499
29512
|
nodeId: string(),
|
|
29500
29513
|
storageBytes: number()
|
|
29501
29514
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-amcrest",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.78",
|
|
4
4
|
"description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|