@camstack/types 1.2.302 → 1.2.303
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/automation/recipe.d.ts +2 -2
- package/dist/capabilities/core-blocks.cap.d.ts +17 -17
- package/dist/capabilities/device-admin-link-url.d.ts +2 -2
- package/dist/capabilities/device-admin-link.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/local-network.cap.d.ts +1 -1
- package/dist/capabilities/notification-rules.cap.d.ts +230 -0
- package/dist/device/device-do-actions.d.ts +57 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +454 -19
- package/dist/index.mjs +444 -20
- package/dist/notification/alarm-membership.d.ts +9 -0
- package/dist/notification/alarm-profiles.d.ts +5 -4
- package/dist/notification/alarm-settings.d.ts +9 -3
- package/package.json +1 -1
|
@@ -42,6 +42,8 @@ export interface NcAlarmMembershipSubject {
|
|
|
42
42
|
*/
|
|
43
43
|
readonly sequenceActionsOf?: (sequenceId: string) => readonly NcRuleAction[] | undefined;
|
|
44
44
|
}
|
|
45
|
+
/** True when the rule's deviceState gate names any `armed_*` word. */
|
|
46
|
+
export declare function ruleGatedOnArmedState(rule: NcAlarmMembershipSubject): boolean;
|
|
45
47
|
/**
|
|
46
48
|
* A rule belongs to the alarm when its `deviceState` gate names ANY device's
|
|
47
49
|
* `armed_*` word, or an on-match binding pulls the alarm panel's trigger
|
|
@@ -49,6 +51,13 @@ export interface NcAlarmMembershipSubject {
|
|
|
49
51
|
* escalation.
|
|
50
52
|
*/
|
|
51
53
|
export declare function ruleBelongsToAlarm(rule: NcAlarmMembershipSubject): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* A rule gated on `armed_*` auto-triggers the CamStack `alarm-panel` on match
|
|
56
|
+
* — no `onTrigger` sequence required. Sirens are never part of this path.
|
|
57
|
+
* An explicit `alarm-panel.trigger` binding without an armed gate stays
|
|
58
|
+
* explicit actuation only ({@link ruleBelongsToAlarm}).
|
|
59
|
+
*/
|
|
60
|
+
export declare function ruleAutoTriggersAlarm(rule: NcAlarmMembershipSubject): boolean;
|
|
52
61
|
/** Copy the editors show when {@link sensorTransitionNeverFires} is true. */
|
|
53
62
|
export declare const NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING = "This rule belongs to the alarm, and an alarm rule fires only when an opening OPENS. Set to \u201Conly when it clears\u201D, it can never fire.";
|
|
54
63
|
/**
|
|
@@ -14,11 +14,12 @@ import type { NcAlarmSettings } from '../capabilities/notification-rules.cap.js'
|
|
|
14
14
|
/** Stable id of the always-present Default profile (migrated from flat settings). */
|
|
15
15
|
export declare const NC_ALARM_DEFAULT_PROFILE_ID = "default";
|
|
16
16
|
export declare const NC_ALARM_DEFAULT_PROFILE_NAME = "Default";
|
|
17
|
-
/** Stock delays —
|
|
17
|
+
/** Stock delays — re-arm 10 s after trigger (inherited by every mode). */
|
|
18
18
|
export declare const NC_ALARM_SYSTEM_DEFAULT_DELAYS: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
exitDelaySec: number;
|
|
20
|
+
entryDelaySec: number;
|
|
21
|
+
triggeredDurationSec: number;
|
|
22
|
+
postTriggeredAction: "rearmAfter";
|
|
22
23
|
};
|
|
23
24
|
/** Empty memberships + stock delays + no announce targets. */
|
|
24
25
|
export declare function ncAlarmSystemDefaultSettings(): NcAlarmSettings;
|
|
@@ -5,15 +5,21 @@
|
|
|
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 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';
|
|
8
|
+
import { type NcAlarmBlocking, type NcAlarmBlockingEdit, type NcAlarmModeDelays, type NcAlarmModeDelaysEdit, type NcAlarmModeDeviceList, type NcAlarmNonBlocking, type NcAlarmNonBlockingEdit, type NcAlarmPostTriggeredAction, 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';
|
|
12
|
+
/**
|
|
13
|
+
* Derive the post-triggered action from a stored blob that may predate the field:
|
|
14
|
+
* a positive duration meant re-arm; zero/absent meant stay triggered.
|
|
15
|
+
*/
|
|
16
|
+
export declare function derivePostTriggeredAction(action: NcAlarmPostTriggeredAction | undefined, triggeredDurationSec: number): NcAlarmPostTriggeredAction;
|
|
12
17
|
export interface NcAlarmResolvedDelays {
|
|
13
18
|
readonly exitDelaySec: number;
|
|
14
19
|
readonly entryDelaySec: number;
|
|
15
20
|
readonly triggeredDurationSec: number;
|
|
16
|
-
readonly
|
|
21
|
+
readonly postTriggeredAction: NcAlarmPostTriggeredAction;
|
|
22
|
+
readonly source: Readonly<Record<NcAlarmDelayField | 'postTriggeredAction', NcAlarmDelaySource>>;
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
25
|
* A settings answer as it travels on the wire. Clients do not parse answers, so a hub older
|
|
@@ -27,7 +33,7 @@ export type NcAlarmSettingsAnswer = Omit<NcAlarmSettings, 'modeDelays' | 'nonBlo
|
|
|
27
33
|
readonly blocking?: readonly NcAlarmBlocking[];
|
|
28
34
|
readonly secureOnArmOff?: readonly NcAlarmSecureOnArmOff[];
|
|
29
35
|
};
|
|
30
|
-
export type NcAlarmDelaySettings = Pick<NcAlarmSettingsAnswer, NcAlarmDelayField | 'modeDelays'>;
|
|
36
|
+
export type NcAlarmDelaySettings = Pick<NcAlarmSettingsAnswer, NcAlarmDelayField | 'modeDelays' | 'postTriggeredAction'>;
|
|
31
37
|
/** What `mode` actually runs on: its own overrides, the global value for every other field. */
|
|
32
38
|
export declare function resolveModeDelays(settings: NcAlarmDelaySettings, mode: AlarmArmMode): NcAlarmResolvedDelays;
|
|
33
39
|
/**
|