@camstack/types 1.2.540 → 1.2.542
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 +18 -4
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/cluster-update.cap.d.ts +376 -0
- package/dist/capabilities/device-manager.cap.d.ts +103 -0
- package/dist/capabilities/device-search.d.ts +168 -0
- package/dist/capabilities/hero-layout.cap.d.ts +69 -299
- package/dist/capabilities/hub-address.d.ts +10 -0
- package/dist/capabilities/index.d.ts +6 -3
- package/dist/capabilities/notification-rules.cap.d.ts +115 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.js +54 -8
- package/dist/client.mjs +54 -9
- package/dist/device/container-primary-child.d.ts +39 -4
- package/dist/device/device-management.d.ts +9 -0
- package/dist/device/hero/hero-model.d.ts +57 -553
- package/dist/device/hero/hero-row.d.ts +76 -69
- package/dist/device/hero/index.d.ts +1 -1
- package/dist/device/linked-device-resolve.d.ts +2 -0
- package/dist/generated/addon-api.d.ts +43 -0
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/device-proxy.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 +3 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +592 -29
- package/dist/index.mjs +562 -30
- package/dist/notification/degrade-engine.d.ts +7 -1
- package/dist/notification/notification-fields.d.ts +20 -2
- package/dist/notification/timelapse-rule.d.ts +69 -0
- package/dist/{sleep-Dz1P6--1.mjs → sleep-Cw1uUXvl.mjs} +3 -0
- package/dist/{sleep-DPMn-Sik.js → sleep-PfAAmxV-.js} +3 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* HA addon need it and addons may not cross-import.
|
|
13
13
|
*/
|
|
14
14
|
import type { z } from 'zod';
|
|
15
|
-
import type { AttachmentMediaType, NotificationAction, NotificationFormat, NotificationSchema, RenderedAs, TargetKindCaps } from '../capabilities/notification-output.cap.js';
|
|
15
|
+
import type { AttachmentMediaType, DeliveryParamValue, NotificationAction, NotificationFormat, NotificationSchema, RenderedAs, TargetKindCaps } from '../capabilities/notification-output.cap.js';
|
|
16
16
|
type Notification = z.infer<typeof NotificationSchema>;
|
|
17
17
|
/** The resolved native level the adapter maps onto its wire payload. */
|
|
18
18
|
export interface ResolvedLevel {
|
|
@@ -48,6 +48,12 @@ export interface PreparedNotification {
|
|
|
48
48
|
readonly sound: string | null;
|
|
49
49
|
readonly ttl: number | null;
|
|
50
50
|
readonly tag: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The notifier-declared delivery parameters the rule set for this target
|
|
53
|
+
* (D938), already validated by the dispatcher. An adapter reads the keys it
|
|
54
|
+
* declared; absent when none were set.
|
|
55
|
+
*/
|
|
56
|
+
readonly delivery?: Readonly<Record<string, DeliveryParamValue>>;
|
|
51
57
|
/** Overflow: `bodyParts[0]` is the truncate view; the full array is the split. */
|
|
52
58
|
readonly bodyParts: readonly string[];
|
|
53
59
|
readonly renderedAs: RenderedAs;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* selected targets can deliver, and the viewer reads the same function — so
|
|
8
8
|
* the three cannot disagree about which fields exist for a target.
|
|
9
9
|
*/
|
|
10
|
-
import type { NotificationField, TargetKindCaps } from '../capabilities/notification-output.cap.js';
|
|
11
|
-
import type { NcTargetOverride } from '../capabilities/notification-rules.cap.js';
|
|
10
|
+
import type { AttachmentMediaType, NotificationField, TargetKindCaps, TargetKindLevel } from '../capabilities/notification-output.cap.js';
|
|
11
|
+
import type { NcTargetAttachment, NcTargetOverride } from '../capabilities/notification-rules.cap.js';
|
|
12
12
|
/** Every field, in the order an editor meets them. */
|
|
13
13
|
export declare const NOTIFICATION_FIELDS: readonly NotificationField[];
|
|
14
14
|
/**
|
|
@@ -21,6 +21,24 @@ export declare const NOTIFICATION_FIELDS: readonly NotificationField[];
|
|
|
21
21
|
* - `sound`, `clickUrl` — their flags.
|
|
22
22
|
*/
|
|
23
23
|
export declare function deliverableFields(caps: TargetKindCaps): readonly NotificationField[];
|
|
24
|
+
/**
|
|
25
|
+
* The picture kinds a target may be set to receive: `none` plus one per media
|
|
26
|
+
* type the notifier declares (`caps.attachments.mediaTypes`). Empty when the
|
|
27
|
+
* kind takes no attachment at all — there is nothing to choose.
|
|
28
|
+
*/
|
|
29
|
+
export declare function attachmentKindsOf(caps: TargetKindCaps): readonly NcTargetAttachment[];
|
|
30
|
+
/**
|
|
31
|
+
* Whether a target set to `kind` receives an attachment of `mediaType`.
|
|
32
|
+
* Absent = every kind the rule produced; an icon or audio part is never
|
|
33
|
+
* narrowed (it is not a picture of the event).
|
|
34
|
+
*/
|
|
35
|
+
export declare function targetAttachmentAllows(kind: NcTargetAttachment | undefined, mediaType: AttachmentMediaType): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The levels a notifier declares that a rule can pick between: the ones that
|
|
38
|
+
* map to a canonical ordinal, in ordinal order. The editor labels the choice
|
|
39
|
+
* with the level's own label (Alexa: normal / high) and stores its ordinal.
|
|
40
|
+
*/
|
|
41
|
+
export declare function priorityLevelsOf(caps: TargetKindCaps): readonly TargetKindLevel[];
|
|
24
42
|
/** One selected target as a field-support question sees it. */
|
|
25
43
|
export interface NotificationFieldTarget {
|
|
26
44
|
readonly name: string;
|
|
@@ -94,6 +94,29 @@ export declare const TimelapseRuleInputSchema: z.ZodObject<{
|
|
|
94
94
|
}>>;
|
|
95
95
|
reportClasses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
96
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
targetOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
98
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
99
|
+
title: z.ZodOptional<z.ZodString>;
|
|
100
|
+
body: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
104
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
105
|
+
startMinute: z.ZodNumber;
|
|
106
|
+
endMinute: z.ZodNumber;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
109
|
+
invert: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
attachment: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
clip: "clip";
|
|
114
|
+
gif: "gif";
|
|
115
|
+
image: "image";
|
|
116
|
+
none: "none";
|
|
117
|
+
}>>;
|
|
118
|
+
actions: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
}, z.core.$strip>>>;
|
|
97
120
|
}, z.core.$strip>;
|
|
98
121
|
export type TimelapseRuleInput = z.infer<typeof TimelapseRuleInputSchema>;
|
|
99
122
|
/**
|
|
@@ -152,6 +175,29 @@ export declare const TimelapseRulePatchSchema: z.ZodObject<{
|
|
|
152
175
|
}>>;
|
|
153
176
|
reportClasses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
154
177
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
targetOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
179
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
title: z.ZodOptional<z.ZodString>;
|
|
181
|
+
body: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
185
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
186
|
+
startMinute: z.ZodNumber;
|
|
187
|
+
endMinute: z.ZodNumber;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
190
|
+
invert: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
attachment: z.ZodOptional<z.ZodEnum<{
|
|
194
|
+
clip: "clip";
|
|
195
|
+
gif: "gif";
|
|
196
|
+
image: "image";
|
|
197
|
+
none: "none";
|
|
198
|
+
}>>;
|
|
199
|
+
actions: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
}, z.core.$strip>>>;
|
|
155
201
|
}, z.core.$strip>;
|
|
156
202
|
export type TimelapseRulePatch = z.infer<typeof TimelapseRulePatchSchema>;
|
|
157
203
|
/** A persisted timelapse rule. */
|
|
@@ -187,6 +233,29 @@ export declare const TimelapseRuleSchema: z.ZodObject<{
|
|
|
187
233
|
}>>;
|
|
188
234
|
reportClasses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
189
235
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
236
|
+
targetOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
237
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
title: z.ZodOptional<z.ZodString>;
|
|
239
|
+
body: z.ZodOptional<z.ZodString>;
|
|
240
|
+
}, z.core.$strip>>;
|
|
241
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
242
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
243
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
244
|
+
startMinute: z.ZodNumber;
|
|
245
|
+
endMinute: z.ZodNumber;
|
|
246
|
+
}, z.core.$strip>>;
|
|
247
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
248
|
+
invert: z.ZodOptional<z.ZodBoolean>;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
attachment: z.ZodOptional<z.ZodEnum<{
|
|
252
|
+
clip: "clip";
|
|
253
|
+
gif: "gif";
|
|
254
|
+
image: "image";
|
|
255
|
+
none: "none";
|
|
256
|
+
}>>;
|
|
257
|
+
actions: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
}, z.core.$strip>>>;
|
|
190
259
|
id: z.ZodString;
|
|
191
260
|
ownerUserId: z.ZodOptional<z.ZodString>;
|
|
192
261
|
lastGeneratedAt: z.ZodOptional<z.ZodNumber>;
|
|
@@ -12294,6 +12294,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
12294
12294
|
backup: system("system backups — run and restored from the Backups page"),
|
|
12295
12295
|
broker: system("message-broker connections — configured, not actuated"),
|
|
12296
12296
|
"calendar-source": system(INTERNAL),
|
|
12297
|
+
"cluster-update": system(CLUSTER),
|
|
12297
12298
|
calendars: system("calendars feed schedules and conditions, not device actions"),
|
|
12298
12299
|
composer: system("device composition — an authoring tool, not an action"),
|
|
12299
12300
|
"core-blocks": system(INTERNAL),
|
|
@@ -13004,6 +13005,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
13004
13005
|
"camera-streams",
|
|
13005
13006
|
"carbon-monoxide",
|
|
13006
13007
|
"climate-control",
|
|
13008
|
+
"cluster-update",
|
|
13007
13009
|
"color",
|
|
13008
13010
|
"composer",
|
|
13009
13011
|
"connectivity",
|
|
@@ -16183,6 +16185,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
16183
16185
|
setLinkDeviceId: (input) => dispatchSystem("deviceManager", "setLinkDeviceId", "mutation", input),
|
|
16184
16186
|
setPrimaryChildEntityId: (input) => dispatchSystem("deviceManager", "setPrimaryChildEntityId", "mutation", input),
|
|
16185
16187
|
setChildLayout: (input) => dispatchSystem("deviceManager", "setChildLayout", "mutation", input),
|
|
16188
|
+
setPrimaryChildPreference: (input) => dispatchSystem("deviceManager", "setPrimaryChildPreference", "mutation", input),
|
|
16186
16189
|
setDisplay: (input) => dispatchSystem("deviceManager", "setDisplay", "mutation", input),
|
|
16187
16190
|
getWireableFields: (input) => dispatchSystem("deviceManager", "getWireableFields", "query", input),
|
|
16188
16191
|
setRole: (input) => dispatchSystem("deviceManager", "setRole", "mutation", input),
|
|
@@ -12294,6 +12294,7 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
12294
12294
|
backup: system("system backups — run and restored from the Backups page"),
|
|
12295
12295
|
broker: system("message-broker connections — configured, not actuated"),
|
|
12296
12296
|
"calendar-source": system(INTERNAL),
|
|
12297
|
+
"cluster-update": system(CLUSTER),
|
|
12297
12298
|
calendars: system("calendars feed schedules and conditions, not device actions"),
|
|
12298
12299
|
composer: system("device composition — an authoring tool, not an action"),
|
|
12299
12300
|
"core-blocks": system(INTERNAL),
|
|
@@ -13004,6 +13005,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
13004
13005
|
"camera-streams",
|
|
13005
13006
|
"carbon-monoxide",
|
|
13006
13007
|
"climate-control",
|
|
13008
|
+
"cluster-update",
|
|
13007
13009
|
"color",
|
|
13008
13010
|
"composer",
|
|
13009
13011
|
"connectivity",
|
|
@@ -16183,6 +16185,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
16183
16185
|
setLinkDeviceId: (input) => dispatchSystem("deviceManager", "setLinkDeviceId", "mutation", input),
|
|
16184
16186
|
setPrimaryChildEntityId: (input) => dispatchSystem("deviceManager", "setPrimaryChildEntityId", "mutation", input),
|
|
16185
16187
|
setChildLayout: (input) => dispatchSystem("deviceManager", "setChildLayout", "mutation", input),
|
|
16188
|
+
setPrimaryChildPreference: (input) => dispatchSystem("deviceManager", "setPrimaryChildPreference", "mutation", input),
|
|
16186
16189
|
setDisplay: (input) => dispatchSystem("deviceManager", "setDisplay", "mutation", input),
|
|
16187
16190
|
getWireableFields: (input) => dispatchSystem("deviceManager", "getWireableFields", "query", input),
|
|
16188
16191
|
setRole: (input) => dispatchSystem("deviceManager", "setRole", "mutation", input),
|