@camstack/types 1.2.565 → 1.2.567
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 +14 -0
- package/dist/automation/recipe.d.ts +156 -3
- package/dist/automation/template-link.d.ts +871 -9
- package/dist/automation/when.d.ts +98 -6
- package/dist/index.js +855 -546
- package/dist/index.mjs +844 -547
- package/dist/template/automation-template.d.ts +1230 -189
- package/package.json +1 -1
|
@@ -20,6 +20,22 @@
|
|
|
20
20
|
* writes `<group>-<index>`, so a row's event leaf and the branch that reads it
|
|
21
21
|
* (`triggered-by`) agree on one name.
|
|
22
22
|
*
|
|
23
|
+
* A group row may hold one more level of groups (a button row with a list of
|
|
24
|
+
* events and a list of commands). Three bindings reach that level:
|
|
25
|
+
* - a `rows` binding INSIDE a row's bindings appends one copy of its item per
|
|
26
|
+
* nested row, at a path relative to the parent row's item (a branch's steps);
|
|
27
|
+
* - a top-level `rows` binding with `nested` appends one item per nested row of
|
|
28
|
+
* EVERY row, flat (one event leaf per event of every button);
|
|
29
|
+
* - `row-ids` writes the ids of a row's nested rows
|
|
30
|
+
* (`<group>-<index>-<nested>-<index>`), the same ids `row-id` gives those
|
|
31
|
+
* nested rows, so a branch can name every leaf of its row.
|
|
32
|
+
*
|
|
33
|
+
* A `time-window` input is an optional limit on WHEN the automation may run. Its
|
|
34
|
+
* `gate` binding wraps the tree at a path as `all[time-is, <that tree>]`; left
|
|
35
|
+
* without a value the tree is not touched at all. A gate is declared after the
|
|
36
|
+
* bindings that write into the tree it wraps, because it moves that tree one
|
|
37
|
+
* level down.
|
|
38
|
+
*
|
|
23
39
|
* Everything here is pure: the admin UI expands on save and the hub re-expands
|
|
24
40
|
* every instance when a template changes, with the same function.
|
|
25
41
|
*/
|
|
@@ -36,7 +52,20 @@ export declare const TemplateSelectOptionSchema: z.ZodObject<{
|
|
|
36
52
|
value: z.ZodString;
|
|
37
53
|
label: z.ZodString;
|
|
38
54
|
}, z.core.$strip>;
|
|
55
|
+
export declare const TEMPLATE_ENTRIES_MAX = 20;
|
|
39
56
|
export declare const TemplateScalarInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
57
|
+
key: z.ZodString;
|
|
58
|
+
label: z.ZodString;
|
|
59
|
+
description: z.ZodOptional<z.ZodString>;
|
|
60
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
61
|
+
kind: z.ZodLiteral<"entries">;
|
|
62
|
+
entry: z.ZodEnum<{
|
|
63
|
+
step: "step";
|
|
64
|
+
trigger: "trigger";
|
|
65
|
+
}>;
|
|
66
|
+
allow: z.ZodArray<z.ZodString>;
|
|
67
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
69
|
key: z.ZodString;
|
|
41
70
|
label: z.ZodString;
|
|
42
71
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -105,16 +134,38 @@ export declare const TemplateScalarInputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
105
134
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
106
135
|
kind: z.ZodLiteral<"boolean">;
|
|
107
136
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
key: z.ZodString;
|
|
139
|
+
label: z.ZodString;
|
|
140
|
+
description: z.ZodOptional<z.ZodString>;
|
|
141
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
142
|
+
kind: z.ZodLiteral<"time-window">;
|
|
108
143
|
}, z.core.$strip>], "kind">;
|
|
109
144
|
export type TemplateScalarInput = z.infer<typeof TemplateScalarInputSchema>;
|
|
110
145
|
export declare const TEMPLATE_GROUP_ROWS_MAX = 20;
|
|
111
|
-
|
|
146
|
+
/** A group inside a group row: its rows hold values only, never another group. */
|
|
147
|
+
declare const NestedGroupInputSchema: z.ZodObject<{
|
|
112
148
|
key: z.ZodString;
|
|
113
149
|
label: z.ZodString;
|
|
114
150
|
description: z.ZodOptional<z.ZodString>;
|
|
115
151
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
116
152
|
kind: z.ZodLiteral<"group">;
|
|
153
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
154
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
117
156
|
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
157
|
+
key: z.ZodString;
|
|
158
|
+
label: z.ZodString;
|
|
159
|
+
description: z.ZodOptional<z.ZodString>;
|
|
160
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
161
|
+
kind: z.ZodLiteral<"entries">;
|
|
162
|
+
entry: z.ZodEnum<{
|
|
163
|
+
step: "step";
|
|
164
|
+
trigger: "trigger";
|
|
165
|
+
}>;
|
|
166
|
+
allow: z.ZodArray<z.ZodString>;
|
|
167
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
118
169
|
key: z.ZodString;
|
|
119
170
|
label: z.ZodString;
|
|
120
171
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -183,12 +234,28 @@ declare const GroupInputSchema: z.ZodObject<{
|
|
|
183
234
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
184
235
|
kind: z.ZodLiteral<"boolean">;
|
|
185
236
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
237
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
238
|
+
key: z.ZodString;
|
|
239
|
+
label: z.ZodString;
|
|
240
|
+
description: z.ZodOptional<z.ZodString>;
|
|
241
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
242
|
+
kind: z.ZodLiteral<"time-window">;
|
|
186
243
|
}, z.core.$strip>], "kind">>;
|
|
187
|
-
minRows: z.ZodOptional<z.ZodNumber>;
|
|
188
|
-
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
189
244
|
}, z.core.$strip>;
|
|
190
|
-
export type
|
|
191
|
-
export declare const
|
|
245
|
+
export type TemplateNestedGroupInput = z.infer<typeof NestedGroupInputSchema>;
|
|
246
|
+
export declare const TemplateRowInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
247
|
+
key: z.ZodString;
|
|
248
|
+
label: z.ZodString;
|
|
249
|
+
description: z.ZodOptional<z.ZodString>;
|
|
250
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
251
|
+
kind: z.ZodLiteral<"entries">;
|
|
252
|
+
entry: z.ZodEnum<{
|
|
253
|
+
step: "step";
|
|
254
|
+
trigger: "trigger";
|
|
255
|
+
}>;
|
|
256
|
+
allow: z.ZodArray<z.ZodString>;
|
|
257
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
192
259
|
key: z.ZodString;
|
|
193
260
|
label: z.ZodString;
|
|
194
261
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -257,13 +324,34 @@ export declare const TemplateInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
257
324
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
258
325
|
kind: z.ZodLiteral<"boolean">;
|
|
259
326
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
327
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
328
|
+
key: z.ZodString;
|
|
329
|
+
label: z.ZodString;
|
|
330
|
+
description: z.ZodOptional<z.ZodString>;
|
|
331
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
332
|
+
kind: z.ZodLiteral<"time-window">;
|
|
260
333
|
}, z.core.$strip>, z.ZodObject<{
|
|
261
334
|
key: z.ZodString;
|
|
262
335
|
label: z.ZodString;
|
|
263
336
|
description: z.ZodOptional<z.ZodString>;
|
|
264
337
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
265
338
|
kind: z.ZodLiteral<"group">;
|
|
339
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
340
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
341
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
266
342
|
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
343
|
+
key: z.ZodString;
|
|
344
|
+
label: z.ZodString;
|
|
345
|
+
description: z.ZodOptional<z.ZodString>;
|
|
346
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
347
|
+
kind: z.ZodLiteral<"entries">;
|
|
348
|
+
entry: z.ZodEnum<{
|
|
349
|
+
step: "step";
|
|
350
|
+
trigger: "trigger";
|
|
351
|
+
}>;
|
|
352
|
+
allow: z.ZodArray<z.ZodString>;
|
|
353
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
354
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
355
|
key: z.ZodString;
|
|
268
356
|
label: z.ZodString;
|
|
269
357
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -332,79 +420,38 @@ export declare const TemplateInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
332
420
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
333
421
|
kind: z.ZodLiteral<"boolean">;
|
|
334
422
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
335
|
-
}, z.core.$strip>], "kind">>;
|
|
336
|
-
minRows: z.ZodOptional<z.ZodNumber>;
|
|
337
|
-
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
338
|
-
}, z.core.$strip>], "kind">;
|
|
339
|
-
export type TemplateInput = z.infer<typeof TemplateInputSchema>;
|
|
340
|
-
export type TemplateInputKind = TemplateInput['kind'];
|
|
341
|
-
export declare const TemplatePathSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
342
|
-
/** Keys and list indexes from the body (or a row item) root; empty is the root itself. */
|
|
343
|
-
export type TemplatePath = z.infer<typeof TemplatePathSchema>;
|
|
344
|
-
export declare const TemplateValueBindingSchema: z.ZodObject<{
|
|
345
|
-
kind: z.ZodLiteral<"value">;
|
|
346
|
-
input: z.ZodString;
|
|
347
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
348
|
-
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
349
|
-
}, z.core.$strip>;
|
|
350
|
-
export type TemplateValueBinding = z.infer<typeof TemplateValueBindingSchema>;
|
|
351
|
-
export declare const TemplateRowIdBindingSchema: z.ZodObject<{
|
|
352
|
-
kind: z.ZodLiteral<"row-id">;
|
|
353
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
354
|
-
}, z.core.$strip>;
|
|
355
|
-
export declare const TemplateRowItemBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
356
|
-
kind: z.ZodLiteral<"value">;
|
|
357
|
-
input: z.ZodString;
|
|
358
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
359
|
-
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
360
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
361
|
-
kind: z.ZodLiteral<"row-id">;
|
|
362
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
363
|
-
}, z.core.$strip>], "kind">;
|
|
364
|
-
export type TemplateRowItemBinding = z.infer<typeof TemplateRowItemBindingSchema>;
|
|
365
|
-
export declare const TemplateRowsBindingSchema: z.ZodObject<{
|
|
366
|
-
kind: z.ZodLiteral<"rows">;
|
|
367
|
-
input: z.ZodString;
|
|
368
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
369
|
-
item: z.ZodUnknown;
|
|
370
|
-
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
371
|
-
kind: z.ZodLiteral<"value">;
|
|
372
|
-
input: z.ZodString;
|
|
373
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
374
|
-
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
375
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
376
|
-
kind: z.ZodLiteral<"row-id">;
|
|
377
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
378
|
-
}, z.core.$strip>], "kind">>;
|
|
379
|
-
}, z.core.$strip>;
|
|
380
|
-
export type TemplateRowsBinding = z.infer<typeof TemplateRowsBindingSchema>;
|
|
381
|
-
export declare const TemplateBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
382
|
-
kind: z.ZodLiteral<"value">;
|
|
383
|
-
input: z.ZodString;
|
|
384
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
385
|
-
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
386
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
387
|
-
kind: z.ZodLiteral<"rows">;
|
|
388
|
-
input: z.ZodString;
|
|
389
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
390
|
-
item: z.ZodUnknown;
|
|
391
|
-
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
392
|
-
kind: z.ZodLiteral<"value">;
|
|
393
|
-
input: z.ZodString;
|
|
394
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
395
|
-
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
396
423
|
}, z.core.$strip>, z.ZodObject<{
|
|
397
|
-
|
|
398
|
-
|
|
424
|
+
key: z.ZodString;
|
|
425
|
+
label: z.ZodString;
|
|
426
|
+
description: z.ZodOptional<z.ZodString>;
|
|
427
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
428
|
+
kind: z.ZodLiteral<"time-window">;
|
|
399
429
|
}, z.core.$strip>], "kind">>;
|
|
400
430
|
}, z.core.$strip>], "kind">;
|
|
401
|
-
|
|
402
|
-
export
|
|
403
|
-
|
|
404
|
-
|
|
431
|
+
/** What a group row may hold: a value, or one more level of rows. */
|
|
432
|
+
export type TemplateRowInput = z.infer<typeof TemplateRowInputSchema>;
|
|
433
|
+
declare const GroupInputSchema: z.ZodObject<{
|
|
434
|
+
key: z.ZodString;
|
|
435
|
+
label: z.ZodString;
|
|
405
436
|
description: z.ZodOptional<z.ZodString>;
|
|
406
|
-
|
|
437
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
438
|
+
kind: z.ZodLiteral<"group">;
|
|
439
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
440
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
441
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
407
442
|
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
443
|
+
key: z.ZodString;
|
|
444
|
+
label: z.ZodString;
|
|
445
|
+
description: z.ZodOptional<z.ZodString>;
|
|
446
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
447
|
+
kind: z.ZodLiteral<"entries">;
|
|
448
|
+
entry: z.ZodEnum<{
|
|
449
|
+
step: "step";
|
|
450
|
+
trigger: "trigger";
|
|
451
|
+
}>;
|
|
452
|
+
allow: z.ZodArray<z.ZodString>;
|
|
453
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
454
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
408
455
|
key: z.ZodString;
|
|
409
456
|
label: z.ZodString;
|
|
410
457
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -473,13 +520,34 @@ export declare const AutomationTemplatePayloadSchema: z.ZodObject<{
|
|
|
473
520
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
474
521
|
kind: z.ZodLiteral<"boolean">;
|
|
475
522
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
523
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
524
|
+
key: z.ZodString;
|
|
525
|
+
label: z.ZodString;
|
|
526
|
+
description: z.ZodOptional<z.ZodString>;
|
|
527
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
528
|
+
kind: z.ZodLiteral<"time-window">;
|
|
476
529
|
}, z.core.$strip>, z.ZodObject<{
|
|
477
530
|
key: z.ZodString;
|
|
478
531
|
label: z.ZodString;
|
|
479
532
|
description: z.ZodOptional<z.ZodString>;
|
|
480
533
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
481
534
|
kind: z.ZodLiteral<"group">;
|
|
535
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
536
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
537
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
482
538
|
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
539
|
+
key: z.ZodString;
|
|
540
|
+
label: z.ZodString;
|
|
541
|
+
description: z.ZodOptional<z.ZodString>;
|
|
542
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
543
|
+
kind: z.ZodLiteral<"entries">;
|
|
544
|
+
entry: z.ZodEnum<{
|
|
545
|
+
step: "step";
|
|
546
|
+
trigger: "trigger";
|
|
547
|
+
}>;
|
|
548
|
+
allow: z.ZodArray<z.ZodString>;
|
|
549
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
550
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
483
551
|
key: z.ZodString;
|
|
484
552
|
label: z.ZodString;
|
|
485
553
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -548,125 +616,943 @@ export declare const AutomationTemplatePayloadSchema: z.ZodObject<{
|
|
|
548
616
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
549
617
|
kind: z.ZodLiteral<"boolean">;
|
|
550
618
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
551
|
-
}, z.core.$strip>], "kind">>;
|
|
552
|
-
minRows: z.ZodOptional<z.ZodNumber>;
|
|
553
|
-
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
554
|
-
}, z.core.$strip>], "kind">>;
|
|
555
|
-
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
556
|
-
kind: z.ZodLiteral<"value">;
|
|
557
|
-
input: z.ZodString;
|
|
558
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
559
|
-
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
560
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
561
|
-
kind: z.ZodLiteral<"rows">;
|
|
562
|
-
input: z.ZodString;
|
|
563
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
564
|
-
item: z.ZodUnknown;
|
|
565
|
-
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
566
|
-
kind: z.ZodLiteral<"value">;
|
|
567
|
-
input: z.ZodString;
|
|
568
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
569
|
-
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
570
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
571
|
-
kind: z.ZodLiteral<"row-id">;
|
|
572
|
-
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
573
|
-
}, z.core.$strip>], "kind">>;
|
|
574
|
-
}, z.core.$strip>], "kind">>;
|
|
575
|
-
}, z.core.$strip>;
|
|
576
|
-
export type AutomationTemplatePayload = z.infer<typeof AutomationTemplatePayloadSchema>;
|
|
577
|
-
export type AutomationTemplateExpansion = {
|
|
578
|
-
readonly ok: true;
|
|
579
|
-
readonly recipe: AutomationRecipe;
|
|
580
|
-
} | {
|
|
581
|
-
readonly ok: false;
|
|
582
|
-
readonly problems: readonly TemplateInstanceProblem[];
|
|
583
|
-
};
|
|
584
|
-
/** The body with the values written in, as a recipe — or every reason it is not one. */
|
|
585
|
-
export declare function expandAutomationTemplate(payload: AutomationTemplatePayload, values: TemplateInputValues): AutomationTemplateExpansion;
|
|
586
|
-
/** A new instance: the expansion, linked to its template. */
|
|
587
|
-
export declare function instantiateAutomationTemplate(templateId: string, payload: AutomationTemplatePayload, values: TemplateInputValues): AutomationTemplateExpansion;
|
|
588
|
-
export interface AutomationInstanceReexpansion {
|
|
589
|
-
readonly recipe: AutomationRecipe;
|
|
590
|
-
/** True when the values no longer fit and the previous body was kept. */
|
|
591
|
-
readonly flagged: boolean;
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* An instance after its template changed (or vanished, `payload === null`):
|
|
595
|
-
* re-expanded when its values still fit, otherwise its previous body kept and
|
|
596
|
-
* the link flagged with the problems. Never dropped.
|
|
597
|
-
*/
|
|
598
|
-
export declare function reexpandAutomationInstance(payload: AutomationTemplatePayload | null, current: AutomationRecipe): AutomationInstanceReexpansion;
|
|
599
|
-
/** "Convert to a free automation": the expansion as it is, without the link. */
|
|
600
|
-
export declare function detachAutomationInstance(recipe: AutomationRecipe): AutomationRecipe;
|
|
601
|
-
export declare const AUTOMATION_TEMPLATE_EXPORT_FORMAT = "camstack.automation-template";
|
|
602
|
-
export declare const AutomationTemplateExportSchema: z.ZodObject<{
|
|
603
|
-
format: z.ZodLiteral<"camstack.automation-template">;
|
|
604
|
-
version: z.ZodLiteral<1>;
|
|
605
|
-
name: z.ZodString;
|
|
606
|
-
payload: z.ZodObject<{
|
|
607
|
-
version: z.ZodLiteral<1>;
|
|
608
|
-
description: z.ZodOptional<z.ZodString>;
|
|
609
|
-
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
610
|
-
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
611
|
-
key: z.ZodString;
|
|
612
|
-
label: z.ZodString;
|
|
613
|
-
description: z.ZodOptional<z.ZodString>;
|
|
614
|
-
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
615
|
-
kind: z.ZodLiteral<"device">;
|
|
616
|
-
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
617
|
-
filter: z.ZodOptional<z.ZodObject<{
|
|
618
|
-
capability: z.ZodOptional<z.ZodString>;
|
|
619
|
-
role: z.ZodOptional<z.ZodString>;
|
|
620
|
-
}, z.core.$strip>>;
|
|
621
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
622
|
-
key: z.ZodString;
|
|
623
|
-
label: z.ZodString;
|
|
624
|
-
description: z.ZodOptional<z.ZodString>;
|
|
625
|
-
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
626
|
-
kind: z.ZodLiteral<"event">;
|
|
627
|
-
deviceInput: z.ZodString;
|
|
628
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
629
|
-
key: z.ZodString;
|
|
630
|
-
label: z.ZodString;
|
|
631
|
-
description: z.ZodOptional<z.ZodString>;
|
|
632
|
-
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
633
|
-
kind: z.ZodLiteral<"action">;
|
|
634
|
-
deviceInput: z.ZodOptional<z.ZodString>;
|
|
635
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
636
|
-
key: z.ZodString;
|
|
637
|
-
label: z.ZodString;
|
|
638
|
-
description: z.ZodOptional<z.ZodString>;
|
|
639
|
-
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
640
|
-
kind: z.ZodLiteral<"number">;
|
|
641
|
-
min: z.ZodOptional<z.ZodNumber>;
|
|
642
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
643
|
-
default: z.ZodOptional<z.ZodNumber>;
|
|
644
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
645
|
-
key: z.ZodString;
|
|
646
|
-
label: z.ZodString;
|
|
647
|
-
description: z.ZodOptional<z.ZodString>;
|
|
648
|
-
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
649
|
-
kind: z.ZodLiteral<"duration">;
|
|
650
|
-
min: z.ZodOptional<z.ZodNumber>;
|
|
651
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
652
|
-
default: z.ZodOptional<z.ZodNumber>;
|
|
653
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
654
|
-
key: z.ZodString;
|
|
655
|
-
label: z.ZodString;
|
|
656
|
-
description: z.ZodOptional<z.ZodString>;
|
|
657
|
-
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
658
|
-
kind: z.ZodLiteral<"text">;
|
|
659
|
-
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
660
|
-
default: z.ZodOptional<z.ZodString>;
|
|
661
619
|
}, z.core.$strip>, z.ZodObject<{
|
|
662
620
|
key: z.ZodString;
|
|
663
621
|
label: z.ZodString;
|
|
664
622
|
description: z.ZodOptional<z.ZodString>;
|
|
665
623
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
666
|
-
kind: z.ZodLiteral<"
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
624
|
+
kind: z.ZodLiteral<"time-window">;
|
|
625
|
+
}, z.core.$strip>], "kind">>;
|
|
626
|
+
}, z.core.$strip>], "kind">>;
|
|
627
|
+
}, z.core.$strip>;
|
|
628
|
+
export type TemplateGroupInput = z.infer<typeof GroupInputSchema>;
|
|
629
|
+
export declare const TemplateInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
630
|
+
key: z.ZodString;
|
|
631
|
+
label: z.ZodString;
|
|
632
|
+
description: z.ZodOptional<z.ZodString>;
|
|
633
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
634
|
+
kind: z.ZodLiteral<"entries">;
|
|
635
|
+
entry: z.ZodEnum<{
|
|
636
|
+
step: "step";
|
|
637
|
+
trigger: "trigger";
|
|
638
|
+
}>;
|
|
639
|
+
allow: z.ZodArray<z.ZodString>;
|
|
640
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
641
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
642
|
+
key: z.ZodString;
|
|
643
|
+
label: z.ZodString;
|
|
644
|
+
description: z.ZodOptional<z.ZodString>;
|
|
645
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
646
|
+
kind: z.ZodLiteral<"device">;
|
|
647
|
+
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
648
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
649
|
+
capability: z.ZodOptional<z.ZodString>;
|
|
650
|
+
role: z.ZodOptional<z.ZodString>;
|
|
651
|
+
}, z.core.$strip>>;
|
|
652
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
653
|
+
key: z.ZodString;
|
|
654
|
+
label: z.ZodString;
|
|
655
|
+
description: z.ZodOptional<z.ZodString>;
|
|
656
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
657
|
+
kind: z.ZodLiteral<"event">;
|
|
658
|
+
deviceInput: z.ZodString;
|
|
659
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
660
|
+
key: z.ZodString;
|
|
661
|
+
label: z.ZodString;
|
|
662
|
+
description: z.ZodOptional<z.ZodString>;
|
|
663
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
664
|
+
kind: z.ZodLiteral<"action">;
|
|
665
|
+
deviceInput: z.ZodOptional<z.ZodString>;
|
|
666
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
667
|
+
key: z.ZodString;
|
|
668
|
+
label: z.ZodString;
|
|
669
|
+
description: z.ZodOptional<z.ZodString>;
|
|
670
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
671
|
+
kind: z.ZodLiteral<"number">;
|
|
672
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
673
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
674
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
675
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
676
|
+
key: z.ZodString;
|
|
677
|
+
label: z.ZodString;
|
|
678
|
+
description: z.ZodOptional<z.ZodString>;
|
|
679
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
680
|
+
kind: z.ZodLiteral<"duration">;
|
|
681
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
682
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
683
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
684
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
685
|
+
key: z.ZodString;
|
|
686
|
+
label: z.ZodString;
|
|
687
|
+
description: z.ZodOptional<z.ZodString>;
|
|
688
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
689
|
+
kind: z.ZodLiteral<"text">;
|
|
690
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
691
|
+
default: z.ZodOptional<z.ZodString>;
|
|
692
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
693
|
+
key: z.ZodString;
|
|
694
|
+
label: z.ZodString;
|
|
695
|
+
description: z.ZodOptional<z.ZodString>;
|
|
696
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
697
|
+
kind: z.ZodLiteral<"select">;
|
|
698
|
+
options: z.ZodArray<z.ZodObject<{
|
|
699
|
+
value: z.ZodString;
|
|
700
|
+
label: z.ZodString;
|
|
701
|
+
}, z.core.$strip>>;
|
|
702
|
+
default: z.ZodOptional<z.ZodString>;
|
|
703
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
704
|
+
key: z.ZodString;
|
|
705
|
+
label: z.ZodString;
|
|
706
|
+
description: z.ZodOptional<z.ZodString>;
|
|
707
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
708
|
+
kind: z.ZodLiteral<"boolean">;
|
|
709
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
710
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
711
|
+
key: z.ZodString;
|
|
712
|
+
label: z.ZodString;
|
|
713
|
+
description: z.ZodOptional<z.ZodString>;
|
|
714
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
715
|
+
kind: z.ZodLiteral<"time-window">;
|
|
716
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
717
|
+
key: z.ZodString;
|
|
718
|
+
label: z.ZodString;
|
|
719
|
+
description: z.ZodOptional<z.ZodString>;
|
|
720
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
721
|
+
kind: z.ZodLiteral<"group">;
|
|
722
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
723
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
724
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
725
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
726
|
+
key: z.ZodString;
|
|
727
|
+
label: z.ZodString;
|
|
728
|
+
description: z.ZodOptional<z.ZodString>;
|
|
729
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
730
|
+
kind: z.ZodLiteral<"entries">;
|
|
731
|
+
entry: z.ZodEnum<{
|
|
732
|
+
step: "step";
|
|
733
|
+
trigger: "trigger";
|
|
734
|
+
}>;
|
|
735
|
+
allow: z.ZodArray<z.ZodString>;
|
|
736
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
737
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
738
|
+
key: z.ZodString;
|
|
739
|
+
label: z.ZodString;
|
|
740
|
+
description: z.ZodOptional<z.ZodString>;
|
|
741
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
742
|
+
kind: z.ZodLiteral<"device">;
|
|
743
|
+
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
744
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
745
|
+
capability: z.ZodOptional<z.ZodString>;
|
|
746
|
+
role: z.ZodOptional<z.ZodString>;
|
|
747
|
+
}, z.core.$strip>>;
|
|
748
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
749
|
+
key: z.ZodString;
|
|
750
|
+
label: z.ZodString;
|
|
751
|
+
description: z.ZodOptional<z.ZodString>;
|
|
752
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
753
|
+
kind: z.ZodLiteral<"event">;
|
|
754
|
+
deviceInput: z.ZodString;
|
|
755
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
756
|
+
key: z.ZodString;
|
|
757
|
+
label: z.ZodString;
|
|
758
|
+
description: z.ZodOptional<z.ZodString>;
|
|
759
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
760
|
+
kind: z.ZodLiteral<"action">;
|
|
761
|
+
deviceInput: z.ZodOptional<z.ZodString>;
|
|
762
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
763
|
+
key: z.ZodString;
|
|
764
|
+
label: z.ZodString;
|
|
765
|
+
description: z.ZodOptional<z.ZodString>;
|
|
766
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
767
|
+
kind: z.ZodLiteral<"number">;
|
|
768
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
769
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
770
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
771
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
772
|
+
key: z.ZodString;
|
|
773
|
+
label: z.ZodString;
|
|
774
|
+
description: z.ZodOptional<z.ZodString>;
|
|
775
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
776
|
+
kind: z.ZodLiteral<"duration">;
|
|
777
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
778
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
779
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
780
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
781
|
+
key: z.ZodString;
|
|
782
|
+
label: z.ZodString;
|
|
783
|
+
description: z.ZodOptional<z.ZodString>;
|
|
784
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
785
|
+
kind: z.ZodLiteral<"text">;
|
|
786
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
787
|
+
default: z.ZodOptional<z.ZodString>;
|
|
788
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
789
|
+
key: z.ZodString;
|
|
790
|
+
label: z.ZodString;
|
|
791
|
+
description: z.ZodOptional<z.ZodString>;
|
|
792
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
793
|
+
kind: z.ZodLiteral<"select">;
|
|
794
|
+
options: z.ZodArray<z.ZodObject<{
|
|
795
|
+
value: z.ZodString;
|
|
796
|
+
label: z.ZodString;
|
|
797
|
+
}, z.core.$strip>>;
|
|
798
|
+
default: z.ZodOptional<z.ZodString>;
|
|
799
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
800
|
+
key: z.ZodString;
|
|
801
|
+
label: z.ZodString;
|
|
802
|
+
description: z.ZodOptional<z.ZodString>;
|
|
803
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
804
|
+
kind: z.ZodLiteral<"boolean">;
|
|
805
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
806
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
807
|
+
key: z.ZodString;
|
|
808
|
+
label: z.ZodString;
|
|
809
|
+
description: z.ZodOptional<z.ZodString>;
|
|
810
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
811
|
+
kind: z.ZodLiteral<"time-window">;
|
|
812
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
813
|
+
key: z.ZodString;
|
|
814
|
+
label: z.ZodString;
|
|
815
|
+
description: z.ZodOptional<z.ZodString>;
|
|
816
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
817
|
+
kind: z.ZodLiteral<"group">;
|
|
818
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
819
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
820
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
821
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
822
|
+
key: z.ZodString;
|
|
823
|
+
label: z.ZodString;
|
|
824
|
+
description: z.ZodOptional<z.ZodString>;
|
|
825
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
826
|
+
kind: z.ZodLiteral<"entries">;
|
|
827
|
+
entry: z.ZodEnum<{
|
|
828
|
+
step: "step";
|
|
829
|
+
trigger: "trigger";
|
|
830
|
+
}>;
|
|
831
|
+
allow: z.ZodArray<z.ZodString>;
|
|
832
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
833
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
834
|
+
key: z.ZodString;
|
|
835
|
+
label: z.ZodString;
|
|
836
|
+
description: z.ZodOptional<z.ZodString>;
|
|
837
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
838
|
+
kind: z.ZodLiteral<"device">;
|
|
839
|
+
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
840
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
841
|
+
capability: z.ZodOptional<z.ZodString>;
|
|
842
|
+
role: z.ZodOptional<z.ZodString>;
|
|
843
|
+
}, z.core.$strip>>;
|
|
844
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
845
|
+
key: z.ZodString;
|
|
846
|
+
label: z.ZodString;
|
|
847
|
+
description: z.ZodOptional<z.ZodString>;
|
|
848
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
849
|
+
kind: z.ZodLiteral<"event">;
|
|
850
|
+
deviceInput: z.ZodString;
|
|
851
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
852
|
+
key: z.ZodString;
|
|
853
|
+
label: z.ZodString;
|
|
854
|
+
description: z.ZodOptional<z.ZodString>;
|
|
855
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
856
|
+
kind: z.ZodLiteral<"action">;
|
|
857
|
+
deviceInput: z.ZodOptional<z.ZodString>;
|
|
858
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
859
|
+
key: z.ZodString;
|
|
860
|
+
label: z.ZodString;
|
|
861
|
+
description: z.ZodOptional<z.ZodString>;
|
|
862
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
863
|
+
kind: z.ZodLiteral<"number">;
|
|
864
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
865
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
866
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
867
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
868
|
+
key: z.ZodString;
|
|
869
|
+
label: z.ZodString;
|
|
870
|
+
description: z.ZodOptional<z.ZodString>;
|
|
871
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
872
|
+
kind: z.ZodLiteral<"duration">;
|
|
873
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
874
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
875
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
876
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
877
|
+
key: z.ZodString;
|
|
878
|
+
label: z.ZodString;
|
|
879
|
+
description: z.ZodOptional<z.ZodString>;
|
|
880
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
881
|
+
kind: z.ZodLiteral<"text">;
|
|
882
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
883
|
+
default: z.ZodOptional<z.ZodString>;
|
|
884
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
885
|
+
key: z.ZodString;
|
|
886
|
+
label: z.ZodString;
|
|
887
|
+
description: z.ZodOptional<z.ZodString>;
|
|
888
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
889
|
+
kind: z.ZodLiteral<"select">;
|
|
890
|
+
options: z.ZodArray<z.ZodObject<{
|
|
891
|
+
value: z.ZodString;
|
|
892
|
+
label: z.ZodString;
|
|
893
|
+
}, z.core.$strip>>;
|
|
894
|
+
default: z.ZodOptional<z.ZodString>;
|
|
895
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
896
|
+
key: z.ZodString;
|
|
897
|
+
label: z.ZodString;
|
|
898
|
+
description: z.ZodOptional<z.ZodString>;
|
|
899
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
900
|
+
kind: z.ZodLiteral<"boolean">;
|
|
901
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
902
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
903
|
+
key: z.ZodString;
|
|
904
|
+
label: z.ZodString;
|
|
905
|
+
description: z.ZodOptional<z.ZodString>;
|
|
906
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
907
|
+
kind: z.ZodLiteral<"time-window">;
|
|
908
|
+
}, z.core.$strip>], "kind">>;
|
|
909
|
+
}, z.core.$strip>], "kind">>;
|
|
910
|
+
}, z.core.$strip>], "kind">;
|
|
911
|
+
export type TemplateInput = z.infer<typeof TemplateInputSchema>;
|
|
912
|
+
export type TemplateInputKind = TemplateInput['kind'];
|
|
913
|
+
export declare const TemplatePathSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
914
|
+
/** Keys and list indexes from the body (or a row item) root; empty is the root itself. */
|
|
915
|
+
export type TemplatePath = z.infer<typeof TemplatePathSchema>;
|
|
916
|
+
export declare const TemplateValueBindingSchema: z.ZodObject<{
|
|
917
|
+
kind: z.ZodLiteral<"value">;
|
|
918
|
+
input: z.ZodString;
|
|
919
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
920
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
921
|
+
}, z.core.$strip>;
|
|
922
|
+
export type TemplateValueBinding = z.infer<typeof TemplateValueBindingSchema>;
|
|
923
|
+
export declare const TemplateRowIdBindingSchema: z.ZodObject<{
|
|
924
|
+
kind: z.ZodLiteral<"row-id">;
|
|
925
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
926
|
+
}, z.core.$strip>;
|
|
927
|
+
/**
|
|
928
|
+
* Appends an `entries` input's elements, verbatim, to the list at `path`. In a
|
|
929
|
+
* row's bindings `input` is the row's own entries input and `path` is from the
|
|
930
|
+
* row's item; at the top level, with `in`, it appends the `input` entries of
|
|
931
|
+
* EVERY row of the group `in` (all buttons' triggers into one `when`), and
|
|
932
|
+
* without `in` it appends a top-level entries input.
|
|
933
|
+
*/
|
|
934
|
+
export declare const TemplateEntriesBindingSchema: z.ZodObject<{
|
|
935
|
+
kind: z.ZodLiteral<"entries">;
|
|
936
|
+
input: z.ZodString;
|
|
937
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
938
|
+
in: z.ZodOptional<z.ZodString>;
|
|
939
|
+
}, z.core.$strip>;
|
|
940
|
+
export type TemplateEntriesBinding = z.infer<typeof TemplateEntriesBindingSchema>;
|
|
941
|
+
/** What fills the item of a row that holds values only. */
|
|
942
|
+
export declare const TemplateLeafRowBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
943
|
+
kind: z.ZodLiteral<"value">;
|
|
944
|
+
input: z.ZodString;
|
|
945
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
946
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
947
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
948
|
+
kind: z.ZodLiteral<"row-id">;
|
|
949
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
950
|
+
}, z.core.$strip>], "kind">;
|
|
951
|
+
export type TemplateLeafRowBinding = z.infer<typeof TemplateLeafRowBindingSchema>;
|
|
952
|
+
/** The ids of a row's nested rows, as a list (a branch that reads every leaf of its row). */
|
|
953
|
+
export declare const TemplateRowIdsBindingSchema: z.ZodObject<{
|
|
954
|
+
kind: z.ZodLiteral<"row-ids">;
|
|
955
|
+
input: z.ZodString;
|
|
956
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
957
|
+
}, z.core.$strip>;
|
|
958
|
+
/** One copy of `item` per nested row, appended inside the parent row's item. */
|
|
959
|
+
export declare const TemplateNestedRowsBindingSchema: z.ZodObject<{
|
|
960
|
+
kind: z.ZodLiteral<"rows">;
|
|
961
|
+
input: z.ZodString;
|
|
962
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
963
|
+
item: z.ZodUnknown;
|
|
964
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
965
|
+
kind: z.ZodLiteral<"value">;
|
|
966
|
+
input: z.ZodString;
|
|
967
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
968
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
969
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
970
|
+
kind: z.ZodLiteral<"row-id">;
|
|
971
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
972
|
+
}, z.core.$strip>], "kind">>;
|
|
973
|
+
}, z.core.$strip>;
|
|
974
|
+
export type TemplateNestedRowsBinding = z.infer<typeof TemplateNestedRowsBindingSchema>;
|
|
975
|
+
export declare const TemplateRowItemBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
976
|
+
kind: z.ZodLiteral<"value">;
|
|
977
|
+
input: z.ZodString;
|
|
978
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
979
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
980
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
981
|
+
kind: z.ZodLiteral<"entries">;
|
|
982
|
+
input: z.ZodString;
|
|
983
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
984
|
+
in: z.ZodOptional<z.ZodString>;
|
|
985
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
986
|
+
kind: z.ZodLiteral<"row-id">;
|
|
987
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
988
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
989
|
+
kind: z.ZodLiteral<"row-ids">;
|
|
990
|
+
input: z.ZodString;
|
|
991
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
992
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
993
|
+
kind: z.ZodLiteral<"rows">;
|
|
994
|
+
input: z.ZodString;
|
|
995
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
996
|
+
item: z.ZodUnknown;
|
|
997
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
998
|
+
kind: z.ZodLiteral<"value">;
|
|
999
|
+
input: z.ZodString;
|
|
1000
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1001
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1002
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1003
|
+
kind: z.ZodLiteral<"row-id">;
|
|
1004
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1005
|
+
}, z.core.$strip>], "kind">>;
|
|
1006
|
+
}, z.core.$strip>], "kind">;
|
|
1007
|
+
export type TemplateRowItemBinding = z.infer<typeof TemplateRowItemBindingSchema>;
|
|
1008
|
+
export declare const TemplateRowsBindingSchema: z.ZodObject<{
|
|
1009
|
+
kind: z.ZodLiteral<"rows">;
|
|
1010
|
+
input: z.ZodString;
|
|
1011
|
+
nested: z.ZodOptional<z.ZodString>;
|
|
1012
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1013
|
+
item: z.ZodUnknown;
|
|
1014
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1015
|
+
kind: z.ZodLiteral<"value">;
|
|
1016
|
+
input: z.ZodString;
|
|
1017
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1018
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1019
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1020
|
+
kind: z.ZodLiteral<"entries">;
|
|
1021
|
+
input: z.ZodString;
|
|
1022
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1023
|
+
in: z.ZodOptional<z.ZodString>;
|
|
1024
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1025
|
+
kind: z.ZodLiteral<"row-id">;
|
|
1026
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1027
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1028
|
+
kind: z.ZodLiteral<"row-ids">;
|
|
1029
|
+
input: z.ZodString;
|
|
1030
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1031
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1032
|
+
kind: z.ZodLiteral<"rows">;
|
|
1033
|
+
input: z.ZodString;
|
|
1034
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1035
|
+
item: z.ZodUnknown;
|
|
1036
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1037
|
+
kind: z.ZodLiteral<"value">;
|
|
1038
|
+
input: z.ZodString;
|
|
1039
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1040
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1041
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1042
|
+
kind: z.ZodLiteral<"row-id">;
|
|
1043
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1044
|
+
}, z.core.$strip>], "kind">>;
|
|
1045
|
+
}, z.core.$strip>], "kind">>;
|
|
1046
|
+
}, z.core.$strip>;
|
|
1047
|
+
export type TemplateRowsBinding = z.infer<typeof TemplateRowsBindingSchema>;
|
|
1048
|
+
/** Wraps the condition tree at `path` as `all[time-is, <tree>]` when the input has a value. */
|
|
1049
|
+
export declare const TemplateGateBindingSchema: z.ZodObject<{
|
|
1050
|
+
kind: z.ZodLiteral<"gate">;
|
|
1051
|
+
input: z.ZodString;
|
|
1052
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1053
|
+
}, z.core.$strip>;
|
|
1054
|
+
export type TemplateGateBinding = z.infer<typeof TemplateGateBindingSchema>;
|
|
1055
|
+
export declare const TemplateBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1056
|
+
kind: z.ZodLiteral<"value">;
|
|
1057
|
+
input: z.ZodString;
|
|
1058
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1059
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1060
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1061
|
+
kind: z.ZodLiteral<"entries">;
|
|
1062
|
+
input: z.ZodString;
|
|
1063
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1064
|
+
in: z.ZodOptional<z.ZodString>;
|
|
1065
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1066
|
+
kind: z.ZodLiteral<"rows">;
|
|
1067
|
+
input: z.ZodString;
|
|
1068
|
+
nested: z.ZodOptional<z.ZodString>;
|
|
1069
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1070
|
+
item: z.ZodUnknown;
|
|
1071
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1072
|
+
kind: z.ZodLiteral<"value">;
|
|
1073
|
+
input: z.ZodString;
|
|
1074
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1075
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1076
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1077
|
+
kind: z.ZodLiteral<"entries">;
|
|
1078
|
+
input: z.ZodString;
|
|
1079
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1080
|
+
in: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1082
|
+
kind: z.ZodLiteral<"row-id">;
|
|
1083
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1084
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1085
|
+
kind: z.ZodLiteral<"row-ids">;
|
|
1086
|
+
input: z.ZodString;
|
|
1087
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1088
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1089
|
+
kind: z.ZodLiteral<"rows">;
|
|
1090
|
+
input: z.ZodString;
|
|
1091
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1092
|
+
item: z.ZodUnknown;
|
|
1093
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1094
|
+
kind: z.ZodLiteral<"value">;
|
|
1095
|
+
input: z.ZodString;
|
|
1096
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1097
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1098
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1099
|
+
kind: z.ZodLiteral<"row-id">;
|
|
1100
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1101
|
+
}, z.core.$strip>], "kind">>;
|
|
1102
|
+
}, z.core.$strip>], "kind">>;
|
|
1103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1104
|
+
kind: z.ZodLiteral<"gate">;
|
|
1105
|
+
input: z.ZodString;
|
|
1106
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1107
|
+
}, z.core.$strip>], "kind">;
|
|
1108
|
+
export type TemplateBinding = z.infer<typeof TemplateBindingSchema>;
|
|
1109
|
+
export declare const AUTOMATION_TEMPLATE_VERSION = 1;
|
|
1110
|
+
export declare const AutomationTemplatePayloadSchema: z.ZodObject<{
|
|
1111
|
+
version: z.ZodLiteral<1>;
|
|
1112
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1113
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1114
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1115
|
+
key: z.ZodString;
|
|
1116
|
+
label: z.ZodString;
|
|
1117
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1118
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1119
|
+
kind: z.ZodLiteral<"entries">;
|
|
1120
|
+
entry: z.ZodEnum<{
|
|
1121
|
+
step: "step";
|
|
1122
|
+
trigger: "trigger";
|
|
1123
|
+
}>;
|
|
1124
|
+
allow: z.ZodArray<z.ZodString>;
|
|
1125
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1127
|
+
key: z.ZodString;
|
|
1128
|
+
label: z.ZodString;
|
|
1129
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1131
|
+
kind: z.ZodLiteral<"device">;
|
|
1132
|
+
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1133
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
1134
|
+
capability: z.ZodOptional<z.ZodString>;
|
|
1135
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1136
|
+
}, z.core.$strip>>;
|
|
1137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1138
|
+
key: z.ZodString;
|
|
1139
|
+
label: z.ZodString;
|
|
1140
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1141
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1142
|
+
kind: z.ZodLiteral<"event">;
|
|
1143
|
+
deviceInput: z.ZodString;
|
|
1144
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1145
|
+
key: z.ZodString;
|
|
1146
|
+
label: z.ZodString;
|
|
1147
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1148
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1149
|
+
kind: z.ZodLiteral<"action">;
|
|
1150
|
+
deviceInput: z.ZodOptional<z.ZodString>;
|
|
1151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1152
|
+
key: z.ZodString;
|
|
1153
|
+
label: z.ZodString;
|
|
1154
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1155
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1156
|
+
kind: z.ZodLiteral<"number">;
|
|
1157
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1158
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1159
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1161
|
+
key: z.ZodString;
|
|
1162
|
+
label: z.ZodString;
|
|
1163
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1164
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1165
|
+
kind: z.ZodLiteral<"duration">;
|
|
1166
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1167
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1168
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1169
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1170
|
+
key: z.ZodString;
|
|
1171
|
+
label: z.ZodString;
|
|
1172
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1173
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1174
|
+
kind: z.ZodLiteral<"text">;
|
|
1175
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1176
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1178
|
+
key: z.ZodString;
|
|
1179
|
+
label: z.ZodString;
|
|
1180
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1181
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1182
|
+
kind: z.ZodLiteral<"select">;
|
|
1183
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1184
|
+
value: z.ZodString;
|
|
1185
|
+
label: z.ZodString;
|
|
1186
|
+
}, z.core.$strip>>;
|
|
1187
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1188
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1189
|
+
key: z.ZodString;
|
|
1190
|
+
label: z.ZodString;
|
|
1191
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1192
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1193
|
+
kind: z.ZodLiteral<"boolean">;
|
|
1194
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
1195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1196
|
+
key: z.ZodString;
|
|
1197
|
+
label: z.ZodString;
|
|
1198
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1199
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1200
|
+
kind: z.ZodLiteral<"time-window">;
|
|
1201
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1202
|
+
key: z.ZodString;
|
|
1203
|
+
label: z.ZodString;
|
|
1204
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1205
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1206
|
+
kind: z.ZodLiteral<"group">;
|
|
1207
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
1208
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
1209
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
1210
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1211
|
+
key: z.ZodString;
|
|
1212
|
+
label: z.ZodString;
|
|
1213
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1214
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1215
|
+
kind: z.ZodLiteral<"entries">;
|
|
1216
|
+
entry: z.ZodEnum<{
|
|
1217
|
+
step: "step";
|
|
1218
|
+
trigger: "trigger";
|
|
1219
|
+
}>;
|
|
1220
|
+
allow: z.ZodArray<z.ZodString>;
|
|
1221
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1222
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1223
|
+
key: z.ZodString;
|
|
1224
|
+
label: z.ZodString;
|
|
1225
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1226
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1227
|
+
kind: z.ZodLiteral<"device">;
|
|
1228
|
+
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1229
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
1230
|
+
capability: z.ZodOptional<z.ZodString>;
|
|
1231
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1232
|
+
}, z.core.$strip>>;
|
|
1233
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1234
|
+
key: z.ZodString;
|
|
1235
|
+
label: z.ZodString;
|
|
1236
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1237
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1238
|
+
kind: z.ZodLiteral<"event">;
|
|
1239
|
+
deviceInput: z.ZodString;
|
|
1240
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1241
|
+
key: z.ZodString;
|
|
1242
|
+
label: z.ZodString;
|
|
1243
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1244
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1245
|
+
kind: z.ZodLiteral<"action">;
|
|
1246
|
+
deviceInput: z.ZodOptional<z.ZodString>;
|
|
1247
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1248
|
+
key: z.ZodString;
|
|
1249
|
+
label: z.ZodString;
|
|
1250
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1251
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1252
|
+
kind: z.ZodLiteral<"number">;
|
|
1253
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1254
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1255
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1257
|
+
key: z.ZodString;
|
|
1258
|
+
label: z.ZodString;
|
|
1259
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1260
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1261
|
+
kind: z.ZodLiteral<"duration">;
|
|
1262
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1263
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1264
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1265
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1266
|
+
key: z.ZodString;
|
|
1267
|
+
label: z.ZodString;
|
|
1268
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1269
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1270
|
+
kind: z.ZodLiteral<"text">;
|
|
1271
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1272
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1273
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1274
|
+
key: z.ZodString;
|
|
1275
|
+
label: z.ZodString;
|
|
1276
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1277
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1278
|
+
kind: z.ZodLiteral<"select">;
|
|
1279
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1280
|
+
value: z.ZodString;
|
|
1281
|
+
label: z.ZodString;
|
|
1282
|
+
}, z.core.$strip>>;
|
|
1283
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1284
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1285
|
+
key: z.ZodString;
|
|
1286
|
+
label: z.ZodString;
|
|
1287
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1288
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1289
|
+
kind: z.ZodLiteral<"boolean">;
|
|
1290
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
1291
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1292
|
+
key: z.ZodString;
|
|
1293
|
+
label: z.ZodString;
|
|
1294
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1295
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1296
|
+
kind: z.ZodLiteral<"time-window">;
|
|
1297
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1298
|
+
key: z.ZodString;
|
|
1299
|
+
label: z.ZodString;
|
|
1300
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1301
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1302
|
+
kind: z.ZodLiteral<"group">;
|
|
1303
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
1304
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
1305
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
1306
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1307
|
+
key: z.ZodString;
|
|
1308
|
+
label: z.ZodString;
|
|
1309
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1310
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1311
|
+
kind: z.ZodLiteral<"entries">;
|
|
1312
|
+
entry: z.ZodEnum<{
|
|
1313
|
+
step: "step";
|
|
1314
|
+
trigger: "trigger";
|
|
1315
|
+
}>;
|
|
1316
|
+
allow: z.ZodArray<z.ZodString>;
|
|
1317
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1318
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1319
|
+
key: z.ZodString;
|
|
1320
|
+
label: z.ZodString;
|
|
1321
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1322
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1323
|
+
kind: z.ZodLiteral<"device">;
|
|
1324
|
+
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1325
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
1326
|
+
capability: z.ZodOptional<z.ZodString>;
|
|
1327
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1328
|
+
}, z.core.$strip>>;
|
|
1329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1330
|
+
key: z.ZodString;
|
|
1331
|
+
label: z.ZodString;
|
|
1332
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1333
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1334
|
+
kind: z.ZodLiteral<"event">;
|
|
1335
|
+
deviceInput: z.ZodString;
|
|
1336
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1337
|
+
key: z.ZodString;
|
|
1338
|
+
label: z.ZodString;
|
|
1339
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1340
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1341
|
+
kind: z.ZodLiteral<"action">;
|
|
1342
|
+
deviceInput: z.ZodOptional<z.ZodString>;
|
|
1343
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1344
|
+
key: z.ZodString;
|
|
1345
|
+
label: z.ZodString;
|
|
1346
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1347
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1348
|
+
kind: z.ZodLiteral<"number">;
|
|
1349
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1350
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1351
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1352
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1353
|
+
key: z.ZodString;
|
|
1354
|
+
label: z.ZodString;
|
|
1355
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1356
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1357
|
+
kind: z.ZodLiteral<"duration">;
|
|
1358
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1359
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1360
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1361
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1362
|
+
key: z.ZodString;
|
|
1363
|
+
label: z.ZodString;
|
|
1364
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1365
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1366
|
+
kind: z.ZodLiteral<"text">;
|
|
1367
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1368
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1369
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1370
|
+
key: z.ZodString;
|
|
1371
|
+
label: z.ZodString;
|
|
1372
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1373
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1374
|
+
kind: z.ZodLiteral<"select">;
|
|
1375
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1376
|
+
value: z.ZodString;
|
|
1377
|
+
label: z.ZodString;
|
|
1378
|
+
}, z.core.$strip>>;
|
|
1379
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1380
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1381
|
+
key: z.ZodString;
|
|
1382
|
+
label: z.ZodString;
|
|
1383
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1384
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1385
|
+
kind: z.ZodLiteral<"boolean">;
|
|
1386
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
1387
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1388
|
+
key: z.ZodString;
|
|
1389
|
+
label: z.ZodString;
|
|
1390
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1391
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1392
|
+
kind: z.ZodLiteral<"time-window">;
|
|
1393
|
+
}, z.core.$strip>], "kind">>;
|
|
1394
|
+
}, z.core.$strip>], "kind">>;
|
|
1395
|
+
}, z.core.$strip>], "kind">>;
|
|
1396
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1397
|
+
kind: z.ZodLiteral<"value">;
|
|
1398
|
+
input: z.ZodString;
|
|
1399
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1400
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1401
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1402
|
+
kind: z.ZodLiteral<"entries">;
|
|
1403
|
+
input: z.ZodString;
|
|
1404
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1405
|
+
in: z.ZodOptional<z.ZodString>;
|
|
1406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1407
|
+
kind: z.ZodLiteral<"rows">;
|
|
1408
|
+
input: z.ZodString;
|
|
1409
|
+
nested: z.ZodOptional<z.ZodString>;
|
|
1410
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1411
|
+
item: z.ZodUnknown;
|
|
1412
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1413
|
+
kind: z.ZodLiteral<"value">;
|
|
1414
|
+
input: z.ZodString;
|
|
1415
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1416
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1417
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1418
|
+
kind: z.ZodLiteral<"entries">;
|
|
1419
|
+
input: z.ZodString;
|
|
1420
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1421
|
+
in: z.ZodOptional<z.ZodString>;
|
|
1422
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1423
|
+
kind: z.ZodLiteral<"row-id">;
|
|
1424
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1425
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1426
|
+
kind: z.ZodLiteral<"row-ids">;
|
|
1427
|
+
input: z.ZodString;
|
|
1428
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1429
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1430
|
+
kind: z.ZodLiteral<"rows">;
|
|
1431
|
+
input: z.ZodString;
|
|
1432
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1433
|
+
item: z.ZodUnknown;
|
|
1434
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1435
|
+
kind: z.ZodLiteral<"value">;
|
|
1436
|
+
input: z.ZodString;
|
|
1437
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1438
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1439
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1440
|
+
kind: z.ZodLiteral<"row-id">;
|
|
1441
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1442
|
+
}, z.core.$strip>], "kind">>;
|
|
1443
|
+
}, z.core.$strip>], "kind">>;
|
|
1444
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1445
|
+
kind: z.ZodLiteral<"gate">;
|
|
1446
|
+
input: z.ZodString;
|
|
1447
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1448
|
+
}, z.core.$strip>], "kind">>;
|
|
1449
|
+
}, z.core.$strip>;
|
|
1450
|
+
export type AutomationTemplatePayload = z.infer<typeof AutomationTemplatePayloadSchema>;
|
|
1451
|
+
export type AutomationTemplateExpansion = {
|
|
1452
|
+
readonly ok: true;
|
|
1453
|
+
readonly recipe: AutomationRecipe;
|
|
1454
|
+
} | {
|
|
1455
|
+
readonly ok: false;
|
|
1456
|
+
readonly problems: readonly TemplateInstanceProblem[];
|
|
1457
|
+
};
|
|
1458
|
+
/** The body with the values written in, as a recipe — or every reason it is not one. */
|
|
1459
|
+
export declare function expandAutomationTemplate(payload: AutomationTemplatePayload, values: TemplateInputValues): AutomationTemplateExpansion;
|
|
1460
|
+
/** A new instance: the expansion, linked to its template. */
|
|
1461
|
+
export declare function instantiateAutomationTemplate(templateId: string, payload: AutomationTemplatePayload, values: TemplateInputValues): AutomationTemplateExpansion;
|
|
1462
|
+
export interface AutomationInstanceReexpansion {
|
|
1463
|
+
readonly recipe: AutomationRecipe;
|
|
1464
|
+
/** True when the values no longer fit and the previous body was kept. */
|
|
1465
|
+
readonly flagged: boolean;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* An instance after its template changed (or vanished, `payload === null`):
|
|
1469
|
+
* re-expanded when its values still fit, otherwise its previous body kept and
|
|
1470
|
+
* the link flagged with the problems. Never dropped.
|
|
1471
|
+
*/
|
|
1472
|
+
export declare function reexpandAutomationInstance(payload: AutomationTemplatePayload | null, current: AutomationRecipe): AutomationInstanceReexpansion;
|
|
1473
|
+
/** "Convert to a free automation": the expansion as it is, without the link. */
|
|
1474
|
+
export declare function detachAutomationInstance(recipe: AutomationRecipe): AutomationRecipe;
|
|
1475
|
+
export declare const AUTOMATION_TEMPLATE_EXPORT_FORMAT = "camstack.automation-template";
|
|
1476
|
+
export declare const AutomationTemplateExportSchema: z.ZodObject<{
|
|
1477
|
+
format: z.ZodLiteral<"camstack.automation-template">;
|
|
1478
|
+
version: z.ZodLiteral<1>;
|
|
1479
|
+
name: z.ZodString;
|
|
1480
|
+
payload: z.ZodObject<{
|
|
1481
|
+
version: z.ZodLiteral<1>;
|
|
1482
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1483
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1484
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1485
|
+
key: z.ZodString;
|
|
1486
|
+
label: z.ZodString;
|
|
1487
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1488
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1489
|
+
kind: z.ZodLiteral<"entries">;
|
|
1490
|
+
entry: z.ZodEnum<{
|
|
1491
|
+
step: "step";
|
|
1492
|
+
trigger: "trigger";
|
|
1493
|
+
}>;
|
|
1494
|
+
allow: z.ZodArray<z.ZodString>;
|
|
1495
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1496
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1497
|
+
key: z.ZodString;
|
|
1498
|
+
label: z.ZodString;
|
|
1499
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1500
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1501
|
+
kind: z.ZodLiteral<"device">;
|
|
1502
|
+
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1503
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
1504
|
+
capability: z.ZodOptional<z.ZodString>;
|
|
1505
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
}, z.core.$strip>>;
|
|
1507
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1508
|
+
key: z.ZodString;
|
|
1509
|
+
label: z.ZodString;
|
|
1510
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1511
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1512
|
+
kind: z.ZodLiteral<"event">;
|
|
1513
|
+
deviceInput: z.ZodString;
|
|
1514
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1515
|
+
key: z.ZodString;
|
|
1516
|
+
label: z.ZodString;
|
|
1517
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1518
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1519
|
+
kind: z.ZodLiteral<"action">;
|
|
1520
|
+
deviceInput: z.ZodOptional<z.ZodString>;
|
|
1521
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1522
|
+
key: z.ZodString;
|
|
1523
|
+
label: z.ZodString;
|
|
1524
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1525
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1526
|
+
kind: z.ZodLiteral<"number">;
|
|
1527
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1528
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1529
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1530
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1531
|
+
key: z.ZodString;
|
|
1532
|
+
label: z.ZodString;
|
|
1533
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1534
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1535
|
+
kind: z.ZodLiteral<"duration">;
|
|
1536
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1537
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1538
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1539
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1540
|
+
key: z.ZodString;
|
|
1541
|
+
label: z.ZodString;
|
|
1542
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1543
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1544
|
+
kind: z.ZodLiteral<"text">;
|
|
1545
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1546
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1547
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1548
|
+
key: z.ZodString;
|
|
1549
|
+
label: z.ZodString;
|
|
1550
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1551
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1552
|
+
kind: z.ZodLiteral<"select">;
|
|
1553
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1554
|
+
value: z.ZodString;
|
|
1555
|
+
label: z.ZodString;
|
|
670
1556
|
}, z.core.$strip>>;
|
|
671
1557
|
default: z.ZodOptional<z.ZodString>;
|
|
672
1558
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -676,13 +1562,34 @@ export declare const AutomationTemplateExportSchema: z.ZodObject<{
|
|
|
676
1562
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
677
1563
|
kind: z.ZodLiteral<"boolean">;
|
|
678
1564
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
1565
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1566
|
+
key: z.ZodString;
|
|
1567
|
+
label: z.ZodString;
|
|
1568
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1569
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1570
|
+
kind: z.ZodLiteral<"time-window">;
|
|
679
1571
|
}, z.core.$strip>, z.ZodObject<{
|
|
680
1572
|
key: z.ZodString;
|
|
681
1573
|
label: z.ZodString;
|
|
682
1574
|
description: z.ZodOptional<z.ZodString>;
|
|
683
1575
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
684
1576
|
kind: z.ZodLiteral<"group">;
|
|
1577
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
1578
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
1579
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
685
1580
|
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1581
|
+
key: z.ZodString;
|
|
1582
|
+
label: z.ZodString;
|
|
1583
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1584
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1585
|
+
kind: z.ZodLiteral<"entries">;
|
|
1586
|
+
entry: z.ZodEnum<{
|
|
1587
|
+
step: "step";
|
|
1588
|
+
trigger: "trigger";
|
|
1589
|
+
}>;
|
|
1590
|
+
allow: z.ZodArray<z.ZodString>;
|
|
1591
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1592
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
686
1593
|
key: z.ZodString;
|
|
687
1594
|
label: z.ZodString;
|
|
688
1595
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -751,18 +1658,125 @@ export declare const AutomationTemplateExportSchema: z.ZodObject<{
|
|
|
751
1658
|
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
752
1659
|
kind: z.ZodLiteral<"boolean">;
|
|
753
1660
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
1661
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1662
|
+
key: z.ZodString;
|
|
1663
|
+
label: z.ZodString;
|
|
1664
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1665
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1666
|
+
kind: z.ZodLiteral<"time-window">;
|
|
1667
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1668
|
+
key: z.ZodString;
|
|
1669
|
+
label: z.ZodString;
|
|
1670
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1671
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1672
|
+
kind: z.ZodLiteral<"group">;
|
|
1673
|
+
rowLabel: z.ZodOptional<z.ZodString>;
|
|
1674
|
+
minRows: z.ZodOptional<z.ZodNumber>;
|
|
1675
|
+
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
1676
|
+
inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1677
|
+
key: z.ZodString;
|
|
1678
|
+
label: z.ZodString;
|
|
1679
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1680
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1681
|
+
kind: z.ZodLiteral<"entries">;
|
|
1682
|
+
entry: z.ZodEnum<{
|
|
1683
|
+
step: "step";
|
|
1684
|
+
trigger: "trigger";
|
|
1685
|
+
}>;
|
|
1686
|
+
allow: z.ZodArray<z.ZodString>;
|
|
1687
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1688
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1689
|
+
key: z.ZodString;
|
|
1690
|
+
label: z.ZodString;
|
|
1691
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1692
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1693
|
+
kind: z.ZodLiteral<"device">;
|
|
1694
|
+
multiple: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1695
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
1696
|
+
capability: z.ZodOptional<z.ZodString>;
|
|
1697
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1698
|
+
}, z.core.$strip>>;
|
|
1699
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1700
|
+
key: z.ZodString;
|
|
1701
|
+
label: z.ZodString;
|
|
1702
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1703
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1704
|
+
kind: z.ZodLiteral<"event">;
|
|
1705
|
+
deviceInput: z.ZodString;
|
|
1706
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1707
|
+
key: z.ZodString;
|
|
1708
|
+
label: z.ZodString;
|
|
1709
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1710
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1711
|
+
kind: z.ZodLiteral<"action">;
|
|
1712
|
+
deviceInput: z.ZodOptional<z.ZodString>;
|
|
1713
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1714
|
+
key: z.ZodString;
|
|
1715
|
+
label: z.ZodString;
|
|
1716
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1717
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1718
|
+
kind: z.ZodLiteral<"number">;
|
|
1719
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1720
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1721
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1722
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1723
|
+
key: z.ZodString;
|
|
1724
|
+
label: z.ZodString;
|
|
1725
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1726
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1727
|
+
kind: z.ZodLiteral<"duration">;
|
|
1728
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1729
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1730
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
1731
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1732
|
+
key: z.ZodString;
|
|
1733
|
+
label: z.ZodString;
|
|
1734
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1735
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1736
|
+
kind: z.ZodLiteral<"text">;
|
|
1737
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1738
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1739
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1740
|
+
key: z.ZodString;
|
|
1741
|
+
label: z.ZodString;
|
|
1742
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1743
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1744
|
+
kind: z.ZodLiteral<"select">;
|
|
1745
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1746
|
+
value: z.ZodString;
|
|
1747
|
+
label: z.ZodString;
|
|
1748
|
+
}, z.core.$strip>>;
|
|
1749
|
+
default: z.ZodOptional<z.ZodString>;
|
|
1750
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1751
|
+
key: z.ZodString;
|
|
1752
|
+
label: z.ZodString;
|
|
1753
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1754
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1755
|
+
kind: z.ZodLiteral<"boolean">;
|
|
1756
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
1757
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1758
|
+
key: z.ZodString;
|
|
1759
|
+
label: z.ZodString;
|
|
1760
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1761
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1762
|
+
kind: z.ZodLiteral<"time-window">;
|
|
1763
|
+
}, z.core.$strip>], "kind">>;
|
|
754
1764
|
}, z.core.$strip>], "kind">>;
|
|
755
|
-
minRows: z.ZodOptional<z.ZodNumber>;
|
|
756
|
-
maxRows: z.ZodOptional<z.ZodNumber>;
|
|
757
1765
|
}, z.core.$strip>], "kind">>;
|
|
758
1766
|
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
759
1767
|
kind: z.ZodLiteral<"value">;
|
|
760
1768
|
input: z.ZodString;
|
|
761
1769
|
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
762
1770
|
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1771
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1772
|
+
kind: z.ZodLiteral<"entries">;
|
|
1773
|
+
input: z.ZodString;
|
|
1774
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1775
|
+
in: z.ZodOptional<z.ZodString>;
|
|
763
1776
|
}, z.core.$strip>, z.ZodObject<{
|
|
764
1777
|
kind: z.ZodLiteral<"rows">;
|
|
765
1778
|
input: z.ZodString;
|
|
1779
|
+
nested: z.ZodOptional<z.ZodString>;
|
|
766
1780
|
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
767
1781
|
item: z.ZodUnknown;
|
|
768
1782
|
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -770,10 +1784,37 @@ export declare const AutomationTemplateExportSchema: z.ZodObject<{
|
|
|
770
1784
|
input: z.ZodString;
|
|
771
1785
|
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
772
1786
|
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1787
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1788
|
+
kind: z.ZodLiteral<"entries">;
|
|
1789
|
+
input: z.ZodString;
|
|
1790
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1791
|
+
in: z.ZodOptional<z.ZodString>;
|
|
773
1792
|
}, z.core.$strip>, z.ZodObject<{
|
|
774
1793
|
kind: z.ZodLiteral<"row-id">;
|
|
775
1794
|
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1795
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1796
|
+
kind: z.ZodLiteral<"row-ids">;
|
|
1797
|
+
input: z.ZodString;
|
|
1798
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1799
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1800
|
+
kind: z.ZodLiteral<"rows">;
|
|
1801
|
+
input: z.ZodString;
|
|
1802
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1803
|
+
item: z.ZodUnknown;
|
|
1804
|
+
bindings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1805
|
+
kind: z.ZodLiteral<"value">;
|
|
1806
|
+
input: z.ZodString;
|
|
1807
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1808
|
+
as: z.ZodOptional<z.ZodLiteral<"target">>;
|
|
1809
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1810
|
+
kind: z.ZodLiteral<"row-id">;
|
|
1811
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1812
|
+
}, z.core.$strip>], "kind">>;
|
|
776
1813
|
}, z.core.$strip>], "kind">>;
|
|
1814
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1815
|
+
kind: z.ZodLiteral<"gate">;
|
|
1816
|
+
input: z.ZodString;
|
|
1817
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
777
1818
|
}, z.core.$strip>], "kind">>;
|
|
778
1819
|
}, z.core.$strip>;
|
|
779
1820
|
}, z.core.$strip>;
|