@camstack/types 1.2.555 → 1.2.557
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/CHANGELOG.md +21 -0
- package/dist/addon/fake-addon-context.d.ts +3 -0
- package/dist/addon.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/audit/device-transition.d.ts +53 -0
- package/dist/automation/action.d.ts +24 -54
- package/dist/automation/draft/draft-json.d.ts +1 -1
- package/dist/automation/draft/index.d.ts +0 -1
- package/dist/automation/index.d.ts +3 -2
- package/dist/automation/normalize-units.d.ts +3 -3
- package/dist/automation/offered.d.ts +18 -0
- package/dist/automation/recipe.d.ts +1156 -2598
- package/dist/automation/scheduler.d.ts +48 -108
- package/dist/automation/step-runner.d.ts +7 -0
- package/dist/capabilities/action-source.cap.d.ts +12 -27
- package/dist/capabilities/actions.cap.d.ts +84 -189
- package/dist/capabilities/device-export.cap.d.ts +36 -1
- package/dist/capabilities/hero-layout.cap.d.ts +92 -0
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/notification-rules.cap.d.ts +237 -0
- package/dist/capabilities/osd-manager.cap.d.ts +96 -0
- package/dist/capabilities/remote.cap.d.ts +2 -2
- package/dist/capabilities/scene-monitor.cap.d.ts +1 -1
- package/dist/capabilities/schedulers.cap.d.ts +96 -216
- package/dist/client.d.ts +1 -1
- package/dist/client.js +96 -11
- package/dist/client.mjs +95 -12
- package/dist/device/cap-vocabulary/action-index.d.ts +32 -0
- package/dist/device/cap-vocabulary/index.d.ts +2 -2
- package/dist/device/device-do-actions.d.ts +3 -105
- package/dist/device/export-name.d.ts +65 -0
- package/dist/device/hero/hero-contribution-kit.d.ts +3 -0
- package/dist/device/hero/hero-fragment.d.ts +3 -0
- package/dist/device/hero/hero-measurement.d.ts +76 -0
- package/dist/device/hero/hero-model.d.ts +91 -0
- package/dist/device/hero/hero-row.d.ts +67 -1
- package/dist/device/hero/index.d.ts +1 -0
- package/dist/enums/event-category.d.ts +9 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-78tcBemo.mjs → event-category-Dv-Gcv1f.mjs} +9 -0
- package/dist/{event-category-BC4RRerT.js → event-category-Ps2LC8dN.js} +9 -0
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.js +2412 -2143
- package/dist/index.mjs +2374 -2127
- package/dist/notification/alarm-steps.d.ts +18 -0
- package/dist/notification/system-event-families.d.ts +5 -0
- package/dist/notification/system-event-filters.d.ts +1 -1
- package/dist/remote/remote-config.d.ts +5 -5
- package/dist/{sleep-4qch9WKa.js → sleep-1RkA30Y1.js} +102 -1
- package/dist/{sleep-Ba1dJYDo.mjs → sleep-DyIxjZZt.mjs} +79 -2
- package/dist/testing.js +3 -3
- package/dist/testing.mjs +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** The per-device store key holding `{ [instanceId]: name }`. */
|
|
2
|
+
export declare const EXPOSED_NAMES_STORE_KEY = "exposedNames";
|
|
3
|
+
export type ExposedNameCheck = {
|
|
4
|
+
readonly ok: true;
|
|
5
|
+
readonly name: string | null;
|
|
6
|
+
} | {
|
|
7
|
+
readonly ok: false;
|
|
8
|
+
readonly reason: string;
|
|
9
|
+
};
|
|
10
|
+
/** A platform's naming rule over a normalised, non-blank name. */
|
|
11
|
+
export type ExposedNameValidator = (name: string) => ExposedNameCheck;
|
|
12
|
+
/** A per-device store, as the exporter reaches it (`ctx.settings.readDeviceStore` / `writeDeviceStore`). */
|
|
13
|
+
export interface ExposedNameStore {
|
|
14
|
+
read(deviceId: number): Promise<Readonly<Record<string, unknown>>>;
|
|
15
|
+
write(deviceId: number, patch: Record<string, unknown>): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export interface SaveExposedNameInput {
|
|
18
|
+
readonly store: ExposedNameStore;
|
|
19
|
+
readonly deviceId: number;
|
|
20
|
+
readonly instanceId: string;
|
|
21
|
+
readonly raw: unknown;
|
|
22
|
+
readonly validate: ExposedNameValidator;
|
|
23
|
+
/** Validate only: refuse as a real save would, read and write nothing. */
|
|
24
|
+
readonly dryRun?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface SaveExposedNameResult {
|
|
27
|
+
readonly changed: boolean;
|
|
28
|
+
readonly name: string | null;
|
|
29
|
+
}
|
|
30
|
+
/** Trim and collapse whitespace, then the platform rule. Blank or null clears (`name: null`). */
|
|
31
|
+
export declare function checkExposedName(raw: unknown, validate: ExposedNameValidator): ExposedNameCheck;
|
|
32
|
+
/** Every saved name of a device, by instance id. A malformed blob reads as none. */
|
|
33
|
+
export declare function readExposedNames(store: Readonly<Record<string, unknown>>): Readonly<Record<string, string>>;
|
|
34
|
+
/**
|
|
35
|
+
* The saved name of one instance, or null: never saved, or a stored value the platform would
|
|
36
|
+
* now refuse (the device's own name is used rather than pushing a name the platform rejects).
|
|
37
|
+
*/
|
|
38
|
+
export declare function readExposedName(store: Readonly<Record<string, unknown>>, instanceId: string, validate: ExposedNameValidator): string | null;
|
|
39
|
+
/** The store patch that sets (or, with null, clears) one instance's name and keeps the others. */
|
|
40
|
+
export declare function exposedNamePatch(store: Readonly<Record<string, unknown>>, instanceId: string, name: string | null): Record<string, unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Validate and save one instance's name. A name the platform would refuse throws
|
|
43
|
+
* {@link ExportNameRefusedError} BEFORE anything is written, so the old name stays.
|
|
44
|
+
*/
|
|
45
|
+
export declare function saveExposedName(input: SaveExposedNameInput): Promise<SaveExposedNameResult>;
|
|
46
|
+
/** The part of `ctx.settings` an exporter's names live in (D865). */
|
|
47
|
+
export interface DeviceStoreAccess {
|
|
48
|
+
readDeviceStore(deviceId: number): Promise<Record<string, unknown>>;
|
|
49
|
+
writeDeviceStore(deviceId: number, patch: Record<string, unknown>): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
/** The exporter's per-device store as an {@link ExposedNameStore}; throws when settings are absent. */
|
|
52
|
+
export declare function exposedNameStoreOf(settings: DeviceStoreAccess | undefined, owner: string): ExposedNameStore;
|
|
53
|
+
/** The per-device store an exporter can walk to prune a deleted instance's names. */
|
|
54
|
+
export interface PrunableDeviceStore extends DeviceStoreAccess {
|
|
55
|
+
listDeviceStoreIds(): Promise<readonly number[]>;
|
|
56
|
+
readDeviceStoreBatch(deviceIds: readonly number[]): Promise<ReadonlyMap<number, Record<string, unknown>>>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Remove every name saved for `instanceId` (the instance was deleted), so a later instance that
|
|
60
|
+
* reuses the id does not inherit them. Returns the device ids that lost a name. A store that
|
|
61
|
+
* cannot be read throws; nothing is written for the devices not reached.
|
|
62
|
+
*/
|
|
63
|
+
export declare function pruneExposedNames(settings: PrunableDeviceStore, instanceId: string): Promise<readonly number[]>;
|
|
64
|
+
/** No control characters, at most `max` characters: the rule of a platform that takes free text. */
|
|
65
|
+
export declare function freeTextNameValidator(platform: string, max: number): ExposedNameValidator;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type { z } from 'zod';
|
|
8
8
|
import type { VocabIcon } from './cap-vocabulary-icon.js';
|
|
9
9
|
import type { HeroContext, HeroFragment, StateReading } from './hero-fragment.js';
|
|
10
|
+
import type { HeroMeasurement } from './hero-measurement.js';
|
|
10
11
|
import type { HeroAction, HeroArgs, HeroConfirm, HeroControl, HeroFact, HeroRow } from './hero-model.js';
|
|
11
12
|
import type { HeroState } from './hero-state.js';
|
|
12
13
|
import { type HeroText } from './hero-text.js';
|
|
@@ -16,6 +17,8 @@ export interface HeroContribution {
|
|
|
16
17
|
}
|
|
17
18
|
/** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
|
|
18
19
|
export declare function contribution<S>(cap: string, schema: z.ZodType<S>, build: (slice: S | undefined, ctx: HeroContext) => HeroFragment): HeroContribution;
|
|
20
|
+
/** The fragment, carrying the cap's single measurement when it has one. */
|
|
21
|
+
export declare function measured(fragment: HeroFragment, measurement: HeroMeasurement | undefined): HeroFragment;
|
|
19
22
|
export declare function action(id: string, label: HeroText, icon: VocabIcon, cap: string, method: string, args?: HeroArgs, emphasis?: 'primary' | 'normal', confirm?: HeroConfirm | null): HeroAction;
|
|
20
23
|
export declare const asAction: (a: HeroAction) => HeroControl;
|
|
21
24
|
export declare function reading(source: StateReading['source'], state: HeroState, assumed?: boolean, title?: HeroText): StateReading;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Contributions return a fragment; `buildHeroModel` merges the fragments.
|
|
4
4
|
*/
|
|
5
5
|
import type { HeroBadge, HeroConsumablesSlot, HeroConsumptionSlot, HeroFact, HeroOwnPowerSlot, HeroPowerSupplySlot, HeroRemoteSlot, HeroRow, HeroSideTile, HeroTimedRunSlot } from './hero-model.js';
|
|
6
|
+
import type { HeroMeasurement } from './hero-measurement.js';
|
|
6
7
|
import type { HeroSceneMode } from './hero-scene.js';
|
|
7
8
|
import type { HeroState } from './hero-state.js';
|
|
8
9
|
import type { HeroText } from './hero-text.js';
|
|
@@ -67,4 +68,6 @@ export interface HeroFragment {
|
|
|
67
68
|
readonly mode?: HeroSceneMode;
|
|
68
69
|
readonly level?: number;
|
|
69
70
|
};
|
|
71
|
+
/** This cap's single reading, when a sensor that measures only it is drawn as that reading. */
|
|
72
|
+
readonly measurement?: HeroMeasurement;
|
|
70
73
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE measurement a simple sensor shows (card wave, phase 1).
|
|
3
|
+
*
|
|
4
|
+
* A sensor that measures a single quantity (a temperature, a humidity, a power,
|
|
5
|
+
* a contact, a text state) is drawn as that reading, once, big, inside a scene
|
|
6
|
+
* whose motion says what the number means: heat rising when hot, flakes when
|
|
7
|
+
* cold, a wire flowing at the speed of the power, a ring while a window is
|
|
8
|
+
* open. Everything the card draws is decided here; a client only paints it.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
import { type IconKey } from '../icon-catalog.js';
|
|
12
|
+
import { type ReadingQuantity } from '../../units/quantity.js';
|
|
13
|
+
import { type HeroTone } from './hero-state.js';
|
|
14
|
+
import { type HeroText } from './hero-text.js';
|
|
15
|
+
export declare const HERO_MEASUREMENT_QUANTITIES: readonly ['temperature', 'humidity', 'power', 'contact', 'text'];
|
|
16
|
+
export type HeroMeasurementQuantity = (typeof HERO_MEASUREMENT_QUANTITIES)[number];
|
|
17
|
+
/** How a temperature reads to a person; drives the heat or the cold scene. */
|
|
18
|
+
export declare const HERO_MEASUREMENT_BANDS: readonly ['hot', 'mild', 'cold'];
|
|
19
|
+
export type HeroMeasurementBand = (typeof HERO_MEASUREMENT_BANDS)[number];
|
|
20
|
+
/** `updated` = the value was last read then ("2 min ago"); `changed` = it has held since then ("for 12 min"). */
|
|
21
|
+
export declare const HERO_MEASUREMENT_SINCE_KINDS: readonly ['updated', 'changed'];
|
|
22
|
+
export type HeroMeasurementSinceKind = (typeof HERO_MEASUREMENT_SINCE_KINDS)[number];
|
|
23
|
+
/**
|
|
24
|
+
* The number behind a measurement, in its quantity's BASE unit (°C, %, W). A client
|
|
25
|
+
* draws it through the operator's display resolution (unit preference, per-device
|
|
26
|
+
* and per-role overrides, precision) — `value` / `unit` are the base rendering for a
|
|
27
|
+
* client that has none.
|
|
28
|
+
*/
|
|
29
|
+
export interface HeroMeasurementReading {
|
|
30
|
+
readonly value: number;
|
|
31
|
+
readonly quantity: ReadingQuantity;
|
|
32
|
+
}
|
|
33
|
+
export declare const HeroMeasurementReadingSchema: z.ZodType<HeroMeasurementReading>;
|
|
34
|
+
export interface HeroMeasurement {
|
|
35
|
+
readonly quantity: HeroMeasurementQuantity;
|
|
36
|
+
/** The base-unit number to format for display; `null` = not a number (a contact, a text). */
|
|
37
|
+
readonly reading: HeroMeasurementReading | null;
|
|
38
|
+
/** The quantity's icon beside the value; `null` = a text state, no icon. */
|
|
39
|
+
readonly icon: IconKey | null;
|
|
40
|
+
/** The value, without its unit: "48", "1221", "Open", "Eco". */
|
|
41
|
+
readonly value: HeroText;
|
|
42
|
+
/** Drawn small and muted after the value; `null` = none. */
|
|
43
|
+
readonly unit: string | null;
|
|
44
|
+
/** A temperature's band; `null` for every other quantity. */
|
|
45
|
+
readonly band: HeroMeasurementBand | null;
|
|
46
|
+
/**
|
|
47
|
+
* How strongly the scene moves, 0..1: the power's share of the scale (0 = still),
|
|
48
|
+
* the humidity, the open contact (1). `null` = the quantity has no strength.
|
|
49
|
+
*/
|
|
50
|
+
readonly level: number | null;
|
|
51
|
+
/** The state corner's word: "Hot", "Active", "Open", "Changed". */
|
|
52
|
+
readonly word: HeroText;
|
|
53
|
+
readonly tone: HeroTone;
|
|
54
|
+
/** Ms epoch of the `sinceKind` moment; `null` = never observed. */
|
|
55
|
+
readonly since: number | null;
|
|
56
|
+
readonly sinceKind: HeroMeasurementSinceKind;
|
|
57
|
+
/** The history series a trend line reads (`cap:<cap>.<field>`); `null` = not a number over time. */
|
|
58
|
+
readonly historyKey: string | null;
|
|
59
|
+
}
|
|
60
|
+
export declare const HeroMeasurementSchema: z.ZodType<HeroMeasurement>;
|
|
61
|
+
/** Below this a temperature reads cold, above `HOT_ABOVE_C` hot (°C). */
|
|
62
|
+
export declare const COLD_BELOW_C = 12;
|
|
63
|
+
export declare const HOT_ABOVE_C = 28;
|
|
64
|
+
/** The power at which the wire runs at full speed (W). */
|
|
65
|
+
export declare const POWER_FULL_SCALE_W = 3000;
|
|
66
|
+
/** Below / above these a humidity reads dry / humid (%). */
|
|
67
|
+
export declare const DRY_BELOW_PCT = 30;
|
|
68
|
+
export declare const HUMID_ABOVE_PCT = 70;
|
|
69
|
+
export declare function temperatureBand(celsius: number): HeroMeasurementBand;
|
|
70
|
+
export declare function temperatureMeasurement(celsius: number, since: number | null): HeroMeasurement;
|
|
71
|
+
export declare function humidityMeasurement(percent: number, since: number | null): HeroMeasurement;
|
|
72
|
+
export declare function powerMeasurement(watts: number, since: number | null): HeroMeasurement;
|
|
73
|
+
export declare function contactMeasurement(open: boolean, since: number | null): HeroMeasurement;
|
|
74
|
+
export declare function textMeasurement(text: string, since: number | null): HeroMeasurement;
|
|
75
|
+
/** Whether `m` is the reading a device of `role` shows. */
|
|
76
|
+
export declare function measurementFitsRole(m: HeroMeasurement, role: string | null): boolean;
|
|
@@ -165,6 +165,36 @@ export declare const HeroControlSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
165
165
|
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
166
166
|
}, z.core.$strip>;
|
|
167
167
|
valueArg: z.ZodString;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
kind: z.ZodLiteral<"number">;
|
|
170
|
+
id: z.ZodString;
|
|
171
|
+
label: z.ZodObject<{
|
|
172
|
+
en: z.ZodString;
|
|
173
|
+
it: z.ZodString;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
176
|
+
step: z.ZodNullable<z.ZodNumber>;
|
|
177
|
+
unit: z.ZodString;
|
|
178
|
+
call: z.ZodObject<{
|
|
179
|
+
cap: z.ZodString;
|
|
180
|
+
method: z.ZodString;
|
|
181
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
valueArg: z.ZodString;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
kind: z.ZodLiteral<"text">;
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
label: z.ZodObject<{
|
|
188
|
+
en: z.ZodString;
|
|
189
|
+
it: z.ZodString;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
value: z.ZodNullable<z.ZodString>;
|
|
192
|
+
call: z.ZodObject<{
|
|
193
|
+
cap: z.ZodString;
|
|
194
|
+
method: z.ZodString;
|
|
195
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
valueArg: z.ZodString;
|
|
168
198
|
}, z.core.$strip>], "kind">;
|
|
169
199
|
export type HeroControl = z.infer<typeof HeroControlSchema>;
|
|
170
200
|
/** One value drawn as a pill: an icon, the words, a tone. `null` icon = text only. */
|
|
@@ -290,6 +320,36 @@ export declare const HeroRowSchema: z.ZodObject<{
|
|
|
290
320
|
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
291
321
|
}, z.core.$strip>;
|
|
292
322
|
valueArg: z.ZodString;
|
|
323
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
324
|
+
kind: z.ZodLiteral<"number">;
|
|
325
|
+
id: z.ZodString;
|
|
326
|
+
label: z.ZodObject<{
|
|
327
|
+
en: z.ZodString;
|
|
328
|
+
it: z.ZodString;
|
|
329
|
+
}, z.core.$strip>;
|
|
330
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
331
|
+
step: z.ZodNullable<z.ZodNumber>;
|
|
332
|
+
unit: z.ZodString;
|
|
333
|
+
call: z.ZodObject<{
|
|
334
|
+
cap: z.ZodString;
|
|
335
|
+
method: z.ZodString;
|
|
336
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
valueArg: z.ZodString;
|
|
339
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
340
|
+
kind: z.ZodLiteral<"text">;
|
|
341
|
+
id: z.ZodString;
|
|
342
|
+
label: z.ZodObject<{
|
|
343
|
+
en: z.ZodString;
|
|
344
|
+
it: z.ZodString;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
value: z.ZodNullable<z.ZodString>;
|
|
347
|
+
call: z.ZodObject<{
|
|
348
|
+
cap: z.ZodString;
|
|
349
|
+
method: z.ZodString;
|
|
350
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
351
|
+
}, z.core.$strip>;
|
|
352
|
+
valueArg: z.ZodString;
|
|
293
353
|
}, z.core.$strip>], "kind">>;
|
|
294
354
|
progress: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
295
355
|
}, z.core.$strip>;
|
|
@@ -1038,9 +1098,40 @@ export declare const HeroModelSchema: z.ZodObject<{
|
|
|
1038
1098
|
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
1039
1099
|
}, z.core.$strip>;
|
|
1040
1100
|
valueArg: z.ZodString;
|
|
1101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1102
|
+
kind: z.ZodLiteral<"number">;
|
|
1103
|
+
id: z.ZodString;
|
|
1104
|
+
label: z.ZodObject<{
|
|
1105
|
+
en: z.ZodString;
|
|
1106
|
+
it: z.ZodString;
|
|
1107
|
+
}, z.core.$strip>;
|
|
1108
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
1109
|
+
step: z.ZodNullable<z.ZodNumber>;
|
|
1110
|
+
unit: z.ZodString;
|
|
1111
|
+
call: z.ZodObject<{
|
|
1112
|
+
cap: z.ZodString;
|
|
1113
|
+
method: z.ZodString;
|
|
1114
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
1115
|
+
}, z.core.$strip>;
|
|
1116
|
+
valueArg: z.ZodString;
|
|
1117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1118
|
+
kind: z.ZodLiteral<"text">;
|
|
1119
|
+
id: z.ZodString;
|
|
1120
|
+
label: z.ZodObject<{
|
|
1121
|
+
en: z.ZodString;
|
|
1122
|
+
it: z.ZodString;
|
|
1123
|
+
}, z.core.$strip>;
|
|
1124
|
+
value: z.ZodNullable<z.ZodString>;
|
|
1125
|
+
call: z.ZodObject<{
|
|
1126
|
+
cap: z.ZodString;
|
|
1127
|
+
method: z.ZodString;
|
|
1128
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<HeroArgValue, unknown, z.core.$ZodTypeInternals<HeroArgValue, unknown>>>;
|
|
1129
|
+
}, z.core.$strip>;
|
|
1130
|
+
valueArg: z.ZodString;
|
|
1041
1131
|
}, z.core.$strip>], "kind">>;
|
|
1042
1132
|
progress: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1043
1133
|
}, z.core.$strip>>;
|
|
1134
|
+
measurement: z.ZodOptional<z.ZodType<import("./hero-measurement.js").HeroMeasurement, unknown, z.core.$ZodTypeInternals<import("./hero-measurement.js").HeroMeasurement, unknown>>>;
|
|
1044
1135
|
gated: z.ZodArray<z.ZodString>;
|
|
1045
1136
|
provenance: z.ZodArray<z.ZodObject<{
|
|
1046
1137
|
partId: z.ZodString;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* model is missing it, so the fix goes in the model.
|
|
34
34
|
*/
|
|
35
35
|
import { z } from 'zod';
|
|
36
|
-
import { type HeroModel } from './hero-model.js';
|
|
36
|
+
import { type HeroFact, type HeroModel } from './hero-model.js';
|
|
37
37
|
/**
|
|
38
38
|
* The row's timed-run control. `id` is `timed-run.run` while idle and
|
|
39
39
|
* `timed-run.cancel` while armed; `duration` and `unit` are the one-tap run
|
|
@@ -203,6 +203,36 @@ export declare const HeroRowModelSchema: z.ZodObject<{
|
|
|
203
203
|
args: z.ZodRecord<z.ZodString, z.ZodType<import("./hero-model.js").HeroArgValue, unknown, z.core.$ZodTypeInternals<import("./hero-model.js").HeroArgValue, unknown>>>;
|
|
204
204
|
}, z.core.$strip>;
|
|
205
205
|
valueArg: z.ZodString;
|
|
206
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
+
kind: z.ZodLiteral<"number">;
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
label: z.ZodObject<{
|
|
210
|
+
en: z.ZodString;
|
|
211
|
+
it: z.ZodString;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
214
|
+
step: z.ZodNullable<z.ZodNumber>;
|
|
215
|
+
unit: z.ZodString;
|
|
216
|
+
call: z.ZodObject<{
|
|
217
|
+
cap: z.ZodString;
|
|
218
|
+
method: z.ZodString;
|
|
219
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<import("./hero-model.js").HeroArgValue, unknown, z.core.$ZodTypeInternals<import("./hero-model.js").HeroArgValue, unknown>>>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
valueArg: z.ZodString;
|
|
222
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
223
|
+
kind: z.ZodLiteral<"text">;
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
label: z.ZodObject<{
|
|
226
|
+
en: z.ZodString;
|
|
227
|
+
it: z.ZodString;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
value: z.ZodNullable<z.ZodString>;
|
|
230
|
+
call: z.ZodObject<{
|
|
231
|
+
cap: z.ZodString;
|
|
232
|
+
method: z.ZodString;
|
|
233
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<import("./hero-model.js").HeroArgValue, unknown, z.core.$ZodTypeInternals<import("./hero-model.js").HeroArgValue, unknown>>>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
valueArg: z.ZodString;
|
|
206
236
|
}, z.core.$strip>], "kind">>;
|
|
207
237
|
timedRun: z.ZodNullable<z.ZodObject<{
|
|
208
238
|
id: z.ZodEnum<{
|
|
@@ -265,6 +295,36 @@ export declare const HeroRowModelSchema: z.ZodObject<{
|
|
|
265
295
|
args: z.ZodRecord<z.ZodString, z.ZodType<import("./hero-model.js").HeroArgValue, unknown, z.core.$ZodTypeInternals<import("./hero-model.js").HeroArgValue, unknown>>>;
|
|
266
296
|
}, z.core.$strip>;
|
|
267
297
|
valueArg: z.ZodString;
|
|
298
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
299
|
+
kind: z.ZodLiteral<"number">;
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
label: z.ZodObject<{
|
|
302
|
+
en: z.ZodString;
|
|
303
|
+
it: z.ZodString;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
306
|
+
step: z.ZodNullable<z.ZodNumber>;
|
|
307
|
+
unit: z.ZodString;
|
|
308
|
+
call: z.ZodObject<{
|
|
309
|
+
cap: z.ZodString;
|
|
310
|
+
method: z.ZodString;
|
|
311
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<import("./hero-model.js").HeroArgValue, unknown, z.core.$ZodTypeInternals<import("./hero-model.js").HeroArgValue, unknown>>>;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
valueArg: z.ZodString;
|
|
314
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
315
|
+
kind: z.ZodLiteral<"text">;
|
|
316
|
+
id: z.ZodString;
|
|
317
|
+
label: z.ZodObject<{
|
|
318
|
+
en: z.ZodString;
|
|
319
|
+
it: z.ZodString;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
value: z.ZodNullable<z.ZodString>;
|
|
322
|
+
call: z.ZodObject<{
|
|
323
|
+
cap: z.ZodString;
|
|
324
|
+
method: z.ZodString;
|
|
325
|
+
args: z.ZodRecord<z.ZodString, z.ZodType<import("./hero-model.js").HeroArgValue, unknown, z.core.$ZodTypeInternals<import("./hero-model.js").HeroArgValue, unknown>>>;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
valueArg: z.ZodString;
|
|
268
328
|
}, z.core.$strip>], "kind">>>;
|
|
269
329
|
trailing: z.ZodNullable<z.ZodObject<{
|
|
270
330
|
id: z.ZodEnum<{
|
|
@@ -308,10 +368,16 @@ export declare const HeroRowModelSchema: z.ZodObject<{
|
|
|
308
368
|
warning: "warning";
|
|
309
369
|
}>;
|
|
310
370
|
}, z.core.$strip>>;
|
|
371
|
+
measurement: z.ZodOptional<z.ZodType<import("./hero-measurement.js").HeroMeasurement, unknown, z.core.$ZodTypeInternals<import("./hero-measurement.js").HeroMeasurement, unknown>>>;
|
|
311
372
|
}, z.core.$strip>;
|
|
312
373
|
export type HeroRowModel = z.infer<typeof HeroRowModelSchema>;
|
|
313
374
|
/** The most facts a row's status line carries after its head: the line never wraps. */
|
|
314
375
|
export declare const ROW_STATUS_FACTS_MAX = 3;
|
|
376
|
+
/**
|
|
377
|
+
* A measurement that IS the headline. The row trails it so a client that paints only
|
|
378
|
+
* `trailing` still shows the reading. Power, battery and consumables stay ahead of these.
|
|
379
|
+
*/
|
|
380
|
+
export declare const ROW_READING_FACT_IDS: readonly HeroFact['id'][];
|
|
315
381
|
/**
|
|
316
382
|
* A type whose primary is a named control, not its power: a climate row is the mode
|
|
317
383
|
* (which carries "off") and the setpoint, with no power toggle.
|
|
@@ -9,6 +9,7 @@ export { HERO_ROW_IDS, HERO_ROW_LABELS, heroArgsWithValue, type HeroAction, type
|
|
|
9
9
|
export { HERO_ANIMATIONS, HERO_BACKGROUNDS, HERO_STATES, HERO_TONES, type HeroAnimation, type HeroBackgroundToken, type HeroLook, type HeroState, type HeroTone, type StateLook, } from './hero-state.js';
|
|
10
10
|
export { HERO_SCENE_BY_ROLE, HERO_SCENE_BY_TYPE, HERO_SCENES, HERO_SCENE_MODES, resolveHeroSceneId, type HeroScene, type HeroSceneId, type HeroSceneMode, } from './hero-scene.js';
|
|
11
11
|
export { HeroRowModelSchema, projectDeviceRow, type HeroRowModel, } from './hero-row.js';
|
|
12
|
+
export { HERO_MEASUREMENT_BANDS, HERO_MEASUREMENT_QUANTITIES, HERO_MEASUREMENT_SINCE_KINDS, HeroMeasurementReadingSchema, HeroMeasurementSchema, contactMeasurement, measurementFitsRole, humidityMeasurement, powerMeasurement, temperatureBand, temperatureMeasurement, textMeasurement, type HeroMeasurement, type HeroMeasurementBand, type HeroMeasurementQuantity, type HeroMeasurementReading, type HeroMeasurementSinceKind, } from './hero-measurement.js';
|
|
12
13
|
export { heroText, type HeroText } from './hero-text.js';
|
|
13
14
|
export * from './media-player-view.js';
|
|
14
15
|
export { resolveOwnPower } from './own-power.js';
|
|
@@ -437,6 +437,15 @@ export declare enum EventCategory {
|
|
|
437
437
|
* without filtering on `capName`.
|
|
438
438
|
*/
|
|
439
439
|
DeviceStateChanged = "device.state-changed",
|
|
440
|
+
/**
|
|
441
|
+
* A device COMMAND (a vocabulary action, D920/D983) settled in the hub's
|
|
442
|
+
* transition audit (D1022): confirmed, already in place, unconfirmed or
|
|
443
|
+
* failed. Never a device's own change. Payload: `DeviceCommandSettledEvent`
|
|
444
|
+
* (`{deviceId, action, outcome, actor, at}`, no arguments). It feeds
|
|
445
|
+
* the Notification Center `device-command` kind. Telemetry (D8): losing one
|
|
446
|
+
* costs a notification, never state; the audit row is the record.
|
|
447
|
+
*/
|
|
448
|
+
DeviceCommandSettled = "device.command-settled",
|
|
440
449
|
/**
|
|
441
450
|
* The NATIVE shadow of a cap a composition has claimed fields of moved
|
|
442
451
|
* (D663). Payload: `{ deviceId, capName, native }` — what the provider
|
package/dist/enums.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_category = require("./event-category-
|
|
2
|
+
const require_event_category = require("./event-category-Ps2LC8dN.js");
|
|
3
3
|
//#region src/enums/event-source-type.ts
|
|
4
4
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
5
5
|
EventSourceType["Addon"] = "addon";
|
package/dist/enums.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as EventCategory } from "./event-category-
|
|
1
|
+
import { t as EventCategory } from "./event-category-Dv-Gcv1f.mjs";
|
|
2
2
|
//#region src/enums/event-source-type.ts
|
|
3
3
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
4
4
|
EventSourceType["Addon"] = "addon";
|
|
@@ -439,6 +439,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
439
439
|
*/
|
|
440
440
|
EventCategory["DeviceStateChanged"] = "device.state-changed";
|
|
441
441
|
/**
|
|
442
|
+
* A device COMMAND (a vocabulary action, D920/D983) settled in the hub's
|
|
443
|
+
* transition audit (D1022): confirmed, already in place, unconfirmed or
|
|
444
|
+
* failed. Never a device's own change. Payload: `DeviceCommandSettledEvent`
|
|
445
|
+
* (`{deviceId, action, outcome, actor, at}`, no arguments). It feeds
|
|
446
|
+
* the Notification Center `device-command` kind. Telemetry (D8): losing one
|
|
447
|
+
* costs a notification, never state; the audit row is the record.
|
|
448
|
+
*/
|
|
449
|
+
EventCategory["DeviceCommandSettled"] = "device.command-settled";
|
|
450
|
+
/**
|
|
442
451
|
* The NATIVE shadow of a cap a composition has claimed fields of moved
|
|
443
452
|
* (D663). Payload: `{ deviceId, capName, native }` — what the provider
|
|
444
453
|
* wrote, BEFORE the owned fields are overlaid. Owner-only (D224): it is for
|
|
@@ -439,6 +439,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
439
439
|
*/
|
|
440
440
|
EventCategory["DeviceStateChanged"] = "device.state-changed";
|
|
441
441
|
/**
|
|
442
|
+
* A device COMMAND (a vocabulary action, D920/D983) settled in the hub's
|
|
443
|
+
* transition audit (D1022): confirmed, already in place, unconfirmed or
|
|
444
|
+
* failed. Never a device's own change. Payload: `DeviceCommandSettledEvent`
|
|
445
|
+
* (`{deviceId, action, outcome, actor, at}`, no arguments). It feeds
|
|
446
|
+
* the Notification Center `device-command` kind. Telemetry (D8): losing one
|
|
447
|
+
* costs a notification, never state; the audit row is the record.
|
|
448
|
+
*/
|
|
449
|
+
EventCategory["DeviceCommandSettled"] = "device.command-settled";
|
|
450
|
+
/**
|
|
442
451
|
* The NATIVE shadow of a cap a composition has claimed fields of moved
|
|
443
452
|
* (D663). Payload: `{ deviceId, capName, native }` — what the provider
|
|
444
453
|
* wrote, BEFORE the owned fields are overlaid. Owner-only (D224): it is for
|
|
@@ -2424,6 +2424,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
2424
2424
|
output: z.infer<typeof deviceExportCapability.methods.unexposeDevice.output>;
|
|
2425
2425
|
meta: object;
|
|
2426
2426
|
}>;
|
|
2427
|
+
setExposedName: TRPCMutationProcedure<{
|
|
2428
|
+
input: {
|
|
2429
|
+
[x: string]: unknown;
|
|
2430
|
+
} & z.input<typeof deviceExportCapability.methods.setExposedName.input>;
|
|
2431
|
+
output: z.infer<typeof deviceExportCapability.methods.setExposedName.output>;
|
|
2432
|
+
meta: object;
|
|
2433
|
+
}>;
|
|
2427
2434
|
listSupportedEntityKinds: TRPCQueryProcedure<{
|
|
2428
2435
|
input: {
|
|
2429
2436
|
nodeId?: string | undefined;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 1485 method paths across 205 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { MethodRole } from '../auth/viewer-access.js';
|
|
12
12
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
@@ -91,7 +91,7 @@ export interface SystemProxy {
|
|
|
91
91
|
readonly decoder: Pick<InferProvider<typeof decoderCapability>, 'getInfo' | 'reprobeHwaccel'>;
|
|
92
92
|
readonly deviceAdoption: Pick<InferProvider<typeof deviceAdoptionCapability>, 'listCandidateFilters' | 'listCandidates' | 'getCandidate' | 'refresh' | 'adopt' | 'release' | 'resync'>;
|
|
93
93
|
readonly deviceCredentials: Pick<InferProvider<typeof deviceCredentialsCapability>, 'listDeviceCredentials' | 'startEnrollment' | 'revokeDeviceCredential' | 'getDeviceCertificateSettings' | 'setDeviceCertificateSettings' | 'deleteDeviceCredential' | 'getDeviceCaStatus' | 'renameDeviceCredential'>;
|
|
94
|
-
readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listInstances' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice' | 'listSupportedEntityKinds' | 'listExposedEntities' | 'exposeEntity' | 'unexposeEntity'>;
|
|
94
|
+
readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listInstances' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice' | 'setExposedName' | 'listSupportedEntityKinds' | 'listExposedEntities' | 'exposeEntity' | 'unexposeEntity'>;
|
|
95
95
|
readonly deviceHistory: Pick<InferProvider<typeof deviceHistoryCapability>, 'listNodeSeries' | 'queryNode' | 'queryMany' | 'declareSeries' | 'record' | 'recordBuckets' | 'getStatus' | 'listOrphanSeries' | 'deleteOrphanSeries'>;
|
|
96
96
|
readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'migrateDevice' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'renderDeviceTemplates' | 'checkDeviceTemplates' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listLocations' | 'addLocation' | 'removeLocation' | 'renameLocation' | 'listLocationIcons' | 'setLocationIcon' | 'listLocationDescriptions' | 'setLocationDescription' | 'listSiteZones' | 'setSiteZone' | 'removeSiteZone' | 'renameSiteZone' | 'setLocationZone' | 'listPersistedByAddon' | 'listAll' | 'search' | 'getChildren' | 'getChildrenBatch' | 'getLinkedDevicesBatch' | 'listDeletedSince' | 'cleanupDeletedDevicesData' | 'removeByIntegration' | 'getBindingsBatch' | 'getAllBindings' | 'listDeviceIdsByCaps' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionStartJob' | 'adoptionListJobs' | 'adoptionCancelJob' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'listDiscoveryProposals' | 'dismissDiscoveryProposal' | 'reportDiscoveryObservations' | 'runDiscoverySweep' | 'providerCreationType' | 'providerDiscoveryParamsSchema' | 'getDeviceStatusAggregateBatch'>;
|
|
97
97
|
readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'reloadDevice' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryModes' | 'classifyDiscoveryHits' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -192,9 +192,9 @@ export { APP_FLOW_DEFAULT_REDIRECT, APP_FLOW_REFUSAL_MESSAGES, APP_FLOW_STATE_PR
|
|
|
192
192
|
export { SSO_STATE_COOKIE, SSO_STATE_COOKIE_MAX_AGE_SEC } from './auth/sso-state.js';
|
|
193
193
|
export { buildDeviceEnrollmentLink, buildDeviceSignatureMessage, type CompleteEnrollmentInput, CompleteEnrollmentInputSchema, type CompleteEnrollmentOutput, CompleteEnrollmentOutputSchema, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_CERT_VALIDITY_DAYS, DEVICE_ENROLLMENT_TTL_MS, DEVICE_NONCE_TTL_MS, DEVICE_SAN_CREDENTIAL_PREFIX, DEVICE_SAN_USER_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, type DeviceCertificateLoginMethod, DeviceCertificateLoginMethodSchema, type DeviceChallenge, DeviceChallengeSchema, type DeviceCredential, DeviceCredentialSchema, type DeviceCredentialStatus, DeviceCredentialStatusSchema, type DevicePlatform, DevicePlatformSchema, type DeviceProofInput, DeviceProofInputSchema, type CompleteEnrollmentResult, CompleteEnrollmentResultSchema, DEFINITIVE_DEVICE_REFUSALS, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, deviceRefusalFromMessage, type DeviceChallengeResult, DeviceChallengeResultSchema, DeviceEnrollProofSchema, type DeviceRefusal, type DeviceRefusalReason, DeviceRefusalReasonSchema, DeviceRefusalSchema, type DeviceRevoker, type EnrollSelfInput, EnrollSelfInputSchema, formatDeviceRevoker, isDefinitiveDeviceRefusal, type RenewDeviceCertificateResult, RenewDeviceCertificateResultSchema, type RevokeOwnDeviceCertificateResult, RevokeOwnDeviceCertificateResultSchema, type DeviceSignaturePurpose, DeviceSignaturePurposeSchema, type RenewDeviceCertificateOutput, RenewDeviceCertificateOutputSchema, type StartEnrollmentOutput, StartEnrollmentOutputSchema, parseDeviceEnrollmentLink, } from './auth/device-certificate.js';
|
|
194
194
|
export { advertisedHubOrigins, claimedRequestOrigins, normalizeOrigin, pickRequestOrigin, type RequestHeaders, requestMountPrefix, } from './auth/request-origin.js';
|
|
195
|
-
export type { ActionStep, AutomationAction, AutomationAll, AutomationAny,
|
|
196
|
-
export { ActionStepSchema, AutomationActionSchema,
|
|
197
|
-
export { UnitWarningSchema, capUnitResolver, normalizeActionUnits, normalizeConditionUnits, normalizeRecipeUnits, prepareRecipeUnits, } from './automation/index.js';
|
|
195
|
+
export type { ActionStep, AutomationAction, AutomationAll, AutomationAny, AutomationCommandStep, AutomationConditionOperator, AutomationConditionTraceNode, AutomationEventLeaf, AutomationLeaf, AutomationNot, AutomationStateLeaf, AutomationWhen, DetectionLabelSource, DetectionLeaf, DetectionSubject, DeviceBecomesLeaf, BecomesDeps, BecomesEffect, BecomesOperator, BecomesSpec, DeviceIsLeaf, ExpressionLeaf, TimeIsLeaf, TriggeredByLeaf, DeviceFiredLeaf, DeviceFiredMatch, IdentifiedEventLeaf, WhenSiteIssue, HoldMode, HoldReading, HoldSpec, HoldTrace, IdentityLabel, LegacyAutomationRecipe, AutomationBodyStep, AutomationBranchStep, AutomationRecipeInput, AutomationChooseStep, AutomationWaitUntilStep, AutomationParallelStep, AutomationRepeatLoop, AutomationRepeatStep, AutomationSetStep, StepConditionRef, AutomationStopStep, StepDeviceTrace, LegacyCondition, LegacyTrigger, PlateLabel, StationaryLeaf, StationaryPresentLeaf, SubClassLabel, SubjectObservation, SubjectVerdict, AutomationRecipe, AutomationRunMode, AutomationRunOutcome, AutomationRunTrace, AutomationRunVerdict, AutomationStateDoc, AutomationStepTrace, NestedStepTrace, AutomationTriggerTrace, ConditionEvaluation, ConditionReader, DetectionDecision, DetectionTrigger, DetectionVars, GenerateAutomationBlockInput, MirrorRefreshFetchers, RunTrigger, MirrorRefreshReport, MirrorSource, StationaryChangedInput, StationaryDecision, StationaryTrigger, StationaryVars, DeviceFiredDecision, DeviceFiredVars, FiredDataScalar, FiredDataVars, TraceNodeOutcome, TraceValue, TrackLifecycleInput, TriggerVariable, } from './automation/index.js';
|
|
196
|
+
export { ActionStepSchema, AutomationActionSchema, AutomationCommandStepBaseSchema, AutomationCommandStepSchema, AutomationWaitStepSchema, AutomationChooseStepSchema, AutomationWaitUntilStepSchema, AutomationParallelStepSchema, AutomationRepeatLoopSchema, AutomationRepeatStepSchema, AutomationSetStepSchema, CHOOSE_BRANCHES_MAX, WAIT_UNTIL_TIMEOUT_MAX_S, PARALLEL_STEPS_MAX, REPEAT_COUNT_MAX, REPEAT_DEVICES_MAX, REPEAT_ITEM_VAR, REPEAT_ITERATIONS_MAX, REPEAT_STEPS_MAX, STEP_NEST_MAX, PARALLEL_STEPS_MIN, nestedStepsOf, stepConditionsOf, AutomationStopStepSchema, RESERVED_RUN_VARS, SET_VAR_NAME_RE, SET_VAR_VALUE_MAX, SET_VARS_MAX, STOP_REASON_MAX, stepGuardOf, WAIT_MAX_SECONDS, EMPTY_AUTOMATION_STATE, mergeSkipTraces, AutomationConditionOperatorSchema, AutomationConditionTraceNodeSchema, AutomationRecipeSchema, AutomationWhenSchema, CurrentAutomationRecipeSchema, DETECTION_LABEL_SOURCES, DetectionSubjectSchema, LegacyAutomationRecipeSchema, LegacyConditionSchema, LegacyTriggerSchema, MAX_TRACE_ARG_LENGTH, MAX_STEP_DEVICE_OUTCOMES, MAX_TRACE_ARGS, MAX_WHEN_DEPTH, StepDeviceTraceSchema, MAX_WHEN_LEAVES, REDACTED_ARG, StationarySubjectSchema, anySubjectMatches, buildStepArgsTrace, collectWhenMirrorSources, convertLegacyCondition, convertLegacyRecipe, convertLegacyWhen, countWhenLeaves, describeSubject, evaluateWhenTree, eventLeafIdAt, identifiedEventLeaves, hasTriggeredByLeaves, triggeredByIssue, EVENT_LEAF_ID_RE, TRIGGERED_BY_MAX_IDS, recipeSiteIssues, stepGuardSiteIssues, whenSiteIssues, forEachLeaf, BecomesOperatorSchema, BecomesWatch, HoldCore, HoldSpecSchema, HoldTraceSchema, HoldTracker, describeHold, describeHoldMs, hasEventLeaves, hasHoldLeaves, hasTimeLeaves, nextTimeBoundaryInMs, holdOf, observeHoldLeaves, isEventLeaf, isLeaf, subClassesOf, subjectFromClassName, subjectMatches, validateWhenTree, whenDepth, AutomationRunModeSchema, AutomationRunOutcomeSchema, AutomationRunTraceSchema, AutomationRunVerdictSchema, AutomationStateDocSchema, AutomationStepTraceSchema, AutomationTriggerTraceSchema, appendTrace, buildTriggerTrace, collectMirrorSources, ConditionMirror, stableIdKey, stableIdMapOf, DEFAULT_TRACE_KEEP, DetectionTriggerFilter, detectionClassMatches, evaluateConditionTree, evaluateStationaryTrigger, DeviceFiredWatch, FIRED_RECOVERED_NOTE, firedDataVars, DeviceFiredMatchSchema, generateAutomationBlock, isSkippedTrace, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_TRACE_KEEP, RunGate, skipSignature, TraceNodeOutcomeSchema, TraceValueSchema, triggerLeafVariables, triggerVariablesOf, validateRecipeBounds, } from './automation/index.js';
|
|
197
|
+
export { UnitWarningSchema, assertStepsOffered, type BoundCapsReader, capUnitResolver, normalizeActionUnits, normalizeConditionUnits, normalizeRecipeUnits, prepareRecipeUnits, } from './automation/index.js';
|
|
198
198
|
export type { PreparedRecipe, UnitResolver, UnitWarning, UnitsNormalized, } from './automation/index.js';
|
|
199
199
|
export * from './automation/action.js';
|
|
200
200
|
export * from './automation/action-target.js';
|
|
@@ -204,6 +204,7 @@ export * from './automation/step-condition.js';
|
|
|
204
204
|
export * from './automation/step-runner.js';
|
|
205
205
|
export * from './automation/wait-until.js';
|
|
206
206
|
export * from './automation/export-entities.js';
|
|
207
|
+
export * from './device/export-name.js';
|
|
207
208
|
export * from './automation/draft/index.js';
|
|
208
209
|
export * from './cap-call-context.js';
|
|
209
210
|
export * from './capabilities/index.js';
|
|
@@ -260,10 +261,9 @@ export { widenDeviceConstructor } from './device/device-context.js';
|
|
|
260
261
|
export type { AccessoryControlInput, AccessoryControlKind, AccessoryControlPick, DeviceControlKind, SensorMapping, } from './device/device-control-resolution.js';
|
|
261
262
|
export { DEVICE_TYPE_CONTROL_KIND, hasMotionTrigger, isNode, MOTION_TRIGGER_FEATURE, pickAccessoryControl, resolveDeviceControlKind, resolveMutate, SENSOR_FEATURES, SENSOR_MAP, } from './device/device-control-resolution.js';
|
|
262
263
|
export * from './device/hero/index.js';
|
|
263
|
-
export
|
|
264
|
-
export {
|
|
265
|
-
export
|
|
266
|
-
export { actionEffect, actionsForDevice as vocabularyActionsForDevice, allVocabActions, auditedFields, CAP_VOCABULARY, CAP_VOCABULARY_BY_NAME, commandEffect, findVocabAction, isCommand, renderVocabPhrase, triggersForDevice as vocabularyTriggersForDevice, VOCAB_TEMPLATES, vocabActionIdFor, } from './device/cap-vocabulary/index.js';
|
|
264
|
+
export { isDoPickerDeviceType } from './device/device-do-actions.js';
|
|
265
|
+
export type { CapVocabularyEntry, CapVocabularyMap, L10n as VocabL10n, ActionEffect, CommandEffect, IndexedVocabAction, VocabActionRefusal, VocabCall, LooseCapVocabularyEntry, LooseVocabEffect, LooseVocabOffer, LooseVocabOpenArg, ResolvedBooleanTrigger, ResolvedEnumTrigger, ResolvedEnumValue, ResolvedEventTrigger, ResolvedNumericTrigger, ResolvedValueTrigger, ResolvedVocabAction, ResolvedVocabTrigger, VocabBindingsInput, VocabCapName, VocabLocale, } from './device/cap-vocabulary/index.js';
|
|
266
|
+
export { actionEffect, actionsForDevice as vocabularyActionsForDevice, allVocabActions, auditedFields, CAP_VOCABULARY, CAP_VOCABULARY_BY_NAME, commandEffect, findVocabAction, isCommand, renderVocabPhrase, triggersForDevice as vocabularyTriggersForDevice, VOCAB_TEMPLATES, vocabActionIdFor, vocabCall, VocabActionError, assertDeviceOffers, } from './device/cap-vocabulary/index.js';
|
|
267
267
|
export type { ChildLayout, ChildLayoutEntry, CreateDeviceSpec, DeviceCapDisplayOverride, DeviceDiscovery, DeviceDisplayOverride, DeviceManualCreation, DeviceMeta, DiscoveredDevice, InitialDeviceMeta, RoleDisplayDefault, SavedDevice, } from './device/device-management.js';
|
|
268
268
|
export type { DeviceProfile, DeviceProfileDefaults, DeviceProfileMatch, PipelinePhaseMode, } from './device/device-profile.js';
|
|
269
269
|
export { BATTERY_DEVICE_PROFILE, DEVICE_PROFILES, deviceMatchesProfile, resolveDeviceProfile, } from './device/device-profile.js';
|
|
@@ -367,6 +367,7 @@ export { imageModesForKind, legacyImageMode, NC_MEDIA_IMAGE_MODES, type NcMediaR
|
|
|
367
367
|
export { isScheduleActive } from './notification/schedule.js';
|
|
368
368
|
export { buildSubjectPath, isDrawableSubjectPath, projectSubjectPath, SUBJECT_PATH_DWELL_EPS, SUBJECT_PATH_FULL_FRAME_COVERAGE, SUBJECT_PATH_MAX_POINTS, type SubjectPath, type SubjectPathNode, type SubjectPathOptions, type SubjectPathPoint, type SubjectPathRect, type SubjectPathSample, subjectPathSampleFromBox, subjectPathSvgPoints, } from './geometry/subject-path.js';
|
|
369
369
|
export { isAlarmControllableCap, NC_ALARM_CONTROLLABLE_CAPS, NC_ALARM_OPENING_EVENT_KINDS, NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING, type NcAlarmControllableCap, type NcAlarmMembershipSubject, type NcAlarmOpeningEventKind, ruleAutoTriggersAlarm, ruleBelongsToAlarm, ruleGatedOnArmedState, sensorTransitionNeverFires, } from './notification/alarm-membership.js';
|
|
370
|
+
export { NC_ALARM_PANEL_ACTION_IDS, NC_ALARM_TRIGGER_ACTION_ID, stepActuatesAlarmPanel, stepPullsAlarmTrigger, } from './notification/alarm-steps.js';
|
|
370
371
|
export { alarmDeviceBlocksArming, alarmDeviceSecureOnArm, type AlarmDeviceBlocksInput, type AlarmDeviceSecureOnArmInput, type NcAlarmSecureActuation, secureActuationFor, } from './notification/alarm-controllable.js';
|
|
371
372
|
export { alarmPatchLanded, applyBlockingEdit, applyModeDelaysEdits, applyModeDeviceListEdit, applyNonBlockingEdit, applySecureOnArmEdit, derivePostTriggeredAction, NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, NC_ALARM_DELAY_FIELDS, NC_ALARM_NOTIFY_FIELDS, type NcAlarmDelayField, type NcAlarmDelaySettings, type NcAlarmDelaySource, type NcAlarmModeDeviceListEditResult, type NcAlarmModeNotifyPolicy, type NcAlarmNonBlockingEditResult, type NcAlarmNotifyField, type NcAlarmResolvedDelays, resolveModeDelays, resolveModeNotifyPolicy, } from './notification/alarm-settings.js';
|
|
372
373
|
export { activateAlarmProfile, alarmProfileById, cloneAlarmSettings, createAlarmProfile, deleteAlarmProfile, ensureAlarmProfiles, isDefaultAlarmProfileId, NC_ALARM_DEFAULT_PROFILE_ID, NC_ALARM_DEFAULT_PROFILE_NAME, NC_ALARM_SYSTEM_DEFAULT_DELAYS, ncAlarmSystemDefaultSettings, type NcAlarmProfileCreateSource, type NcAlarmProfileRecord, type NcAlarmProfilesMutationResult, type NcAlarmProfilesRefuseReason, type NcAlarmProfilesState, renameAlarmProfile, syncActiveAlarmProfileSettings, } from './notification/alarm-profiles.js';
|