@automate.ax/api-contract 0.1.3
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/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/api-key.d.ts +58 -0
- package/dist/api-key.js +73 -0
- package/dist/auth.d.ts +24 -0
- package/dist/auth.js +35 -0
- package/dist/authorization.d.ts +144 -0
- package/dist/authorization.js +121 -0
- package/dist/deployment.d.ts +38 -0
- package/dist/deployment.js +46 -0
- package/dist/index.d.ts +451 -0
- package/dist/index.js +22 -0
- package/dist/org.d.ts +288 -0
- package/dist/org.js +180 -0
- package/dist/project.d.ts +68 -0
- package/dist/project.js +91 -0
- package/dist/runtime.d.ts +66 -0
- package/dist/runtime.js +89 -0
- package/dist/schemas.d.ts +2 -0
- package/dist/schemas.js +2 -0
- package/package.json +60 -0
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { encodableSchema } from "@automate.ax/codec";
|
|
2
|
+
import { oc } from "@orpc/contract";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
export const runtimeContract = {
|
|
5
|
+
commit: oc
|
|
6
|
+
.input(z.object({
|
|
7
|
+
actionInvocations: z
|
|
8
|
+
.object({
|
|
9
|
+
actionDependencyIds: z.string().array(),
|
|
10
|
+
description: z.string().nullable(),
|
|
11
|
+
eventDependencyIds: z.string().array(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
slot: z.number().int().nonnegative(),
|
|
14
|
+
})
|
|
15
|
+
.array()
|
|
16
|
+
.default([]),
|
|
17
|
+
}))
|
|
18
|
+
.output(z.void()),
|
|
19
|
+
completeInvocation: oc
|
|
20
|
+
.input(z.object({
|
|
21
|
+
output: encodableSchema,
|
|
22
|
+
}))
|
|
23
|
+
.output(z.void()),
|
|
24
|
+
loadInvocation: oc.output(z.object({
|
|
25
|
+
context: z.object({
|
|
26
|
+
actionOutputs: z
|
|
27
|
+
.object({
|
|
28
|
+
actionInvocationId: z.string(),
|
|
29
|
+
output: encodableSchema,
|
|
30
|
+
slot: z.number().int(),
|
|
31
|
+
})
|
|
32
|
+
.array(),
|
|
33
|
+
contextId: z.string(),
|
|
34
|
+
events: z
|
|
35
|
+
.object({
|
|
36
|
+
automationEventId: z.string(),
|
|
37
|
+
payload: encodableSchema,
|
|
38
|
+
slot: z.number().int(),
|
|
39
|
+
})
|
|
40
|
+
.array(),
|
|
41
|
+
}),
|
|
42
|
+
id: z.string(),
|
|
43
|
+
slot: z.number().int(),
|
|
44
|
+
})),
|
|
45
|
+
nextBatch: oc.output(z.object({
|
|
46
|
+
context: z.object({
|
|
47
|
+
actionOutputs: z
|
|
48
|
+
.object({
|
|
49
|
+
actionInvocationId: z.string(),
|
|
50
|
+
slot: z.number().int(),
|
|
51
|
+
})
|
|
52
|
+
.array(),
|
|
53
|
+
contextId: z.string(),
|
|
54
|
+
events: z
|
|
55
|
+
.object({
|
|
56
|
+
automationEventId: z.string(),
|
|
57
|
+
slot: z.number().int(),
|
|
58
|
+
})
|
|
59
|
+
.array(),
|
|
60
|
+
}),
|
|
61
|
+
})),
|
|
62
|
+
resolveAccountInput: oc
|
|
63
|
+
.input(z.strictObject({
|
|
64
|
+
binding: z.string().min(1),
|
|
65
|
+
serviceId: z.string().min(1),
|
|
66
|
+
}))
|
|
67
|
+
.output(z.object({
|
|
68
|
+
secret: z.record(z.string(), z.unknown()),
|
|
69
|
+
serviceId: z.string(),
|
|
70
|
+
})),
|
|
71
|
+
sendOutput: oc
|
|
72
|
+
.input(z.object({
|
|
73
|
+
output: z.object({
|
|
74
|
+
data: encodableSchema,
|
|
75
|
+
type: z.string().min(1),
|
|
76
|
+
}),
|
|
77
|
+
outputIndex: z.number().int().nonnegative(),
|
|
78
|
+
}))
|
|
79
|
+
.output(z.void()),
|
|
80
|
+
sendEmail: oc
|
|
81
|
+
.input(z.object({
|
|
82
|
+
subject: z.string().min(1),
|
|
83
|
+
text: z.string().min(1),
|
|
84
|
+
to: z.email(),
|
|
85
|
+
}))
|
|
86
|
+
.output(z.object({
|
|
87
|
+
id: z.string().nullable(),
|
|
88
|
+
})),
|
|
89
|
+
};
|
package/dist/schemas.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@automate.ax/api-contract",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/zachsents/automate.ax.git",
|
|
9
|
+
"directory": "packages/api-contract"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://automate.ax",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/zachsents/automate.ax/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"zshy": {
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./src/index.ts"
|
|
22
|
+
},
|
|
23
|
+
"cjs": false
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@automate.ax/codec": "0.1.3",
|
|
27
|
+
"@orpc/contract": "1.13.14",
|
|
28
|
+
"zod": "^4.3.6"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@internal/config": "0.0.0",
|
|
32
|
+
"@types/bun": "latest",
|
|
33
|
+
"zshy": "^0.7.2"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"typecheck": "tsc --noEmit",
|
|
37
|
+
"lint": "oxlint --type-aware",
|
|
38
|
+
"lint:fix": "oxlint --type-aware --fix-suggestions",
|
|
39
|
+
"check": "bun run typecheck && bun run lint",
|
|
40
|
+
"build": "zshy",
|
|
41
|
+
"prepublishOnly": "bun run check && bun run build"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE"
|
|
47
|
+
],
|
|
48
|
+
"main": "./dist/index.js",
|
|
49
|
+
"module": "./dist/index.js",
|
|
50
|
+
"types": "./dist/index.d.ts",
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=24"
|
|
53
|
+
},
|
|
54
|
+
"exports": {
|
|
55
|
+
".": {
|
|
56
|
+
"types": "./dist/index.d.ts",
|
|
57
|
+
"default": "./dist/index.js"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|