@automate.ax/api-contract 0.141.0 → 0.142.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/clickup.d.ts +8 -0
- package/dist/events/clickup.js +20 -0
- package/dist/events/index.d.ts +68 -63
- package/dist/events/index.js +2 -0
- package/dist/events/notion.d.ts +63 -63
- package/dist/index.d.ts +89 -63
- package/dist/runtime.d.ts +21 -0
- package/dist/runtime.js +20 -0
- package/package.json +4 -4
- package/src/events/clickup.ts +24 -0
- package/src/events/index.ts +2 -0
- package/src/runtime.ts +24 -0
package/dist/runtime.js
CHANGED
|
@@ -960,6 +960,25 @@ export const runtimeContract = {
|
|
|
960
960
|
generate: oc
|
|
961
961
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
962
962
|
.output(RUNTIME_GENERATION_RESULT_SCHEMA),
|
|
963
|
+
googleAdsRequest: oc
|
|
964
|
+
.input(z.strictObject({
|
|
965
|
+
accountId: z.string().min(1),
|
|
966
|
+
body: z.json().optional(),
|
|
967
|
+
loginCustomerId: z.string().optional(),
|
|
968
|
+
method: z.enum(["GET", "POST"]).optional(),
|
|
969
|
+
path: z.string().min(1),
|
|
970
|
+
}))
|
|
971
|
+
.output(z.discriminatedUnion("ok", [
|
|
972
|
+
z.object({ ok: z.literal(true), payload: z.json() }),
|
|
973
|
+
z.object({
|
|
974
|
+
message: z.string(),
|
|
975
|
+
ok: z.literal(false),
|
|
976
|
+
providerStatus: z.string().optional(),
|
|
977
|
+
requestId: z.string().optional(),
|
|
978
|
+
retryAfter: z.string().optional(),
|
|
979
|
+
status: z.number().int(),
|
|
980
|
+
}),
|
|
981
|
+
])),
|
|
963
982
|
startImageGeneration: oc
|
|
964
983
|
.input(PLATFORM_IMAGE_GENERATION_TRANSPORT_INPUT_SCHEMA)
|
|
965
984
|
.output(platformImageGenerationStartSchema),
|
|
@@ -987,6 +1006,7 @@ export const runtimeContract = {
|
|
|
987
1006
|
serviceId: z.string().min(1),
|
|
988
1007
|
}))
|
|
989
1008
|
.output(z.object({
|
|
1009
|
+
accountId: z.string().min(1).optional(),
|
|
990
1010
|
connectionMethodId: z.string().min(1),
|
|
991
1011
|
secret: z.record(z.string(), z.unknown()),
|
|
992
1012
|
serviceId: z.string(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.142.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ai-sdk/gateway": "4.0.46",
|
|
34
|
-
"@automate.ax/codec": "0.
|
|
35
|
-
"@automate.ax/integration-contracts": "0.
|
|
34
|
+
"@automate.ax/codec": "0.142.0",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.142.0",
|
|
36
36
|
"@orpc/contract": "1.15.0",
|
|
37
37
|
"fast-json-stable-stringify": "^2.1.0",
|
|
38
38
|
"zod": "^4.3.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@internal/config": "0.
|
|
41
|
+
"@internal/config": "0.3.0",
|
|
42
42
|
"@types/bun": "latest",
|
|
43
43
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
44
44
|
"@zachsents/oxlint-config": "^0.4.1",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract"
|
|
2
|
+
import * as z from "zod"
|
|
3
|
+
|
|
4
|
+
export const clickUpEventsContract = {
|
|
5
|
+
clickUpEvent: oc
|
|
6
|
+
.route({
|
|
7
|
+
description:
|
|
8
|
+
"Receives and authenticates callbacks delivered by ClickUp webhooks.",
|
|
9
|
+
method: "POST",
|
|
10
|
+
operationId: "receiveClickUpEvent",
|
|
11
|
+
path: "/events/clickup/{sourceId}",
|
|
12
|
+
successStatus: 204,
|
|
13
|
+
summary: "Receive a ClickUp workspace event",
|
|
14
|
+
tags: ["Events"],
|
|
15
|
+
})
|
|
16
|
+
.input(
|
|
17
|
+
z.looseObject({
|
|
18
|
+
event: z.string(),
|
|
19
|
+
sourceId: z.string(),
|
|
20
|
+
webhook_id: z.string(),
|
|
21
|
+
}),
|
|
22
|
+
)
|
|
23
|
+
.output(z.void()),
|
|
24
|
+
}
|
package/src/events/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { convexEventsContract } from "./convex"
|
|
|
8
8
|
import { discordEventsContract } from "./discord"
|
|
9
9
|
import { closeEventsContract } from "./close"
|
|
10
10
|
import { cloudflareEventsContract } from "./cloudflare"
|
|
11
|
+
import { clickUpEventsContract } from "./clickup"
|
|
11
12
|
import { googleCalendarEventsContract } from "./google-calendar"
|
|
12
13
|
import { googleFormsEventsContract } from "./google-forms"
|
|
13
14
|
import { googleDriveEventsContract } from "./google-drive"
|
|
@@ -39,6 +40,7 @@ export const eventsContract = {
|
|
|
39
40
|
...discordEventsContract,
|
|
40
41
|
...closeEventsContract,
|
|
41
42
|
...cloudflareEventsContract,
|
|
43
|
+
...clickUpEventsContract,
|
|
42
44
|
...googleCalendarEventsContract,
|
|
43
45
|
...googleDriveEventsContract,
|
|
44
46
|
...googleFormsEventsContract,
|
package/src/runtime.ts
CHANGED
|
@@ -1175,6 +1175,29 @@ export const runtimeContract = {
|
|
|
1175
1175
|
generate: oc
|
|
1176
1176
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
1177
1177
|
.output(RUNTIME_GENERATION_RESULT_SCHEMA),
|
|
1178
|
+
googleAdsRequest: oc
|
|
1179
|
+
.input(
|
|
1180
|
+
z.strictObject({
|
|
1181
|
+
accountId: z.string().min(1),
|
|
1182
|
+
body: z.json().optional(),
|
|
1183
|
+
loginCustomerId: z.string().optional(),
|
|
1184
|
+
method: z.enum(["GET", "POST"]).optional(),
|
|
1185
|
+
path: z.string().min(1),
|
|
1186
|
+
}),
|
|
1187
|
+
)
|
|
1188
|
+
.output(
|
|
1189
|
+
z.discriminatedUnion("ok", [
|
|
1190
|
+
z.object({ ok: z.literal(true), payload: z.json() }),
|
|
1191
|
+
z.object({
|
|
1192
|
+
message: z.string(),
|
|
1193
|
+
ok: z.literal(false),
|
|
1194
|
+
providerStatus: z.string().optional(),
|
|
1195
|
+
requestId: z.string().optional(),
|
|
1196
|
+
retryAfter: z.string().optional(),
|
|
1197
|
+
status: z.number().int(),
|
|
1198
|
+
}),
|
|
1199
|
+
]),
|
|
1200
|
+
),
|
|
1178
1201
|
startImageGeneration: oc
|
|
1179
1202
|
.input(PLATFORM_IMAGE_GENERATION_TRANSPORT_INPUT_SCHEMA)
|
|
1180
1203
|
.output(platformImageGenerationStartSchema),
|
|
@@ -1210,6 +1233,7 @@ export const runtimeContract = {
|
|
|
1210
1233
|
)
|
|
1211
1234
|
.output(
|
|
1212
1235
|
z.object({
|
|
1236
|
+
accountId: z.string().min(1).optional(),
|
|
1213
1237
|
connectionMethodId: z.string().min(1),
|
|
1214
1238
|
secret: z.record(z.string(), z.unknown()),
|
|
1215
1239
|
serviceId: z.string(),
|