@automate.ax/api-contract 0.36.0 → 0.38.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/events/airtable.d.ts +13 -0
- package/dist/events/airtable.js +21 -0
- package/dist/events/index.d.ts +10 -0
- package/dist/events/index.js +2 -0
- package/dist/index.d.ts +22 -12
- package/dist/org.d.ts +8 -8
- package/dist/org.js +2 -2
- package/package.json +2 -2
- package/src/events/airtable.ts +25 -0
- package/src/events/index.ts +2 -0
- package/src/org.ts +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const airtableEventsContract: {
|
|
3
|
+
airtableEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4
|
+
base: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
}, z.core.$loose>;
|
|
7
|
+
sourceId: z.ZodString;
|
|
8
|
+
timestamp: z.ZodISODateTime;
|
|
9
|
+
webhook: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
}, z.core.$loose>;
|
|
12
|
+
}, z.core.$loose>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const airtableEventsContract = {
|
|
4
|
+
airtableEvent: oc
|
|
5
|
+
.route({
|
|
6
|
+
method: "POST",
|
|
7
|
+
path: "/events/airtable/{sourceId}",
|
|
8
|
+
operationId: "receiveAirtableEvent",
|
|
9
|
+
summary: "Receive an Airtable webhook notification",
|
|
10
|
+
description: "Authenticates Airtable webhook pings and schedules payload retrieval.",
|
|
11
|
+
tags: ["Events"],
|
|
12
|
+
successStatus: 204,
|
|
13
|
+
})
|
|
14
|
+
.input(z.looseObject({
|
|
15
|
+
base: z.looseObject({ id: z.string() }),
|
|
16
|
+
sourceId: z.string(),
|
|
17
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
18
|
+
webhook: z.looseObject({ id: z.string() }),
|
|
19
|
+
}))
|
|
20
|
+
.output(z.void()),
|
|
21
|
+
};
|
package/dist/events/index.d.ts
CHANGED
|
@@ -79,4 +79,14 @@ export declare const eventsContract: {
|
|
|
79
79
|
events: import("zod").ZodPrefault<import("zod").ZodArray<import("zod").ZodJSONSchema>>;
|
|
80
80
|
sourceId: import("zod").ZodString;
|
|
81
81
|
}, import("zod/v4/core").$loose>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
82
|
+
airtableEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
83
|
+
base: import("zod").ZodObject<{
|
|
84
|
+
id: import("zod").ZodString;
|
|
85
|
+
}, import("zod/v4/core").$loose>;
|
|
86
|
+
sourceId: import("zod").ZodString;
|
|
87
|
+
timestamp: import("zod").ZodISODateTime;
|
|
88
|
+
webhook: import("zod").ZodObject<{
|
|
89
|
+
id: import("zod").ZodString;
|
|
90
|
+
}, import("zod/v4/core").$loose>;
|
|
91
|
+
}, import("zod/v4/core").$loose>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
82
92
|
};
|
package/dist/events/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { airtableEventsContract } from "./airtable.js";
|
|
1
2
|
import { asanaEventsContract } from "./asana.js";
|
|
2
3
|
import { brevoEventsContract } from "./brevo.js";
|
|
3
4
|
import { googleCalendarEventsContract } from "./google-calendar.js";
|
|
@@ -9,6 +10,7 @@ import { resendEventsContract } from "./resend.js";
|
|
|
9
10
|
import { slackEventsContract } from "./slack.js";
|
|
10
11
|
import { trelloEventsContract } from "./trello.js";
|
|
11
12
|
export const eventsContract = {
|
|
13
|
+
...airtableEventsContract,
|
|
12
14
|
...asanaEventsContract,
|
|
13
15
|
...brevoEventsContract,
|
|
14
16
|
...googleCalendarEventsContract,
|
package/dist/index.d.ts
CHANGED
|
@@ -90,13 +90,13 @@ export declare const publicContract: {
|
|
|
90
90
|
enterprise: "enterprise";
|
|
91
91
|
}>;
|
|
92
92
|
limits: import("zod").ZodObject<{
|
|
93
|
-
|
|
93
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
94
94
|
emailRecipients: import("zod").ZodNumber;
|
|
95
95
|
projects: import("zod").ZodNumber;
|
|
96
96
|
seats: import("zod").ZodNumber;
|
|
97
97
|
}, import("zod/v4/core").$strip>;
|
|
98
98
|
usage: import("zod").ZodObject<{
|
|
99
|
-
|
|
99
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
100
100
|
emailRecipients: import("zod").ZodNumber;
|
|
101
101
|
}, import("zod/v4/core").$strip>;
|
|
102
102
|
members: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -180,13 +180,13 @@ export declare const publicContract: {
|
|
|
180
180
|
enterprise: "enterprise";
|
|
181
181
|
}>;
|
|
182
182
|
limits: import("zod").ZodObject<{
|
|
183
|
-
|
|
183
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
184
184
|
emailRecipients: import("zod").ZodNumber;
|
|
185
185
|
projects: import("zod").ZodNumber;
|
|
186
186
|
seats: import("zod").ZodNumber;
|
|
187
187
|
}, import("zod/v4/core").$strip>;
|
|
188
188
|
usage: import("zod").ZodObject<{
|
|
189
|
-
|
|
189
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
190
190
|
emailRecipients: import("zod").ZodNumber;
|
|
191
191
|
}, import("zod/v4/core").$strip>;
|
|
192
192
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
|
@@ -619,13 +619,13 @@ export declare const firstPartyContract: {
|
|
|
619
619
|
enterprise: "enterprise";
|
|
620
620
|
}>;
|
|
621
621
|
limits: import("zod").ZodObject<{
|
|
622
|
-
|
|
622
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
623
623
|
emailRecipients: import("zod").ZodNumber;
|
|
624
624
|
projects: import("zod").ZodNumber;
|
|
625
625
|
seats: import("zod").ZodNumber;
|
|
626
626
|
}, import("zod/v4/core").$strip>;
|
|
627
627
|
usage: import("zod").ZodObject<{
|
|
628
|
-
|
|
628
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
629
629
|
emailRecipients: import("zod").ZodNumber;
|
|
630
630
|
}, import("zod/v4/core").$strip>;
|
|
631
631
|
members: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -709,13 +709,13 @@ export declare const firstPartyContract: {
|
|
|
709
709
|
enterprise: "enterprise";
|
|
710
710
|
}>;
|
|
711
711
|
limits: import("zod").ZodObject<{
|
|
712
|
-
|
|
712
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
713
713
|
emailRecipients: import("zod").ZodNumber;
|
|
714
714
|
projects: import("zod").ZodNumber;
|
|
715
715
|
seats: import("zod").ZodNumber;
|
|
716
716
|
}, import("zod/v4/core").$strip>;
|
|
717
717
|
usage: import("zod").ZodObject<{
|
|
718
|
-
|
|
718
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
719
719
|
emailRecipients: import("zod").ZodNumber;
|
|
720
720
|
}, import("zod/v4/core").$strip>;
|
|
721
721
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
|
@@ -1043,6 +1043,16 @@ export declare const contract: {
|
|
|
1043
1043
|
events: import("zod").ZodPrefault<import("zod").ZodArray<import("zod").ZodJSONSchema>>;
|
|
1044
1044
|
sourceId: import("zod").ZodString;
|
|
1045
1045
|
}, import("zod/v4/core").$loose>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1046
|
+
airtableEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1047
|
+
base: import("zod").ZodObject<{
|
|
1048
|
+
id: import("zod").ZodString;
|
|
1049
|
+
}, import("zod/v4/core").$loose>;
|
|
1050
|
+
sourceId: import("zod").ZodString;
|
|
1051
|
+
timestamp: import("zod").ZodISODateTime;
|
|
1052
|
+
webhook: import("zod").ZodObject<{
|
|
1053
|
+
id: import("zod").ZodString;
|
|
1054
|
+
}, import("zod/v4/core").$loose>;
|
|
1055
|
+
}, import("zod/v4/core").$loose>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1046
1056
|
};
|
|
1047
1057
|
runtime: {
|
|
1048
1058
|
commit: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
@@ -1480,13 +1490,13 @@ export declare const contract: {
|
|
|
1480
1490
|
enterprise: "enterprise";
|
|
1481
1491
|
}>;
|
|
1482
1492
|
limits: import("zod").ZodObject<{
|
|
1483
|
-
|
|
1493
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
1484
1494
|
emailRecipients: import("zod").ZodNumber;
|
|
1485
1495
|
projects: import("zod").ZodNumber;
|
|
1486
1496
|
seats: import("zod").ZodNumber;
|
|
1487
1497
|
}, import("zod/v4/core").$strip>;
|
|
1488
1498
|
usage: import("zod").ZodObject<{
|
|
1489
|
-
|
|
1499
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
1490
1500
|
emailRecipients: import("zod").ZodNumber;
|
|
1491
1501
|
}, import("zod/v4/core").$strip>;
|
|
1492
1502
|
members: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -1570,13 +1580,13 @@ export declare const contract: {
|
|
|
1570
1580
|
enterprise: "enterprise";
|
|
1571
1581
|
}>;
|
|
1572
1582
|
limits: import("zod").ZodObject<{
|
|
1573
|
-
|
|
1583
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
1574
1584
|
emailRecipients: import("zod").ZodNumber;
|
|
1575
1585
|
projects: import("zod").ZodNumber;
|
|
1576
1586
|
seats: import("zod").ZodNumber;
|
|
1577
1587
|
}, import("zod/v4/core").$strip>;
|
|
1578
1588
|
usage: import("zod").ZodObject<{
|
|
1579
|
-
|
|
1589
|
+
aiSpendUsd: import("zod").ZodNumber;
|
|
1580
1590
|
emailRecipients: import("zod").ZodNumber;
|
|
1581
1591
|
}, import("zod/v4/core").$strip>;
|
|
1582
1592
|
}, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
|
package/dist/org.d.ts
CHANGED
|
@@ -42,13 +42,13 @@ export declare const organizationSummaryOutputSchema: z.ZodObject<{
|
|
|
42
42
|
enterprise: "enterprise";
|
|
43
43
|
}>;
|
|
44
44
|
limits: z.ZodObject<{
|
|
45
|
-
|
|
45
|
+
aiSpendUsd: z.ZodNumber;
|
|
46
46
|
emailRecipients: z.ZodNumber;
|
|
47
47
|
projects: z.ZodNumber;
|
|
48
48
|
seats: z.ZodNumber;
|
|
49
49
|
}, z.core.$strip>;
|
|
50
50
|
usage: z.ZodObject<{
|
|
51
|
-
|
|
51
|
+
aiSpendUsd: z.ZodNumber;
|
|
52
52
|
emailRecipients: z.ZodNumber;
|
|
53
53
|
}, z.core.$strip>;
|
|
54
54
|
}, z.core.$strip>;
|
|
@@ -109,13 +109,13 @@ export declare const organizationDetailsOutputSchema: z.ZodObject<{
|
|
|
109
109
|
enterprise: "enterprise";
|
|
110
110
|
}>;
|
|
111
111
|
limits: z.ZodObject<{
|
|
112
|
-
|
|
112
|
+
aiSpendUsd: z.ZodNumber;
|
|
113
113
|
emailRecipients: z.ZodNumber;
|
|
114
114
|
projects: z.ZodNumber;
|
|
115
115
|
seats: z.ZodNumber;
|
|
116
116
|
}, z.core.$strip>;
|
|
117
117
|
usage: z.ZodObject<{
|
|
118
|
-
|
|
118
|
+
aiSpendUsd: z.ZodNumber;
|
|
119
119
|
emailRecipients: z.ZodNumber;
|
|
120
120
|
}, z.core.$strip>;
|
|
121
121
|
members: z.ZodArray<z.ZodObject<{
|
|
@@ -211,13 +211,13 @@ export declare const orgContract: {
|
|
|
211
211
|
enterprise: "enterprise";
|
|
212
212
|
}>;
|
|
213
213
|
limits: z.ZodObject<{
|
|
214
|
-
|
|
214
|
+
aiSpendUsd: z.ZodNumber;
|
|
215
215
|
emailRecipients: z.ZodNumber;
|
|
216
216
|
projects: z.ZodNumber;
|
|
217
217
|
seats: z.ZodNumber;
|
|
218
218
|
}, z.core.$strip>;
|
|
219
219
|
usage: z.ZodObject<{
|
|
220
|
-
|
|
220
|
+
aiSpendUsd: z.ZodNumber;
|
|
221
221
|
emailRecipients: z.ZodNumber;
|
|
222
222
|
}, z.core.$strip>;
|
|
223
223
|
members: z.ZodArray<z.ZodObject<{
|
|
@@ -301,13 +301,13 @@ export declare const orgContract: {
|
|
|
301
301
|
enterprise: "enterprise";
|
|
302
302
|
}>;
|
|
303
303
|
limits: z.ZodObject<{
|
|
304
|
-
|
|
304
|
+
aiSpendUsd: z.ZodNumber;
|
|
305
305
|
emailRecipients: z.ZodNumber;
|
|
306
306
|
projects: z.ZodNumber;
|
|
307
307
|
seats: z.ZodNumber;
|
|
308
308
|
}, z.core.$strip>;
|
|
309
309
|
usage: z.ZodObject<{
|
|
310
|
-
|
|
310
|
+
aiSpendUsd: z.ZodNumber;
|
|
311
311
|
emailRecipients: z.ZodNumber;
|
|
312
312
|
}, z.core.$strip>;
|
|
313
313
|
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
package/dist/org.js
CHANGED
|
@@ -26,13 +26,13 @@ export const organizationSummaryOutputSchema = z.object({
|
|
|
26
26
|
activeSubscription: activeSubscriptionOutputSchema.nullable(),
|
|
27
27
|
plan: z.enum(["free", "pro", "enterprise"]),
|
|
28
28
|
limits: z.object({
|
|
29
|
-
|
|
29
|
+
aiSpendUsd: z.number(),
|
|
30
30
|
emailRecipients: z.number(),
|
|
31
31
|
projects: z.number(),
|
|
32
32
|
seats: z.number(),
|
|
33
33
|
}),
|
|
34
34
|
usage: z.object({
|
|
35
|
-
|
|
35
|
+
aiSpendUsd: z.number(),
|
|
36
36
|
emailRecipients: z.number(),
|
|
37
37
|
}),
|
|
38
38
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@ai-sdk/gateway": "^4.0.46",
|
|
30
|
-
"@automate.ax/codec": "0.
|
|
30
|
+
"@automate.ax/codec": "0.38.0",
|
|
31
31
|
"@orpc/contract": "1.13.14",
|
|
32
32
|
"zod": "^4.3.6"
|
|
33
33
|
},
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract"
|
|
2
|
+
import { z } from "zod"
|
|
3
|
+
|
|
4
|
+
export const airtableEventsContract = {
|
|
5
|
+
airtableEvent: oc
|
|
6
|
+
.route({
|
|
7
|
+
method: "POST",
|
|
8
|
+
path: "/events/airtable/{sourceId}",
|
|
9
|
+
operationId: "receiveAirtableEvent",
|
|
10
|
+
summary: "Receive an Airtable webhook notification",
|
|
11
|
+
description:
|
|
12
|
+
"Authenticates Airtable webhook pings and schedules payload retrieval.",
|
|
13
|
+
tags: ["Events"],
|
|
14
|
+
successStatus: 204,
|
|
15
|
+
})
|
|
16
|
+
.input(
|
|
17
|
+
z.looseObject({
|
|
18
|
+
base: z.looseObject({ id: z.string() }),
|
|
19
|
+
sourceId: z.string(),
|
|
20
|
+
timestamp: z.iso.datetime({ offset: true }),
|
|
21
|
+
webhook: z.looseObject({ id: z.string() }),
|
|
22
|
+
}),
|
|
23
|
+
)
|
|
24
|
+
.output(z.void()),
|
|
25
|
+
}
|
package/src/events/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { airtableEventsContract } from "./airtable"
|
|
1
2
|
import { asanaEventsContract } from "./asana"
|
|
2
3
|
import { brevoEventsContract } from "./brevo"
|
|
3
4
|
import { googleCalendarEventsContract } from "./google-calendar"
|
|
@@ -10,6 +11,7 @@ import { slackEventsContract } from "./slack"
|
|
|
10
11
|
import { trelloEventsContract } from "./trello"
|
|
11
12
|
|
|
12
13
|
export const eventsContract = {
|
|
14
|
+
...airtableEventsContract,
|
|
13
15
|
...asanaEventsContract,
|
|
14
16
|
...brevoEventsContract,
|
|
15
17
|
...googleCalendarEventsContract,
|
package/src/org.ts
CHANGED
|
@@ -30,13 +30,13 @@ export const organizationSummaryOutputSchema = z.object({
|
|
|
30
30
|
activeSubscription: activeSubscriptionOutputSchema.nullable(),
|
|
31
31
|
plan: z.enum(["free", "pro", "enterprise"]),
|
|
32
32
|
limits: z.object({
|
|
33
|
-
|
|
33
|
+
aiSpendUsd: z.number(),
|
|
34
34
|
emailRecipients: z.number(),
|
|
35
35
|
projects: z.number(),
|
|
36
36
|
seats: z.number(),
|
|
37
37
|
}),
|
|
38
38
|
usage: z.object({
|
|
39
|
-
|
|
39
|
+
aiSpendUsd: z.number(),
|
|
40
40
|
emailRecipients: z.number(),
|
|
41
41
|
}),
|
|
42
42
|
})
|