@automate.ax/api-contract 0.76.0 → 0.77.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.js CHANGED
@@ -1,8 +1,83 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import * as z from "zod";
3
- export const integrationAccountOutputSchema = z.object({
3
+ import { cursorPageOutputSchema, cursorPaginationInputSchema } from "./schemas.js";
4
+ const INTEGRATION_FORM_FIELD_SCHEMA = z.discriminatedUnion("input", [
5
+ z.object({
6
+ default: z.boolean().optional(),
7
+ description: z.string().optional(),
8
+ input: z.literal("boolean"),
9
+ label: z.string(),
10
+ name: z.string(),
11
+ required: z.boolean(),
12
+ }),
13
+ z.object({
14
+ default: z.number().optional(),
15
+ description: z.string().optional(),
16
+ input: z.literal("number"),
17
+ label: z.string(),
18
+ name: z.string(),
19
+ placeholder: z.string().optional(),
20
+ required: z.boolean(),
21
+ }),
22
+ z.object({
23
+ description: z.string().optional(),
24
+ input: z.literal("password"),
25
+ label: z.string(),
26
+ name: z.string(),
27
+ placeholder: z.string().optional(),
28
+ required: z.boolean(),
29
+ }),
30
+ z.object({
31
+ default: z.string().optional(),
32
+ description: z.string().optional(),
33
+ input: z.enum(["email", "text", "url"]),
34
+ label: z.string(),
35
+ name: z.string(),
36
+ placeholder: z.string().optional(),
37
+ required: z.boolean(),
38
+ }),
39
+ ]);
40
+ export const integrationServiceOutputSchema = z.object({
41
+ connectionMethods: z
42
+ .discriminatedUnion("type", [
43
+ z.object({
44
+ description: z.string().optional(),
45
+ id: z.string(),
46
+ name: z.string(),
47
+ type: z.literal("redirect"),
48
+ }),
49
+ z.object({
50
+ description: z.string().optional(),
51
+ fields: INTEGRATION_FORM_FIELD_SCHEMA.array(),
52
+ id: z.string(),
53
+ name: z.string(),
54
+ type: z.literal("form"),
55
+ }),
56
+ ])
57
+ .array(),
58
+ connectionNotice: z
59
+ .object({
60
+ action: z.object({ href: z.string(), label: z.string() }),
61
+ description: z.string(),
62
+ title: z.string(),
63
+ })
64
+ .optional(),
65
+ description: z.string().optional(),
66
+ icon: z.string().optional(),
67
+ id: z.string(),
68
+ name: z.string(),
69
+ preferredConnectionMethodId: z.string().optional(),
70
+ });
71
+ export const integrationAccountRevocationOutputSchema = z.object({
72
+ completedAt: z.date().nullable(),
73
+ error: z.string().nullable(),
74
+ id: z.string(),
75
+ requestedAt: z.date(),
76
+ status: z.enum(["pending", "succeeded", "failed", "unsupported"]),
77
+ });
78
+ export const integrationAccountBindingOutputSchema = z.object({
4
79
  checkedAt: z.date().nullable(),
5
- connectionId: z.string().min(1),
80
+ connectionMethodId: z.string().min(1),
6
81
  error: z
7
82
  .object({
8
83
  code: z.string(),
@@ -15,40 +90,196 @@ export const integrationAccountOutputSchema = z.object({
15
90
  serviceId: z.string(),
16
91
  serviceSub: z.string(),
17
92
  });
93
+ export const integrationAccountOutputSchema = integrationAccountBindingOutputSchema.extend({
94
+ revokedAt: z.date().nullable(),
95
+ revocation: integrationAccountRevocationOutputSchema.nullable(),
96
+ status: z.enum([
97
+ "active",
98
+ "revocation_pending",
99
+ "revocation_failed",
100
+ "revoked",
101
+ ]),
102
+ });
103
+ export const integrationAccountRevocationImpactOutputSchema = z.object({
104
+ accessibleOrganizations: z
105
+ .object({
106
+ id: z.string(),
107
+ name: z.string(),
108
+ projects: z
109
+ .object({
110
+ automations: z
111
+ .object({
112
+ enabled: z.boolean(),
113
+ id: z.string(),
114
+ identityKey: z.string(),
115
+ })
116
+ .array(),
117
+ id: z.string(),
118
+ name: z.string(),
119
+ pendingDeployments: z
120
+ .object({
121
+ id: z.string(),
122
+ status: z.enum([
123
+ "awaiting_authorization",
124
+ "configuring",
125
+ "publishing",
126
+ ]),
127
+ })
128
+ .array(),
129
+ })
130
+ .array(),
131
+ })
132
+ .array(),
133
+ account: integrationAccountOutputSchema
134
+ .pick({
135
+ id: true,
136
+ label: true,
137
+ revokedAt: true,
138
+ revocation: true,
139
+ serviceId: true,
140
+ serviceSub: true,
141
+ status: true,
142
+ })
143
+ .extend({
144
+ connectionMethodId: z.string(),
145
+ providerRevocationSupported: z.boolean(),
146
+ }),
147
+ hiddenOrganizationCount: z.number().int().nonnegative(),
148
+ totals: z.object({
149
+ automations: z.number().int().nonnegative(),
150
+ organizations: z.number().int().positive(),
151
+ pendingDeployments: z.number().int().nonnegative(),
152
+ projects: z.number().int().nonnegative(),
153
+ }),
154
+ });
155
+ const organizationAccountInputSchema = z.object({
156
+ accountId: z.string(),
157
+ organizationId: z.string(),
158
+ });
18
159
  export const accountContract = {
19
160
  beginConnection: oc
161
+ .route({
162
+ description: "Starts an OAuth-style organization account connection.",
163
+ method: "POST",
164
+ operationId: "beginIntegrationAccountConnection",
165
+ path: "/organizations/{organizationId}/integration-account-connections",
166
+ successStatus: 201,
167
+ summary: "Begin integration account connection",
168
+ tags: ["Integration Accounts"],
169
+ })
20
170
  .input(z.object({
21
- connectionId: z.string().min(1),
171
+ connectionMethodId: z.string().min(1),
22
172
  organizationId: z.string(),
23
173
  scopes: z.string().array().default([]),
24
174
  serviceId: z.string().min(1),
25
175
  }))
26
176
  .output(z.object({ flowId: z.string(), url: z.url() })),
27
177
  connectionStatus: oc
178
+ .route({
179
+ description: "Returns the current state of a redirect connection flow.",
180
+ method: "GET",
181
+ operationId: "getIntegrationAccountConnection",
182
+ path: "/organizations/{organizationId}/integration-account-connections/{flowId}",
183
+ summary: "Get integration account connection",
184
+ tags: ["Integration Accounts"],
185
+ })
28
186
  .input(z.object({
29
187
  flowId: z.string(),
30
188
  organizationId: z.string(),
31
189
  }))
32
190
  .output(z.discriminatedUnion("status", [
33
191
  z.object({ status: z.literal("pending") }),
34
- z.object({ status: z.literal("succeeded") }),
192
+ z.object({
193
+ accountId: z.string().nullable(),
194
+ status: z.literal("succeeded"),
195
+ }),
35
196
  z.object({ message: z.string(), status: z.literal("failed") }),
36
197
  ])),
37
- delete: oc
38
- .input(z.object({
39
- accountId: z.string(),
40
- organizationId: z.string(),
41
- }))
198
+ disconnect: oc
199
+ .route({
200
+ description: "Removes an integration account from one organization without revoking it elsewhere.",
201
+ method: "DELETE",
202
+ operationId: "disconnectIntegrationAccount",
203
+ path: "/organizations/{organizationId}/integration-accounts/{accountId}",
204
+ summary: "Disconnect integration account",
205
+ tags: ["Integration Accounts"],
206
+ })
207
+ .input(organizationAccountInputSchema)
42
208
  .output(z.object({ txid: z.number().int().nonnegative() })),
43
- get: oc.input(z.object({ organizationId: z.string() })).output(z.object({
44
- accounts: integrationAccountOutputSchema.array(),
209
+ get: oc
210
+ .route({
211
+ description: "Returns one integration account linked to an organization.",
212
+ method: "GET",
213
+ operationId: "getIntegrationAccount",
214
+ path: "/organizations/{organizationId}/integration-accounts/{accountId}",
215
+ summary: "Get integration account",
216
+ tags: ["Integration Accounts"],
217
+ })
218
+ .input(organizationAccountInputSchema)
219
+ .output(integrationAccountOutputSchema),
220
+ list: oc
221
+ .route({
222
+ description: "Lists integration accounts linked to an organization.",
223
+ method: "GET",
224
+ operationId: "listIntegrationAccounts",
225
+ path: "/organizations/{organizationId}/integration-accounts",
226
+ summary: "List integration accounts",
227
+ tags: ["Integration Accounts"],
228
+ })
229
+ .input(cursorPaginationInputSchema.extend({ organizationId: z.string() }))
230
+ .output(cursorPageOutputSchema(integrationAccountOutputSchema.extend({ createdAt: z.date() }))),
231
+ listServices: oc
232
+ .route({
233
+ description: "Lists enabled integration services and their connection methods.",
234
+ method: "GET",
235
+ operationId: "listIntegrationServices",
236
+ path: "/integration-services",
237
+ summary: "List integration services",
238
+ tags: ["Integration Accounts"],
239
+ })
240
+ .input(z.object({}).default({}))
241
+ .output(integrationServiceOutputSchema.array()),
242
+ revocationImpact: oc
243
+ .route({
244
+ description: "Previews platform-wide revocation while redacting inaccessible organizations.",
245
+ method: "GET",
246
+ operationId: "getIntegrationAccountRevocationImpact",
247
+ path: "/organizations/{organizationId}/integration-accounts/{accountId}/revocation-impact",
248
+ summary: "Preview integration account revocation",
249
+ tags: ["Integration Accounts"],
250
+ })
251
+ .input(organizationAccountInputSchema)
252
+ .output(integrationAccountRevocationImpactOutputSchema),
253
+ revoke: oc
254
+ .route({
255
+ description: "Immediately blocks and globally revokes a shared integration account.",
256
+ method: "POST",
257
+ operationId: "revokeIntegrationAccount",
258
+ path: "/organizations/{organizationId}/integration-accounts/{accountId}/revoke",
259
+ successStatus: 202,
260
+ summary: "Revoke integration account",
261
+ tags: ["Integration Accounts"],
262
+ })
263
+ .input(organizationAccountInputSchema)
264
+ .output(z.object({
265
+ revocation: integrationAccountRevocationOutputSchema,
266
+ txid: z.number().int().nonnegative(),
45
267
  })),
46
268
  submitCredentials: oc
269
+ .route({
270
+ description: "Validates secret form credentials and links the resulting account.",
271
+ method: "POST",
272
+ operationId: "connectIntegrationAccountCredentials",
273
+ path: "/organizations/{organizationId}/integration-account-credentials",
274
+ successStatus: 201,
275
+ summary: "Connect integration account credentials",
276
+ tags: ["Integration Accounts"],
277
+ })
47
278
  .input(z.object({
48
- connectionId: z.string().min(1),
279
+ connectionMethodId: z.string().min(1),
49
280
  data: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])),
50
281
  organizationId: z.string(),
51
282
  serviceId: z.string().min(1),
52
283
  }))
53
- .output(z.void()),
284
+ .output(z.object({ accountId: z.string() })),
54
285
  };
package/dist/api-key.d.ts CHANGED
@@ -33,15 +33,23 @@ export declare const apiKeyContract: {
33
33
  keyId: z.ZodString;
34
34
  }, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
35
35
  list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
36
+ cursor: z.ZodOptional<z.ZodString>;
37
+ limit: z.ZodDefault<z.ZodNumber>;
36
38
  organizationId: z.ZodString;
37
- }, z.core.$strip>, z.ZodArray<z.ZodObject<{
38
- id: z.ZodString;
39
- name: z.ZodNullable<z.ZodString>;
40
- start: z.ZodNullable<z.ZodString>;
41
- createdAt: z.ZodDate;
42
- updatedAt: z.ZodDate;
43
- expiresAt: z.ZodNullable<z.ZodDate>;
44
- }, z.core.$strip>>, Record<never, never>, Record<never, never>>;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ items: z.ZodArray<z.ZodObject<{
41
+ id: z.ZodString;
42
+ name: z.ZodNullable<z.ZodString>;
43
+ start: z.ZodNullable<z.ZodString>;
44
+ createdAt: z.ZodDate;
45
+ updatedAt: z.ZodDate;
46
+ expiresAt: z.ZodNullable<z.ZodDate>;
47
+ }, z.core.$strip>>;
48
+ pageInfo: z.ZodObject<{
49
+ hasMore: z.ZodBoolean;
50
+ nextCursor: z.ZodNullable<z.ZodString>;
51
+ }, z.core.$strip>;
52
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
45
53
  update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
46
54
  keyId: z.ZodString;
47
55
  name: z.ZodString;
package/dist/api-key.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import * as z from "zod";
3
- import { reasonableNameSchema } from "./schemas.js";
3
+ import { cursorPageOutputSchema, cursorPaginationInputSchema, reasonableNameSchema, } from "./schemas.js";
4
4
  export const organizationApiKeyOutputSchema = z.object({
5
5
  id: z.string(),
6
6
  name: z.string().nullable(),
@@ -50,8 +50,8 @@ export const apiKeyContract = {
50
50
  description: "Lists API keys owned by an organization. Requires apiKey:read.",
51
51
  tags: ["API Keys"],
52
52
  })
53
- .input(z.object({ organizationId: z.string() }))
54
- .output(organizationApiKeyOutputSchema.array()),
53
+ .input(cursorPaginationInputSchema.extend({ organizationId: z.string() }))
54
+ .output(cursorPageOutputSchema(organizationApiKeyOutputSchema)),
55
55
  update: oc
56
56
  .route({
57
57
  method: "PATCH",
@@ -6,7 +6,7 @@ type ScopeRequirement = string | {
6
6
  export declare const authorizationContract: {
7
7
  beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
8
8
  binding: z.ZodString;
9
- connectionId: z.ZodString;
9
+ connectionMethodId: z.ZodString;
10
10
  deploymentId: z.ZodString;
11
11
  serviceId: z.ZodString;
12
12
  }, z.core.$strip>, z.ZodObject<{
@@ -24,7 +24,7 @@ export declare const authorizationContract: {
24
24
  }, z.core.$strip>, z.ZodObject<{
25
25
  accounts: z.ZodArray<z.ZodObject<{
26
26
  checkedAt: z.ZodNullable<z.ZodDate>;
27
- connectionId: z.ZodString;
27
+ connectionMethodId: z.ZodString;
28
28
  error: z.ZodNullable<z.ZodObject<{
29
29
  code: z.ZodString;
30
30
  message: z.ZodString;
@@ -39,7 +39,7 @@ export declare const authorizationContract: {
39
39
  accountId: z.ZodNullable<z.ZodString>;
40
40
  binding: z.ZodString;
41
41
  connections: z.ZodArray<z.ZodObject<{
42
- connectionId: z.ZodString;
42
+ connectionMethodId: z.ZodString;
43
43
  minimalScopes: z.ZodArray<z.ZodString>;
44
44
  requiredScopes: z.ZodArray<z.ZodType<ScopeRequirement, unknown, z.core.$ZodTypeInternals<ScopeRequirement, unknown>>>;
45
45
  }, z.core.$strip>>;
@@ -55,7 +55,7 @@ export declare const authorizationContract: {
55
55
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
56
56
  submitCredentials: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
57
57
  binding: z.ZodString;
58
- connectionId: z.ZodString;
58
+ connectionMethodId: z.ZodString;
59
59
  data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
60
60
  deploymentId: z.ZodString;
61
61
  serviceId: z.ZodString;
@@ -11,7 +11,7 @@ export const authorizationContract = {
11
11
  beginConnection: oc
12
12
  .input(z.object({
13
13
  binding: z.string().min(1),
14
- connectionId: z.string().min(1),
14
+ connectionMethodId: z.string().min(1),
15
15
  deploymentId: z.string(),
16
16
  serviceId: z.string().min(1),
17
17
  }))
@@ -33,6 +33,14 @@ export const authorizationContract = {
33
33
  headers: z.object({ location: z.url() }),
34
34
  })),
35
35
  get: oc
36
+ .route({
37
+ method: "GET",
38
+ path: "/deployments/{deploymentId}/authorization",
39
+ operationId: "getDeploymentAuthorization",
40
+ summary: "Get deployment authorization",
41
+ description: "Returns connected accounts and the authorization requirements for a deployment.",
42
+ tags: ["Deployments"],
43
+ })
36
44
  .input(z.object({
37
45
  deploymentId: z.string(),
38
46
  }))
@@ -40,7 +48,7 @@ export const authorizationContract = {
40
48
  accounts: z
41
49
  .object({
42
50
  checkedAt: z.date().nullable(),
43
- connectionId: z.string().min(1),
51
+ connectionMethodId: z.string().min(1),
44
52
  error: z
45
53
  .object({
46
54
  code: z.string(),
@@ -60,7 +68,7 @@ export const authorizationContract = {
60
68
  binding: z.string(),
61
69
  connections: z
62
70
  .object({
63
- connectionId: z.string().min(1),
71
+ connectionMethodId: z.string().min(1),
64
72
  minimalScopes: z.string().array(),
65
73
  requiredScopes: SCOPE_REQUIREMENT_SCHEMA.array(),
66
74
  })
@@ -73,12 +81,20 @@ export const authorizationContract = {
73
81
  .array(),
74
82
  })),
75
83
  proceed: oc
84
+ .route({
85
+ method: "POST",
86
+ path: "/deployments/{deploymentId}/authorization/proceed",
87
+ operationId: "proceedWithDeploymentAuthorization",
88
+ summary: "Proceed with deployment authorization",
89
+ description: "Continues a deployment after every integration requirement is satisfied.",
90
+ tags: ["Deployments"],
91
+ })
76
92
  .input(z.object({ deploymentId: z.string() }))
77
93
  .output(z.object({ txid: z.number().int().nonnegative() })),
78
94
  submitCredentials: oc
79
95
  .input(z.object({
80
96
  binding: z.string().min(1),
81
- connectionId: z.string().min(1),
97
+ connectionMethodId: z.string().min(1),
82
98
  data: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])),
83
99
  deploymentId: z.string(),
84
100
  serviceId: z.string().min(1),
@@ -1,10 +1,112 @@
1
1
  import * as z from "zod";
2
+ export declare const automationOutputSchema: z.ZodObject<{
3
+ accountBindings: z.ZodArray<z.ZodObject<{
4
+ account: z.ZodNullable<z.ZodObject<{
5
+ checkedAt: z.ZodNullable<z.ZodDate>;
6
+ connectionMethodId: z.ZodString;
7
+ error: z.ZodNullable<z.ZodObject<{
8
+ code: z.ZodString;
9
+ message: z.ZodString;
10
+ }, z.core.$strip>>;
11
+ id: z.ZodString;
12
+ label: z.ZodString;
13
+ scopes: z.ZodArray<z.ZodString>;
14
+ serviceId: z.ZodString;
15
+ serviceSub: z.ZodString;
16
+ }, z.core.$strip>>;
17
+ binding: z.ZodString;
18
+ serviceId: z.ZodString;
19
+ }, z.core.$strip>>;
20
+ activeDeploymentId: z.ZodString;
21
+ createdAt: z.ZodDate;
22
+ description: z.ZodString;
23
+ enabled: z.ZodBoolean;
24
+ id: z.ZodString;
25
+ identityKey: z.ZodString;
26
+ project: z.ZodObject<{
27
+ id: z.ZodString;
28
+ name: z.ZodString;
29
+ organization: z.ZodObject<{
30
+ id: z.ZodString;
31
+ name: z.ZodString;
32
+ }, z.core.$strip>;
33
+ }, z.core.$strip>;
34
+ triggers: z.ZodArray<z.ZodObject<{
35
+ details: z.ZodArray<z.ZodObject<{
36
+ copyable: z.ZodOptional<z.ZodBoolean>;
37
+ value: z.ZodString;
38
+ label: z.ZodString;
39
+ }, z.core.$strip>>;
40
+ hookSlot: z.ZodNumber;
41
+ id: z.ZodString;
42
+ name: z.ZodString;
43
+ primary: z.ZodOptional<z.ZodObject<{
44
+ copyable: z.ZodOptional<z.ZodBoolean>;
45
+ value: z.ZodString;
46
+ }, z.core.$strip>>;
47
+ scopePath: z.ZodArray<z.ZodNumber>;
48
+ type: z.ZodString;
49
+ }, z.core.$strip>>;
50
+ updatedAt: z.ZodDate;
51
+ }, z.core.$strip>;
2
52
  export declare const automationExecutionStatusSchema: z.ZodEnum<{
3
53
  failed: "failed";
4
54
  running: "running";
5
- completed: "completed";
55
+ settled: "settled";
6
56
  }>;
7
57
  export declare const automationContract: {
58
+ get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
59
+ automationId: z.ZodString;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ accountBindings: z.ZodArray<z.ZodObject<{
62
+ account: z.ZodNullable<z.ZodObject<{
63
+ checkedAt: z.ZodNullable<z.ZodDate>;
64
+ connectionMethodId: z.ZodString;
65
+ error: z.ZodNullable<z.ZodObject<{
66
+ code: z.ZodString;
67
+ message: z.ZodString;
68
+ }, z.core.$strip>>;
69
+ id: z.ZodString;
70
+ label: z.ZodString;
71
+ scopes: z.ZodArray<z.ZodString>;
72
+ serviceId: z.ZodString;
73
+ serviceSub: z.ZodString;
74
+ }, z.core.$strip>>;
75
+ binding: z.ZodString;
76
+ serviceId: z.ZodString;
77
+ }, z.core.$strip>>;
78
+ activeDeploymentId: z.ZodString;
79
+ createdAt: z.ZodDate;
80
+ description: z.ZodString;
81
+ enabled: z.ZodBoolean;
82
+ id: z.ZodString;
83
+ identityKey: z.ZodString;
84
+ project: z.ZodObject<{
85
+ id: z.ZodString;
86
+ name: z.ZodString;
87
+ organization: z.ZodObject<{
88
+ id: z.ZodString;
89
+ name: z.ZodString;
90
+ }, z.core.$strip>;
91
+ }, z.core.$strip>;
92
+ triggers: z.ZodArray<z.ZodObject<{
93
+ details: z.ZodArray<z.ZodObject<{
94
+ copyable: z.ZodOptional<z.ZodBoolean>;
95
+ value: z.ZodString;
96
+ label: z.ZodString;
97
+ }, z.core.$strip>>;
98
+ hookSlot: z.ZodNumber;
99
+ id: z.ZodString;
100
+ name: z.ZodString;
101
+ primary: z.ZodOptional<z.ZodObject<{
102
+ copyable: z.ZodOptional<z.ZodBoolean>;
103
+ value: z.ZodString;
104
+ }, z.core.$strip>>;
105
+ scopePath: z.ZodArray<z.ZodNumber>;
106
+ type: z.ZodString;
107
+ }, z.core.$strip>>;
108
+ updatedAt: z.ZodDate;
109
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
8
110
  getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
9
111
  automationId: z.ZodString;
10
112
  executionId: z.ZodString;
@@ -13,11 +115,11 @@ export declare const automationContract: {
13
115
  status: z.ZodEnum<{
14
116
  failed: "failed";
15
117
  running: "running";
16
- completed: "completed";
118
+ settled: "settled";
17
119
  }>;
18
- completedAt: z.ZodNullable<z.ZodDate>;
19
120
  createdAt: z.ZodDate;
20
121
  failure: z.ZodNullable<z.ZodType<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue, z.core.$ZodTypeInternals<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue>>>;
122
+ settledAt: z.ZodNullable<z.ZodDate>;
21
123
  actions: z.ZodArray<z.ZodObject<{
22
124
  completedAt: z.ZodNullable<z.ZodDate>;
23
125
  createdAt: z.ZodDate;
@@ -50,19 +152,82 @@ export declare const automationContract: {
50
152
  type: z.ZodString;
51
153
  }, z.core.$strip>>;
52
154
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
155
+ list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodPrefault<z.ZodObject<{
156
+ cursor: z.ZodOptional<z.ZodString>;
157
+ limit: z.ZodDefault<z.ZodNumber>;
158
+ enabled: z.ZodOptional<z.ZodBoolean>;
159
+ organizationId: z.ZodOptional<z.ZodString>;
160
+ projectId: z.ZodOptional<z.ZodString>;
161
+ query: z.ZodOptional<z.ZodString>;
162
+ }, z.core.$strip>>, z.ZodObject<{
163
+ items: z.ZodArray<z.ZodObject<{
164
+ accountBindings: z.ZodArray<z.ZodObject<{
165
+ account: z.ZodNullable<z.ZodObject<{
166
+ checkedAt: z.ZodNullable<z.ZodDate>;
167
+ connectionMethodId: z.ZodString;
168
+ error: z.ZodNullable<z.ZodObject<{
169
+ code: z.ZodString;
170
+ message: z.ZodString;
171
+ }, z.core.$strip>>;
172
+ id: z.ZodString;
173
+ label: z.ZodString;
174
+ scopes: z.ZodArray<z.ZodString>;
175
+ serviceId: z.ZodString;
176
+ serviceSub: z.ZodString;
177
+ }, z.core.$strip>>;
178
+ binding: z.ZodString;
179
+ serviceId: z.ZodString;
180
+ }, z.core.$strip>>;
181
+ activeDeploymentId: z.ZodString;
182
+ createdAt: z.ZodDate;
183
+ description: z.ZodString;
184
+ enabled: z.ZodBoolean;
185
+ id: z.ZodString;
186
+ identityKey: z.ZodString;
187
+ project: z.ZodObject<{
188
+ id: z.ZodString;
189
+ name: z.ZodString;
190
+ organization: z.ZodObject<{
191
+ id: z.ZodString;
192
+ name: z.ZodString;
193
+ }, z.core.$strip>;
194
+ }, z.core.$strip>;
195
+ triggers: z.ZodArray<z.ZodObject<{
196
+ details: z.ZodArray<z.ZodObject<{
197
+ copyable: z.ZodOptional<z.ZodBoolean>;
198
+ value: z.ZodString;
199
+ label: z.ZodString;
200
+ }, z.core.$strip>>;
201
+ hookSlot: z.ZodNumber;
202
+ id: z.ZodString;
203
+ name: z.ZodString;
204
+ primary: z.ZodOptional<z.ZodObject<{
205
+ copyable: z.ZodOptional<z.ZodBoolean>;
206
+ value: z.ZodString;
207
+ }, z.core.$strip>>;
208
+ scopePath: z.ZodArray<z.ZodNumber>;
209
+ type: z.ZodString;
210
+ }, z.core.$strip>>;
211
+ updatedAt: z.ZodDate;
212
+ }, z.core.$strip>>;
213
+ pageInfo: z.ZodObject<{
214
+ hasMore: z.ZodBoolean;
215
+ nextCursor: z.ZodNullable<z.ZodString>;
216
+ }, z.core.$strip>;
217
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
53
218
  listExecutions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
54
219
  automationId: z.ZodString;
55
220
  limit: z.ZodDefault<z.ZodNumber>;
56
221
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
57
- completedAt: z.ZodNullable<z.ZodDate>;
58
222
  createdAt: z.ZodDate;
59
223
  eventTypes: z.ZodArray<z.ZodString>;
60
224
  failure: z.ZodNullable<z.ZodType<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue, z.core.$ZodTypeInternals<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue>>>;
61
225
  id: z.ZodString;
226
+ settledAt: z.ZodNullable<z.ZodDate>;
62
227
  status: z.ZodEnum<{
63
228
  failed: "failed";
64
229
  running: "running";
65
- completed: "completed";
230
+ settled: "settled";
66
231
  }>;
67
232
  }, z.core.$strip>>, Record<never, never>, Record<never, never>>;
68
233
  update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{