@automate.ax/api-contract 0.8.0 → 0.9.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/deployment.d.ts +0 -1
- package/dist/deployment.js +0 -12
- package/dist/index.d.ts +9 -2
- package/dist/project.d.ts +3 -0
- package/dist/project.js +8 -2
- package/package.json +2 -2
- package/src/deployment.ts +0 -18
- package/src/project.ts +11 -2
package/dist/deployment.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export declare const deploymentContract: {
|
|
|
14
14
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
15
15
|
artifact: z.ZodCustom<Blob, Blob>;
|
|
16
16
|
manifest: z.ZodArray<z.ZodObject<{
|
|
17
|
-
entrypoint: z.ZodString;
|
|
18
17
|
identityKey: z.ZodString;
|
|
19
18
|
}, z.core.$strip>>;
|
|
20
19
|
mode: z.ZodEnum<{
|
package/dist/deployment.js
CHANGED
|
@@ -18,7 +18,6 @@ export const deploymentContract = {
|
|
|
18
18
|
artifact: z.instanceof(Blob),
|
|
19
19
|
manifest: z
|
|
20
20
|
.object({
|
|
21
|
-
entrypoint: z.string().min(1),
|
|
22
21
|
identityKey: z.string().min(1),
|
|
23
22
|
})
|
|
24
23
|
.array()
|
|
@@ -34,17 +33,6 @@ export const deploymentContract = {
|
|
|
34
33
|
});
|
|
35
34
|
}
|
|
36
35
|
identityKeys.add(entry.identityKey);
|
|
37
|
-
if (entry.entrypoint.includes("\\") ||
|
|
38
|
-
entry.entrypoint.startsWith("/") ||
|
|
39
|
-
entry.entrypoint
|
|
40
|
-
.split("/")
|
|
41
|
-
.some((segment) => segment === "" || segment === "." || segment === "..")) {
|
|
42
|
-
context.addIssue({
|
|
43
|
-
code: "custom",
|
|
44
|
-
message: "Entrypoint must be a safe relative POSIX path.",
|
|
45
|
-
path: [index, "entrypoint"],
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
36
|
}
|
|
49
37
|
}),
|
|
50
38
|
mode: z.enum(["reconcile", "upsert"]),
|
package/dist/index.d.ts
CHANGED
|
@@ -210,6 +210,9 @@ export declare const publicContract: {
|
|
|
210
210
|
id: import("zod").ZodString;
|
|
211
211
|
name: import("zod").ZodString;
|
|
212
212
|
}, import("zod/v4/core").$strip>;
|
|
213
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
214
|
+
identityKey: import("zod").ZodString;
|
|
215
|
+
}, import("zod/v4/core").$strip>>;
|
|
213
216
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
214
217
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodOptional<import("zod").ZodObject<{
|
|
215
218
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -344,7 +347,6 @@ export declare const firstPartyContract: {
|
|
|
344
347
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
345
348
|
artifact: import("zod").ZodCustom<Blob, Blob>;
|
|
346
349
|
manifest: import("zod").ZodArray<import("zod").ZodObject<{
|
|
347
|
-
entrypoint: import("zod").ZodString;
|
|
348
350
|
identityKey: import("zod").ZodString;
|
|
349
351
|
}, import("zod/v4/core").$strip>>;
|
|
350
352
|
mode: import("zod").ZodEnum<{
|
|
@@ -560,6 +562,9 @@ export declare const firstPartyContract: {
|
|
|
560
562
|
id: import("zod").ZodString;
|
|
561
563
|
name: import("zod").ZodString;
|
|
562
564
|
}, import("zod/v4/core").$strip>;
|
|
565
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
566
|
+
identityKey: import("zod").ZodString;
|
|
567
|
+
}, import("zod/v4/core").$strip>>;
|
|
563
568
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
564
569
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodOptional<import("zod").ZodObject<{
|
|
565
570
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -835,7 +840,6 @@ export declare const contract: {
|
|
|
835
840
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
836
841
|
artifact: import("zod").ZodCustom<Blob, Blob>;
|
|
837
842
|
manifest: import("zod").ZodArray<import("zod").ZodObject<{
|
|
838
|
-
entrypoint: import("zod").ZodString;
|
|
839
843
|
identityKey: import("zod").ZodString;
|
|
840
844
|
}, import("zod/v4/core").$strip>>;
|
|
841
845
|
mode: import("zod").ZodEnum<{
|
|
@@ -1051,6 +1055,9 @@ export declare const contract: {
|
|
|
1051
1055
|
id: import("zod").ZodString;
|
|
1052
1056
|
name: import("zod").ZodString;
|
|
1053
1057
|
}, import("zod/v4/core").$strip>;
|
|
1058
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1059
|
+
identityKey: import("zod").ZodString;
|
|
1060
|
+
}, import("zod/v4/core").$strip>>;
|
|
1054
1061
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1055
1062
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1056
1063
|
organizationId: import("zod").ZodOptional<import("zod").ZodString>;
|
package/dist/project.d.ts
CHANGED
|
@@ -57,6 +57,9 @@ export declare const projectContract: {
|
|
|
57
57
|
id: z.ZodString;
|
|
58
58
|
name: z.ZodString;
|
|
59
59
|
}, z.core.$strip>;
|
|
60
|
+
activeAutomations: z.ZodArray<z.ZodObject<{
|
|
61
|
+
identityKey: z.ZodString;
|
|
62
|
+
}, z.core.$strip>>;
|
|
60
63
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
61
64
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
62
65
|
projectId: z.ZodString;
|
package/dist/project.js
CHANGED
|
@@ -56,11 +56,17 @@ export const projectContract = {
|
|
|
56
56
|
path: "/projects/{projectId}",
|
|
57
57
|
operationId: "getProject",
|
|
58
58
|
summary: "Get project",
|
|
59
|
-
description: "Returns project details and
|
|
59
|
+
description: "Returns project details, its organization, and active automations.",
|
|
60
60
|
tags: ["Projects"],
|
|
61
61
|
})
|
|
62
62
|
.input(z.object({ projectId: z.string() }))
|
|
63
|
-
.output(projectWithOrganizationOutputSchema
|
|
63
|
+
.output(projectWithOrganizationOutputSchema.extend({
|
|
64
|
+
activeAutomations: z
|
|
65
|
+
.object({
|
|
66
|
+
identityKey: z.string(),
|
|
67
|
+
})
|
|
68
|
+
.array(),
|
|
69
|
+
})),
|
|
64
70
|
update: oc
|
|
65
71
|
.route({
|
|
66
72
|
method: "PATCH",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.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.9.1",
|
|
30
30
|
"@orpc/contract": "1.13.14",
|
|
31
31
|
"zod": "^4.3.6"
|
|
32
32
|
},
|
package/src/deployment.ts
CHANGED
|
@@ -24,7 +24,6 @@ export const deploymentContract = {
|
|
|
24
24
|
artifact: z.instanceof(Blob),
|
|
25
25
|
manifest: z
|
|
26
26
|
.object({
|
|
27
|
-
entrypoint: z.string().min(1),
|
|
28
27
|
identityKey: z.string().min(1),
|
|
29
28
|
})
|
|
30
29
|
.array()
|
|
@@ -41,23 +40,6 @@ export const deploymentContract = {
|
|
|
41
40
|
})
|
|
42
41
|
}
|
|
43
42
|
identityKeys.add(entry.identityKey)
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
entry.entrypoint.includes("\\") ||
|
|
47
|
-
entry.entrypoint.startsWith("/") ||
|
|
48
|
-
entry.entrypoint
|
|
49
|
-
.split("/")
|
|
50
|
-
.some(
|
|
51
|
-
(segment) =>
|
|
52
|
-
segment === "" || segment === "." || segment === "..",
|
|
53
|
-
)
|
|
54
|
-
) {
|
|
55
|
-
context.addIssue({
|
|
56
|
-
code: "custom",
|
|
57
|
-
message: "Entrypoint must be a safe relative POSIX path.",
|
|
58
|
-
path: [index, "entrypoint"],
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
43
|
}
|
|
62
44
|
}),
|
|
63
45
|
mode: z.enum(["reconcile", "upsert"]),
|
package/src/project.ts
CHANGED
|
@@ -65,11 +65,20 @@ export const projectContract = {
|
|
|
65
65
|
path: "/projects/{projectId}",
|
|
66
66
|
operationId: "getProject",
|
|
67
67
|
summary: "Get project",
|
|
68
|
-
description:
|
|
68
|
+
description:
|
|
69
|
+
"Returns project details, its organization, and active automations.",
|
|
69
70
|
tags: ["Projects"],
|
|
70
71
|
})
|
|
71
72
|
.input(z.object({ projectId: z.string() }))
|
|
72
|
-
.output(
|
|
73
|
+
.output(
|
|
74
|
+
projectWithOrganizationOutputSchema.extend({
|
|
75
|
+
activeAutomations: z
|
|
76
|
+
.object({
|
|
77
|
+
identityKey: z.string(),
|
|
78
|
+
})
|
|
79
|
+
.array(),
|
|
80
|
+
}),
|
|
81
|
+
),
|
|
73
82
|
update: oc
|
|
74
83
|
.route({
|
|
75
84
|
method: "PATCH",
|