@automate.ax/api-contract 0.57.4 → 0.58.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/index.d.ts CHANGED
@@ -1111,6 +1111,7 @@ export declare const contract: {
1111
1111
  key: import("zod").ZodOptional<import("zod").ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
1112
1112
  outcomeSeq: import("zod").ZodNumber;
1113
1113
  policy: import("zod").ZodLiteral<"collect">;
1114
+ position: import("zod").ZodOptional<import("zod").ZodNumber>;
1114
1115
  primaryPosition: import("zod").ZodEnum<{
1115
1116
  first: "first";
1116
1117
  last: "last";
@@ -1129,6 +1130,15 @@ export declare const contract: {
1129
1130
  streamName: import("zod").ZodString;
1130
1131
  streamNames: import("zod").ZodArray<import("zod").ZodString>;
1131
1132
  ttl: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
1133
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1134
+ actionDependencyIds: import("zod").ZodArray<import("zod").ZodString>;
1135
+ eventDependencyIds: import("zod").ZodArray<import("zod").ZodString>;
1136
+ scopePath: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNumber>>;
1137
+ signalDependencyIds: import("zod").ZodArray<import("zod").ZodString>;
1138
+ slot: import("zod").ZodNumber;
1139
+ count: import("zod").ZodNumber;
1140
+ outcomeSeq: import("zod").ZodNumber;
1141
+ policy: import("zod").ZodLiteral<"fanout">;
1132
1142
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1133
1143
  actionDependencyIds: import("zod").ZodArray<import("zod").ZodString>;
1134
1144
  eventDependencyIds: import("zod").ZodArray<import("zod").ZodString>;
@@ -1752,11 +1762,22 @@ export declare const contract: {
1752
1762
  }, import("zod/v4/core").$strip>;
1753
1763
  outputIndex: import("zod").ZodNumber;
1754
1764
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
1755
- sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
1765
+ sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
1756
1766
  subject: import("zod").ZodString;
1757
- text: import("zod").ZodString;
1758
1767
  to: import("zod").ZodDefault<import("zod").ZodUnion<readonly [import("zod").ZodEmail, import("zod").ZodLiteral<"*">]>>;
1768
+ }, import("zod/v4/core").$strip>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
1769
+ html: import("zod").ZodString;
1770
+ markdown: import("zod").ZodOptional<import("zod").ZodString>;
1771
+ text: import("zod").ZodOptional<import("zod").ZodString>;
1759
1772
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1773
+ html: import("zod").ZodOptional<import("zod").ZodString>;
1774
+ markdown: import("zod").ZodString;
1775
+ text: import("zod").ZodOptional<import("zod").ZodString>;
1776
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1777
+ html: import("zod").ZodOptional<import("zod").ZodString>;
1778
+ markdown: import("zod").ZodOptional<import("zod").ZodString>;
1779
+ text: import("zod").ZodString;
1780
+ }, import("zod/v4/core").$strip>]>>, import("zod").ZodObject<{
1760
1781
  id: import("zod").ZodNullable<import("zod").ZodString>;
1761
1782
  }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
1762
1783
  };
package/dist/runtime.d.ts CHANGED
@@ -243,6 +243,7 @@ export declare const runtimeContract: {
243
243
  key: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
244
244
  outcomeSeq: z.ZodNumber;
245
245
  policy: z.ZodLiteral<"collect">;
246
+ position: z.ZodOptional<z.ZodNumber>;
246
247
  primaryPosition: z.ZodEnum<{
247
248
  first: "first";
248
249
  last: "last";
@@ -261,6 +262,15 @@ export declare const runtimeContract: {
261
262
  streamName: z.ZodString;
262
263
  streamNames: z.ZodArray<z.ZodString>;
263
264
  ttl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
265
+ }, z.core.$strip>, z.ZodObject<{
266
+ actionDependencyIds: z.ZodArray<z.ZodString>;
267
+ eventDependencyIds: z.ZodArray<z.ZodString>;
268
+ scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
269
+ signalDependencyIds: z.ZodArray<z.ZodString>;
270
+ slot: z.ZodNumber;
271
+ count: z.ZodNumber;
272
+ outcomeSeq: z.ZodNumber;
273
+ policy: z.ZodLiteral<"fanout">;
264
274
  }, z.core.$strip>, z.ZodObject<{
265
275
  actionDependencyIds: z.ZodArray<z.ZodString>;
266
276
  eventDependencyIds: z.ZodArray<z.ZodString>;
@@ -884,11 +894,22 @@ export declare const runtimeContract: {
884
894
  }, z.core.$strip>;
885
895
  outputIndex: z.ZodNumber;
886
896
  }, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
887
- sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
897
+ sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
888
898
  subject: z.ZodString;
889
- text: z.ZodString;
890
899
  to: z.ZodDefault<z.ZodUnion<readonly [z.ZodEmail, z.ZodLiteral<"*">]>>;
900
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
901
+ html: z.ZodString;
902
+ markdown: z.ZodOptional<z.ZodString>;
903
+ text: z.ZodOptional<z.ZodString>;
891
904
  }, z.core.$strip>, z.ZodObject<{
905
+ html: z.ZodOptional<z.ZodString>;
906
+ markdown: z.ZodString;
907
+ text: z.ZodOptional<z.ZodString>;
908
+ }, z.core.$strip>, z.ZodObject<{
909
+ html: z.ZodOptional<z.ZodString>;
910
+ markdown: z.ZodOptional<z.ZodString>;
911
+ text: z.ZodString;
912
+ }, z.core.$strip>]>>, z.ZodObject<{
892
913
  id: z.ZodNullable<z.ZodString>;
893
914
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
894
915
  };
package/dist/runtime.js CHANGED
@@ -25,6 +25,23 @@ const AUTOMATION_INVOCATION_RUN_IN_SCHEMA = z.union([
25
25
  z.string().min(1),
26
26
  z.number().nonnegative(),
27
27
  ]);
28
+ const EMAIL_BODY_SCHEMA = z.union([
29
+ z.object({
30
+ html: z.string().min(1),
31
+ markdown: z.string().min(1).optional(),
32
+ text: z.string().min(1).optional(),
33
+ }),
34
+ z.object({
35
+ html: z.string().min(1).optional(),
36
+ markdown: z.string().min(1),
37
+ text: z.string().min(1).optional(),
38
+ }),
39
+ z.object({
40
+ html: z.string().min(1).optional(),
41
+ markdown: z.string().min(1).optional(),
42
+ text: z.string().min(1),
43
+ }),
44
+ ]);
28
45
  /** Immediate or mutually exclusive absolute/relative invocation timing. */
29
46
  export const automationInvocationScheduleSchema = z.union([
30
47
  z.object({
@@ -163,9 +180,15 @@ const COLLECTION_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
163
180
  key: encodableSchema,
164
181
  outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
165
182
  policy: z.literal("collect"),
183
+ position: z.number().int().nonnegative().optional(),
166
184
  primaryPosition: COORDINATION_PRIMARY_POSITION_SCHEMA,
167
185
  ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
168
186
  });
187
+ const FANOUT_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
188
+ count: z.number().int().nonnegative(),
189
+ outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
190
+ policy: z.literal("fanout"),
191
+ });
169
192
  const FUNNEL_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
170
193
  key: encodableSchema,
171
194
  maxBurstDuration: COORDINATION_DURATION_SCHEMA.optional(),
@@ -513,6 +536,7 @@ export const runtimeContract = {
513
536
  .union([
514
537
  COLLECTION_OFFER_SCHEMA,
515
538
  CORRELATION_OFFER_SCHEMA,
539
+ FANOUT_OFFER_SCHEMA,
516
540
  FUNNEL_OFFER_SCHEMA,
517
541
  RACE_OFFER_SCHEMA,
518
542
  ])
@@ -580,11 +604,12 @@ export const runtimeContract = {
580
604
  }))
581
605
  .output(z.void()),
582
606
  sendEmail: oc
583
- .input(z.object({
607
+ .input(z
608
+ .object({
584
609
  subject: z.string().min(1),
585
- text: z.string().min(1),
586
610
  to: z.union([z.email(), z.literal("*")]).default("*"),
587
- }))
611
+ })
612
+ .and(EMAIL_BODY_SCHEMA))
588
613
  .output(z.object({
589
614
  id: z.string().nullable(),
590
615
  })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/api-contract",
3
- "version": "0.57.4",
3
+ "version": "0.58.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.57.4",
31
+ "@automate.ax/codec": "0.58.0",
32
32
  "@orpc/contract": "1.15.0",
33
33
  "zod": "^4.3.6"
34
34
  },
package/src/runtime.ts CHANGED
@@ -31,6 +31,23 @@ const AUTOMATION_INVOCATION_RUN_IN_SCHEMA = z.union([
31
31
  z.string().min(1),
32
32
  z.number().nonnegative(),
33
33
  ])
34
+ const EMAIL_BODY_SCHEMA = z.union([
35
+ z.object({
36
+ html: z.string().min(1),
37
+ markdown: z.string().min(1).optional(),
38
+ text: z.string().min(1).optional(),
39
+ }),
40
+ z.object({
41
+ html: z.string().min(1).optional(),
42
+ markdown: z.string().min(1),
43
+ text: z.string().min(1).optional(),
44
+ }),
45
+ z.object({
46
+ html: z.string().min(1).optional(),
47
+ markdown: z.string().min(1).optional(),
48
+ text: z.string().min(1),
49
+ }),
50
+ ])
34
51
 
35
52
  /** Immediate or mutually exclusive absolute/relative invocation timing. */
36
53
  export const automationInvocationScheduleSchema = z.union([
@@ -184,10 +201,17 @@ const COLLECTION_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
184
201
  key: encodableSchema,
185
202
  outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
186
203
  policy: z.literal("collect"),
204
+ position: z.number().int().nonnegative().optional(),
187
205
  primaryPosition: COORDINATION_PRIMARY_POSITION_SCHEMA,
188
206
  ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
189
207
  })
190
208
 
209
+ const FANOUT_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
210
+ count: z.number().int().nonnegative(),
211
+ outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
212
+ policy: z.literal("fanout"),
213
+ })
214
+
191
215
  const FUNNEL_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
192
216
  key: encodableSchema,
193
217
  maxBurstDuration: COORDINATION_DURATION_SCHEMA.optional(),
@@ -588,6 +612,7 @@ export const runtimeContract = {
588
612
  .union([
589
613
  COLLECTION_OFFER_SCHEMA,
590
614
  CORRELATION_OFFER_SCHEMA,
615
+ FANOUT_OFFER_SCHEMA,
591
616
  FUNNEL_OFFER_SCHEMA,
592
617
  RACE_OFFER_SCHEMA,
593
618
  ])
@@ -669,11 +694,12 @@ export const runtimeContract = {
669
694
  .output(z.void()),
670
695
  sendEmail: oc
671
696
  .input(
672
- z.object({
673
- subject: z.string().min(1),
674
- text: z.string().min(1),
675
- to: z.union([z.email(), z.literal("*")]).default("*"),
676
- }),
697
+ z
698
+ .object({
699
+ subject: z.string().min(1),
700
+ to: z.union([z.email(), z.literal("*")]).default("*"),
701
+ })
702
+ .and(EMAIL_BODY_SCHEMA),
677
703
  )
678
704
  .output(
679
705
  z.object({