@camstack/types 1.2.580 → 1.2.582
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 +12 -0
- package/dist/addon.js +3 -2
- package/dist/addon.mjs +3 -2
- package/dist/capabilities/device-history.cap.d.ts +80 -0
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +111 -0
- package/dist/capabilities/webrtc-session.cap.d.ts +12 -0
- package/dist/client.js +3 -1
- package/dist/client.mjs +3 -1
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- 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 +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +186 -2
- package/dist/index.mjs +176 -3
- package/dist/pipeline/health-digest/schemas.d.ts +236 -0
- package/dist/{sleep-BURDyp_n.js → sleep-Coq9CYAH.js} +2 -1
- package/dist/{sleep-C9EWTQr9.mjs → sleep-DnhxKL99.mjs} +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Health digest (planning#572) — findings an operator can act on, built every
|
|
3
|
+
* few minutes from state the orchestrator already holds in memory. A finding is
|
|
4
|
+
* `{ severity, subject, what, evidence, action }`; a number that could not be
|
|
5
|
+
* read is `null`, never `0` (D393).
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export declare const HEALTH_FINDING_KINDS: readonly ['motion-without-detections', 'detections-under-floor', 'inference-too-slow', 'frames-shed', 'inference-device-unusable'];
|
|
9
|
+
export declare const HealthFindingKindSchema: z.ZodEnum<{
|
|
10
|
+
"detections-under-floor": "detections-under-floor";
|
|
11
|
+
"frames-shed": "frames-shed";
|
|
12
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
13
|
+
"inference-too-slow": "inference-too-slow";
|
|
14
|
+
"motion-without-detections": "motion-without-detections";
|
|
15
|
+
}>;
|
|
16
|
+
export type HealthFindingKind = z.infer<typeof HealthFindingKindSchema>;
|
|
17
|
+
export declare const HealthSeveritySchema: z.ZodEnum<{
|
|
18
|
+
critical: "critical";
|
|
19
|
+
info: "info";
|
|
20
|
+
warning: "warning";
|
|
21
|
+
}>;
|
|
22
|
+
export type HealthSeverity = z.infer<typeof HealthSeveritySchema>;
|
|
23
|
+
export declare const HealthSubjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"camera">;
|
|
25
|
+
deviceId: z.ZodNumber;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<"node">;
|
|
28
|
+
nodeId: z.ZodString;
|
|
29
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"inference-device">;
|
|
31
|
+
nodeId: z.ZodString;
|
|
32
|
+
deviceKey: z.ZodString;
|
|
33
|
+
}, z.core.$strip>], "type">;
|
|
34
|
+
export type HealthSubject = z.infer<typeof HealthSubjectSchema>;
|
|
35
|
+
export declare const HealthFindingSchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
kind: z.ZodEnum<{
|
|
38
|
+
"detections-under-floor": "detections-under-floor";
|
|
39
|
+
"frames-shed": "frames-shed";
|
|
40
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
41
|
+
"inference-too-slow": "inference-too-slow";
|
|
42
|
+
"motion-without-detections": "motion-without-detections";
|
|
43
|
+
}>;
|
|
44
|
+
severity: z.ZodEnum<{
|
|
45
|
+
critical: "critical";
|
|
46
|
+
info: "info";
|
|
47
|
+
warning: "warning";
|
|
48
|
+
}>;
|
|
49
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<"camera">;
|
|
51
|
+
deviceId: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"node">;
|
|
54
|
+
nodeId: z.ZodString;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"inference-device">;
|
|
57
|
+
nodeId: z.ZodString;
|
|
58
|
+
deviceKey: z.ZodString;
|
|
59
|
+
}, z.core.$strip>], "type">;
|
|
60
|
+
what: z.ZodString;
|
|
61
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
62
|
+
action: z.ZodString;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export type HealthFinding = z.infer<typeof HealthFindingSchema>;
|
|
65
|
+
/** One in-memory source the tick read, and whether it answered. */
|
|
66
|
+
export declare const HealthSourceStatusSchema: z.ZodObject<{
|
|
67
|
+
source: z.ZodString;
|
|
68
|
+
entries: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type HealthSourceStatus = z.infer<typeof HealthSourceStatusSchema>;
|
|
71
|
+
export declare const HealthNodeSummarySchema: z.ZodObject<{
|
|
72
|
+
nodeId: z.ZodString;
|
|
73
|
+
sessionsNow: z.ZodNumber;
|
|
74
|
+
unusableDevices: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
75
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
76
|
+
deviceKey: z.ZodString;
|
|
77
|
+
sessionsNow: z.ZodNumber;
|
|
78
|
+
usable: z.ZodBoolean;
|
|
79
|
+
}, z.core.$strip>>>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type HealthNodeSummary = z.infer<typeof HealthNodeSummarySchema>;
|
|
82
|
+
export declare const HealthDigestSchema: z.ZodObject<{
|
|
83
|
+
generatedAt: z.ZodNumber;
|
|
84
|
+
tickMs: z.ZodNumber;
|
|
85
|
+
camerasSeen: z.ZodNullable<z.ZodNumber>;
|
|
86
|
+
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
kind: z.ZodEnum<{
|
|
89
|
+
"detections-under-floor": "detections-under-floor";
|
|
90
|
+
"frames-shed": "frames-shed";
|
|
91
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
92
|
+
"inference-too-slow": "inference-too-slow";
|
|
93
|
+
"motion-without-detections": "motion-without-detections";
|
|
94
|
+
}>;
|
|
95
|
+
severity: z.ZodEnum<{
|
|
96
|
+
critical: "critical";
|
|
97
|
+
info: "info";
|
|
98
|
+
warning: "warning";
|
|
99
|
+
}>;
|
|
100
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
101
|
+
type: z.ZodLiteral<"camera">;
|
|
102
|
+
deviceId: z.ZodNumber;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
type: z.ZodLiteral<"node">;
|
|
105
|
+
nodeId: z.ZodString;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"inference-device">;
|
|
108
|
+
nodeId: z.ZodString;
|
|
109
|
+
deviceKey: z.ZodString;
|
|
110
|
+
}, z.core.$strip>], "type">;
|
|
111
|
+
what: z.ZodString;
|
|
112
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
113
|
+
action: z.ZodString;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
115
|
+
nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
116
|
+
nodeId: z.ZodString;
|
|
117
|
+
sessionsNow: z.ZodNumber;
|
|
118
|
+
unusableDevices: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
119
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
120
|
+
deviceKey: z.ZodString;
|
|
121
|
+
sessionsNow: z.ZodNumber;
|
|
122
|
+
usable: z.ZodBoolean;
|
|
123
|
+
}, z.core.$strip>>>;
|
|
124
|
+
}, z.core.$strip>>>;
|
|
125
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
126
|
+
source: z.ZodString;
|
|
127
|
+
entries: z.ZodNullable<z.ZodNumber>;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
129
|
+
notCovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
export type HealthDigest = z.infer<typeof HealthDigestSchema>;
|
|
132
|
+
export declare const HealthDigestInputSchema: z.ZodObject<{
|
|
133
|
+
history: z.ZodDefault<z.ZodNumber>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export type HealthDigestInput = z.infer<typeof HealthDigestInputSchema>;
|
|
136
|
+
export declare const HealthDigestAnswerSchema: z.ZodObject<{
|
|
137
|
+
latest: z.ZodNullable<z.ZodObject<{
|
|
138
|
+
generatedAt: z.ZodNumber;
|
|
139
|
+
tickMs: z.ZodNumber;
|
|
140
|
+
camerasSeen: z.ZodNullable<z.ZodNumber>;
|
|
141
|
+
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
kind: z.ZodEnum<{
|
|
144
|
+
"detections-under-floor": "detections-under-floor";
|
|
145
|
+
"frames-shed": "frames-shed";
|
|
146
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
147
|
+
"inference-too-slow": "inference-too-slow";
|
|
148
|
+
"motion-without-detections": "motion-without-detections";
|
|
149
|
+
}>;
|
|
150
|
+
severity: z.ZodEnum<{
|
|
151
|
+
critical: "critical";
|
|
152
|
+
info: "info";
|
|
153
|
+
warning: "warning";
|
|
154
|
+
}>;
|
|
155
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
156
|
+
type: z.ZodLiteral<"camera">;
|
|
157
|
+
deviceId: z.ZodNumber;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
type: z.ZodLiteral<"node">;
|
|
160
|
+
nodeId: z.ZodString;
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
type: z.ZodLiteral<"inference-device">;
|
|
163
|
+
nodeId: z.ZodString;
|
|
164
|
+
deviceKey: z.ZodString;
|
|
165
|
+
}, z.core.$strip>], "type">;
|
|
166
|
+
what: z.ZodString;
|
|
167
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
168
|
+
action: z.ZodString;
|
|
169
|
+
}, z.core.$strip>>>;
|
|
170
|
+
nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
171
|
+
nodeId: z.ZodString;
|
|
172
|
+
sessionsNow: z.ZodNumber;
|
|
173
|
+
unusableDevices: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
174
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
175
|
+
deviceKey: z.ZodString;
|
|
176
|
+
sessionsNow: z.ZodNumber;
|
|
177
|
+
usable: z.ZodBoolean;
|
|
178
|
+
}, z.core.$strip>>>;
|
|
179
|
+
}, z.core.$strip>>>;
|
|
180
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
181
|
+
source: z.ZodString;
|
|
182
|
+
entries: z.ZodNullable<z.ZodNumber>;
|
|
183
|
+
}, z.core.$strip>>>;
|
|
184
|
+
notCovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
previous: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
187
|
+
generatedAt: z.ZodNumber;
|
|
188
|
+
tickMs: z.ZodNumber;
|
|
189
|
+
camerasSeen: z.ZodNullable<z.ZodNumber>;
|
|
190
|
+
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
191
|
+
id: z.ZodString;
|
|
192
|
+
kind: z.ZodEnum<{
|
|
193
|
+
"detections-under-floor": "detections-under-floor";
|
|
194
|
+
"frames-shed": "frames-shed";
|
|
195
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
196
|
+
"inference-too-slow": "inference-too-slow";
|
|
197
|
+
"motion-without-detections": "motion-without-detections";
|
|
198
|
+
}>;
|
|
199
|
+
severity: z.ZodEnum<{
|
|
200
|
+
critical: "critical";
|
|
201
|
+
info: "info";
|
|
202
|
+
warning: "warning";
|
|
203
|
+
}>;
|
|
204
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
205
|
+
type: z.ZodLiteral<"camera">;
|
|
206
|
+
deviceId: z.ZodNumber;
|
|
207
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
208
|
+
type: z.ZodLiteral<"node">;
|
|
209
|
+
nodeId: z.ZodString;
|
|
210
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
211
|
+
type: z.ZodLiteral<"inference-device">;
|
|
212
|
+
nodeId: z.ZodString;
|
|
213
|
+
deviceKey: z.ZodString;
|
|
214
|
+
}, z.core.$strip>], "type">;
|
|
215
|
+
what: z.ZodString;
|
|
216
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
217
|
+
action: z.ZodString;
|
|
218
|
+
}, z.core.$strip>>>;
|
|
219
|
+
nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
220
|
+
nodeId: z.ZodString;
|
|
221
|
+
sessionsNow: z.ZodNumber;
|
|
222
|
+
unusableDevices: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
223
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
224
|
+
deviceKey: z.ZodString;
|
|
225
|
+
sessionsNow: z.ZodNumber;
|
|
226
|
+
usable: z.ZodBoolean;
|
|
227
|
+
}, z.core.$strip>>>;
|
|
228
|
+
}, z.core.$strip>>>;
|
|
229
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
230
|
+
source: z.ZodString;
|
|
231
|
+
entries: z.ZodNullable<z.ZodNumber>;
|
|
232
|
+
}, z.core.$strip>>>;
|
|
233
|
+
notCovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
234
|
+
}, z.core.$strip>>>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
export type HealthDigestAnswer = z.infer<typeof HealthDigestAnswerSchema>;
|
|
@@ -20926,7 +20926,8 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
20926
20926
|
listSeries: (input) => dispatchSystem("deviceHistory", "listSeries", "query", input),
|
|
20927
20927
|
query: (input) => dispatchSystem("deviceHistory", "query", "query", input),
|
|
20928
20928
|
getDeviceEnabled: (input) => dispatchSystem("deviceHistory", "getDeviceEnabled", "query", input),
|
|
20929
|
-
setDeviceEnabled: (input) => dispatchSystem("deviceHistory", "setDeviceEnabled", "mutation", input)
|
|
20929
|
+
setDeviceEnabled: (input) => dispatchSystem("deviceHistory", "setDeviceEnabled", "mutation", input),
|
|
20930
|
+
deleteSeriesRange: (input) => dispatchSystem("deviceHistory", "deleteSeriesRange", "mutation", input)
|
|
20930
20931
|
};
|
|
20931
20932
|
const deviceManagerInterface = {
|
|
20932
20933
|
loadConfig: (input) => dispatchSystem("deviceManager", "loadConfig", "query", input),
|
|
@@ -20926,7 +20926,8 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
20926
20926
|
listSeries: (input) => dispatchSystem("deviceHistory", "listSeries", "query", input),
|
|
20927
20927
|
query: (input) => dispatchSystem("deviceHistory", "query", "query", input),
|
|
20928
20928
|
getDeviceEnabled: (input) => dispatchSystem("deviceHistory", "getDeviceEnabled", "query", input),
|
|
20929
|
-
setDeviceEnabled: (input) => dispatchSystem("deviceHistory", "setDeviceEnabled", "mutation", input)
|
|
20929
|
+
setDeviceEnabled: (input) => dispatchSystem("deviceHistory", "setDeviceEnabled", "mutation", input),
|
|
20930
|
+
deleteSeriesRange: (input) => dispatchSystem("deviceHistory", "deleteSeriesRange", "mutation", input)
|
|
20930
20931
|
};
|
|
20931
20932
|
const deviceManagerInterface = {
|
|
20932
20933
|
loadConfig: (input) => dispatchSystem("deviceManager", "loadConfig", "query", input),
|