@camstack/types 1.2.429 → 1.2.431
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 +13 -0
- package/dist/addon.js +4 -3
- package/dist/addon.mjs +4 -3
- package/dist/automation/action.d.ts +210 -0
- package/dist/automation/condition-eval.d.ts +64 -0
- package/dist/automation/detection-trigger.d.ts +66 -0
- package/dist/automation/index.d.ts +12 -2
- package/dist/automation/recipe.d.ts +103 -1
- package/dist/automation/run-gate.d.ts +43 -0
- package/dist/automation/step-runner.d.ts +82 -0
- package/dist/automation/trace.d.ts +325 -0
- package/dist/capabilities/action-source.cap.d.ts +74 -0
- package/dist/capabilities/actions.cap.d.ts +459 -0
- package/dist/capabilities/core-blocks.cap.d.ts +761 -0
- package/dist/capabilities/index.d.ts +5 -1
- package/dist/client.js +73 -49
- package/dist/client.mjs +73 -49
- package/dist/enums/event-category.d.ts +5 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-Ave2VSxY.js → event-category-BhzwWQCH.js} +5 -0
- package/dist/{event-category-CT-hz5Rb.mjs → event-category-hdMR7CTW.mjs} +5 -0
- package/dist/generated/addon-api.d.ts +135 -0
- package/dist/generated/capability-router-map.d.ts +10 -4
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/device-proxy.d.ts +2 -0
- 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 +5 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +2849 -579
- package/dist/index.mjs +2792 -580
- package/dist/interfaces/config-ui.d.ts +7 -0
- package/dist/{sleep-hRhTSDlN.js → sleep-5zRztaHa.js} +12 -2
- package/dist/{sleep-BE7IAR2p.mjs → sleep-BHjNez61.mjs} +12 -2
- package/dist/vendor-login-proxy/index.d.ts +2 -0
- package/dist/vendor-login-proxy/login-proxy.d.ts +55 -0
- package/dist/vendor-login-proxy/url-rewrite.d.ts +68 -0
- package/package.json +1 -1
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
export declare const ActionLinksSchema: z.ZodObject<{
|
|
4
|
+
deviceId: z.ZodNumber;
|
|
5
|
+
actionIds: z.ZodArray<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type ActionLinks = z.infer<typeof ActionLinksSchema>;
|
|
8
|
+
export declare const actionsCapability: {
|
|
9
|
+
readonly name: 'actions';
|
|
10
|
+
readonly scope: 'system';
|
|
11
|
+
readonly mode: 'singleton';
|
|
12
|
+
readonly methods: {
|
|
13
|
+
/** Every action, live from the providers, with its run status. Admin. */
|
|
14
|
+
readonly list: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
addonId: z.ZodString;
|
|
18
|
+
source: z.ZodEnum<{
|
|
19
|
+
addon: "addon";
|
|
20
|
+
internal: "internal";
|
|
21
|
+
}>;
|
|
22
|
+
readOnly: z.ZodBoolean;
|
|
23
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"wait">;
|
|
25
|
+
seconds: z.ZodNumber;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"cap">;
|
|
28
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
29
|
+
$var: z.ZodString;
|
|
30
|
+
}, z.core.$strip>]>;
|
|
31
|
+
cap: z.ZodString;
|
|
32
|
+
method: z.ZodString;
|
|
33
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
34
|
+
}, z.core.$strip>], "kind">>>;
|
|
35
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
label: z.ZodOptional<z.ZodString>;
|
|
38
|
+
type: z.ZodEnum<{
|
|
39
|
+
boolean: "boolean";
|
|
40
|
+
number: "number";
|
|
41
|
+
select: "select";
|
|
42
|
+
string: "string";
|
|
43
|
+
}>;
|
|
44
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
46
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
status: z.ZodObject<{
|
|
49
|
+
isRunning: z.ZodBoolean;
|
|
50
|
+
lastRunAt: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
54
|
+
/**
|
|
55
|
+
* One action. A non-admin names the camera (`deviceId`) that links it.
|
|
56
|
+
* `null` when it does not exist.
|
|
57
|
+
*/
|
|
58
|
+
readonly get: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
59
|
+
actionId: z.ZodString;
|
|
60
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
action: z.ZodNullable<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
addonId: z.ZodString;
|
|
66
|
+
source: z.ZodEnum<{
|
|
67
|
+
addon: "addon";
|
|
68
|
+
internal: "internal";
|
|
69
|
+
}>;
|
|
70
|
+
readOnly: z.ZodBoolean;
|
|
71
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"wait">;
|
|
73
|
+
seconds: z.ZodNumber;
|
|
74
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
75
|
+
kind: z.ZodLiteral<"cap">;
|
|
76
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
77
|
+
$var: z.ZodString;
|
|
78
|
+
}, z.core.$strip>]>;
|
|
79
|
+
cap: z.ZodString;
|
|
80
|
+
method: z.ZodString;
|
|
81
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
82
|
+
}, z.core.$strip>], "kind">>>;
|
|
83
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
84
|
+
name: z.ZodString;
|
|
85
|
+
label: z.ZodOptional<z.ZodString>;
|
|
86
|
+
type: z.ZodEnum<{
|
|
87
|
+
boolean: "boolean";
|
|
88
|
+
number: "number";
|
|
89
|
+
select: "select";
|
|
90
|
+
string: "string";
|
|
91
|
+
}>;
|
|
92
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
94
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
|
+
}, z.core.$strip>>>;
|
|
96
|
+
status: z.ZodObject<{
|
|
97
|
+
isRunning: z.ZodBoolean;
|
|
98
|
+
lastRunAt: z.ZodNullable<z.ZodNumber>;
|
|
99
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
}, z.core.$strip>, "query"> & {
|
|
103
|
+
readonly caller: 'required';
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Start an action. `wait` holds the call until the run ended (an automation
|
|
107
|
+
* step does); without it the call returns `started`. A non-admin names the
|
|
108
|
+
* camera (`deviceId`) that links the action.
|
|
109
|
+
*/
|
|
110
|
+
readonly run: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
111
|
+
actionId: z.ZodString;
|
|
112
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
113
|
+
wait: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
origin: z.ZodOptional<z.ZodObject<{
|
|
115
|
+
blockId: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
119
|
+
runId: z.ZodString;
|
|
120
|
+
outcome: z.ZodUnion<readonly [z.ZodEnum<{
|
|
121
|
+
aborted: "aborted";
|
|
122
|
+
failed: "failed";
|
|
123
|
+
ran: "ran";
|
|
124
|
+
"skipped-conditions": "skipped-conditions";
|
|
125
|
+
"skipped-cooldown": "skipped-cooldown";
|
|
126
|
+
"skipped-overlap": "skipped-overlap";
|
|
127
|
+
"skipped-trigger": "skipped-trigger";
|
|
128
|
+
}>, z.ZodLiteral<"started">]>;
|
|
129
|
+
message: z.ZodOptional<z.ZodString>;
|
|
130
|
+
}, z.core.$strip>, "mutation"> & {
|
|
131
|
+
readonly caller: 'required';
|
|
132
|
+
};
|
|
133
|
+
readonly stop: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
134
|
+
actionId: z.ZodString;
|
|
135
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
136
|
+
readonly getTraces: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
137
|
+
actionId: z.ZodString;
|
|
138
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
139
|
+
traces: z.ZodArray<z.ZodObject<{
|
|
140
|
+
runId: z.ZodString;
|
|
141
|
+
startedAt: z.ZodNumber;
|
|
142
|
+
endedAt: z.ZodNumber;
|
|
143
|
+
trigger: z.ZodObject<{
|
|
144
|
+
kind: z.ZodString;
|
|
145
|
+
outcome: z.ZodEnum<{
|
|
146
|
+
fail: "fail";
|
|
147
|
+
pass: "pass";
|
|
148
|
+
}>;
|
|
149
|
+
reason: z.ZodString;
|
|
150
|
+
vars: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
153
|
+
path: z.ZodString;
|
|
154
|
+
kind: z.ZodEnum<{
|
|
155
|
+
all: "all";
|
|
156
|
+
any: "any";
|
|
157
|
+
condition: "condition";
|
|
158
|
+
expression: "expression";
|
|
159
|
+
not: "not";
|
|
160
|
+
}>;
|
|
161
|
+
outcome: z.ZodEnum<{
|
|
162
|
+
fail: "fail";
|
|
163
|
+
"not-evaluated": "not-evaluated";
|
|
164
|
+
pass: "pass";
|
|
165
|
+
}>;
|
|
166
|
+
reason: z.ZodString;
|
|
167
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
cap: z.ZodOptional<z.ZodString>;
|
|
169
|
+
fieldPath: z.ZodOptional<z.ZodString>;
|
|
170
|
+
operator: z.ZodOptional<z.ZodString>;
|
|
171
|
+
expected: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
172
|
+
observed: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
verdict: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
mode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
176
|
+
mode: z.ZodLiteral<"single">;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
mode: z.ZodLiteral<"restart">;
|
|
179
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
180
|
+
mode: z.ZodLiteral<"queued">;
|
|
181
|
+
max: z.ZodNumber;
|
|
182
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
183
|
+
mode: z.ZodLiteral<"parallel">;
|
|
184
|
+
max: z.ZodNumber;
|
|
185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
187
|
+
minutes: z.ZodNumber;
|
|
188
|
+
}, z.core.$strip>], "mode">;
|
|
189
|
+
decision: z.ZodEnum<{
|
|
190
|
+
bypass: "bypass";
|
|
191
|
+
cooldown: "cooldown";
|
|
192
|
+
drop: "drop";
|
|
193
|
+
queued: "queued";
|
|
194
|
+
restart: "restart";
|
|
195
|
+
run: "run";
|
|
196
|
+
}>;
|
|
197
|
+
reason: z.ZodString;
|
|
198
|
+
}, z.core.$strip>>;
|
|
199
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
200
|
+
path: z.ZodString;
|
|
201
|
+
kind: z.ZodString;
|
|
202
|
+
cap: z.ZodOptional<z.ZodString>;
|
|
203
|
+
method: z.ZodOptional<z.ZodString>;
|
|
204
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
206
|
+
endedAt: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
outcome: z.ZodEnum<{
|
|
208
|
+
error: "error";
|
|
209
|
+
"not-run": "not-run";
|
|
210
|
+
ok: "ok";
|
|
211
|
+
}>;
|
|
212
|
+
message: z.ZodOptional<z.ZodString>;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
outcome: z.ZodEnum<{
|
|
215
|
+
aborted: "aborted";
|
|
216
|
+
failed: "failed";
|
|
217
|
+
ran: "ran";
|
|
218
|
+
"skipped-conditions": "skipped-conditions";
|
|
219
|
+
"skipped-cooldown": "skipped-cooldown";
|
|
220
|
+
"skipped-overlap": "skipped-overlap";
|
|
221
|
+
"skipped-trigger": "skipped-trigger";
|
|
222
|
+
}>;
|
|
223
|
+
repeat: z.ZodNumber;
|
|
224
|
+
lastAt: z.ZodNumber;
|
|
225
|
+
}, z.core.$strip>>;
|
|
226
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
227
|
+
/** Internal actions only. A read-only (addon) entry is refused with `[read-only]`. */
|
|
228
|
+
readonly create: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
229
|
+
action: z.ZodObject<{
|
|
230
|
+
name: z.ZodString;
|
|
231
|
+
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
232
|
+
kind: z.ZodLiteral<"wait">;
|
|
233
|
+
seconds: z.ZodNumber;
|
|
234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
|
+
kind: z.ZodLiteral<"cap">;
|
|
236
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
237
|
+
$var: z.ZodString;
|
|
238
|
+
}, z.core.$strip>]>;
|
|
239
|
+
cap: z.ZodString;
|
|
240
|
+
method: z.ZodString;
|
|
241
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
242
|
+
}, z.core.$strip>], "kind">>;
|
|
243
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
label: z.ZodOptional<z.ZodString>;
|
|
246
|
+
type: z.ZodEnum<{
|
|
247
|
+
boolean: "boolean";
|
|
248
|
+
number: "number";
|
|
249
|
+
select: "select";
|
|
250
|
+
string: "string";
|
|
251
|
+
}>;
|
|
252
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
253
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
254
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
255
|
+
}, z.core.$strip>>>;
|
|
256
|
+
}, z.core.$strip>;
|
|
257
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
258
|
+
action: z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
name: z.ZodString;
|
|
261
|
+
addonId: z.ZodString;
|
|
262
|
+
source: z.ZodEnum<{
|
|
263
|
+
addon: "addon";
|
|
264
|
+
internal: "internal";
|
|
265
|
+
}>;
|
|
266
|
+
readOnly: z.ZodBoolean;
|
|
267
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
268
|
+
kind: z.ZodLiteral<"wait">;
|
|
269
|
+
seconds: z.ZodNumber;
|
|
270
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
271
|
+
kind: z.ZodLiteral<"cap">;
|
|
272
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
273
|
+
$var: z.ZodString;
|
|
274
|
+
}, z.core.$strip>]>;
|
|
275
|
+
cap: z.ZodString;
|
|
276
|
+
method: z.ZodString;
|
|
277
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
278
|
+
}, z.core.$strip>], "kind">>>;
|
|
279
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
280
|
+
name: z.ZodString;
|
|
281
|
+
label: z.ZodOptional<z.ZodString>;
|
|
282
|
+
type: z.ZodEnum<{
|
|
283
|
+
boolean: "boolean";
|
|
284
|
+
number: "number";
|
|
285
|
+
select: "select";
|
|
286
|
+
string: "string";
|
|
287
|
+
}>;
|
|
288
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
289
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
290
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
291
|
+
}, z.core.$strip>>>;
|
|
292
|
+
status: z.ZodObject<{
|
|
293
|
+
isRunning: z.ZodBoolean;
|
|
294
|
+
lastRunAt: z.ZodNullable<z.ZodNumber>;
|
|
295
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
}, z.core.$strip>, "mutation">;
|
|
299
|
+
readonly update: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
300
|
+
actionId: z.ZodString;
|
|
301
|
+
action: z.ZodObject<{
|
|
302
|
+
name: z.ZodOptional<z.ZodString>;
|
|
303
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
304
|
+
kind: z.ZodLiteral<"wait">;
|
|
305
|
+
seconds: z.ZodNumber;
|
|
306
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
307
|
+
kind: z.ZodLiteral<"cap">;
|
|
308
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
309
|
+
$var: z.ZodString;
|
|
310
|
+
}, z.core.$strip>]>;
|
|
311
|
+
cap: z.ZodString;
|
|
312
|
+
method: z.ZodString;
|
|
313
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
314
|
+
}, z.core.$strip>], "kind">>>;
|
|
315
|
+
variables: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
316
|
+
name: z.ZodString;
|
|
317
|
+
label: z.ZodOptional<z.ZodString>;
|
|
318
|
+
type: z.ZodEnum<{
|
|
319
|
+
boolean: "boolean";
|
|
320
|
+
number: "number";
|
|
321
|
+
select: "select";
|
|
322
|
+
string: "string";
|
|
323
|
+
}>;
|
|
324
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
325
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
326
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
327
|
+
}, z.core.$strip>>>>;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
330
|
+
action: z.ZodObject<{
|
|
331
|
+
id: z.ZodString;
|
|
332
|
+
name: z.ZodString;
|
|
333
|
+
addonId: z.ZodString;
|
|
334
|
+
source: z.ZodEnum<{
|
|
335
|
+
addon: "addon";
|
|
336
|
+
internal: "internal";
|
|
337
|
+
}>;
|
|
338
|
+
readOnly: z.ZodBoolean;
|
|
339
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
340
|
+
kind: z.ZodLiteral<"wait">;
|
|
341
|
+
seconds: z.ZodNumber;
|
|
342
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
343
|
+
kind: z.ZodLiteral<"cap">;
|
|
344
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
345
|
+
$var: z.ZodString;
|
|
346
|
+
}, z.core.$strip>]>;
|
|
347
|
+
cap: z.ZodString;
|
|
348
|
+
method: z.ZodString;
|
|
349
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
350
|
+
}, z.core.$strip>], "kind">>>;
|
|
351
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
352
|
+
name: z.ZodString;
|
|
353
|
+
label: z.ZodOptional<z.ZodString>;
|
|
354
|
+
type: z.ZodEnum<{
|
|
355
|
+
boolean: "boolean";
|
|
356
|
+
number: "number";
|
|
357
|
+
select: "select";
|
|
358
|
+
string: "string";
|
|
359
|
+
}>;
|
|
360
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
361
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
362
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
363
|
+
}, z.core.$strip>>>;
|
|
364
|
+
status: z.ZodObject<{
|
|
365
|
+
isRunning: z.ZodBoolean;
|
|
366
|
+
lastRunAt: z.ZodNullable<z.ZodNumber>;
|
|
367
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
368
|
+
}, z.core.$strip>;
|
|
369
|
+
}, z.core.$strip>;
|
|
370
|
+
}, z.core.$strip>, "mutation">;
|
|
371
|
+
readonly delete: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
372
|
+
actionId: z.ZodString;
|
|
373
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
374
|
+
/**
|
|
375
|
+
* What a viewer sees under a camera: the actions this camera LINKS, with
|
|
376
|
+
* their variables, and only when the caller may see the camera. The scope
|
|
377
|
+
* gate admits the camera; the answer is cut to the linked ones.
|
|
378
|
+
*/
|
|
379
|
+
readonly listForCamera: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
380
|
+
deviceId: z.ZodNumber;
|
|
381
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
382
|
+
id: z.ZodString;
|
|
383
|
+
name: z.ZodString;
|
|
384
|
+
addonId: z.ZodString;
|
|
385
|
+
source: z.ZodEnum<{
|
|
386
|
+
addon: "addon";
|
|
387
|
+
internal: "internal";
|
|
388
|
+
}>;
|
|
389
|
+
readOnly: z.ZodBoolean;
|
|
390
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
391
|
+
kind: z.ZodLiteral<"wait">;
|
|
392
|
+
seconds: z.ZodNumber;
|
|
393
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
394
|
+
kind: z.ZodLiteral<"cap">;
|
|
395
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
396
|
+
$var: z.ZodString;
|
|
397
|
+
}, z.core.$strip>]>;
|
|
398
|
+
cap: z.ZodString;
|
|
399
|
+
method: z.ZodString;
|
|
400
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
401
|
+
}, z.core.$strip>], "kind">>>;
|
|
402
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
403
|
+
name: z.ZodString;
|
|
404
|
+
label: z.ZodOptional<z.ZodString>;
|
|
405
|
+
type: z.ZodEnum<{
|
|
406
|
+
boolean: "boolean";
|
|
407
|
+
number: "number";
|
|
408
|
+
select: "select";
|
|
409
|
+
string: "string";
|
|
410
|
+
}>;
|
|
411
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
412
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
413
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
414
|
+
}, z.core.$strip>>>;
|
|
415
|
+
status: z.ZodObject<{
|
|
416
|
+
isRunning: z.ZodBoolean;
|
|
417
|
+
lastRunAt: z.ZodNullable<z.ZodNumber>;
|
|
418
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
419
|
+
}, z.core.$strip>;
|
|
420
|
+
}, z.core.$strip>>, "query">;
|
|
421
|
+
/** The actions a camera links. Admin (the picker). */
|
|
422
|
+
readonly getLinks: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
423
|
+
deviceId: z.ZodNumber;
|
|
424
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
425
|
+
deviceId: z.ZodNumber;
|
|
426
|
+
actionIds: z.ZodArray<z.ZodString>;
|
|
427
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
428
|
+
/** Replace a camera's linked actions with what the operator picked. */
|
|
429
|
+
readonly setLinks: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
430
|
+
deviceId: z.ZodNumber;
|
|
431
|
+
actionIds: z.ZodArray<z.ZodString>;
|
|
432
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
433
|
+
deviceId: z.ZodNumber;
|
|
434
|
+
actionIds: z.ZodArray<z.ZodString>;
|
|
435
|
+
}, z.core.$strip>, "mutation">;
|
|
436
|
+
};
|
|
437
|
+
readonly events: {
|
|
438
|
+
/** A run started or ended. Telemetry (D8): `list` is the authority. */
|
|
439
|
+
readonly onRunChanged: {
|
|
440
|
+
readonly data: z.ZodObject<{
|
|
441
|
+
actionId: z.ZodString;
|
|
442
|
+
runId: z.ZodString;
|
|
443
|
+
isRunning: z.ZodBoolean;
|
|
444
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
445
|
+
aborted: "aborted";
|
|
446
|
+
failed: "failed";
|
|
447
|
+
ran: "ran";
|
|
448
|
+
"skipped-conditions": "skipped-conditions";
|
|
449
|
+
"skipped-cooldown": "skipped-cooldown";
|
|
450
|
+
"skipped-overlap": "skipped-overlap";
|
|
451
|
+
"skipped-trigger": "skipped-trigger";
|
|
452
|
+
}>>;
|
|
453
|
+
lastRunAt: z.ZodNullable<z.ZodNumber>;
|
|
454
|
+
lastError: z.ZodNullable<z.ZodString>;
|
|
455
|
+
}, z.core.$strip>;
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
export type IActionsProvider = InferProvider<typeof actionsCapability>;
|