@camstack/types 1.2.298 → 1.2.299

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.
@@ -10,10 +10,13 @@
10
10
  * fires, and the operator was never told. One predicate, so the engine and the
11
11
  * warning cannot disagree about which rules are the alarm.
12
12
  *
13
- * Structural inputs (conditions + the enabled `onTrigger` sequences), so the
13
+ * Structural inputs (conditions + the ENABLED on-match bindings), so the
14
14
  * admin's form state and the engine's rule both answer without a cast.
15
+ * Sequence bindings need {@link NcAlarmMembershipSubject.sequenceActionsOf} —
16
+ * without it a sequence-ref cannot prove membership (fail closed for the
17
+ * opening-edge refusal: better a closing notification than a silent open).
15
18
  */
16
- import type { NcConditions, NcRuleActionSequence } from '../capabilities/notification-rules.cap.js';
19
+ import type { NcConditions, NcRuleAction, NcRuleActions } from '../capabilities/notification-rules.cap.js';
17
20
  /**
18
21
  * The sensor-event kinds that are OPENINGS to the alarm — the keys of the
19
22
  * engine's opening table (`alarm-openings.ts`, which is checked against this
@@ -31,14 +34,23 @@ export declare function isAlarmControllableCap(cap: string): cap is NcAlarmContr
31
34
  /** What the alarm-membership question reads off a rule. */
32
35
  export interface NcAlarmMembershipSubject {
33
36
  readonly conditions: Pick<NcConditions, 'deviceState' | 'sensorKinds' | 'sensorTransition'>;
34
- readonly onTrigger?: readonly NcRuleActionSequence[];
37
+ /** The rule's actions block. Absent = no actuation. */
38
+ readonly actions?: NcRuleActions;
39
+ /**
40
+ * Resolve a shared sequence's steps. Required when an `onTrigger` binding is
41
+ * a sequence ref — without it that binding cannot prove membership.
42
+ */
43
+ readonly sequenceActionsOf?: (sequenceId: string) => readonly NcRuleAction[] | undefined;
35
44
  }
36
45
  /**
37
46
  * A rule belongs to the alarm when its `deviceState` gate names ANY device's
38
- * `armed_*` word, or an ENABLED `onTrigger` sequence pulls the alarm panel's
39
- * trigger (D630).
47
+ * `armed_*` word, or an on-match binding pulls the alarm panel's trigger
48
+ * (D630). Button-only sequences do NOT count — they are not an automatic
49
+ * escalation.
40
50
  */
41
51
  export declare function ruleBelongsToAlarm(rule: NcAlarmMembershipSubject): boolean;
52
+ /** Copy the editors show when {@link sensorTransitionNeverFires} is true. */
53
+ 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.";
42
54
  /**
43
55
  * An alarm rule over openings only, asking for the CLEAR: the alarm edge
44
56
  * refuses every closing, and the chosen edge refuses every opening, so nothing
@@ -46,5 +58,3 @@ export declare function ruleBelongsToAlarm(rule: NcAlarmMembershipSubject): bool
46
58
  * can change with an action edit — but every editor must SAY it.
47
59
  */
48
60
  export declare function sensorTransitionNeverFires(rule: NcAlarmMembershipSubject): boolean;
49
- /** The warning an editor shows for {@link sensorTransitionNeverFires}. */
50
- 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.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.298",
3
+ "version": "1.2.299",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",