@automate.ax/api-contract 0.97.1 → 0.98.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/execution-data.d.ts +115 -7
- package/dist/execution-data.js +23 -12
- package/dist/index.d.ts +97 -10
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/execution-data.ts +38 -13
- package/src/index.ts +3 -0
package/dist/execution-data.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const EXECUTION_DATASET_VERSION =
|
|
2
|
+
export declare const EXECUTION_DATASET_VERSION = 9;
|
|
3
3
|
/** @deprecated Retained until execution dataset version 8 clients are retired. */
|
|
4
4
|
export declare const LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE: "trace-spans";
|
|
5
|
+
/** @deprecated Use `currentExecutionDatasetResourceSchema`. */
|
|
5
6
|
export declare const executionDatasetResourceSchema: z.ZodEnum<{
|
|
6
7
|
automations: "automations";
|
|
7
8
|
projects: "projects";
|
|
@@ -20,15 +21,67 @@ export declare const executionDatasetResourceSchema: z.ZodEnum<{
|
|
|
20
21
|
"signal-decisions": "signal-decisions";
|
|
21
22
|
logs: "logs";
|
|
22
23
|
}>;
|
|
24
|
+
export declare const currentExecutionDatasetResourceSchema: z.ZodEnum<{
|
|
25
|
+
automations: "automations";
|
|
26
|
+
projects: "projects";
|
|
27
|
+
events: "events";
|
|
28
|
+
actions: "actions";
|
|
29
|
+
outputs: "outputs";
|
|
30
|
+
"automation-invocations": "automation-invocations";
|
|
31
|
+
contexts: "contexts";
|
|
32
|
+
"context-parents": "context-parents";
|
|
33
|
+
"event-links": "event-links";
|
|
34
|
+
"action-attempts": "action-attempts";
|
|
35
|
+
"signal-invocations": "signal-invocations";
|
|
36
|
+
"signal-coordinators": "signal-coordinators";
|
|
37
|
+
"signal-offers": "signal-offers";
|
|
38
|
+
"signal-decisions": "signal-decisions";
|
|
39
|
+
logs: "logs";
|
|
40
|
+
}>;
|
|
23
41
|
export declare const executionDatasetScopeSchema: z.ZodObject<{
|
|
24
42
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
25
43
|
projectId: z.ZodNullable<z.ZodString>;
|
|
26
44
|
since: z.ZodNullable<z.ZodISODateTime>;
|
|
27
45
|
}, z.core.$strip>;
|
|
28
46
|
export declare const executionDatasetProfileIdSchema: z.ZodString;
|
|
29
|
-
export declare const
|
|
47
|
+
export declare const currentExecutionDatasetManifestSchema: z.ZodObject<{
|
|
30
48
|
consistency: z.ZodLiteral<"eventual">;
|
|
31
49
|
profileId: z.ZodString;
|
|
50
|
+
scope: z.ZodObject<{
|
|
51
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
52
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
53
|
+
since: z.ZodNullable<z.ZodISODateTime>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
resources: z.ZodArray<z.ZodObject<{
|
|
56
|
+
name: z.ZodEnum<{
|
|
57
|
+
automations: "automations";
|
|
58
|
+
projects: "projects";
|
|
59
|
+
events: "events";
|
|
60
|
+
actions: "actions";
|
|
61
|
+
outputs: "outputs";
|
|
62
|
+
"automation-invocations": "automation-invocations";
|
|
63
|
+
contexts: "contexts";
|
|
64
|
+
"context-parents": "context-parents";
|
|
65
|
+
"event-links": "event-links";
|
|
66
|
+
"action-attempts": "action-attempts";
|
|
67
|
+
"signal-invocations": "signal-invocations";
|
|
68
|
+
"signal-coordinators": "signal-coordinators";
|
|
69
|
+
"signal-offers": "signal-offers";
|
|
70
|
+
"signal-decisions": "signal-decisions";
|
|
71
|
+
logs: "logs";
|
|
72
|
+
}>;
|
|
73
|
+
url: z.ZodURL;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
schemaVersion: z.ZodLiteral<9>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export declare const executionDatasetManifestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
78
|
+
consistency: z.ZodLiteral<"eventual">;
|
|
79
|
+
profileId: z.ZodString;
|
|
80
|
+
scope: z.ZodObject<{
|
|
81
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
82
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
83
|
+
since: z.ZodNullable<z.ZodISODateTime>;
|
|
84
|
+
}, z.core.$strip>;
|
|
32
85
|
resources: z.ZodArray<z.ZodObject<{
|
|
33
86
|
name: z.ZodEnum<{
|
|
34
87
|
automations: "automations";
|
|
@@ -50,24 +103,55 @@ export declare const executionDatasetManifestSchema: z.ZodObject<{
|
|
|
50
103
|
}>;
|
|
51
104
|
url: z.ZodURL;
|
|
52
105
|
}, z.core.$strip>>;
|
|
53
|
-
schemaVersion: z.
|
|
106
|
+
schemaVersion: z.ZodLiteral<8>;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
consistency: z.ZodLiteral<"eventual">;
|
|
109
|
+
profileId: z.ZodString;
|
|
54
110
|
scope: z.ZodObject<{
|
|
55
111
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
56
112
|
projectId: z.ZodNullable<z.ZodString>;
|
|
57
113
|
since: z.ZodNullable<z.ZodISODateTime>;
|
|
58
114
|
}, z.core.$strip>;
|
|
59
|
-
|
|
115
|
+
resources: z.ZodArray<z.ZodObject<{
|
|
116
|
+
name: z.ZodEnum<{
|
|
117
|
+
automations: "automations";
|
|
118
|
+
projects: "projects";
|
|
119
|
+
events: "events";
|
|
120
|
+
actions: "actions";
|
|
121
|
+
outputs: "outputs";
|
|
122
|
+
"automation-invocations": "automation-invocations";
|
|
123
|
+
contexts: "contexts";
|
|
124
|
+
"context-parents": "context-parents";
|
|
125
|
+
"event-links": "event-links";
|
|
126
|
+
"action-attempts": "action-attempts";
|
|
127
|
+
"signal-invocations": "signal-invocations";
|
|
128
|
+
"signal-coordinators": "signal-coordinators";
|
|
129
|
+
"signal-offers": "signal-offers";
|
|
130
|
+
"signal-decisions": "signal-decisions";
|
|
131
|
+
logs: "logs";
|
|
132
|
+
}>;
|
|
133
|
+
url: z.ZodURL;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
schemaVersion: z.ZodLiteral<9>;
|
|
136
|
+
}, z.core.$strip>], "schemaVersion">;
|
|
60
137
|
export type ExecutionDatasetManifest = z.infer<typeof executionDatasetManifestSchema>;
|
|
138
|
+
/** @deprecated Use `CurrentExecutionDatasetResource`. */
|
|
61
139
|
export type ExecutionDatasetResource = z.infer<typeof executionDatasetResourceSchema>;
|
|
140
|
+
export type CurrentExecutionDatasetResource = z.infer<typeof currentExecutionDatasetResourceSchema>;
|
|
62
141
|
export type ExecutionDatasetScope = z.infer<typeof executionDatasetScopeSchema>;
|
|
63
142
|
export declare const executionDataContract: {
|
|
64
143
|
manifest: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
65
144
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
66
145
|
projectId: z.ZodOptional<z.ZodString>;
|
|
67
146
|
since: z.ZodOptional<z.ZodISODateTime>;
|
|
68
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
69
148
|
consistency: z.ZodLiteral<"eventual">;
|
|
70
149
|
profileId: z.ZodString;
|
|
150
|
+
scope: z.ZodObject<{
|
|
151
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
152
|
+
projectId: z.ZodNullable<z.ZodString>;
|
|
153
|
+
since: z.ZodNullable<z.ZodISODateTime>;
|
|
154
|
+
}, z.core.$strip>;
|
|
71
155
|
resources: z.ZodArray<z.ZodObject<{
|
|
72
156
|
name: z.ZodEnum<{
|
|
73
157
|
automations: "automations";
|
|
@@ -89,11 +173,35 @@ export declare const executionDataContract: {
|
|
|
89
173
|
}>;
|
|
90
174
|
url: z.ZodURL;
|
|
91
175
|
}, z.core.$strip>>;
|
|
92
|
-
schemaVersion: z.
|
|
176
|
+
schemaVersion: z.ZodLiteral<8>;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
consistency: z.ZodLiteral<"eventual">;
|
|
179
|
+
profileId: z.ZodString;
|
|
93
180
|
scope: z.ZodObject<{
|
|
94
181
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
95
182
|
projectId: z.ZodNullable<z.ZodString>;
|
|
96
183
|
since: z.ZodNullable<z.ZodISODateTime>;
|
|
97
184
|
}, z.core.$strip>;
|
|
98
|
-
|
|
185
|
+
resources: z.ZodArray<z.ZodObject<{
|
|
186
|
+
name: z.ZodEnum<{
|
|
187
|
+
automations: "automations";
|
|
188
|
+
projects: "projects";
|
|
189
|
+
events: "events";
|
|
190
|
+
actions: "actions";
|
|
191
|
+
outputs: "outputs";
|
|
192
|
+
"automation-invocations": "automation-invocations";
|
|
193
|
+
contexts: "contexts";
|
|
194
|
+
"context-parents": "context-parents";
|
|
195
|
+
"event-links": "event-links";
|
|
196
|
+
"action-attempts": "action-attempts";
|
|
197
|
+
"signal-invocations": "signal-invocations";
|
|
198
|
+
"signal-coordinators": "signal-coordinators";
|
|
199
|
+
"signal-offers": "signal-offers";
|
|
200
|
+
"signal-decisions": "signal-decisions";
|
|
201
|
+
logs: "logs";
|
|
202
|
+
}>;
|
|
203
|
+
url: z.ZodURL;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
schemaVersion: z.ZodLiteral<9>;
|
|
206
|
+
}, z.core.$strip>], "schemaVersion">, Record<never, never>, Record<never, never>>;
|
|
99
207
|
};
|
package/dist/execution-data.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export const EXECUTION_DATASET_VERSION =
|
|
4
|
-
|
|
3
|
+
export const EXECUTION_DATASET_VERSION = 9;
|
|
4
|
+
/** @deprecated Retained until execution dataset version 8 clients are retired. */
|
|
5
|
+
const LEGACY_EXECUTION_DATASET_VERSION = 8;
|
|
5
6
|
/** @deprecated Retained until execution dataset version 8 clients are retired. */
|
|
6
7
|
export const LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE = "trace-spans";
|
|
8
|
+
/** @deprecated Use `currentExecutionDatasetResourceSchema`. */
|
|
7
9
|
export const executionDatasetResourceSchema = z.enum([
|
|
8
10
|
"projects",
|
|
9
11
|
"automations",
|
|
@@ -22,6 +24,9 @@ export const executionDatasetResourceSchema = z.enum([
|
|
|
22
24
|
"outputs",
|
|
23
25
|
LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE,
|
|
24
26
|
]);
|
|
27
|
+
export const currentExecutionDatasetResourceSchema = executionDatasetResourceSchema.exclude([
|
|
28
|
+
LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE,
|
|
29
|
+
]);
|
|
25
30
|
export const executionDatasetScopeSchema = z.object({
|
|
26
31
|
organizationId: z.string().nullable(),
|
|
27
32
|
projectId: z.string().nullable(),
|
|
@@ -30,21 +35,27 @@ export const executionDatasetScopeSchema = z.object({
|
|
|
30
35
|
export const executionDatasetProfileIdSchema = z
|
|
31
36
|
.string()
|
|
32
37
|
.regex(/^[A-Za-z0-9_-]{24}$/, "Execution dataset profile IDs must be 24 base64url characters.");
|
|
33
|
-
|
|
38
|
+
/** Fields shared by the current and deprecated rollout manifest versions. */
|
|
39
|
+
const executionDatasetManifestBaseSchema = z.object({
|
|
34
40
|
consistency: z.literal("eventual"),
|
|
35
41
|
profileId: executionDatasetProfileIdSchema,
|
|
42
|
+
scope: executionDatasetScopeSchema,
|
|
43
|
+
});
|
|
44
|
+
export const currentExecutionDatasetManifestSchema = executionDatasetManifestBaseSchema.extend({
|
|
36
45
|
resources: z
|
|
37
|
-
.object({
|
|
38
|
-
name: executionDatasetResourceSchema,
|
|
39
|
-
url: z.url(),
|
|
40
|
-
})
|
|
46
|
+
.object({ name: currentExecutionDatasetResourceSchema, url: z.url() })
|
|
41
47
|
.array(),
|
|
42
|
-
schemaVersion: z.
|
|
43
|
-
z.literal(EXECUTION_DATASET_VERSION),
|
|
44
|
-
z.literal(NEXT_EXECUTION_DATASET_VERSION),
|
|
45
|
-
]),
|
|
46
|
-
scope: executionDatasetScopeSchema,
|
|
48
|
+
schemaVersion: z.literal(EXECUTION_DATASET_VERSION),
|
|
47
49
|
});
|
|
50
|
+
export const executionDatasetManifestSchema = z.discriminatedUnion("schemaVersion", [
|
|
51
|
+
executionDatasetManifestBaseSchema.extend({
|
|
52
|
+
resources: z
|
|
53
|
+
.object({ name: executionDatasetResourceSchema, url: z.url() })
|
|
54
|
+
.array(),
|
|
55
|
+
schemaVersion: z.literal(LEGACY_EXECUTION_DATASET_VERSION),
|
|
56
|
+
}),
|
|
57
|
+
currentExecutionDatasetManifestSchema,
|
|
58
|
+
]);
|
|
48
59
|
export const executionDataContract = {
|
|
49
60
|
manifest: oc
|
|
50
61
|
.route({
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { automationExecutionStatusSchema, automationOutputSchema, } from "./automation.js";
|
|
2
|
-
export { EXECUTION_DATASET_VERSION, executionDatasetManifestSchema, executionDatasetProfileIdSchema, executionDatasetResourceSchema, executionDatasetScopeSchema, type ExecutionDatasetManifest, type ExecutionDatasetResource, type ExecutionDatasetScope, executionDataContract, } from "./execution-data.js";
|
|
2
|
+
export { EXECUTION_DATASET_VERSION, currentExecutionDatasetManifestSchema, currentExecutionDatasetResourceSchema, executionDatasetManifestSchema, executionDatasetProfileIdSchema, executionDatasetResourceSchema, executionDatasetScopeSchema, type ExecutionDatasetManifest, type ExecutionDatasetResource, type CurrentExecutionDatasetResource, type ExecutionDatasetScope, executionDataContract, } from "./execution-data.js";
|
|
3
3
|
export { AUTOMATION_SDK_VERSION, deploymentOutputSchema, deploymentStatusSchema, } from "./deployment.js";
|
|
4
4
|
export { AUTOMATION_RUNTIME_PROTOCOL_VERSION } from "./runtime-protocol.js";
|
|
5
5
|
export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, type AutomationErrorValue, } from "./errors.js";
|
|
@@ -666,9 +666,14 @@ export declare const publicContract: {
|
|
|
666
666
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
667
667
|
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
668
668
|
since: import("zod").ZodOptional<import("zod").ZodISODateTime>;
|
|
669
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
669
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
670
670
|
consistency: import("zod").ZodLiteral<"eventual">;
|
|
671
671
|
profileId: import("zod").ZodString;
|
|
672
|
+
scope: import("zod").ZodObject<{
|
|
673
|
+
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
674
|
+
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
675
|
+
since: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
676
|
+
}, import("zod/v4/core").$strip>;
|
|
672
677
|
resources: import("zod").ZodArray<import("zod").ZodObject<{
|
|
673
678
|
name: import("zod").ZodEnum<{
|
|
674
679
|
automations: "automations";
|
|
@@ -690,13 +695,37 @@ export declare const publicContract: {
|
|
|
690
695
|
}>;
|
|
691
696
|
url: import("zod").ZodURL;
|
|
692
697
|
}, import("zod/v4/core").$strip>>;
|
|
693
|
-
schemaVersion: import("zod").
|
|
698
|
+
schemaVersion: import("zod").ZodLiteral<8>;
|
|
699
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
700
|
+
consistency: import("zod").ZodLiteral<"eventual">;
|
|
701
|
+
profileId: import("zod").ZodString;
|
|
694
702
|
scope: import("zod").ZodObject<{
|
|
695
703
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
696
704
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
697
705
|
since: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
698
706
|
}, import("zod/v4/core").$strip>;
|
|
699
|
-
|
|
707
|
+
resources: import("zod").ZodArray<import("zod").ZodObject<{
|
|
708
|
+
name: import("zod").ZodEnum<{
|
|
709
|
+
automations: "automations";
|
|
710
|
+
projects: "projects";
|
|
711
|
+
events: "events";
|
|
712
|
+
actions: "actions";
|
|
713
|
+
outputs: "outputs";
|
|
714
|
+
"automation-invocations": "automation-invocations";
|
|
715
|
+
contexts: "contexts";
|
|
716
|
+
"context-parents": "context-parents";
|
|
717
|
+
"event-links": "event-links";
|
|
718
|
+
"action-attempts": "action-attempts";
|
|
719
|
+
"signal-invocations": "signal-invocations";
|
|
720
|
+
"signal-coordinators": "signal-coordinators";
|
|
721
|
+
"signal-offers": "signal-offers";
|
|
722
|
+
"signal-decisions": "signal-decisions";
|
|
723
|
+
logs: "logs";
|
|
724
|
+
}>;
|
|
725
|
+
url: import("zod").ZodURL;
|
|
726
|
+
}, import("zod/v4/core").$strip>>;
|
|
727
|
+
schemaVersion: import("zod").ZodLiteral<9>;
|
|
728
|
+
}, import("zod/v4/core").$strip>], "schemaVersion">, Record<never, never>, Record<never, never>>;
|
|
700
729
|
};
|
|
701
730
|
org: {
|
|
702
731
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
@@ -2022,9 +2051,14 @@ export declare const firstPartyContract: {
|
|
|
2022
2051
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2023
2052
|
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2024
2053
|
since: import("zod").ZodOptional<import("zod").ZodISODateTime>;
|
|
2025
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2054
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
2026
2055
|
consistency: import("zod").ZodLiteral<"eventual">;
|
|
2027
2056
|
profileId: import("zod").ZodString;
|
|
2057
|
+
scope: import("zod").ZodObject<{
|
|
2058
|
+
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2059
|
+
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2060
|
+
since: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
2061
|
+
}, import("zod/v4/core").$strip>;
|
|
2028
2062
|
resources: import("zod").ZodArray<import("zod").ZodObject<{
|
|
2029
2063
|
name: import("zod").ZodEnum<{
|
|
2030
2064
|
automations: "automations";
|
|
@@ -2046,13 +2080,37 @@ export declare const firstPartyContract: {
|
|
|
2046
2080
|
}>;
|
|
2047
2081
|
url: import("zod").ZodURL;
|
|
2048
2082
|
}, import("zod/v4/core").$strip>>;
|
|
2049
|
-
schemaVersion: import("zod").
|
|
2083
|
+
schemaVersion: import("zod").ZodLiteral<8>;
|
|
2084
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2085
|
+
consistency: import("zod").ZodLiteral<"eventual">;
|
|
2086
|
+
profileId: import("zod").ZodString;
|
|
2050
2087
|
scope: import("zod").ZodObject<{
|
|
2051
2088
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2052
2089
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2053
2090
|
since: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
2054
2091
|
}, import("zod/v4/core").$strip>;
|
|
2055
|
-
|
|
2092
|
+
resources: import("zod").ZodArray<import("zod").ZodObject<{
|
|
2093
|
+
name: import("zod").ZodEnum<{
|
|
2094
|
+
automations: "automations";
|
|
2095
|
+
projects: "projects";
|
|
2096
|
+
events: "events";
|
|
2097
|
+
actions: "actions";
|
|
2098
|
+
outputs: "outputs";
|
|
2099
|
+
"automation-invocations": "automation-invocations";
|
|
2100
|
+
contexts: "contexts";
|
|
2101
|
+
"context-parents": "context-parents";
|
|
2102
|
+
"event-links": "event-links";
|
|
2103
|
+
"action-attempts": "action-attempts";
|
|
2104
|
+
"signal-invocations": "signal-invocations";
|
|
2105
|
+
"signal-coordinators": "signal-coordinators";
|
|
2106
|
+
"signal-offers": "signal-offers";
|
|
2107
|
+
"signal-decisions": "signal-decisions";
|
|
2108
|
+
logs: "logs";
|
|
2109
|
+
}>;
|
|
2110
|
+
url: import("zod").ZodURL;
|
|
2111
|
+
}, import("zod/v4/core").$strip>>;
|
|
2112
|
+
schemaVersion: import("zod").ZodLiteral<9>;
|
|
2113
|
+
}, import("zod/v4/core").$strip>], "schemaVersion">, Record<never, never>, Record<never, never>>;
|
|
2056
2114
|
};
|
|
2057
2115
|
};
|
|
2058
2116
|
/** Complete contract implemented by the API service. */
|
|
@@ -5983,9 +6041,14 @@ export declare const contract: {
|
|
|
5983
6041
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5984
6042
|
projectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5985
6043
|
since: import("zod").ZodOptional<import("zod").ZodISODateTime>;
|
|
5986
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
6044
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
5987
6045
|
consistency: import("zod").ZodLiteral<"eventual">;
|
|
5988
6046
|
profileId: import("zod").ZodString;
|
|
6047
|
+
scope: import("zod").ZodObject<{
|
|
6048
|
+
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
6049
|
+
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
6050
|
+
since: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
6051
|
+
}, import("zod/v4/core").$strip>;
|
|
5989
6052
|
resources: import("zod").ZodArray<import("zod").ZodObject<{
|
|
5990
6053
|
name: import("zod").ZodEnum<{
|
|
5991
6054
|
automations: "automations";
|
|
@@ -6007,12 +6070,36 @@ export declare const contract: {
|
|
|
6007
6070
|
}>;
|
|
6008
6071
|
url: import("zod").ZodURL;
|
|
6009
6072
|
}, import("zod/v4/core").$strip>>;
|
|
6010
|
-
schemaVersion: import("zod").
|
|
6073
|
+
schemaVersion: import("zod").ZodLiteral<8>;
|
|
6074
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
6075
|
+
consistency: import("zod").ZodLiteral<"eventual">;
|
|
6076
|
+
profileId: import("zod").ZodString;
|
|
6011
6077
|
scope: import("zod").ZodObject<{
|
|
6012
6078
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
6013
6079
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
6014
6080
|
since: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
6015
6081
|
}, import("zod/v4/core").$strip>;
|
|
6016
|
-
|
|
6082
|
+
resources: import("zod").ZodArray<import("zod").ZodObject<{
|
|
6083
|
+
name: import("zod").ZodEnum<{
|
|
6084
|
+
automations: "automations";
|
|
6085
|
+
projects: "projects";
|
|
6086
|
+
events: "events";
|
|
6087
|
+
actions: "actions";
|
|
6088
|
+
outputs: "outputs";
|
|
6089
|
+
"automation-invocations": "automation-invocations";
|
|
6090
|
+
contexts: "contexts";
|
|
6091
|
+
"context-parents": "context-parents";
|
|
6092
|
+
"event-links": "event-links";
|
|
6093
|
+
"action-attempts": "action-attempts";
|
|
6094
|
+
"signal-invocations": "signal-invocations";
|
|
6095
|
+
"signal-coordinators": "signal-coordinators";
|
|
6096
|
+
"signal-offers": "signal-offers";
|
|
6097
|
+
"signal-decisions": "signal-decisions";
|
|
6098
|
+
logs: "logs";
|
|
6099
|
+
}>;
|
|
6100
|
+
url: import("zod").ZodURL;
|
|
6101
|
+
}, import("zod/v4/core").$strip>>;
|
|
6102
|
+
schemaVersion: import("zod").ZodLiteral<9>;
|
|
6103
|
+
}, import("zod/v4/core").$strip>], "schemaVersion">, Record<never, never>, Record<never, never>>;
|
|
6017
6104
|
};
|
|
6018
6105
|
};
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { orgContract } from "./org.js";
|
|
|
10
10
|
import { projectContract } from "./project.js";
|
|
11
11
|
import { runtimeContract } from "./runtime.js";
|
|
12
12
|
export { automationExecutionStatusSchema, automationOutputSchema, } from "./automation.js";
|
|
13
|
-
export { EXECUTION_DATASET_VERSION, executionDatasetManifestSchema, executionDatasetProfileIdSchema, executionDatasetResourceSchema, executionDatasetScopeSchema, executionDataContract, } from "./execution-data.js";
|
|
13
|
+
export { EXECUTION_DATASET_VERSION, currentExecutionDatasetManifestSchema, currentExecutionDatasetResourceSchema, executionDatasetManifestSchema, executionDatasetProfileIdSchema, executionDatasetResourceSchema, executionDatasetScopeSchema, executionDataContract, } from "./execution-data.js";
|
|
14
14
|
export { AUTOMATION_SDK_VERSION, deploymentOutputSchema, deploymentStatusSchema, } from "./deployment.js";
|
|
15
15
|
export { AUTOMATION_RUNTIME_PROTOCOL_VERSION } from "./runtime-protocol.js";
|
|
16
16
|
export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, } from "./errors.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.98.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ai-sdk/gateway": "4.0.46",
|
|
34
|
-
"@automate.ax/codec": "0.
|
|
35
|
-
"@automate.ax/integration-contracts": "0.
|
|
34
|
+
"@automate.ax/codec": "0.98.0",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.98.0",
|
|
36
36
|
"@orpc/contract": "1.15.0",
|
|
37
37
|
"fast-json-stable-stringify": "^2.1.0",
|
|
38
38
|
"zod": "^4.3.6"
|
package/src/execution-data.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract"
|
|
2
2
|
import { z } from "zod"
|
|
3
3
|
|
|
4
|
-
export const EXECUTION_DATASET_VERSION =
|
|
5
|
-
|
|
4
|
+
export const EXECUTION_DATASET_VERSION = 9
|
|
5
|
+
|
|
6
|
+
/** @deprecated Retained until execution dataset version 8 clients are retired. */
|
|
7
|
+
const LEGACY_EXECUTION_DATASET_VERSION = 8
|
|
6
8
|
|
|
7
9
|
/** @deprecated Retained until execution dataset version 8 clients are retired. */
|
|
8
10
|
export const LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE =
|
|
9
11
|
"trace-spans" as const
|
|
10
12
|
|
|
13
|
+
/** @deprecated Use `currentExecutionDatasetResourceSchema`. */
|
|
11
14
|
export const executionDatasetResourceSchema = z.enum([
|
|
12
15
|
"projects",
|
|
13
16
|
"automations",
|
|
@@ -27,6 +30,11 @@ export const executionDatasetResourceSchema = z.enum([
|
|
|
27
30
|
LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE,
|
|
28
31
|
])
|
|
29
32
|
|
|
33
|
+
export const currentExecutionDatasetResourceSchema =
|
|
34
|
+
executionDatasetResourceSchema.exclude([
|
|
35
|
+
LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE,
|
|
36
|
+
])
|
|
37
|
+
|
|
30
38
|
export const executionDatasetScopeSchema = z.object({
|
|
31
39
|
organizationId: z.string().nullable(),
|
|
32
40
|
projectId: z.string().nullable(),
|
|
@@ -40,28 +48,45 @@ export const executionDatasetProfileIdSchema = z
|
|
|
40
48
|
"Execution dataset profile IDs must be 24 base64url characters.",
|
|
41
49
|
)
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
/** Fields shared by the current and deprecated rollout manifest versions. */
|
|
52
|
+
const executionDatasetManifestBaseSchema = z.object({
|
|
44
53
|
consistency: z.literal("eventual"),
|
|
45
54
|
profileId: executionDatasetProfileIdSchema,
|
|
46
|
-
resources: z
|
|
47
|
-
.object({
|
|
48
|
-
name: executionDatasetResourceSchema,
|
|
49
|
-
url: z.url(),
|
|
50
|
-
})
|
|
51
|
-
.array(),
|
|
52
|
-
schemaVersion: z.union([
|
|
53
|
-
z.literal(EXECUTION_DATASET_VERSION),
|
|
54
|
-
z.literal(NEXT_EXECUTION_DATASET_VERSION),
|
|
55
|
-
]),
|
|
56
55
|
scope: executionDatasetScopeSchema,
|
|
57
56
|
})
|
|
58
57
|
|
|
58
|
+
export const currentExecutionDatasetManifestSchema =
|
|
59
|
+
executionDatasetManifestBaseSchema.extend({
|
|
60
|
+
resources: z
|
|
61
|
+
.object({ name: currentExecutionDatasetResourceSchema, url: z.url() })
|
|
62
|
+
.array(),
|
|
63
|
+
schemaVersion: z.literal(EXECUTION_DATASET_VERSION),
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
export const executionDatasetManifestSchema = z.discriminatedUnion(
|
|
67
|
+
"schemaVersion",
|
|
68
|
+
[
|
|
69
|
+
executionDatasetManifestBaseSchema.extend({
|
|
70
|
+
resources: z
|
|
71
|
+
.object({ name: executionDatasetResourceSchema, url: z.url() })
|
|
72
|
+
.array(),
|
|
73
|
+
schemaVersion: z.literal(LEGACY_EXECUTION_DATASET_VERSION),
|
|
74
|
+
}),
|
|
75
|
+
currentExecutionDatasetManifestSchema,
|
|
76
|
+
],
|
|
77
|
+
)
|
|
78
|
+
|
|
59
79
|
export type ExecutionDatasetManifest = z.infer<
|
|
60
80
|
typeof executionDatasetManifestSchema
|
|
61
81
|
>
|
|
82
|
+
|
|
83
|
+
/** @deprecated Use `CurrentExecutionDatasetResource`. */
|
|
62
84
|
export type ExecutionDatasetResource = z.infer<
|
|
63
85
|
typeof executionDatasetResourceSchema
|
|
64
86
|
>
|
|
87
|
+
export type CurrentExecutionDatasetResource = z.infer<
|
|
88
|
+
typeof currentExecutionDatasetResourceSchema
|
|
89
|
+
>
|
|
65
90
|
export type ExecutionDatasetScope = z.infer<typeof executionDatasetScopeSchema>
|
|
66
91
|
|
|
67
92
|
export const executionDataContract = {
|
package/src/index.ts
CHANGED
|
@@ -16,12 +16,15 @@ export {
|
|
|
16
16
|
} from "./automation"
|
|
17
17
|
export {
|
|
18
18
|
EXECUTION_DATASET_VERSION,
|
|
19
|
+
currentExecutionDatasetManifestSchema,
|
|
20
|
+
currentExecutionDatasetResourceSchema,
|
|
19
21
|
executionDatasetManifestSchema,
|
|
20
22
|
executionDatasetProfileIdSchema,
|
|
21
23
|
executionDatasetResourceSchema,
|
|
22
24
|
executionDatasetScopeSchema,
|
|
23
25
|
type ExecutionDatasetManifest,
|
|
24
26
|
type ExecutionDatasetResource,
|
|
27
|
+
type CurrentExecutionDatasetResource,
|
|
25
28
|
type ExecutionDatasetScope,
|
|
26
29
|
executionDataContract,
|
|
27
30
|
} from "./execution-data"
|