@camstack/types 1.2.434 → 1.2.436
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 +15 -0
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/addons.cap.d.ts +8 -0
- package/dist/capabilities/air-quality-sensor.cap.d.ts +8 -8
- package/dist/capabilities/ambient-light-sensor.cap.d.ts +4 -4
- package/dist/capabilities/battery.cap.d.ts +14 -14
- package/dist/capabilities/brightness.cap.d.ts +7 -7
- package/dist/capabilities/capability-definition.d.ts +3 -3
- package/dist/capabilities/color.cap.d.ts +6 -6
- package/dist/capabilities/device-history.cap.d.ts +2 -2
- package/dist/capabilities/dishwasher.cap.d.ts +11 -11
- package/dist/capabilities/fan-control.cap.d.ts +6 -6
- package/dist/capabilities/humidity-sensor.cap.d.ts +4 -4
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/lawn-mower-control.cap.d.ts +3 -3
- package/dist/capabilities/media-player.cap.d.ts +8 -8
- package/dist/capabilities/meter.cap.d.ts +1 -1
- package/dist/capabilities/network-link.cap.d.ts +13 -13
- package/dist/capabilities/notification-output.cap.d.ts +70 -0
- package/dist/capabilities/power-meter.cap.d.ts +22 -22
- package/dist/capabilities/presence.cap.d.ts +1 -15
- package/dist/capabilities/pressure-sensor.cap.d.ts +4 -4
- package/dist/capabilities/temperature-sensor.cap.d.ts +4 -4
- package/dist/capabilities/vacuum-control.cap.d.ts +3 -3
- package/dist/client.js +50 -2
- package/dist/client.mjs +50 -2
- package/dist/composition/composition-report.d.ts +1 -1
- package/dist/composition/examples.d.ts +1 -1
- package/dist/composition/helpers/appliance.d.ts +1 -1
- package/dist/composition/helpers/index.d.ts +1 -1
- package/dist/composition/helpers/source-pick.d.ts +7 -0
- package/dist/{composition-Bb8iwHEJ.mjs → composition-DwA0uVW5.mjs} +3 -2
- package/dist/{composition-CpAc0YfQ.js → composition-WNkEpwkF.js} +3 -2
- package/dist/device/base-device.d.ts +2 -2
- package/dist/device/device-runtime-state.d.ts +1 -1
- package/dist/device/device-state-handle.d.ts +1 -1
- package/dist/device/system-mirror.d.ts +1 -1
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +15 -15
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +331 -212
- package/dist/index.mjs +328 -213
- package/dist/interfaces/addon.d.ts +8 -0
- package/dist/interfaces/event-bus.d.ts +3 -3
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/notification/delivery-params.d.ts +15 -0
- package/dist/{sleep-DFaVPxfm.mjs → sleep-Crlmu_tO.mjs} +26 -30
- package/dist/{sleep-CO61AfwW.js → sleep-DHitF_e4.js} +26 -30
- package/dist/vendor-login-proxy/index.d.ts +1 -1
- package/dist/vendor-login-proxy/url-rewrite.d.ts +7 -0
- package/package.json +1 -1
|
@@ -58,8 +58,8 @@ export declare const MediaPlayerStatusSchema: z.ZodObject<{
|
|
|
58
58
|
album: z.ZodOptional<z.ZodString>;
|
|
59
59
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
60
60
|
}, z.core.$strip>>;
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
63
63
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
64
64
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
65
65
|
all: "all";
|
|
@@ -93,7 +93,7 @@ export declare const mediaPlayerCapability: {
|
|
|
93
93
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
94
94
|
readonly seek: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
95
95
|
deviceId: z.ZodNumber;
|
|
96
|
-
|
|
96
|
+
position: z.ZodNumber;
|
|
97
97
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
98
98
|
readonly setVolume: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
99
99
|
deviceId: z.ZodNumber;
|
|
@@ -147,8 +147,8 @@ export declare const mediaPlayerCapability: {
|
|
|
147
147
|
album: z.ZodOptional<z.ZodString>;
|
|
148
148
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
149
149
|
}, z.core.$strip>>;
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
151
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
152
152
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
153
153
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
154
154
|
all: "all";
|
|
@@ -185,8 +185,8 @@ export declare const mediaPlayerCapability: {
|
|
|
185
185
|
album: z.ZodOptional<z.ZodString>;
|
|
186
186
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
187
187
|
}, z.core.$strip>>;
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
189
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
190
190
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
191
191
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
192
192
|
all: "all";
|
|
@@ -205,7 +205,7 @@ export declare const mediaPlayerCapability: {
|
|
|
205
205
|
/**
|
|
206
206
|
* History (D850): volume (a level an operator or an automation sets; the
|
|
207
207
|
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
208
|
-
* `
|
|
208
|
+
* `position` is not recorded: it moves continuously while playing.
|
|
209
209
|
*/
|
|
210
210
|
readonly history: {
|
|
211
211
|
readonly fields: {
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { type InferProvider } from './capability-definition.js';
|
|
3
3
|
import { DeviceType } from '../device/device-type.js';
|
|
4
4
|
/**
|
|
5
|
-
* A monotonic total between resets (D944). Energy uses `power-meter.
|
|
5
|
+
* A monotonic total between resets (D944). Energy uses `power-meter.energy`
|
|
6
6
|
* so dashboards keep one series; every other instantaneous reading lands here.
|
|
7
7
|
* `value` is the time integral in the source quantity's accumulated base
|
|
8
8
|
* (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
|
|
@@ -30,8 +30,8 @@ export declare const NetworkLinkStatusSchema: z.ZodObject<{
|
|
|
30
30
|
unknown: "unknown";
|
|
31
31
|
wifi: "wifi";
|
|
32
32
|
}>;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
signal: z.ZodNullable<z.ZodNumber>;
|
|
34
|
+
rssi: z.ZodOptional<z.ZodNumber>;
|
|
35
35
|
ssid: z.ZodOptional<z.ZodString>;
|
|
36
36
|
lastUpdated: z.ZodNumber;
|
|
37
37
|
}, z.core.$strip>;
|
|
@@ -48,7 +48,7 @@ export declare function signalPercentFromBars(bars: number | undefined, maxBars:
|
|
|
48
48
|
* below is 0 %, -50 dBm and above is 100 %, linear between. Non-finite or
|
|
49
49
|
* positive input is not an RSSI: `null`.
|
|
50
50
|
*/
|
|
51
|
-
export declare function signalPercentFromRssi(
|
|
51
|
+
export declare function signalPercentFromRssi(rssi: number | undefined): number | null;
|
|
52
52
|
export declare const networkLinkCapability: {
|
|
53
53
|
readonly name: 'network-link';
|
|
54
54
|
readonly scope: 'device';
|
|
@@ -72,8 +72,8 @@ export declare const networkLinkCapability: {
|
|
|
72
72
|
unknown: "unknown";
|
|
73
73
|
wifi: "wifi";
|
|
74
74
|
}>;
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
signal: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
rssi: z.ZodOptional<z.ZodNumber>;
|
|
77
77
|
ssid: z.ZodOptional<z.ZodString>;
|
|
78
78
|
lastUpdated: z.ZodNumber;
|
|
79
79
|
}, z.core.$strip>;
|
|
@@ -88,16 +88,16 @@ export declare const networkLinkCapability: {
|
|
|
88
88
|
unknown: "unknown";
|
|
89
89
|
wifi: "wifi";
|
|
90
90
|
}>;
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
signal: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
rssi: z.ZodOptional<z.ZodNumber>;
|
|
93
93
|
ssid: z.ZodOptional<z.ZodString>;
|
|
94
94
|
lastUpdated: z.ZodNumber;
|
|
95
95
|
}, z.core.$strip>;
|
|
96
96
|
readonly kind: 'push';
|
|
97
97
|
readonly empty: {
|
|
98
98
|
type: "cellular" | "ethernet" | "unknown" | "wifi";
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
signal: number | null;
|
|
100
|
+
rssi?: number | undefined;
|
|
101
101
|
ssid?: string | undefined;
|
|
102
102
|
lastUpdated: number;
|
|
103
103
|
};
|
|
@@ -114,8 +114,8 @@ export declare const networkLinkCapability: {
|
|
|
114
114
|
unknown: "unknown";
|
|
115
115
|
wifi: "wifi";
|
|
116
116
|
}>;
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
signal: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
rssi: z.ZodOptional<z.ZodNumber>;
|
|
119
119
|
ssid: z.ZodOptional<z.ZodString>;
|
|
120
120
|
lastUpdated: z.ZodNumber;
|
|
121
121
|
}, z.core.$strip>;
|
|
@@ -133,13 +133,13 @@ export declare const networkLinkCapability: {
|
|
|
133
133
|
*/
|
|
134
134
|
readonly history: {
|
|
135
135
|
readonly fields: {
|
|
136
|
-
readonly
|
|
136
|
+
readonly signal: {
|
|
137
137
|
readonly kind: 'gauge';
|
|
138
138
|
readonly unit: '%';
|
|
139
139
|
readonly deadband: 3;
|
|
140
140
|
readonly minIntervalMs: 60000;
|
|
141
141
|
};
|
|
142
|
-
readonly
|
|
142
|
+
readonly rssi: {
|
|
143
143
|
readonly kind: 'gauge';
|
|
144
144
|
readonly unit: 'dBm';
|
|
145
145
|
readonly deadband: 2;
|
|
@@ -157,6 +157,37 @@ export declare const NotificationActionSchema: z.ZodObject<{
|
|
|
157
157
|
}>>;
|
|
158
158
|
}, z.core.$strip>;
|
|
159
159
|
export type NotificationAction = z.infer<typeof NotificationActionSchema>;
|
|
160
|
+
/** A delivery parameter value: what a notifier declared it takes. */
|
|
161
|
+
export declare const DeliveryParamValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
162
|
+
export type DeliveryParamValue = z.infer<typeof DeliveryParamValueSchema>;
|
|
163
|
+
/**
|
|
164
|
+
* One extra delivery parameter a notifier KIND declares (D938). A rule that
|
|
165
|
+
* addresses a target of that kind may set it; a kind that declares nothing is
|
|
166
|
+
* never handed one. The admin UI derives its control from this descriptor —
|
|
167
|
+
* no editor knows a service by name.
|
|
168
|
+
*
|
|
169
|
+
* Optional fields are `.optional()`, never `.default()` (a Zod default does not
|
|
170
|
+
* run on the addon cap path).
|
|
171
|
+
*/
|
|
172
|
+
export declare const DeliveryParamSchema: z.ZodObject<{
|
|
173
|
+
key: z.ZodString;
|
|
174
|
+
label: z.ZodString;
|
|
175
|
+
labelKey: z.ZodOptional<z.ZodString>;
|
|
176
|
+
type: z.ZodEnum<{
|
|
177
|
+
boolean: "boolean";
|
|
178
|
+
enum: "enum";
|
|
179
|
+
number: "number";
|
|
180
|
+
string: "string";
|
|
181
|
+
}>;
|
|
182
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
|
+
value: z.ZodString;
|
|
184
|
+
label: z.ZodString;
|
|
185
|
+
}, z.core.$strip>>>;
|
|
186
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
export type DeliveryParam = z.infer<typeof DeliveryParamSchema>;
|
|
160
191
|
/**
|
|
161
192
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
162
193
|
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
@@ -225,6 +256,7 @@ export declare const NotificationSchema: z.ZodObject<{
|
|
|
225
256
|
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
226
257
|
eventId: z.ZodOptional<z.ZodString>;
|
|
227
258
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
259
|
+
delivery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
228
260
|
}, z.core.$strip>;
|
|
229
261
|
/** One declared native severity/priority level for a kind. */
|
|
230
262
|
export declare const TargetKindLevelSchema: z.ZodObject<{
|
|
@@ -310,6 +342,24 @@ export declare const TargetKindSchema: z.ZodObject<{
|
|
|
310
342
|
configSchema: z.ZodUnknown;
|
|
311
343
|
destinationKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
312
344
|
supportsDiscovery: z.ZodBoolean;
|
|
345
|
+
deliveryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
346
|
+
key: z.ZodString;
|
|
347
|
+
label: z.ZodString;
|
|
348
|
+
labelKey: z.ZodOptional<z.ZodString>;
|
|
349
|
+
type: z.ZodEnum<{
|
|
350
|
+
boolean: "boolean";
|
|
351
|
+
enum: "enum";
|
|
352
|
+
number: "number";
|
|
353
|
+
string: "string";
|
|
354
|
+
}>;
|
|
355
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
356
|
+
value: z.ZodString;
|
|
357
|
+
label: z.ZodString;
|
|
358
|
+
}, z.core.$strip>>>;
|
|
359
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
360
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
361
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
362
|
+
}, z.core.$strip>>>;
|
|
313
363
|
caps: z.ZodObject<{
|
|
314
364
|
attachments: z.ZodObject<{
|
|
315
365
|
mediaTypes: z.ZodArray<z.ZodEnum<{
|
|
@@ -453,6 +503,24 @@ export declare const notificationOutputCapability: {
|
|
|
453
503
|
configSchema: z.ZodUnknown;
|
|
454
504
|
destinationKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
455
505
|
supportsDiscovery: z.ZodBoolean;
|
|
506
|
+
deliveryParams: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
507
|
+
key: z.ZodString;
|
|
508
|
+
label: z.ZodString;
|
|
509
|
+
labelKey: z.ZodOptional<z.ZodString>;
|
|
510
|
+
type: z.ZodEnum<{
|
|
511
|
+
boolean: "boolean";
|
|
512
|
+
enum: "enum";
|
|
513
|
+
number: "number";
|
|
514
|
+
string: "string";
|
|
515
|
+
}>;
|
|
516
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
517
|
+
value: z.ZodString;
|
|
518
|
+
label: z.ZodString;
|
|
519
|
+
}, z.core.$strip>>>;
|
|
520
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
521
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
522
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
523
|
+
}, z.core.$strip>>>;
|
|
456
524
|
caps: z.ZodObject<{
|
|
457
525
|
attachments: z.ZodObject<{
|
|
458
526
|
mediaTypes: z.ZodArray<z.ZodEnum<{
|
|
@@ -601,6 +669,7 @@ export declare const notificationOutputCapability: {
|
|
|
601
669
|
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
602
670
|
eventId: z.ZodOptional<z.ZodString>;
|
|
603
671
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
672
|
+
delivery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
604
673
|
}, z.core.$strip>;
|
|
605
674
|
}, z.core.$strip>, z.ZodObject<{
|
|
606
675
|
success: z.ZodBoolean;
|
|
@@ -680,6 +749,7 @@ export declare const notificationOutputCapability: {
|
|
|
680
749
|
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
681
750
|
eventId: z.ZodOptional<z.ZodString>;
|
|
682
751
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
752
|
+
delivery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
683
753
|
}, z.core.$strip>>;
|
|
684
754
|
}, z.core.$strip>, z.ZodObject<{
|
|
685
755
|
success: z.ZodBoolean;
|
|
@@ -17,11 +17,11 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
17
17
|
* in real-world devices.
|
|
18
18
|
*/
|
|
19
19
|
export declare const PowerMeterStatusSchema: z.ZodObject<{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
power: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
energy: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
voltage: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
current: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
apparentPower: z.ZodOptional<z.ZodNumber>;
|
|
25
25
|
powerFactor: z.ZodOptional<z.ZodNumber>;
|
|
26
26
|
lastFetchedAt: z.ZodNumber;
|
|
27
27
|
}, z.core.$strip>;
|
|
@@ -35,62 +35,62 @@ export declare const powerMeterCapability: {
|
|
|
35
35
|
readonly methods: {};
|
|
36
36
|
readonly status: {
|
|
37
37
|
readonly schema: z.ZodObject<{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
power: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
energy: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
voltage: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
current: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
apparentPower: z.ZodOptional<z.ZodNumber>;
|
|
43
43
|
powerFactor: z.ZodOptional<z.ZodNumber>;
|
|
44
44
|
lastFetchedAt: z.ZodNumber;
|
|
45
45
|
}, z.core.$strip>;
|
|
46
46
|
readonly kind: 'push';
|
|
47
47
|
};
|
|
48
48
|
readonly runtimeState: z.ZodObject<{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
power: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
energy: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
voltage: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
current: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
apparentPower: z.ZodOptional<z.ZodNumber>;
|
|
54
54
|
powerFactor: z.ZodOptional<z.ZodNumber>;
|
|
55
55
|
lastFetchedAt: z.ZodNumber;
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
/**
|
|
58
|
-
* Runtime-state durability: **restored** — as `numeric-sensor`; `
|
|
58
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; `energy` is an accumulator whose restored value is the baseline.
|
|
59
59
|
*
|
|
60
60
|
* See `RuntimeStateDurability`. Enforced by
|
|
61
61
|
* `scripts/check-runtime-state-durability.ts`.
|
|
62
62
|
*/
|
|
63
63
|
readonly durability: 'restored';
|
|
64
64
|
/**
|
|
65
|
-
* History (D850): recorded series. Gauges are floored at 30 s; `
|
|
65
|
+
* History (D850): recorded series. Gauges are floored at 30 s; `energy` is the one monotonic meter (counter).
|
|
66
66
|
*/
|
|
67
67
|
readonly history: {
|
|
68
68
|
readonly fields: {
|
|
69
|
-
readonly
|
|
69
|
+
readonly power: {
|
|
70
70
|
readonly kind: 'gauge';
|
|
71
71
|
readonly unit: 'W';
|
|
72
72
|
readonly deadband: 1;
|
|
73
73
|
readonly minIntervalMs: 30000;
|
|
74
74
|
};
|
|
75
|
-
readonly
|
|
75
|
+
readonly energy: {
|
|
76
76
|
readonly kind: 'counter';
|
|
77
77
|
readonly unit: 'kWh';
|
|
78
78
|
readonly deadband: 0.01;
|
|
79
79
|
readonly minIntervalMs: 60000;
|
|
80
80
|
};
|
|
81
|
-
readonly
|
|
81
|
+
readonly voltage: {
|
|
82
82
|
readonly kind: 'gauge';
|
|
83
83
|
readonly unit: 'V';
|
|
84
84
|
readonly deadband: 1;
|
|
85
85
|
readonly minIntervalMs: 30000;
|
|
86
86
|
};
|
|
87
|
-
readonly
|
|
87
|
+
readonly current: {
|
|
88
88
|
readonly kind: 'gauge';
|
|
89
89
|
readonly unit: 'A';
|
|
90
90
|
readonly deadband: 0.05;
|
|
91
91
|
readonly minIntervalMs: 30000;
|
|
92
92
|
};
|
|
93
|
-
readonly
|
|
93
|
+
readonly apparentPower: {
|
|
94
94
|
readonly kind: 'gauge';
|
|
95
95
|
readonly unit: 'VA';
|
|
96
96
|
readonly deadband: 1;
|
|
@@ -31,7 +31,6 @@ export declare const PresenceStatusSchema: z.ZodObject<{
|
|
|
31
31
|
longitude: z.ZodNumber;
|
|
32
32
|
accuracyMeters: z.ZodNumber;
|
|
33
33
|
}, z.core.$strip>>;
|
|
34
|
-
batteryPercent: z.ZodNullable<z.ZodNumber>;
|
|
35
34
|
lastChangedAt: z.ZodNumber;
|
|
36
35
|
}, z.core.$strip>;
|
|
37
36
|
export type PresenceStatus = z.infer<typeof PresenceStatusSchema>;
|
|
@@ -51,7 +50,6 @@ export declare const presenceCapability: {
|
|
|
51
50
|
longitude: z.ZodNumber;
|
|
52
51
|
accuracyMeters: z.ZodNumber;
|
|
53
52
|
}, z.core.$strip>>;
|
|
54
|
-
batteryPercent: z.ZodNullable<z.ZodNumber>;
|
|
55
53
|
lastChangedAt: z.ZodNumber;
|
|
56
54
|
}, z.core.$strip>;
|
|
57
55
|
readonly kind: 'push';
|
|
@@ -70,7 +68,6 @@ export declare const presenceCapability: {
|
|
|
70
68
|
longitude: z.ZodNumber;
|
|
71
69
|
accuracyMeters: z.ZodNumber;
|
|
72
70
|
}, z.core.$strip>>;
|
|
73
|
-
batteryPercent: z.ZodNullable<z.ZodNumber>;
|
|
74
71
|
lastChangedAt: z.ZodNumber;
|
|
75
72
|
}, z.core.$strip>;
|
|
76
73
|
/**
|
|
@@ -80,18 +77,7 @@ export declare const presenceCapability: {
|
|
|
80
77
|
* `scripts/check-runtime-state-durability.ts`.
|
|
81
78
|
*/
|
|
82
79
|
readonly durability: 'restored';
|
|
83
|
-
|
|
84
|
-
* History (D850): recorded series.
|
|
85
|
-
*/
|
|
86
|
-
readonly history: {
|
|
87
|
-
readonly fields: {
|
|
88
|
-
readonly batteryPercent: {
|
|
89
|
-
readonly kind: 'gauge';
|
|
90
|
-
readonly unit: '%';
|
|
91
|
-
readonly deadband: 1;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
};
|
|
80
|
+
readonly history: 'none';
|
|
95
81
|
/** Clock fields: written, but excluded from the compare that decides
|
|
96
82
|
* whether persisting is worth a SQLite commit. */
|
|
97
83
|
readonly volatileStateFields: readonly ["lastChangedAt"];
|
|
@@ -10,7 +10,7 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
10
10
|
* `sourceInfo`.
|
|
11
11
|
*/
|
|
12
12
|
export declare const PressureSensorStatusSchema: z.ZodObject<{
|
|
13
|
-
|
|
13
|
+
pressure: z.ZodNullable<z.ZodNumber>;
|
|
14
14
|
lastFetchedAt: z.ZodNumber;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
export type PressureSensorStatus = z.infer<typeof PressureSensorStatusSchema>;
|
|
@@ -23,13 +23,13 @@ export declare const pressureSensorCapability: {
|
|
|
23
23
|
readonly methods: {};
|
|
24
24
|
readonly status: {
|
|
25
25
|
readonly schema: z.ZodObject<{
|
|
26
|
-
|
|
26
|
+
pressure: z.ZodNullable<z.ZodNumber>;
|
|
27
27
|
lastFetchedAt: z.ZodNumber;
|
|
28
28
|
}, z.core.$strip>;
|
|
29
29
|
readonly kind: 'push';
|
|
30
30
|
};
|
|
31
31
|
readonly runtimeState: z.ZodObject<{
|
|
32
|
-
|
|
32
|
+
pressure: z.ZodNullable<z.ZodNumber>;
|
|
33
33
|
lastFetchedAt: z.ZodNumber;
|
|
34
34
|
}, z.core.$strip>;
|
|
35
35
|
/**
|
|
@@ -44,7 +44,7 @@ export declare const pressureSensorCapability: {
|
|
|
44
44
|
*/
|
|
45
45
|
readonly history: {
|
|
46
46
|
readonly fields: {
|
|
47
|
-
readonly
|
|
47
|
+
readonly pressure: {
|
|
48
48
|
readonly kind: 'gauge';
|
|
49
49
|
readonly unit: 'hPa';
|
|
50
50
|
readonly deadband: 0.1;
|
|
@@ -14,7 +14,7 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
14
14
|
* changed" steady state.
|
|
15
15
|
*/
|
|
16
16
|
export declare const TemperatureSensorStatusSchema: z.ZodObject<{
|
|
17
|
-
|
|
17
|
+
temperature: z.ZodNullable<z.ZodNumber>;
|
|
18
18
|
lastFetchedAt: z.ZodNumber;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
export type TemperatureSensorStatus = z.infer<typeof TemperatureSensorStatusSchema>;
|
|
@@ -27,13 +27,13 @@ export declare const temperatureSensorCapability: {
|
|
|
27
27
|
readonly methods: {};
|
|
28
28
|
readonly status: {
|
|
29
29
|
readonly schema: z.ZodObject<{
|
|
30
|
-
|
|
30
|
+
temperature: z.ZodNullable<z.ZodNumber>;
|
|
31
31
|
lastFetchedAt: z.ZodNumber;
|
|
32
32
|
}, z.core.$strip>;
|
|
33
33
|
readonly kind: 'push';
|
|
34
34
|
};
|
|
35
35
|
readonly runtimeState: z.ZodObject<{
|
|
36
|
-
|
|
36
|
+
temperature: z.ZodNullable<z.ZodNumber>;
|
|
37
37
|
lastFetchedAt: z.ZodNumber;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
/**
|
|
@@ -48,7 +48,7 @@ export declare const temperatureSensorCapability: {
|
|
|
48
48
|
*/
|
|
49
49
|
readonly history: {
|
|
50
50
|
readonly fields: {
|
|
51
|
-
readonly
|
|
51
|
+
readonly temperature: {
|
|
52
52
|
readonly kind: 'gauge';
|
|
53
53
|
readonly unit: '°C';
|
|
54
54
|
readonly deadband: 0.1;
|
|
@@ -44,7 +44,7 @@ export declare const VacuumControlStatusSchema: z.ZodObject<{
|
|
|
44
44
|
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
45
45
|
fanSpeed: z.ZodNullable<z.ZodString>;
|
|
46
46
|
availableFanSpeeds: z.ZodArray<z.ZodString>;
|
|
47
|
-
|
|
47
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
48
48
|
errorCode: z.ZodNullable<z.ZodNumber>;
|
|
49
49
|
errorLabel: z.ZodNullable<z.ZodString>;
|
|
50
50
|
lastChangedAt: z.ZodNumber;
|
|
@@ -91,7 +91,7 @@ export declare const vacuumControlCapability: {
|
|
|
91
91
|
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
92
92
|
fanSpeed: z.ZodNullable<z.ZodString>;
|
|
93
93
|
availableFanSpeeds: z.ZodArray<z.ZodString>;
|
|
94
|
-
|
|
94
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
95
95
|
errorCode: z.ZodNullable<z.ZodNumber>;
|
|
96
96
|
errorLabel: z.ZodNullable<z.ZodString>;
|
|
97
97
|
lastChangedAt: z.ZodNumber;
|
|
@@ -115,7 +115,7 @@ export declare const vacuumControlCapability: {
|
|
|
115
115
|
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
116
116
|
fanSpeed: z.ZodNullable<z.ZodString>;
|
|
117
117
|
availableFanSpeeds: z.ZodArray<z.ZodString>;
|
|
118
|
-
|
|
118
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
119
119
|
errorCode: z.ZodNullable<z.ZodNumber>;
|
|
120
120
|
errorLabel: z.ZodNullable<z.ZodString>;
|
|
121
121
|
lastChangedAt: z.ZodNumber;
|
package/dist/client.js
CHANGED
|
@@ -21321,6 +21321,43 @@ var NotificationActionSchema = zod.z.object({
|
|
|
21321
21321
|
*/
|
|
21322
21322
|
mode: zod.z.enum(["navigate", "background"]).optional()
|
|
21323
21323
|
});
|
|
21324
|
+
/** A delivery parameter value: what a notifier declared it takes. */
|
|
21325
|
+
var DeliveryParamValueSchema = zod.z.union([
|
|
21326
|
+
zod.z.string(),
|
|
21327
|
+
zod.z.number(),
|
|
21328
|
+
zod.z.boolean()
|
|
21329
|
+
]);
|
|
21330
|
+
/**
|
|
21331
|
+
* One extra delivery parameter a notifier KIND declares (D938). A rule that
|
|
21332
|
+
* addresses a target of that kind may set it; a kind that declares nothing is
|
|
21333
|
+
* never handed one. The admin UI derives its control from this descriptor —
|
|
21334
|
+
* no editor knows a service by name.
|
|
21335
|
+
*
|
|
21336
|
+
* Optional fields are `.optional()`, never `.default()` (a Zod default does not
|
|
21337
|
+
* run on the addon cap path).
|
|
21338
|
+
*/
|
|
21339
|
+
var DeliveryParamSchema = zod.z.object({
|
|
21340
|
+
key: zod.z.string().min(1),
|
|
21341
|
+
label: zod.z.string(),
|
|
21342
|
+
/** i18n key of the label, resolved by the declaring addon's namespace. */
|
|
21343
|
+
labelKey: zod.z.string().optional(),
|
|
21344
|
+
type: zod.z.enum([
|
|
21345
|
+
"enum",
|
|
21346
|
+
"number",
|
|
21347
|
+
"boolean",
|
|
21348
|
+
"string"
|
|
21349
|
+
]),
|
|
21350
|
+
/** `enum` only: the closed set of accepted values. */
|
|
21351
|
+
options: zod.z.array(zod.z.object({
|
|
21352
|
+
value: zod.z.string(),
|
|
21353
|
+
label: zod.z.string()
|
|
21354
|
+
})).optional(),
|
|
21355
|
+
/** `number` only. */
|
|
21356
|
+
min: zod.z.number().optional(),
|
|
21357
|
+
max: zod.z.number().optional(),
|
|
21358
|
+
/** What the notifier does when the rule sets nothing; shown as the placeholder. */
|
|
21359
|
+
default: DeliveryParamValueSchema.optional()
|
|
21360
|
+
});
|
|
21324
21361
|
/**
|
|
21325
21362
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
21326
21363
|
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
@@ -21343,7 +21380,13 @@ var NotificationSchema = zod.z.object({
|
|
|
21343
21380
|
tag: zod.z.string().optional(),
|
|
21344
21381
|
deviceId: zod.z.number().optional(),
|
|
21345
21382
|
eventId: zod.z.string().optional(),
|
|
21346
|
-
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
21383
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
21384
|
+
/**
|
|
21385
|
+
* Values for the parameters the target's kind DECLARES in
|
|
21386
|
+
* {@link TargetKindSchema} `deliveryParams`. Already validated against the
|
|
21387
|
+
* declaration by the sender; a notifier reads only the keys it declared.
|
|
21388
|
+
*/
|
|
21389
|
+
delivery: zod.z.record(zod.z.string(), DeliveryParamValueSchema).optional()
|
|
21347
21390
|
});
|
|
21348
21391
|
/** One declared native severity/priority level for a kind. */
|
|
21349
21392
|
var TargetKindLevelSchema = zod.z.object({
|
|
@@ -21451,6 +21494,11 @@ var TargetKindSchema = zod.z.object({
|
|
|
21451
21494
|
*/
|
|
21452
21495
|
destinationKeys: zod.z.array(zod.z.string()).optional(),
|
|
21453
21496
|
supportsDiscovery: zod.z.boolean(),
|
|
21497
|
+
/**
|
|
21498
|
+
* Extra delivery parameters a rule may set for a target of this kind (D938).
|
|
21499
|
+
* Absent = none; the rule editor then offers nothing.
|
|
21500
|
+
*/
|
|
21501
|
+
deliveryParams: zod.z.array(DeliveryParamSchema).optional(),
|
|
21454
21502
|
caps: TargetKindCapsSchema
|
|
21455
21503
|
});
|
|
21456
21504
|
/**
|
|
@@ -26538,7 +26586,7 @@ function createMirrorSource(mirror, listeners, api) {
|
|
|
26538
26586
|
*
|
|
26539
26587
|
* const dev = createDeviceProxy(api, binding)
|
|
26540
26588
|
* dev.state.battery.value // BatteryStatus | undefined
|
|
26541
|
-
* dev.state.battery.value?.
|
|
26589
|
+
* dev.state.battery.value?.level
|
|
26542
26590
|
*
|
|
26543
26591
|
* Two-arg form (deprecated path, kept for spec compatibility):
|
|
26544
26592
|
* passes the api directly, builds a per-handle lazy source. New
|
package/dist/client.mjs
CHANGED
|
@@ -21320,6 +21320,43 @@ var NotificationActionSchema = z.object({
|
|
|
21320
21320
|
*/
|
|
21321
21321
|
mode: z.enum(["navigate", "background"]).optional()
|
|
21322
21322
|
});
|
|
21323
|
+
/** A delivery parameter value: what a notifier declared it takes. */
|
|
21324
|
+
var DeliveryParamValueSchema = z.union([
|
|
21325
|
+
z.string(),
|
|
21326
|
+
z.number(),
|
|
21327
|
+
z.boolean()
|
|
21328
|
+
]);
|
|
21329
|
+
/**
|
|
21330
|
+
* One extra delivery parameter a notifier KIND declares (D938). A rule that
|
|
21331
|
+
* addresses a target of that kind may set it; a kind that declares nothing is
|
|
21332
|
+
* never handed one. The admin UI derives its control from this descriptor —
|
|
21333
|
+
* no editor knows a service by name.
|
|
21334
|
+
*
|
|
21335
|
+
* Optional fields are `.optional()`, never `.default()` (a Zod default does not
|
|
21336
|
+
* run on the addon cap path).
|
|
21337
|
+
*/
|
|
21338
|
+
var DeliveryParamSchema = z.object({
|
|
21339
|
+
key: z.string().min(1),
|
|
21340
|
+
label: z.string(),
|
|
21341
|
+
/** i18n key of the label, resolved by the declaring addon's namespace. */
|
|
21342
|
+
labelKey: z.string().optional(),
|
|
21343
|
+
type: z.enum([
|
|
21344
|
+
"enum",
|
|
21345
|
+
"number",
|
|
21346
|
+
"boolean",
|
|
21347
|
+
"string"
|
|
21348
|
+
]),
|
|
21349
|
+
/** `enum` only: the closed set of accepted values. */
|
|
21350
|
+
options: z.array(z.object({
|
|
21351
|
+
value: z.string(),
|
|
21352
|
+
label: z.string()
|
|
21353
|
+
})).optional(),
|
|
21354
|
+
/** `number` only. */
|
|
21355
|
+
min: z.number().optional(),
|
|
21356
|
+
max: z.number().optional(),
|
|
21357
|
+
/** What the notifier does when the rule sets nothing; shown as the placeholder. */
|
|
21358
|
+
default: DeliveryParamValueSchema.optional()
|
|
21359
|
+
});
|
|
21323
21360
|
/**
|
|
21324
21361
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
21325
21362
|
* `priority` is a 5-level ORDINAL (1=lowest … 3=normal(default) … 5=urgent),
|
|
@@ -21342,7 +21379,13 @@ var NotificationSchema = z.object({
|
|
|
21342
21379
|
tag: z.string().optional(),
|
|
21343
21380
|
deviceId: z.number().optional(),
|
|
21344
21381
|
eventId: z.string().optional(),
|
|
21345
|
-
metadata: z.record(z.string(), z.unknown()).optional()
|
|
21382
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
21383
|
+
/**
|
|
21384
|
+
* Values for the parameters the target's kind DECLARES in
|
|
21385
|
+
* {@link TargetKindSchema} `deliveryParams`. Already validated against the
|
|
21386
|
+
* declaration by the sender; a notifier reads only the keys it declared.
|
|
21387
|
+
*/
|
|
21388
|
+
delivery: z.record(z.string(), DeliveryParamValueSchema).optional()
|
|
21346
21389
|
});
|
|
21347
21390
|
/** One declared native severity/priority level for a kind. */
|
|
21348
21391
|
var TargetKindLevelSchema = z.object({
|
|
@@ -21450,6 +21493,11 @@ var TargetKindSchema = z.object({
|
|
|
21450
21493
|
*/
|
|
21451
21494
|
destinationKeys: z.array(z.string()).optional(),
|
|
21452
21495
|
supportsDiscovery: z.boolean(),
|
|
21496
|
+
/**
|
|
21497
|
+
* Extra delivery parameters a rule may set for a target of this kind (D938).
|
|
21498
|
+
* Absent = none; the rule editor then offers nothing.
|
|
21499
|
+
*/
|
|
21500
|
+
deliveryParams: z.array(DeliveryParamSchema).optional(),
|
|
21453
21501
|
caps: TargetKindCapsSchema
|
|
21454
21502
|
});
|
|
21455
21503
|
/**
|
|
@@ -26537,7 +26585,7 @@ function createMirrorSource(mirror, listeners, api) {
|
|
|
26537
26585
|
*
|
|
26538
26586
|
* const dev = createDeviceProxy(api, binding)
|
|
26539
26587
|
* dev.state.battery.value // BatteryStatus | undefined
|
|
26540
|
-
* dev.state.battery.value?.
|
|
26588
|
+
* dev.state.battery.value?.level
|
|
26541
26589
|
*
|
|
26542
26590
|
* Two-arg form (deprecated path, kept for spec compatibility):
|
|
26543
26591
|
* passes the api directly, builds a per-handle lazy source. New
|
|
@@ -33,7 +33,7 @@ export declare const CompositionProblemCodeSchema: z.ZodEnum<{
|
|
|
33
33
|
"wrong-device-type": "wrong-device-type";
|
|
34
34
|
}>;
|
|
35
35
|
export type CompositionProblemCode = z.infer<typeof CompositionProblemCodeSchema>;
|
|
36
|
-
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.
|
|
36
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
37
37
|
export declare const CompositionProblemSchema: z.ZodObject<{
|
|
38
38
|
code: z.ZodEnum<{
|
|
39
39
|
cycle: "cycle";
|
|
@@ -22,7 +22,7 @@ export declare function roomCompositionExample(input: RoomExampleInput): Composi
|
|
|
22
22
|
* an `enum-sensor` whose `value` is the raw STRING state — `number(d)` reads it,
|
|
23
23
|
* and anything that is not a number is `null`, never 0 (D393). The battery
|
|
24
24
|
* status sensor is an `enum-sensor` too (`unavailable` keeps its cold `''`, so
|
|
25
|
-
* `
|
|
25
|
+
* `level` is `null`). `charging` maps `battery_charging` off to
|
|
26
26
|
* `'unknown'`, never `'none'`: off does not prove "on battery alone" (the
|
|
27
27
|
* operator confirms the real semantics live).
|
|
28
28
|
*/
|