@camstack/types 1.2.549 → 1.2.551
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 +28 -0
- package/dist/addon/addon-instance.d.ts +23 -0
- package/dist/addon/build-addon-route-provider.d.ts +2 -0
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/automation/fired-trigger.d.ts +44 -0
- package/dist/automation/index.d.ts +8 -5
- package/dist/automation/recipe.d.ts +12105 -604
- package/dist/automation/scheduler.d.ts +7 -0
- package/dist/automation/step-runner.d.ts +70 -0
- package/dist/automation/trace.d.ts +254 -145
- package/dist/automation/wait-until.d.ts +32 -0
- package/dist/automation/when-site.d.ts +1 -1
- package/dist/automation/when.d.ts +39 -1
- package/dist/capabilities/actions.cap.d.ts +1 -178
- package/dist/capabilities/addon-routes.cap.d.ts +3 -0
- package/dist/capabilities/core-blocks.cap.d.ts +117 -8723
- package/dist/capabilities/event-emitter.cap.d.ts +99 -3
- package/dist/capabilities/event-vocabulary.d.ts +99 -0
- package/dist/capabilities/index.d.ts +1 -0
- package/dist/capabilities/oauth-integration.cap.d.ts +8 -0
- package/dist/capabilities/schedulers.cap.d.ts +1 -178
- package/dist/capabilities/sso-bridge.cap.d.ts +3 -0
- package/dist/capabilities/user-management.cap.d.ts +4 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1488 -156
- package/dist/index.mjs +1442 -157
- package/dist/interfaces/addon-routes.d.ts +13 -0
- package/dist/interfaces/config-ui.d.ts +15 -24
- package/dist/{sleep-Bn346wCJ.mjs → sleep-D0roI_CZ.mjs} +4 -0
- package/dist/{sleep-LFKpQ2_f.js → sleep-dcR4vBFG.js} +4 -0
- package/package.json +1 -1
|
@@ -130,6 +130,41 @@ declare const ScheduleLeafSchema: z.ZodObject<{
|
|
|
130
130
|
}>>>;
|
|
131
131
|
cron: z.ZodOptional<z.ZodString>;
|
|
132
132
|
}, z.core.$strip>;
|
|
133
|
+
/**
|
|
134
|
+
* One payload predicate of a `device-fired` row: the value at `path` inside
|
|
135
|
+
* the fire's `data` (dotted) equals `equals`. Compared strictly, no coercion.
|
|
136
|
+
*/
|
|
137
|
+
export declare const DeviceFiredMatchSchema: z.ZodObject<{
|
|
138
|
+
path: z.ZodString;
|
|
139
|
+
equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export type DeviceFiredMatch = z.infer<typeof DeviceFiredMatchSchema>;
|
|
142
|
+
/**
|
|
143
|
+
* "fires": one device of the `event-emitter` capability reported an event
|
|
144
|
+
* (D1045). Every list is an OR, the lists together an AND; an absent list does
|
|
145
|
+
* not narrow. `eventIds` are the device's own tokens, `sourceIds` the parts of
|
|
146
|
+
* the device (a button), `kinds` the shared press kinds of its vocabulary.
|
|
147
|
+
*/
|
|
148
|
+
declare const DeviceFiredLeafSchema: z.ZodObject<{
|
|
149
|
+
id: z.ZodOptional<z.ZodString>;
|
|
150
|
+
kind: z.ZodLiteral<"device-fired">;
|
|
151
|
+
deviceId: z.ZodNumber;
|
|
152
|
+
eventIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
|
+
sourceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
154
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
155
|
+
"double-press": "double-press";
|
|
156
|
+
"long-press": "long-press";
|
|
157
|
+
"long-press-start": "long-press-start";
|
|
158
|
+
other: "other";
|
|
159
|
+
press: "press";
|
|
160
|
+
release: "release";
|
|
161
|
+
repeat: "repeat";
|
|
162
|
+
}>>>;
|
|
163
|
+
match: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
164
|
+
path: z.ZodString;
|
|
165
|
+
equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
166
|
+
}, z.core.$strip>>>;
|
|
167
|
+
}, z.core.$strip>;
|
|
133
168
|
declare const ManualLeafSchema: z.ZodObject<{
|
|
134
169
|
id: z.ZodOptional<z.ZodString>;
|
|
135
170
|
kind: z.ZodLiteral<"manual">;
|
|
@@ -392,12 +427,15 @@ declare const ExpressionLeafSchema: z.ZodObject<{
|
|
|
392
427
|
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
393
428
|
}, z.core.$strip>>;
|
|
394
429
|
}, z.core.$strip>;
|
|
395
|
-
export type AutomationEventLeaf = z.infer<typeof DeviceBecomesLeafSchema> | z.infer<typeof DeviceEventLeafSchema> | z.infer<typeof ScheduleLeafSchema> | z.infer<typeof ManualLeafSchema> | z.infer<typeof IntervalLeafSchema> | z.infer<typeof DetectionLeafSchema> | z.infer<typeof StationaryLeafSchema>;
|
|
430
|
+
export type AutomationEventLeaf = z.infer<typeof DeviceBecomesLeafSchema> | z.infer<typeof DeviceEventLeafSchema> | z.infer<typeof DeviceFiredLeafSchema> | z.infer<typeof ScheduleLeafSchema> | z.infer<typeof ManualLeafSchema> | z.infer<typeof IntervalLeafSchema> | z.infer<typeof DetectionLeafSchema> | z.infer<typeof StationaryLeafSchema>;
|
|
396
431
|
export type AutomationStateLeaf = z.infer<typeof DeviceIsLeafSchema> | z.infer<typeof StationaryPresentLeafSchema> | z.infer<typeof ExpressionLeafSchema> | z.infer<typeof TimeIsLeafSchema> | z.infer<typeof TriggeredByLeafSchema>;
|
|
397
432
|
export type AutomationLeaf = AutomationEventLeaf | AutomationStateLeaf;
|
|
398
433
|
export type DeviceBecomesLeaf = Extract<AutomationEventLeaf, {
|
|
399
434
|
kind: 'device-becomes';
|
|
400
435
|
}>;
|
|
436
|
+
export type DeviceFiredLeaf = Extract<AutomationEventLeaf, {
|
|
437
|
+
kind: 'device-fired';
|
|
438
|
+
}>;
|
|
401
439
|
export type DetectionLeaf = Extract<AutomationEventLeaf, {
|
|
402
440
|
kind: 'detection';
|
|
403
441
|
}>;
|
|
@@ -270,184 +270,7 @@ export declare const actionsCapability: {
|
|
|
270
270
|
readonly getTraces: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
271
271
|
actionId: z.ZodString;
|
|
272
272
|
}, z.core.$strip>, z.ZodObject<{
|
|
273
|
-
traces: z.ZodArray<z.
|
|
274
|
-
runId: z.ZodString;
|
|
275
|
-
startedAt: z.ZodNumber;
|
|
276
|
-
endedAt: z.ZodNumber;
|
|
277
|
-
trigger: z.ZodObject<{
|
|
278
|
-
kind: z.ZodString;
|
|
279
|
-
path: z.ZodOptional<z.ZodString>;
|
|
280
|
-
outcome: z.ZodEnum<{
|
|
281
|
-
fail: "fail";
|
|
282
|
-
pass: "pass";
|
|
283
|
-
}>;
|
|
284
|
-
reason: z.ZodString;
|
|
285
|
-
vars: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
286
|
-
hold: z.ZodOptional<z.ZodObject<{
|
|
287
|
-
phase: z.ZodEnum<{
|
|
288
|
-
cancelled: "cancelled";
|
|
289
|
-
fired: "fired";
|
|
290
|
-
pending: "pending";
|
|
291
|
-
reseeded: "reseeded";
|
|
292
|
-
}>;
|
|
293
|
-
ms: z.ZodNumber;
|
|
294
|
-
mode: z.ZodEnum<{
|
|
295
|
-
held: "held";
|
|
296
|
-
stable: "stable";
|
|
297
|
-
}>;
|
|
298
|
-
since: z.ZodOptional<z.ZodNumber>;
|
|
299
|
-
deadline: z.ZodOptional<z.ZodNumber>;
|
|
300
|
-
}, z.core.$strip>>;
|
|
301
|
-
}, z.core.$strip>;
|
|
302
|
-
conditions: z.ZodArray<z.ZodObject<{
|
|
303
|
-
path: z.ZodString;
|
|
304
|
-
kind: z.ZodEnum<{
|
|
305
|
-
all: "all";
|
|
306
|
-
any: "any";
|
|
307
|
-
condition: "condition";
|
|
308
|
-
detection: "detection";
|
|
309
|
-
"device-becomes": "device-becomes";
|
|
310
|
-
"device-event": "device-event";
|
|
311
|
-
"device-is": "device-is";
|
|
312
|
-
expression: "expression";
|
|
313
|
-
interval: "interval";
|
|
314
|
-
manual: "manual";
|
|
315
|
-
not: "not";
|
|
316
|
-
schedule: "schedule";
|
|
317
|
-
stationary: "stationary";
|
|
318
|
-
"stationary-present": "stationary-present";
|
|
319
|
-
"time-is": "time-is";
|
|
320
|
-
"triggered-by": "triggered-by";
|
|
321
|
-
}>;
|
|
322
|
-
outcome: z.ZodEnum<{
|
|
323
|
-
fail: "fail";
|
|
324
|
-
"not-evaluated": "not-evaluated";
|
|
325
|
-
pass: "pass";
|
|
326
|
-
}>;
|
|
327
|
-
reason: z.ZodString;
|
|
328
|
-
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
329
|
-
cap: z.ZodOptional<z.ZodString>;
|
|
330
|
-
fieldPath: z.ZodOptional<z.ZodString>;
|
|
331
|
-
operator: z.ZodOptional<z.ZodString>;
|
|
332
|
-
expected: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
333
|
-
observed: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
|
|
334
|
-
}, z.core.$strip>>;
|
|
335
|
-
verdict: z.ZodOptional<z.ZodObject<{
|
|
336
|
-
mode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
337
|
-
mode: z.ZodLiteral<"single">;
|
|
338
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
339
|
-
mode: z.ZodLiteral<"restart">;
|
|
340
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
341
|
-
mode: z.ZodLiteral<"queued">;
|
|
342
|
-
max: z.ZodNumber;
|
|
343
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
344
|
-
mode: z.ZodLiteral<"parallel">;
|
|
345
|
-
max: z.ZodNumber;
|
|
346
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
-
mode: z.ZodLiteral<"cooldown">;
|
|
348
|
-
minutes: z.ZodNumber;
|
|
349
|
-
}, z.core.$strip>], "mode">;
|
|
350
|
-
decision: z.ZodEnum<{
|
|
351
|
-
bypass: "bypass";
|
|
352
|
-
cooldown: "cooldown";
|
|
353
|
-
drop: "drop";
|
|
354
|
-
queued: "queued";
|
|
355
|
-
restart: "restart";
|
|
356
|
-
run: "run";
|
|
357
|
-
}>;
|
|
358
|
-
reason: z.ZodString;
|
|
359
|
-
}, z.core.$strip>>;
|
|
360
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
361
|
-
path: z.ZodString;
|
|
362
|
-
kind: z.ZodString;
|
|
363
|
-
cap: z.ZodOptional<z.ZodString>;
|
|
364
|
-
method: z.ZodOptional<z.ZodString>;
|
|
365
|
-
actionId: z.ZodOptional<z.ZodString>;
|
|
366
|
-
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
367
|
-
devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
368
|
-
deviceId: z.ZodNumber;
|
|
369
|
-
outcome: z.ZodEnum<{
|
|
370
|
-
error: "error";
|
|
371
|
-
ok: "ok";
|
|
372
|
-
}>;
|
|
373
|
-
message: z.ZodOptional<z.ZodString>;
|
|
374
|
-
}, z.core.$strip>>>;
|
|
375
|
-
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
376
|
-
endedAt: z.ZodOptional<z.ZodNumber>;
|
|
377
|
-
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]>>]>>>;
|
|
378
|
-
templates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
379
|
-
condition: z.ZodOptional<z.ZodEnum<{
|
|
380
|
-
false: "false";
|
|
381
|
-
true: "true";
|
|
382
|
-
unknown: "unknown";
|
|
383
|
-
}>>;
|
|
384
|
-
conditionReason: z.ZodOptional<z.ZodString>;
|
|
385
|
-
outcome: z.ZodEnum<{
|
|
386
|
-
empty: "empty";
|
|
387
|
-
error: "error";
|
|
388
|
-
"not-run": "not-run";
|
|
389
|
-
ok: "ok";
|
|
390
|
-
skipped: "skipped";
|
|
391
|
-
}>;
|
|
392
|
-
message: z.ZodOptional<z.ZodString>;
|
|
393
|
-
else: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
394
|
-
path: z.ZodString;
|
|
395
|
-
kind: z.ZodString;
|
|
396
|
-
cap: z.ZodOptional<z.ZodString>;
|
|
397
|
-
method: z.ZodOptional<z.ZodString>;
|
|
398
|
-
actionId: z.ZodOptional<z.ZodString>;
|
|
399
|
-
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
400
|
-
devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
401
|
-
deviceId: z.ZodNumber;
|
|
402
|
-
outcome: z.ZodEnum<{
|
|
403
|
-
error: "error";
|
|
404
|
-
ok: "ok";
|
|
405
|
-
}>;
|
|
406
|
-
message: z.ZodOptional<z.ZodString>;
|
|
407
|
-
}, z.core.$strip>>>;
|
|
408
|
-
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
409
|
-
endedAt: z.ZodOptional<z.ZodNumber>;
|
|
410
|
-
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]>>]>>>;
|
|
411
|
-
templates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
412
|
-
condition: z.ZodOptional<z.ZodEnum<{
|
|
413
|
-
false: "false";
|
|
414
|
-
true: "true";
|
|
415
|
-
unknown: "unknown";
|
|
416
|
-
}>>;
|
|
417
|
-
conditionReason: z.ZodOptional<z.ZodString>;
|
|
418
|
-
outcome: z.ZodEnum<{
|
|
419
|
-
empty: "empty";
|
|
420
|
-
error: "error";
|
|
421
|
-
"not-run": "not-run";
|
|
422
|
-
ok: "ok";
|
|
423
|
-
skipped: "skipped";
|
|
424
|
-
}>;
|
|
425
|
-
message: z.ZodOptional<z.ZodString>;
|
|
426
|
-
}, z.core.$strip>>>;
|
|
427
|
-
}, z.core.$strip>>;
|
|
428
|
-
outcome: z.ZodEnum<{
|
|
429
|
-
aborted: "aborted";
|
|
430
|
-
failed: "failed";
|
|
431
|
-
ran: "ran";
|
|
432
|
-
"skipped-conditions": "skipped-conditions";
|
|
433
|
-
"skipped-cooldown": "skipped-cooldown";
|
|
434
|
-
"skipped-overlap": "skipped-overlap";
|
|
435
|
-
"skipped-trigger": "skipped-trigger";
|
|
436
|
-
}>;
|
|
437
|
-
repeat: z.ZodNumber;
|
|
438
|
-
lastAt: z.ZodNumber;
|
|
439
|
-
scheduler: z.ZodOptional<z.ZodEnum<{
|
|
440
|
-
"condition-false": "condition-false";
|
|
441
|
-
done: "done";
|
|
442
|
-
failed: "failed";
|
|
443
|
-
"gave-up": "gave-up";
|
|
444
|
-
held: "held";
|
|
445
|
-
inactive: "inactive";
|
|
446
|
-
missed: "missed";
|
|
447
|
-
overridden: "overridden";
|
|
448
|
-
"suspended-manual": "suspended-manual";
|
|
449
|
-
}>>;
|
|
450
|
-
}, z.core.$strip>>;
|
|
273
|
+
traces: z.ZodArray<z.ZodType<import("../index.js").AutomationRunTrace, unknown, z.core.$ZodTypeInternals<import("../index.js").AutomationRunTrace, unknown>>>;
|
|
451
274
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
452
275
|
/**
|
|
453
276
|
* Internal actions only; a read-only (addon) entry is refused with `[read-only]`.
|
|
@@ -15,6 +15,7 @@ declare const InvokeRequestSchema: z.ZodObject<{
|
|
|
15
15
|
query: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
16
16
|
body: z.ZodUnknown;
|
|
17
17
|
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
18
|
+
instanceId: z.ZodOptional<z.ZodString>;
|
|
18
19
|
user: z.ZodOptional<z.ZodObject<{
|
|
19
20
|
id: z.ZodString;
|
|
20
21
|
username: z.ZodString;
|
|
@@ -53,6 +54,7 @@ export declare const addonRoutesCapability: {
|
|
|
53
54
|
rateLimit: z.ZodOptional<z.ZodEnum<{
|
|
54
55
|
auth: "auth";
|
|
55
56
|
}>>;
|
|
57
|
+
perInstance: z.ZodOptional<z.ZodBoolean>;
|
|
56
58
|
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
57
59
|
/**
|
|
58
60
|
* Cross-process dispatch entry point. Forked addons implement this
|
|
@@ -69,6 +71,7 @@ export declare const addonRoutesCapability: {
|
|
|
69
71
|
query: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
70
72
|
body: z.ZodUnknown;
|
|
71
73
|
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
74
|
+
instanceId: z.ZodOptional<z.ZodString>;
|
|
72
75
|
user: z.ZodOptional<z.ZodObject<{
|
|
73
76
|
id: z.ZodString;
|
|
74
77
|
username: z.ZodString;
|