@camstack/types 1.2.451 → 1.2.453
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 +21 -0
- package/dist/addon/base-addon.d.ts +27 -0
- package/dist/addon.js +8 -3
- package/dist/addon.mjs +8 -3
- package/dist/automation/condition-eval.d.ts +20 -5
- package/dist/automation/detection-subject.d.ts +154 -0
- package/dist/automation/detection-trigger.d.ts +16 -6
- package/dist/automation/index.d.ts +10 -4
- package/dist/automation/legacy-recipe.d.ts +130 -0
- package/dist/automation/normalize-units.d.ts +4 -3
- package/dist/automation/recipe.d.ts +286 -142
- package/dist/automation/stationary-trigger.d.ts +4 -4
- package/dist/automation/step-runner.d.ts +3 -1
- package/dist/automation/trace.d.ts +51 -6
- package/dist/automation/when.d.ts +295 -0
- package/dist/capabilities/actions.cap.d.ts +10 -0
- package/dist/capabilities/addon-settings.cap.d.ts +18 -0
- package/dist/capabilities/core-blocks.cap.d.ts +2546 -51
- package/dist/capabilities/device-discovery.cap.d.ts +2 -0
- package/dist/capabilities/device-manager.cap.d.ts +16 -1
- package/dist/capabilities/device-provider.cap.d.ts +165 -0
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/integrations.cap.d.ts +1 -0
- package/dist/capabilities/keychain.cap.d.ts +12 -0
- package/dist/capabilities/local-network.cap.d.ts +198 -0
- package/dist/capabilities/storage-admin.cap.d.ts +155 -0
- package/dist/capabilities/terminal-session.cap.d.ts +7 -0
- package/dist/client.js +8 -1
- package/dist/client.mjs +8 -1
- package/dist/device/base-device-provider.d.ts +17 -0
- package/dist/generated/addon-api.d.ts +84 -0
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1969 -706
- package/dist/index.mjs +1934 -703
- package/dist/interfaces/addon.d.ts +16 -0
- package/dist/interfaces/config-ui-secrets.d.ts +5 -3
- package/dist/interfaces/config-ui.d.ts +34 -1
- package/dist/{sleep-BSPhInRm.js → sleep-CewR0zRz.js} +125 -6
- package/dist/{sleep-63gM_1JR.mjs → sleep-CeyhrcOk.mjs} +125 -6
- package/dist/vendor-login-proxy/cookie-jar.d.ts +30 -0
- package/dist/vendor-login-proxy/index.d.ts +1 -0
- package/dist/vendor-login-proxy/login-proxy.d.ts +6 -0
- package/dist/vendor-login-proxy/url-rewrite.d.ts +9 -2
- package/package.json +1 -1
|
@@ -138,7 +138,44 @@ export declare const CoreBlockSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
138
138
|
kind: z.ZodLiteral<"code">;
|
|
139
139
|
}, z.core.$strip>, z.ZodObject<{
|
|
140
140
|
kind: z.ZodLiteral<"recipe">;
|
|
141
|
-
recipe: z.ZodObject<{
|
|
141
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
142
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
143
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
144
|
+
kind: z.ZodLiteral<"wait">;
|
|
145
|
+
seconds: z.ZodNumber;
|
|
146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
kind: z.ZodLiteral<"cap">;
|
|
148
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
149
|
+
$var: z.ZodString;
|
|
150
|
+
}, z.core.$strip>]>;
|
|
151
|
+
cap: z.ZodString;
|
|
152
|
+
method: z.ZodString;
|
|
153
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
154
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
155
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
+
kind: z.ZodLiteral<"action">;
|
|
157
|
+
actionId: z.ZodString;
|
|
158
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
kind: z.ZodLiteral<"code">;
|
|
161
|
+
code: z.ZodString;
|
|
162
|
+
}, z.core.$strip>], "kind">>;
|
|
163
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
164
|
+
mode: z.ZodLiteral<"single">;
|
|
165
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
166
|
+
mode: z.ZodLiteral<"restart">;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
mode: z.ZodLiteral<"queued">;
|
|
169
|
+
max: z.ZodNumber;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
mode: z.ZodLiteral<"parallel">;
|
|
172
|
+
max: z.ZodNumber;
|
|
173
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
174
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
175
|
+
minutes: z.ZodNumber;
|
|
176
|
+
}, z.core.$strip>], "mode">>;
|
|
177
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
142
179
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
143
180
|
kind: z.ZodLiteral<"device-state">;
|
|
144
181
|
deviceId: z.ZodNumber;
|
|
@@ -176,7 +213,7 @@ export declare const CoreBlockSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
176
213
|
kind: z.ZodLiteral<"interval">;
|
|
177
214
|
minutes: z.ZodNumber;
|
|
178
215
|
}, z.core.$strip>], "kind">>;
|
|
179
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
216
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
180
217
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
181
218
|
kind: z.ZodLiteral<"wait">;
|
|
182
219
|
seconds: z.ZodNumber;
|
|
@@ -212,7 +249,115 @@ export declare const CoreBlockSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
212
249
|
minutes: z.ZodNumber;
|
|
213
250
|
}, z.core.$strip>], "mode">>;
|
|
214
251
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
215
|
-
}, z.core.$strip
|
|
252
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
253
|
+
when: import("../index.js").AutomationWhen;
|
|
254
|
+
actions: ({
|
|
255
|
+
kind: "cap";
|
|
256
|
+
deviceId: number | number[] | {
|
|
257
|
+
$var: string;
|
|
258
|
+
};
|
|
259
|
+
cap: string;
|
|
260
|
+
method: string;
|
|
261
|
+
args?: Record<string, unknown> | undefined;
|
|
262
|
+
argUnits?: Record<string, string> | undefined;
|
|
263
|
+
} | {
|
|
264
|
+
kind: "wait";
|
|
265
|
+
seconds: number;
|
|
266
|
+
} | {
|
|
267
|
+
kind: "action";
|
|
268
|
+
actionId: string;
|
|
269
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
270
|
+
} | {
|
|
271
|
+
kind: "code";
|
|
272
|
+
code: string;
|
|
273
|
+
})[];
|
|
274
|
+
runMode?: {
|
|
275
|
+
mode: "single";
|
|
276
|
+
} | {
|
|
277
|
+
mode: "restart";
|
|
278
|
+
} | {
|
|
279
|
+
mode: "queued";
|
|
280
|
+
max: number;
|
|
281
|
+
} | {
|
|
282
|
+
mode: "parallel";
|
|
283
|
+
max: number;
|
|
284
|
+
} | {
|
|
285
|
+
mode: "cooldown";
|
|
286
|
+
minutes: number;
|
|
287
|
+
} | undefined;
|
|
288
|
+
keepTraces?: number | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
triggers: ({
|
|
291
|
+
kind: "device-state";
|
|
292
|
+
deviceId: number;
|
|
293
|
+
cap: string;
|
|
294
|
+
fieldPath: string;
|
|
295
|
+
becomes?: string | number | boolean | undefined;
|
|
296
|
+
edge?: boolean | undefined;
|
|
297
|
+
forMs?: number | undefined;
|
|
298
|
+
debounceMs?: number | undefined;
|
|
299
|
+
} | {
|
|
300
|
+
kind: "device-event";
|
|
301
|
+
category: string;
|
|
302
|
+
deviceId?: number | undefined;
|
|
303
|
+
} | {
|
|
304
|
+
kind: "schedule";
|
|
305
|
+
cron: string;
|
|
306
|
+
} | {
|
|
307
|
+
kind: "manual";
|
|
308
|
+
} | {
|
|
309
|
+
kind: "detection";
|
|
310
|
+
classes: string[];
|
|
311
|
+
deviceIds: number[];
|
|
312
|
+
zones?: string[] | undefined;
|
|
313
|
+
minScore?: number | undefined;
|
|
314
|
+
} | {
|
|
315
|
+
kind: "stationary";
|
|
316
|
+
deviceIds: number[];
|
|
317
|
+
classes?: string[] | undefined;
|
|
318
|
+
zones?: string[] | undefined;
|
|
319
|
+
phase: "appeared" | "departed";
|
|
320
|
+
} | {
|
|
321
|
+
kind: "interval";
|
|
322
|
+
minutes: number;
|
|
323
|
+
})[];
|
|
324
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
325
|
+
actions: ({
|
|
326
|
+
kind: "cap";
|
|
327
|
+
deviceId: number | number[] | {
|
|
328
|
+
$var: string;
|
|
329
|
+
};
|
|
330
|
+
cap: string;
|
|
331
|
+
method: string;
|
|
332
|
+
args?: Record<string, unknown> | undefined;
|
|
333
|
+
argUnits?: Record<string, string> | undefined;
|
|
334
|
+
} | {
|
|
335
|
+
kind: "wait";
|
|
336
|
+
seconds: number;
|
|
337
|
+
} | {
|
|
338
|
+
kind: "action";
|
|
339
|
+
actionId: string;
|
|
340
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
341
|
+
} | {
|
|
342
|
+
kind: "code";
|
|
343
|
+
code: string;
|
|
344
|
+
})[];
|
|
345
|
+
runMode?: {
|
|
346
|
+
mode: "single";
|
|
347
|
+
} | {
|
|
348
|
+
mode: "restart";
|
|
349
|
+
} | {
|
|
350
|
+
mode: "queued";
|
|
351
|
+
max: number;
|
|
352
|
+
} | {
|
|
353
|
+
mode: "parallel";
|
|
354
|
+
max: number;
|
|
355
|
+
} | {
|
|
356
|
+
mode: "cooldown";
|
|
357
|
+
minutes: number;
|
|
358
|
+
} | undefined;
|
|
359
|
+
keepTraces?: number | undefined;
|
|
360
|
+
}>>]>;
|
|
216
361
|
}, z.core.$strip>, z.ZodObject<{
|
|
217
362
|
kind: z.ZodLiteral<"composition">;
|
|
218
363
|
composition: z.ZodObject<{
|
|
@@ -682,7 +827,44 @@ export declare const CoreBlockSchema: z.ZodObject<{
|
|
|
682
827
|
kind: z.ZodLiteral<"code">;
|
|
683
828
|
}, z.core.$strip>, z.ZodObject<{
|
|
684
829
|
kind: z.ZodLiteral<"recipe">;
|
|
685
|
-
recipe: z.ZodObject<{
|
|
830
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
831
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
832
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
833
|
+
kind: z.ZodLiteral<"wait">;
|
|
834
|
+
seconds: z.ZodNumber;
|
|
835
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
836
|
+
kind: z.ZodLiteral<"cap">;
|
|
837
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
838
|
+
$var: z.ZodString;
|
|
839
|
+
}, z.core.$strip>]>;
|
|
840
|
+
cap: z.ZodString;
|
|
841
|
+
method: z.ZodString;
|
|
842
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
843
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
844
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
845
|
+
kind: z.ZodLiteral<"action">;
|
|
846
|
+
actionId: z.ZodString;
|
|
847
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
848
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
849
|
+
kind: z.ZodLiteral<"code">;
|
|
850
|
+
code: z.ZodString;
|
|
851
|
+
}, z.core.$strip>], "kind">>;
|
|
852
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
853
|
+
mode: z.ZodLiteral<"single">;
|
|
854
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
855
|
+
mode: z.ZodLiteral<"restart">;
|
|
856
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
857
|
+
mode: z.ZodLiteral<"queued">;
|
|
858
|
+
max: z.ZodNumber;
|
|
859
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
860
|
+
mode: z.ZodLiteral<"parallel">;
|
|
861
|
+
max: z.ZodNumber;
|
|
862
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
863
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
864
|
+
minutes: z.ZodNumber;
|
|
865
|
+
}, z.core.$strip>], "mode">>;
|
|
866
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
867
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
686
868
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
687
869
|
kind: z.ZodLiteral<"device-state">;
|
|
688
870
|
deviceId: z.ZodNumber;
|
|
@@ -720,7 +902,7 @@ export declare const CoreBlockSchema: z.ZodObject<{
|
|
|
720
902
|
kind: z.ZodLiteral<"interval">;
|
|
721
903
|
minutes: z.ZodNumber;
|
|
722
904
|
}, z.core.$strip>], "kind">>;
|
|
723
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
905
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
724
906
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
725
907
|
kind: z.ZodLiteral<"wait">;
|
|
726
908
|
seconds: z.ZodNumber;
|
|
@@ -756,7 +938,115 @@ export declare const CoreBlockSchema: z.ZodObject<{
|
|
|
756
938
|
minutes: z.ZodNumber;
|
|
757
939
|
}, z.core.$strip>], "mode">>;
|
|
758
940
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
759
|
-
}, z.core.$strip
|
|
941
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
942
|
+
when: import("../index.js").AutomationWhen;
|
|
943
|
+
actions: ({
|
|
944
|
+
kind: "cap";
|
|
945
|
+
deviceId: number | number[] | {
|
|
946
|
+
$var: string;
|
|
947
|
+
};
|
|
948
|
+
cap: string;
|
|
949
|
+
method: string;
|
|
950
|
+
args?: Record<string, unknown> | undefined;
|
|
951
|
+
argUnits?: Record<string, string> | undefined;
|
|
952
|
+
} | {
|
|
953
|
+
kind: "wait";
|
|
954
|
+
seconds: number;
|
|
955
|
+
} | {
|
|
956
|
+
kind: "action";
|
|
957
|
+
actionId: string;
|
|
958
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
959
|
+
} | {
|
|
960
|
+
kind: "code";
|
|
961
|
+
code: string;
|
|
962
|
+
})[];
|
|
963
|
+
runMode?: {
|
|
964
|
+
mode: "single";
|
|
965
|
+
} | {
|
|
966
|
+
mode: "restart";
|
|
967
|
+
} | {
|
|
968
|
+
mode: "queued";
|
|
969
|
+
max: number;
|
|
970
|
+
} | {
|
|
971
|
+
mode: "parallel";
|
|
972
|
+
max: number;
|
|
973
|
+
} | {
|
|
974
|
+
mode: "cooldown";
|
|
975
|
+
minutes: number;
|
|
976
|
+
} | undefined;
|
|
977
|
+
keepTraces?: number | undefined;
|
|
978
|
+
}, {
|
|
979
|
+
triggers: ({
|
|
980
|
+
kind: "device-state";
|
|
981
|
+
deviceId: number;
|
|
982
|
+
cap: string;
|
|
983
|
+
fieldPath: string;
|
|
984
|
+
becomes?: string | number | boolean | undefined;
|
|
985
|
+
edge?: boolean | undefined;
|
|
986
|
+
forMs?: number | undefined;
|
|
987
|
+
debounceMs?: number | undefined;
|
|
988
|
+
} | {
|
|
989
|
+
kind: "device-event";
|
|
990
|
+
category: string;
|
|
991
|
+
deviceId?: number | undefined;
|
|
992
|
+
} | {
|
|
993
|
+
kind: "schedule";
|
|
994
|
+
cron: string;
|
|
995
|
+
} | {
|
|
996
|
+
kind: "manual";
|
|
997
|
+
} | {
|
|
998
|
+
kind: "detection";
|
|
999
|
+
classes: string[];
|
|
1000
|
+
deviceIds: number[];
|
|
1001
|
+
zones?: string[] | undefined;
|
|
1002
|
+
minScore?: number | undefined;
|
|
1003
|
+
} | {
|
|
1004
|
+
kind: "stationary";
|
|
1005
|
+
deviceIds: number[];
|
|
1006
|
+
classes?: string[] | undefined;
|
|
1007
|
+
zones?: string[] | undefined;
|
|
1008
|
+
phase: "appeared" | "departed";
|
|
1009
|
+
} | {
|
|
1010
|
+
kind: "interval";
|
|
1011
|
+
minutes: number;
|
|
1012
|
+
})[];
|
|
1013
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
1014
|
+
actions: ({
|
|
1015
|
+
kind: "cap";
|
|
1016
|
+
deviceId: number | number[] | {
|
|
1017
|
+
$var: string;
|
|
1018
|
+
};
|
|
1019
|
+
cap: string;
|
|
1020
|
+
method: string;
|
|
1021
|
+
args?: Record<string, unknown> | undefined;
|
|
1022
|
+
argUnits?: Record<string, string> | undefined;
|
|
1023
|
+
} | {
|
|
1024
|
+
kind: "wait";
|
|
1025
|
+
seconds: number;
|
|
1026
|
+
} | {
|
|
1027
|
+
kind: "action";
|
|
1028
|
+
actionId: string;
|
|
1029
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
1030
|
+
} | {
|
|
1031
|
+
kind: "code";
|
|
1032
|
+
code: string;
|
|
1033
|
+
})[];
|
|
1034
|
+
runMode?: {
|
|
1035
|
+
mode: "single";
|
|
1036
|
+
} | {
|
|
1037
|
+
mode: "restart";
|
|
1038
|
+
} | {
|
|
1039
|
+
mode: "queued";
|
|
1040
|
+
max: number;
|
|
1041
|
+
} | {
|
|
1042
|
+
mode: "parallel";
|
|
1043
|
+
max: number;
|
|
1044
|
+
} | {
|
|
1045
|
+
mode: "cooldown";
|
|
1046
|
+
minutes: number;
|
|
1047
|
+
} | undefined;
|
|
1048
|
+
keepTraces?: number | undefined;
|
|
1049
|
+
}>>]>;
|
|
760
1050
|
}, z.core.$strip>, z.ZodObject<{
|
|
761
1051
|
kind: z.ZodLiteral<"composition">;
|
|
762
1052
|
composition: z.ZodObject<{
|
|
@@ -1042,7 +1332,44 @@ export declare const CompositionViewSchema: z.ZodObject<{
|
|
|
1042
1332
|
kind: z.ZodLiteral<"code">;
|
|
1043
1333
|
}, z.core.$strip>, z.ZodObject<{
|
|
1044
1334
|
kind: z.ZodLiteral<"recipe">;
|
|
1045
|
-
recipe: z.ZodObject<{
|
|
1335
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
1336
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
1337
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1338
|
+
kind: z.ZodLiteral<"wait">;
|
|
1339
|
+
seconds: z.ZodNumber;
|
|
1340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1341
|
+
kind: z.ZodLiteral<"cap">;
|
|
1342
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
1343
|
+
$var: z.ZodString;
|
|
1344
|
+
}, z.core.$strip>]>;
|
|
1345
|
+
cap: z.ZodString;
|
|
1346
|
+
method: z.ZodString;
|
|
1347
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1348
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1349
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1350
|
+
kind: z.ZodLiteral<"action">;
|
|
1351
|
+
actionId: z.ZodString;
|
|
1352
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1354
|
+
kind: z.ZodLiteral<"code">;
|
|
1355
|
+
code: z.ZodString;
|
|
1356
|
+
}, z.core.$strip>], "kind">>;
|
|
1357
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1358
|
+
mode: z.ZodLiteral<"single">;
|
|
1359
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1360
|
+
mode: z.ZodLiteral<"restart">;
|
|
1361
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1362
|
+
mode: z.ZodLiteral<"queued">;
|
|
1363
|
+
max: z.ZodNumber;
|
|
1364
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1365
|
+
mode: z.ZodLiteral<"parallel">;
|
|
1366
|
+
max: z.ZodNumber;
|
|
1367
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1368
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
1369
|
+
minutes: z.ZodNumber;
|
|
1370
|
+
}, z.core.$strip>], "mode">>;
|
|
1371
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
1372
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
1046
1373
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1047
1374
|
kind: z.ZodLiteral<"device-state">;
|
|
1048
1375
|
deviceId: z.ZodNumber;
|
|
@@ -1080,7 +1407,7 @@ export declare const CompositionViewSchema: z.ZodObject<{
|
|
|
1080
1407
|
kind: z.ZodLiteral<"interval">;
|
|
1081
1408
|
minutes: z.ZodNumber;
|
|
1082
1409
|
}, z.core.$strip>], "kind">>;
|
|
1083
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
1410
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
1084
1411
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1085
1412
|
kind: z.ZodLiteral<"wait">;
|
|
1086
1413
|
seconds: z.ZodNumber;
|
|
@@ -1116,7 +1443,115 @@ export declare const CompositionViewSchema: z.ZodObject<{
|
|
|
1116
1443
|
minutes: z.ZodNumber;
|
|
1117
1444
|
}, z.core.$strip>], "mode">>;
|
|
1118
1445
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
1119
|
-
}, z.core.$strip
|
|
1446
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1447
|
+
when: import("../index.js").AutomationWhen;
|
|
1448
|
+
actions: ({
|
|
1449
|
+
kind: "cap";
|
|
1450
|
+
deviceId: number | number[] | {
|
|
1451
|
+
$var: string;
|
|
1452
|
+
};
|
|
1453
|
+
cap: string;
|
|
1454
|
+
method: string;
|
|
1455
|
+
args?: Record<string, unknown> | undefined;
|
|
1456
|
+
argUnits?: Record<string, string> | undefined;
|
|
1457
|
+
} | {
|
|
1458
|
+
kind: "wait";
|
|
1459
|
+
seconds: number;
|
|
1460
|
+
} | {
|
|
1461
|
+
kind: "action";
|
|
1462
|
+
actionId: string;
|
|
1463
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
1464
|
+
} | {
|
|
1465
|
+
kind: "code";
|
|
1466
|
+
code: string;
|
|
1467
|
+
})[];
|
|
1468
|
+
runMode?: {
|
|
1469
|
+
mode: "single";
|
|
1470
|
+
} | {
|
|
1471
|
+
mode: "restart";
|
|
1472
|
+
} | {
|
|
1473
|
+
mode: "queued";
|
|
1474
|
+
max: number;
|
|
1475
|
+
} | {
|
|
1476
|
+
mode: "parallel";
|
|
1477
|
+
max: number;
|
|
1478
|
+
} | {
|
|
1479
|
+
mode: "cooldown";
|
|
1480
|
+
minutes: number;
|
|
1481
|
+
} | undefined;
|
|
1482
|
+
keepTraces?: number | undefined;
|
|
1483
|
+
}, {
|
|
1484
|
+
triggers: ({
|
|
1485
|
+
kind: "device-state";
|
|
1486
|
+
deviceId: number;
|
|
1487
|
+
cap: string;
|
|
1488
|
+
fieldPath: string;
|
|
1489
|
+
becomes?: string | number | boolean | undefined;
|
|
1490
|
+
edge?: boolean | undefined;
|
|
1491
|
+
forMs?: number | undefined;
|
|
1492
|
+
debounceMs?: number | undefined;
|
|
1493
|
+
} | {
|
|
1494
|
+
kind: "device-event";
|
|
1495
|
+
category: string;
|
|
1496
|
+
deviceId?: number | undefined;
|
|
1497
|
+
} | {
|
|
1498
|
+
kind: "schedule";
|
|
1499
|
+
cron: string;
|
|
1500
|
+
} | {
|
|
1501
|
+
kind: "manual";
|
|
1502
|
+
} | {
|
|
1503
|
+
kind: "detection";
|
|
1504
|
+
classes: string[];
|
|
1505
|
+
deviceIds: number[];
|
|
1506
|
+
zones?: string[] | undefined;
|
|
1507
|
+
minScore?: number | undefined;
|
|
1508
|
+
} | {
|
|
1509
|
+
kind: "stationary";
|
|
1510
|
+
deviceIds: number[];
|
|
1511
|
+
classes?: string[] | undefined;
|
|
1512
|
+
zones?: string[] | undefined;
|
|
1513
|
+
phase: "appeared" | "departed";
|
|
1514
|
+
} | {
|
|
1515
|
+
kind: "interval";
|
|
1516
|
+
minutes: number;
|
|
1517
|
+
})[];
|
|
1518
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
1519
|
+
actions: ({
|
|
1520
|
+
kind: "cap";
|
|
1521
|
+
deviceId: number | number[] | {
|
|
1522
|
+
$var: string;
|
|
1523
|
+
};
|
|
1524
|
+
cap: string;
|
|
1525
|
+
method: string;
|
|
1526
|
+
args?: Record<string, unknown> | undefined;
|
|
1527
|
+
argUnits?: Record<string, string> | undefined;
|
|
1528
|
+
} | {
|
|
1529
|
+
kind: "wait";
|
|
1530
|
+
seconds: number;
|
|
1531
|
+
} | {
|
|
1532
|
+
kind: "action";
|
|
1533
|
+
actionId: string;
|
|
1534
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
1535
|
+
} | {
|
|
1536
|
+
kind: "code";
|
|
1537
|
+
code: string;
|
|
1538
|
+
})[];
|
|
1539
|
+
runMode?: {
|
|
1540
|
+
mode: "single";
|
|
1541
|
+
} | {
|
|
1542
|
+
mode: "restart";
|
|
1543
|
+
} | {
|
|
1544
|
+
mode: "queued";
|
|
1545
|
+
max: number;
|
|
1546
|
+
} | {
|
|
1547
|
+
mode: "parallel";
|
|
1548
|
+
max: number;
|
|
1549
|
+
} | {
|
|
1550
|
+
mode: "cooldown";
|
|
1551
|
+
minutes: number;
|
|
1552
|
+
} | undefined;
|
|
1553
|
+
keepTraces?: number | undefined;
|
|
1554
|
+
}>>]>;
|
|
1120
1555
|
}, z.core.$strip>, z.ZodObject<{
|
|
1121
1556
|
kind: z.ZodLiteral<"composition">;
|
|
1122
1557
|
composition: z.ZodObject<{
|
|
@@ -1400,7 +1835,44 @@ export declare const CompositionListReadSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
1400
1835
|
kind: z.ZodLiteral<"code">;
|
|
1401
1836
|
}, z.core.$strip>, z.ZodObject<{
|
|
1402
1837
|
kind: z.ZodLiteral<"recipe">;
|
|
1403
|
-
recipe: z.ZodObject<{
|
|
1838
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
1839
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
1840
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1841
|
+
kind: z.ZodLiteral<"wait">;
|
|
1842
|
+
seconds: z.ZodNumber;
|
|
1843
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1844
|
+
kind: z.ZodLiteral<"cap">;
|
|
1845
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
1846
|
+
$var: z.ZodString;
|
|
1847
|
+
}, z.core.$strip>]>;
|
|
1848
|
+
cap: z.ZodString;
|
|
1849
|
+
method: z.ZodString;
|
|
1850
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1851
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1852
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1853
|
+
kind: z.ZodLiteral<"action">;
|
|
1854
|
+
actionId: z.ZodString;
|
|
1855
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1856
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1857
|
+
kind: z.ZodLiteral<"code">;
|
|
1858
|
+
code: z.ZodString;
|
|
1859
|
+
}, z.core.$strip>], "kind">>;
|
|
1860
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1861
|
+
mode: z.ZodLiteral<"single">;
|
|
1862
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1863
|
+
mode: z.ZodLiteral<"restart">;
|
|
1864
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1865
|
+
mode: z.ZodLiteral<"queued">;
|
|
1866
|
+
max: z.ZodNumber;
|
|
1867
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1868
|
+
mode: z.ZodLiteral<"parallel">;
|
|
1869
|
+
max: z.ZodNumber;
|
|
1870
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1871
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
1872
|
+
minutes: z.ZodNumber;
|
|
1873
|
+
}, z.core.$strip>], "mode">>;
|
|
1874
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
1875
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
1404
1876
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1405
1877
|
kind: z.ZodLiteral<"device-state">;
|
|
1406
1878
|
deviceId: z.ZodNumber;
|
|
@@ -1438,7 +1910,7 @@ export declare const CompositionListReadSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
1438
1910
|
kind: z.ZodLiteral<"interval">;
|
|
1439
1911
|
minutes: z.ZodNumber;
|
|
1440
1912
|
}, z.core.$strip>], "kind">>;
|
|
1441
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
1913
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
1442
1914
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1443
1915
|
kind: z.ZodLiteral<"wait">;
|
|
1444
1916
|
seconds: z.ZodNumber;
|
|
@@ -1474,7 +1946,115 @@ export declare const CompositionListReadSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
1474
1946
|
minutes: z.ZodNumber;
|
|
1475
1947
|
}, z.core.$strip>], "mode">>;
|
|
1476
1948
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
1477
|
-
}, z.core.$strip
|
|
1949
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1950
|
+
when: import("../index.js").AutomationWhen;
|
|
1951
|
+
actions: ({
|
|
1952
|
+
kind: "cap";
|
|
1953
|
+
deviceId: number | number[] | {
|
|
1954
|
+
$var: string;
|
|
1955
|
+
};
|
|
1956
|
+
cap: string;
|
|
1957
|
+
method: string;
|
|
1958
|
+
args?: Record<string, unknown> | undefined;
|
|
1959
|
+
argUnits?: Record<string, string> | undefined;
|
|
1960
|
+
} | {
|
|
1961
|
+
kind: "wait";
|
|
1962
|
+
seconds: number;
|
|
1963
|
+
} | {
|
|
1964
|
+
kind: "action";
|
|
1965
|
+
actionId: string;
|
|
1966
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
1967
|
+
} | {
|
|
1968
|
+
kind: "code";
|
|
1969
|
+
code: string;
|
|
1970
|
+
})[];
|
|
1971
|
+
runMode?: {
|
|
1972
|
+
mode: "single";
|
|
1973
|
+
} | {
|
|
1974
|
+
mode: "restart";
|
|
1975
|
+
} | {
|
|
1976
|
+
mode: "queued";
|
|
1977
|
+
max: number;
|
|
1978
|
+
} | {
|
|
1979
|
+
mode: "parallel";
|
|
1980
|
+
max: number;
|
|
1981
|
+
} | {
|
|
1982
|
+
mode: "cooldown";
|
|
1983
|
+
minutes: number;
|
|
1984
|
+
} | undefined;
|
|
1985
|
+
keepTraces?: number | undefined;
|
|
1986
|
+
}, {
|
|
1987
|
+
triggers: ({
|
|
1988
|
+
kind: "device-state";
|
|
1989
|
+
deviceId: number;
|
|
1990
|
+
cap: string;
|
|
1991
|
+
fieldPath: string;
|
|
1992
|
+
becomes?: string | number | boolean | undefined;
|
|
1993
|
+
edge?: boolean | undefined;
|
|
1994
|
+
forMs?: number | undefined;
|
|
1995
|
+
debounceMs?: number | undefined;
|
|
1996
|
+
} | {
|
|
1997
|
+
kind: "device-event";
|
|
1998
|
+
category: string;
|
|
1999
|
+
deviceId?: number | undefined;
|
|
2000
|
+
} | {
|
|
2001
|
+
kind: "schedule";
|
|
2002
|
+
cron: string;
|
|
2003
|
+
} | {
|
|
2004
|
+
kind: "manual";
|
|
2005
|
+
} | {
|
|
2006
|
+
kind: "detection";
|
|
2007
|
+
classes: string[];
|
|
2008
|
+
deviceIds: number[];
|
|
2009
|
+
zones?: string[] | undefined;
|
|
2010
|
+
minScore?: number | undefined;
|
|
2011
|
+
} | {
|
|
2012
|
+
kind: "stationary";
|
|
2013
|
+
deviceIds: number[];
|
|
2014
|
+
classes?: string[] | undefined;
|
|
2015
|
+
zones?: string[] | undefined;
|
|
2016
|
+
phase: "appeared" | "departed";
|
|
2017
|
+
} | {
|
|
2018
|
+
kind: "interval";
|
|
2019
|
+
minutes: number;
|
|
2020
|
+
})[];
|
|
2021
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
2022
|
+
actions: ({
|
|
2023
|
+
kind: "cap";
|
|
2024
|
+
deviceId: number | number[] | {
|
|
2025
|
+
$var: string;
|
|
2026
|
+
};
|
|
2027
|
+
cap: string;
|
|
2028
|
+
method: string;
|
|
2029
|
+
args?: Record<string, unknown> | undefined;
|
|
2030
|
+
argUnits?: Record<string, string> | undefined;
|
|
2031
|
+
} | {
|
|
2032
|
+
kind: "wait";
|
|
2033
|
+
seconds: number;
|
|
2034
|
+
} | {
|
|
2035
|
+
kind: "action";
|
|
2036
|
+
actionId: string;
|
|
2037
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
2038
|
+
} | {
|
|
2039
|
+
kind: "code";
|
|
2040
|
+
code: string;
|
|
2041
|
+
})[];
|
|
2042
|
+
runMode?: {
|
|
2043
|
+
mode: "single";
|
|
2044
|
+
} | {
|
|
2045
|
+
mode: "restart";
|
|
2046
|
+
} | {
|
|
2047
|
+
mode: "queued";
|
|
2048
|
+
max: number;
|
|
2049
|
+
} | {
|
|
2050
|
+
mode: "parallel";
|
|
2051
|
+
max: number;
|
|
2052
|
+
} | {
|
|
2053
|
+
mode: "cooldown";
|
|
2054
|
+
minutes: number;
|
|
2055
|
+
} | undefined;
|
|
2056
|
+
keepTraces?: number | undefined;
|
|
2057
|
+
}>>]>;
|
|
1478
2058
|
}, z.core.$strip>, z.ZodObject<{
|
|
1479
2059
|
kind: z.ZodLiteral<"composition">;
|
|
1480
2060
|
composition: z.ZodObject<{
|
|
@@ -1762,7 +2342,44 @@ export declare const CompositionGetReadSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
1762
2342
|
kind: z.ZodLiteral<"code">;
|
|
1763
2343
|
}, z.core.$strip>, z.ZodObject<{
|
|
1764
2344
|
kind: z.ZodLiteral<"recipe">;
|
|
1765
|
-
recipe: z.ZodObject<{
|
|
2345
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
2346
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
2347
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2348
|
+
kind: z.ZodLiteral<"wait">;
|
|
2349
|
+
seconds: z.ZodNumber;
|
|
2350
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2351
|
+
kind: z.ZodLiteral<"cap">;
|
|
2352
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
2353
|
+
$var: z.ZodString;
|
|
2354
|
+
}, z.core.$strip>]>;
|
|
2355
|
+
cap: z.ZodString;
|
|
2356
|
+
method: z.ZodString;
|
|
2357
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2358
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2359
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2360
|
+
kind: z.ZodLiteral<"action">;
|
|
2361
|
+
actionId: z.ZodString;
|
|
2362
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
2363
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2364
|
+
kind: z.ZodLiteral<"code">;
|
|
2365
|
+
code: z.ZodString;
|
|
2366
|
+
}, z.core.$strip>], "kind">>;
|
|
2367
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2368
|
+
mode: z.ZodLiteral<"single">;
|
|
2369
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2370
|
+
mode: z.ZodLiteral<"restart">;
|
|
2371
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2372
|
+
mode: z.ZodLiteral<"queued">;
|
|
2373
|
+
max: z.ZodNumber;
|
|
2374
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2375
|
+
mode: z.ZodLiteral<"parallel">;
|
|
2376
|
+
max: z.ZodNumber;
|
|
2377
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2378
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
2379
|
+
minutes: z.ZodNumber;
|
|
2380
|
+
}, z.core.$strip>], "mode">>;
|
|
2381
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
2382
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
1766
2383
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1767
2384
|
kind: z.ZodLiteral<"device-state">;
|
|
1768
2385
|
deviceId: z.ZodNumber;
|
|
@@ -1800,7 +2417,7 @@ export declare const CompositionGetReadSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
1800
2417
|
kind: z.ZodLiteral<"interval">;
|
|
1801
2418
|
minutes: z.ZodNumber;
|
|
1802
2419
|
}, z.core.$strip>], "kind">>;
|
|
1803
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
2420
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
1804
2421
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1805
2422
|
kind: z.ZodLiteral<"wait">;
|
|
1806
2423
|
seconds: z.ZodNumber;
|
|
@@ -1836,7 +2453,115 @@ export declare const CompositionGetReadSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
1836
2453
|
minutes: z.ZodNumber;
|
|
1837
2454
|
}, z.core.$strip>], "mode">>;
|
|
1838
2455
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
1839
|
-
}, z.core.$strip
|
|
2456
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2457
|
+
when: import("../index.js").AutomationWhen;
|
|
2458
|
+
actions: ({
|
|
2459
|
+
kind: "cap";
|
|
2460
|
+
deviceId: number | number[] | {
|
|
2461
|
+
$var: string;
|
|
2462
|
+
};
|
|
2463
|
+
cap: string;
|
|
2464
|
+
method: string;
|
|
2465
|
+
args?: Record<string, unknown> | undefined;
|
|
2466
|
+
argUnits?: Record<string, string> | undefined;
|
|
2467
|
+
} | {
|
|
2468
|
+
kind: "wait";
|
|
2469
|
+
seconds: number;
|
|
2470
|
+
} | {
|
|
2471
|
+
kind: "action";
|
|
2472
|
+
actionId: string;
|
|
2473
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
2474
|
+
} | {
|
|
2475
|
+
kind: "code";
|
|
2476
|
+
code: string;
|
|
2477
|
+
})[];
|
|
2478
|
+
runMode?: {
|
|
2479
|
+
mode: "single";
|
|
2480
|
+
} | {
|
|
2481
|
+
mode: "restart";
|
|
2482
|
+
} | {
|
|
2483
|
+
mode: "queued";
|
|
2484
|
+
max: number;
|
|
2485
|
+
} | {
|
|
2486
|
+
mode: "parallel";
|
|
2487
|
+
max: number;
|
|
2488
|
+
} | {
|
|
2489
|
+
mode: "cooldown";
|
|
2490
|
+
minutes: number;
|
|
2491
|
+
} | undefined;
|
|
2492
|
+
keepTraces?: number | undefined;
|
|
2493
|
+
}, {
|
|
2494
|
+
triggers: ({
|
|
2495
|
+
kind: "device-state";
|
|
2496
|
+
deviceId: number;
|
|
2497
|
+
cap: string;
|
|
2498
|
+
fieldPath: string;
|
|
2499
|
+
becomes?: string | number | boolean | undefined;
|
|
2500
|
+
edge?: boolean | undefined;
|
|
2501
|
+
forMs?: number | undefined;
|
|
2502
|
+
debounceMs?: number | undefined;
|
|
2503
|
+
} | {
|
|
2504
|
+
kind: "device-event";
|
|
2505
|
+
category: string;
|
|
2506
|
+
deviceId?: number | undefined;
|
|
2507
|
+
} | {
|
|
2508
|
+
kind: "schedule";
|
|
2509
|
+
cron: string;
|
|
2510
|
+
} | {
|
|
2511
|
+
kind: "manual";
|
|
2512
|
+
} | {
|
|
2513
|
+
kind: "detection";
|
|
2514
|
+
classes: string[];
|
|
2515
|
+
deviceIds: number[];
|
|
2516
|
+
zones?: string[] | undefined;
|
|
2517
|
+
minScore?: number | undefined;
|
|
2518
|
+
} | {
|
|
2519
|
+
kind: "stationary";
|
|
2520
|
+
deviceIds: number[];
|
|
2521
|
+
classes?: string[] | undefined;
|
|
2522
|
+
zones?: string[] | undefined;
|
|
2523
|
+
phase: "appeared" | "departed";
|
|
2524
|
+
} | {
|
|
2525
|
+
kind: "interval";
|
|
2526
|
+
minutes: number;
|
|
2527
|
+
})[];
|
|
2528
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
2529
|
+
actions: ({
|
|
2530
|
+
kind: "cap";
|
|
2531
|
+
deviceId: number | number[] | {
|
|
2532
|
+
$var: string;
|
|
2533
|
+
};
|
|
2534
|
+
cap: string;
|
|
2535
|
+
method: string;
|
|
2536
|
+
args?: Record<string, unknown> | undefined;
|
|
2537
|
+
argUnits?: Record<string, string> | undefined;
|
|
2538
|
+
} | {
|
|
2539
|
+
kind: "wait";
|
|
2540
|
+
seconds: number;
|
|
2541
|
+
} | {
|
|
2542
|
+
kind: "action";
|
|
2543
|
+
actionId: string;
|
|
2544
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
2545
|
+
} | {
|
|
2546
|
+
kind: "code";
|
|
2547
|
+
code: string;
|
|
2548
|
+
})[];
|
|
2549
|
+
runMode?: {
|
|
2550
|
+
mode: "single";
|
|
2551
|
+
} | {
|
|
2552
|
+
mode: "restart";
|
|
2553
|
+
} | {
|
|
2554
|
+
mode: "queued";
|
|
2555
|
+
max: number;
|
|
2556
|
+
} | {
|
|
2557
|
+
mode: "parallel";
|
|
2558
|
+
max: number;
|
|
2559
|
+
} | {
|
|
2560
|
+
mode: "cooldown";
|
|
2561
|
+
minutes: number;
|
|
2562
|
+
} | undefined;
|
|
2563
|
+
keepTraces?: number | undefined;
|
|
2564
|
+
}>>]>;
|
|
1840
2565
|
}, z.core.$strip>, z.ZodObject<{
|
|
1841
2566
|
kind: z.ZodLiteral<"composition">;
|
|
1842
2567
|
composition: z.ZodObject<{
|
|
@@ -2125,7 +2850,44 @@ export declare const CompositionCustomizationReadSchema: z.ZodDiscriminatedUnion
|
|
|
2125
2850
|
kind: z.ZodLiteral<"code">;
|
|
2126
2851
|
}, z.core.$strip>, z.ZodObject<{
|
|
2127
2852
|
kind: z.ZodLiteral<"recipe">;
|
|
2128
|
-
recipe: z.ZodObject<{
|
|
2853
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
2854
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
2855
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2856
|
+
kind: z.ZodLiteral<"wait">;
|
|
2857
|
+
seconds: z.ZodNumber;
|
|
2858
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2859
|
+
kind: z.ZodLiteral<"cap">;
|
|
2860
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
2861
|
+
$var: z.ZodString;
|
|
2862
|
+
}, z.core.$strip>]>;
|
|
2863
|
+
cap: z.ZodString;
|
|
2864
|
+
method: z.ZodString;
|
|
2865
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2866
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2867
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2868
|
+
kind: z.ZodLiteral<"action">;
|
|
2869
|
+
actionId: z.ZodString;
|
|
2870
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
2871
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2872
|
+
kind: z.ZodLiteral<"code">;
|
|
2873
|
+
code: z.ZodString;
|
|
2874
|
+
}, z.core.$strip>], "kind">>;
|
|
2875
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2876
|
+
mode: z.ZodLiteral<"single">;
|
|
2877
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2878
|
+
mode: z.ZodLiteral<"restart">;
|
|
2879
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2880
|
+
mode: z.ZodLiteral<"queued">;
|
|
2881
|
+
max: z.ZodNumber;
|
|
2882
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2883
|
+
mode: z.ZodLiteral<"parallel">;
|
|
2884
|
+
max: z.ZodNumber;
|
|
2885
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2886
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
2887
|
+
minutes: z.ZodNumber;
|
|
2888
|
+
}, z.core.$strip>], "mode">>;
|
|
2889
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
2890
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
2129
2891
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2130
2892
|
kind: z.ZodLiteral<"device-state">;
|
|
2131
2893
|
deviceId: z.ZodNumber;
|
|
@@ -2163,7 +2925,7 @@ export declare const CompositionCustomizationReadSchema: z.ZodDiscriminatedUnion
|
|
|
2163
2925
|
kind: z.ZodLiteral<"interval">;
|
|
2164
2926
|
minutes: z.ZodNumber;
|
|
2165
2927
|
}, z.core.$strip>], "kind">>;
|
|
2166
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
2928
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
2167
2929
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2168
2930
|
kind: z.ZodLiteral<"wait">;
|
|
2169
2931
|
seconds: z.ZodNumber;
|
|
@@ -2199,7 +2961,115 @@ export declare const CompositionCustomizationReadSchema: z.ZodDiscriminatedUnion
|
|
|
2199
2961
|
minutes: z.ZodNumber;
|
|
2200
2962
|
}, z.core.$strip>], "mode">>;
|
|
2201
2963
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
2202
|
-
}, z.core.$strip
|
|
2964
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2965
|
+
when: import("../index.js").AutomationWhen;
|
|
2966
|
+
actions: ({
|
|
2967
|
+
kind: "cap";
|
|
2968
|
+
deviceId: number | number[] | {
|
|
2969
|
+
$var: string;
|
|
2970
|
+
};
|
|
2971
|
+
cap: string;
|
|
2972
|
+
method: string;
|
|
2973
|
+
args?: Record<string, unknown> | undefined;
|
|
2974
|
+
argUnits?: Record<string, string> | undefined;
|
|
2975
|
+
} | {
|
|
2976
|
+
kind: "wait";
|
|
2977
|
+
seconds: number;
|
|
2978
|
+
} | {
|
|
2979
|
+
kind: "action";
|
|
2980
|
+
actionId: string;
|
|
2981
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
2982
|
+
} | {
|
|
2983
|
+
kind: "code";
|
|
2984
|
+
code: string;
|
|
2985
|
+
})[];
|
|
2986
|
+
runMode?: {
|
|
2987
|
+
mode: "single";
|
|
2988
|
+
} | {
|
|
2989
|
+
mode: "restart";
|
|
2990
|
+
} | {
|
|
2991
|
+
mode: "queued";
|
|
2992
|
+
max: number;
|
|
2993
|
+
} | {
|
|
2994
|
+
mode: "parallel";
|
|
2995
|
+
max: number;
|
|
2996
|
+
} | {
|
|
2997
|
+
mode: "cooldown";
|
|
2998
|
+
minutes: number;
|
|
2999
|
+
} | undefined;
|
|
3000
|
+
keepTraces?: number | undefined;
|
|
3001
|
+
}, {
|
|
3002
|
+
triggers: ({
|
|
3003
|
+
kind: "device-state";
|
|
3004
|
+
deviceId: number;
|
|
3005
|
+
cap: string;
|
|
3006
|
+
fieldPath: string;
|
|
3007
|
+
becomes?: string | number | boolean | undefined;
|
|
3008
|
+
edge?: boolean | undefined;
|
|
3009
|
+
forMs?: number | undefined;
|
|
3010
|
+
debounceMs?: number | undefined;
|
|
3011
|
+
} | {
|
|
3012
|
+
kind: "device-event";
|
|
3013
|
+
category: string;
|
|
3014
|
+
deviceId?: number | undefined;
|
|
3015
|
+
} | {
|
|
3016
|
+
kind: "schedule";
|
|
3017
|
+
cron: string;
|
|
3018
|
+
} | {
|
|
3019
|
+
kind: "manual";
|
|
3020
|
+
} | {
|
|
3021
|
+
kind: "detection";
|
|
3022
|
+
classes: string[];
|
|
3023
|
+
deviceIds: number[];
|
|
3024
|
+
zones?: string[] | undefined;
|
|
3025
|
+
minScore?: number | undefined;
|
|
3026
|
+
} | {
|
|
3027
|
+
kind: "stationary";
|
|
3028
|
+
deviceIds: number[];
|
|
3029
|
+
classes?: string[] | undefined;
|
|
3030
|
+
zones?: string[] | undefined;
|
|
3031
|
+
phase: "appeared" | "departed";
|
|
3032
|
+
} | {
|
|
3033
|
+
kind: "interval";
|
|
3034
|
+
minutes: number;
|
|
3035
|
+
})[];
|
|
3036
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
3037
|
+
actions: ({
|
|
3038
|
+
kind: "cap";
|
|
3039
|
+
deviceId: number | number[] | {
|
|
3040
|
+
$var: string;
|
|
3041
|
+
};
|
|
3042
|
+
cap: string;
|
|
3043
|
+
method: string;
|
|
3044
|
+
args?: Record<string, unknown> | undefined;
|
|
3045
|
+
argUnits?: Record<string, string> | undefined;
|
|
3046
|
+
} | {
|
|
3047
|
+
kind: "wait";
|
|
3048
|
+
seconds: number;
|
|
3049
|
+
} | {
|
|
3050
|
+
kind: "action";
|
|
3051
|
+
actionId: string;
|
|
3052
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3053
|
+
} | {
|
|
3054
|
+
kind: "code";
|
|
3055
|
+
code: string;
|
|
3056
|
+
})[];
|
|
3057
|
+
runMode?: {
|
|
3058
|
+
mode: "single";
|
|
3059
|
+
} | {
|
|
3060
|
+
mode: "restart";
|
|
3061
|
+
} | {
|
|
3062
|
+
mode: "queued";
|
|
3063
|
+
max: number;
|
|
3064
|
+
} | {
|
|
3065
|
+
mode: "parallel";
|
|
3066
|
+
max: number;
|
|
3067
|
+
} | {
|
|
3068
|
+
mode: "cooldown";
|
|
3069
|
+
minutes: number;
|
|
3070
|
+
} | undefined;
|
|
3071
|
+
keepTraces?: number | undefined;
|
|
3072
|
+
}>>]>;
|
|
2203
3073
|
}, z.core.$strip>, z.ZodObject<{
|
|
2204
3074
|
kind: z.ZodLiteral<"composition">;
|
|
2205
3075
|
composition: z.ZodObject<{
|
|
@@ -2508,7 +3378,44 @@ export declare const coreBlocksCapability: {
|
|
|
2508
3378
|
kind: z.ZodLiteral<"code">;
|
|
2509
3379
|
}, z.core.$strip>, z.ZodObject<{
|
|
2510
3380
|
kind: z.ZodLiteral<"recipe">;
|
|
2511
|
-
recipe: z.ZodObject<{
|
|
3381
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
3382
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
3383
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3384
|
+
kind: z.ZodLiteral<"wait">;
|
|
3385
|
+
seconds: z.ZodNumber;
|
|
3386
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3387
|
+
kind: z.ZodLiteral<"cap">;
|
|
3388
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
3389
|
+
$var: z.ZodString;
|
|
3390
|
+
}, z.core.$strip>]>;
|
|
3391
|
+
cap: z.ZodString;
|
|
3392
|
+
method: z.ZodString;
|
|
3393
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3394
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3395
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3396
|
+
kind: z.ZodLiteral<"action">;
|
|
3397
|
+
actionId: z.ZodString;
|
|
3398
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3399
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3400
|
+
kind: z.ZodLiteral<"code">;
|
|
3401
|
+
code: z.ZodString;
|
|
3402
|
+
}, z.core.$strip>], "kind">>;
|
|
3403
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3404
|
+
mode: z.ZodLiteral<"single">;
|
|
3405
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3406
|
+
mode: z.ZodLiteral<"restart">;
|
|
3407
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3408
|
+
mode: z.ZodLiteral<"queued">;
|
|
3409
|
+
max: z.ZodNumber;
|
|
3410
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3411
|
+
mode: z.ZodLiteral<"parallel">;
|
|
3412
|
+
max: z.ZodNumber;
|
|
3413
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3414
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
3415
|
+
minutes: z.ZodNumber;
|
|
3416
|
+
}, z.core.$strip>], "mode">>;
|
|
3417
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
3418
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
2512
3419
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2513
3420
|
kind: z.ZodLiteral<"device-state">;
|
|
2514
3421
|
deviceId: z.ZodNumber;
|
|
@@ -2546,7 +3453,7 @@ export declare const coreBlocksCapability: {
|
|
|
2546
3453
|
kind: z.ZodLiteral<"interval">;
|
|
2547
3454
|
minutes: z.ZodNumber;
|
|
2548
3455
|
}, z.core.$strip>], "kind">>;
|
|
2549
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
3456
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
2550
3457
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2551
3458
|
kind: z.ZodLiteral<"wait">;
|
|
2552
3459
|
seconds: z.ZodNumber;
|
|
@@ -2582,7 +3489,115 @@ export declare const coreBlocksCapability: {
|
|
|
2582
3489
|
minutes: z.ZodNumber;
|
|
2583
3490
|
}, z.core.$strip>], "mode">>;
|
|
2584
3491
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
2585
|
-
}, z.core.$strip
|
|
3492
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
3493
|
+
when: import("../index.js").AutomationWhen;
|
|
3494
|
+
actions: ({
|
|
3495
|
+
kind: "cap";
|
|
3496
|
+
deviceId: number | number[] | {
|
|
3497
|
+
$var: string;
|
|
3498
|
+
};
|
|
3499
|
+
cap: string;
|
|
3500
|
+
method: string;
|
|
3501
|
+
args?: Record<string, unknown> | undefined;
|
|
3502
|
+
argUnits?: Record<string, string> | undefined;
|
|
3503
|
+
} | {
|
|
3504
|
+
kind: "wait";
|
|
3505
|
+
seconds: number;
|
|
3506
|
+
} | {
|
|
3507
|
+
kind: "action";
|
|
3508
|
+
actionId: string;
|
|
3509
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3510
|
+
} | {
|
|
3511
|
+
kind: "code";
|
|
3512
|
+
code: string;
|
|
3513
|
+
})[];
|
|
3514
|
+
runMode?: {
|
|
3515
|
+
mode: "single";
|
|
3516
|
+
} | {
|
|
3517
|
+
mode: "restart";
|
|
3518
|
+
} | {
|
|
3519
|
+
mode: "queued";
|
|
3520
|
+
max: number;
|
|
3521
|
+
} | {
|
|
3522
|
+
mode: "parallel";
|
|
3523
|
+
max: number;
|
|
3524
|
+
} | {
|
|
3525
|
+
mode: "cooldown";
|
|
3526
|
+
minutes: number;
|
|
3527
|
+
} | undefined;
|
|
3528
|
+
keepTraces?: number | undefined;
|
|
3529
|
+
}, {
|
|
3530
|
+
triggers: ({
|
|
3531
|
+
kind: "device-state";
|
|
3532
|
+
deviceId: number;
|
|
3533
|
+
cap: string;
|
|
3534
|
+
fieldPath: string;
|
|
3535
|
+
becomes?: string | number | boolean | undefined;
|
|
3536
|
+
edge?: boolean | undefined;
|
|
3537
|
+
forMs?: number | undefined;
|
|
3538
|
+
debounceMs?: number | undefined;
|
|
3539
|
+
} | {
|
|
3540
|
+
kind: "device-event";
|
|
3541
|
+
category: string;
|
|
3542
|
+
deviceId?: number | undefined;
|
|
3543
|
+
} | {
|
|
3544
|
+
kind: "schedule";
|
|
3545
|
+
cron: string;
|
|
3546
|
+
} | {
|
|
3547
|
+
kind: "manual";
|
|
3548
|
+
} | {
|
|
3549
|
+
kind: "detection";
|
|
3550
|
+
classes: string[];
|
|
3551
|
+
deviceIds: number[];
|
|
3552
|
+
zones?: string[] | undefined;
|
|
3553
|
+
minScore?: number | undefined;
|
|
3554
|
+
} | {
|
|
3555
|
+
kind: "stationary";
|
|
3556
|
+
deviceIds: number[];
|
|
3557
|
+
classes?: string[] | undefined;
|
|
3558
|
+
zones?: string[] | undefined;
|
|
3559
|
+
phase: "appeared" | "departed";
|
|
3560
|
+
} | {
|
|
3561
|
+
kind: "interval";
|
|
3562
|
+
minutes: number;
|
|
3563
|
+
})[];
|
|
3564
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
3565
|
+
actions: ({
|
|
3566
|
+
kind: "cap";
|
|
3567
|
+
deviceId: number | number[] | {
|
|
3568
|
+
$var: string;
|
|
3569
|
+
};
|
|
3570
|
+
cap: string;
|
|
3571
|
+
method: string;
|
|
3572
|
+
args?: Record<string, unknown> | undefined;
|
|
3573
|
+
argUnits?: Record<string, string> | undefined;
|
|
3574
|
+
} | {
|
|
3575
|
+
kind: "wait";
|
|
3576
|
+
seconds: number;
|
|
3577
|
+
} | {
|
|
3578
|
+
kind: "action";
|
|
3579
|
+
actionId: string;
|
|
3580
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3581
|
+
} | {
|
|
3582
|
+
kind: "code";
|
|
3583
|
+
code: string;
|
|
3584
|
+
})[];
|
|
3585
|
+
runMode?: {
|
|
3586
|
+
mode: "single";
|
|
3587
|
+
} | {
|
|
3588
|
+
mode: "restart";
|
|
3589
|
+
} | {
|
|
3590
|
+
mode: "queued";
|
|
3591
|
+
max: number;
|
|
3592
|
+
} | {
|
|
3593
|
+
mode: "parallel";
|
|
3594
|
+
max: number;
|
|
3595
|
+
} | {
|
|
3596
|
+
mode: "cooldown";
|
|
3597
|
+
minutes: number;
|
|
3598
|
+
} | undefined;
|
|
3599
|
+
keepTraces?: number | undefined;
|
|
3600
|
+
}>>]>;
|
|
2586
3601
|
}, z.core.$strip>, z.ZodObject<{
|
|
2587
3602
|
kind: z.ZodLiteral<"composition">;
|
|
2588
3603
|
composition: z.ZodObject<{
|
|
@@ -2829,7 +3844,44 @@ export declare const coreBlocksCapability: {
|
|
|
2829
3844
|
kind: z.ZodLiteral<"code">;
|
|
2830
3845
|
}, z.core.$strip>, z.ZodObject<{
|
|
2831
3846
|
kind: z.ZodLiteral<"recipe">;
|
|
2832
|
-
recipe: z.ZodObject<{
|
|
3847
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
3848
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
3849
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3850
|
+
kind: z.ZodLiteral<"wait">;
|
|
3851
|
+
seconds: z.ZodNumber;
|
|
3852
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3853
|
+
kind: z.ZodLiteral<"cap">;
|
|
3854
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
3855
|
+
$var: z.ZodString;
|
|
3856
|
+
}, z.core.$strip>]>;
|
|
3857
|
+
cap: z.ZodString;
|
|
3858
|
+
method: z.ZodString;
|
|
3859
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3860
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3861
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3862
|
+
kind: z.ZodLiteral<"action">;
|
|
3863
|
+
actionId: z.ZodString;
|
|
3864
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3865
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3866
|
+
kind: z.ZodLiteral<"code">;
|
|
3867
|
+
code: z.ZodString;
|
|
3868
|
+
}, z.core.$strip>], "kind">>;
|
|
3869
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3870
|
+
mode: z.ZodLiteral<"single">;
|
|
3871
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3872
|
+
mode: z.ZodLiteral<"restart">;
|
|
3873
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3874
|
+
mode: z.ZodLiteral<"queued">;
|
|
3875
|
+
max: z.ZodNumber;
|
|
3876
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3877
|
+
mode: z.ZodLiteral<"parallel">;
|
|
3878
|
+
max: z.ZodNumber;
|
|
3879
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3880
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
3881
|
+
minutes: z.ZodNumber;
|
|
3882
|
+
}, z.core.$strip>], "mode">>;
|
|
3883
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
3884
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
2833
3885
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2834
3886
|
kind: z.ZodLiteral<"device-state">;
|
|
2835
3887
|
deviceId: z.ZodNumber;
|
|
@@ -2867,7 +3919,7 @@ export declare const coreBlocksCapability: {
|
|
|
2867
3919
|
kind: z.ZodLiteral<"interval">;
|
|
2868
3920
|
minutes: z.ZodNumber;
|
|
2869
3921
|
}, z.core.$strip>], "kind">>;
|
|
2870
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
3922
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
2871
3923
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2872
3924
|
kind: z.ZodLiteral<"wait">;
|
|
2873
3925
|
seconds: z.ZodNumber;
|
|
@@ -2903,7 +3955,115 @@ export declare const coreBlocksCapability: {
|
|
|
2903
3955
|
minutes: z.ZodNumber;
|
|
2904
3956
|
}, z.core.$strip>], "mode">>;
|
|
2905
3957
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
2906
|
-
}, z.core.$strip
|
|
3958
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
3959
|
+
when: import("../index.js").AutomationWhen;
|
|
3960
|
+
actions: ({
|
|
3961
|
+
kind: "cap";
|
|
3962
|
+
deviceId: number | number[] | {
|
|
3963
|
+
$var: string;
|
|
3964
|
+
};
|
|
3965
|
+
cap: string;
|
|
3966
|
+
method: string;
|
|
3967
|
+
args?: Record<string, unknown> | undefined;
|
|
3968
|
+
argUnits?: Record<string, string> | undefined;
|
|
3969
|
+
} | {
|
|
3970
|
+
kind: "wait";
|
|
3971
|
+
seconds: number;
|
|
3972
|
+
} | {
|
|
3973
|
+
kind: "action";
|
|
3974
|
+
actionId: string;
|
|
3975
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3976
|
+
} | {
|
|
3977
|
+
kind: "code";
|
|
3978
|
+
code: string;
|
|
3979
|
+
})[];
|
|
3980
|
+
runMode?: {
|
|
3981
|
+
mode: "single";
|
|
3982
|
+
} | {
|
|
3983
|
+
mode: "restart";
|
|
3984
|
+
} | {
|
|
3985
|
+
mode: "queued";
|
|
3986
|
+
max: number;
|
|
3987
|
+
} | {
|
|
3988
|
+
mode: "parallel";
|
|
3989
|
+
max: number;
|
|
3990
|
+
} | {
|
|
3991
|
+
mode: "cooldown";
|
|
3992
|
+
minutes: number;
|
|
3993
|
+
} | undefined;
|
|
3994
|
+
keepTraces?: number | undefined;
|
|
3995
|
+
}, {
|
|
3996
|
+
triggers: ({
|
|
3997
|
+
kind: "device-state";
|
|
3998
|
+
deviceId: number;
|
|
3999
|
+
cap: string;
|
|
4000
|
+
fieldPath: string;
|
|
4001
|
+
becomes?: string | number | boolean | undefined;
|
|
4002
|
+
edge?: boolean | undefined;
|
|
4003
|
+
forMs?: number | undefined;
|
|
4004
|
+
debounceMs?: number | undefined;
|
|
4005
|
+
} | {
|
|
4006
|
+
kind: "device-event";
|
|
4007
|
+
category: string;
|
|
4008
|
+
deviceId?: number | undefined;
|
|
4009
|
+
} | {
|
|
4010
|
+
kind: "schedule";
|
|
4011
|
+
cron: string;
|
|
4012
|
+
} | {
|
|
4013
|
+
kind: "manual";
|
|
4014
|
+
} | {
|
|
4015
|
+
kind: "detection";
|
|
4016
|
+
classes: string[];
|
|
4017
|
+
deviceIds: number[];
|
|
4018
|
+
zones?: string[] | undefined;
|
|
4019
|
+
minScore?: number | undefined;
|
|
4020
|
+
} | {
|
|
4021
|
+
kind: "stationary";
|
|
4022
|
+
deviceIds: number[];
|
|
4023
|
+
classes?: string[] | undefined;
|
|
4024
|
+
zones?: string[] | undefined;
|
|
4025
|
+
phase: "appeared" | "departed";
|
|
4026
|
+
} | {
|
|
4027
|
+
kind: "interval";
|
|
4028
|
+
minutes: number;
|
|
4029
|
+
})[];
|
|
4030
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
4031
|
+
actions: ({
|
|
4032
|
+
kind: "cap";
|
|
4033
|
+
deviceId: number | number[] | {
|
|
4034
|
+
$var: string;
|
|
4035
|
+
};
|
|
4036
|
+
cap: string;
|
|
4037
|
+
method: string;
|
|
4038
|
+
args?: Record<string, unknown> | undefined;
|
|
4039
|
+
argUnits?: Record<string, string> | undefined;
|
|
4040
|
+
} | {
|
|
4041
|
+
kind: "wait";
|
|
4042
|
+
seconds: number;
|
|
4043
|
+
} | {
|
|
4044
|
+
kind: "action";
|
|
4045
|
+
actionId: string;
|
|
4046
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
4047
|
+
} | {
|
|
4048
|
+
kind: "code";
|
|
4049
|
+
code: string;
|
|
4050
|
+
})[];
|
|
4051
|
+
runMode?: {
|
|
4052
|
+
mode: "single";
|
|
4053
|
+
} | {
|
|
4054
|
+
mode: "restart";
|
|
4055
|
+
} | {
|
|
4056
|
+
mode: "queued";
|
|
4057
|
+
max: number;
|
|
4058
|
+
} | {
|
|
4059
|
+
mode: "parallel";
|
|
4060
|
+
max: number;
|
|
4061
|
+
} | {
|
|
4062
|
+
mode: "cooldown";
|
|
4063
|
+
minutes: number;
|
|
4064
|
+
} | undefined;
|
|
4065
|
+
keepTraces?: number | undefined;
|
|
4066
|
+
}>>]>;
|
|
2907
4067
|
}, z.core.$strip>, z.ZodObject<{
|
|
2908
4068
|
kind: z.ZodLiteral<"composition">;
|
|
2909
4069
|
composition: z.ZodObject<{
|
|
@@ -3164,7 +4324,44 @@ export declare const coreBlocksCapability: {
|
|
|
3164
4324
|
kind: z.ZodLiteral<"code">;
|
|
3165
4325
|
}, z.core.$strip>, z.ZodObject<{
|
|
3166
4326
|
kind: z.ZodLiteral<"recipe">;
|
|
3167
|
-
recipe: z.ZodObject<{
|
|
4327
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
4328
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
4329
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4330
|
+
kind: z.ZodLiteral<"wait">;
|
|
4331
|
+
seconds: z.ZodNumber;
|
|
4332
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4333
|
+
kind: z.ZodLiteral<"cap">;
|
|
4334
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
4335
|
+
$var: z.ZodString;
|
|
4336
|
+
}, z.core.$strip>]>;
|
|
4337
|
+
cap: z.ZodString;
|
|
4338
|
+
method: z.ZodString;
|
|
4339
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4340
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4341
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4342
|
+
kind: z.ZodLiteral<"action">;
|
|
4343
|
+
actionId: z.ZodString;
|
|
4344
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
4345
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4346
|
+
kind: z.ZodLiteral<"code">;
|
|
4347
|
+
code: z.ZodString;
|
|
4348
|
+
}, z.core.$strip>], "kind">>;
|
|
4349
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4350
|
+
mode: z.ZodLiteral<"single">;
|
|
4351
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4352
|
+
mode: z.ZodLiteral<"restart">;
|
|
4353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4354
|
+
mode: z.ZodLiteral<"queued">;
|
|
4355
|
+
max: z.ZodNumber;
|
|
4356
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4357
|
+
mode: z.ZodLiteral<"parallel">;
|
|
4358
|
+
max: z.ZodNumber;
|
|
4359
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4360
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
4361
|
+
minutes: z.ZodNumber;
|
|
4362
|
+
}, z.core.$strip>], "mode">>;
|
|
4363
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
4364
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
3168
4365
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3169
4366
|
kind: z.ZodLiteral<"device-state">;
|
|
3170
4367
|
deviceId: z.ZodNumber;
|
|
@@ -3202,7 +4399,7 @@ export declare const coreBlocksCapability: {
|
|
|
3202
4399
|
kind: z.ZodLiteral<"interval">;
|
|
3203
4400
|
minutes: z.ZodNumber;
|
|
3204
4401
|
}, z.core.$strip>], "kind">>;
|
|
3205
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
4402
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
3206
4403
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3207
4404
|
kind: z.ZodLiteral<"wait">;
|
|
3208
4405
|
seconds: z.ZodNumber;
|
|
@@ -3238,7 +4435,115 @@ export declare const coreBlocksCapability: {
|
|
|
3238
4435
|
minutes: z.ZodNumber;
|
|
3239
4436
|
}, z.core.$strip>], "mode">>;
|
|
3240
4437
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
3241
|
-
}, z.core.$strip
|
|
4438
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
4439
|
+
when: import("../index.js").AutomationWhen;
|
|
4440
|
+
actions: ({
|
|
4441
|
+
kind: "cap";
|
|
4442
|
+
deviceId: number | number[] | {
|
|
4443
|
+
$var: string;
|
|
4444
|
+
};
|
|
4445
|
+
cap: string;
|
|
4446
|
+
method: string;
|
|
4447
|
+
args?: Record<string, unknown> | undefined;
|
|
4448
|
+
argUnits?: Record<string, string> | undefined;
|
|
4449
|
+
} | {
|
|
4450
|
+
kind: "wait";
|
|
4451
|
+
seconds: number;
|
|
4452
|
+
} | {
|
|
4453
|
+
kind: "action";
|
|
4454
|
+
actionId: string;
|
|
4455
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
4456
|
+
} | {
|
|
4457
|
+
kind: "code";
|
|
4458
|
+
code: string;
|
|
4459
|
+
})[];
|
|
4460
|
+
runMode?: {
|
|
4461
|
+
mode: "single";
|
|
4462
|
+
} | {
|
|
4463
|
+
mode: "restart";
|
|
4464
|
+
} | {
|
|
4465
|
+
mode: "queued";
|
|
4466
|
+
max: number;
|
|
4467
|
+
} | {
|
|
4468
|
+
mode: "parallel";
|
|
4469
|
+
max: number;
|
|
4470
|
+
} | {
|
|
4471
|
+
mode: "cooldown";
|
|
4472
|
+
minutes: number;
|
|
4473
|
+
} | undefined;
|
|
4474
|
+
keepTraces?: number | undefined;
|
|
4475
|
+
}, {
|
|
4476
|
+
triggers: ({
|
|
4477
|
+
kind: "device-state";
|
|
4478
|
+
deviceId: number;
|
|
4479
|
+
cap: string;
|
|
4480
|
+
fieldPath: string;
|
|
4481
|
+
becomes?: string | number | boolean | undefined;
|
|
4482
|
+
edge?: boolean | undefined;
|
|
4483
|
+
forMs?: number | undefined;
|
|
4484
|
+
debounceMs?: number | undefined;
|
|
4485
|
+
} | {
|
|
4486
|
+
kind: "device-event";
|
|
4487
|
+
category: string;
|
|
4488
|
+
deviceId?: number | undefined;
|
|
4489
|
+
} | {
|
|
4490
|
+
kind: "schedule";
|
|
4491
|
+
cron: string;
|
|
4492
|
+
} | {
|
|
4493
|
+
kind: "manual";
|
|
4494
|
+
} | {
|
|
4495
|
+
kind: "detection";
|
|
4496
|
+
classes: string[];
|
|
4497
|
+
deviceIds: number[];
|
|
4498
|
+
zones?: string[] | undefined;
|
|
4499
|
+
minScore?: number | undefined;
|
|
4500
|
+
} | {
|
|
4501
|
+
kind: "stationary";
|
|
4502
|
+
deviceIds: number[];
|
|
4503
|
+
classes?: string[] | undefined;
|
|
4504
|
+
zones?: string[] | undefined;
|
|
4505
|
+
phase: "appeared" | "departed";
|
|
4506
|
+
} | {
|
|
4507
|
+
kind: "interval";
|
|
4508
|
+
minutes: number;
|
|
4509
|
+
})[];
|
|
4510
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
4511
|
+
actions: ({
|
|
4512
|
+
kind: "cap";
|
|
4513
|
+
deviceId: number | number[] | {
|
|
4514
|
+
$var: string;
|
|
4515
|
+
};
|
|
4516
|
+
cap: string;
|
|
4517
|
+
method: string;
|
|
4518
|
+
args?: Record<string, unknown> | undefined;
|
|
4519
|
+
argUnits?: Record<string, string> | undefined;
|
|
4520
|
+
} | {
|
|
4521
|
+
kind: "wait";
|
|
4522
|
+
seconds: number;
|
|
4523
|
+
} | {
|
|
4524
|
+
kind: "action";
|
|
4525
|
+
actionId: string;
|
|
4526
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
4527
|
+
} | {
|
|
4528
|
+
kind: "code";
|
|
4529
|
+
code: string;
|
|
4530
|
+
})[];
|
|
4531
|
+
runMode?: {
|
|
4532
|
+
mode: "single";
|
|
4533
|
+
} | {
|
|
4534
|
+
mode: "restart";
|
|
4535
|
+
} | {
|
|
4536
|
+
mode: "queued";
|
|
4537
|
+
max: number;
|
|
4538
|
+
} | {
|
|
4539
|
+
mode: "parallel";
|
|
4540
|
+
max: number;
|
|
4541
|
+
} | {
|
|
4542
|
+
mode: "cooldown";
|
|
4543
|
+
minutes: number;
|
|
4544
|
+
} | undefined;
|
|
4545
|
+
keepTraces?: number | undefined;
|
|
4546
|
+
}>>]>;
|
|
3242
4547
|
}, z.core.$strip>, z.ZodObject<{
|
|
3243
4548
|
kind: z.ZodLiteral<"composition">;
|
|
3244
4549
|
composition: z.ZodObject<{
|
|
@@ -3497,7 +4802,44 @@ export declare const coreBlocksCapability: {
|
|
|
3497
4802
|
kind: z.ZodLiteral<"code">;
|
|
3498
4803
|
}, z.core.$strip>, z.ZodObject<{
|
|
3499
4804
|
kind: z.ZodLiteral<"recipe">;
|
|
3500
|
-
recipe: z.ZodObject<{
|
|
4805
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
4806
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
4807
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4808
|
+
kind: z.ZodLiteral<"wait">;
|
|
4809
|
+
seconds: z.ZodNumber;
|
|
4810
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4811
|
+
kind: z.ZodLiteral<"cap">;
|
|
4812
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
4813
|
+
$var: z.ZodString;
|
|
4814
|
+
}, z.core.$strip>]>;
|
|
4815
|
+
cap: z.ZodString;
|
|
4816
|
+
method: z.ZodString;
|
|
4817
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4818
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4819
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4820
|
+
kind: z.ZodLiteral<"action">;
|
|
4821
|
+
actionId: z.ZodString;
|
|
4822
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
4823
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4824
|
+
kind: z.ZodLiteral<"code">;
|
|
4825
|
+
code: z.ZodString;
|
|
4826
|
+
}, z.core.$strip>], "kind">>;
|
|
4827
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4828
|
+
mode: z.ZodLiteral<"single">;
|
|
4829
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4830
|
+
mode: z.ZodLiteral<"restart">;
|
|
4831
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4832
|
+
mode: z.ZodLiteral<"queued">;
|
|
4833
|
+
max: z.ZodNumber;
|
|
4834
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4835
|
+
mode: z.ZodLiteral<"parallel">;
|
|
4836
|
+
max: z.ZodNumber;
|
|
4837
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4838
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
4839
|
+
minutes: z.ZodNumber;
|
|
4840
|
+
}, z.core.$strip>], "mode">>;
|
|
4841
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
4842
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
3501
4843
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3502
4844
|
kind: z.ZodLiteral<"device-state">;
|
|
3503
4845
|
deviceId: z.ZodNumber;
|
|
@@ -3535,7 +4877,7 @@ export declare const coreBlocksCapability: {
|
|
|
3535
4877
|
kind: z.ZodLiteral<"interval">;
|
|
3536
4878
|
minutes: z.ZodNumber;
|
|
3537
4879
|
}, z.core.$strip>], "kind">>;
|
|
3538
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
4880
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
3539
4881
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3540
4882
|
kind: z.ZodLiteral<"wait">;
|
|
3541
4883
|
seconds: z.ZodNumber;
|
|
@@ -3571,7 +4913,115 @@ export declare const coreBlocksCapability: {
|
|
|
3571
4913
|
minutes: z.ZodNumber;
|
|
3572
4914
|
}, z.core.$strip>], "mode">>;
|
|
3573
4915
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
3574
|
-
}, z.core.$strip
|
|
4916
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
4917
|
+
when: import("../index.js").AutomationWhen;
|
|
4918
|
+
actions: ({
|
|
4919
|
+
kind: "cap";
|
|
4920
|
+
deviceId: number | number[] | {
|
|
4921
|
+
$var: string;
|
|
4922
|
+
};
|
|
4923
|
+
cap: string;
|
|
4924
|
+
method: string;
|
|
4925
|
+
args?: Record<string, unknown> | undefined;
|
|
4926
|
+
argUnits?: Record<string, string> | undefined;
|
|
4927
|
+
} | {
|
|
4928
|
+
kind: "wait";
|
|
4929
|
+
seconds: number;
|
|
4930
|
+
} | {
|
|
4931
|
+
kind: "action";
|
|
4932
|
+
actionId: string;
|
|
4933
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
4934
|
+
} | {
|
|
4935
|
+
kind: "code";
|
|
4936
|
+
code: string;
|
|
4937
|
+
})[];
|
|
4938
|
+
runMode?: {
|
|
4939
|
+
mode: "single";
|
|
4940
|
+
} | {
|
|
4941
|
+
mode: "restart";
|
|
4942
|
+
} | {
|
|
4943
|
+
mode: "queued";
|
|
4944
|
+
max: number;
|
|
4945
|
+
} | {
|
|
4946
|
+
mode: "parallel";
|
|
4947
|
+
max: number;
|
|
4948
|
+
} | {
|
|
4949
|
+
mode: "cooldown";
|
|
4950
|
+
minutes: number;
|
|
4951
|
+
} | undefined;
|
|
4952
|
+
keepTraces?: number | undefined;
|
|
4953
|
+
}, {
|
|
4954
|
+
triggers: ({
|
|
4955
|
+
kind: "device-state";
|
|
4956
|
+
deviceId: number;
|
|
4957
|
+
cap: string;
|
|
4958
|
+
fieldPath: string;
|
|
4959
|
+
becomes?: string | number | boolean | undefined;
|
|
4960
|
+
edge?: boolean | undefined;
|
|
4961
|
+
forMs?: number | undefined;
|
|
4962
|
+
debounceMs?: number | undefined;
|
|
4963
|
+
} | {
|
|
4964
|
+
kind: "device-event";
|
|
4965
|
+
category: string;
|
|
4966
|
+
deviceId?: number | undefined;
|
|
4967
|
+
} | {
|
|
4968
|
+
kind: "schedule";
|
|
4969
|
+
cron: string;
|
|
4970
|
+
} | {
|
|
4971
|
+
kind: "manual";
|
|
4972
|
+
} | {
|
|
4973
|
+
kind: "detection";
|
|
4974
|
+
classes: string[];
|
|
4975
|
+
deviceIds: number[];
|
|
4976
|
+
zones?: string[] | undefined;
|
|
4977
|
+
minScore?: number | undefined;
|
|
4978
|
+
} | {
|
|
4979
|
+
kind: "stationary";
|
|
4980
|
+
deviceIds: number[];
|
|
4981
|
+
classes?: string[] | undefined;
|
|
4982
|
+
zones?: string[] | undefined;
|
|
4983
|
+
phase: "appeared" | "departed";
|
|
4984
|
+
} | {
|
|
4985
|
+
kind: "interval";
|
|
4986
|
+
minutes: number;
|
|
4987
|
+
})[];
|
|
4988
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
4989
|
+
actions: ({
|
|
4990
|
+
kind: "cap";
|
|
4991
|
+
deviceId: number | number[] | {
|
|
4992
|
+
$var: string;
|
|
4993
|
+
};
|
|
4994
|
+
cap: string;
|
|
4995
|
+
method: string;
|
|
4996
|
+
args?: Record<string, unknown> | undefined;
|
|
4997
|
+
argUnits?: Record<string, string> | undefined;
|
|
4998
|
+
} | {
|
|
4999
|
+
kind: "wait";
|
|
5000
|
+
seconds: number;
|
|
5001
|
+
} | {
|
|
5002
|
+
kind: "action";
|
|
5003
|
+
actionId: string;
|
|
5004
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
5005
|
+
} | {
|
|
5006
|
+
kind: "code";
|
|
5007
|
+
code: string;
|
|
5008
|
+
})[];
|
|
5009
|
+
runMode?: {
|
|
5010
|
+
mode: "single";
|
|
5011
|
+
} | {
|
|
5012
|
+
mode: "restart";
|
|
5013
|
+
} | {
|
|
5014
|
+
mode: "queued";
|
|
5015
|
+
max: number;
|
|
5016
|
+
} | {
|
|
5017
|
+
mode: "parallel";
|
|
5018
|
+
max: number;
|
|
5019
|
+
} | {
|
|
5020
|
+
mode: "cooldown";
|
|
5021
|
+
minutes: number;
|
|
5022
|
+
} | undefined;
|
|
5023
|
+
keepTraces?: number | undefined;
|
|
5024
|
+
}>>]>;
|
|
3575
5025
|
}, z.core.$strip>, z.ZodObject<{
|
|
3576
5026
|
kind: z.ZodLiteral<"composition">;
|
|
3577
5027
|
composition: z.ZodObject<{
|
|
@@ -3826,7 +5276,44 @@ export declare const coreBlocksCapability: {
|
|
|
3826
5276
|
kind: z.ZodLiteral<"code">;
|
|
3827
5277
|
}, z.core.$strip>, z.ZodObject<{
|
|
3828
5278
|
kind: z.ZodLiteral<"recipe">;
|
|
3829
|
-
recipe: z.ZodObject<{
|
|
5279
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
5280
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
5281
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5282
|
+
kind: z.ZodLiteral<"wait">;
|
|
5283
|
+
seconds: z.ZodNumber;
|
|
5284
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5285
|
+
kind: z.ZodLiteral<"cap">;
|
|
5286
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
5287
|
+
$var: z.ZodString;
|
|
5288
|
+
}, z.core.$strip>]>;
|
|
5289
|
+
cap: z.ZodString;
|
|
5290
|
+
method: z.ZodString;
|
|
5291
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5292
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5293
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5294
|
+
kind: z.ZodLiteral<"action">;
|
|
5295
|
+
actionId: z.ZodString;
|
|
5296
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
5297
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5298
|
+
kind: z.ZodLiteral<"code">;
|
|
5299
|
+
code: z.ZodString;
|
|
5300
|
+
}, z.core.$strip>], "kind">>;
|
|
5301
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5302
|
+
mode: z.ZodLiteral<"single">;
|
|
5303
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5304
|
+
mode: z.ZodLiteral<"restart">;
|
|
5305
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5306
|
+
mode: z.ZodLiteral<"queued">;
|
|
5307
|
+
max: z.ZodNumber;
|
|
5308
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5309
|
+
mode: z.ZodLiteral<"parallel">;
|
|
5310
|
+
max: z.ZodNumber;
|
|
5311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5312
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
5313
|
+
minutes: z.ZodNumber;
|
|
5314
|
+
}, z.core.$strip>], "mode">>;
|
|
5315
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
5316
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
3830
5317
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3831
5318
|
kind: z.ZodLiteral<"device-state">;
|
|
3832
5319
|
deviceId: z.ZodNumber;
|
|
@@ -3864,7 +5351,7 @@ export declare const coreBlocksCapability: {
|
|
|
3864
5351
|
kind: z.ZodLiteral<"interval">;
|
|
3865
5352
|
minutes: z.ZodNumber;
|
|
3866
5353
|
}, z.core.$strip>], "kind">>;
|
|
3867
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
5354
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
3868
5355
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3869
5356
|
kind: z.ZodLiteral<"wait">;
|
|
3870
5357
|
seconds: z.ZodNumber;
|
|
@@ -3900,7 +5387,115 @@ export declare const coreBlocksCapability: {
|
|
|
3900
5387
|
minutes: z.ZodNumber;
|
|
3901
5388
|
}, z.core.$strip>], "mode">>;
|
|
3902
5389
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
3903
|
-
}, z.core.$strip
|
|
5390
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5391
|
+
when: import("../index.js").AutomationWhen;
|
|
5392
|
+
actions: ({
|
|
5393
|
+
kind: "cap";
|
|
5394
|
+
deviceId: number | number[] | {
|
|
5395
|
+
$var: string;
|
|
5396
|
+
};
|
|
5397
|
+
cap: string;
|
|
5398
|
+
method: string;
|
|
5399
|
+
args?: Record<string, unknown> | undefined;
|
|
5400
|
+
argUnits?: Record<string, string> | undefined;
|
|
5401
|
+
} | {
|
|
5402
|
+
kind: "wait";
|
|
5403
|
+
seconds: number;
|
|
5404
|
+
} | {
|
|
5405
|
+
kind: "action";
|
|
5406
|
+
actionId: string;
|
|
5407
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
5408
|
+
} | {
|
|
5409
|
+
kind: "code";
|
|
5410
|
+
code: string;
|
|
5411
|
+
})[];
|
|
5412
|
+
runMode?: {
|
|
5413
|
+
mode: "single";
|
|
5414
|
+
} | {
|
|
5415
|
+
mode: "restart";
|
|
5416
|
+
} | {
|
|
5417
|
+
mode: "queued";
|
|
5418
|
+
max: number;
|
|
5419
|
+
} | {
|
|
5420
|
+
mode: "parallel";
|
|
5421
|
+
max: number;
|
|
5422
|
+
} | {
|
|
5423
|
+
mode: "cooldown";
|
|
5424
|
+
minutes: number;
|
|
5425
|
+
} | undefined;
|
|
5426
|
+
keepTraces?: number | undefined;
|
|
5427
|
+
}, {
|
|
5428
|
+
triggers: ({
|
|
5429
|
+
kind: "device-state";
|
|
5430
|
+
deviceId: number;
|
|
5431
|
+
cap: string;
|
|
5432
|
+
fieldPath: string;
|
|
5433
|
+
becomes?: string | number | boolean | undefined;
|
|
5434
|
+
edge?: boolean | undefined;
|
|
5435
|
+
forMs?: number | undefined;
|
|
5436
|
+
debounceMs?: number | undefined;
|
|
5437
|
+
} | {
|
|
5438
|
+
kind: "device-event";
|
|
5439
|
+
category: string;
|
|
5440
|
+
deviceId?: number | undefined;
|
|
5441
|
+
} | {
|
|
5442
|
+
kind: "schedule";
|
|
5443
|
+
cron: string;
|
|
5444
|
+
} | {
|
|
5445
|
+
kind: "manual";
|
|
5446
|
+
} | {
|
|
5447
|
+
kind: "detection";
|
|
5448
|
+
classes: string[];
|
|
5449
|
+
deviceIds: number[];
|
|
5450
|
+
zones?: string[] | undefined;
|
|
5451
|
+
minScore?: number | undefined;
|
|
5452
|
+
} | {
|
|
5453
|
+
kind: "stationary";
|
|
5454
|
+
deviceIds: number[];
|
|
5455
|
+
classes?: string[] | undefined;
|
|
5456
|
+
zones?: string[] | undefined;
|
|
5457
|
+
phase: "appeared" | "departed";
|
|
5458
|
+
} | {
|
|
5459
|
+
kind: "interval";
|
|
5460
|
+
minutes: number;
|
|
5461
|
+
})[];
|
|
5462
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
5463
|
+
actions: ({
|
|
5464
|
+
kind: "cap";
|
|
5465
|
+
deviceId: number | number[] | {
|
|
5466
|
+
$var: string;
|
|
5467
|
+
};
|
|
5468
|
+
cap: string;
|
|
5469
|
+
method: string;
|
|
5470
|
+
args?: Record<string, unknown> | undefined;
|
|
5471
|
+
argUnits?: Record<string, string> | undefined;
|
|
5472
|
+
} | {
|
|
5473
|
+
kind: "wait";
|
|
5474
|
+
seconds: number;
|
|
5475
|
+
} | {
|
|
5476
|
+
kind: "action";
|
|
5477
|
+
actionId: string;
|
|
5478
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
5479
|
+
} | {
|
|
5480
|
+
kind: "code";
|
|
5481
|
+
code: string;
|
|
5482
|
+
})[];
|
|
5483
|
+
runMode?: {
|
|
5484
|
+
mode: "single";
|
|
5485
|
+
} | {
|
|
5486
|
+
mode: "restart";
|
|
5487
|
+
} | {
|
|
5488
|
+
mode: "queued";
|
|
5489
|
+
max: number;
|
|
5490
|
+
} | {
|
|
5491
|
+
mode: "parallel";
|
|
5492
|
+
max: number;
|
|
5493
|
+
} | {
|
|
5494
|
+
mode: "cooldown";
|
|
5495
|
+
minutes: number;
|
|
5496
|
+
} | undefined;
|
|
5497
|
+
keepTraces?: number | undefined;
|
|
5498
|
+
}>>]>;
|
|
3904
5499
|
}, z.core.$strip>, z.ZodObject<{
|
|
3905
5500
|
kind: z.ZodLiteral<"composition">;
|
|
3906
5501
|
composition: z.ZodObject<{
|
|
@@ -4160,7 +5755,44 @@ export declare const coreBlocksCapability: {
|
|
|
4160
5755
|
kind: z.ZodLiteral<"code">;
|
|
4161
5756
|
}, z.core.$strip>, z.ZodObject<{
|
|
4162
5757
|
kind: z.ZodLiteral<"recipe">;
|
|
4163
|
-
recipe: z.ZodObject<{
|
|
5758
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
5759
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
5760
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5761
|
+
kind: z.ZodLiteral<"wait">;
|
|
5762
|
+
seconds: z.ZodNumber;
|
|
5763
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5764
|
+
kind: z.ZodLiteral<"cap">;
|
|
5765
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
5766
|
+
$var: z.ZodString;
|
|
5767
|
+
}, z.core.$strip>]>;
|
|
5768
|
+
cap: z.ZodString;
|
|
5769
|
+
method: z.ZodString;
|
|
5770
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5771
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5772
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5773
|
+
kind: z.ZodLiteral<"action">;
|
|
5774
|
+
actionId: z.ZodString;
|
|
5775
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
5776
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5777
|
+
kind: z.ZodLiteral<"code">;
|
|
5778
|
+
code: z.ZodString;
|
|
5779
|
+
}, z.core.$strip>], "kind">>;
|
|
5780
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5781
|
+
mode: z.ZodLiteral<"single">;
|
|
5782
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5783
|
+
mode: z.ZodLiteral<"restart">;
|
|
5784
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5785
|
+
mode: z.ZodLiteral<"queued">;
|
|
5786
|
+
max: z.ZodNumber;
|
|
5787
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5788
|
+
mode: z.ZodLiteral<"parallel">;
|
|
5789
|
+
max: z.ZodNumber;
|
|
5790
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5791
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
5792
|
+
minutes: z.ZodNumber;
|
|
5793
|
+
}, z.core.$strip>], "mode">>;
|
|
5794
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
5795
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
4164
5796
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4165
5797
|
kind: z.ZodLiteral<"device-state">;
|
|
4166
5798
|
deviceId: z.ZodNumber;
|
|
@@ -4198,7 +5830,7 @@ export declare const coreBlocksCapability: {
|
|
|
4198
5830
|
kind: z.ZodLiteral<"interval">;
|
|
4199
5831
|
minutes: z.ZodNumber;
|
|
4200
5832
|
}, z.core.$strip>], "kind">>;
|
|
4201
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
5833
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
4202
5834
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4203
5835
|
kind: z.ZodLiteral<"wait">;
|
|
4204
5836
|
seconds: z.ZodNumber;
|
|
@@ -4234,7 +5866,115 @@ export declare const coreBlocksCapability: {
|
|
|
4234
5866
|
minutes: z.ZodNumber;
|
|
4235
5867
|
}, z.core.$strip>], "mode">>;
|
|
4236
5868
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
4237
|
-
}, z.core.$strip
|
|
5869
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5870
|
+
when: import("../index.js").AutomationWhen;
|
|
5871
|
+
actions: ({
|
|
5872
|
+
kind: "cap";
|
|
5873
|
+
deviceId: number | number[] | {
|
|
5874
|
+
$var: string;
|
|
5875
|
+
};
|
|
5876
|
+
cap: string;
|
|
5877
|
+
method: string;
|
|
5878
|
+
args?: Record<string, unknown> | undefined;
|
|
5879
|
+
argUnits?: Record<string, string> | undefined;
|
|
5880
|
+
} | {
|
|
5881
|
+
kind: "wait";
|
|
5882
|
+
seconds: number;
|
|
5883
|
+
} | {
|
|
5884
|
+
kind: "action";
|
|
5885
|
+
actionId: string;
|
|
5886
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
5887
|
+
} | {
|
|
5888
|
+
kind: "code";
|
|
5889
|
+
code: string;
|
|
5890
|
+
})[];
|
|
5891
|
+
runMode?: {
|
|
5892
|
+
mode: "single";
|
|
5893
|
+
} | {
|
|
5894
|
+
mode: "restart";
|
|
5895
|
+
} | {
|
|
5896
|
+
mode: "queued";
|
|
5897
|
+
max: number;
|
|
5898
|
+
} | {
|
|
5899
|
+
mode: "parallel";
|
|
5900
|
+
max: number;
|
|
5901
|
+
} | {
|
|
5902
|
+
mode: "cooldown";
|
|
5903
|
+
minutes: number;
|
|
5904
|
+
} | undefined;
|
|
5905
|
+
keepTraces?: number | undefined;
|
|
5906
|
+
}, {
|
|
5907
|
+
triggers: ({
|
|
5908
|
+
kind: "device-state";
|
|
5909
|
+
deviceId: number;
|
|
5910
|
+
cap: string;
|
|
5911
|
+
fieldPath: string;
|
|
5912
|
+
becomes?: string | number | boolean | undefined;
|
|
5913
|
+
edge?: boolean | undefined;
|
|
5914
|
+
forMs?: number | undefined;
|
|
5915
|
+
debounceMs?: number | undefined;
|
|
5916
|
+
} | {
|
|
5917
|
+
kind: "device-event";
|
|
5918
|
+
category: string;
|
|
5919
|
+
deviceId?: number | undefined;
|
|
5920
|
+
} | {
|
|
5921
|
+
kind: "schedule";
|
|
5922
|
+
cron: string;
|
|
5923
|
+
} | {
|
|
5924
|
+
kind: "manual";
|
|
5925
|
+
} | {
|
|
5926
|
+
kind: "detection";
|
|
5927
|
+
classes: string[];
|
|
5928
|
+
deviceIds: number[];
|
|
5929
|
+
zones?: string[] | undefined;
|
|
5930
|
+
minScore?: number | undefined;
|
|
5931
|
+
} | {
|
|
5932
|
+
kind: "stationary";
|
|
5933
|
+
deviceIds: number[];
|
|
5934
|
+
classes?: string[] | undefined;
|
|
5935
|
+
zones?: string[] | undefined;
|
|
5936
|
+
phase: "appeared" | "departed";
|
|
5937
|
+
} | {
|
|
5938
|
+
kind: "interval";
|
|
5939
|
+
minutes: number;
|
|
5940
|
+
})[];
|
|
5941
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
5942
|
+
actions: ({
|
|
5943
|
+
kind: "cap";
|
|
5944
|
+
deviceId: number | number[] | {
|
|
5945
|
+
$var: string;
|
|
5946
|
+
};
|
|
5947
|
+
cap: string;
|
|
5948
|
+
method: string;
|
|
5949
|
+
args?: Record<string, unknown> | undefined;
|
|
5950
|
+
argUnits?: Record<string, string> | undefined;
|
|
5951
|
+
} | {
|
|
5952
|
+
kind: "wait";
|
|
5953
|
+
seconds: number;
|
|
5954
|
+
} | {
|
|
5955
|
+
kind: "action";
|
|
5956
|
+
actionId: string;
|
|
5957
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
5958
|
+
} | {
|
|
5959
|
+
kind: "code";
|
|
5960
|
+
code: string;
|
|
5961
|
+
})[];
|
|
5962
|
+
runMode?: {
|
|
5963
|
+
mode: "single";
|
|
5964
|
+
} | {
|
|
5965
|
+
mode: "restart";
|
|
5966
|
+
} | {
|
|
5967
|
+
mode: "queued";
|
|
5968
|
+
max: number;
|
|
5969
|
+
} | {
|
|
5970
|
+
mode: "parallel";
|
|
5971
|
+
max: number;
|
|
5972
|
+
} | {
|
|
5973
|
+
mode: "cooldown";
|
|
5974
|
+
minutes: number;
|
|
5975
|
+
} | undefined;
|
|
5976
|
+
keepTraces?: number | undefined;
|
|
5977
|
+
}>>]>;
|
|
4238
5978
|
}, z.core.$strip>, z.ZodObject<{
|
|
4239
5979
|
kind: z.ZodLiteral<"composition">;
|
|
4240
5980
|
composition: z.ZodObject<{
|
|
@@ -4800,7 +6540,44 @@ export declare const coreBlocksCapability: {
|
|
|
4800
6540
|
kind: z.ZodLiteral<"code">;
|
|
4801
6541
|
}, z.core.$strip>, z.ZodObject<{
|
|
4802
6542
|
kind: z.ZodLiteral<"recipe">;
|
|
4803
|
-
recipe: z.ZodObject<{
|
|
6543
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
6544
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
6545
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6546
|
+
kind: z.ZodLiteral<"wait">;
|
|
6547
|
+
seconds: z.ZodNumber;
|
|
6548
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6549
|
+
kind: z.ZodLiteral<"cap">;
|
|
6550
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
6551
|
+
$var: z.ZodString;
|
|
6552
|
+
}, z.core.$strip>]>;
|
|
6553
|
+
cap: z.ZodString;
|
|
6554
|
+
method: z.ZodString;
|
|
6555
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6556
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6557
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6558
|
+
kind: z.ZodLiteral<"action">;
|
|
6559
|
+
actionId: z.ZodString;
|
|
6560
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
6561
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6562
|
+
kind: z.ZodLiteral<"code">;
|
|
6563
|
+
code: z.ZodString;
|
|
6564
|
+
}, z.core.$strip>], "kind">>;
|
|
6565
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6566
|
+
mode: z.ZodLiteral<"single">;
|
|
6567
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6568
|
+
mode: z.ZodLiteral<"restart">;
|
|
6569
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6570
|
+
mode: z.ZodLiteral<"queued">;
|
|
6571
|
+
max: z.ZodNumber;
|
|
6572
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6573
|
+
mode: z.ZodLiteral<"parallel">;
|
|
6574
|
+
max: z.ZodNumber;
|
|
6575
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6576
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
6577
|
+
minutes: z.ZodNumber;
|
|
6578
|
+
}, z.core.$strip>], "mode">>;
|
|
6579
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
6580
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
4804
6581
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4805
6582
|
kind: z.ZodLiteral<"device-state">;
|
|
4806
6583
|
deviceId: z.ZodNumber;
|
|
@@ -4838,7 +6615,7 @@ export declare const coreBlocksCapability: {
|
|
|
4838
6615
|
kind: z.ZodLiteral<"interval">;
|
|
4839
6616
|
minutes: z.ZodNumber;
|
|
4840
6617
|
}, z.core.$strip>], "kind">>;
|
|
4841
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
6618
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
4842
6619
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4843
6620
|
kind: z.ZodLiteral<"wait">;
|
|
4844
6621
|
seconds: z.ZodNumber;
|
|
@@ -4874,7 +6651,115 @@ export declare const coreBlocksCapability: {
|
|
|
4874
6651
|
minutes: z.ZodNumber;
|
|
4875
6652
|
}, z.core.$strip>], "mode">>;
|
|
4876
6653
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
4877
|
-
}, z.core.$strip
|
|
6654
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
6655
|
+
when: import("../index.js").AutomationWhen;
|
|
6656
|
+
actions: ({
|
|
6657
|
+
kind: "cap";
|
|
6658
|
+
deviceId: number | number[] | {
|
|
6659
|
+
$var: string;
|
|
6660
|
+
};
|
|
6661
|
+
cap: string;
|
|
6662
|
+
method: string;
|
|
6663
|
+
args?: Record<string, unknown> | undefined;
|
|
6664
|
+
argUnits?: Record<string, string> | undefined;
|
|
6665
|
+
} | {
|
|
6666
|
+
kind: "wait";
|
|
6667
|
+
seconds: number;
|
|
6668
|
+
} | {
|
|
6669
|
+
kind: "action";
|
|
6670
|
+
actionId: string;
|
|
6671
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
6672
|
+
} | {
|
|
6673
|
+
kind: "code";
|
|
6674
|
+
code: string;
|
|
6675
|
+
})[];
|
|
6676
|
+
runMode?: {
|
|
6677
|
+
mode: "single";
|
|
6678
|
+
} | {
|
|
6679
|
+
mode: "restart";
|
|
6680
|
+
} | {
|
|
6681
|
+
mode: "queued";
|
|
6682
|
+
max: number;
|
|
6683
|
+
} | {
|
|
6684
|
+
mode: "parallel";
|
|
6685
|
+
max: number;
|
|
6686
|
+
} | {
|
|
6687
|
+
mode: "cooldown";
|
|
6688
|
+
minutes: number;
|
|
6689
|
+
} | undefined;
|
|
6690
|
+
keepTraces?: number | undefined;
|
|
6691
|
+
}, {
|
|
6692
|
+
triggers: ({
|
|
6693
|
+
kind: "device-state";
|
|
6694
|
+
deviceId: number;
|
|
6695
|
+
cap: string;
|
|
6696
|
+
fieldPath: string;
|
|
6697
|
+
becomes?: string | number | boolean | undefined;
|
|
6698
|
+
edge?: boolean | undefined;
|
|
6699
|
+
forMs?: number | undefined;
|
|
6700
|
+
debounceMs?: number | undefined;
|
|
6701
|
+
} | {
|
|
6702
|
+
kind: "device-event";
|
|
6703
|
+
category: string;
|
|
6704
|
+
deviceId?: number | undefined;
|
|
6705
|
+
} | {
|
|
6706
|
+
kind: "schedule";
|
|
6707
|
+
cron: string;
|
|
6708
|
+
} | {
|
|
6709
|
+
kind: "manual";
|
|
6710
|
+
} | {
|
|
6711
|
+
kind: "detection";
|
|
6712
|
+
classes: string[];
|
|
6713
|
+
deviceIds: number[];
|
|
6714
|
+
zones?: string[] | undefined;
|
|
6715
|
+
minScore?: number | undefined;
|
|
6716
|
+
} | {
|
|
6717
|
+
kind: "stationary";
|
|
6718
|
+
deviceIds: number[];
|
|
6719
|
+
classes?: string[] | undefined;
|
|
6720
|
+
zones?: string[] | undefined;
|
|
6721
|
+
phase: "appeared" | "departed";
|
|
6722
|
+
} | {
|
|
6723
|
+
kind: "interval";
|
|
6724
|
+
minutes: number;
|
|
6725
|
+
})[];
|
|
6726
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
6727
|
+
actions: ({
|
|
6728
|
+
kind: "cap";
|
|
6729
|
+
deviceId: number | number[] | {
|
|
6730
|
+
$var: string;
|
|
6731
|
+
};
|
|
6732
|
+
cap: string;
|
|
6733
|
+
method: string;
|
|
6734
|
+
args?: Record<string, unknown> | undefined;
|
|
6735
|
+
argUnits?: Record<string, string> | undefined;
|
|
6736
|
+
} | {
|
|
6737
|
+
kind: "wait";
|
|
6738
|
+
seconds: number;
|
|
6739
|
+
} | {
|
|
6740
|
+
kind: "action";
|
|
6741
|
+
actionId: string;
|
|
6742
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
6743
|
+
} | {
|
|
6744
|
+
kind: "code";
|
|
6745
|
+
code: string;
|
|
6746
|
+
})[];
|
|
6747
|
+
runMode?: {
|
|
6748
|
+
mode: "single";
|
|
6749
|
+
} | {
|
|
6750
|
+
mode: "restart";
|
|
6751
|
+
} | {
|
|
6752
|
+
mode: "queued";
|
|
6753
|
+
max: number;
|
|
6754
|
+
} | {
|
|
6755
|
+
mode: "parallel";
|
|
6756
|
+
max: number;
|
|
6757
|
+
} | {
|
|
6758
|
+
mode: "cooldown";
|
|
6759
|
+
minutes: number;
|
|
6760
|
+
} | undefined;
|
|
6761
|
+
keepTraces?: number | undefined;
|
|
6762
|
+
}>>]>;
|
|
4878
6763
|
}, z.core.$strip>, z.ZodObject<{
|
|
4879
6764
|
kind: z.ZodLiteral<"composition">;
|
|
4880
6765
|
composition: z.ZodObject<{
|
|
@@ -5344,7 +7229,44 @@ export declare const coreBlocksCapability: {
|
|
|
5344
7229
|
kind: z.ZodLiteral<"code">;
|
|
5345
7230
|
}, z.core.$strip>, z.ZodObject<{
|
|
5346
7231
|
kind: z.ZodLiteral<"recipe">;
|
|
5347
|
-
recipe: z.ZodObject<{
|
|
7232
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
7233
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
7234
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7235
|
+
kind: z.ZodLiteral<"wait">;
|
|
7236
|
+
seconds: z.ZodNumber;
|
|
7237
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7238
|
+
kind: z.ZodLiteral<"cap">;
|
|
7239
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
7240
|
+
$var: z.ZodString;
|
|
7241
|
+
}, z.core.$strip>]>;
|
|
7242
|
+
cap: z.ZodString;
|
|
7243
|
+
method: z.ZodString;
|
|
7244
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7245
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7246
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7247
|
+
kind: z.ZodLiteral<"action">;
|
|
7248
|
+
actionId: z.ZodString;
|
|
7249
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
7250
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7251
|
+
kind: z.ZodLiteral<"code">;
|
|
7252
|
+
code: z.ZodString;
|
|
7253
|
+
}, z.core.$strip>], "kind">>;
|
|
7254
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7255
|
+
mode: z.ZodLiteral<"single">;
|
|
7256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7257
|
+
mode: z.ZodLiteral<"restart">;
|
|
7258
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7259
|
+
mode: z.ZodLiteral<"queued">;
|
|
7260
|
+
max: z.ZodNumber;
|
|
7261
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7262
|
+
mode: z.ZodLiteral<"parallel">;
|
|
7263
|
+
max: z.ZodNumber;
|
|
7264
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7265
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
7266
|
+
minutes: z.ZodNumber;
|
|
7267
|
+
}, z.core.$strip>], "mode">>;
|
|
7268
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
7269
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
5348
7270
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5349
7271
|
kind: z.ZodLiteral<"device-state">;
|
|
5350
7272
|
deviceId: z.ZodNumber;
|
|
@@ -5382,7 +7304,7 @@ export declare const coreBlocksCapability: {
|
|
|
5382
7304
|
kind: z.ZodLiteral<"interval">;
|
|
5383
7305
|
minutes: z.ZodNumber;
|
|
5384
7306
|
}, z.core.$strip>], "kind">>;
|
|
5385
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
7307
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
5386
7308
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5387
7309
|
kind: z.ZodLiteral<"wait">;
|
|
5388
7310
|
seconds: z.ZodNumber;
|
|
@@ -5418,7 +7340,115 @@ export declare const coreBlocksCapability: {
|
|
|
5418
7340
|
minutes: z.ZodNumber;
|
|
5419
7341
|
}, z.core.$strip>], "mode">>;
|
|
5420
7342
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
5421
|
-
}, z.core.$strip
|
|
7343
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
7344
|
+
when: import("../index.js").AutomationWhen;
|
|
7345
|
+
actions: ({
|
|
7346
|
+
kind: "cap";
|
|
7347
|
+
deviceId: number | number[] | {
|
|
7348
|
+
$var: string;
|
|
7349
|
+
};
|
|
7350
|
+
cap: string;
|
|
7351
|
+
method: string;
|
|
7352
|
+
args?: Record<string, unknown> | undefined;
|
|
7353
|
+
argUnits?: Record<string, string> | undefined;
|
|
7354
|
+
} | {
|
|
7355
|
+
kind: "wait";
|
|
7356
|
+
seconds: number;
|
|
7357
|
+
} | {
|
|
7358
|
+
kind: "action";
|
|
7359
|
+
actionId: string;
|
|
7360
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
7361
|
+
} | {
|
|
7362
|
+
kind: "code";
|
|
7363
|
+
code: string;
|
|
7364
|
+
})[];
|
|
7365
|
+
runMode?: {
|
|
7366
|
+
mode: "single";
|
|
7367
|
+
} | {
|
|
7368
|
+
mode: "restart";
|
|
7369
|
+
} | {
|
|
7370
|
+
mode: "queued";
|
|
7371
|
+
max: number;
|
|
7372
|
+
} | {
|
|
7373
|
+
mode: "parallel";
|
|
7374
|
+
max: number;
|
|
7375
|
+
} | {
|
|
7376
|
+
mode: "cooldown";
|
|
7377
|
+
minutes: number;
|
|
7378
|
+
} | undefined;
|
|
7379
|
+
keepTraces?: number | undefined;
|
|
7380
|
+
}, {
|
|
7381
|
+
triggers: ({
|
|
7382
|
+
kind: "device-state";
|
|
7383
|
+
deviceId: number;
|
|
7384
|
+
cap: string;
|
|
7385
|
+
fieldPath: string;
|
|
7386
|
+
becomes?: string | number | boolean | undefined;
|
|
7387
|
+
edge?: boolean | undefined;
|
|
7388
|
+
forMs?: number | undefined;
|
|
7389
|
+
debounceMs?: number | undefined;
|
|
7390
|
+
} | {
|
|
7391
|
+
kind: "device-event";
|
|
7392
|
+
category: string;
|
|
7393
|
+
deviceId?: number | undefined;
|
|
7394
|
+
} | {
|
|
7395
|
+
kind: "schedule";
|
|
7396
|
+
cron: string;
|
|
7397
|
+
} | {
|
|
7398
|
+
kind: "manual";
|
|
7399
|
+
} | {
|
|
7400
|
+
kind: "detection";
|
|
7401
|
+
classes: string[];
|
|
7402
|
+
deviceIds: number[];
|
|
7403
|
+
zones?: string[] | undefined;
|
|
7404
|
+
minScore?: number | undefined;
|
|
7405
|
+
} | {
|
|
7406
|
+
kind: "stationary";
|
|
7407
|
+
deviceIds: number[];
|
|
7408
|
+
classes?: string[] | undefined;
|
|
7409
|
+
zones?: string[] | undefined;
|
|
7410
|
+
phase: "appeared" | "departed";
|
|
7411
|
+
} | {
|
|
7412
|
+
kind: "interval";
|
|
7413
|
+
minutes: number;
|
|
7414
|
+
})[];
|
|
7415
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
7416
|
+
actions: ({
|
|
7417
|
+
kind: "cap";
|
|
7418
|
+
deviceId: number | number[] | {
|
|
7419
|
+
$var: string;
|
|
7420
|
+
};
|
|
7421
|
+
cap: string;
|
|
7422
|
+
method: string;
|
|
7423
|
+
args?: Record<string, unknown> | undefined;
|
|
7424
|
+
argUnits?: Record<string, string> | undefined;
|
|
7425
|
+
} | {
|
|
7426
|
+
kind: "wait";
|
|
7427
|
+
seconds: number;
|
|
7428
|
+
} | {
|
|
7429
|
+
kind: "action";
|
|
7430
|
+
actionId: string;
|
|
7431
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
7432
|
+
} | {
|
|
7433
|
+
kind: "code";
|
|
7434
|
+
code: string;
|
|
7435
|
+
})[];
|
|
7436
|
+
runMode?: {
|
|
7437
|
+
mode: "single";
|
|
7438
|
+
} | {
|
|
7439
|
+
mode: "restart";
|
|
7440
|
+
} | {
|
|
7441
|
+
mode: "queued";
|
|
7442
|
+
max: number;
|
|
7443
|
+
} | {
|
|
7444
|
+
mode: "parallel";
|
|
7445
|
+
max: number;
|
|
7446
|
+
} | {
|
|
7447
|
+
mode: "cooldown";
|
|
7448
|
+
minutes: number;
|
|
7449
|
+
} | undefined;
|
|
7450
|
+
keepTraces?: number | undefined;
|
|
7451
|
+
}>>]>;
|
|
5422
7452
|
}, z.core.$strip>, z.ZodObject<{
|
|
5423
7453
|
kind: z.ZodLiteral<"composition">;
|
|
5424
7454
|
composition: z.ZodObject<{
|
|
@@ -5670,7 +7700,44 @@ export declare const coreBlocksCapability: {
|
|
|
5670
7700
|
kind: z.ZodLiteral<"code">;
|
|
5671
7701
|
}, z.core.$strip>, z.ZodObject<{
|
|
5672
7702
|
kind: z.ZodLiteral<"recipe">;
|
|
5673
|
-
recipe: z.ZodObject<{
|
|
7703
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
7704
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
7705
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7706
|
+
kind: z.ZodLiteral<"wait">;
|
|
7707
|
+
seconds: z.ZodNumber;
|
|
7708
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7709
|
+
kind: z.ZodLiteral<"cap">;
|
|
7710
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
7711
|
+
$var: z.ZodString;
|
|
7712
|
+
}, z.core.$strip>]>;
|
|
7713
|
+
cap: z.ZodString;
|
|
7714
|
+
method: z.ZodString;
|
|
7715
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7716
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7717
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7718
|
+
kind: z.ZodLiteral<"action">;
|
|
7719
|
+
actionId: z.ZodString;
|
|
7720
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
7721
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7722
|
+
kind: z.ZodLiteral<"code">;
|
|
7723
|
+
code: z.ZodString;
|
|
7724
|
+
}, z.core.$strip>], "kind">>;
|
|
7725
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7726
|
+
mode: z.ZodLiteral<"single">;
|
|
7727
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7728
|
+
mode: z.ZodLiteral<"restart">;
|
|
7729
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7730
|
+
mode: z.ZodLiteral<"queued">;
|
|
7731
|
+
max: z.ZodNumber;
|
|
7732
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7733
|
+
mode: z.ZodLiteral<"parallel">;
|
|
7734
|
+
max: z.ZodNumber;
|
|
7735
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7736
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
7737
|
+
minutes: z.ZodNumber;
|
|
7738
|
+
}, z.core.$strip>], "mode">>;
|
|
7739
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
7740
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
5674
7741
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5675
7742
|
kind: z.ZodLiteral<"device-state">;
|
|
5676
7743
|
deviceId: z.ZodNumber;
|
|
@@ -5708,7 +7775,7 @@ export declare const coreBlocksCapability: {
|
|
|
5708
7775
|
kind: z.ZodLiteral<"interval">;
|
|
5709
7776
|
minutes: z.ZodNumber;
|
|
5710
7777
|
}, z.core.$strip>], "kind">>;
|
|
5711
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
7778
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
5712
7779
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5713
7780
|
kind: z.ZodLiteral<"wait">;
|
|
5714
7781
|
seconds: z.ZodNumber;
|
|
@@ -5744,7 +7811,115 @@ export declare const coreBlocksCapability: {
|
|
|
5744
7811
|
minutes: z.ZodNumber;
|
|
5745
7812
|
}, z.core.$strip>], "mode">>;
|
|
5746
7813
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
5747
|
-
}, z.core.$strip
|
|
7814
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
7815
|
+
when: import("../index.js").AutomationWhen;
|
|
7816
|
+
actions: ({
|
|
7817
|
+
kind: "cap";
|
|
7818
|
+
deviceId: number | number[] | {
|
|
7819
|
+
$var: string;
|
|
7820
|
+
};
|
|
7821
|
+
cap: string;
|
|
7822
|
+
method: string;
|
|
7823
|
+
args?: Record<string, unknown> | undefined;
|
|
7824
|
+
argUnits?: Record<string, string> | undefined;
|
|
7825
|
+
} | {
|
|
7826
|
+
kind: "wait";
|
|
7827
|
+
seconds: number;
|
|
7828
|
+
} | {
|
|
7829
|
+
kind: "action";
|
|
7830
|
+
actionId: string;
|
|
7831
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
7832
|
+
} | {
|
|
7833
|
+
kind: "code";
|
|
7834
|
+
code: string;
|
|
7835
|
+
})[];
|
|
7836
|
+
runMode?: {
|
|
7837
|
+
mode: "single";
|
|
7838
|
+
} | {
|
|
7839
|
+
mode: "restart";
|
|
7840
|
+
} | {
|
|
7841
|
+
mode: "queued";
|
|
7842
|
+
max: number;
|
|
7843
|
+
} | {
|
|
7844
|
+
mode: "parallel";
|
|
7845
|
+
max: number;
|
|
7846
|
+
} | {
|
|
7847
|
+
mode: "cooldown";
|
|
7848
|
+
minutes: number;
|
|
7849
|
+
} | undefined;
|
|
7850
|
+
keepTraces?: number | undefined;
|
|
7851
|
+
}, {
|
|
7852
|
+
triggers: ({
|
|
7853
|
+
kind: "device-state";
|
|
7854
|
+
deviceId: number;
|
|
7855
|
+
cap: string;
|
|
7856
|
+
fieldPath: string;
|
|
7857
|
+
becomes?: string | number | boolean | undefined;
|
|
7858
|
+
edge?: boolean | undefined;
|
|
7859
|
+
forMs?: number | undefined;
|
|
7860
|
+
debounceMs?: number | undefined;
|
|
7861
|
+
} | {
|
|
7862
|
+
kind: "device-event";
|
|
7863
|
+
category: string;
|
|
7864
|
+
deviceId?: number | undefined;
|
|
7865
|
+
} | {
|
|
7866
|
+
kind: "schedule";
|
|
7867
|
+
cron: string;
|
|
7868
|
+
} | {
|
|
7869
|
+
kind: "manual";
|
|
7870
|
+
} | {
|
|
7871
|
+
kind: "detection";
|
|
7872
|
+
classes: string[];
|
|
7873
|
+
deviceIds: number[];
|
|
7874
|
+
zones?: string[] | undefined;
|
|
7875
|
+
minScore?: number | undefined;
|
|
7876
|
+
} | {
|
|
7877
|
+
kind: "stationary";
|
|
7878
|
+
deviceIds: number[];
|
|
7879
|
+
classes?: string[] | undefined;
|
|
7880
|
+
zones?: string[] | undefined;
|
|
7881
|
+
phase: "appeared" | "departed";
|
|
7882
|
+
} | {
|
|
7883
|
+
kind: "interval";
|
|
7884
|
+
minutes: number;
|
|
7885
|
+
})[];
|
|
7886
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
7887
|
+
actions: ({
|
|
7888
|
+
kind: "cap";
|
|
7889
|
+
deviceId: number | number[] | {
|
|
7890
|
+
$var: string;
|
|
7891
|
+
};
|
|
7892
|
+
cap: string;
|
|
7893
|
+
method: string;
|
|
7894
|
+
args?: Record<string, unknown> | undefined;
|
|
7895
|
+
argUnits?: Record<string, string> | undefined;
|
|
7896
|
+
} | {
|
|
7897
|
+
kind: "wait";
|
|
7898
|
+
seconds: number;
|
|
7899
|
+
} | {
|
|
7900
|
+
kind: "action";
|
|
7901
|
+
actionId: string;
|
|
7902
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
7903
|
+
} | {
|
|
7904
|
+
kind: "code";
|
|
7905
|
+
code: string;
|
|
7906
|
+
})[];
|
|
7907
|
+
runMode?: {
|
|
7908
|
+
mode: "single";
|
|
7909
|
+
} | {
|
|
7910
|
+
mode: "restart";
|
|
7911
|
+
} | {
|
|
7912
|
+
mode: "queued";
|
|
7913
|
+
max: number;
|
|
7914
|
+
} | {
|
|
7915
|
+
mode: "parallel";
|
|
7916
|
+
max: number;
|
|
7917
|
+
} | {
|
|
7918
|
+
mode: "cooldown";
|
|
7919
|
+
minutes: number;
|
|
7920
|
+
} | undefined;
|
|
7921
|
+
keepTraces?: number | undefined;
|
|
7922
|
+
}>>]>;
|
|
5748
7923
|
}, z.core.$strip>, z.ZodObject<{
|
|
5749
7924
|
kind: z.ZodLiteral<"composition">;
|
|
5750
7925
|
composition: z.ZodObject<{
|
|
@@ -6031,7 +8206,44 @@ export declare const coreBlocksCapability: {
|
|
|
6031
8206
|
kind: z.ZodLiteral<"code">;
|
|
6032
8207
|
}, z.core.$strip>, z.ZodObject<{
|
|
6033
8208
|
kind: z.ZodLiteral<"recipe">;
|
|
6034
|
-
recipe: z.ZodObject<{
|
|
8209
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
8210
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
8211
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8212
|
+
kind: z.ZodLiteral<"wait">;
|
|
8213
|
+
seconds: z.ZodNumber;
|
|
8214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8215
|
+
kind: z.ZodLiteral<"cap">;
|
|
8216
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
8217
|
+
$var: z.ZodString;
|
|
8218
|
+
}, z.core.$strip>]>;
|
|
8219
|
+
cap: z.ZodString;
|
|
8220
|
+
method: z.ZodString;
|
|
8221
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
8222
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
8223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8224
|
+
kind: z.ZodLiteral<"action">;
|
|
8225
|
+
actionId: z.ZodString;
|
|
8226
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
8227
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8228
|
+
kind: z.ZodLiteral<"code">;
|
|
8229
|
+
code: z.ZodString;
|
|
8230
|
+
}, z.core.$strip>], "kind">>;
|
|
8231
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8232
|
+
mode: z.ZodLiteral<"single">;
|
|
8233
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8234
|
+
mode: z.ZodLiteral<"restart">;
|
|
8235
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8236
|
+
mode: z.ZodLiteral<"queued">;
|
|
8237
|
+
max: z.ZodNumber;
|
|
8238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8239
|
+
mode: z.ZodLiteral<"parallel">;
|
|
8240
|
+
max: z.ZodNumber;
|
|
8241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8242
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
8243
|
+
minutes: z.ZodNumber;
|
|
8244
|
+
}, z.core.$strip>], "mode">>;
|
|
8245
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
8246
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
6035
8247
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6036
8248
|
kind: z.ZodLiteral<"device-state">;
|
|
6037
8249
|
deviceId: z.ZodNumber;
|
|
@@ -6069,7 +8281,7 @@ export declare const coreBlocksCapability: {
|
|
|
6069
8281
|
kind: z.ZodLiteral<"interval">;
|
|
6070
8282
|
minutes: z.ZodNumber;
|
|
6071
8283
|
}, z.core.$strip>], "kind">>;
|
|
6072
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
8284
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
6073
8285
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6074
8286
|
kind: z.ZodLiteral<"wait">;
|
|
6075
8287
|
seconds: z.ZodNumber;
|
|
@@ -6105,7 +8317,115 @@ export declare const coreBlocksCapability: {
|
|
|
6105
8317
|
minutes: z.ZodNumber;
|
|
6106
8318
|
}, z.core.$strip>], "mode">>;
|
|
6107
8319
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
6108
|
-
}, z.core.$strip
|
|
8320
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
8321
|
+
when: import("../index.js").AutomationWhen;
|
|
8322
|
+
actions: ({
|
|
8323
|
+
kind: "cap";
|
|
8324
|
+
deviceId: number | number[] | {
|
|
8325
|
+
$var: string;
|
|
8326
|
+
};
|
|
8327
|
+
cap: string;
|
|
8328
|
+
method: string;
|
|
8329
|
+
args?: Record<string, unknown> | undefined;
|
|
8330
|
+
argUnits?: Record<string, string> | undefined;
|
|
8331
|
+
} | {
|
|
8332
|
+
kind: "wait";
|
|
8333
|
+
seconds: number;
|
|
8334
|
+
} | {
|
|
8335
|
+
kind: "action";
|
|
8336
|
+
actionId: string;
|
|
8337
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
8338
|
+
} | {
|
|
8339
|
+
kind: "code";
|
|
8340
|
+
code: string;
|
|
8341
|
+
})[];
|
|
8342
|
+
runMode?: {
|
|
8343
|
+
mode: "single";
|
|
8344
|
+
} | {
|
|
8345
|
+
mode: "restart";
|
|
8346
|
+
} | {
|
|
8347
|
+
mode: "queued";
|
|
8348
|
+
max: number;
|
|
8349
|
+
} | {
|
|
8350
|
+
mode: "parallel";
|
|
8351
|
+
max: number;
|
|
8352
|
+
} | {
|
|
8353
|
+
mode: "cooldown";
|
|
8354
|
+
minutes: number;
|
|
8355
|
+
} | undefined;
|
|
8356
|
+
keepTraces?: number | undefined;
|
|
8357
|
+
}, {
|
|
8358
|
+
triggers: ({
|
|
8359
|
+
kind: "device-state";
|
|
8360
|
+
deviceId: number;
|
|
8361
|
+
cap: string;
|
|
8362
|
+
fieldPath: string;
|
|
8363
|
+
becomes?: string | number | boolean | undefined;
|
|
8364
|
+
edge?: boolean | undefined;
|
|
8365
|
+
forMs?: number | undefined;
|
|
8366
|
+
debounceMs?: number | undefined;
|
|
8367
|
+
} | {
|
|
8368
|
+
kind: "device-event";
|
|
8369
|
+
category: string;
|
|
8370
|
+
deviceId?: number | undefined;
|
|
8371
|
+
} | {
|
|
8372
|
+
kind: "schedule";
|
|
8373
|
+
cron: string;
|
|
8374
|
+
} | {
|
|
8375
|
+
kind: "manual";
|
|
8376
|
+
} | {
|
|
8377
|
+
kind: "detection";
|
|
8378
|
+
classes: string[];
|
|
8379
|
+
deviceIds: number[];
|
|
8380
|
+
zones?: string[] | undefined;
|
|
8381
|
+
minScore?: number | undefined;
|
|
8382
|
+
} | {
|
|
8383
|
+
kind: "stationary";
|
|
8384
|
+
deviceIds: number[];
|
|
8385
|
+
classes?: string[] | undefined;
|
|
8386
|
+
zones?: string[] | undefined;
|
|
8387
|
+
phase: "appeared" | "departed";
|
|
8388
|
+
} | {
|
|
8389
|
+
kind: "interval";
|
|
8390
|
+
minutes: number;
|
|
8391
|
+
})[];
|
|
8392
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
8393
|
+
actions: ({
|
|
8394
|
+
kind: "cap";
|
|
8395
|
+
deviceId: number | number[] | {
|
|
8396
|
+
$var: string;
|
|
8397
|
+
};
|
|
8398
|
+
cap: string;
|
|
8399
|
+
method: string;
|
|
8400
|
+
args?: Record<string, unknown> | undefined;
|
|
8401
|
+
argUnits?: Record<string, string> | undefined;
|
|
8402
|
+
} | {
|
|
8403
|
+
kind: "wait";
|
|
8404
|
+
seconds: number;
|
|
8405
|
+
} | {
|
|
8406
|
+
kind: "action";
|
|
8407
|
+
actionId: string;
|
|
8408
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
8409
|
+
} | {
|
|
8410
|
+
kind: "code";
|
|
8411
|
+
code: string;
|
|
8412
|
+
})[];
|
|
8413
|
+
runMode?: {
|
|
8414
|
+
mode: "single";
|
|
8415
|
+
} | {
|
|
8416
|
+
mode: "restart";
|
|
8417
|
+
} | {
|
|
8418
|
+
mode: "queued";
|
|
8419
|
+
max: number;
|
|
8420
|
+
} | {
|
|
8421
|
+
mode: "parallel";
|
|
8422
|
+
max: number;
|
|
8423
|
+
} | {
|
|
8424
|
+
mode: "cooldown";
|
|
8425
|
+
minutes: number;
|
|
8426
|
+
} | undefined;
|
|
8427
|
+
keepTraces?: number | undefined;
|
|
8428
|
+
}>>]>;
|
|
6109
8429
|
}, z.core.$strip>, z.ZodObject<{
|
|
6110
8430
|
kind: z.ZodLiteral<"composition">;
|
|
6111
8431
|
composition: z.ZodObject<{
|
|
@@ -6399,7 +8719,44 @@ export declare const coreBlocksCapability: {
|
|
|
6399
8719
|
kind: z.ZodLiteral<"code">;
|
|
6400
8720
|
}, z.core.$strip>, z.ZodObject<{
|
|
6401
8721
|
kind: z.ZodLiteral<"recipe">;
|
|
6402
|
-
recipe: z.ZodObject<{
|
|
8722
|
+
recipe: z.ZodUnion<readonly [z.ZodObject<{
|
|
8723
|
+
when: z.ZodType<import("../index.js").AutomationWhen, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationWhen, unknown>>;
|
|
8724
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8725
|
+
kind: z.ZodLiteral<"wait">;
|
|
8726
|
+
seconds: z.ZodNumber;
|
|
8727
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8728
|
+
kind: z.ZodLiteral<"cap">;
|
|
8729
|
+
deviceId: z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>, z.ZodObject<{
|
|
8730
|
+
$var: z.ZodString;
|
|
8731
|
+
}, z.core.$strip>]>;
|
|
8732
|
+
cap: z.ZodString;
|
|
8733
|
+
method: z.ZodString;
|
|
8734
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
8735
|
+
argUnits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
8736
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8737
|
+
kind: z.ZodLiteral<"action">;
|
|
8738
|
+
actionId: z.ZodString;
|
|
8739
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
8740
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8741
|
+
kind: z.ZodLiteral<"code">;
|
|
8742
|
+
code: z.ZodString;
|
|
8743
|
+
}, z.core.$strip>], "kind">>;
|
|
8744
|
+
runMode: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8745
|
+
mode: z.ZodLiteral<"single">;
|
|
8746
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8747
|
+
mode: z.ZodLiteral<"restart">;
|
|
8748
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8749
|
+
mode: z.ZodLiteral<"queued">;
|
|
8750
|
+
max: z.ZodNumber;
|
|
8751
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8752
|
+
mode: z.ZodLiteral<"parallel">;
|
|
8753
|
+
max: z.ZodNumber;
|
|
8754
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8755
|
+
mode: z.ZodLiteral<"cooldown">;
|
|
8756
|
+
minutes: z.ZodNumber;
|
|
8757
|
+
}, z.core.$strip>], "mode">>;
|
|
8758
|
+
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
8759
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
6403
8760
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6404
8761
|
kind: z.ZodLiteral<"device-state">;
|
|
6405
8762
|
deviceId: z.ZodNumber;
|
|
@@ -6437,7 +8794,7 @@ export declare const coreBlocksCapability: {
|
|
|
6437
8794
|
kind: z.ZodLiteral<"interval">;
|
|
6438
8795
|
minutes: z.ZodNumber;
|
|
6439
8796
|
}, z.core.$strip>], "kind">>;
|
|
6440
|
-
conditions: z.ZodOptional<z.ZodType<import("../index.js").
|
|
8797
|
+
conditions: z.ZodOptional<z.ZodType<import("../index.js").LegacyCondition, unknown, z.core.$ZodTypeInternals<import("../index.js").LegacyCondition, unknown>>>;
|
|
6441
8798
|
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6442
8799
|
kind: z.ZodLiteral<"wait">;
|
|
6443
8800
|
seconds: z.ZodNumber;
|
|
@@ -6473,7 +8830,115 @@ export declare const coreBlocksCapability: {
|
|
|
6473
8830
|
minutes: z.ZodNumber;
|
|
6474
8831
|
}, z.core.$strip>], "mode">>;
|
|
6475
8832
|
keepTraces: z.ZodOptional<z.ZodNumber>;
|
|
6476
|
-
}, z.core.$strip
|
|
8833
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
8834
|
+
when: import("../index.js").AutomationWhen;
|
|
8835
|
+
actions: ({
|
|
8836
|
+
kind: "cap";
|
|
8837
|
+
deviceId: number | number[] | {
|
|
8838
|
+
$var: string;
|
|
8839
|
+
};
|
|
8840
|
+
cap: string;
|
|
8841
|
+
method: string;
|
|
8842
|
+
args?: Record<string, unknown> | undefined;
|
|
8843
|
+
argUnits?: Record<string, string> | undefined;
|
|
8844
|
+
} | {
|
|
8845
|
+
kind: "wait";
|
|
8846
|
+
seconds: number;
|
|
8847
|
+
} | {
|
|
8848
|
+
kind: "action";
|
|
8849
|
+
actionId: string;
|
|
8850
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
8851
|
+
} | {
|
|
8852
|
+
kind: "code";
|
|
8853
|
+
code: string;
|
|
8854
|
+
})[];
|
|
8855
|
+
runMode?: {
|
|
8856
|
+
mode: "single";
|
|
8857
|
+
} | {
|
|
8858
|
+
mode: "restart";
|
|
8859
|
+
} | {
|
|
8860
|
+
mode: "queued";
|
|
8861
|
+
max: number;
|
|
8862
|
+
} | {
|
|
8863
|
+
mode: "parallel";
|
|
8864
|
+
max: number;
|
|
8865
|
+
} | {
|
|
8866
|
+
mode: "cooldown";
|
|
8867
|
+
minutes: number;
|
|
8868
|
+
} | undefined;
|
|
8869
|
+
keepTraces?: number | undefined;
|
|
8870
|
+
}, {
|
|
8871
|
+
triggers: ({
|
|
8872
|
+
kind: "device-state";
|
|
8873
|
+
deviceId: number;
|
|
8874
|
+
cap: string;
|
|
8875
|
+
fieldPath: string;
|
|
8876
|
+
becomes?: string | number | boolean | undefined;
|
|
8877
|
+
edge?: boolean | undefined;
|
|
8878
|
+
forMs?: number | undefined;
|
|
8879
|
+
debounceMs?: number | undefined;
|
|
8880
|
+
} | {
|
|
8881
|
+
kind: "device-event";
|
|
8882
|
+
category: string;
|
|
8883
|
+
deviceId?: number | undefined;
|
|
8884
|
+
} | {
|
|
8885
|
+
kind: "schedule";
|
|
8886
|
+
cron: string;
|
|
8887
|
+
} | {
|
|
8888
|
+
kind: "manual";
|
|
8889
|
+
} | {
|
|
8890
|
+
kind: "detection";
|
|
8891
|
+
classes: string[];
|
|
8892
|
+
deviceIds: number[];
|
|
8893
|
+
zones?: string[] | undefined;
|
|
8894
|
+
minScore?: number | undefined;
|
|
8895
|
+
} | {
|
|
8896
|
+
kind: "stationary";
|
|
8897
|
+
deviceIds: number[];
|
|
8898
|
+
classes?: string[] | undefined;
|
|
8899
|
+
zones?: string[] | undefined;
|
|
8900
|
+
phase: "appeared" | "departed";
|
|
8901
|
+
} | {
|
|
8902
|
+
kind: "interval";
|
|
8903
|
+
minutes: number;
|
|
8904
|
+
})[];
|
|
8905
|
+
conditions?: import("../index.js").LegacyCondition | undefined;
|
|
8906
|
+
actions: ({
|
|
8907
|
+
kind: "cap";
|
|
8908
|
+
deviceId: number | number[] | {
|
|
8909
|
+
$var: string;
|
|
8910
|
+
};
|
|
8911
|
+
cap: string;
|
|
8912
|
+
method: string;
|
|
8913
|
+
args?: Record<string, unknown> | undefined;
|
|
8914
|
+
argUnits?: Record<string, string> | undefined;
|
|
8915
|
+
} | {
|
|
8916
|
+
kind: "wait";
|
|
8917
|
+
seconds: number;
|
|
8918
|
+
} | {
|
|
8919
|
+
kind: "action";
|
|
8920
|
+
actionId: string;
|
|
8921
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
8922
|
+
} | {
|
|
8923
|
+
kind: "code";
|
|
8924
|
+
code: string;
|
|
8925
|
+
})[];
|
|
8926
|
+
runMode?: {
|
|
8927
|
+
mode: "single";
|
|
8928
|
+
} | {
|
|
8929
|
+
mode: "restart";
|
|
8930
|
+
} | {
|
|
8931
|
+
mode: "queued";
|
|
8932
|
+
max: number;
|
|
8933
|
+
} | {
|
|
8934
|
+
mode: "parallel";
|
|
8935
|
+
max: number;
|
|
8936
|
+
} | {
|
|
8937
|
+
mode: "cooldown";
|
|
8938
|
+
minutes: number;
|
|
8939
|
+
} | undefined;
|
|
8940
|
+
keepTraces?: number | undefined;
|
|
8941
|
+
}>>]>;
|
|
6477
8942
|
}, z.core.$strip>, z.ZodObject<{
|
|
6478
8943
|
kind: z.ZodLiteral<"composition">;
|
|
6479
8944
|
composition: z.ZodObject<{
|
|
@@ -7167,6 +9632,7 @@ export declare const coreBlocksCapability: {
|
|
|
7167
9632
|
endedAt: z.ZodNumber;
|
|
7168
9633
|
trigger: z.ZodObject<{
|
|
7169
9634
|
kind: z.ZodString;
|
|
9635
|
+
path: z.ZodOptional<z.ZodString>;
|
|
7170
9636
|
outcome: z.ZodEnum<{
|
|
7171
9637
|
fail: "fail";
|
|
7172
9638
|
pass: "pass";
|
|
@@ -7180,8 +9646,16 @@ export declare const coreBlocksCapability: {
|
|
|
7180
9646
|
all: "all";
|
|
7181
9647
|
any: "any";
|
|
7182
9648
|
condition: "condition";
|
|
9649
|
+
detection: "detection";
|
|
9650
|
+
"device-becomes": "device-becomes";
|
|
9651
|
+
"device-event": "device-event";
|
|
9652
|
+
"device-is": "device-is";
|
|
7183
9653
|
expression: "expression";
|
|
9654
|
+
interval: "interval";
|
|
9655
|
+
manual: "manual";
|
|
7184
9656
|
not: "not";
|
|
9657
|
+
schedule: "schedule";
|
|
9658
|
+
stationary: "stationary";
|
|
7185
9659
|
"stationary-present": "stationary-present";
|
|
7186
9660
|
}>;
|
|
7187
9661
|
outcome: z.ZodEnum<{
|
|
@@ -7230,6 +9704,7 @@ export declare const coreBlocksCapability: {
|
|
|
7230
9704
|
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
7231
9705
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
7232
9706
|
endedAt: z.ZodOptional<z.ZodNumber>;
|
|
9707
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>>;
|
|
7233
9708
|
outcome: z.ZodEnum<{
|
|
7234
9709
|
error: "error";
|
|
7235
9710
|
"not-run": "not-run";
|
|
@@ -7264,6 +9739,7 @@ export declare const coreBlocksCapability: {
|
|
|
7264
9739
|
endedAt: z.ZodNumber;
|
|
7265
9740
|
trigger: z.ZodObject<{
|
|
7266
9741
|
kind: z.ZodString;
|
|
9742
|
+
path: z.ZodOptional<z.ZodString>;
|
|
7267
9743
|
outcome: z.ZodEnum<{
|
|
7268
9744
|
fail: "fail";
|
|
7269
9745
|
pass: "pass";
|
|
@@ -7277,8 +9753,16 @@ export declare const coreBlocksCapability: {
|
|
|
7277
9753
|
all: "all";
|
|
7278
9754
|
any: "any";
|
|
7279
9755
|
condition: "condition";
|
|
9756
|
+
detection: "detection";
|
|
9757
|
+
"device-becomes": "device-becomes";
|
|
9758
|
+
"device-event": "device-event";
|
|
9759
|
+
"device-is": "device-is";
|
|
7280
9760
|
expression: "expression";
|
|
9761
|
+
interval: "interval";
|
|
9762
|
+
manual: "manual";
|
|
7281
9763
|
not: "not";
|
|
9764
|
+
schedule: "schedule";
|
|
9765
|
+
stationary: "stationary";
|
|
7282
9766
|
"stationary-present": "stationary-present";
|
|
7283
9767
|
}>;
|
|
7284
9768
|
outcome: z.ZodEnum<{
|
|
@@ -7327,6 +9811,7 @@ export declare const coreBlocksCapability: {
|
|
|
7327
9811
|
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
7328
9812
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
7329
9813
|
endedAt: z.ZodOptional<z.ZodNumber>;
|
|
9814
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>>;
|
|
7330
9815
|
outcome: z.ZodEnum<{
|
|
7331
9816
|
error: "error";
|
|
7332
9817
|
"not-run": "not-run";
|
|
@@ -7357,6 +9842,7 @@ export declare const coreBlocksCapability: {
|
|
|
7357
9842
|
endedAt: z.ZodNumber;
|
|
7358
9843
|
trigger: z.ZodObject<{
|
|
7359
9844
|
kind: z.ZodString;
|
|
9845
|
+
path: z.ZodOptional<z.ZodString>;
|
|
7360
9846
|
outcome: z.ZodEnum<{
|
|
7361
9847
|
fail: "fail";
|
|
7362
9848
|
pass: "pass";
|
|
@@ -7370,8 +9856,16 @@ export declare const coreBlocksCapability: {
|
|
|
7370
9856
|
all: "all";
|
|
7371
9857
|
any: "any";
|
|
7372
9858
|
condition: "condition";
|
|
9859
|
+
detection: "detection";
|
|
9860
|
+
"device-becomes": "device-becomes";
|
|
9861
|
+
"device-event": "device-event";
|
|
9862
|
+
"device-is": "device-is";
|
|
7373
9863
|
expression: "expression";
|
|
9864
|
+
interval: "interval";
|
|
9865
|
+
manual: "manual";
|
|
7374
9866
|
not: "not";
|
|
9867
|
+
schedule: "schedule";
|
|
9868
|
+
stationary: "stationary";
|
|
7375
9869
|
"stationary-present": "stationary-present";
|
|
7376
9870
|
}>;
|
|
7377
9871
|
outcome: z.ZodEnum<{
|
|
@@ -7420,6 +9914,7 @@ export declare const coreBlocksCapability: {
|
|
|
7420
9914
|
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
7421
9915
|
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
7422
9916
|
endedAt: z.ZodOptional<z.ZodNumber>;
|
|
9917
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>>;
|
|
7423
9918
|
outcome: z.ZodEnum<{
|
|
7424
9919
|
error: "error";
|
|
7425
9920
|
"not-run": "not-run";
|