@automate.ax/api-contract 0.49.0 → 0.50.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/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 +168 -0
- package/dist/index.js +1 -0
- 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/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;
|
|
@@ -1755,6 +1894,7 @@ export declare const contract: {
|
|
|
1755
1894
|
beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1756
1895
|
connectionId: import("zod").ZodString;
|
|
1757
1896
|
organizationId: import("zod").ZodString;
|
|
1897
|
+
scopes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1758
1898
|
serviceId: import("zod").ZodString;
|
|
1759
1899
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1760
1900
|
flowId: import("zod").ZodString;
|
|
@@ -2038,6 +2178,34 @@ export declare const contract: {
|
|
|
2038
2178
|
cancelled: "cancelled";
|
|
2039
2179
|
}>;
|
|
2040
2180
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2181
|
+
redeploy: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2182
|
+
bindings: import("zod").ZodArray<import("zod").ZodObject<{
|
|
2183
|
+
accountId: import("zod").ZodString;
|
|
2184
|
+
binding: import("zod").ZodString;
|
|
2185
|
+
serviceId: import("zod").ZodString;
|
|
2186
|
+
}, import("zod/v4/core").$strip>>;
|
|
2187
|
+
projectId: import("zod").ZodString;
|
|
2188
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2189
|
+
id: import("zod").ZodString;
|
|
2190
|
+
txid: import("zod").ZodNumber;
|
|
2191
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
2192
|
+
DEPLOYMENT_IN_PROGRESS: {
|
|
2193
|
+
readonly data: import("zod").ZodObject<{
|
|
2194
|
+
deploymentId: import("zod").ZodString;
|
|
2195
|
+
status: import("zod").ZodEnum<{
|
|
2196
|
+
succeeded: "succeeded";
|
|
2197
|
+
failed: "failed";
|
|
2198
|
+
planning: "planning";
|
|
2199
|
+
awaiting_authorization: "awaiting_authorization";
|
|
2200
|
+
configuring: "configuring";
|
|
2201
|
+
publishing: "publishing";
|
|
2202
|
+
cancelled: "cancelled";
|
|
2203
|
+
}>;
|
|
2204
|
+
}, import("zod/v4/core").$strip>;
|
|
2205
|
+
readonly message: "A deployment is already in progress.";
|
|
2206
|
+
readonly status: 409;
|
|
2207
|
+
};
|
|
2208
|
+
}>, Record<never, never>>;
|
|
2041
2209
|
};
|
|
2042
2210
|
org: {
|
|
2043
2211
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ai-sdk/gateway": "^4.0.46",
|
|
31
|
-
"@automate.ax/codec": "0.
|
|
31
|
+
"@automate.ax/codec": "0.50.0",
|
|
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
|
},
|