@automate.ax/api-contract 0.56.0 → 0.57.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/api-key.d.ts +0 -2
- package/dist/api-key.js +3 -7
- package/dist/automation.d.ts +6 -2
- package/dist/automation.js +8 -2
- package/dist/deployment.d.ts +10 -2
- package/dist/deployment.js +10 -12
- package/dist/index.d.ts +95 -37
- package/dist/permissions.d.ts +1 -0
- package/dist/permissions.js +1 -0
- package/dist/runtime.d.ts +63 -23
- package/dist/runtime.js +44 -16
- package/package.json +2 -2
- package/src/api-key.ts +3 -9
- package/src/automation.ts +12 -2
- package/src/deployment.ts +41 -47
- package/src/permissions.ts +1 -0
- package/src/runtime.ts +46 -16
package/dist/api-key.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ export declare const apiKeyContract: {
|
|
|
31
31
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
32
32
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
33
33
|
keyId: z.ZodString;
|
|
34
|
-
organizationId: z.ZodString;
|
|
35
34
|
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
36
35
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
37
36
|
organizationId: z.ZodString;
|
|
@@ -46,7 +45,6 @@ export declare const apiKeyContract: {
|
|
|
46
45
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
47
46
|
keyId: z.ZodString;
|
|
48
47
|
name: z.ZodString;
|
|
49
|
-
organizationId: z.ZodString;
|
|
50
48
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
49
|
id: z.ZodString;
|
|
52
50
|
name: z.ZodNullable<z.ZodString>;
|
package/dist/api-key.js
CHANGED
|
@@ -32,17 +32,14 @@ export const apiKeyContract = {
|
|
|
32
32
|
delete: oc
|
|
33
33
|
.route({
|
|
34
34
|
method: "DELETE",
|
|
35
|
-
path: "/
|
|
35
|
+
path: "/api-keys/{keyId}",
|
|
36
36
|
operationId: "deleteOrganizationApiKey",
|
|
37
37
|
summary: "Delete organization API key",
|
|
38
38
|
description: "Permanently revokes an organization API key. Requires apiKey:delete.",
|
|
39
39
|
successStatus: 204,
|
|
40
40
|
tags: ["API Keys"],
|
|
41
41
|
})
|
|
42
|
-
.input(z.object({
|
|
43
|
-
keyId: z.string(),
|
|
44
|
-
organizationId: z.string(),
|
|
45
|
-
}))
|
|
42
|
+
.input(z.object({ keyId: z.string() }))
|
|
46
43
|
.output(z.void()),
|
|
47
44
|
list: oc
|
|
48
45
|
.route({
|
|
@@ -58,7 +55,7 @@ export const apiKeyContract = {
|
|
|
58
55
|
update: oc
|
|
59
56
|
.route({
|
|
60
57
|
method: "PATCH",
|
|
61
|
-
path: "/
|
|
58
|
+
path: "/api-keys/{keyId}",
|
|
62
59
|
operationId: "updateOrganizationApiKey",
|
|
63
60
|
summary: "Update organization API key",
|
|
64
61
|
description: "Updates an organization API key's display name. Requires apiKey:update.",
|
|
@@ -67,7 +64,6 @@ export const apiKeyContract = {
|
|
|
67
64
|
.input(z.object({
|
|
68
65
|
keyId: z.string(),
|
|
69
66
|
name: reasonableNameSchema,
|
|
70
|
-
organizationId: z.string(),
|
|
71
67
|
}))
|
|
72
68
|
.output(organizationApiKeyOutputSchema),
|
|
73
69
|
};
|
package/dist/automation.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export declare const automationContract: {
|
|
|
8
8
|
getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
9
9
|
automationId: z.ZodString;
|
|
10
10
|
executionId: z.ZodString;
|
|
11
|
-
projectId: z.ZodString;
|
|
12
11
|
}, z.core.$strip>, z.ZodObject<{
|
|
13
12
|
id: z.ZodString;
|
|
14
13
|
status: z.ZodEnum<{
|
|
@@ -60,7 +59,6 @@ export declare const automationContract: {
|
|
|
60
59
|
listExecutions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
61
60
|
automationId: z.ZodString;
|
|
62
61
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
63
|
-
projectId: z.ZodString;
|
|
64
62
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
65
63
|
completedAt: z.ZodNullable<z.ZodDate>;
|
|
66
64
|
createdAt: z.ZodDate;
|
|
@@ -76,4 +74,10 @@ export declare const automationContract: {
|
|
|
76
74
|
completed: "completed";
|
|
77
75
|
}>;
|
|
78
76
|
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
77
|
+
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
78
|
+
automationId: z.ZodString;
|
|
79
|
+
enabled: z.ZodBoolean;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
txid: z.ZodNumber;
|
|
82
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
79
83
|
};
|
package/dist/automation.js
CHANGED
|
@@ -23,7 +23,6 @@ export const automationContract = {
|
|
|
23
23
|
.input(z.object({
|
|
24
24
|
automationId: z.string(),
|
|
25
25
|
executionId: z.string(),
|
|
26
|
-
projectId: z.string(),
|
|
27
26
|
}))
|
|
28
27
|
.output(EXECUTION_SUMMARY_SCHEMA.omit({ eventTypes: true }).extend({
|
|
29
28
|
actions: z
|
|
@@ -63,7 +62,14 @@ export const automationContract = {
|
|
|
63
62
|
.input(z.object({
|
|
64
63
|
automationId: z.string(),
|
|
65
64
|
limit: z.number().int().min(1).max(100).default(50),
|
|
66
|
-
projectId: z.string(),
|
|
67
65
|
}))
|
|
68
66
|
.output(EXECUTION_SUMMARY_SCHEMA.array()),
|
|
67
|
+
update: oc
|
|
68
|
+
.input(z.object({
|
|
69
|
+
automationId: z.string(),
|
|
70
|
+
enabled: z.boolean(),
|
|
71
|
+
}))
|
|
72
|
+
.output(z.object({
|
|
73
|
+
txid: z.number().int().nonnegative(),
|
|
74
|
+
})),
|
|
69
75
|
};
|
package/dist/deployment.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare const AUTOMATION_SDK_VERSION = "2";
|
|
|
4
4
|
export declare const deploymentContract: {
|
|
5
5
|
cancel: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
6
6
|
deploymentId: z.ZodString;
|
|
7
|
-
projectId: z.ZodString;
|
|
8
7
|
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
9
8
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
10
9
|
artifact: z.ZodCustom<Blob, Blob>;
|
|
@@ -46,16 +45,25 @@ export declare const deploymentContract: {
|
|
|
46
45
|
}>, Record<never, never>>;
|
|
47
46
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
48
47
|
deploymentId: z.ZodString;
|
|
49
|
-
projectId: z.ZodString;
|
|
50
48
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
49
|
automations: z.ZodArray<z.ZodObject<{
|
|
52
50
|
description: z.ZodString;
|
|
53
51
|
id: z.ZodString;
|
|
54
52
|
identityKey: z.ZodString;
|
|
53
|
+
scopes: z.ZodArray<z.ZodObject<{
|
|
54
|
+
name: z.ZodOptional<z.ZodString>;
|
|
55
|
+
path: z.ZodArray<z.ZodNumber>;
|
|
56
|
+
presentation: z.ZodEnum<{
|
|
57
|
+
collapsed: "collapsed";
|
|
58
|
+
expanded: "expanded";
|
|
59
|
+
hidden: "hidden";
|
|
60
|
+
}>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
55
62
|
subscriptions: z.ZodArray<z.ZodObject<{
|
|
56
63
|
config: z.ZodJSONSchema;
|
|
57
64
|
eventType: z.ZodString;
|
|
58
65
|
hookSlot: z.ZodNumber;
|
|
66
|
+
scopePath: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
59
67
|
}, z.core.$strip>>;
|
|
60
68
|
}, z.core.$strip>>;
|
|
61
69
|
createdAt: z.ZodDate;
|
package/dist/deployment.js
CHANGED
|
@@ -26,12 +26,7 @@ const GIT_SOURCE_SCHEMA = z.object({
|
|
|
26
26
|
repositoryUrl: z.string().min(1),
|
|
27
27
|
});
|
|
28
28
|
export const deploymentContract = {
|
|
29
|
-
cancel: oc
|
|
30
|
-
.input(z.object({
|
|
31
|
-
deploymentId: z.string(),
|
|
32
|
-
projectId: z.string(),
|
|
33
|
-
}))
|
|
34
|
-
.output(z.void()),
|
|
29
|
+
cancel: oc.input(z.object({ deploymentId: z.string() })).output(z.void()),
|
|
35
30
|
create: oc
|
|
36
31
|
.errors({ DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR })
|
|
37
32
|
.input(z.object({
|
|
@@ -61,22 +56,25 @@ export const deploymentContract = {
|
|
|
61
56
|
git: GIT_SOURCE_SCHEMA.optional(),
|
|
62
57
|
}))
|
|
63
58
|
.output(z.object({ id: z.string() })),
|
|
64
|
-
get: oc
|
|
65
|
-
.input(z.object({
|
|
66
|
-
deploymentId: z.string(),
|
|
67
|
-
projectId: z.string(),
|
|
68
|
-
}))
|
|
69
|
-
.output(z.object({
|
|
59
|
+
get: oc.input(z.object({ deploymentId: z.string() })).output(z.object({
|
|
70
60
|
automations: z
|
|
71
61
|
.object({
|
|
72
62
|
description: z.string(),
|
|
73
63
|
id: z.string(),
|
|
74
64
|
identityKey: z.string(),
|
|
65
|
+
scopes: z
|
|
66
|
+
.object({
|
|
67
|
+
name: z.string().optional(),
|
|
68
|
+
path: z.number().int().nonnegative().array().min(1),
|
|
69
|
+
presentation: z.enum(["collapsed", "expanded", "hidden"]),
|
|
70
|
+
})
|
|
71
|
+
.array(),
|
|
75
72
|
subscriptions: z
|
|
76
73
|
.object({
|
|
77
74
|
config: z.json(),
|
|
78
75
|
eventType: z.string(),
|
|
79
76
|
hookSlot: z.number().int().nonnegative(),
|
|
77
|
+
scopePath: z.number().int().nonnegative().array().default([]),
|
|
80
78
|
})
|
|
81
79
|
.array(),
|
|
82
80
|
})
|