@automate.ax/api-contract 0.48.0 → 0.49.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 +3 -1
- package/dist/account.js +1 -1
- package/dist/index.d.ts +63 -12
- package/dist/index.js +1 -1
- package/dist/org.d.ts +5 -1
- package/dist/org.js +6 -3
- package/dist/project.d.ts +8 -2
- package/dist/project.js +7 -5
- package/dist/runtime.d.ts +48 -0
- package/dist/runtime.js +43 -0
- package/package.json +10 -4
- package/src/account.ts +1 -1
- package/src/index.ts +5 -0
- package/src/org.ts +8 -3
- package/src/project.ts +8 -5
- package/src/runtime.ts +47 -0
package/dist/account.d.ts
CHANGED
|
@@ -35,7 +35,9 @@ export declare const accountContract: {
|
|
|
35
35
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
36
36
|
accountId: z.ZodString;
|
|
37
37
|
organizationId: z.ZodString;
|
|
38
|
-
}, z.core.$strip>, z.
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
txid: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
39
41
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
40
42
|
organizationId: z.ZodString;
|
|
41
43
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/account.js
CHANGED
|
@@ -39,7 +39,7 @@ export const accountContract = {
|
|
|
39
39
|
accountId: z.string(),
|
|
40
40
|
organizationId: z.string(),
|
|
41
41
|
}))
|
|
42
|
-
.output(z.
|
|
42
|
+
.output(z.object({ txid: z.number().int().nonnegative() })),
|
|
43
43
|
get: oc.input(z.object({ organizationId: z.string() })).output(z.object({
|
|
44
44
|
accounts: integrationAccountOutputSchema.array(),
|
|
45
45
|
services: integrationServiceManifestSchema
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { automationExecutionStatusSchema } from "./automation.js";
|
|
2
2
|
export { AUTOMATION_SDK_VERSION, deploymentTriggerInfoSchema, type DeploymentTriggerInfo, } from "./deployment.js";
|
|
3
3
|
export { integrationAccountOutputSchema } from "./account.js";
|
|
4
|
-
export { DEFAULT_GATEWAY_MODEL_ID, generationInputSchema, generationResultSchema, runtimeContract, type GenerationInput, type GenerationResult, type RuntimeGenerationInput, } from "./runtime.js";
|
|
4
|
+
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, DEFAULT_GATEWAY_MODEL_ID, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, runtimeContract, type GenerationInput, type GenerationResult, type RuntimeGenerationInput, } from "./runtime.js";
|
|
5
5
|
export type { GatewayModelId } from "@ai-sdk/gateway";
|
|
6
6
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
7
7
|
export { integrationConnectionManifestSchema, integrationServiceManifestSchema, type IntegrationConnectionManifest, type IntegrationServiceManifest, } from "./authorization.js";
|
|
@@ -54,6 +54,7 @@ export declare const publicContract: {
|
|
|
54
54
|
};
|
|
55
55
|
org: {
|
|
56
56
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
57
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
58
|
name: import("zod").ZodString;
|
|
58
59
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
59
60
|
id: import("zod").ZodString;
|
|
@@ -61,7 +62,9 @@ export declare const publicContract: {
|
|
|
61
62
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
62
63
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
63
64
|
organizationId: import("zod").ZodString;
|
|
64
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
65
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
66
|
+
txid: import("zod").ZodNumber;
|
|
67
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
65
68
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
66
69
|
organizationId: import("zod").ZodString;
|
|
67
70
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -141,6 +144,7 @@ export declare const publicContract: {
|
|
|
141
144
|
}, import("zod/v4/core").$strip>>;
|
|
142
145
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
143
146
|
invite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
147
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
144
148
|
organizationId: import("zod").ZodString;
|
|
145
149
|
email: import("zod").ZodEmail;
|
|
146
150
|
role: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
@@ -213,6 +217,7 @@ export declare const publicContract: {
|
|
|
213
217
|
};
|
|
214
218
|
project: {
|
|
215
219
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
220
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
216
221
|
organizationId: import("zod").ZodString;
|
|
217
222
|
name: import("zod").ZodString;
|
|
218
223
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -231,10 +236,13 @@ export declare const publicContract: {
|
|
|
231
236
|
id: import("zod").ZodString;
|
|
232
237
|
identityKey: import("zod").ZodString;
|
|
233
238
|
}, import("zod/v4/core").$strip>>;
|
|
239
|
+
txid: import("zod").ZodNumber;
|
|
234
240
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
235
241
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
236
242
|
projectId: import("zod").ZodString;
|
|
237
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
243
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
244
|
+
txid: import("zod").ZodNumber;
|
|
245
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
238
246
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
239
247
|
projectId: import("zod").ZodString;
|
|
240
248
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -277,7 +285,9 @@ export declare const publicContract: {
|
|
|
277
285
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
278
286
|
projectId: import("zod").ZodString;
|
|
279
287
|
name: import("zod").ZodString;
|
|
280
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
288
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
289
|
+
txid: import("zod").ZodNumber;
|
|
290
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
281
291
|
};
|
|
282
292
|
session: {
|
|
283
293
|
me: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
@@ -316,7 +326,9 @@ export declare const firstPartyContract: {
|
|
|
316
326
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
317
327
|
accountId: import("zod").ZodString;
|
|
318
328
|
organizationId: import("zod").ZodString;
|
|
319
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
329
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
330
|
+
txid: import("zod").ZodNumber;
|
|
331
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
320
332
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
321
333
|
organizationId: import("zod").ZodString;
|
|
322
334
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -719,6 +731,7 @@ export declare const firstPartyContract: {
|
|
|
719
731
|
code: import("zod").ZodString;
|
|
720
732
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
721
733
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
734
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
722
735
|
name: import("zod").ZodString;
|
|
723
736
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
724
737
|
id: import("zod").ZodString;
|
|
@@ -726,7 +739,9 @@ export declare const firstPartyContract: {
|
|
|
726
739
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
727
740
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
728
741
|
organizationId: import("zod").ZodString;
|
|
729
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
742
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
743
|
+
txid: import("zod").ZodNumber;
|
|
744
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
730
745
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
731
746
|
organizationId: import("zod").ZodString;
|
|
732
747
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -806,6 +821,7 @@ export declare const firstPartyContract: {
|
|
|
806
821
|
}, import("zod/v4/core").$strip>>;
|
|
807
822
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
808
823
|
invite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
824
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
809
825
|
organizationId: import("zod").ZodString;
|
|
810
826
|
email: import("zod").ZodEmail;
|
|
811
827
|
role: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
@@ -881,6 +897,7 @@ export declare const firstPartyContract: {
|
|
|
881
897
|
organizationId: import("zod").ZodString;
|
|
882
898
|
}, import("zod/v4/core").$strip>, import("zod").ZodBoolean, Record<never, never>, Record<never, never>>;
|
|
883
899
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
900
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
884
901
|
organizationId: import("zod").ZodString;
|
|
885
902
|
name: import("zod").ZodString;
|
|
886
903
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -899,10 +916,13 @@ export declare const firstPartyContract: {
|
|
|
899
916
|
id: import("zod").ZodString;
|
|
900
917
|
identityKey: import("zod").ZodString;
|
|
901
918
|
}, import("zod/v4/core").$strip>>;
|
|
919
|
+
txid: import("zod").ZodNumber;
|
|
902
920
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
903
921
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
904
922
|
projectId: import("zod").ZodString;
|
|
905
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
923
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
924
|
+
txid: import("zod").ZodNumber;
|
|
925
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
906
926
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
907
927
|
projectId: import("zod").ZodString;
|
|
908
928
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -945,7 +965,9 @@ export declare const firstPartyContract: {
|
|
|
945
965
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
946
966
|
projectId: import("zod").ZodString;
|
|
947
967
|
name: import("zod").ZodString;
|
|
948
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
968
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
969
|
+
txid: import("zod").ZodNumber;
|
|
970
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
949
971
|
};
|
|
950
972
|
session: {
|
|
951
973
|
me: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
@@ -1415,6 +1437,23 @@ export declare const contract: {
|
|
|
1415
1437
|
type: import("zod").ZodLiteral<"other">;
|
|
1416
1438
|
}, import("zod/v4/core").$strip>], "type">>>;
|
|
1417
1439
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1440
|
+
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1441
|
+
automationName: import("zod").ZodString;
|
|
1442
|
+
entrypoint: import("zod").ZodDefault<import("zod").ZodString>;
|
|
1443
|
+
payload: import("zod").ZodOptional<import("zod").ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
1444
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
1445
|
+
runAt: import("zod").ZodUnion<readonly [import("zod").ZodDate, import("zod").ZodString, import("zod").ZodNumber]>;
|
|
1446
|
+
runIn: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
1447
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1448
|
+
runAt: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
1449
|
+
runIn: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
1450
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1451
|
+
runAt: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
1452
|
+
runIn: import("zod").ZodOptional<import("zod").ZodNever>;
|
|
1453
|
+
}, import("zod/v4/core").$strip>]>>, import("zod").ZodObject<{
|
|
1454
|
+
id: import("zod").ZodString;
|
|
1455
|
+
runAt: import("zod").ZodDate;
|
|
1456
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1418
1457
|
load: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
1419
1458
|
context: import("zod").ZodObject<{
|
|
1420
1459
|
actions: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
@@ -1735,7 +1774,9 @@ export declare const contract: {
|
|
|
1735
1774
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1736
1775
|
accountId: import("zod").ZodString;
|
|
1737
1776
|
organizationId: import("zod").ZodString;
|
|
1738
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
1777
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1778
|
+
txid: import("zod").ZodNumber;
|
|
1779
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1739
1780
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1740
1781
|
organizationId: import("zod").ZodString;
|
|
1741
1782
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -2030,6 +2071,7 @@ export declare const contract: {
|
|
|
2030
2071
|
code: import("zod").ZodString;
|
|
2031
2072
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
2032
2073
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2074
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2033
2075
|
name: import("zod").ZodString;
|
|
2034
2076
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2035
2077
|
id: import("zod").ZodString;
|
|
@@ -2037,7 +2079,9 @@ export declare const contract: {
|
|
|
2037
2079
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2038
2080
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2039
2081
|
organizationId: import("zod").ZodString;
|
|
2040
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
2082
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2083
|
+
txid: import("zod").ZodNumber;
|
|
2084
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2041
2085
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2042
2086
|
organizationId: import("zod").ZodString;
|
|
2043
2087
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -2117,6 +2161,7 @@ export declare const contract: {
|
|
|
2117
2161
|
}, import("zod/v4/core").$strip>>;
|
|
2118
2162
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2119
2163
|
invite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2164
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2120
2165
|
organizationId: import("zod").ZodString;
|
|
2121
2166
|
email: import("zod").ZodEmail;
|
|
2122
2167
|
role: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
@@ -2192,6 +2237,7 @@ export declare const contract: {
|
|
|
2192
2237
|
organizationId: import("zod").ZodString;
|
|
2193
2238
|
}, import("zod/v4/core").$strip>, import("zod").ZodBoolean, Record<never, never>, Record<never, never>>;
|
|
2194
2239
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2240
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2195
2241
|
organizationId: import("zod").ZodString;
|
|
2196
2242
|
name: import("zod").ZodString;
|
|
2197
2243
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -2210,10 +2256,13 @@ export declare const contract: {
|
|
|
2210
2256
|
id: import("zod").ZodString;
|
|
2211
2257
|
identityKey: import("zod").ZodString;
|
|
2212
2258
|
}, import("zod/v4/core").$strip>>;
|
|
2259
|
+
txid: import("zod").ZodNumber;
|
|
2213
2260
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2214
2261
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2215
2262
|
projectId: import("zod").ZodString;
|
|
2216
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
2263
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2264
|
+
txid: import("zod").ZodNumber;
|
|
2265
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2217
2266
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2218
2267
|
projectId: import("zod").ZodString;
|
|
2219
2268
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -2256,7 +2305,9 @@ export declare const contract: {
|
|
|
2256
2305
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2257
2306
|
projectId: import("zod").ZodString;
|
|
2258
2307
|
name: import("zod").ZodString;
|
|
2259
|
-
}, import("zod/v4/core").$strip>, import("zod").
|
|
2308
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2309
|
+
txid: import("zod").ZodNumber;
|
|
2310
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2260
2311
|
};
|
|
2261
2312
|
session: {
|
|
2262
2313
|
me: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { runtimeContract } from "./runtime.js";
|
|
|
11
11
|
export { automationExecutionStatusSchema } from "./automation.js";
|
|
12
12
|
export { AUTOMATION_SDK_VERSION, deploymentTriggerInfoSchema, } from "./deployment.js";
|
|
13
13
|
export { integrationAccountOutputSchema } from "./account.js";
|
|
14
|
-
export { DEFAULT_GATEWAY_MODEL_ID, generationInputSchema, generationResultSchema, runtimeContract, } from "./runtime.js";
|
|
14
|
+
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, DEFAULT_GATEWAY_MODEL_ID, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, runtimeContract, } from "./runtime.js";
|
|
15
15
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
16
16
|
export { integrationConnectionManifestSchema, integrationServiceManifestSchema, } from "./authorization.js";
|
|
17
17
|
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationPhoneNumberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
package/dist/org.d.ts
CHANGED
|
@@ -192,6 +192,7 @@ export declare const orgContract: {
|
|
|
192
192
|
url: z.ZodURL;
|
|
193
193
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
194
194
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
195
|
+
id: z.ZodOptional<z.ZodString>;
|
|
195
196
|
name: z.ZodString;
|
|
196
197
|
}, z.core.$strip>, z.ZodObject<{
|
|
197
198
|
id: z.ZodString;
|
|
@@ -199,7 +200,9 @@ export declare const orgContract: {
|
|
|
199
200
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
200
201
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
201
202
|
organizationId: z.ZodString;
|
|
202
|
-
}, z.core.$strip>, z.
|
|
203
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
204
|
+
txid: z.ZodNumber;
|
|
205
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
203
206
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
204
207
|
organizationId: z.ZodString;
|
|
205
208
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -279,6 +282,7 @@ export declare const orgContract: {
|
|
|
279
282
|
}, z.core.$strip>>;
|
|
280
283
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
281
284
|
invite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
285
|
+
id: z.ZodOptional<z.ZodString>;
|
|
282
286
|
organizationId: z.ZodString;
|
|
283
287
|
email: z.ZodEmail;
|
|
284
288
|
role: z.ZodDefault<z.ZodEnum<{
|
package/dist/org.js
CHANGED
|
@@ -100,7 +100,10 @@ export const orgContract = {
|
|
|
100
100
|
successDescription: "Organization created.",
|
|
101
101
|
tags: ["Organizations"],
|
|
102
102
|
})
|
|
103
|
-
.input(z.object({
|
|
103
|
+
.input(z.object({
|
|
104
|
+
id: z.string().optional(),
|
|
105
|
+
name: reasonableNameSchema,
|
|
106
|
+
}))
|
|
104
107
|
.output(publicOrganizationOutputSchema),
|
|
105
108
|
delete: oc
|
|
106
109
|
.route({
|
|
@@ -110,10 +113,9 @@ export const orgContract = {
|
|
|
110
113
|
summary: "Delete organization",
|
|
111
114
|
description: "Deletes an organization and cancels its billing. Requires organization:delete.",
|
|
112
115
|
tags: ["Organizations"],
|
|
113
|
-
successStatus: 204,
|
|
114
116
|
})
|
|
115
117
|
.input(z.object({ organizationId: z.string() }))
|
|
116
|
-
.output(z.
|
|
118
|
+
.output(z.object({ txid: z.number().int().nonnegative() })),
|
|
117
119
|
get: oc
|
|
118
120
|
.route({
|
|
119
121
|
method: "GET",
|
|
@@ -137,6 +139,7 @@ export const orgContract = {
|
|
|
137
139
|
tags: ["Organizations"],
|
|
138
140
|
})
|
|
139
141
|
.input(z.object({
|
|
142
|
+
id: z.string().optional(),
|
|
140
143
|
organizationId: z.string(),
|
|
141
144
|
email: z.email(),
|
|
142
145
|
role: organizationRoleSchema.default("member"),
|
package/dist/project.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const projectContract: {
|
|
|
21
21
|
organizationId: z.ZodString;
|
|
22
22
|
}, z.core.$strip>, z.ZodBoolean, Record<never, never>, Record<never, never>>;
|
|
23
23
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
24
|
+
id: z.ZodOptional<z.ZodString>;
|
|
24
25
|
organizationId: z.ZodString;
|
|
25
26
|
name: z.ZodString;
|
|
26
27
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -39,6 +40,7 @@ export declare const projectContract: {
|
|
|
39
40
|
id: z.ZodString;
|
|
40
41
|
identityKey: z.ZodString;
|
|
41
42
|
}, z.core.$strip>>;
|
|
43
|
+
txid: z.ZodNumber;
|
|
42
44
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
43
45
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{
|
|
44
46
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
@@ -82,8 +84,12 @@ export declare const projectContract: {
|
|
|
82
84
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
83
85
|
projectId: z.ZodString;
|
|
84
86
|
name: z.ZodString;
|
|
85
|
-
}, z.core.$strip>, z.
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
+
txid: z.ZodNumber;
|
|
89
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
86
90
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
87
91
|
projectId: z.ZodString;
|
|
88
|
-
}, z.core.$strip>, z.
|
|
92
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
|
+
txid: z.ZodNumber;
|
|
94
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
89
95
|
};
|
package/dist/project.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { reasonableNameSchema } from "./schemas.js";
|
|
4
|
+
const TRANSACTION_OUTPUT_SCHEMA = z.object({
|
|
5
|
+
txid: z.number().int().nonnegative(),
|
|
6
|
+
});
|
|
4
7
|
export const projectOutputSchema = z.object({
|
|
5
8
|
activeDeploymentId: z.string().nullable(),
|
|
6
9
|
id: z.string(),
|
|
@@ -36,10 +39,11 @@ export const projectContract = {
|
|
|
36
39
|
tags: ["Projects"],
|
|
37
40
|
})
|
|
38
41
|
.input(z.object({
|
|
42
|
+
id: z.string().optional(),
|
|
39
43
|
organizationId: z.string(),
|
|
40
44
|
name: reasonableNameSchema,
|
|
41
45
|
}))
|
|
42
|
-
.output(projectOutputSchema),
|
|
46
|
+
.output(projectOutputSchema.extend(TRANSACTION_OUTPUT_SCHEMA.shape)),
|
|
43
47
|
list: oc
|
|
44
48
|
.route({
|
|
45
49
|
method: "GET",
|
|
@@ -74,14 +78,13 @@ export const projectContract = {
|
|
|
74
78
|
operationId: "updateProject",
|
|
75
79
|
summary: "Update project",
|
|
76
80
|
description: "Updates project fields. Requires project:update.",
|
|
77
|
-
successStatus: 204,
|
|
78
81
|
tags: ["Projects"],
|
|
79
82
|
})
|
|
80
83
|
.input(z.object({
|
|
81
84
|
projectId: z.string(),
|
|
82
85
|
name: reasonableNameSchema,
|
|
83
86
|
}))
|
|
84
|
-
.output(
|
|
87
|
+
.output(TRANSACTION_OUTPUT_SCHEMA),
|
|
85
88
|
delete: oc
|
|
86
89
|
.route({
|
|
87
90
|
method: "DELETE",
|
|
@@ -90,8 +93,7 @@ export const projectContract = {
|
|
|
90
93
|
summary: "Delete project",
|
|
91
94
|
description: "Deletes a project. Requires project:delete.",
|
|
92
95
|
tags: ["Projects"],
|
|
93
|
-
successStatus: 204,
|
|
94
96
|
})
|
|
95
97
|
.input(z.object({ projectId: z.string() }))
|
|
96
|
-
.output(
|
|
98
|
+
.output(TRANSACTION_OUTPUT_SCHEMA),
|
|
97
99
|
};
|
package/dist/runtime.d.ts
CHANGED
|
@@ -2,6 +2,37 @@ import type { GatewayModelId } from "@ai-sdk/gateway";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
/** Default model used by the platform Vercel AI Gateway account. */
|
|
4
4
|
export declare const DEFAULT_GATEWAY_MODEL_ID = "openai/gpt-4.1-nano";
|
|
5
|
+
export declare const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default";
|
|
6
|
+
export declare const AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX = "__$";
|
|
7
|
+
/** Immediate or mutually exclusive absolute/relative invocation timing. */
|
|
8
|
+
export declare const automationInvocationScheduleSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
9
|
+
runAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString, z.ZodNumber]>;
|
|
10
|
+
runIn: z.ZodOptional<z.ZodNever>;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
runAt: z.ZodOptional<z.ZodNever>;
|
|
13
|
+
runIn: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
runAt: z.ZodOptional<z.ZodNever>;
|
|
16
|
+
runIn: z.ZodOptional<z.ZodNever>;
|
|
17
|
+
}, z.core.$strip>]>;
|
|
18
|
+
export declare const automationInvocationOutputSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
runAt: z.ZodDate;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const automationInvocationInputSchema: z.ZodIntersection<z.ZodObject<{
|
|
23
|
+
automationName: z.ZodString;
|
|
24
|
+
entrypoint: z.ZodDefault<z.ZodString>;
|
|
25
|
+
payload: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
26
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
27
|
+
runAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString, z.ZodNumber]>;
|
|
28
|
+
runIn: z.ZodOptional<z.ZodNever>;
|
|
29
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
30
|
+
runAt: z.ZodOptional<z.ZodNever>;
|
|
31
|
+
runIn: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
+
runAt: z.ZodOptional<z.ZodNever>;
|
|
34
|
+
runIn: z.ZodOptional<z.ZodNever>;
|
|
35
|
+
}, z.core.$strip>]>>;
|
|
5
36
|
/** Shared text-generation options accepted by the built-in generate action. */
|
|
6
37
|
export declare const generationInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
7
38
|
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
|
@@ -348,6 +379,23 @@ export declare const runtimeContract: {
|
|
|
348
379
|
type: z.ZodLiteral<"other">;
|
|
349
380
|
}, z.core.$strip>], "type">>>;
|
|
350
381
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
382
|
+
invokeAutomation: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
383
|
+
automationName: z.ZodString;
|
|
384
|
+
entrypoint: z.ZodDefault<z.ZodString>;
|
|
385
|
+
payload: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
|
|
386
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
387
|
+
runAt: z.ZodUnion<readonly [z.ZodDate, z.ZodString, z.ZodNumber]>;
|
|
388
|
+
runIn: z.ZodOptional<z.ZodNever>;
|
|
389
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
390
|
+
runAt: z.ZodOptional<z.ZodNever>;
|
|
391
|
+
runIn: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
392
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
393
|
+
runAt: z.ZodOptional<z.ZodNever>;
|
|
394
|
+
runIn: z.ZodOptional<z.ZodNever>;
|
|
395
|
+
}, z.core.$strip>]>>, z.ZodObject<{
|
|
396
|
+
id: z.ZodString;
|
|
397
|
+
runAt: z.ZodDate;
|
|
398
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
351
399
|
load: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
352
400
|
context: z.ZodObject<{
|
|
353
401
|
actions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
package/dist/runtime.js
CHANGED
|
@@ -4,11 +4,51 @@ import { z } from "zod";
|
|
|
4
4
|
import { e164PhoneNumberSchema } from "./schemas.js";
|
|
5
5
|
/** Default model used by the platform Vercel AI Gateway account. */
|
|
6
6
|
export const DEFAULT_GATEWAY_MODEL_ID = "openai/gpt-4.1-nano";
|
|
7
|
+
export const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default";
|
|
8
|
+
export const AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX = "__$";
|
|
7
9
|
const SIGNAL_FAILURE_SCHEMA = z.object({
|
|
8
10
|
message: z.string(),
|
|
9
11
|
name: z.string(),
|
|
10
12
|
});
|
|
11
13
|
const OUTCOME_SEQUENCE_SCHEMA = z.number().int().positive();
|
|
14
|
+
const AUTOMATION_INVOCATION_RUN_AT_SCHEMA = z.union([
|
|
15
|
+
z.date(),
|
|
16
|
+
z.string().min(1),
|
|
17
|
+
z.number(),
|
|
18
|
+
]);
|
|
19
|
+
const AUTOMATION_INVOCATION_RUN_IN_SCHEMA = z.union([
|
|
20
|
+
z.string().min(1),
|
|
21
|
+
z.number().nonnegative(),
|
|
22
|
+
]);
|
|
23
|
+
/** Immediate or mutually exclusive absolute/relative invocation timing. */
|
|
24
|
+
export const automationInvocationScheduleSchema = z.union([
|
|
25
|
+
z.object({
|
|
26
|
+
runAt: AUTOMATION_INVOCATION_RUN_AT_SCHEMA,
|
|
27
|
+
runIn: z.never().optional(),
|
|
28
|
+
}),
|
|
29
|
+
z.object({
|
|
30
|
+
runAt: z.never().optional(),
|
|
31
|
+
runIn: AUTOMATION_INVOCATION_RUN_IN_SCHEMA,
|
|
32
|
+
}),
|
|
33
|
+
z.object({
|
|
34
|
+
runAt: z.never().optional(),
|
|
35
|
+
runIn: z.never().optional(),
|
|
36
|
+
}),
|
|
37
|
+
]);
|
|
38
|
+
export const automationInvocationOutputSchema = z.object({
|
|
39
|
+
id: z.string(),
|
|
40
|
+
runAt: z.date(),
|
|
41
|
+
});
|
|
42
|
+
export const automationInvocationInputSchema = z
|
|
43
|
+
.object({
|
|
44
|
+
automationName: z.string().min(1),
|
|
45
|
+
entrypoint: z
|
|
46
|
+
.string()
|
|
47
|
+
.min(1)
|
|
48
|
+
.default(AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT),
|
|
49
|
+
payload: encodableSchema,
|
|
50
|
+
})
|
|
51
|
+
.and(automationInvocationScheduleSchema);
|
|
12
52
|
const ACTION_INVOCATION_BASE_SCHEMA = z.object({
|
|
13
53
|
actionDependencyIds: z.string().array(),
|
|
14
54
|
description: z.string().nullable(),
|
|
@@ -337,6 +377,9 @@ export const runtimeContract = {
|
|
|
337
377
|
generate: oc
|
|
338
378
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
339
379
|
.output(generationResultSchema),
|
|
380
|
+
invokeAutomation: oc
|
|
381
|
+
.input(automationInvocationInputSchema)
|
|
382
|
+
.output(automationInvocationOutputSchema),
|
|
340
383
|
load: oc.output(z.object({
|
|
341
384
|
context: RUNTIME_RUN_CONTEXT_SCHEMA,
|
|
342
385
|
finalAttempt: z.boolean(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"zshy": {
|
|
20
20
|
"exports": {
|
|
21
|
-
".": "./src/index.ts"
|
|
21
|
+
".": "./src/index.ts",
|
|
22
|
+
"./permissions": "./src/permissions.ts"
|
|
22
23
|
},
|
|
23
24
|
"cjs": false,
|
|
24
25
|
"conditions": {
|
|
@@ -27,8 +28,8 @@
|
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@ai-sdk/gateway": "^4.0.46",
|
|
30
|
-
"@automate.ax/codec": "0.
|
|
31
|
-
"@orpc/contract": "1.
|
|
31
|
+
"@automate.ax/codec": "0.49.0",
|
|
32
|
+
"@orpc/contract": "1.15.0",
|
|
32
33
|
"zod": "^4.3.6"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
@@ -67,6 +68,11 @@
|
|
|
67
68
|
"bun": "./src/index.ts",
|
|
68
69
|
"types": "./dist/index.d.ts",
|
|
69
70
|
"default": "./dist/index.js"
|
|
71
|
+
},
|
|
72
|
+
"./permissions": {
|
|
73
|
+
"bun": "./src/permissions.ts",
|
|
74
|
+
"types": "./dist/permissions.d.ts",
|
|
75
|
+
"default": "./dist/permissions.js"
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
78
|
}
|
package/src/account.ts
CHANGED
|
@@ -49,7 +49,7 @@ export const accountContract = {
|
|
|
49
49
|
organizationId: z.string(),
|
|
50
50
|
}),
|
|
51
51
|
)
|
|
52
|
-
.output(z.
|
|
52
|
+
.output(z.object({ txid: z.number().int().nonnegative() })),
|
|
53
53
|
get: oc.input(z.object({ organizationId: z.string() })).output(
|
|
54
54
|
z.object({
|
|
55
55
|
accounts: integrationAccountOutputSchema.array(),
|
package/src/index.ts
CHANGED
|
@@ -17,7 +17,12 @@ export {
|
|
|
17
17
|
} from "./deployment"
|
|
18
18
|
export { integrationAccountOutputSchema } from "./account"
|
|
19
19
|
export {
|
|
20
|
+
AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT,
|
|
21
|
+
AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX,
|
|
20
22
|
DEFAULT_GATEWAY_MODEL_ID,
|
|
23
|
+
automationInvocationInputSchema,
|
|
24
|
+
automationInvocationOutputSchema,
|
|
25
|
+
automationInvocationScheduleSchema,
|
|
21
26
|
generationInputSchema,
|
|
22
27
|
generationResultSchema,
|
|
23
28
|
runtimeContract,
|
package/src/org.ts
CHANGED
|
@@ -112,7 +112,12 @@ export const orgContract = {
|
|
|
112
112
|
successDescription: "Organization created.",
|
|
113
113
|
tags: ["Organizations"],
|
|
114
114
|
})
|
|
115
|
-
.input(
|
|
115
|
+
.input(
|
|
116
|
+
z.object({
|
|
117
|
+
id: z.string().optional(),
|
|
118
|
+
name: reasonableNameSchema,
|
|
119
|
+
}),
|
|
120
|
+
)
|
|
116
121
|
.output(publicOrganizationOutputSchema),
|
|
117
122
|
delete: oc
|
|
118
123
|
.route({
|
|
@@ -123,10 +128,9 @@ export const orgContract = {
|
|
|
123
128
|
description:
|
|
124
129
|
"Deletes an organization and cancels its billing. Requires organization:delete.",
|
|
125
130
|
tags: ["Organizations"],
|
|
126
|
-
successStatus: 204,
|
|
127
131
|
})
|
|
128
132
|
.input(z.object({ organizationId: z.string() }))
|
|
129
|
-
.output(z.
|
|
133
|
+
.output(z.object({ txid: z.number().int().nonnegative() })),
|
|
130
134
|
get: oc
|
|
131
135
|
.route({
|
|
132
136
|
method: "GET",
|
|
@@ -153,6 +157,7 @@ export const orgContract = {
|
|
|
153
157
|
})
|
|
154
158
|
.input(
|
|
155
159
|
z.object({
|
|
160
|
+
id: z.string().optional(),
|
|
156
161
|
organizationId: z.string(),
|
|
157
162
|
email: z.email(),
|
|
158
163
|
role: organizationRoleSchema.default("member"),
|
package/src/project.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { oc } from "@orpc/contract"
|
|
|
2
2
|
import { z } from "zod"
|
|
3
3
|
import { reasonableNameSchema } from "./schemas"
|
|
4
4
|
|
|
5
|
+
const TRANSACTION_OUTPUT_SCHEMA = z.object({
|
|
6
|
+
txid: z.number().int().nonnegative(),
|
|
7
|
+
})
|
|
8
|
+
|
|
5
9
|
export const projectOutputSchema = z.object({
|
|
6
10
|
activeDeploymentId: z.string().nullable(),
|
|
7
11
|
id: z.string(),
|
|
@@ -40,11 +44,12 @@ export const projectContract = {
|
|
|
40
44
|
})
|
|
41
45
|
.input(
|
|
42
46
|
z.object({
|
|
47
|
+
id: z.string().optional(),
|
|
43
48
|
organizationId: z.string(),
|
|
44
49
|
name: reasonableNameSchema,
|
|
45
50
|
}),
|
|
46
51
|
)
|
|
47
|
-
.output(projectOutputSchema),
|
|
52
|
+
.output(projectOutputSchema.extend(TRANSACTION_OUTPUT_SCHEMA.shape)),
|
|
48
53
|
list: oc
|
|
49
54
|
.route({
|
|
50
55
|
method: "GET",
|
|
@@ -83,7 +88,6 @@ export const projectContract = {
|
|
|
83
88
|
operationId: "updateProject",
|
|
84
89
|
summary: "Update project",
|
|
85
90
|
description: "Updates project fields. Requires project:update.",
|
|
86
|
-
successStatus: 204,
|
|
87
91
|
tags: ["Projects"],
|
|
88
92
|
})
|
|
89
93
|
.input(
|
|
@@ -92,7 +96,7 @@ export const projectContract = {
|
|
|
92
96
|
name: reasonableNameSchema,
|
|
93
97
|
}),
|
|
94
98
|
)
|
|
95
|
-
.output(
|
|
99
|
+
.output(TRANSACTION_OUTPUT_SCHEMA),
|
|
96
100
|
delete: oc
|
|
97
101
|
.route({
|
|
98
102
|
method: "DELETE",
|
|
@@ -101,8 +105,7 @@ export const projectContract = {
|
|
|
101
105
|
summary: "Delete project",
|
|
102
106
|
description: "Deletes a project. Requires project:delete.",
|
|
103
107
|
tags: ["Projects"],
|
|
104
|
-
successStatus: 204,
|
|
105
108
|
})
|
|
106
109
|
.input(z.object({ projectId: z.string() }))
|
|
107
|
-
.output(
|
|
110
|
+
.output(TRANSACTION_OUTPUT_SCHEMA),
|
|
108
111
|
}
|
package/src/runtime.ts
CHANGED
|
@@ -7,6 +7,8 @@ import { e164PhoneNumberSchema } from "./schemas"
|
|
|
7
7
|
/** Default model used by the platform Vercel AI Gateway account. */
|
|
8
8
|
export const DEFAULT_GATEWAY_MODEL_ID =
|
|
9
9
|
"openai/gpt-4.1-nano" satisfies GatewayModelId
|
|
10
|
+
export const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default"
|
|
11
|
+
export const AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX = "__$"
|
|
10
12
|
|
|
11
13
|
const SIGNAL_FAILURE_SCHEMA = z.object({
|
|
12
14
|
message: z.string(),
|
|
@@ -15,6 +17,48 @@ const SIGNAL_FAILURE_SCHEMA = z.object({
|
|
|
15
17
|
|
|
16
18
|
const OUTCOME_SEQUENCE_SCHEMA = z.number().int().positive()
|
|
17
19
|
|
|
20
|
+
const AUTOMATION_INVOCATION_RUN_AT_SCHEMA = z.union([
|
|
21
|
+
z.date(),
|
|
22
|
+
z.string().min(1),
|
|
23
|
+
z.number(),
|
|
24
|
+
])
|
|
25
|
+
const AUTOMATION_INVOCATION_RUN_IN_SCHEMA = z.union([
|
|
26
|
+
z.string().min(1),
|
|
27
|
+
z.number().nonnegative(),
|
|
28
|
+
])
|
|
29
|
+
|
|
30
|
+
/** Immediate or mutually exclusive absolute/relative invocation timing. */
|
|
31
|
+
export const automationInvocationScheduleSchema = z.union([
|
|
32
|
+
z.object({
|
|
33
|
+
runAt: AUTOMATION_INVOCATION_RUN_AT_SCHEMA,
|
|
34
|
+
runIn: z.never().optional(),
|
|
35
|
+
}),
|
|
36
|
+
z.object({
|
|
37
|
+
runAt: z.never().optional(),
|
|
38
|
+
runIn: AUTOMATION_INVOCATION_RUN_IN_SCHEMA,
|
|
39
|
+
}),
|
|
40
|
+
z.object({
|
|
41
|
+
runAt: z.never().optional(),
|
|
42
|
+
runIn: z.never().optional(),
|
|
43
|
+
}),
|
|
44
|
+
])
|
|
45
|
+
|
|
46
|
+
export const automationInvocationOutputSchema = z.object({
|
|
47
|
+
id: z.string(),
|
|
48
|
+
runAt: z.date(),
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
export const automationInvocationInputSchema = z
|
|
52
|
+
.object({
|
|
53
|
+
automationName: z.string().min(1),
|
|
54
|
+
entrypoint: z
|
|
55
|
+
.string()
|
|
56
|
+
.min(1)
|
|
57
|
+
.default(AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT),
|
|
58
|
+
payload: encodableSchema,
|
|
59
|
+
})
|
|
60
|
+
.and(automationInvocationScheduleSchema)
|
|
61
|
+
|
|
18
62
|
const ACTION_INVOCATION_BASE_SCHEMA = z.object({
|
|
19
63
|
actionDependencyIds: z.string().array(),
|
|
20
64
|
description: z.string().nullable(),
|
|
@@ -383,6 +427,9 @@ export const runtimeContract = {
|
|
|
383
427
|
generate: oc
|
|
384
428
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
385
429
|
.output(generationResultSchema),
|
|
430
|
+
invokeAutomation: oc
|
|
431
|
+
.input(automationInvocationInputSchema)
|
|
432
|
+
.output(automationInvocationOutputSchema),
|
|
386
433
|
load: oc.output(
|
|
387
434
|
z.object({
|
|
388
435
|
context: RUNTIME_RUN_CONTEXT_SCHEMA,
|