@automate.ax/api-contract 0.25.0 → 0.26.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 +113 -0
- package/dist/account.js +57 -0
- package/dist/deployment.d.ts +2 -2
- package/dist/index.d.ts +203 -4
- package/dist/index.js +3 -0
- package/package.json +2 -2
- package/src/account.ts +74 -0
- package/src/index.ts +3 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const integrationAccountOutputSchema: z.ZodObject<{
|
|
3
|
+
checkedAt: z.ZodNullable<z.ZodDate>;
|
|
4
|
+
connectionId: z.ZodString;
|
|
5
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
message: z.ZodString;
|
|
8
|
+
}, z.core.$strip>>;
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
label: z.ZodString;
|
|
11
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
12
|
+
serviceId: z.ZodString;
|
|
13
|
+
serviceSub: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const accountContract: {
|
|
16
|
+
beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
17
|
+
connectionId: z.ZodString;
|
|
18
|
+
organizationId: z.ZodString;
|
|
19
|
+
serviceId: z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
flowId: z.ZodString;
|
|
22
|
+
url: z.ZodURL;
|
|
23
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
24
|
+
connectionStatus: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
25
|
+
flowId: z.ZodString;
|
|
26
|
+
organizationId: z.ZodString;
|
|
27
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
28
|
+
status: z.ZodLiteral<"pending">;
|
|
29
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
30
|
+
status: z.ZodLiteral<"succeeded">;
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
32
|
+
message: z.ZodString;
|
|
33
|
+
status: z.ZodLiteral<"failed">;
|
|
34
|
+
}, z.core.$strip>], "status">, Record<never, never>, Record<never, never>>;
|
|
35
|
+
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
36
|
+
accountId: z.ZodString;
|
|
37
|
+
organizationId: z.ZodString;
|
|
38
|
+
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
39
|
+
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
40
|
+
organizationId: z.ZodString;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
accounts: z.ZodArray<z.ZodObject<{
|
|
43
|
+
checkedAt: z.ZodNullable<z.ZodDate>;
|
|
44
|
+
connectionId: z.ZodString;
|
|
45
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
46
|
+
code: z.ZodString;
|
|
47
|
+
message: z.ZodString;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
label: z.ZodString;
|
|
51
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
52
|
+
serviceId: z.ZodString;
|
|
53
|
+
serviceSub: z.ZodString;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
services: z.ZodArray<z.ZodObject<{
|
|
56
|
+
connections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
57
|
+
description: z.ZodOptional<z.ZodString>;
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
type: z.ZodLiteral<"redirect">;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
description: z.ZodOptional<z.ZodString>;
|
|
63
|
+
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
64
|
+
description: z.ZodOptional<z.ZodString>;
|
|
65
|
+
label: z.ZodString;
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
required: z.ZodBoolean;
|
|
68
|
+
default: z.ZodOptional<z.ZodString>;
|
|
69
|
+
input: z.ZodEnum<{
|
|
70
|
+
email: "email";
|
|
71
|
+
text: "text";
|
|
72
|
+
url: "url";
|
|
73
|
+
}>;
|
|
74
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
description: z.ZodOptional<z.ZodString>;
|
|
77
|
+
label: z.ZodString;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
required: z.ZodBoolean;
|
|
80
|
+
input: z.ZodLiteral<"password">;
|
|
81
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
description: z.ZodOptional<z.ZodString>;
|
|
84
|
+
label: z.ZodString;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
required: z.ZodBoolean;
|
|
87
|
+
default: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
input: z.ZodLiteral<"number">;
|
|
89
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
description: z.ZodOptional<z.ZodString>;
|
|
92
|
+
label: z.ZodString;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
required: z.ZodBoolean;
|
|
95
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
input: z.ZodLiteral<"boolean">;
|
|
97
|
+
}, z.core.$strip>], "input">>;
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
name: z.ZodString;
|
|
100
|
+
type: z.ZodLiteral<"form">;
|
|
101
|
+
}, z.core.$strip>], "type">>;
|
|
102
|
+
description: z.ZodOptional<z.ZodString>;
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
107
|
+
submitCredentials: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
108
|
+
connectionId: z.ZodString;
|
|
109
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
110
|
+
organizationId: z.ZodString;
|
|
111
|
+
serviceId: z.ZodString;
|
|
112
|
+
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
113
|
+
};
|
package/dist/account.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { integrationServiceManifestSchema } from "./authorization.js";
|
|
4
|
+
export const integrationAccountOutputSchema = z.object({
|
|
5
|
+
checkedAt: z.date().nullable(),
|
|
6
|
+
connectionId: z.string().min(1),
|
|
7
|
+
error: z
|
|
8
|
+
.object({
|
|
9
|
+
code: z.string(),
|
|
10
|
+
message: z.string(),
|
|
11
|
+
})
|
|
12
|
+
.nullable(),
|
|
13
|
+
id: z.string(),
|
|
14
|
+
label: z.string(),
|
|
15
|
+
scopes: z.string().array(),
|
|
16
|
+
serviceId: z.string(),
|
|
17
|
+
serviceSub: z.string(),
|
|
18
|
+
});
|
|
19
|
+
export const accountContract = {
|
|
20
|
+
beginConnection: oc
|
|
21
|
+
.input(z.object({
|
|
22
|
+
connectionId: z.string().min(1),
|
|
23
|
+
organizationId: z.string(),
|
|
24
|
+
serviceId: z.string().min(1),
|
|
25
|
+
}))
|
|
26
|
+
.output(z.object({ flowId: z.string(), url: z.url() })),
|
|
27
|
+
connectionStatus: oc
|
|
28
|
+
.input(z.object({
|
|
29
|
+
flowId: z.string(),
|
|
30
|
+
organizationId: z.string(),
|
|
31
|
+
}))
|
|
32
|
+
.output(z.discriminatedUnion("status", [
|
|
33
|
+
z.object({ status: z.literal("pending") }),
|
|
34
|
+
z.object({ status: z.literal("succeeded") }),
|
|
35
|
+
z.object({ message: z.string(), status: z.literal("failed") }),
|
|
36
|
+
])),
|
|
37
|
+
delete: oc
|
|
38
|
+
.input(z.object({
|
|
39
|
+
accountId: z.string(),
|
|
40
|
+
organizationId: z.string(),
|
|
41
|
+
}))
|
|
42
|
+
.output(z.void()),
|
|
43
|
+
get: oc.input(z.object({ organizationId: z.string() })).output(z.object({
|
|
44
|
+
accounts: integrationAccountOutputSchema.array(),
|
|
45
|
+
services: integrationServiceManifestSchema
|
|
46
|
+
.extend({ id: z.string().min(1) })
|
|
47
|
+
.array(),
|
|
48
|
+
})),
|
|
49
|
+
submitCredentials: oc
|
|
50
|
+
.input(z.object({
|
|
51
|
+
connectionId: z.string().min(1),
|
|
52
|
+
data: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])),
|
|
53
|
+
organizationId: z.string(),
|
|
54
|
+
serviceId: z.string().min(1),
|
|
55
|
+
}))
|
|
56
|
+
.output(z.void()),
|
|
57
|
+
};
|
package/dist/deployment.d.ts
CHANGED
|
@@ -53,12 +53,12 @@ export declare const deploymentContract: {
|
|
|
53
53
|
name: z.ZodString;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
55
|
status: z.ZodEnum<{
|
|
56
|
+
succeeded: "succeeded";
|
|
57
|
+
failed: "failed";
|
|
56
58
|
planning: "planning";
|
|
57
59
|
awaiting_authorization: "awaiting_authorization";
|
|
58
60
|
configuring: "configuring";
|
|
59
61
|
publishing: "publishing";
|
|
60
|
-
succeeded: "succeeded";
|
|
61
|
-
failed: "failed";
|
|
62
62
|
}>;
|
|
63
63
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
64
64
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AUTOMATION_SDK_VERSION, deploymentTriggerInfoSchema, type DeploymentTriggerInfo, } from "./deployment.js";
|
|
2
|
+
export { integrationAccountOutputSchema } from "./account.js";
|
|
2
3
|
export { runtimeContract } from "./runtime.js";
|
|
3
4
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
4
5
|
export { integrationConnectionManifestSchema, integrationServiceManifestSchema, type IntegrationConnectionManifest, type IntegrationServiceManifest, } from "./authorization.js";
|
|
@@ -260,6 +261,105 @@ export declare const publicContract: {
|
|
|
260
261
|
};
|
|
261
262
|
/** Procedures used by first-party control-plane clients. */
|
|
262
263
|
export declare const firstPartyContract: {
|
|
264
|
+
account: {
|
|
265
|
+
beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
266
|
+
connectionId: import("zod").ZodString;
|
|
267
|
+
organizationId: import("zod").ZodString;
|
|
268
|
+
serviceId: import("zod").ZodString;
|
|
269
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
270
|
+
flowId: import("zod").ZodString;
|
|
271
|
+
url: import("zod").ZodURL;
|
|
272
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
273
|
+
connectionStatus: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
274
|
+
flowId: import("zod").ZodString;
|
|
275
|
+
organizationId: import("zod").ZodString;
|
|
276
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
277
|
+
status: import("zod").ZodLiteral<"pending">;
|
|
278
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
279
|
+
status: import("zod").ZodLiteral<"succeeded">;
|
|
280
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
281
|
+
message: import("zod").ZodString;
|
|
282
|
+
status: import("zod").ZodLiteral<"failed">;
|
|
283
|
+
}, import("zod/v4/core").$strip>], "status">, Record<never, never>, Record<never, never>>;
|
|
284
|
+
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
285
|
+
accountId: import("zod").ZodString;
|
|
286
|
+
organizationId: import("zod").ZodString;
|
|
287
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
288
|
+
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
289
|
+
organizationId: import("zod").ZodString;
|
|
290
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
291
|
+
accounts: import("zod").ZodArray<import("zod").ZodObject<{
|
|
292
|
+
checkedAt: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
293
|
+
connectionId: import("zod").ZodString;
|
|
294
|
+
error: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
295
|
+
code: import("zod").ZodString;
|
|
296
|
+
message: import("zod").ZodString;
|
|
297
|
+
}, import("zod/v4/core").$strip>>;
|
|
298
|
+
id: import("zod").ZodString;
|
|
299
|
+
label: import("zod").ZodString;
|
|
300
|
+
scopes: import("zod").ZodArray<import("zod").ZodString>;
|
|
301
|
+
serviceId: import("zod").ZodString;
|
|
302
|
+
serviceSub: import("zod").ZodString;
|
|
303
|
+
}, import("zod/v4/core").$strip>>;
|
|
304
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
305
|
+
connections: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
306
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
307
|
+
id: import("zod").ZodString;
|
|
308
|
+
name: import("zod").ZodString;
|
|
309
|
+
type: import("zod").ZodLiteral<"redirect">;
|
|
310
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
311
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
312
|
+
fields: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
313
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
314
|
+
label: import("zod").ZodString;
|
|
315
|
+
name: import("zod").ZodString;
|
|
316
|
+
required: import("zod").ZodBoolean;
|
|
317
|
+
default: import("zod").ZodOptional<import("zod").ZodString>;
|
|
318
|
+
input: import("zod").ZodEnum<{
|
|
319
|
+
email: "email";
|
|
320
|
+
text: "text";
|
|
321
|
+
url: "url";
|
|
322
|
+
}>;
|
|
323
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
324
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
325
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
326
|
+
label: import("zod").ZodString;
|
|
327
|
+
name: import("zod").ZodString;
|
|
328
|
+
required: import("zod").ZodBoolean;
|
|
329
|
+
input: import("zod").ZodLiteral<"password">;
|
|
330
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
331
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
332
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
333
|
+
label: import("zod").ZodString;
|
|
334
|
+
name: import("zod").ZodString;
|
|
335
|
+
required: import("zod").ZodBoolean;
|
|
336
|
+
default: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
337
|
+
input: import("zod").ZodLiteral<"number">;
|
|
338
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
339
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
340
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
341
|
+
label: import("zod").ZodString;
|
|
342
|
+
name: import("zod").ZodString;
|
|
343
|
+
required: import("zod").ZodBoolean;
|
|
344
|
+
default: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
345
|
+
input: import("zod").ZodLiteral<"boolean">;
|
|
346
|
+
}, import("zod/v4/core").$strip>], "input">>;
|
|
347
|
+
id: import("zod").ZodString;
|
|
348
|
+
name: import("zod").ZodString;
|
|
349
|
+
type: import("zod").ZodLiteral<"form">;
|
|
350
|
+
}, import("zod/v4/core").$strip>], "type">>;
|
|
351
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
352
|
+
name: import("zod").ZodString;
|
|
353
|
+
id: import("zod").ZodString;
|
|
354
|
+
}, import("zod/v4/core").$strip>>;
|
|
355
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
356
|
+
submitCredentials: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
357
|
+
connectionId: import("zod").ZodString;
|
|
358
|
+
data: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>;
|
|
359
|
+
organizationId: import("zod").ZodString;
|
|
360
|
+
serviceId: import("zod").ZodString;
|
|
361
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
362
|
+
};
|
|
263
363
|
authorization: {
|
|
264
364
|
beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
265
365
|
binding: import("zod").ZodString;
|
|
@@ -411,12 +511,12 @@ export declare const firstPartyContract: {
|
|
|
411
511
|
name: import("zod").ZodString;
|
|
412
512
|
}, import("zod/v4/core").$strip>;
|
|
413
513
|
status: import("zod").ZodEnum<{
|
|
514
|
+
succeeded: "succeeded";
|
|
515
|
+
failed: "failed";
|
|
414
516
|
planning: "planning";
|
|
415
517
|
awaiting_authorization: "awaiting_authorization";
|
|
416
518
|
configuring: "configuring";
|
|
417
519
|
publishing: "publishing";
|
|
418
|
-
succeeded: "succeeded";
|
|
419
|
-
failed: "failed";
|
|
420
520
|
}>;
|
|
421
521
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
422
522
|
};
|
|
@@ -983,6 +1083,105 @@ export declare const contract: {
|
|
|
983
1083
|
id: import("zod").ZodNullable<import("zod").ZodString>;
|
|
984
1084
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
985
1085
|
};
|
|
1086
|
+
account: {
|
|
1087
|
+
beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1088
|
+
connectionId: import("zod").ZodString;
|
|
1089
|
+
organizationId: import("zod").ZodString;
|
|
1090
|
+
serviceId: import("zod").ZodString;
|
|
1091
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1092
|
+
flowId: import("zod").ZodString;
|
|
1093
|
+
url: import("zod").ZodURL;
|
|
1094
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1095
|
+
connectionStatus: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1096
|
+
flowId: import("zod").ZodString;
|
|
1097
|
+
organizationId: import("zod").ZodString;
|
|
1098
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
1099
|
+
status: import("zod").ZodLiteral<"pending">;
|
|
1100
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1101
|
+
status: import("zod").ZodLiteral<"succeeded">;
|
|
1102
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1103
|
+
message: import("zod").ZodString;
|
|
1104
|
+
status: import("zod").ZodLiteral<"failed">;
|
|
1105
|
+
}, import("zod/v4/core").$strip>], "status">, Record<never, never>, Record<never, never>>;
|
|
1106
|
+
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1107
|
+
accountId: import("zod").ZodString;
|
|
1108
|
+
organizationId: import("zod").ZodString;
|
|
1109
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1110
|
+
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1111
|
+
organizationId: import("zod").ZodString;
|
|
1112
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1113
|
+
accounts: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1114
|
+
checkedAt: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
1115
|
+
connectionId: import("zod").ZodString;
|
|
1116
|
+
error: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
1117
|
+
code: import("zod").ZodString;
|
|
1118
|
+
message: import("zod").ZodString;
|
|
1119
|
+
}, import("zod/v4/core").$strip>>;
|
|
1120
|
+
id: import("zod").ZodString;
|
|
1121
|
+
label: import("zod").ZodString;
|
|
1122
|
+
scopes: import("zod").ZodArray<import("zod").ZodString>;
|
|
1123
|
+
serviceId: import("zod").ZodString;
|
|
1124
|
+
serviceSub: import("zod").ZodString;
|
|
1125
|
+
}, import("zod/v4/core").$strip>>;
|
|
1126
|
+
services: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1127
|
+
connections: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
1128
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1129
|
+
id: import("zod").ZodString;
|
|
1130
|
+
name: import("zod").ZodString;
|
|
1131
|
+
type: import("zod").ZodLiteral<"redirect">;
|
|
1132
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1133
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1134
|
+
fields: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
1135
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1136
|
+
label: import("zod").ZodString;
|
|
1137
|
+
name: import("zod").ZodString;
|
|
1138
|
+
required: import("zod").ZodBoolean;
|
|
1139
|
+
default: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1140
|
+
input: import("zod").ZodEnum<{
|
|
1141
|
+
email: "email";
|
|
1142
|
+
text: "text";
|
|
1143
|
+
url: "url";
|
|
1144
|
+
}>;
|
|
1145
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1146
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1147
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1148
|
+
label: import("zod").ZodString;
|
|
1149
|
+
name: import("zod").ZodString;
|
|
1150
|
+
required: import("zod").ZodBoolean;
|
|
1151
|
+
input: import("zod").ZodLiteral<"password">;
|
|
1152
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1153
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1154
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1155
|
+
label: import("zod").ZodString;
|
|
1156
|
+
name: import("zod").ZodString;
|
|
1157
|
+
required: import("zod").ZodBoolean;
|
|
1158
|
+
default: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1159
|
+
input: import("zod").ZodLiteral<"number">;
|
|
1160
|
+
placeholder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1161
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1162
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1163
|
+
label: import("zod").ZodString;
|
|
1164
|
+
name: import("zod").ZodString;
|
|
1165
|
+
required: import("zod").ZodBoolean;
|
|
1166
|
+
default: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1167
|
+
input: import("zod").ZodLiteral<"boolean">;
|
|
1168
|
+
}, import("zod/v4/core").$strip>], "input">>;
|
|
1169
|
+
id: import("zod").ZodString;
|
|
1170
|
+
name: import("zod").ZodString;
|
|
1171
|
+
type: import("zod").ZodLiteral<"form">;
|
|
1172
|
+
}, import("zod/v4/core").$strip>], "type">>;
|
|
1173
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1174
|
+
name: import("zod").ZodString;
|
|
1175
|
+
id: import("zod").ZodString;
|
|
1176
|
+
}, import("zod/v4/core").$strip>>;
|
|
1177
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1178
|
+
submitCredentials: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1179
|
+
connectionId: import("zod").ZodString;
|
|
1180
|
+
data: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>;
|
|
1181
|
+
organizationId: import("zod").ZodString;
|
|
1182
|
+
serviceId: import("zod").ZodString;
|
|
1183
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1184
|
+
};
|
|
986
1185
|
deployment: {
|
|
987
1186
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
988
1187
|
artifact: import("zod").ZodCustom<Blob, Blob>;
|
|
@@ -1026,12 +1225,12 @@ export declare const contract: {
|
|
|
1026
1225
|
name: import("zod").ZodString;
|
|
1027
1226
|
}, import("zod/v4/core").$strip>;
|
|
1028
1227
|
status: import("zod").ZodEnum<{
|
|
1228
|
+
succeeded: "succeeded";
|
|
1229
|
+
failed: "failed";
|
|
1029
1230
|
planning: "planning";
|
|
1030
1231
|
awaiting_authorization: "awaiting_authorization";
|
|
1031
1232
|
configuring: "configuring";
|
|
1032
1233
|
publishing: "publishing";
|
|
1033
|
-
succeeded: "succeeded";
|
|
1034
|
-
failed: "failed";
|
|
1035
1234
|
}>;
|
|
1036
1235
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1037
1236
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { accountContract } from "./account.js";
|
|
1
2
|
import { apiKeyContract } from "./api-key.js";
|
|
2
3
|
import { authContract } from "./auth.js";
|
|
3
4
|
import { authorizationContract } from "./authorization.js";
|
|
@@ -7,6 +8,7 @@ import { orgContract } from "./org.js";
|
|
|
7
8
|
import { projectContract } from "./project.js";
|
|
8
9
|
import { runtimeContract } from "./runtime.js";
|
|
9
10
|
export { AUTOMATION_SDK_VERSION, deploymentTriggerInfoSchema, } from "./deployment.js";
|
|
11
|
+
export { integrationAccountOutputSchema } from "./account.js";
|
|
10
12
|
export { runtimeContract } from "./runtime.js";
|
|
11
13
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
12
14
|
export { integrationConnectionManifestSchema, integrationServiceManifestSchema, } from "./authorization.js";
|
|
@@ -41,6 +43,7 @@ export const publicContract = {
|
|
|
41
43
|
/** Procedures used by first-party control-plane clients. */
|
|
42
44
|
export const firstPartyContract = {
|
|
43
45
|
...publicContract,
|
|
46
|
+
account: accountContract,
|
|
44
47
|
authorization: {
|
|
45
48
|
beginConnection: authorizationContract.beginConnection,
|
|
46
49
|
get: authorizationContract.get,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@automate.ax/codec": "0.
|
|
29
|
+
"@automate.ax/codec": "0.26.1",
|
|
30
30
|
"@orpc/contract": "1.13.14",
|
|
31
31
|
"zod": "^4.3.6"
|
|
32
32
|
},
|
package/src/account.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract"
|
|
2
|
+
import { z } from "zod"
|
|
3
|
+
import { integrationServiceManifestSchema } from "./authorization"
|
|
4
|
+
|
|
5
|
+
export const integrationAccountOutputSchema = z.object({
|
|
6
|
+
checkedAt: z.date().nullable(),
|
|
7
|
+
connectionId: z.string().min(1),
|
|
8
|
+
error: z
|
|
9
|
+
.object({
|
|
10
|
+
code: z.string(),
|
|
11
|
+
message: z.string(),
|
|
12
|
+
})
|
|
13
|
+
.nullable(),
|
|
14
|
+
id: z.string(),
|
|
15
|
+
label: z.string(),
|
|
16
|
+
scopes: z.string().array(),
|
|
17
|
+
serviceId: z.string(),
|
|
18
|
+
serviceSub: z.string(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
export const accountContract = {
|
|
22
|
+
beginConnection: oc
|
|
23
|
+
.input(
|
|
24
|
+
z.object({
|
|
25
|
+
connectionId: z.string().min(1),
|
|
26
|
+
organizationId: z.string(),
|
|
27
|
+
serviceId: z.string().min(1),
|
|
28
|
+
}),
|
|
29
|
+
)
|
|
30
|
+
.output(z.object({ flowId: z.string(), url: z.url() })),
|
|
31
|
+
connectionStatus: oc
|
|
32
|
+
.input(
|
|
33
|
+
z.object({
|
|
34
|
+
flowId: z.string(),
|
|
35
|
+
organizationId: z.string(),
|
|
36
|
+
}),
|
|
37
|
+
)
|
|
38
|
+
.output(
|
|
39
|
+
z.discriminatedUnion("status", [
|
|
40
|
+
z.object({ status: z.literal("pending") }),
|
|
41
|
+
z.object({ status: z.literal("succeeded") }),
|
|
42
|
+
z.object({ message: z.string(), status: z.literal("failed") }),
|
|
43
|
+
]),
|
|
44
|
+
),
|
|
45
|
+
delete: oc
|
|
46
|
+
.input(
|
|
47
|
+
z.object({
|
|
48
|
+
accountId: z.string(),
|
|
49
|
+
organizationId: z.string(),
|
|
50
|
+
}),
|
|
51
|
+
)
|
|
52
|
+
.output(z.void()),
|
|
53
|
+
get: oc.input(z.object({ organizationId: z.string() })).output(
|
|
54
|
+
z.object({
|
|
55
|
+
accounts: integrationAccountOutputSchema.array(),
|
|
56
|
+
services: integrationServiceManifestSchema
|
|
57
|
+
.extend({ id: z.string().min(1) })
|
|
58
|
+
.array(),
|
|
59
|
+
}),
|
|
60
|
+
),
|
|
61
|
+
submitCredentials: oc
|
|
62
|
+
.input(
|
|
63
|
+
z.object({
|
|
64
|
+
connectionId: z.string().min(1),
|
|
65
|
+
data: z.record(
|
|
66
|
+
z.string(),
|
|
67
|
+
z.union([z.string(), z.number(), z.boolean()]),
|
|
68
|
+
),
|
|
69
|
+
organizationId: z.string(),
|
|
70
|
+
serviceId: z.string().min(1),
|
|
71
|
+
}),
|
|
72
|
+
)
|
|
73
|
+
.output(z.void()),
|
|
74
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { accountContract } from "./account"
|
|
1
2
|
import { apiKeyContract } from "./api-key"
|
|
2
3
|
import { authContract } from "./auth"
|
|
3
4
|
import { authorizationContract } from "./authorization"
|
|
@@ -12,6 +13,7 @@ export {
|
|
|
12
13
|
deploymentTriggerInfoSchema,
|
|
13
14
|
type DeploymentTriggerInfo,
|
|
14
15
|
} from "./deployment"
|
|
16
|
+
export { integrationAccountOutputSchema } from "./account"
|
|
15
17
|
export { runtimeContract } from "./runtime"
|
|
16
18
|
export {
|
|
17
19
|
createdOrganizationApiKeyOutputSchema,
|
|
@@ -66,6 +68,7 @@ export const publicContract = {
|
|
|
66
68
|
/** Procedures used by first-party control-plane clients. */
|
|
67
69
|
export const firstPartyContract = {
|
|
68
70
|
...publicContract,
|
|
71
|
+
account: accountContract,
|
|
69
72
|
authorization: {
|
|
70
73
|
beginConnection: authorizationContract.beginConnection,
|
|
71
74
|
get: authorizationContract.get,
|