@automate.ax/api-contract 0.56.0 → 0.57.0
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/dist/api-key.d.ts +0 -2
- package/dist/api-key.js +3 -7
- package/dist/automation.d.ts +6 -2
- package/dist/automation.js +8 -2
- package/dist/deployment.d.ts +10 -2
- package/dist/deployment.js +10 -12
- package/dist/index.d.ts +95 -37
- package/dist/permissions.d.ts +1 -0
- package/dist/permissions.js +1 -0
- package/dist/runtime.d.ts +63 -23
- package/dist/runtime.js +44 -16
- package/package.json +2 -2
- package/src/api-key.ts +3 -9
- package/src/automation.ts +12 -2
- package/src/deployment.ts +41 -47
- package/src/permissions.ts +1 -0
- package/src/runtime.ts +46 -16
package/dist/runtime.d.ts
CHANGED
|
@@ -195,6 +195,7 @@ export declare const runtimeContract: {
|
|
|
195
195
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
196
196
|
inputHash: z.ZodString;
|
|
197
197
|
name: z.ZodString;
|
|
198
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
198
199
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
199
200
|
slot: z.ZodNumber;
|
|
200
201
|
status: z.ZodLiteral<"pending">;
|
|
@@ -204,6 +205,7 @@ export declare const runtimeContract: {
|
|
|
204
205
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
205
206
|
inputHash: z.ZodString;
|
|
206
207
|
name: z.ZodString;
|
|
208
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
207
209
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
208
210
|
slot: z.ZodNumber;
|
|
209
211
|
reason: z.ZodLiteral<"closed-dependency">;
|
|
@@ -214,6 +216,7 @@ export declare const runtimeContract: {
|
|
|
214
216
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
215
217
|
inputHash: z.ZodString;
|
|
216
218
|
name: z.ZodString;
|
|
219
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
217
220
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
218
221
|
slot: z.ZodNumber;
|
|
219
222
|
failure: z.ZodObject<{
|
|
@@ -223,14 +226,16 @@ export declare const runtimeContract: {
|
|
|
223
226
|
reason: z.ZodLiteral<"failed-dependency">;
|
|
224
227
|
status: z.ZodLiteral<"skipped">;
|
|
225
228
|
}, z.core.$strip>]>>>;
|
|
226
|
-
|
|
229
|
+
coordinationOffers: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
227
230
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
228
231
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
232
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
229
233
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
230
234
|
slot: z.ZodNumber;
|
|
231
235
|
count: z.ZodNumber;
|
|
232
236
|
key: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
233
237
|
outcomeSeq: z.ZodNumber;
|
|
238
|
+
policy: z.ZodLiteral<"collect">;
|
|
234
239
|
primaryPosition: z.ZodEnum<{
|
|
235
240
|
first: "first";
|
|
236
241
|
last: "last";
|
|
@@ -239,23 +244,43 @@ export declare const runtimeContract: {
|
|
|
239
244
|
parameterActionDependencyIds: z.ZodArray<z.ZodString>;
|
|
240
245
|
parameterEventDependencyIds: z.ZodArray<z.ZodString>;
|
|
241
246
|
parameterSignalDependencyIds: z.ZodArray<z.ZodString>;
|
|
242
|
-
}, z.core.$strip
|
|
243
|
-
correlationEntries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
247
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
248
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
245
249
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
250
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
246
251
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
247
252
|
slot: z.ZodNumber;
|
|
248
253
|
key: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
249
254
|
order: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
255
|
outcomeSeq: z.ZodNumber;
|
|
256
|
+
policy: z.ZodLiteral<"correlate">;
|
|
251
257
|
streamName: z.ZodString;
|
|
252
258
|
streamNames: z.ZodArray<z.ZodString>;
|
|
253
259
|
ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
254
|
-
}, z.core.$strip
|
|
260
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
261
|
+
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
262
|
+
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
263
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
264
|
+
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
265
|
+
slot: z.ZodNumber;
|
|
266
|
+
duration: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
267
|
+
key: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
268
|
+
outcomeSeq: z.ZodNumber;
|
|
269
|
+
policy: z.ZodLiteral<"window">;
|
|
270
|
+
primaryPosition: z.ZodEnum<{
|
|
271
|
+
first: "first";
|
|
272
|
+
last: "last";
|
|
273
|
+
}>;
|
|
274
|
+
ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
275
|
+
parameterActionDependencyIds: z.ZodArray<z.ZodString>;
|
|
276
|
+
parameterEventDependencyIds: z.ZodArray<z.ZodString>;
|
|
277
|
+
parameterSignalDependencyIds: z.ZodArray<z.ZodString>;
|
|
278
|
+
}, z.core.$strip>]>>>;
|
|
255
279
|
settled: z.ZodDefault<z.ZodBoolean>;
|
|
256
280
|
signalInvocations: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
257
281
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
258
282
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
283
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
259
284
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
260
285
|
slot: z.ZodNumber;
|
|
261
286
|
outcomeSeq: z.ZodOptional<z.ZodNumber>;
|
|
@@ -263,6 +288,7 @@ export declare const runtimeContract: {
|
|
|
263
288
|
}, z.core.$strip>, z.ZodObject<{
|
|
264
289
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
265
290
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
291
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
266
292
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
267
293
|
slot: z.ZodNumber;
|
|
268
294
|
failure: z.ZodObject<{
|
|
@@ -273,29 +299,13 @@ export declare const runtimeContract: {
|
|
|
273
299
|
}, z.core.$strip>, z.ZodObject<{
|
|
274
300
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
275
301
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
302
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
276
303
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
277
304
|
slot: z.ZodNumber;
|
|
278
305
|
outcomeSeq: z.ZodOptional<z.ZodNumber>;
|
|
279
306
|
selectedIndex: z.ZodOptional<z.ZodNumber>;
|
|
280
307
|
status: z.ZodLiteral<"open">;
|
|
281
308
|
}, z.core.$strip>]>>>;
|
|
282
|
-
windowEntries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
283
|
-
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
284
|
-
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
285
|
-
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
286
|
-
slot: z.ZodNumber;
|
|
287
|
-
duration: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
288
|
-
key: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
289
|
-
outcomeSeq: z.ZodNumber;
|
|
290
|
-
primaryPosition: z.ZodEnum<{
|
|
291
|
-
first: "first";
|
|
292
|
-
last: "last";
|
|
293
|
-
}>;
|
|
294
|
-
ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
295
|
-
parameterActionDependencyIds: z.ZodArray<z.ZodString>;
|
|
296
|
-
parameterEventDependencyIds: z.ZodArray<z.ZodString>;
|
|
297
|
-
parameterSignalDependencyIds: z.ZodArray<z.ZodString>;
|
|
298
|
-
}, z.core.$strip>>>;
|
|
299
309
|
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
300
310
|
completeAction: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodUnion<readonly [z.ZodObject<{
|
|
301
311
|
reason: z.ZodLiteral<"closed-dependency">;
|
|
@@ -449,6 +459,7 @@ export declare const runtimeContract: {
|
|
|
449
459
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
450
460
|
inputHash: z.ZodString;
|
|
451
461
|
name: z.ZodString;
|
|
462
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
452
463
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
453
464
|
slot: z.ZodNumber;
|
|
454
465
|
actionInvocationId: z.ZodString;
|
|
@@ -460,6 +471,7 @@ export declare const runtimeContract: {
|
|
|
460
471
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
461
472
|
inputHash: z.ZodString;
|
|
462
473
|
name: z.ZodString;
|
|
474
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
463
475
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
464
476
|
slot: z.ZodNumber;
|
|
465
477
|
actionInvocationId: z.ZodString;
|
|
@@ -476,6 +488,7 @@ export declare const runtimeContract: {
|
|
|
476
488
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
477
489
|
inputHash: z.ZodString;
|
|
478
490
|
name: z.ZodString;
|
|
491
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
479
492
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
480
493
|
slot: z.ZodNumber;
|
|
481
494
|
actionInvocationId: z.ZodString;
|
|
@@ -489,6 +502,7 @@ export declare const runtimeContract: {
|
|
|
489
502
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
490
503
|
inputHash: z.ZodString;
|
|
491
504
|
name: z.ZodString;
|
|
505
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
492
506
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
493
507
|
slot: z.ZodNumber;
|
|
494
508
|
actionInvocationId: z.ZodString;
|
|
@@ -506,6 +520,7 @@ export declare const runtimeContract: {
|
|
|
506
520
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
507
521
|
inputHash: z.ZodString;
|
|
508
522
|
name: z.ZodString;
|
|
523
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
509
524
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
510
525
|
slot: z.ZodNumber;
|
|
511
526
|
actionInvocationId: z.ZodString;
|
|
@@ -524,11 +539,13 @@ export declare const runtimeContract: {
|
|
|
524
539
|
automationEventId: z.ZodString;
|
|
525
540
|
contextId: z.ZodString;
|
|
526
541
|
outcomeSeq: z.ZodNumber;
|
|
542
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
527
543
|
slot: z.ZodNumber;
|
|
528
544
|
}, z.core.$strip>>;
|
|
529
545
|
signalOutputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
530
546
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
531
547
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
548
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
532
549
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
533
550
|
slot: z.ZodNumber;
|
|
534
551
|
contextId: z.ZodString;
|
|
@@ -539,6 +556,7 @@ export declare const runtimeContract: {
|
|
|
539
556
|
}, z.core.$strip>, z.ZodObject<{
|
|
540
557
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
541
558
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
559
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
542
560
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
543
561
|
slot: z.ZodNumber;
|
|
544
562
|
contextId: z.ZodString;
|
|
@@ -548,6 +566,7 @@ export declare const runtimeContract: {
|
|
|
548
566
|
}, z.core.$strip>, z.ZodObject<{
|
|
549
567
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
550
568
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
569
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
551
570
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
552
571
|
slot: z.ZodNumber;
|
|
553
572
|
contextId: z.ZodString;
|
|
@@ -561,6 +580,7 @@ export declare const runtimeContract: {
|
|
|
561
580
|
}, z.core.$strip>, z.ZodObject<{
|
|
562
581
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
563
582
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
583
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
564
584
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
565
585
|
slot: z.ZodNumber;
|
|
566
586
|
contextId: z.ZodString;
|
|
@@ -575,6 +595,7 @@ export declare const runtimeContract: {
|
|
|
575
595
|
actionOutputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
576
596
|
actionInvocationId: z.ZodString;
|
|
577
597
|
contextId: z.ZodString;
|
|
598
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
578
599
|
slot: z.ZodNumber;
|
|
579
600
|
outcomeSeq: z.ZodNumber;
|
|
580
601
|
status: z.ZodLiteral<"failed">;
|
|
@@ -586,6 +607,7 @@ export declare const runtimeContract: {
|
|
|
586
607
|
actionInvocationId: z.ZodString;
|
|
587
608
|
contextId: z.ZodString;
|
|
588
609
|
outcomeSeq: z.ZodNumber;
|
|
610
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
589
611
|
slot: z.ZodNumber;
|
|
590
612
|
reason: z.ZodLiteral<"closed-dependency">;
|
|
591
613
|
status: z.ZodLiteral<"skipped">;
|
|
@@ -593,6 +615,7 @@ export declare const runtimeContract: {
|
|
|
593
615
|
actionInvocationId: z.ZodString;
|
|
594
616
|
contextId: z.ZodString;
|
|
595
617
|
outcomeSeq: z.ZodNumber;
|
|
618
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
596
619
|
slot: z.ZodNumber;
|
|
597
620
|
failure: z.ZodObject<{
|
|
598
621
|
message: z.ZodString;
|
|
@@ -604,11 +627,12 @@ export declare const runtimeContract: {
|
|
|
604
627
|
actionInvocationId: z.ZodString;
|
|
605
628
|
contextId: z.ZodString;
|
|
606
629
|
outcomeSeq: z.ZodNumber;
|
|
630
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
607
631
|
slot: z.ZodNumber;
|
|
608
632
|
output: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
609
633
|
status: z.ZodLiteral<"succeeded">;
|
|
610
634
|
}, z.core.$strip>]>>;
|
|
611
|
-
|
|
635
|
+
coordinationSelections: z.ZodArray<z.ZodObject<{
|
|
612
636
|
items: z.ZodArray<z.ZodObject<{
|
|
613
637
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
614
638
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
@@ -629,11 +653,13 @@ export declare const runtimeContract: {
|
|
|
629
653
|
contextId: z.ZodString;
|
|
630
654
|
outcomeSeq: z.ZodNumber;
|
|
631
655
|
payload: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
656
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
632
657
|
slot: z.ZodNumber;
|
|
633
658
|
}, z.core.$strip>>;
|
|
634
659
|
signalOutputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
635
660
|
contextId: z.ZodString;
|
|
636
661
|
outcomeSeq: z.ZodNumber;
|
|
662
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
637
663
|
signalInvocationId: z.ZodString;
|
|
638
664
|
slot: z.ZodNumber;
|
|
639
665
|
selectedIndex: z.ZodOptional<z.ZodNumber>;
|
|
@@ -641,12 +667,14 @@ export declare const runtimeContract: {
|
|
|
641
667
|
}, z.core.$strip>, z.ZodObject<{
|
|
642
668
|
contextId: z.ZodString;
|
|
643
669
|
outcomeSeq: z.ZodNumber;
|
|
670
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
644
671
|
signalInvocationId: z.ZodString;
|
|
645
672
|
slot: z.ZodNumber;
|
|
646
673
|
status: z.ZodLiteral<"closed">;
|
|
647
674
|
}, z.core.$strip>, z.ZodObject<{
|
|
648
675
|
contextId: z.ZodString;
|
|
649
676
|
outcomeSeq: z.ZodNumber;
|
|
677
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
650
678
|
signalInvocationId: z.ZodString;
|
|
651
679
|
slot: z.ZodNumber;
|
|
652
680
|
failure: z.ZodObject<{
|
|
@@ -657,6 +685,7 @@ export declare const runtimeContract: {
|
|
|
657
685
|
}, z.core.$strip>, z.ZodObject<{
|
|
658
686
|
contextId: z.ZodString;
|
|
659
687
|
outcomeSeq: z.ZodNumber;
|
|
688
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
660
689
|
signalInvocationId: z.ZodString;
|
|
661
690
|
slot: z.ZodNumber;
|
|
662
691
|
output: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
@@ -664,10 +693,12 @@ export declare const runtimeContract: {
|
|
|
664
693
|
}, z.core.$strip>]>>;
|
|
665
694
|
}, z.core.$strip>;
|
|
666
695
|
id: z.ZodString;
|
|
696
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
667
697
|
slot: z.ZodNumber;
|
|
668
698
|
status: z.ZodLiteral<"pending">;
|
|
669
699
|
}, z.core.$strip>, z.ZodObject<{
|
|
670
700
|
id: z.ZodString;
|
|
701
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
671
702
|
slot: z.ZodNumber;
|
|
672
703
|
status: z.ZodEnum<{
|
|
673
704
|
succeeded: "succeeded";
|
|
@@ -684,6 +715,7 @@ export declare const runtimeContract: {
|
|
|
684
715
|
actionOutputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
685
716
|
actionInvocationId: z.ZodString;
|
|
686
717
|
contextId: z.ZodString;
|
|
718
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
687
719
|
slot: z.ZodNumber;
|
|
688
720
|
outcomeSeq: z.ZodNumber;
|
|
689
721
|
status: z.ZodLiteral<"failed">;
|
|
@@ -695,6 +727,7 @@ export declare const runtimeContract: {
|
|
|
695
727
|
actionInvocationId: z.ZodString;
|
|
696
728
|
contextId: z.ZodString;
|
|
697
729
|
outcomeSeq: z.ZodNumber;
|
|
730
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
698
731
|
slot: z.ZodNumber;
|
|
699
732
|
reason: z.ZodLiteral<"closed-dependency">;
|
|
700
733
|
status: z.ZodLiteral<"skipped">;
|
|
@@ -702,6 +735,7 @@ export declare const runtimeContract: {
|
|
|
702
735
|
actionInvocationId: z.ZodString;
|
|
703
736
|
contextId: z.ZodString;
|
|
704
737
|
outcomeSeq: z.ZodNumber;
|
|
738
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
705
739
|
slot: z.ZodNumber;
|
|
706
740
|
failure: z.ZodObject<{
|
|
707
741
|
message: z.ZodString;
|
|
@@ -713,11 +747,12 @@ export declare const runtimeContract: {
|
|
|
713
747
|
actionInvocationId: z.ZodString;
|
|
714
748
|
contextId: z.ZodString;
|
|
715
749
|
outcomeSeq: z.ZodNumber;
|
|
750
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
716
751
|
slot: z.ZodNumber;
|
|
717
752
|
output: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
718
753
|
status: z.ZodLiteral<"succeeded">;
|
|
719
754
|
}, z.core.$strip>]>>;
|
|
720
|
-
|
|
755
|
+
coordinationSelections: z.ZodArray<z.ZodObject<{
|
|
721
756
|
items: z.ZodArray<z.ZodObject<{
|
|
722
757
|
actionDependencyIds: z.ZodArray<z.ZodString>;
|
|
723
758
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
@@ -738,11 +773,13 @@ export declare const runtimeContract: {
|
|
|
738
773
|
contextId: z.ZodString;
|
|
739
774
|
outcomeSeq: z.ZodNumber;
|
|
740
775
|
payload: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
776
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
741
777
|
slot: z.ZodNumber;
|
|
742
778
|
}, z.core.$strip>>;
|
|
743
779
|
signalOutputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
744
780
|
contextId: z.ZodString;
|
|
745
781
|
outcomeSeq: z.ZodNumber;
|
|
782
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
746
783
|
signalInvocationId: z.ZodString;
|
|
747
784
|
slot: z.ZodNumber;
|
|
748
785
|
selectedIndex: z.ZodOptional<z.ZodNumber>;
|
|
@@ -750,12 +787,14 @@ export declare const runtimeContract: {
|
|
|
750
787
|
}, z.core.$strip>, z.ZodObject<{
|
|
751
788
|
contextId: z.ZodString;
|
|
752
789
|
outcomeSeq: z.ZodNumber;
|
|
790
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
753
791
|
signalInvocationId: z.ZodString;
|
|
754
792
|
slot: z.ZodNumber;
|
|
755
793
|
status: z.ZodLiteral<"closed">;
|
|
756
794
|
}, z.core.$strip>, z.ZodObject<{
|
|
757
795
|
contextId: z.ZodString;
|
|
758
796
|
outcomeSeq: z.ZodNumber;
|
|
797
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
759
798
|
signalInvocationId: z.ZodString;
|
|
760
799
|
slot: z.ZodNumber;
|
|
761
800
|
failure: z.ZodObject<{
|
|
@@ -766,6 +805,7 @@ export declare const runtimeContract: {
|
|
|
766
805
|
}, z.core.$strip>, z.ZodObject<{
|
|
767
806
|
contextId: z.ZodString;
|
|
768
807
|
outcomeSeq: z.ZodNumber;
|
|
808
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
769
809
|
signalInvocationId: z.ZodString;
|
|
770
810
|
slot: z.ZodNumber;
|
|
771
811
|
output: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
package/dist/runtime.js
CHANGED
|
@@ -10,6 +10,12 @@ const SIGNAL_FAILURE_SCHEMA = z.object({
|
|
|
10
10
|
name: z.string(),
|
|
11
11
|
});
|
|
12
12
|
const OUTCOME_SEQUENCE_SCHEMA = z.number().int().positive();
|
|
13
|
+
const HOOK_SCOPE_PATH_SCHEMA = z
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.nonnegative()
|
|
17
|
+
.array()
|
|
18
|
+
.default([]);
|
|
13
19
|
const AUTOMATION_INVOCATION_RUN_AT_SCHEMA = z.union([
|
|
14
20
|
z.date(),
|
|
15
21
|
z.string().min(1),
|
|
@@ -63,6 +69,7 @@ const ACTION_INVOCATION_BASE_SCHEMA = z.object({
|
|
|
63
69
|
eventDependencyIds: z.string().array(),
|
|
64
70
|
inputHash: z.string(),
|
|
65
71
|
name: z.string(),
|
|
72
|
+
scopePath: HOOK_SCOPE_PATH_SCHEMA,
|
|
66
73
|
signalDependencyIds: z.string().array(),
|
|
67
74
|
slot: z.number().int().nonnegative(),
|
|
68
75
|
});
|
|
@@ -108,15 +115,16 @@ const ACTION_RUN_INVOCATION_SCHEMA = z.union([
|
|
|
108
115
|
const SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA = z.object({
|
|
109
116
|
actionDependencyIds: z.string().array(),
|
|
110
117
|
eventDependencyIds: z.string().array(),
|
|
118
|
+
scopePath: HOOK_SCOPE_PATH_SCHEMA,
|
|
111
119
|
signalDependencyIds: z.string().array(),
|
|
112
120
|
slot: z.number().int().nonnegative(),
|
|
113
121
|
});
|
|
114
|
-
const
|
|
122
|
+
const COORDINATION_PARAMETER_DEPENDENCIES_SCHEMA = z.object({
|
|
115
123
|
parameterActionDependencyIds: z.string().array(),
|
|
116
124
|
parameterEventDependencyIds: z.string().array(),
|
|
117
125
|
parameterSignalDependencyIds: z.string().array(),
|
|
118
126
|
});
|
|
119
|
-
const
|
|
127
|
+
const COORDINATION_PRIMARY_POSITION_SCHEMA = z.enum(["first", "last"]);
|
|
120
128
|
const CORRELATION_STREAM_NAMES_SCHEMA = z
|
|
121
129
|
.string()
|
|
122
130
|
.min(1)
|
|
@@ -125,10 +133,11 @@ const CORRELATION_STREAM_NAMES_SCHEMA = z
|
|
|
125
133
|
.refine((names) => new Set(names).size === names.length, {
|
|
126
134
|
message: "Correlation stream names must be unique.",
|
|
127
135
|
});
|
|
128
|
-
const
|
|
136
|
+
const CORRELATION_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
|
|
129
137
|
key: encodableSchema,
|
|
130
138
|
order: CORRELATION_STREAM_NAMES_SCHEMA.optional(),
|
|
131
139
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
140
|
+
policy: z.literal("correlate"),
|
|
132
141
|
streamName: z.string().min(1),
|
|
133
142
|
streamNames: CORRELATION_STREAM_NAMES_SCHEMA,
|
|
134
143
|
ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
|
|
@@ -150,20 +159,22 @@ const CORRELATION_ENTRY_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
|
|
|
150
159
|
});
|
|
151
160
|
}
|
|
152
161
|
});
|
|
153
|
-
const
|
|
162
|
+
const COLLECTION_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
|
|
154
163
|
count: z.number().int().positive(),
|
|
155
164
|
key: encodableSchema,
|
|
156
165
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
157
|
-
|
|
166
|
+
policy: z.literal("collect"),
|
|
167
|
+
primaryPosition: COORDINATION_PRIMARY_POSITION_SCHEMA,
|
|
158
168
|
ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
|
|
159
|
-
}).extend(
|
|
160
|
-
const
|
|
169
|
+
}).extend(COORDINATION_PARAMETER_DEPENDENCIES_SCHEMA.shape);
|
|
170
|
+
const WINDOW_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
|
|
161
171
|
duration: z.union([z.string().min(1), z.number().nonnegative()]),
|
|
162
172
|
key: encodableSchema,
|
|
163
173
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
164
|
-
|
|
174
|
+
policy: z.literal("window"),
|
|
175
|
+
primaryPosition: COORDINATION_PRIMARY_POSITION_SCHEMA,
|
|
165
176
|
ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
|
|
166
|
-
}).extend(
|
|
177
|
+
}).extend(COORDINATION_PARAMETER_DEPENDENCIES_SCHEMA.shape);
|
|
167
178
|
const SIGNAL_INVOCATION_SCHEMA = z.union([
|
|
168
179
|
SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
|
|
169
180
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA.optional(),
|
|
@@ -200,6 +211,7 @@ const ACTION_VALUE_OUTCOME_BASE_SCHEMA = z.object({
|
|
|
200
211
|
actionInvocationId: z.string(),
|
|
201
212
|
contextId: z.string(),
|
|
202
213
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
214
|
+
scopePath: HOOK_SCOPE_PATH_SCHEMA,
|
|
203
215
|
slot: z.number().int(),
|
|
204
216
|
});
|
|
205
217
|
const ACTION_VALUE_OUTCOME_SCHEMA = z.union([
|
|
@@ -225,6 +237,7 @@ const ACTION_VALUE_OUTCOME_SCHEMA = z.union([
|
|
|
225
237
|
const SIGNAL_VALUE_OUTCOME_BASE_SCHEMA = z.object({
|
|
226
238
|
contextId: z.string(),
|
|
227
239
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
240
|
+
scopePath: HOOK_SCOPE_PATH_SCHEMA,
|
|
228
241
|
signalInvocationId: z.string(),
|
|
229
242
|
slot: z.number().int(),
|
|
230
243
|
});
|
|
@@ -234,8 +247,11 @@ const RUNTIME_CONTEXT_PARENT_SCHEMA = z.object({
|
|
|
234
247
|
parentContextId: z.string(),
|
|
235
248
|
position: z.number().int().nonnegative(),
|
|
236
249
|
});
|
|
237
|
-
const
|
|
238
|
-
items: SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.omit({
|
|
250
|
+
const COORDINATION_SELECTION_SCHEMA = z.object({
|
|
251
|
+
items: SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.omit({
|
|
252
|
+
scopePath: true,
|
|
253
|
+
slot: true,
|
|
254
|
+
})
|
|
239
255
|
.extend({ contextId: z.string() })
|
|
240
256
|
.array(),
|
|
241
257
|
signalInvocationId: z.string(),
|
|
@@ -257,7 +273,7 @@ const SIGNAL_VALUE_OUTCOME_SCHEMA = z.union([
|
|
|
257
273
|
]);
|
|
258
274
|
const RUNTIME_VALUE_CONTEXT_SCHEMA = z.object({
|
|
259
275
|
actionOutputs: ACTION_VALUE_OUTCOME_SCHEMA.array(),
|
|
260
|
-
|
|
276
|
+
coordinationSelections: COORDINATION_SELECTION_SCHEMA.array(),
|
|
261
277
|
contextId: z.string(),
|
|
262
278
|
contextParents: RUNTIME_CONTEXT_PARENT_SCHEMA.array(),
|
|
263
279
|
events: z
|
|
@@ -266,6 +282,7 @@ const RUNTIME_VALUE_CONTEXT_SCHEMA = z.object({
|
|
|
266
282
|
contextId: z.string(),
|
|
267
283
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
268
284
|
payload: encodableSchema,
|
|
285
|
+
scopePath: HOOK_SCOPE_PATH_SCHEMA,
|
|
269
286
|
slot: z.number().int(),
|
|
270
287
|
})
|
|
271
288
|
.array(),
|
|
@@ -280,6 +297,7 @@ const RUNTIME_RUN_CONTEXT_SCHEMA = z.object({
|
|
|
280
297
|
automationEventId: z.string(),
|
|
281
298
|
contextId: z.string(),
|
|
282
299
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
300
|
+
scopePath: HOOK_SCOPE_PATH_SCHEMA,
|
|
283
301
|
slot: z.number().int(),
|
|
284
302
|
})
|
|
285
303
|
.array(),
|
|
@@ -289,11 +307,13 @@ const TARGET_ACTION_SCHEMA = z.union([
|
|
|
289
307
|
z.object({
|
|
290
308
|
context: RUNTIME_VALUE_CONTEXT_SCHEMA,
|
|
291
309
|
id: z.string(),
|
|
310
|
+
scopePath: HOOK_SCOPE_PATH_SCHEMA,
|
|
292
311
|
slot: z.number().int(),
|
|
293
312
|
status: z.literal("pending"),
|
|
294
313
|
}),
|
|
295
314
|
z.object({
|
|
296
315
|
id: z.string(),
|
|
316
|
+
scopePath: HOOK_SCOPE_PATH_SCHEMA,
|
|
297
317
|
slot: z.number().int(),
|
|
298
318
|
status: z.enum(["failed", "skipped", "succeeded"]),
|
|
299
319
|
}),
|
|
@@ -417,11 +437,16 @@ export const runtimeContract = {
|
|
|
417
437
|
commit: oc
|
|
418
438
|
.input(z.object({
|
|
419
439
|
actionInvocations: ACTION_INVOCATION_SCHEMA.array().default([]),
|
|
420
|
-
|
|
421
|
-
|
|
440
|
+
coordinationOffers: z
|
|
441
|
+
.union([
|
|
442
|
+
COLLECTION_OFFER_SCHEMA,
|
|
443
|
+
CORRELATION_OFFER_SCHEMA,
|
|
444
|
+
WINDOW_OFFER_SCHEMA,
|
|
445
|
+
])
|
|
446
|
+
.array()
|
|
447
|
+
.default([]),
|
|
422
448
|
settled: z.boolean().default(true),
|
|
423
449
|
signalInvocations: SIGNAL_INVOCATION_SCHEMA.array().default([]),
|
|
424
|
-
windowEntries: WINDOW_ENTRY_SCHEMA.array().default([]),
|
|
425
450
|
}))
|
|
426
451
|
.output(z.void()),
|
|
427
452
|
completeAction: oc
|
|
@@ -457,7 +482,10 @@ export const runtimeContract = {
|
|
|
457
482
|
targetAction: TARGET_ACTION_SCHEMA.optional(),
|
|
458
483
|
})),
|
|
459
484
|
loadValues: oc
|
|
460
|
-
.input(SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.omit({
|
|
485
|
+
.input(SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.omit({
|
|
486
|
+
scopePath: true,
|
|
487
|
+
slot: true,
|
|
488
|
+
}))
|
|
461
489
|
.output(RUNTIME_VALUE_CONTEXT_SCHEMA),
|
|
462
490
|
resolveAccountInput: oc
|
|
463
491
|
.input(z.strictObject({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ai-sdk/gateway": "^4.0.46",
|
|
31
|
-
"@automate.ax/codec": "0.
|
|
31
|
+
"@automate.ax/codec": "0.57.0",
|
|
32
32
|
"@orpc/contract": "1.15.0",
|
|
33
33
|
"zod": "^4.3.6"
|
|
34
34
|
},
|
package/src/api-key.ts
CHANGED
|
@@ -39,7 +39,7 @@ export const apiKeyContract = {
|
|
|
39
39
|
delete: oc
|
|
40
40
|
.route({
|
|
41
41
|
method: "DELETE",
|
|
42
|
-
path: "/
|
|
42
|
+
path: "/api-keys/{keyId}",
|
|
43
43
|
operationId: "deleteOrganizationApiKey",
|
|
44
44
|
summary: "Delete organization API key",
|
|
45
45
|
description:
|
|
@@ -47,12 +47,7 @@ export const apiKeyContract = {
|
|
|
47
47
|
successStatus: 204,
|
|
48
48
|
tags: ["API Keys"],
|
|
49
49
|
})
|
|
50
|
-
.input(
|
|
51
|
-
z.object({
|
|
52
|
-
keyId: z.string(),
|
|
53
|
-
organizationId: z.string(),
|
|
54
|
-
}),
|
|
55
|
-
)
|
|
50
|
+
.input(z.object({ keyId: z.string() }))
|
|
56
51
|
.output(z.void()),
|
|
57
52
|
list: oc
|
|
58
53
|
.route({
|
|
@@ -69,7 +64,7 @@ export const apiKeyContract = {
|
|
|
69
64
|
update: oc
|
|
70
65
|
.route({
|
|
71
66
|
method: "PATCH",
|
|
72
|
-
path: "/
|
|
67
|
+
path: "/api-keys/{keyId}",
|
|
73
68
|
operationId: "updateOrganizationApiKey",
|
|
74
69
|
summary: "Update organization API key",
|
|
75
70
|
description:
|
|
@@ -80,7 +75,6 @@ export const apiKeyContract = {
|
|
|
80
75
|
z.object({
|
|
81
76
|
keyId: z.string(),
|
|
82
77
|
name: reasonableNameSchema,
|
|
83
|
-
organizationId: z.string(),
|
|
84
78
|
}),
|
|
85
79
|
)
|
|
86
80
|
.output(organizationApiKeyOutputSchema),
|
package/src/automation.ts
CHANGED
|
@@ -28,7 +28,6 @@ export const automationContract = {
|
|
|
28
28
|
z.object({
|
|
29
29
|
automationId: z.string(),
|
|
30
30
|
executionId: z.string(),
|
|
31
|
-
projectId: z.string(),
|
|
32
31
|
}),
|
|
33
32
|
)
|
|
34
33
|
.output(
|
|
@@ -72,8 +71,19 @@ export const automationContract = {
|
|
|
72
71
|
z.object({
|
|
73
72
|
automationId: z.string(),
|
|
74
73
|
limit: z.number().int().min(1).max(100).default(50),
|
|
75
|
-
projectId: z.string(),
|
|
76
74
|
}),
|
|
77
75
|
)
|
|
78
76
|
.output(EXECUTION_SUMMARY_SCHEMA.array()),
|
|
77
|
+
update: oc
|
|
78
|
+
.input(
|
|
79
|
+
z.object({
|
|
80
|
+
automationId: z.string(),
|
|
81
|
+
enabled: z.boolean(),
|
|
82
|
+
}),
|
|
83
|
+
)
|
|
84
|
+
.output(
|
|
85
|
+
z.object({
|
|
86
|
+
txid: z.number().int().nonnegative(),
|
|
87
|
+
}),
|
|
88
|
+
),
|
|
79
89
|
}
|