@automate.ax/api-contract 0.133.0 → 0.134.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/automation.d.ts +6 -6
- package/dist/automation.js +14 -10
- package/dist/index.d.ts +17 -22
- package/dist/runtime.d.ts +4 -14
- package/dist/runtime.js +3 -16
- package/package.json +3 -3
- package/src/automation.ts +17 -10
- package/src/runtime.ts +5 -17
package/dist/automation.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export declare const automationExecutionOutputSchema: z.ZodObject<{
|
|
|
131
131
|
}, z.core.$strip>>;
|
|
132
132
|
}, z.core.$strip>;
|
|
133
133
|
export declare const automationManagementInvocationInputSchema: z.ZodIntersection<z.ZodObject<{
|
|
134
|
-
|
|
134
|
+
automation: z.ZodString;
|
|
135
135
|
entrypoint: z.ZodDefault<z.ZodString>;
|
|
136
136
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
137
137
|
payload: z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
@@ -147,7 +147,7 @@ export declare const automationManagementInvocationInputSchema: z.ZodIntersectio
|
|
|
147
147
|
}, z.core.$strip>]>>;
|
|
148
148
|
export declare const automationContract: {
|
|
149
149
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
150
|
-
|
|
150
|
+
automation: z.ZodString;
|
|
151
151
|
}, z.core.$strip>, z.ZodObject<{
|
|
152
152
|
accountBindings: z.ZodArray<z.ZodObject<{
|
|
153
153
|
account: z.ZodNullable<z.ZodObject<{
|
|
@@ -199,7 +199,7 @@ export declare const automationContract: {
|
|
|
199
199
|
updatedAt: z.ZodDate;
|
|
200
200
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
201
201
|
getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
202
|
-
|
|
202
|
+
automation: z.ZodString;
|
|
203
203
|
executionId: z.ZodString;
|
|
204
204
|
}, z.core.$strip>, z.ZodObject<{
|
|
205
205
|
id: z.ZodString;
|
|
@@ -266,7 +266,7 @@ export declare const automationContract: {
|
|
|
266
266
|
}, z.core.$strip>>;
|
|
267
267
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
268
268
|
invoke: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
269
|
-
|
|
269
|
+
automation: z.ZodString;
|
|
270
270
|
entrypoint: z.ZodDefault<z.ZodString>;
|
|
271
271
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
272
272
|
payload: z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
@@ -347,7 +347,7 @@ export declare const automationContract: {
|
|
|
347
347
|
}, z.core.$strip>;
|
|
348
348
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
349
349
|
listExecutions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
350
|
-
|
|
350
|
+
automation: z.ZodString;
|
|
351
351
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
352
352
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
353
353
|
createdAt: z.ZodDate;
|
|
@@ -362,7 +362,7 @@ export declare const automationContract: {
|
|
|
362
362
|
}>;
|
|
363
363
|
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
364
364
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
365
|
-
|
|
365
|
+
automation: z.ZodString;
|
|
366
366
|
enabled: z.ZodBoolean;
|
|
367
367
|
}, z.core.$strip>, z.ZodObject<{
|
|
368
368
|
txid: z.ZodNumber;
|
package/dist/automation.js
CHANGED
|
@@ -116,9 +116,13 @@ export const automationExecutionOutputSchema = automationExecutionSummarySchema
|
|
|
116
116
|
})
|
|
117
117
|
.array(),
|
|
118
118
|
});
|
|
119
|
+
const AUTOMATION_SELECTOR_SCHEMA = z
|
|
120
|
+
.string()
|
|
121
|
+
.min(1)
|
|
122
|
+
.describe("Exact automation ID or unique active deployed description. IDs take precedence.");
|
|
119
123
|
export const automationManagementInvocationInputSchema = z
|
|
120
124
|
.object({
|
|
121
|
-
|
|
125
|
+
automation: AUTOMATION_SELECTOR_SCHEMA,
|
|
122
126
|
entrypoint: z
|
|
123
127
|
.string()
|
|
124
128
|
.min(1)
|
|
@@ -131,32 +135,32 @@ export const automationContract = {
|
|
|
131
135
|
get: oc
|
|
132
136
|
.route({
|
|
133
137
|
method: "GET",
|
|
134
|
-
path: "/automations/{
|
|
138
|
+
path: "/automations/{automation}",
|
|
135
139
|
operationId: "getAutomation",
|
|
136
140
|
summary: "Get automation",
|
|
137
141
|
description: "Returns an active automation with its triggers and integration account bindings.",
|
|
138
142
|
tags: ["Automations"],
|
|
139
143
|
})
|
|
140
|
-
.input(z.object({
|
|
144
|
+
.input(z.object({ automation: AUTOMATION_SELECTOR_SCHEMA }))
|
|
141
145
|
.output(automationOutputSchema),
|
|
142
146
|
getExecution: oc
|
|
143
147
|
.route({
|
|
144
148
|
method: "GET",
|
|
145
|
-
path: "/automations/{
|
|
149
|
+
path: "/automations/{automation}/executions/{executionId}",
|
|
146
150
|
operationId: "getAutomationExecution",
|
|
147
151
|
summary: "Get automation execution",
|
|
148
152
|
description: "Returns one execution with decoded events, outputs, actions, and durable logical attempt history.",
|
|
149
153
|
tags: ["Automations"],
|
|
150
154
|
})
|
|
151
155
|
.input(z.object({
|
|
152
|
-
|
|
156
|
+
automation: AUTOMATION_SELECTOR_SCHEMA,
|
|
153
157
|
executionId: z.string(),
|
|
154
158
|
}))
|
|
155
159
|
.output(automationExecutionOutputSchema),
|
|
156
160
|
invoke: oc
|
|
157
161
|
.route({
|
|
158
162
|
method: "POST",
|
|
159
|
-
path: "/automations/{
|
|
163
|
+
path: "/automations/{automation}/invocations",
|
|
160
164
|
operationId: "invokeAutomation",
|
|
161
165
|
summary: "Invoke automation",
|
|
162
166
|
description: "Schedules an invocation for an active automation. Runtime callers use the active action as the idempotency identity; other callers must provide idempotencyKey.",
|
|
@@ -187,28 +191,28 @@ export const automationContract = {
|
|
|
187
191
|
listExecutions: oc
|
|
188
192
|
.route({
|
|
189
193
|
method: "GET",
|
|
190
|
-
path: "/automations/{
|
|
194
|
+
path: "/automations/{automation}/executions",
|
|
191
195
|
operationId: "listAutomationExecutions",
|
|
192
196
|
summary: "List automation executions",
|
|
193
197
|
description: "Lists recent execution summaries for one automation.",
|
|
194
198
|
tags: ["Automations"],
|
|
195
199
|
})
|
|
196
200
|
.input(z.object({
|
|
197
|
-
|
|
201
|
+
automation: AUTOMATION_SELECTOR_SCHEMA,
|
|
198
202
|
limit: z.number().int().min(1).max(100).default(50),
|
|
199
203
|
}))
|
|
200
204
|
.output(automationExecutionSummarySchema.array()),
|
|
201
205
|
update: oc
|
|
202
206
|
.route({
|
|
203
207
|
method: "PATCH",
|
|
204
|
-
path: "/automations/{
|
|
208
|
+
path: "/automations/{automation}",
|
|
205
209
|
operationId: "updateAutomation",
|
|
206
210
|
summary: "Update automation",
|
|
207
211
|
description: "Enables or disables an automation. Requires project:update.",
|
|
208
212
|
tags: ["Automations"],
|
|
209
213
|
})
|
|
210
214
|
.input(z.object({
|
|
211
|
-
|
|
215
|
+
automation: AUTOMATION_SELECTOR_SCHEMA,
|
|
212
216
|
enabled: z.boolean(),
|
|
213
217
|
}))
|
|
214
218
|
.output(z.object({
|
package/dist/index.d.ts
CHANGED
|
@@ -271,7 +271,7 @@ export declare const publicContract: {
|
|
|
271
271
|
};
|
|
272
272
|
automation: {
|
|
273
273
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
274
|
-
|
|
274
|
+
automation: import("zod").ZodString;
|
|
275
275
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
276
276
|
accountBindings: import("zod").ZodArray<import("zod").ZodObject<{
|
|
277
277
|
account: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
@@ -323,7 +323,7 @@ export declare const publicContract: {
|
|
|
323
323
|
updatedAt: import("zod").ZodDate;
|
|
324
324
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
325
325
|
getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
326
|
-
|
|
326
|
+
automation: import("zod").ZodString;
|
|
327
327
|
executionId: import("zod").ZodString;
|
|
328
328
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
329
329
|
id: import("zod").ZodString;
|
|
@@ -390,7 +390,7 @@ export declare const publicContract: {
|
|
|
390
390
|
}, import("zod/v4/core").$strip>>;
|
|
391
391
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
392
392
|
invoke: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
393
|
-
|
|
393
|
+
automation: import("zod").ZodString;
|
|
394
394
|
entrypoint: import("zod").ZodDefault<import("zod").ZodString>;
|
|
395
395
|
idempotencyKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
396
396
|
payload: import("zod").ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
@@ -471,7 +471,7 @@ export declare const publicContract: {
|
|
|
471
471
|
}, import("zod/v4/core").$strip>;
|
|
472
472
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
473
473
|
listExecutions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
474
|
-
|
|
474
|
+
automation: import("zod").ZodString;
|
|
475
475
|
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
476
476
|
}, import("zod/v4/core").$strip>, import("zod").ZodArray<import("zod").ZodObject<{
|
|
477
477
|
createdAt: import("zod").ZodDate;
|
|
@@ -486,7 +486,7 @@ export declare const publicContract: {
|
|
|
486
486
|
}>;
|
|
487
487
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
|
488
488
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
489
|
-
|
|
489
|
+
automation: import("zod").ZodString;
|
|
490
490
|
enabled: import("zod").ZodBoolean;
|
|
491
491
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
492
492
|
txid: import("zod").ZodNumber;
|
|
@@ -1883,7 +1883,7 @@ export declare const firstPartyContract: {
|
|
|
1883
1883
|
};
|
|
1884
1884
|
automation: {
|
|
1885
1885
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1886
|
-
|
|
1886
|
+
automation: import("zod").ZodString;
|
|
1887
1887
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1888
1888
|
accountBindings: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1889
1889
|
account: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
@@ -1935,7 +1935,7 @@ export declare const firstPartyContract: {
|
|
|
1935
1935
|
updatedAt: import("zod").ZodDate;
|
|
1936
1936
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1937
1937
|
getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1938
|
-
|
|
1938
|
+
automation: import("zod").ZodString;
|
|
1939
1939
|
executionId: import("zod").ZodString;
|
|
1940
1940
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1941
1941
|
id: import("zod").ZodString;
|
|
@@ -2002,7 +2002,7 @@ export declare const firstPartyContract: {
|
|
|
2002
2002
|
}, import("zod/v4/core").$strip>>;
|
|
2003
2003
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2004
2004
|
invoke: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
2005
|
-
|
|
2005
|
+
automation: import("zod").ZodString;
|
|
2006
2006
|
entrypoint: import("zod").ZodDefault<import("zod").ZodString>;
|
|
2007
2007
|
idempotencyKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2008
2008
|
payload: import("zod").ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
@@ -2083,7 +2083,7 @@ export declare const firstPartyContract: {
|
|
|
2083
2083
|
}, import("zod/v4/core").$strip>;
|
|
2084
2084
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2085
2085
|
listExecutions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2086
|
-
|
|
2086
|
+
automation: import("zod").ZodString;
|
|
2087
2087
|
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
2088
2088
|
}, import("zod/v4/core").$strip>, import("zod").ZodArray<import("zod").ZodObject<{
|
|
2089
2089
|
createdAt: import("zod").ZodDate;
|
|
@@ -2098,7 +2098,7 @@ export declare const firstPartyContract: {
|
|
|
2098
2098
|
}>;
|
|
2099
2099
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
|
2100
2100
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2101
|
-
|
|
2101
|
+
automation: import("zod").ZodString;
|
|
2102
2102
|
enabled: import("zod").ZodBoolean;
|
|
2103
2103
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2104
2104
|
txid: import("zod").ZodNumber;
|
|
@@ -6645,16 +6645,11 @@ export declare const contract: {
|
|
|
6645
6645
|
createCallbackToken: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
6646
6646
|
endpointKey: import("zod").ZodString;
|
|
6647
6647
|
}, import("zod/v4/core").$strip>, import("zod").ZodString, Record<never, never>, Record<never, never>>;
|
|
6648
|
-
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").
|
|
6648
|
+
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
6649
|
+
automation: import("zod").ZodString;
|
|
6649
6650
|
entrypoint: import("zod").ZodDefault<import("zod").ZodString>;
|
|
6650
6651
|
payload: import("zod").ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
6651
6652
|
}, import("zod/v4/core").$strip>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
6652
|
-
automationId: import("zod").ZodString;
|
|
6653
|
-
automationName: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
6654
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
6655
|
-
automationId: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
6656
|
-
automationName: import("zod").ZodString;
|
|
6657
|
-
}, import("zod/v4/core").$strip>]>>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
6658
6653
|
runAt: import("zod").ZodUnion<readonly [import("zod").ZodDate, import("zod").ZodString, import("zod").ZodNumber]>;
|
|
6659
6654
|
runIn: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
6660
6655
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -8064,7 +8059,7 @@ export declare const contract: {
|
|
|
8064
8059
|
};
|
|
8065
8060
|
automation: {
|
|
8066
8061
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
8067
|
-
|
|
8062
|
+
automation: import("zod").ZodString;
|
|
8068
8063
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
8069
8064
|
accountBindings: import("zod").ZodArray<import("zod").ZodObject<{
|
|
8070
8065
|
account: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
@@ -8116,7 +8111,7 @@ export declare const contract: {
|
|
|
8116
8111
|
updatedAt: import("zod").ZodDate;
|
|
8117
8112
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
8118
8113
|
getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
8119
|
-
|
|
8114
|
+
automation: import("zod").ZodString;
|
|
8120
8115
|
executionId: import("zod").ZodString;
|
|
8121
8116
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
8122
8117
|
id: import("zod").ZodString;
|
|
@@ -8183,7 +8178,7 @@ export declare const contract: {
|
|
|
8183
8178
|
}, import("zod/v4/core").$strip>>;
|
|
8184
8179
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
8185
8180
|
invoke: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
8186
|
-
|
|
8181
|
+
automation: import("zod").ZodString;
|
|
8187
8182
|
entrypoint: import("zod").ZodDefault<import("zod").ZodString>;
|
|
8188
8183
|
idempotencyKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8189
8184
|
payload: import("zod").ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
@@ -8264,7 +8259,7 @@ export declare const contract: {
|
|
|
8264
8259
|
}, import("zod/v4/core").$strip>;
|
|
8265
8260
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
8266
8261
|
listExecutions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
8267
|
-
|
|
8262
|
+
automation: import("zod").ZodString;
|
|
8268
8263
|
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
8269
8264
|
}, import("zod/v4/core").$strip>, import("zod").ZodArray<import("zod").ZodObject<{
|
|
8270
8265
|
createdAt: import("zod").ZodDate;
|
|
@@ -8279,7 +8274,7 @@ export declare const contract: {
|
|
|
8279
8274
|
}>;
|
|
8280
8275
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
|
8281
8276
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
8282
|
-
|
|
8277
|
+
automation: import("zod").ZodString;
|
|
8283
8278
|
enabled: import("zod").ZodBoolean;
|
|
8284
8279
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
8285
8280
|
txid: import("zod").ZodNumber;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -33,16 +33,11 @@ export declare const automationInvocationOutputSchema: z.ZodObject<{
|
|
|
33
33
|
id: z.ZodString;
|
|
34
34
|
runAt: z.ZodDate;
|
|
35
35
|
}, z.core.$strip>;
|
|
36
|
-
export declare const automationInvocationInputSchema: z.ZodIntersection<z.
|
|
36
|
+
export declare const automationInvocationInputSchema: z.ZodIntersection<z.ZodObject<{
|
|
37
|
+
automation: z.ZodString;
|
|
37
38
|
entrypoint: z.ZodDefault<z.ZodString>;
|
|
38
39
|
payload: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
39
40
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
40
|
-
automationId: z.ZodString;
|
|
41
|
-
automationName: z.ZodOptional<z.ZodNever>;
|
|
42
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
-
automationId: z.ZodOptional<z.ZodNever>;
|
|
44
|
-
automationName: z.ZodString;
|
|
45
|
-
}, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodObject<{
|
|
46
41
|
runAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString, z.ZodNumber]>;
|
|
47
42
|
runIn: z.ZodOptional<z.ZodNever>;
|
|
48
43
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1955,16 +1950,11 @@ export declare const runtimeContract: {
|
|
|
1955
1950
|
createCallbackToken: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1956
1951
|
endpointKey: z.ZodString;
|
|
1957
1952
|
}, z.core.$strip>, z.ZodString, Record<never, never>, Record<never, never>>;
|
|
1958
|
-
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.
|
|
1953
|
+
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
1954
|
+
automation: z.ZodString;
|
|
1959
1955
|
entrypoint: z.ZodDefault<z.ZodString>;
|
|
1960
1956
|
payload: z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
1961
1957
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
1962
|
-
automationId: z.ZodString;
|
|
1963
|
-
automationName: z.ZodOptional<z.ZodNever>;
|
|
1964
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1965
|
-
automationId: z.ZodOptional<z.ZodNever>;
|
|
1966
|
-
automationName: z.ZodString;
|
|
1967
|
-
}, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodObject<{
|
|
1968
1958
|
runAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString, z.ZodNumber]>;
|
|
1969
1959
|
runIn: z.ZodOptional<z.ZodNever>;
|
|
1970
1960
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/runtime.js
CHANGED
|
@@ -79,29 +79,16 @@ export const automationInvocationOutputSchema = z.object({
|
|
|
79
79
|
runAt: z.date(),
|
|
80
80
|
});
|
|
81
81
|
const AUTOMATION_INVOCATION_BASE_SCHEMA = z.object({
|
|
82
|
+
automation: z.string().min(1),
|
|
82
83
|
entrypoint: z
|
|
83
84
|
.string()
|
|
84
85
|
.min(1)
|
|
85
86
|
.default(AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT),
|
|
86
87
|
});
|
|
87
|
-
const
|
|
88
|
-
z.object({
|
|
89
|
-
automationId: z.string().min(1),
|
|
90
|
-
automationName: z.never().optional(),
|
|
91
|
-
}),
|
|
92
|
-
z.object({
|
|
93
|
-
automationId: z.never().optional(),
|
|
94
|
-
automationName: z.string().min(1),
|
|
95
|
-
}),
|
|
96
|
-
]);
|
|
97
|
-
export const automationInvocationInputSchema = AUTOMATION_INVOCATION_BASE_SCHEMA.extend({ payload: encodableSchema })
|
|
98
|
-
.and(AUTOMATION_INVOCATION_TARGET_SCHEMA)
|
|
99
|
-
.and(automationInvocationScheduleSchema);
|
|
88
|
+
export const automationInvocationInputSchema = AUTOMATION_INVOCATION_BASE_SCHEMA.extend({ payload: encodableSchema }).and(automationInvocationScheduleSchema);
|
|
100
89
|
const AUTOMATION_INVOCATION_TRANSPORT_INPUT_SCHEMA = AUTOMATION_INVOCATION_BASE_SCHEMA.extend({
|
|
101
90
|
payload: codecEnvelopeSchema,
|
|
102
|
-
})
|
|
103
|
-
.and(AUTOMATION_INVOCATION_TARGET_SCHEMA)
|
|
104
|
-
.and(automationInvocationScheduleSchema);
|
|
91
|
+
}).and(automationInvocationScheduleSchema);
|
|
105
92
|
const SIGNAL_DERIVATION_NODE_SCHEMA = z.discriminatedUnion("type", [
|
|
106
93
|
z.object({
|
|
107
94
|
id: z.string().min(1),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.134.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.134.0",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.134.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/automation.ts
CHANGED
|
@@ -128,9 +128,16 @@ export const automationExecutionOutputSchema = automationExecutionSummarySchema
|
|
|
128
128
|
.array(),
|
|
129
129
|
})
|
|
130
130
|
|
|
131
|
+
const AUTOMATION_SELECTOR_SCHEMA = z
|
|
132
|
+
.string()
|
|
133
|
+
.min(1)
|
|
134
|
+
.describe(
|
|
135
|
+
"Exact automation ID or unique active deployed description. IDs take precedence.",
|
|
136
|
+
)
|
|
137
|
+
|
|
131
138
|
export const automationManagementInvocationInputSchema = z
|
|
132
139
|
.object({
|
|
133
|
-
|
|
140
|
+
automation: AUTOMATION_SELECTOR_SCHEMA,
|
|
134
141
|
entrypoint: z
|
|
135
142
|
.string()
|
|
136
143
|
.min(1)
|
|
@@ -144,19 +151,19 @@ export const automationContract = {
|
|
|
144
151
|
get: oc
|
|
145
152
|
.route({
|
|
146
153
|
method: "GET",
|
|
147
|
-
path: "/automations/{
|
|
154
|
+
path: "/automations/{automation}",
|
|
148
155
|
operationId: "getAutomation",
|
|
149
156
|
summary: "Get automation",
|
|
150
157
|
description:
|
|
151
158
|
"Returns an active automation with its triggers and integration account bindings.",
|
|
152
159
|
tags: ["Automations"],
|
|
153
160
|
})
|
|
154
|
-
.input(z.object({
|
|
161
|
+
.input(z.object({ automation: AUTOMATION_SELECTOR_SCHEMA }))
|
|
155
162
|
.output(automationOutputSchema),
|
|
156
163
|
getExecution: oc
|
|
157
164
|
.route({
|
|
158
165
|
method: "GET",
|
|
159
|
-
path: "/automations/{
|
|
166
|
+
path: "/automations/{automation}/executions/{executionId}",
|
|
160
167
|
operationId: "getAutomationExecution",
|
|
161
168
|
summary: "Get automation execution",
|
|
162
169
|
description:
|
|
@@ -165,7 +172,7 @@ export const automationContract = {
|
|
|
165
172
|
})
|
|
166
173
|
.input(
|
|
167
174
|
z.object({
|
|
168
|
-
|
|
175
|
+
automation: AUTOMATION_SELECTOR_SCHEMA,
|
|
169
176
|
executionId: z.string(),
|
|
170
177
|
}),
|
|
171
178
|
)
|
|
@@ -173,7 +180,7 @@ export const automationContract = {
|
|
|
173
180
|
invoke: oc
|
|
174
181
|
.route({
|
|
175
182
|
method: "POST",
|
|
176
|
-
path: "/automations/{
|
|
183
|
+
path: "/automations/{automation}/invocations",
|
|
177
184
|
operationId: "invokeAutomation",
|
|
178
185
|
summary: "Invoke automation",
|
|
179
186
|
description:
|
|
@@ -208,7 +215,7 @@ export const automationContract = {
|
|
|
208
215
|
listExecutions: oc
|
|
209
216
|
.route({
|
|
210
217
|
method: "GET",
|
|
211
|
-
path: "/automations/{
|
|
218
|
+
path: "/automations/{automation}/executions",
|
|
212
219
|
operationId: "listAutomationExecutions",
|
|
213
220
|
summary: "List automation executions",
|
|
214
221
|
description: "Lists recent execution summaries for one automation.",
|
|
@@ -216,7 +223,7 @@ export const automationContract = {
|
|
|
216
223
|
})
|
|
217
224
|
.input(
|
|
218
225
|
z.object({
|
|
219
|
-
|
|
226
|
+
automation: AUTOMATION_SELECTOR_SCHEMA,
|
|
220
227
|
limit: z.number().int().min(1).max(100).default(50),
|
|
221
228
|
}),
|
|
222
229
|
)
|
|
@@ -224,7 +231,7 @@ export const automationContract = {
|
|
|
224
231
|
update: oc
|
|
225
232
|
.route({
|
|
226
233
|
method: "PATCH",
|
|
227
|
-
path: "/automations/{
|
|
234
|
+
path: "/automations/{automation}",
|
|
228
235
|
operationId: "updateAutomation",
|
|
229
236
|
summary: "Update automation",
|
|
230
237
|
description:
|
|
@@ -233,7 +240,7 @@ export const automationContract = {
|
|
|
233
240
|
})
|
|
234
241
|
.input(
|
|
235
242
|
z.object({
|
|
236
|
-
|
|
243
|
+
automation: AUTOMATION_SELECTOR_SCHEMA,
|
|
237
244
|
enabled: z.boolean(),
|
|
238
245
|
}),
|
|
239
246
|
)
|
package/src/runtime.ts
CHANGED
|
@@ -106,33 +106,21 @@ export const automationInvocationOutputSchema = z.object({
|
|
|
106
106
|
})
|
|
107
107
|
|
|
108
108
|
const AUTOMATION_INVOCATION_BASE_SCHEMA = z.object({
|
|
109
|
+
automation: z.string().min(1),
|
|
109
110
|
entrypoint: z
|
|
110
111
|
.string()
|
|
111
112
|
.min(1)
|
|
112
113
|
.default(AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT),
|
|
113
114
|
})
|
|
114
|
-
const AUTOMATION_INVOCATION_TARGET_SCHEMA = z.union([
|
|
115
|
-
z.object({
|
|
116
|
-
automationId: z.string().min(1),
|
|
117
|
-
automationName: z.never().optional(),
|
|
118
|
-
}),
|
|
119
|
-
z.object({
|
|
120
|
-
automationId: z.never().optional(),
|
|
121
|
-
automationName: z.string().min(1),
|
|
122
|
-
}),
|
|
123
|
-
])
|
|
124
|
-
|
|
125
115
|
export const automationInvocationInputSchema =
|
|
126
|
-
AUTOMATION_INVOCATION_BASE_SCHEMA.extend({ payload: encodableSchema })
|
|
127
|
-
|
|
128
|
-
|
|
116
|
+
AUTOMATION_INVOCATION_BASE_SCHEMA.extend({ payload: encodableSchema }).and(
|
|
117
|
+
automationInvocationScheduleSchema,
|
|
118
|
+
)
|
|
129
119
|
|
|
130
120
|
const AUTOMATION_INVOCATION_TRANSPORT_INPUT_SCHEMA =
|
|
131
121
|
AUTOMATION_INVOCATION_BASE_SCHEMA.extend({
|
|
132
122
|
payload: codecEnvelopeSchema,
|
|
133
|
-
})
|
|
134
|
-
.and(AUTOMATION_INVOCATION_TARGET_SCHEMA)
|
|
135
|
-
.and(automationInvocationScheduleSchema)
|
|
123
|
+
}).and(automationInvocationScheduleSchema)
|
|
136
124
|
|
|
137
125
|
const SIGNAL_DERIVATION_NODE_SCHEMA = z.discriminatedUnion("type", [
|
|
138
126
|
z.object({
|