@automate.ax/api-contract 0.20.0 → 0.21.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/deployment.d.ts +0 -4
- package/dist/deployment.js +0 -4
- package/dist/index.d.ts +60 -9
- package/dist/index.js +3 -1
- package/dist/org.d.ts +10 -0
- package/dist/org.js +7 -1
- package/dist/project.d.ts +17 -7
- package/dist/project.js +8 -10
- package/package.json +2 -2
- package/src/deployment.ts +0 -4
- package/src/index.ts +3 -4
- package/src/org.ts +7 -1
- package/src/project.ts +8 -13
package/dist/deployment.d.ts
CHANGED
|
@@ -47,10 +47,6 @@ export declare const deploymentContract: {
|
|
|
47
47
|
maxAttempts: z.ZodNumber;
|
|
48
48
|
nextRunAt: z.ZodDate;
|
|
49
49
|
}, z.core.$strip>>;
|
|
50
|
-
planningProgress: z.ZodObject<{
|
|
51
|
-
completed: z.ZodNumber;
|
|
52
|
-
total: z.ZodNumber;
|
|
53
|
-
}, z.core.$strip>;
|
|
54
50
|
project: z.ZodObject<{
|
|
55
51
|
id: z.ZodString;
|
|
56
52
|
name: z.ZodString;
|
package/dist/deployment.js
CHANGED
|
@@ -60,10 +60,6 @@ export const deploymentContract = {
|
|
|
60
60
|
nextRunAt: z.date(),
|
|
61
61
|
})
|
|
62
62
|
.nullable(),
|
|
63
|
-
planningProgress: z.object({
|
|
64
|
-
completed: z.number().int().nonnegative(),
|
|
65
|
-
total: z.number().int().nonnegative(),
|
|
66
|
-
}),
|
|
67
63
|
project: z.object({
|
|
68
64
|
id: z.string(),
|
|
69
65
|
name: z.string(),
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { runtimeContract } from "./runtime.js";
|
|
|
3
3
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
4
4
|
export { integrationConnectionManifestSchema, integrationServiceManifestSchema, type IntegrationConnectionManifest, type IntegrationServiceManifest, } from "./authorization.js";
|
|
5
5
|
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
6
|
-
export { projectOutputSchema
|
|
6
|
+
export { projectOutputSchema } from "./project.js";
|
|
7
7
|
export { reasonableNameSchema } from "./schemas.js";
|
|
8
8
|
export { userOutputSchema } from "./auth.js";
|
|
9
9
|
/** Procedures exposed by the public Node client and OpenAPI document. */
|
|
@@ -194,6 +194,14 @@ export declare const publicContract: {
|
|
|
194
194
|
organizationId: import("zod").ZodString;
|
|
195
195
|
createdAt: import("zod").ZodDate;
|
|
196
196
|
createdBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
197
|
+
org: import("zod").ZodObject<{
|
|
198
|
+
id: import("zod").ZodString;
|
|
199
|
+
name: import("zod").ZodString;
|
|
200
|
+
}, import("zod/v4/core").$strip>;
|
|
201
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
202
|
+
description: import("zod").ZodString;
|
|
203
|
+
identityKey: import("zod").ZodString;
|
|
204
|
+
}, import("zod/v4/core").$strip>>;
|
|
197
205
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
198
206
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
199
207
|
projectId: import("zod").ZodString;
|
|
@@ -211,6 +219,7 @@ export declare const publicContract: {
|
|
|
211
219
|
name: import("zod").ZodString;
|
|
212
220
|
}, import("zod/v4/core").$strip>;
|
|
213
221
|
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
222
|
+
description: import("zod").ZodString;
|
|
214
223
|
identityKey: import("zod").ZodString;
|
|
215
224
|
}, import("zod/v4/core").$strip>>;
|
|
216
225
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -227,6 +236,10 @@ export declare const publicContract: {
|
|
|
227
236
|
id: import("zod").ZodString;
|
|
228
237
|
name: import("zod").ZodString;
|
|
229
238
|
}, import("zod/v4/core").$strip>;
|
|
239
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
240
|
+
description: import("zod").ZodString;
|
|
241
|
+
identityKey: import("zod").ZodString;
|
|
242
|
+
}, import("zod/v4/core").$strip>>;
|
|
230
243
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
|
231
244
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
232
245
|
projectId: import("zod").ZodString;
|
|
@@ -392,10 +405,6 @@ export declare const firstPartyContract: {
|
|
|
392
405
|
maxAttempts: import("zod").ZodNumber;
|
|
393
406
|
nextRunAt: import("zod").ZodDate;
|
|
394
407
|
}, import("zod/v4/core").$strip>>;
|
|
395
|
-
planningProgress: import("zod").ZodObject<{
|
|
396
|
-
completed: import("zod").ZodNumber;
|
|
397
|
-
total: import("zod").ZodNumber;
|
|
398
|
-
}, import("zod/v4/core").$strip>;
|
|
399
408
|
project: import("zod").ZodObject<{
|
|
400
409
|
id: import("zod").ZodString;
|
|
401
410
|
name: import("zod").ZodString;
|
|
@@ -414,6 +423,16 @@ export declare const firstPartyContract: {
|
|
|
414
423
|
canInvite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
415
424
|
organizationId: import("zod").ZodString;
|
|
416
425
|
}, import("zod/v4/core").$strip>, import("zod").ZodBoolean, Record<never, never>, Record<never, never>>;
|
|
426
|
+
createBillingPortal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
427
|
+
organizationId: import("zod").ZodString;
|
|
428
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
429
|
+
url: import("zod").ZodURL;
|
|
430
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
431
|
+
createCheckout: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
432
|
+
organizationId: import("zod").ZodString;
|
|
433
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
434
|
+
url: import("zod").ZodURL;
|
|
435
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
417
436
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
418
437
|
name: import("zod").ZodString;
|
|
419
438
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -562,6 +581,14 @@ export declare const firstPartyContract: {
|
|
|
562
581
|
organizationId: import("zod").ZodString;
|
|
563
582
|
createdAt: import("zod").ZodDate;
|
|
564
583
|
createdBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
584
|
+
org: import("zod").ZodObject<{
|
|
585
|
+
id: import("zod").ZodString;
|
|
586
|
+
name: import("zod").ZodString;
|
|
587
|
+
}, import("zod/v4/core").$strip>;
|
|
588
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
589
|
+
description: import("zod").ZodString;
|
|
590
|
+
identityKey: import("zod").ZodString;
|
|
591
|
+
}, import("zod/v4/core").$strip>>;
|
|
565
592
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
566
593
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
567
594
|
projectId: import("zod").ZodString;
|
|
@@ -579,6 +606,7 @@ export declare const firstPartyContract: {
|
|
|
579
606
|
name: import("zod").ZodString;
|
|
580
607
|
}, import("zod/v4/core").$strip>;
|
|
581
608
|
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
609
|
+
description: import("zod").ZodString;
|
|
582
610
|
identityKey: import("zod").ZodString;
|
|
583
611
|
}, import("zod/v4/core").$strip>>;
|
|
584
612
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -595,6 +623,10 @@ export declare const firstPartyContract: {
|
|
|
595
623
|
id: import("zod").ZodString;
|
|
596
624
|
name: import("zod").ZodString;
|
|
597
625
|
}, import("zod/v4/core").$strip>;
|
|
626
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
627
|
+
description: import("zod").ZodString;
|
|
628
|
+
identityKey: import("zod").ZodString;
|
|
629
|
+
}, import("zod/v4/core").$strip>>;
|
|
598
630
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
|
599
631
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
600
632
|
projectId: import("zod").ZodString;
|
|
@@ -986,10 +1018,6 @@ export declare const contract: {
|
|
|
986
1018
|
maxAttempts: import("zod").ZodNumber;
|
|
987
1019
|
nextRunAt: import("zod").ZodDate;
|
|
988
1020
|
}, import("zod/v4/core").$strip>>;
|
|
989
|
-
planningProgress: import("zod").ZodObject<{
|
|
990
|
-
completed: import("zod").ZodNumber;
|
|
991
|
-
total: import("zod").ZodNumber;
|
|
992
|
-
}, import("zod/v4/core").$strip>;
|
|
993
1021
|
project: import("zod").ZodObject<{
|
|
994
1022
|
id: import("zod").ZodString;
|
|
995
1023
|
name: import("zod").ZodString;
|
|
@@ -1008,6 +1036,16 @@ export declare const contract: {
|
|
|
1008
1036
|
canInvite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1009
1037
|
organizationId: import("zod").ZodString;
|
|
1010
1038
|
}, import("zod/v4/core").$strip>, import("zod").ZodBoolean, Record<never, never>, Record<never, never>>;
|
|
1039
|
+
createBillingPortal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1040
|
+
organizationId: import("zod").ZodString;
|
|
1041
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1042
|
+
url: import("zod").ZodURL;
|
|
1043
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1044
|
+
createCheckout: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1045
|
+
organizationId: import("zod").ZodString;
|
|
1046
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1047
|
+
url: import("zod").ZodURL;
|
|
1048
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1011
1049
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1012
1050
|
name: import("zod").ZodString;
|
|
1013
1051
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -1156,6 +1194,14 @@ export declare const contract: {
|
|
|
1156
1194
|
organizationId: import("zod").ZodString;
|
|
1157
1195
|
createdAt: import("zod").ZodDate;
|
|
1158
1196
|
createdBy: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1197
|
+
org: import("zod").ZodObject<{
|
|
1198
|
+
id: import("zod").ZodString;
|
|
1199
|
+
name: import("zod").ZodString;
|
|
1200
|
+
}, import("zod/v4/core").$strip>;
|
|
1201
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1202
|
+
description: import("zod").ZodString;
|
|
1203
|
+
identityKey: import("zod").ZodString;
|
|
1204
|
+
}, import("zod/v4/core").$strip>>;
|
|
1159
1205
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1160
1206
|
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1161
1207
|
projectId: import("zod").ZodString;
|
|
@@ -1173,6 +1219,7 @@ export declare const contract: {
|
|
|
1173
1219
|
name: import("zod").ZodString;
|
|
1174
1220
|
}, import("zod/v4/core").$strip>;
|
|
1175
1221
|
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1222
|
+
description: import("zod").ZodString;
|
|
1176
1223
|
identityKey: import("zod").ZodString;
|
|
1177
1224
|
}, import("zod/v4/core").$strip>>;
|
|
1178
1225
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -1189,6 +1236,10 @@ export declare const contract: {
|
|
|
1189
1236
|
id: import("zod").ZodString;
|
|
1190
1237
|
name: import("zod").ZodString;
|
|
1191
1238
|
}, import("zod/v4/core").$strip>;
|
|
1239
|
+
activeAutomations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1240
|
+
description: import("zod").ZodString;
|
|
1241
|
+
identityKey: import("zod").ZodString;
|
|
1242
|
+
}, import("zod/v4/core").$strip>>;
|
|
1192
1243
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
|
1193
1244
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1194
1245
|
projectId: import("zod").ZodString;
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ export { runtimeContract } from "./runtime.js";
|
|
|
11
11
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
12
12
|
export { integrationConnectionManifestSchema, integrationServiceManifestSchema, } from "./authorization.js";
|
|
13
13
|
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
14
|
-
export { projectOutputSchema
|
|
14
|
+
export { projectOutputSchema } from "./project.js";
|
|
15
15
|
export { reasonableNameSchema } from "./schemas.js";
|
|
16
16
|
export { userOutputSchema } from "./auth.js";
|
|
17
17
|
/** Procedures exposed by the public Node client and OpenAPI document. */
|
|
@@ -51,6 +51,8 @@ export const firstPartyContract = {
|
|
|
51
51
|
org: {
|
|
52
52
|
...publicContract.org,
|
|
53
53
|
canInvite: orgContract.canInvite,
|
|
54
|
+
createBillingPortal: orgContract.createBillingPortal,
|
|
55
|
+
createCheckout: orgContract.createCheckout,
|
|
54
56
|
},
|
|
55
57
|
project: {
|
|
56
58
|
...publicContract.project,
|
package/dist/org.d.ts
CHANGED
|
@@ -151,6 +151,16 @@ export declare const orgContract: {
|
|
|
151
151
|
canInvite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
152
152
|
organizationId: z.ZodString;
|
|
153
153
|
}, z.core.$strip>, z.ZodBoolean, Record<never, never>, Record<never, never>>;
|
|
154
|
+
createBillingPortal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
155
|
+
organizationId: z.ZodString;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
url: z.ZodURL;
|
|
158
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
159
|
+
createCheckout: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
160
|
+
organizationId: z.ZodString;
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
url: z.ZodURL;
|
|
163
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
154
164
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
155
165
|
name: z.ZodString;
|
|
156
166
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/org.js
CHANGED
|
@@ -67,6 +67,12 @@ export const orgContract = {
|
|
|
67
67
|
canInvite: oc
|
|
68
68
|
.input(z.object({ organizationId: z.string() }))
|
|
69
69
|
.output(z.boolean()),
|
|
70
|
+
createBillingPortal: oc
|
|
71
|
+
.input(z.object({ organizationId: z.string() }))
|
|
72
|
+
.output(z.object({ url: z.url() })),
|
|
73
|
+
createCheckout: oc
|
|
74
|
+
.input(z.object({ organizationId: z.string() }))
|
|
75
|
+
.output(z.object({ url: z.url() })),
|
|
70
76
|
create: oc
|
|
71
77
|
.route({
|
|
72
78
|
method: "POST",
|
|
@@ -86,7 +92,7 @@ export const orgContract = {
|
|
|
86
92
|
path: "/organizations/{organizationId}",
|
|
87
93
|
operationId: "deleteOrganization",
|
|
88
94
|
summary: "Delete organization",
|
|
89
|
-
description: "Deletes an organization. Caller must be the organization owner.",
|
|
95
|
+
description: "Deletes an organization and cancels its billing. Caller must be the organization owner.",
|
|
90
96
|
tags: ["Organizations"],
|
|
91
97
|
successStatus: 204,
|
|
92
98
|
})
|
package/dist/project.d.ts
CHANGED
|
@@ -5,17 +5,14 @@ export declare const projectOutputSchema: z.ZodObject<{
|
|
|
5
5
|
organizationId: z.ZodString;
|
|
6
6
|
createdAt: z.ZodDate;
|
|
7
7
|
createdBy: z.ZodNullable<z.ZodString>;
|
|
8
|
-
}, z.core.$strip>;
|
|
9
|
-
export declare const projectWithOrganizationOutputSchema: z.ZodObject<{
|
|
10
|
-
id: z.ZodString;
|
|
11
|
-
name: z.ZodString;
|
|
12
|
-
organizationId: z.ZodString;
|
|
13
|
-
createdAt: z.ZodDate;
|
|
14
|
-
createdBy: z.ZodNullable<z.ZodString>;
|
|
15
8
|
org: z.ZodObject<{
|
|
16
9
|
id: z.ZodString;
|
|
17
10
|
name: z.ZodString;
|
|
18
11
|
}, z.core.$strip>;
|
|
12
|
+
activeAutomations: z.ZodArray<z.ZodObject<{
|
|
13
|
+
description: z.ZodString;
|
|
14
|
+
identityKey: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>;
|
|
19
16
|
}, z.core.$strip>;
|
|
20
17
|
export declare const projectContract: {
|
|
21
18
|
canCreate: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -30,6 +27,14 @@ export declare const projectContract: {
|
|
|
30
27
|
organizationId: z.ZodString;
|
|
31
28
|
createdAt: z.ZodDate;
|
|
32
29
|
createdBy: z.ZodNullable<z.ZodString>;
|
|
30
|
+
org: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
name: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
activeAutomations: z.ZodArray<z.ZodObject<{
|
|
35
|
+
description: z.ZodString;
|
|
36
|
+
identityKey: z.ZodString;
|
|
37
|
+
}, z.core.$strip>>;
|
|
33
38
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
34
39
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{
|
|
35
40
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
@@ -44,6 +49,10 @@ export declare const projectContract: {
|
|
|
44
49
|
id: z.ZodString;
|
|
45
50
|
name: z.ZodString;
|
|
46
51
|
}, z.core.$strip>;
|
|
52
|
+
activeAutomations: z.ZodArray<z.ZodObject<{
|
|
53
|
+
description: z.ZodString;
|
|
54
|
+
identityKey: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
47
56
|
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
48
57
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
49
58
|
projectId: z.ZodString;
|
|
@@ -58,6 +67,7 @@ export declare const projectContract: {
|
|
|
58
67
|
name: z.ZodString;
|
|
59
68
|
}, z.core.$strip>;
|
|
60
69
|
activeAutomations: z.ZodArray<z.ZodObject<{
|
|
70
|
+
description: z.ZodString;
|
|
61
71
|
identityKey: z.ZodString;
|
|
62
72
|
}, z.core.$strip>>;
|
|
63
73
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
package/dist/project.js
CHANGED
|
@@ -7,12 +7,16 @@ export const projectOutputSchema = z.object({
|
|
|
7
7
|
organizationId: z.string(),
|
|
8
8
|
createdAt: z.date(),
|
|
9
9
|
createdBy: z.string().nullable(),
|
|
10
|
-
});
|
|
11
|
-
export const projectWithOrganizationOutputSchema = projectOutputSchema.extend({
|
|
12
10
|
org: z.object({
|
|
13
11
|
id: z.string(),
|
|
14
12
|
name: z.string(),
|
|
15
13
|
}),
|
|
14
|
+
activeAutomations: z
|
|
15
|
+
.object({
|
|
16
|
+
description: z.string(),
|
|
17
|
+
identityKey: z.string(),
|
|
18
|
+
})
|
|
19
|
+
.array(),
|
|
16
20
|
});
|
|
17
21
|
export const projectContract = {
|
|
18
22
|
canCreate: oc
|
|
@@ -49,7 +53,7 @@ export const projectContract = {
|
|
|
49
53
|
query: z.string().min(1).optional(),
|
|
50
54
|
})
|
|
51
55
|
.optional())
|
|
52
|
-
.output(
|
|
56
|
+
.output(projectOutputSchema.array()),
|
|
53
57
|
get: oc
|
|
54
58
|
.route({
|
|
55
59
|
method: "GET",
|
|
@@ -60,13 +64,7 @@ export const projectContract = {
|
|
|
60
64
|
tags: ["Projects"],
|
|
61
65
|
})
|
|
62
66
|
.input(z.object({ projectId: z.string() }))
|
|
63
|
-
.output(
|
|
64
|
-
activeAutomations: z
|
|
65
|
-
.object({
|
|
66
|
-
identityKey: z.string(),
|
|
67
|
-
})
|
|
68
|
-
.array(),
|
|
69
|
-
})),
|
|
67
|
+
.output(projectOutputSchema),
|
|
70
68
|
update: oc
|
|
71
69
|
.route({
|
|
72
70
|
method: "PATCH",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@automate.ax/codec": "0.
|
|
29
|
+
"@automate.ax/codec": "0.21.0",
|
|
30
30
|
"@orpc/contract": "1.13.14",
|
|
31
31
|
"zod": "^4.3.6"
|
|
32
32
|
},
|
package/src/deployment.ts
CHANGED
|
@@ -71,10 +71,6 @@ export const deploymentContract = {
|
|
|
71
71
|
nextRunAt: z.date(),
|
|
72
72
|
})
|
|
73
73
|
.nullable(),
|
|
74
|
-
planningProgress: z.object({
|
|
75
|
-
completed: z.number().int().nonnegative(),
|
|
76
|
-
total: z.number().int().nonnegative(),
|
|
77
|
-
}),
|
|
78
74
|
project: z.object({
|
|
79
75
|
id: z.string(),
|
|
80
76
|
name: z.string(),
|
package/src/index.ts
CHANGED
|
@@ -34,10 +34,7 @@ export {
|
|
|
34
34
|
organizationSummaryOutputSchema,
|
|
35
35
|
publicOrganizationOutputSchema,
|
|
36
36
|
} from "./org"
|
|
37
|
-
export {
|
|
38
|
-
projectOutputSchema,
|
|
39
|
-
projectWithOrganizationOutputSchema,
|
|
40
|
-
} from "./project"
|
|
37
|
+
export { projectOutputSchema } from "./project"
|
|
41
38
|
export { reasonableNameSchema } from "./schemas"
|
|
42
39
|
export { userOutputSchema } from "./auth"
|
|
43
40
|
|
|
@@ -79,6 +76,8 @@ export const firstPartyContract = {
|
|
|
79
76
|
org: {
|
|
80
77
|
...publicContract.org,
|
|
81
78
|
canInvite: orgContract.canInvite,
|
|
79
|
+
createBillingPortal: orgContract.createBillingPortal,
|
|
80
|
+
createCheckout: orgContract.createCheckout,
|
|
82
81
|
},
|
|
83
82
|
project: {
|
|
84
83
|
...publicContract.project,
|
package/src/org.ts
CHANGED
|
@@ -78,6 +78,12 @@ export const orgContract = {
|
|
|
78
78
|
canInvite: oc
|
|
79
79
|
.input(z.object({ organizationId: z.string() }))
|
|
80
80
|
.output(z.boolean()),
|
|
81
|
+
createBillingPortal: oc
|
|
82
|
+
.input(z.object({ organizationId: z.string() }))
|
|
83
|
+
.output(z.object({ url: z.url() })),
|
|
84
|
+
createCheckout: oc
|
|
85
|
+
.input(z.object({ organizationId: z.string() }))
|
|
86
|
+
.output(z.object({ url: z.url() })),
|
|
81
87
|
create: oc
|
|
82
88
|
.route({
|
|
83
89
|
method: "POST",
|
|
@@ -98,7 +104,7 @@ export const orgContract = {
|
|
|
98
104
|
operationId: "deleteOrganization",
|
|
99
105
|
summary: "Delete organization",
|
|
100
106
|
description:
|
|
101
|
-
"Deletes an organization. Caller must be the organization owner.",
|
|
107
|
+
"Deletes an organization and cancels its billing. Caller must be the organization owner.",
|
|
102
108
|
tags: ["Organizations"],
|
|
103
109
|
successStatus: 204,
|
|
104
110
|
})
|
package/src/project.ts
CHANGED
|
@@ -8,13 +8,16 @@ export const projectOutputSchema = z.object({
|
|
|
8
8
|
organizationId: z.string(),
|
|
9
9
|
createdAt: z.date(),
|
|
10
10
|
createdBy: z.string().nullable(),
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
export const projectWithOrganizationOutputSchema = projectOutputSchema.extend({
|
|
14
11
|
org: z.object({
|
|
15
12
|
id: z.string(),
|
|
16
13
|
name: z.string(),
|
|
17
14
|
}),
|
|
15
|
+
activeAutomations: z
|
|
16
|
+
.object({
|
|
17
|
+
description: z.string(),
|
|
18
|
+
identityKey: z.string(),
|
|
19
|
+
})
|
|
20
|
+
.array(),
|
|
18
21
|
})
|
|
19
22
|
|
|
20
23
|
export const projectContract = {
|
|
@@ -58,7 +61,7 @@ export const projectContract = {
|
|
|
58
61
|
})
|
|
59
62
|
.optional(),
|
|
60
63
|
)
|
|
61
|
-
.output(
|
|
64
|
+
.output(projectOutputSchema.array()),
|
|
62
65
|
get: oc
|
|
63
66
|
.route({
|
|
64
67
|
method: "GET",
|
|
@@ -70,15 +73,7 @@ export const projectContract = {
|
|
|
70
73
|
tags: ["Projects"],
|
|
71
74
|
})
|
|
72
75
|
.input(z.object({ projectId: z.string() }))
|
|
73
|
-
.output(
|
|
74
|
-
projectWithOrganizationOutputSchema.extend({
|
|
75
|
-
activeAutomations: z
|
|
76
|
-
.object({
|
|
77
|
-
identityKey: z.string(),
|
|
78
|
-
})
|
|
79
|
-
.array(),
|
|
80
|
-
}),
|
|
81
|
-
),
|
|
76
|
+
.output(projectOutputSchema),
|
|
82
77
|
update: oc
|
|
83
78
|
.route({
|
|
84
79
|
method: "PATCH",
|