@camstack/types 1.2.294 → 1.2.296
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/capabilities/index.d.ts +2 -2
- package/dist/capabilities/notification-rules.cap.d.ts +241 -1
- package/dist/capabilities/osd-manager.cap.d.ts +18 -30
- package/dist/index.d.ts +3 -2
- package/dist/index.js +200 -22
- package/dist/index.mjs +186 -23
- package/dist/notification/alarm-controllable.d.ts +33 -0
- package/dist/notification/alarm-membership.d.ts +8 -1
- package/dist/notification/alarm-settings.d.ts +27 -6
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The engine and both clients call these; nobody re-implements them. No I/O, no clock.
|
|
6
6
|
*/
|
|
7
7
|
import type { AlarmArmMode } from '../capabilities/alarm-panel.cap.js';
|
|
8
|
-
import { type NcAlarmModeDelays, type NcAlarmModeDelaysEdit, type NcAlarmNonBlocking, type NcAlarmNonBlockingEdit, type NcAlarmSettings, type NcAlarmSettingsPatch } from '../capabilities/notification-rules.cap.js';
|
|
8
|
+
import { type NcAlarmBlocking, type NcAlarmBlockingEdit, type NcAlarmModeDelays, type NcAlarmModeDelaysEdit, type NcAlarmModeDeviceList, type NcAlarmNonBlocking, type NcAlarmNonBlockingEdit, type NcAlarmSecureOnArmEdit, type NcAlarmSecureOnArmOff, type NcAlarmSettings, type NcAlarmSettingsPatch } from '../capabilities/notification-rules.cap.js';
|
|
9
9
|
export type NcAlarmDelayField = 'exitDelaySec' | 'entryDelaySec' | 'triggeredDurationSec';
|
|
10
10
|
export declare const NC_ALARM_DELAY_FIELDS: readonly NcAlarmDelayField[];
|
|
11
11
|
export type NcAlarmDelaySource = 'mode' | 'default';
|
|
@@ -19,10 +19,13 @@ export interface NcAlarmResolvedDelays {
|
|
|
19
19
|
* A settings answer as it travels on the wire. Clients do not parse answers, so a hub older
|
|
20
20
|
* than D697 sends no `modeDelays` (nor, before D636, `nonBlocking`); every reader here treats an absent key as "no overrides".
|
|
21
21
|
*/
|
|
22
|
-
export type NcAlarmSettingsAnswer = Omit<NcAlarmSettings, 'modeDelays' | 'nonBlocking'> & {
|
|
22
|
+
export type NcAlarmSettingsAnswer = Omit<NcAlarmSettings, 'modeDelays' | 'nonBlocking' | 'blocking' | 'secureOnArmOff'> & {
|
|
23
23
|
readonly modeDelays?: readonly NcAlarmModeDelays[];
|
|
24
24
|
/** Absent on a hub older than D636: read as "no lists". */
|
|
25
25
|
readonly nonBlocking?: readonly NcAlarmNonBlocking[];
|
|
26
|
+
/** Absent on a hub older than secure-on-arm: read as "no lists". */
|
|
27
|
+
readonly blocking?: readonly NcAlarmBlocking[];
|
|
28
|
+
readonly secureOnArmOff?: readonly NcAlarmSecureOnArmOff[];
|
|
26
29
|
};
|
|
27
30
|
export type NcAlarmDelaySettings = Pick<NcAlarmSettingsAnswer, NcAlarmDelayField | 'modeDelays'>;
|
|
28
31
|
/** What `mode` actually runs on: its own overrides, the global value for every other field. */
|
|
@@ -32,9 +35,9 @@ export declare function resolveModeDelays(settings: NcAlarmDelaySettings, mode:
|
|
|
32
35
|
* an entry with no field left is dropped (the mode inherits everything again).
|
|
33
36
|
*/
|
|
34
37
|
export declare function applyModeDelaysEdits(current: readonly NcAlarmModeDelays[], edits: readonly NcAlarmModeDelaysEdit[]): NcAlarmModeDelays[];
|
|
35
|
-
export type
|
|
38
|
+
export type NcAlarmModeDeviceListEditResult = {
|
|
36
39
|
readonly kind: 'applied';
|
|
37
|
-
readonly lists:
|
|
40
|
+
readonly lists: NcAlarmModeDeviceList[];
|
|
38
41
|
readonly changed: boolean;
|
|
39
42
|
} | {
|
|
40
43
|
readonly kind: 'refused';
|
|
@@ -42,11 +45,29 @@ export type NcAlarmNonBlockingEditResult = {
|
|
|
42
45
|
readonly mode: AlarmArmMode;
|
|
43
46
|
readonly max: number;
|
|
44
47
|
};
|
|
48
|
+
/** Alias kept for callers that name the non-blocking edit result. */
|
|
49
|
+
export type NcAlarmNonBlockingEditResult = NcAlarmModeDeviceListEditResult;
|
|
45
50
|
/**
|
|
46
|
-
* Put ONE device on, or take it off, ONE mode's list. A no-op answers
|
|
47
|
-
* to a full list is REFUSED by reason (never silently
|
|
51
|
+
* Put ONE device on, or take it off, ONE mode's device-id list. A no-op answers
|
|
52
|
+
* `changed: false`; an add to a full list is REFUSED by reason (never silently
|
|
53
|
+
* dropped); an emptied list drops its entry.
|
|
54
|
+
*/
|
|
55
|
+
export declare function applyModeDeviceListEdit(lists: readonly NcAlarmModeDeviceList[], edit: {
|
|
56
|
+
readonly mode: AlarmArmMode;
|
|
57
|
+
readonly deviceId: number;
|
|
58
|
+
readonly present: boolean;
|
|
59
|
+
}): NcAlarmModeDeviceListEditResult;
|
|
60
|
+
/**
|
|
61
|
+
* Put ONE device on, or take it off, ONE mode's non-blocking list.
|
|
48
62
|
*/
|
|
49
63
|
export declare function applyNonBlockingEdit(lists: readonly NcAlarmNonBlocking[], edit: NcAlarmNonBlockingEdit): NcAlarmNonBlockingEditResult;
|
|
64
|
+
/** Controllable opt-in to blocking. */
|
|
65
|
+
export declare function applyBlockingEdit(lists: readonly NcAlarmBlocking[], edit: NcAlarmBlockingEdit): NcAlarmModeDeviceListEditResult;
|
|
66
|
+
/**
|
|
67
|
+
* Controllable secure-on-arm: `secureOnArm: true` removes from the opt-out list;
|
|
68
|
+
* `false` adds to it.
|
|
69
|
+
*/
|
|
70
|
+
export declare function applySecureOnArmEdit(lists: readonly NcAlarmSecureOnArmOff[], edit: NcAlarmSecureOnArmEdit): NcAlarmModeDeviceListEditResult;
|
|
50
71
|
/**
|
|
51
72
|
* True iff every key the patch sent is reflected in what the host returned. A host older than
|
|
52
73
|
* this build strips the keys it does not know; this is how a client tells "saved" from "parsed
|