@automate.ax/api-contract 0.49.0 → 0.50.1
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/account.d.ts +1 -0
- package/dist/account.js +1 -0
- package/dist/authorization.d.ts +55 -0
- package/dist/authorization.js +11 -0
- package/dist/deployment.d.ts +28 -0
- package/dist/deployment.js +27 -0
- package/dist/index.d.ts +176 -2
- package/dist/index.js +1 -0
- package/dist/runtime.d.ts +15 -4
- package/dist/runtime.js +11 -1
- package/package.json +2 -2
- package/src/account.ts +1 -0
- package/src/authorization.ts +15 -0
- package/src/deployment.ts +30 -0
- package/src/index.ts +1 -0
- package/src/runtime.ts +13 -1
package/dist/account.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const accountContract: {
|
|
|
16
16
|
beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
17
17
|
connectionId: z.ZodString;
|
|
18
18
|
organizationId: z.ZodString;
|
|
19
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
19
20
|
serviceId: z.ZodString;
|
|
20
21
|
}, z.core.$strip>, z.ZodObject<{
|
|
21
22
|
flowId: z.ZodString;
|
package/dist/account.js
CHANGED
|
@@ -21,6 +21,7 @@ export const accountContract = {
|
|
|
21
21
|
.input(z.object({
|
|
22
22
|
connectionId: z.string().min(1),
|
|
23
23
|
organizationId: z.string(),
|
|
24
|
+
scopes: z.string().array().default([]),
|
|
24
25
|
serviceId: z.string().min(1),
|
|
25
26
|
}))
|
|
26
27
|
.output(z.object({ flowId: z.string(), url: z.url() })),
|
package/dist/authorization.d.ts
CHANGED
|
@@ -197,6 +197,61 @@ export declare const authorizationContract: {
|
|
|
197
197
|
id: z.ZodString;
|
|
198
198
|
}, z.core.$strip>>;
|
|
199
199
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
200
|
+
getServices: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
201
|
+
projectId: z.ZodString;
|
|
202
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
203
|
+
services: z.ZodArray<z.ZodObject<{
|
|
204
|
+
connections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
205
|
+
description: z.ZodOptional<z.ZodString>;
|
|
206
|
+
id: z.ZodString;
|
|
207
|
+
name: z.ZodString;
|
|
208
|
+
type: z.ZodLiteral<"redirect">;
|
|
209
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
210
|
+
description: z.ZodOptional<z.ZodString>;
|
|
211
|
+
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
212
|
+
description: z.ZodOptional<z.ZodString>;
|
|
213
|
+
label: z.ZodString;
|
|
214
|
+
name: z.ZodString;
|
|
215
|
+
required: z.ZodBoolean;
|
|
216
|
+
default: z.ZodOptional<z.ZodString>;
|
|
217
|
+
input: z.ZodEnum<{
|
|
218
|
+
email: "email";
|
|
219
|
+
text: "text";
|
|
220
|
+
url: "url";
|
|
221
|
+
}>;
|
|
222
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
description: z.ZodOptional<z.ZodString>;
|
|
225
|
+
label: z.ZodString;
|
|
226
|
+
name: z.ZodString;
|
|
227
|
+
required: z.ZodBoolean;
|
|
228
|
+
input: z.ZodLiteral<"password">;
|
|
229
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
230
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
231
|
+
description: z.ZodOptional<z.ZodString>;
|
|
232
|
+
label: z.ZodString;
|
|
233
|
+
name: z.ZodString;
|
|
234
|
+
required: z.ZodBoolean;
|
|
235
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
236
|
+
input: z.ZodLiteral<"number">;
|
|
237
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
+
description: z.ZodOptional<z.ZodString>;
|
|
240
|
+
label: z.ZodString;
|
|
241
|
+
name: z.ZodString;
|
|
242
|
+
required: z.ZodBoolean;
|
|
243
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
input: z.ZodLiteral<"boolean">;
|
|
245
|
+
}, z.core.$strip>], "input">>;
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
name: z.ZodString;
|
|
248
|
+
type: z.ZodLiteral<"form">;
|
|
249
|
+
}, z.core.$strip>], "type">>;
|
|
250
|
+
description: z.ZodOptional<z.ZodString>;
|
|
251
|
+
name: z.ZodString;
|
|
252
|
+
id: z.ZodString;
|
|
253
|
+
}, z.core.$strip>>;
|
|
254
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
200
255
|
submitCredentials: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
201
256
|
binding: z.ZodString;
|
|
202
257
|
connectionId: z.ZodString;
|
package/dist/authorization.js
CHANGED
|
@@ -123,6 +123,17 @@ export const authorizationContract = {
|
|
|
123
123
|
})
|
|
124
124
|
.array(),
|
|
125
125
|
})),
|
|
126
|
+
getServices: oc
|
|
127
|
+
.input(z.object({
|
|
128
|
+
projectId: z.string(),
|
|
129
|
+
}))
|
|
130
|
+
.output(z.object({
|
|
131
|
+
services: integrationServiceManifestSchema
|
|
132
|
+
.extend({
|
|
133
|
+
id: z.string().min(1),
|
|
134
|
+
})
|
|
135
|
+
.array(),
|
|
136
|
+
})),
|
|
126
137
|
submitCredentials: oc
|
|
127
138
|
.input(z.object({
|
|
128
139
|
binding: z.string().min(1),
|
package/dist/deployment.d.ts
CHANGED
|
@@ -96,4 +96,32 @@ export declare const deploymentContract: {
|
|
|
96
96
|
cancelled: "cancelled";
|
|
97
97
|
}>;
|
|
98
98
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
99
|
+
redeploy: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
100
|
+
bindings: z.ZodArray<z.ZodObject<{
|
|
101
|
+
accountId: z.ZodString;
|
|
102
|
+
binding: z.ZodString;
|
|
103
|
+
serviceId: z.ZodString;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
projectId: z.ZodString;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
txid: z.ZodNumber;
|
|
109
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
110
|
+
DEPLOYMENT_IN_PROGRESS: {
|
|
111
|
+
readonly data: z.ZodObject<{
|
|
112
|
+
deploymentId: z.ZodString;
|
|
113
|
+
status: z.ZodEnum<{
|
|
114
|
+
succeeded: "succeeded";
|
|
115
|
+
failed: "failed";
|
|
116
|
+
planning: "planning";
|
|
117
|
+
awaiting_authorization: "awaiting_authorization";
|
|
118
|
+
configuring: "configuring";
|
|
119
|
+
publishing: "publishing";
|
|
120
|
+
cancelled: "cancelled";
|
|
121
|
+
}>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
readonly message: "A deployment is already in progress.";
|
|
124
|
+
readonly status: 409;
|
|
125
|
+
};
|
|
126
|
+
}>, Record<never, never>>;
|
|
99
127
|
};
|
package/dist/deployment.js
CHANGED
|
@@ -101,4 +101,31 @@ export const deploymentContract = {
|
|
|
101
101
|
}),
|
|
102
102
|
status: DEPLOYMENT_STATUS_SCHEMA,
|
|
103
103
|
})),
|
|
104
|
+
redeploy: oc
|
|
105
|
+
.errors({ DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR })
|
|
106
|
+
.input(z.object({
|
|
107
|
+
bindings: z
|
|
108
|
+
.object({
|
|
109
|
+
accountId: z.string().min(1),
|
|
110
|
+
binding: z.string().min(1),
|
|
111
|
+
serviceId: z.string().min(1),
|
|
112
|
+
})
|
|
113
|
+
.array()
|
|
114
|
+
.superRefine((bindings, context) => {
|
|
115
|
+
const keys = new Set();
|
|
116
|
+
for (const [index, binding] of bindings.entries()) {
|
|
117
|
+
const key = JSON.stringify([binding.serviceId, binding.binding]);
|
|
118
|
+
if (keys.has(key)) {
|
|
119
|
+
context.addIssue({
|
|
120
|
+
code: "custom",
|
|
121
|
+
message: "Deployment bindings must be unique.",
|
|
122
|
+
path: [index],
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
keys.add(key);
|
|
126
|
+
}
|
|
127
|
+
}),
|
|
128
|
+
projectId: z.string(),
|
|
129
|
+
}))
|
|
130
|
+
.output(z.object({ id: z.string(), txid: z.number().int().nonnegative() })),
|
|
104
131
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -307,6 +307,7 @@ export declare const firstPartyContract: {
|
|
|
307
307
|
beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
308
308
|
connectionId: import("zod").ZodString;
|
|
309
309
|
organizationId: import("zod").ZodString;
|
|
310
|
+
scopes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
310
311
|
serviceId: import("zod").ZodString;
|
|
311
312
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
312
313
|
flowId: import("zod").ZodString;
|
|
@@ -599,6 +600,61 @@ export declare const firstPartyContract: {
|
|
|
599
600
|
id: import("zod").ZodString;
|
|
600
601
|
}, import("zod/v4/core").$strip>>;
|
|
601
602
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
603
|
+
getServices: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
604
|
+
projectId: import("zod").ZodString;
|
|
605
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
606
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
607
|
+
connections: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
608
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
609
|
+
id: import("zod").ZodString;
|
|
610
|
+
name: import("zod").ZodString;
|
|
611
|
+
type: import("zod").ZodLiteral<"redirect">;
|
|
612
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
613
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
614
|
+
fields: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
615
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
616
|
+
label: import("zod").ZodString;
|
|
617
|
+
name: import("zod").ZodString;
|
|
618
|
+
required: import("zod").ZodBoolean;
|
|
619
|
+
default: import("zod").ZodOptional<import("zod").ZodString>;
|
|
620
|
+
input: import("zod").ZodEnum<{
|
|
621
|
+
email: "email";
|
|
622
|
+
text: "text";
|
|
623
|
+
url: "url";
|
|
624
|
+
}>;
|
|
625
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
626
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
627
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
628
|
+
label: import("zod").ZodString;
|
|
629
|
+
name: import("zod").ZodString;
|
|
630
|
+
required: import("zod").ZodBoolean;
|
|
631
|
+
input: import("zod").ZodLiteral<"password">;
|
|
632
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
633
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
634
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
635
|
+
label: import("zod").ZodString;
|
|
636
|
+
name: import("zod").ZodString;
|
|
637
|
+
required: import("zod").ZodBoolean;
|
|
638
|
+
default: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
639
|
+
input: import("zod").ZodLiteral<"number">;
|
|
640
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
641
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
642
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
643
|
+
label: import("zod").ZodString;
|
|
644
|
+
name: import("zod").ZodString;
|
|
645
|
+
required: import("zod").ZodBoolean;
|
|
646
|
+
default: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
647
|
+
input: import("zod").ZodLiteral<"boolean">;
|
|
648
|
+
}, import("zod/v4/core").$strip>], "input">>;
|
|
649
|
+
id: import("zod").ZodString;
|
|
650
|
+
name: import("zod").ZodString;
|
|
651
|
+
type: import("zod").ZodLiteral<"form">;
|
|
652
|
+
}, import("zod/v4/core").$strip>], "type">>;
|
|
653
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
654
|
+
name: import("zod").ZodString;
|
|
655
|
+
id: import("zod").ZodString;
|
|
656
|
+
}, import("zod/v4/core").$strip>>;
|
|
657
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
602
658
|
selectAccount: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
603
659
|
accountId: import("zod").ZodString;
|
|
604
660
|
binding: import("zod").ZodString;
|
|
@@ -698,6 +754,34 @@ export declare const firstPartyContract: {
|
|
|
698
754
|
cancelled: "cancelled";
|
|
699
755
|
}>;
|
|
700
756
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
757
|
+
redeploy: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
758
|
+
bindings: import("zod").ZodArray<import("zod").ZodObject<{
|
|
759
|
+
accountId: import("zod").ZodString;
|
|
760
|
+
binding: import("zod").ZodString;
|
|
761
|
+
serviceId: import("zod").ZodString;
|
|
762
|
+
}, import("zod/v4/core").$strip>>;
|
|
763
|
+
projectId: import("zod").ZodString;
|
|
764
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
765
|
+
id: import("zod").ZodString;
|
|
766
|
+
txid: import("zod").ZodNumber;
|
|
767
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
768
|
+
DEPLOYMENT_IN_PROGRESS: {
|
|
769
|
+
readonly data: import("zod").ZodObject<{
|
|
770
|
+
deploymentId: import("zod").ZodString;
|
|
771
|
+
status: import("zod").ZodEnum<{
|
|
772
|
+
succeeded: "succeeded";
|
|
773
|
+
failed: "failed";
|
|
774
|
+
planning: "planning";
|
|
775
|
+
awaiting_authorization: "awaiting_authorization";
|
|
776
|
+
configuring: "configuring";
|
|
777
|
+
publishing: "publishing";
|
|
778
|
+
cancelled: "cancelled";
|
|
779
|
+
}>;
|
|
780
|
+
}, import("zod/v4/core").$strip>;
|
|
781
|
+
readonly message: "A deployment is already in progress.";
|
|
782
|
+
readonly status: 409;
|
|
783
|
+
};
|
|
784
|
+
}>, Record<never, never>>;
|
|
701
785
|
};
|
|
702
786
|
org: {
|
|
703
787
|
canInvite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
@@ -1125,6 +1209,61 @@ export declare const contract: {
|
|
|
1125
1209
|
id: import("zod").ZodString;
|
|
1126
1210
|
}, import("zod/v4/core").$strip>>;
|
|
1127
1211
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1212
|
+
getServices: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1213
|
+
projectId: import("zod").ZodString;
|
|
1214
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1215
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1216
|
+
connections: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
1217
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1218
|
+
id: import("zod").ZodString;
|
|
1219
|
+
name: import("zod").ZodString;
|
|
1220
|
+
type: import("zod").ZodLiteral<"redirect">;
|
|
1221
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1222
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1223
|
+
fields: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
1224
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1225
|
+
label: import("zod").ZodString;
|
|
1226
|
+
name: import("zod").ZodString;
|
|
1227
|
+
required: import("zod").ZodBoolean;
|
|
1228
|
+
default: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1229
|
+
input: import("zod").ZodEnum<{
|
|
1230
|
+
email: "email";
|
|
1231
|
+
text: "text";
|
|
1232
|
+
url: "url";
|
|
1233
|
+
}>;
|
|
1234
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1235
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1236
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1237
|
+
label: import("zod").ZodString;
|
|
1238
|
+
name: import("zod").ZodString;
|
|
1239
|
+
required: import("zod").ZodBoolean;
|
|
1240
|
+
input: import("zod").ZodLiteral<"password">;
|
|
1241
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1242
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1243
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1244
|
+
label: import("zod").ZodString;
|
|
1245
|
+
name: import("zod").ZodString;
|
|
1246
|
+
required: import("zod").ZodBoolean;
|
|
1247
|
+
default: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1248
|
+
input: import("zod").ZodLiteral<"number">;
|
|
1249
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1250
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1251
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1252
|
+
label: import("zod").ZodString;
|
|
1253
|
+
name: import("zod").ZodString;
|
|
1254
|
+
required: import("zod").ZodBoolean;
|
|
1255
|
+
default: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1256
|
+
input: import("zod").ZodLiteral<"boolean">;
|
|
1257
|
+
}, import("zod/v4/core").$strip>], "input">>;
|
|
1258
|
+
id: import("zod").ZodString;
|
|
1259
|
+
name: import("zod").ZodString;
|
|
1260
|
+
type: import("zod").ZodLiteral<"form">;
|
|
1261
|
+
}, import("zod/v4/core").$strip>], "type">>;
|
|
1262
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1263
|
+
name: import("zod").ZodString;
|
|
1264
|
+
id: import("zod").ZodString;
|
|
1265
|
+
}, import("zod/v4/core").$strip>>;
|
|
1266
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1128
1267
|
selectAccount: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1129
1268
|
accountId: import("zod").ZodString;
|
|
1130
1269
|
binding: import("zod").ZodString;
|
|
@@ -1281,6 +1420,7 @@ export declare const contract: {
|
|
|
1281
1420
|
eventDependencyIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
1282
1421
|
signalDependencyIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
1283
1422
|
slot: import("zod").ZodNumber;
|
|
1423
|
+
continueFrom: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1284
1424
|
key: import("zod").ZodOptional<import("zod").ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
1285
1425
|
outcomeSeq: import("zod").ZodNumber;
|
|
1286
1426
|
streamName: import("zod").ZodString;
|
|
@@ -1437,11 +1577,16 @@ export declare const contract: {
|
|
|
1437
1577
|
type: import("zod").ZodLiteral<"other">;
|
|
1438
1578
|
}, import("zod/v4/core").$strip>], "type">>>;
|
|
1439
1579
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1440
|
-
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1441
|
-
automationName: import("zod").ZodString;
|
|
1580
|
+
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1442
1581
|
entrypoint: import("zod").ZodDefault<import("zod").ZodString>;
|
|
1443
1582
|
payload: import("zod").ZodOptional<import("zod").ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
1444
1583
|
}, import("zod/v4/core").$strip>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
1584
|
+
automationId: import("zod").ZodString;
|
|
1585
|
+
automationName: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
1586
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1587
|
+
automationId: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
1588
|
+
automationName: import("zod").ZodString;
|
|
1589
|
+
}, import("zod/v4/core").$strip>]>>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
1445
1590
|
runAt: import("zod").ZodUnion<readonly [import("zod").ZodDate, import("zod").ZodString, import("zod").ZodNumber]>;
|
|
1446
1591
|
runIn: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
1447
1592
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -1755,6 +1900,7 @@ export declare const contract: {
|
|
|
1755
1900
|
beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1756
1901
|
connectionId: import("zod").ZodString;
|
|
1757
1902
|
organizationId: import("zod").ZodString;
|
|
1903
|
+
scopes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1758
1904
|
serviceId: import("zod").ZodString;
|
|
1759
1905
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1760
1906
|
flowId: import("zod").ZodString;
|
|
@@ -2038,6 +2184,34 @@ export declare const contract: {
|
|
|
2038
2184
|
cancelled: "cancelled";
|
|
2039
2185
|
}>;
|
|
2040
2186
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2187
|
+
redeploy: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2188
|
+
bindings: import("zod").ZodArray<import("zod").ZodObject<{
|
|
2189
|
+
accountId: import("zod").ZodString;
|
|
2190
|
+
binding: import("zod").ZodString;
|
|
2191
|
+
serviceId: import("zod").ZodString;
|
|
2192
|
+
}, import("zod/v4/core").$strip>>;
|
|
2193
|
+
projectId: import("zod").ZodString;
|
|
2194
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2195
|
+
id: import("zod").ZodString;
|
|
2196
|
+
txid: import("zod").ZodNumber;
|
|
2197
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
2198
|
+
DEPLOYMENT_IN_PROGRESS: {
|
|
2199
|
+
readonly data: import("zod").ZodObject<{
|
|
2200
|
+
deploymentId: import("zod").ZodString;
|
|
2201
|
+
status: import("zod").ZodEnum<{
|
|
2202
|
+
succeeded: "succeeded";
|
|
2203
|
+
failed: "failed";
|
|
2204
|
+
planning: "planning";
|
|
2205
|
+
awaiting_authorization: "awaiting_authorization";
|
|
2206
|
+
configuring: "configuring";
|
|
2207
|
+
publishing: "publishing";
|
|
2208
|
+
cancelled: "cancelled";
|
|
2209
|
+
}>;
|
|
2210
|
+
}, import("zod/v4/core").$strip>;
|
|
2211
|
+
readonly message: "A deployment is already in progress.";
|
|
2212
|
+
readonly status: 409;
|
|
2213
|
+
};
|
|
2214
|
+
}>, Record<never, never>>;
|
|
2041
2215
|
};
|
|
2042
2216
|
org: {
|
|
2043
2217
|
canInvite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -51,6 +51,7 @@ export const firstPartyContract = {
|
|
|
51
51
|
authorization: {
|
|
52
52
|
beginConnection: authorizationContract.beginConnection,
|
|
53
53
|
get: authorizationContract.get,
|
|
54
|
+
getServices: authorizationContract.getServices,
|
|
54
55
|
selectAccount: authorizationContract.selectAccount,
|
|
55
56
|
submitCredentials: authorizationContract.submitCredentials,
|
|
56
57
|
},
|
package/dist/runtime.d.ts
CHANGED
|
@@ -19,11 +19,16 @@ export declare const automationInvocationOutputSchema: z.ZodObject<{
|
|
|
19
19
|
id: z.ZodString;
|
|
20
20
|
runAt: z.ZodDate;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
|
-
export declare const automationInvocationInputSchema: z.ZodIntersection<z.ZodObject<{
|
|
23
|
-
automationName: z.ZodString;
|
|
22
|
+
export declare const automationInvocationInputSchema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
24
23
|
entrypoint: z.ZodDefault<z.ZodString>;
|
|
25
24
|
payload: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
26
25
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
26
|
+
automationId: z.ZodString;
|
|
27
|
+
automationName: z.ZodOptional<z.ZodNever>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
automationId: z.ZodOptional<z.ZodNever>;
|
|
30
|
+
automationName: z.ZodString;
|
|
31
|
+
}, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodObject<{
|
|
27
32
|
runAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString, z.ZodNumber]>;
|
|
28
33
|
runIn: z.ZodOptional<z.ZodNever>;
|
|
29
34
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -223,6 +228,7 @@ export declare const runtimeContract: {
|
|
|
223
228
|
eventDependencyIds: z.ZodArray<z.ZodString>;
|
|
224
229
|
signalDependencyIds: z.ZodArray<z.ZodString>;
|
|
225
230
|
slot: z.ZodNumber;
|
|
231
|
+
continueFrom: z.ZodOptional<z.ZodString>;
|
|
226
232
|
key: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
227
233
|
outcomeSeq: z.ZodNumber;
|
|
228
234
|
streamName: z.ZodString;
|
|
@@ -379,11 +385,16 @@ export declare const runtimeContract: {
|
|
|
379
385
|
type: z.ZodLiteral<"other">;
|
|
380
386
|
}, z.core.$strip>], "type">>>;
|
|
381
387
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
382
|
-
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
383
|
-
automationName: z.ZodString;
|
|
388
|
+
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
384
389
|
entrypoint: z.ZodDefault<z.ZodString>;
|
|
385
390
|
payload: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
386
391
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
392
|
+
automationId: z.ZodString;
|
|
393
|
+
automationName: z.ZodOptional<z.ZodNever>;
|
|
394
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
395
|
+
automationId: z.ZodOptional<z.ZodNever>;
|
|
396
|
+
automationName: z.ZodString;
|
|
397
|
+
}, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodObject<{
|
|
387
398
|
runAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString, z.ZodNumber]>;
|
|
388
399
|
runIn: z.ZodOptional<z.ZodNever>;
|
|
389
400
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/runtime.js
CHANGED
|
@@ -41,13 +41,22 @@ export const automationInvocationOutputSchema = z.object({
|
|
|
41
41
|
});
|
|
42
42
|
export const automationInvocationInputSchema = z
|
|
43
43
|
.object({
|
|
44
|
-
automationName: z.string().min(1),
|
|
45
44
|
entrypoint: z
|
|
46
45
|
.string()
|
|
47
46
|
.min(1)
|
|
48
47
|
.default(AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT),
|
|
49
48
|
payload: encodableSchema,
|
|
50
49
|
})
|
|
50
|
+
.and(z.union([
|
|
51
|
+
z.object({
|
|
52
|
+
automationId: z.string().min(1),
|
|
53
|
+
automationName: z.never().optional(),
|
|
54
|
+
}),
|
|
55
|
+
z.object({
|
|
56
|
+
automationId: z.never().optional(),
|
|
57
|
+
automationName: z.string().min(1),
|
|
58
|
+
}),
|
|
59
|
+
]))
|
|
51
60
|
.and(automationInvocationScheduleSchema);
|
|
52
61
|
const ACTION_INVOCATION_BASE_SCHEMA = z.object({
|
|
53
62
|
actionDependencyIds: z.string().array(),
|
|
@@ -103,6 +112,7 @@ const SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA = z.object({
|
|
|
103
112
|
slot: z.number().int().nonnegative(),
|
|
104
113
|
});
|
|
105
114
|
const CORRELATION_ENTRY_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
|
|
115
|
+
continueFrom: z.string().min(1).optional(),
|
|
106
116
|
key: encodableSchema,
|
|
107
117
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
108
118
|
streamName: 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.50.1",
|
|
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.50.1",
|
|
32
32
|
"@orpc/contract": "1.15.0",
|
|
33
33
|
"zod": "^4.3.6"
|
|
34
34
|
},
|
package/src/account.ts
CHANGED
package/src/authorization.ts
CHANGED
|
@@ -155,6 +155,21 @@ export const authorizationContract = {
|
|
|
155
155
|
.array(),
|
|
156
156
|
}),
|
|
157
157
|
),
|
|
158
|
+
getServices: oc
|
|
159
|
+
.input(
|
|
160
|
+
z.object({
|
|
161
|
+
projectId: z.string(),
|
|
162
|
+
}),
|
|
163
|
+
)
|
|
164
|
+
.output(
|
|
165
|
+
z.object({
|
|
166
|
+
services: integrationServiceManifestSchema
|
|
167
|
+
.extend({
|
|
168
|
+
id: z.string().min(1),
|
|
169
|
+
})
|
|
170
|
+
.array(),
|
|
171
|
+
}),
|
|
172
|
+
),
|
|
158
173
|
submitCredentials: oc
|
|
159
174
|
.input(
|
|
160
175
|
z.object({
|
package/src/deployment.ts
CHANGED
|
@@ -118,4 +118,34 @@ export const deploymentContract = {
|
|
|
118
118
|
status: DEPLOYMENT_STATUS_SCHEMA,
|
|
119
119
|
}),
|
|
120
120
|
),
|
|
121
|
+
redeploy: oc
|
|
122
|
+
.errors({ DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR })
|
|
123
|
+
.input(
|
|
124
|
+
z.object({
|
|
125
|
+
bindings: z
|
|
126
|
+
.object({
|
|
127
|
+
accountId: z.string().min(1),
|
|
128
|
+
binding: z.string().min(1),
|
|
129
|
+
serviceId: z.string().min(1),
|
|
130
|
+
})
|
|
131
|
+
.array()
|
|
132
|
+
.superRefine((bindings, context) => {
|
|
133
|
+
const keys = new Set<string>()
|
|
134
|
+
|
|
135
|
+
for (const [index, binding] of bindings.entries()) {
|
|
136
|
+
const key = JSON.stringify([binding.serviceId, binding.binding])
|
|
137
|
+
if (keys.has(key)) {
|
|
138
|
+
context.addIssue({
|
|
139
|
+
code: "custom",
|
|
140
|
+
message: "Deployment bindings must be unique.",
|
|
141
|
+
path: [index],
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
keys.add(key)
|
|
145
|
+
}
|
|
146
|
+
}),
|
|
147
|
+
projectId: z.string(),
|
|
148
|
+
}),
|
|
149
|
+
)
|
|
150
|
+
.output(z.object({ id: z.string(), txid: z.number().int().nonnegative() })),
|
|
121
151
|
}
|
package/src/index.ts
CHANGED
|
@@ -96,6 +96,7 @@ export const firstPartyContract = {
|
|
|
96
96
|
authorization: {
|
|
97
97
|
beginConnection: authorizationContract.beginConnection,
|
|
98
98
|
get: authorizationContract.get,
|
|
99
|
+
getServices: authorizationContract.getServices,
|
|
99
100
|
selectAccount: authorizationContract.selectAccount,
|
|
100
101
|
submitCredentials: authorizationContract.submitCredentials,
|
|
101
102
|
},
|
package/src/runtime.ts
CHANGED
|
@@ -50,13 +50,24 @@ export const automationInvocationOutputSchema = z.object({
|
|
|
50
50
|
|
|
51
51
|
export const automationInvocationInputSchema = z
|
|
52
52
|
.object({
|
|
53
|
-
automationName: z.string().min(1),
|
|
54
53
|
entrypoint: z
|
|
55
54
|
.string()
|
|
56
55
|
.min(1)
|
|
57
56
|
.default(AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT),
|
|
58
57
|
payload: encodableSchema,
|
|
59
58
|
})
|
|
59
|
+
.and(
|
|
60
|
+
z.union([
|
|
61
|
+
z.object({
|
|
62
|
+
automationId: z.string().min(1),
|
|
63
|
+
automationName: z.never().optional(),
|
|
64
|
+
}),
|
|
65
|
+
z.object({
|
|
66
|
+
automationId: z.never().optional(),
|
|
67
|
+
automationName: z.string().min(1),
|
|
68
|
+
}),
|
|
69
|
+
]),
|
|
70
|
+
)
|
|
60
71
|
.and(automationInvocationScheduleSchema)
|
|
61
72
|
|
|
62
73
|
const ACTION_INVOCATION_BASE_SCHEMA = z.object({
|
|
@@ -118,6 +129,7 @@ const SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA = z.object({
|
|
|
118
129
|
})
|
|
119
130
|
|
|
120
131
|
const CORRELATION_ENTRY_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
|
|
132
|
+
continueFrom: z.string().min(1).optional(),
|
|
121
133
|
key: encodableSchema,
|
|
122
134
|
outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
|
|
123
135
|
streamName: z.string().min(1),
|