@camstack/types 1.2.387 → 1.2.388
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 +24 -14
- package/dist/addon.mjs +24 -14
- package/dist/capabilities/alarm-panel.cap.d.ts +10 -2
- package/dist/capabilities/capability-definition.d.ts +21 -3
- package/dist/capabilities/connectivity.cap.d.ts +10 -2
- package/dist/capabilities/device-history.cap.d.ts +195 -3
- package/dist/capabilities/dishwasher.cap.d.ts +17 -0
- package/dist/capabilities/enum-sensor.cap.d.ts +12 -2
- package/dist/capabilities/index.d.ts +4 -3
- package/dist/capabilities/lock-control.cap.d.ts +9 -2
- package/dist/capabilities/log-destination.cap.d.ts +148 -19
- package/dist/capabilities/media-player.cap.d.ts +15 -2
- package/dist/capabilities/notification-rules.cap.d.ts +213 -13
- package/dist/capabilities/stream-params.cap.d.ts +24 -2
- package/dist/client.js +75 -6
- package/dist/client.mjs +75 -6
- package/dist/device/base-device.d.ts +34 -1
- package/dist/device/index.d.ts +2 -2
- package/dist/generated/addon-api.d.ts +89 -12
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/collection-array-methods.d.ts +2 -2
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +584 -53
- package/dist/index.mjs +568 -54
- package/dist/interfaces/logging.d.ts +16 -1
- package/dist/notification/media-image.d.ts +67 -0
- package/dist/{sleep-yKL5gfrH.mjs → sleep-BSuCCFjf.mjs} +3 -1
- package/dist/{sleep-6sOPE0EV.js → sleep-DKtoyk6X.js} +3 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogReadCapabilities, LogReadQuery, LogReadResult } from '../capabilities/log-destination.cap.js';
|
|
1
2
|
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
2
3
|
/**
|
|
3
4
|
* Severity ordering. Declared once here because it had already been re-declared
|
|
@@ -75,6 +76,13 @@ export interface LogTags {
|
|
|
75
76
|
readonly [key: string]: string | number | undefined;
|
|
76
77
|
}
|
|
77
78
|
export interface LogEntry {
|
|
79
|
+
/**
|
|
80
|
+
* `<bootId>.<seq>`, minted by the LogManager that FIRST accepted the line
|
|
81
|
+
* on this process (D898). Identical in the in-memory tail, the live
|
|
82
|
+
* subscription and the rotated file, so a page read from disk and a line
|
|
83
|
+
* pushed live dedupe exactly. Absent only on an entry built by hand.
|
|
84
|
+
*/
|
|
85
|
+
id?: string;
|
|
78
86
|
timestamp: Date;
|
|
79
87
|
level: LogLevel;
|
|
80
88
|
/** Single free-form label (e.g. 'EventPersistence', 'rtsp', 'AddonRegistry').
|
|
@@ -98,7 +106,14 @@ export interface ILogDestination {
|
|
|
98
106
|
initialize(): Promise<void>;
|
|
99
107
|
shutdown(): Promise<void>;
|
|
100
108
|
write(entry: LogEntry): void;
|
|
101
|
-
|
|
109
|
+
/** Absent ⇒ this destination only ships lines (D898). */
|
|
110
|
+
describeRead?(): Promise<LogReadCapabilities>;
|
|
111
|
+
read?(query: LogReadQuery): Promise<LogReadResult>;
|
|
112
|
+
cancelRead?(input: {
|
|
113
|
+
readonly requestId: string;
|
|
114
|
+
}): Promise<{
|
|
115
|
+
readonly cancelled: boolean;
|
|
116
|
+
}>;
|
|
102
117
|
}
|
|
103
118
|
/**
|
|
104
119
|
* Inline, per-call extras passed to every `IScopedLogger` method.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* media-image — the ONE media choice of a notification rule (D897).
|
|
3
|
+
*
|
|
4
|
+
* A rule used to state its picture as three fields — `attach` (which stored
|
|
5
|
+
* kind to look for), `frame` (cropped / full / boxed) and `zoneCrop` — and the
|
|
6
|
+
* ladders those fed picked a STORED kind, so one rule shipped a subject crop on
|
|
7
|
+
* one event and a boxed scene on the next depending on what had landed. The
|
|
8
|
+
* picture is now rendered at send time from a clean frame, and the rule says
|
|
9
|
+
* only what it wants to SEE: `image` (`scene-boxes` | `crop` | `clean` |
|
|
10
|
+
* `none`) plus `showTriggerZone`.
|
|
11
|
+
*
|
|
12
|
+
* This module is the only reader of the legacy triple. The rule store applies
|
|
13
|
+
* {@link normalizeNcMediaPolicy} on load (a READ projection, like the retired
|
|
14
|
+
* delivery fields of D692) and on every write, so a stored rule converges on
|
|
15
|
+
* `image` the first time it is saved, and an editor that still sends the
|
|
16
|
+
* triple (the viewer, until it follows) is folded on the way in.
|
|
17
|
+
*/
|
|
18
|
+
import type { NcConditions, NcMediaImage, NcMediaPolicy } from '../capabilities/notification-rules.cap.js';
|
|
19
|
+
import { type NcRuleKind, type NcRuleSectionSubject } from './rule-kinds.js';
|
|
20
|
+
/** Every mode, in the order an editor offers them. */
|
|
21
|
+
export declare const NC_MEDIA_IMAGE_MODES: readonly NcMediaImage[];
|
|
22
|
+
/**
|
|
23
|
+
* The modes a rule of this kind can honour. A kind that carries no media gets
|
|
24
|
+
* none (its row ships text, or — an alarm — its SOURCE rule's picture); a kind
|
|
25
|
+
* whose subject has no region of the frame (a sound) is never offered `crop`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function imageModesForKind(kind: NcRuleKind): readonly NcMediaImage[];
|
|
28
|
+
/**
|
|
29
|
+
* The zone ids that FIRE a rule: its `zones` condition, or an occupancy rule's
|
|
30
|
+
* own scoped zone. Empty when the trigger is not a zone — and then
|
|
31
|
+
* `showTriggerZone` has nothing to draw and is refused on save.
|
|
32
|
+
*/
|
|
33
|
+
export declare function ruleTriggerZoneIds(conditions: NcConditions): readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* What the legacy triple MEANT, as a mode. `zoneCrop` forced the clean
|
|
36
|
+
* keyFrame ladder and dropped `frame`, so it is `clean` whatever else was set;
|
|
37
|
+
* `frame` decided over `attach` when present; `keyFrame` was the clean scene;
|
|
38
|
+
* every other still (`best`, `best-matching`, the default) was the subject.
|
|
39
|
+
*/
|
|
40
|
+
export declare function legacyImageMode(media: NcMediaPolicy): NcMediaImage;
|
|
41
|
+
/**
|
|
42
|
+
* The mode a rule's picture is rendered in. `image` when stored; else what the
|
|
43
|
+
* legacy triple meant — and, for a SENSOR rule written before D897, `clean`
|
|
44
|
+
* whatever it stored (even `attach: 'none'`), because its stored triple was
|
|
45
|
+
* ignored and one plain snapshot always shipped (operator ruling, 2026-10-01):
|
|
46
|
+
* the migration keeps what the rule actually DID. Clamped to what the kind can
|
|
47
|
+
* honour.
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveNcMediaImage(media: NcMediaPolicy, kind: NcRuleKind): NcMediaImage;
|
|
50
|
+
/** The rule fields the normalisation reads. */
|
|
51
|
+
export interface NcMediaRuleSubject extends NcRuleSectionSubject {
|
|
52
|
+
readonly conditions: NcConditions;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The stored shape of a media policy: `image` set, the legacy triple gone.
|
|
56
|
+
* `showTriggerZone` survives only where it can be drawn — a zone trigger and a
|
|
57
|
+
* mode other than `crop`/`none`; a legacy `zoneCrop` on a zone rule becomes it.
|
|
58
|
+
* Every other field (gif, clip, rolls, speed, profile, linked cameras) is
|
|
59
|
+
* carried through untouched. Pure; never throws.
|
|
60
|
+
*/
|
|
61
|
+
export declare function normalizeNcMediaPolicy(media: NcMediaPolicy, rule: NcMediaRuleSubject): NcMediaPolicy;
|
|
62
|
+
/**
|
|
63
|
+
* Why a media policy cannot be SAVED on this rule, or null. Server-side and
|
|
64
|
+
* editor alike: `showTriggerZone` on a rule whose trigger is not a zone, and a
|
|
65
|
+
* mode the rule's kind cannot honour.
|
|
66
|
+
*/
|
|
67
|
+
export declare function ncMediaPolicyError(media: NcMediaPolicy, rule: NcMediaRuleSubject): string | null;
|
|
@@ -5402,7 +5402,9 @@ var HISTORY_UNIT_LABELS = {
|
|
|
5402
5402
|
ms: "ms",
|
|
5403
5403
|
s: "s",
|
|
5404
5404
|
days: "days",
|
|
5405
|
-
bytes: "bytes"
|
|
5405
|
+
bytes: "bytes",
|
|
5406
|
+
kbps: "kbps",
|
|
5407
|
+
fps: "fps"
|
|
5406
5408
|
};
|
|
5407
5409
|
/** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
|
|
5408
5410
|
var HISTORY_DEFAULT_MIN_INTERVAL_MS = 1e4;
|
|
@@ -5402,7 +5402,9 @@ var HISTORY_UNIT_LABELS = {
|
|
|
5402
5402
|
ms: "ms",
|
|
5403
5403
|
s: "s",
|
|
5404
5404
|
days: "days",
|
|
5405
|
-
bytes: "bytes"
|
|
5405
|
+
bytes: "bytes",
|
|
5406
|
+
kbps: "kbps",
|
|
5407
|
+
fps: "fps"
|
|
5406
5408
|
};
|
|
5407
5409
|
/** Capture floor (ms) applied to `gauge` / `counter` series when a field states none. */
|
|
5408
5410
|
var HISTORY_DEFAULT_MIN_INTERVAL_MS = 1e4;
|