@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.d.ts +372 -7
- package/dist/account.js +244 -13
- package/dist/api-key.d.ts +16 -8
- package/dist/api-key.js +3 -3
- package/dist/authorization.d.ts +4 -4
- package/dist/authorization.js +20 -4
- package/dist/automation.d.ts +170 -5
- package/dist/automation.js +82 -2
- package/dist/deployment.d.ts +165 -9
- package/dist/deployment.js +112 -43
- package/dist/events/google-meet.d.ts +20 -0
- package/dist/events/google-meet.js +38 -0
- package/dist/events/index.d.ts +17 -0
- package/dist/events/index.js +2 -0
- package/dist/execution-data.d.ts +90 -0
- package/dist/execution-data.js +53 -0
- package/dist/index.d.ts +2022 -392
- package/dist/index.js +30 -9
- package/dist/org.d.ts +43 -35
- package/dist/org.js +5 -5
- package/dist/project.d.ts +23 -15
- package/dist/project.js +5 -5
- package/dist/runtime.d.ts +36 -1
- package/dist/runtime.js +53 -1
- package/dist/schemas.d.ts +20 -0
- package/dist/schemas.js +19 -0
- package/package.json +2 -2
- package/src/account.ts +262 -17
- package/src/api-key.ts +7 -3
- package/src/authorization.ts +22 -4
- package/src/automation.ts +89 -2
- package/src/deployment.ts +118 -43
- package/src/events/google-meet.ts +48 -0
- package/src/events/index.ts +2 -0
- package/src/execution-data.ts +69 -0
- package/src/index.ts +61 -8
- package/src/org.ts +9 -5
- package/src/project.ts +9 -5
- package/src/runtime.ts +65 -1
- package/src/schemas.ts +22 -0
package/dist/index.js
CHANGED
|
@@ -5,23 +5,42 @@ import { authContract } from "./auth.js";
|
|
|
5
5
|
import { authorizationContract } from "./authorization.js";
|
|
6
6
|
import { deploymentContract } from "./deployment.js";
|
|
7
7
|
import { eventsContract } from "./events/index.js";
|
|
8
|
+
import { executionDataContract } from "./execution-data.js";
|
|
8
9
|
import { orgContract } from "./org.js";
|
|
9
10
|
import { projectContract } from "./project.js";
|
|
10
11
|
import { runtimeContract } from "./runtime.js";
|
|
11
|
-
export { automationExecutionStatusSchema } from "./automation.js";
|
|
12
|
-
export {
|
|
12
|
+
export { automationExecutionStatusSchema, automationOutputSchema, } from "./automation.js";
|
|
13
|
+
export { EXECUTION_DATASET_VERSION, executionDatasetManifestSchema, executionDatasetResourceSchema, executionDatasetScopeSchema, executionDataContract, } from "./execution-data.js";
|
|
14
|
+
export { AUTOMATION_SDK_VERSION, deploymentOutputSchema, deploymentStatusSchema, } from "./deployment.js";
|
|
13
15
|
export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, } from "./errors.js";
|
|
14
|
-
export { integrationAccountOutputSchema } from "./account.js";
|
|
15
|
-
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, DEFAULT_GATEWAY_MODEL_ID, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, hashSignalCoordinatorConfiguration, runtimeContract, } from "./runtime.js";
|
|
16
|
+
export { integrationAccountOutputSchema, integrationAccountRevocationImpactOutputSchema, integrationAccountRevocationOutputSchema, integrationServiceOutputSchema, } from "./account.js";
|
|
17
|
+
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS, AUTOMATION_TRACE_MAX_NAME_LENGTH, AUTOMATION_TRACE_MAX_SPANS, DEFAULT_GATEWAY_MODEL_ID, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, hashSignalCoordinatorConfiguration, runtimeContract, } from "./runtime.js";
|
|
16
18
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
17
19
|
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
18
20
|
export { projectOutputSchema } from "./project.js";
|
|
19
|
-
export { reasonableNameSchema } from "./schemas.js";
|
|
21
|
+
export { cursorPageInfoSchema, cursorPageOutputSchema, cursorPaginationInputSchema, reasonableNameSchema, } from "./schemas.js";
|
|
20
22
|
export { userOutputSchema } from "./auth.js";
|
|
21
23
|
export { managementPermissionStatement, managementRolePermissions, organizationApiKeyPermissions, } from "./permissions.js";
|
|
22
24
|
/** Procedures exposed by the public Node client and OpenAPI document. */
|
|
23
25
|
export const publicContract = {
|
|
26
|
+
account: accountContract,
|
|
27
|
+
automation: {
|
|
28
|
+
get: automationContract.get,
|
|
29
|
+
list: automationContract.list,
|
|
30
|
+
update: automationContract.update,
|
|
31
|
+
},
|
|
24
32
|
apiKey: apiKeyContract,
|
|
33
|
+
authorization: {
|
|
34
|
+
get: authorizationContract.get,
|
|
35
|
+
proceed: authorizationContract.proceed,
|
|
36
|
+
},
|
|
37
|
+
deployment: {
|
|
38
|
+
cancel: deploymentContract.cancel,
|
|
39
|
+
get: deploymentContract.get,
|
|
40
|
+
list: deploymentContract.list,
|
|
41
|
+
redeploy: deploymentContract.redeploy,
|
|
42
|
+
},
|
|
43
|
+
executionData: executionDataContract,
|
|
25
44
|
org: {
|
|
26
45
|
create: orgContract.create,
|
|
27
46
|
delete: orgContract.delete,
|
|
@@ -46,12 +65,14 @@ export const publicContract = {
|
|
|
46
65
|
/** Procedures used by first-party control-plane clients. */
|
|
47
66
|
export const firstPartyContract = {
|
|
48
67
|
...publicContract,
|
|
49
|
-
|
|
50
|
-
|
|
68
|
+
automation: {
|
|
69
|
+
...publicContract.automation,
|
|
70
|
+
getExecution: automationContract.getExecution,
|
|
71
|
+
listExecutions: automationContract.listExecutions,
|
|
72
|
+
},
|
|
51
73
|
authorization: {
|
|
74
|
+
...publicContract.authorization,
|
|
52
75
|
beginConnection: authorizationContract.beginConnection,
|
|
53
|
-
get: authorizationContract.get,
|
|
54
|
-
proceed: authorizationContract.proceed,
|
|
55
76
|
selectAccount: authorizationContract.selectAccount,
|
|
56
77
|
submitCredentials: authorizationContract.submitCredentials,
|
|
57
78
|
},
|
package/dist/org.d.ts
CHANGED
|
@@ -282,45 +282,53 @@ export declare const orgContract: {
|
|
|
282
282
|
leave: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
283
283
|
organizationId: z.ZodString;
|
|
284
284
|
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
285
|
-
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.
|
|
285
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodPrefault<z.ZodObject<{
|
|
286
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
287
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
286
288
|
query: z.ZodOptional<z.ZodString>;
|
|
287
|
-
}, z.core.$strip>>, z.
|
|
288
|
-
|
|
289
|
-
name: z.ZodString;
|
|
290
|
-
logo: z.ZodNullable<z.ZodString>;
|
|
291
|
-
metadata: z.ZodNullable<z.ZodString>;
|
|
292
|
-
createdAt: z.ZodDate;
|
|
293
|
-
role: z.ZodEnum<{
|
|
294
|
-
member: "member";
|
|
295
|
-
admin: "admin";
|
|
296
|
-
owner: "owner";
|
|
297
|
-
}>;
|
|
298
|
-
memberCount: z.ZodNumber;
|
|
299
|
-
pendingInvitationCount: z.ZodNumber;
|
|
300
|
-
projectCount: z.ZodNumber;
|
|
301
|
-
activeSubscription: z.ZodNullable<z.ZodObject<{
|
|
289
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
290
|
+
items: z.ZodArray<z.ZodObject<{
|
|
302
291
|
id: z.ZodString;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
292
|
+
name: z.ZodString;
|
|
293
|
+
logo: z.ZodNullable<z.ZodString>;
|
|
294
|
+
metadata: z.ZodNullable<z.ZodString>;
|
|
295
|
+
createdAt: z.ZodDate;
|
|
296
|
+
role: z.ZodEnum<{
|
|
297
|
+
member: "member";
|
|
298
|
+
admin: "admin";
|
|
299
|
+
owner: "owner";
|
|
300
|
+
}>;
|
|
301
|
+
memberCount: z.ZodNumber;
|
|
302
|
+
pendingInvitationCount: z.ZodNumber;
|
|
303
|
+
projectCount: z.ZodNumber;
|
|
304
|
+
activeSubscription: z.ZodNullable<z.ZodObject<{
|
|
305
|
+
id: z.ZodString;
|
|
306
|
+
plan: z.ZodString;
|
|
307
|
+
status: z.ZodString;
|
|
308
|
+
periodEnd: z.ZodNullable<z.ZodDate>;
|
|
309
|
+
cancelAtPeriodEnd: z.ZodBoolean;
|
|
310
|
+
}, z.core.$strip>>;
|
|
311
|
+
plan: z.ZodEnum<{
|
|
312
|
+
free: "free";
|
|
313
|
+
pro: "pro";
|
|
314
|
+
enterprise: "enterprise";
|
|
315
|
+
}>;
|
|
316
|
+
limits: z.ZodObject<{
|
|
317
|
+
aiSpendUsd: z.ZodNumber;
|
|
318
|
+
emailRecipients: z.ZodNumber;
|
|
319
|
+
projects: z.ZodNumber;
|
|
320
|
+
seats: z.ZodNumber;
|
|
321
|
+
}, z.core.$strip>;
|
|
322
|
+
usage: z.ZodObject<{
|
|
323
|
+
aiSpendUsd: z.ZodNumber;
|
|
324
|
+
emailRecipients: z.ZodNumber;
|
|
325
|
+
}, z.core.$strip>;
|
|
307
326
|
}, z.core.$strip>>;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
enterprise: "enterprise";
|
|
312
|
-
}>;
|
|
313
|
-
limits: z.ZodObject<{
|
|
314
|
-
aiSpendUsd: z.ZodNumber;
|
|
315
|
-
emailRecipients: z.ZodNumber;
|
|
316
|
-
projects: z.ZodNumber;
|
|
317
|
-
seats: z.ZodNumber;
|
|
327
|
+
pageInfo: z.ZodObject<{
|
|
328
|
+
hasMore: z.ZodBoolean;
|
|
329
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
318
330
|
}, z.core.$strip>;
|
|
319
|
-
|
|
320
|
-
aiSpendUsd: z.ZodNumber;
|
|
321
|
-
emailRecipients: z.ZodNumber;
|
|
322
|
-
}, z.core.$strip>;
|
|
323
|
-
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
331
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
324
332
|
remove: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
325
333
|
organizationId: z.ZodString;
|
|
326
334
|
memberIdOrEmail: z.ZodString;
|
package/dist/org.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 organizationRoleSchema = z.enum(["member", "admin", "owner"]);
|
|
5
5
|
export const publicOrganizationOutputSchema = z.object({
|
|
6
6
|
id: z.string(),
|
|
@@ -162,12 +162,12 @@ export const orgContract = {
|
|
|
162
162
|
description: "Lists organizations the authenticated user belongs to, optionally filtered by name or ID.",
|
|
163
163
|
tags: ["Organizations"],
|
|
164
164
|
})
|
|
165
|
-
.input(
|
|
166
|
-
.
|
|
165
|
+
.input(cursorPaginationInputSchema
|
|
166
|
+
.extend({
|
|
167
167
|
query: z.string().min(1).optional(),
|
|
168
168
|
})
|
|
169
|
-
.
|
|
170
|
-
.output(organizationSummaryOutputSchema
|
|
169
|
+
.prefault({}))
|
|
170
|
+
.output(cursorPageOutputSchema(organizationSummaryOutputSchema)),
|
|
171
171
|
remove: oc
|
|
172
172
|
.route({
|
|
173
173
|
method: "DELETE",
|
package/dist/project.d.ts
CHANGED
|
@@ -42,26 +42,34 @@ export declare const projectContract: {
|
|
|
42
42
|
}, z.core.$strip>>;
|
|
43
43
|
txid: z.ZodNumber;
|
|
44
44
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
45
|
-
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.
|
|
45
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodPrefault<z.ZodObject<{
|
|
46
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
47
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
46
48
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
47
49
|
query: z.ZodOptional<z.ZodString>;
|
|
48
|
-
}, z.core.$strip>>, z.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
name: z.ZodString;
|
|
52
|
-
organizationId: z.ZodString;
|
|
53
|
-
createdAt: z.ZodDate;
|
|
54
|
-
createdBy: z.ZodNullable<z.ZodString>;
|
|
55
|
-
org: z.ZodObject<{
|
|
50
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
51
|
+
items: z.ZodArray<z.ZodObject<{
|
|
52
|
+
activeDeploymentId: z.ZodNullable<z.ZodString>;
|
|
56
53
|
id: z.ZodString;
|
|
57
54
|
name: z.ZodString;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
organizationId: z.ZodString;
|
|
56
|
+
createdAt: z.ZodDate;
|
|
57
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
58
|
+
org: z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
activeAutomations: z.ZodArray<z.ZodObject<{
|
|
63
|
+
description: z.ZodString;
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
identityKey: z.ZodString;
|
|
66
|
+
}, z.core.$strip>>;
|
|
63
67
|
}, z.core.$strip>>;
|
|
64
|
-
|
|
68
|
+
pageInfo: z.ZodObject<{
|
|
69
|
+
hasMore: z.ZodBoolean;
|
|
70
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
65
73
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
66
74
|
projectId: z.ZodString;
|
|
67
75
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/project.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
|
const TRANSACTION_OUTPUT_SCHEMA = z.object({
|
|
5
5
|
txid: z.number().int().nonnegative(),
|
|
6
6
|
});
|
|
@@ -53,13 +53,13 @@ export const projectContract = {
|
|
|
53
53
|
description: "Lists projects visible to the authenticated user, optionally filtered by organization or query.",
|
|
54
54
|
tags: ["Projects"],
|
|
55
55
|
})
|
|
56
|
-
.input(
|
|
57
|
-
.
|
|
56
|
+
.input(cursorPaginationInputSchema
|
|
57
|
+
.extend({
|
|
58
58
|
organizationId: z.string().optional(),
|
|
59
59
|
query: z.string().min(1).optional(),
|
|
60
60
|
})
|
|
61
|
-
.
|
|
62
|
-
.output(projectOutputSchema
|
|
61
|
+
.prefault({}))
|
|
62
|
+
.output(cursorPageOutputSchema(projectOutputSchema)),
|
|
63
63
|
get: oc
|
|
64
64
|
.route({
|
|
65
65
|
method: "GET",
|
package/dist/runtime.d.ts
CHANGED
|
@@ -5,6 +5,12 @@ export type { GatewayModelId } from "@ai-sdk/gateway";
|
|
|
5
5
|
export declare const DEFAULT_GATEWAY_MODEL_ID = "openai/gpt-4.1-nano";
|
|
6
6
|
export declare const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default";
|
|
7
7
|
export declare const AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX = "__$";
|
|
8
|
+
export declare const AUTOMATION_LOG_MAX_ENTRIES = 1000;
|
|
9
|
+
export declare const AUTOMATION_TRACE_MAX_SPANS = 250;
|
|
10
|
+
export declare const AUTOMATION_OBSERVABILITY_MAX_FIELDS = 64;
|
|
11
|
+
export declare const AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES: number;
|
|
12
|
+
export declare const AUTOMATION_LOG_MAX_MESSAGE_LENGTH = 16384;
|
|
13
|
+
export declare const AUTOMATION_TRACE_MAX_NAME_LENGTH = 256;
|
|
8
14
|
/** Immediate or mutually exclusive absolute/relative invocation timing. */
|
|
9
15
|
export declare const automationInvocationScheduleSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
10
16
|
runAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString, z.ZodNumber]>;
|
|
@@ -491,6 +497,15 @@ export declare const runtimeContract: {
|
|
|
491
497
|
output: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
492
498
|
status: z.ZodLiteral<"succeeded">;
|
|
493
499
|
}, z.core.$strip>]>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
500
|
+
completeTraceSpan: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
501
|
+
completedAt: z.ZodDate;
|
|
502
|
+
spanIndex: z.ZodNumber;
|
|
503
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
504
|
+
status: z.ZodLiteral<"succeeded">;
|
|
505
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
506
|
+
failure: z.ZodType<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue, z.core.$ZodTypeInternals<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue>>;
|
|
507
|
+
status: z.ZodLiteral<"failed">;
|
|
508
|
+
}, z.core.$strip>]>>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
494
509
|
generate: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodUnion<readonly [z.ZodObject<{
|
|
495
510
|
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
|
496
511
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -975,7 +990,7 @@ export declare const runtimeContract: {
|
|
|
975
990
|
binding: z.ZodString;
|
|
976
991
|
serviceId: z.ZodString;
|
|
977
992
|
}, z.core.$strict>, z.ZodObject<{
|
|
978
|
-
|
|
993
|
+
connectionMethodId: z.ZodString;
|
|
979
994
|
secret: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
980
995
|
serviceId: z.ZodString;
|
|
981
996
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -986,6 +1001,26 @@ export declare const runtimeContract: {
|
|
|
986
1001
|
}, z.core.$strip>;
|
|
987
1002
|
outputIndex: z.ZodNumber;
|
|
988
1003
|
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1004
|
+
sendLog: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1005
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>>>;
|
|
1006
|
+
level: z.ZodEnum<{
|
|
1007
|
+
error: "error";
|
|
1008
|
+
debug: "debug";
|
|
1009
|
+
info: "info";
|
|
1010
|
+
warn: "warn";
|
|
1011
|
+
}>;
|
|
1012
|
+
logIndex: z.ZodNumber;
|
|
1013
|
+
message: z.ZodString;
|
|
1014
|
+
spanIndex: z.ZodOptional<z.ZodNumber>;
|
|
1015
|
+
timestamp: z.ZodDate;
|
|
1016
|
+
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1017
|
+
startTraceSpan: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1018
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>>>;
|
|
1019
|
+
name: z.ZodString;
|
|
1020
|
+
parentSpanIndex: z.ZodOptional<z.ZodNumber>;
|
|
1021
|
+
spanIndex: z.ZodNumber;
|
|
1022
|
+
startedAt: z.ZodDate;
|
|
1023
|
+
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
989
1024
|
sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
990
1025
|
replyTo: z.ZodOptional<z.ZodEmail>;
|
|
991
1026
|
subject: z.ZodString;
|
package/dist/runtime.js
CHANGED
|
@@ -7,6 +7,12 @@ import { automationErrorSchema } from "./errors.js";
|
|
|
7
7
|
export const DEFAULT_GATEWAY_MODEL_ID = "openai/gpt-4.1-nano";
|
|
8
8
|
export const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default";
|
|
9
9
|
export const AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX = "__$";
|
|
10
|
+
export const AUTOMATION_LOG_MAX_ENTRIES = 1_000;
|
|
11
|
+
export const AUTOMATION_TRACE_MAX_SPANS = 250;
|
|
12
|
+
export const AUTOMATION_OBSERVABILITY_MAX_FIELDS = 64;
|
|
13
|
+
export const AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES = 64 * 1_024;
|
|
14
|
+
export const AUTOMATION_LOG_MAX_MESSAGE_LENGTH = 16_384;
|
|
15
|
+
export const AUTOMATION_TRACE_MAX_NAME_LENGTH = 256;
|
|
10
16
|
const OUTCOME_SEQUENCE_SCHEMA = z.number().int().positive();
|
|
11
17
|
const HOOK_SCOPE_PATH_SCHEMA = z
|
|
12
18
|
.number()
|
|
@@ -14,6 +20,19 @@ const HOOK_SCOPE_PATH_SCHEMA = z
|
|
|
14
20
|
.nonnegative()
|
|
15
21
|
.array()
|
|
16
22
|
.default([]);
|
|
23
|
+
const OBSERVABILITY_FIELDS_SCHEMA = z
|
|
24
|
+
.record(z.string().min(1).max(128), encodableSchema)
|
|
25
|
+
.refine((fields) => Object.keys(fields).length <= AUTOMATION_OBSERVABILITY_MAX_FIELDS, `Observability fields may contain at most ${AUTOMATION_OBSERVABILITY_MAX_FIELDS} entries.`);
|
|
26
|
+
const LOG_INDEX_SCHEMA = z
|
|
27
|
+
.number()
|
|
28
|
+
.int()
|
|
29
|
+
.min(0)
|
|
30
|
+
.max(AUTOMATION_LOG_MAX_ENTRIES - 1);
|
|
31
|
+
const TRACE_SPAN_INDEX_SCHEMA = z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.min(0)
|
|
35
|
+
.max(AUTOMATION_TRACE_MAX_SPANS - 1);
|
|
17
36
|
const AUTOMATION_INVOCATION_RUN_AT_SCHEMA = z.union([
|
|
18
37
|
z.date(),
|
|
19
38
|
z.string().min(1),
|
|
@@ -592,6 +611,20 @@ export const runtimeContract = {
|
|
|
592
611
|
}),
|
|
593
612
|
]))
|
|
594
613
|
.output(z.void()),
|
|
614
|
+
completeTraceSpan: oc
|
|
615
|
+
.input(z
|
|
616
|
+
.object({
|
|
617
|
+
completedAt: z.date(),
|
|
618
|
+
spanIndex: TRACE_SPAN_INDEX_SCHEMA,
|
|
619
|
+
})
|
|
620
|
+
.and(z.union([
|
|
621
|
+
z.object({ status: z.literal("succeeded") }),
|
|
622
|
+
z.object({
|
|
623
|
+
failure: automationErrorSchema,
|
|
624
|
+
status: z.literal("failed"),
|
|
625
|
+
}),
|
|
626
|
+
])))
|
|
627
|
+
.output(z.void()),
|
|
595
628
|
generate: oc
|
|
596
629
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
597
630
|
.output(generationResultSchema),
|
|
@@ -615,7 +648,7 @@ export const runtimeContract = {
|
|
|
615
648
|
serviceId: z.string().min(1),
|
|
616
649
|
}))
|
|
617
650
|
.output(z.object({
|
|
618
|
-
|
|
651
|
+
connectionMethodId: z.string().min(1),
|
|
619
652
|
secret: z.record(z.string(), z.unknown()),
|
|
620
653
|
serviceId: z.string(),
|
|
621
654
|
})),
|
|
@@ -628,6 +661,25 @@ export const runtimeContract = {
|
|
|
628
661
|
outputIndex: z.number().int().nonnegative(),
|
|
629
662
|
}))
|
|
630
663
|
.output(z.void()),
|
|
664
|
+
sendLog: oc
|
|
665
|
+
.input(z.object({
|
|
666
|
+
fields: OBSERVABILITY_FIELDS_SCHEMA.optional(),
|
|
667
|
+
level: z.enum(["debug", "info", "warn", "error"]),
|
|
668
|
+
logIndex: LOG_INDEX_SCHEMA,
|
|
669
|
+
message: z.string().min(1).max(AUTOMATION_LOG_MAX_MESSAGE_LENGTH),
|
|
670
|
+
spanIndex: TRACE_SPAN_INDEX_SCHEMA.optional(),
|
|
671
|
+
timestamp: z.date(),
|
|
672
|
+
}))
|
|
673
|
+
.output(z.void()),
|
|
674
|
+
startTraceSpan: oc
|
|
675
|
+
.input(z.object({
|
|
676
|
+
attributes: OBSERVABILITY_FIELDS_SCHEMA.optional(),
|
|
677
|
+
name: z.string().min(1).max(AUTOMATION_TRACE_MAX_NAME_LENGTH),
|
|
678
|
+
parentSpanIndex: TRACE_SPAN_INDEX_SCHEMA.optional(),
|
|
679
|
+
spanIndex: TRACE_SPAN_INDEX_SCHEMA,
|
|
680
|
+
startedAt: z.date(),
|
|
681
|
+
}))
|
|
682
|
+
.output(z.void()),
|
|
631
683
|
sendEmail: oc
|
|
632
684
|
.input(z
|
|
633
685
|
.object({
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
export declare const cursorPaginationInputSchema: z.ZodObject<{
|
|
3
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
4
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const cursorPageInfoSchema: z.ZodObject<{
|
|
7
|
+
hasMore: z.ZodBoolean;
|
|
8
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
/**
|
|
11
|
+
* Builds the common cursor-paginated collection response.
|
|
12
|
+
*
|
|
13
|
+
* @param itemSchema - Schema for one collection item.
|
|
14
|
+
*/
|
|
15
|
+
export declare function cursorPageOutputSchema<T extends z.ZodType>(itemSchema: T): z.ZodObject<{
|
|
16
|
+
items: z.ZodArray<T>;
|
|
17
|
+
pageInfo: z.ZodObject<{
|
|
18
|
+
hasMore: z.ZodBoolean;
|
|
19
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
}, z.core.$strip>;
|
|
2
22
|
export declare const reasonableNameSchema: z.ZodString;
|
package/dist/schemas.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
export const cursorPaginationInputSchema = z.object({
|
|
3
|
+
cursor: z.string().min(1).optional(),
|
|
4
|
+
limit: z.number().int().min(1).max(100).default(50),
|
|
5
|
+
});
|
|
6
|
+
export const cursorPageInfoSchema = z.object({
|
|
7
|
+
hasMore: z.boolean(),
|
|
8
|
+
nextCursor: z.string().nullable(),
|
|
9
|
+
});
|
|
10
|
+
/**
|
|
11
|
+
* Builds the common cursor-paginated collection response.
|
|
12
|
+
*
|
|
13
|
+
* @param itemSchema - Schema for one collection item.
|
|
14
|
+
*/
|
|
15
|
+
export function cursorPageOutputSchema(itemSchema) {
|
|
16
|
+
return z.object({
|
|
17
|
+
items: itemSchema.array(),
|
|
18
|
+
pageInfo: cursorPageInfoSchema,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
2
21
|
export const reasonableNameSchema = z.string().min(1).max(255).trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.77.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ai-sdk/gateway": "^4.0.46",
|
|
33
|
-
"@automate.ax/codec": "0.
|
|
33
|
+
"@automate.ax/codec": "0.77.0",
|
|
34
34
|
"@orpc/contract": "1.15.0",
|
|
35
35
|
"fast-json-stable-stringify": "^2.1.0",
|
|
36
36
|
"zod": "^4.3.6"
|