@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.
Files changed (34) hide show
  1. package/CHANGELOG.md +18 -4
  2. package/dist/addon.js +1 -1
  3. package/dist/addon.mjs +1 -1
  4. package/dist/capabilities/cluster-update.cap.d.ts +376 -0
  5. package/dist/capabilities/device-manager.cap.d.ts +103 -0
  6. package/dist/capabilities/device-search.d.ts +168 -0
  7. package/dist/capabilities/hero-layout.cap.d.ts +69 -299
  8. package/dist/capabilities/hub-address.d.ts +10 -0
  9. package/dist/capabilities/index.d.ts +6 -3
  10. package/dist/capabilities/notification-rules.cap.d.ts +115 -1
  11. package/dist/client.d.ts +2 -1
  12. package/dist/client.js +54 -8
  13. package/dist/client.mjs +54 -9
  14. package/dist/device/container-primary-child.d.ts +39 -4
  15. package/dist/device/device-management.d.ts +9 -0
  16. package/dist/device/hero/hero-model.d.ts +57 -553
  17. package/dist/device/hero/hero-row.d.ts +76 -69
  18. package/dist/device/hero/index.d.ts +1 -1
  19. package/dist/device/linked-device-resolve.d.ts +2 -0
  20. package/dist/generated/addon-api.d.ts +43 -0
  21. package/dist/generated/capability-router-map.d.ts +5 -2
  22. package/dist/generated/device-proxy.d.ts +1 -1
  23. package/dist/generated/method-access-map.d.ts +1 -1
  24. package/dist/generated/method-device-selectors.d.ts +2 -2
  25. package/dist/generated/system-proxy.d.ts +3 -1
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.js +592 -29
  28. package/dist/index.mjs +562 -30
  29. package/dist/notification/degrade-engine.d.ts +7 -1
  30. package/dist/notification/notification-fields.d.ts +20 -2
  31. package/dist/notification/timelapse-rule.d.ts +69 -0
  32. package/dist/{sleep-Dz1P6--1.mjs → sleep-Cw1uUXvl.mjs} +3 -0
  33. package/dist/{sleep-DPMn-Sik.js → sleep-PfAAmxV-.js} +3 -0
  34. package/package.json +1 -1
@@ -0,0 +1,168 @@
1
+ /**
2
+ * `deviceManager.search` — the query behind the device → value picker.
3
+ *
4
+ * One server-side question answers everything a picker draws: which devices
5
+ * can supply a value of the required capability(ies), narrowed by text and by
6
+ * three generic facets, one cursor page at a time, with the facet counts and
7
+ * the live reading of each matching value. The schemas live here (not in the
8
+ * cap file) so the UI model files and the provider import one source; types
9
+ * are `z.infer` of them.
10
+ */
11
+ import { z } from 'zod';
12
+ import { DeviceType } from '../device/device-type.js';
13
+ /** Page size when the caller names none, and the ceiling it may ask for. */
14
+ export declare const DEVICE_SEARCH_DEFAULT_LIMIT = 50;
15
+ export declare const DEVICE_SEARCH_MAX_LIMIT = 200;
16
+ export declare const DeviceSearchRequiresSchema: z.ZodObject<{
17
+ caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
18
+ mode: z.ZodOptional<z.ZodEnum<{
19
+ all: "all";
20
+ any: "any";
21
+ }>>;
22
+ }, z.core.$strip>;
23
+ export type DeviceSearchRequires = z.infer<typeof DeviceSearchRequiresSchema>;
24
+ export declare const DeviceSearchFiltersSchema: z.ZodObject<{
25
+ locations: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
26
+ integrationIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
27
+ types: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
28
+ }, z.core.$strip>;
29
+ export type DeviceSearchFilters = z.infer<typeof DeviceSearchFiltersSchema>;
30
+ export declare const DeviceSearchInputSchema: z.ZodObject<{
31
+ text: z.ZodOptional<z.ZodString>;
32
+ requires: z.ZodOptional<z.ZodObject<{
33
+ caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
34
+ mode: z.ZodOptional<z.ZodEnum<{
35
+ all: "all";
36
+ any: "any";
37
+ }>>;
38
+ }, z.core.$strip>>;
39
+ filters: z.ZodOptional<z.ZodObject<{
40
+ locations: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
41
+ integrationIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
42
+ types: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
43
+ }, z.core.$strip>>;
44
+ includeIncompatible: z.ZodOptional<z.ZodBoolean>;
45
+ contextDeviceId: z.ZodOptional<z.ZodNumber>;
46
+ ids: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>;
47
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ limit: z.ZodOptional<z.ZodNumber>;
49
+ }, z.core.$strip>;
50
+ export type DeviceSearchInput = z.infer<typeof DeviceSearchInputSchema>;
51
+ export declare const DeviceValueOptionSchema: z.ZodObject<{
52
+ cap: z.ZodString;
53
+ path: z.ZodString;
54
+ label: z.ZodString;
55
+ reading: z.ZodNullable<z.ZodString>;
56
+ unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
+ quantity: z.ZodOptional<z.ZodType<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown, z.core.$ZodTypeInternals<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown>>>;
58
+ }, z.core.$strip>;
59
+ export type DeviceValueOption = z.infer<typeof DeviceValueOptionSchema>;
60
+ export declare const DeviceSearchItemSchema: z.ZodObject<{
61
+ id: z.ZodNumber;
62
+ name: z.ZodString;
63
+ type: z.ZodEnum<typeof DeviceType>;
64
+ location: z.ZodNullable<z.ZodString>;
65
+ integrationId: z.ZodNullable<z.ZodString>;
66
+ integrationLabel: z.ZodNullable<z.ZodString>;
67
+ online: z.ZodNullable<z.ZodBoolean>;
68
+ disabled: z.ZodBoolean;
69
+ compatible: z.ZodBoolean;
70
+ values: z.ZodReadonly<z.ZodArray<z.ZodObject<{
71
+ cap: z.ZodString;
72
+ path: z.ZodString;
73
+ label: z.ZodString;
74
+ reading: z.ZodNullable<z.ZodString>;
75
+ unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ quantity: z.ZodOptional<z.ZodType<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown, z.core.$ZodTypeInternals<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown>>>;
77
+ }, z.core.$strip>>>;
78
+ }, z.core.$strip>;
79
+ export type DeviceSearchItem = z.infer<typeof DeviceSearchItemSchema>;
80
+ export declare const DeviceSearchFacetValueSchema: z.ZodObject<{
81
+ value: z.ZodString;
82
+ count: z.ZodNumber;
83
+ }, z.core.$strip>;
84
+ export type DeviceSearchFacetValue = z.infer<typeof DeviceSearchFacetValueSchema>;
85
+ export declare const DeviceSearchFacetIntegrationSchema: z.ZodObject<{
86
+ id: z.ZodString;
87
+ label: z.ZodString;
88
+ count: z.ZodNumber;
89
+ }, z.core.$strip>;
90
+ export type DeviceSearchFacetIntegration = z.infer<typeof DeviceSearchFacetIntegrationSchema>;
91
+ export declare const DeviceSearchFacetsSchema: z.ZodObject<{
92
+ locations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
93
+ value: z.ZodString;
94
+ count: z.ZodNumber;
95
+ }, z.core.$strip>>>;
96
+ integrations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
97
+ id: z.ZodString;
98
+ label: z.ZodString;
99
+ count: z.ZodNumber;
100
+ }, z.core.$strip>>>;
101
+ types: z.ZodReadonly<z.ZodArray<z.ZodObject<{
102
+ value: z.ZodString;
103
+ count: z.ZodNumber;
104
+ }, z.core.$strip>>>;
105
+ }, z.core.$strip>;
106
+ export type DeviceSearchFacets = z.infer<typeof DeviceSearchFacetsSchema>;
107
+ export declare const DeviceSearchResultSchema: z.ZodObject<{
108
+ items: z.ZodReadonly<z.ZodArray<z.ZodObject<{
109
+ id: z.ZodNumber;
110
+ name: z.ZodString;
111
+ type: z.ZodEnum<typeof DeviceType>;
112
+ location: z.ZodNullable<z.ZodString>;
113
+ integrationId: z.ZodNullable<z.ZodString>;
114
+ integrationLabel: z.ZodNullable<z.ZodString>;
115
+ online: z.ZodNullable<z.ZodBoolean>;
116
+ disabled: z.ZodBoolean;
117
+ compatible: z.ZodBoolean;
118
+ values: z.ZodReadonly<z.ZodArray<z.ZodObject<{
119
+ cap: z.ZodString;
120
+ path: z.ZodString;
121
+ label: z.ZodString;
122
+ reading: z.ZodNullable<z.ZodString>;
123
+ unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ quantity: z.ZodOptional<z.ZodType<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown, z.core.$ZodTypeInternals<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown>>>;
125
+ }, z.core.$strip>>>;
126
+ }, z.core.$strip>>>;
127
+ nextCursor: z.ZodNullable<z.ZodString>;
128
+ total: z.ZodNumber;
129
+ compatibleTotal: z.ZodNumber;
130
+ fleetTotal: z.ZodNumber;
131
+ hiddenIncompatible: z.ZodNumber;
132
+ facets: z.ZodObject<{
133
+ locations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
134
+ value: z.ZodString;
135
+ count: z.ZodNumber;
136
+ }, z.core.$strip>>>;
137
+ integrations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
138
+ id: z.ZodString;
139
+ label: z.ZodString;
140
+ count: z.ZodNumber;
141
+ }, z.core.$strip>>>;
142
+ types: z.ZodReadonly<z.ZodArray<z.ZodObject<{
143
+ value: z.ZodString;
144
+ count: z.ZodNumber;
145
+ }, z.core.$strip>>>;
146
+ }, z.core.$strip>;
147
+ suggested: z.ZodReadonly<z.ZodArray<z.ZodObject<{
148
+ id: z.ZodNumber;
149
+ name: z.ZodString;
150
+ type: z.ZodEnum<typeof DeviceType>;
151
+ location: z.ZodNullable<z.ZodString>;
152
+ integrationId: z.ZodNullable<z.ZodString>;
153
+ integrationLabel: z.ZodNullable<z.ZodString>;
154
+ online: z.ZodNullable<z.ZodBoolean>;
155
+ disabled: z.ZodBoolean;
156
+ compatible: z.ZodBoolean;
157
+ values: z.ZodReadonly<z.ZodArray<z.ZodObject<{
158
+ cap: z.ZodString;
159
+ path: z.ZodString;
160
+ label: z.ZodString;
161
+ reading: z.ZodNullable<z.ZodString>;
162
+ unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ quantity: z.ZodOptional<z.ZodType<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown, z.core.$ZodTypeInternals<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown>>>;
164
+ }, z.core.$strip>>>;
165
+ }, z.core.$strip>>>;
166
+ missingIds: z.ZodReadonly<z.ZodArray<z.ZodNumber>>;
167
+ }, z.core.$strip>;
168
+ export type DeviceSearchResult = z.infer<typeof DeviceSearchResultSchema>;