@automate.ax/api-contract 0.139.2 → 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 +79 -63
- package/dist/events/index.js +4 -0
- package/dist/events/meta-ads.d.ts +14 -0
- package/dist/events/meta-ads.js +17 -0
- package/dist/events/notion.d.ts +63 -63
- package/dist/index.d.ts +100 -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 +4 -0
- package/src/events/meta-ads.ts +18 -0
- package/src/runtime.ts +24 -0
package/dist/runtime.d.ts
CHANGED
|
@@ -2148,6 +2148,26 @@ export declare const runtimeContract: {
|
|
|
2148
2148
|
raw: z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
2149
2149
|
}, z.core.$strip>;
|
|
2150
2150
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
2151
|
+
googleAdsRequest: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2152
|
+
accountId: z.ZodString;
|
|
2153
|
+
body: z.ZodOptional<z.ZodJSONSchema>;
|
|
2154
|
+
loginCustomerId: z.ZodOptional<z.ZodString>;
|
|
2155
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
2156
|
+
POST: "POST";
|
|
2157
|
+
GET: "GET";
|
|
2158
|
+
}>>;
|
|
2159
|
+
path: z.ZodString;
|
|
2160
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2161
|
+
ok: z.ZodLiteral<true>;
|
|
2162
|
+
payload: z.ZodJSONSchema;
|
|
2163
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2164
|
+
message: z.ZodString;
|
|
2165
|
+
ok: z.ZodLiteral<false>;
|
|
2166
|
+
providerStatus: z.ZodOptional<z.ZodString>;
|
|
2167
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2168
|
+
retryAfter: z.ZodOptional<z.ZodString>;
|
|
2169
|
+
status: z.ZodNumber;
|
|
2170
|
+
}, z.core.$strip>], "ok">, Record<never, never>, Record<never, never>>;
|
|
2151
2171
|
startImageGeneration: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2152
2172
|
entrypoint: z.ZodString;
|
|
2153
2173
|
model: z.ZodDefault<z.ZodCustom<GatewayImageModelId, GatewayImageModelId>>;
|
|
@@ -2759,6 +2779,7 @@ export declare const runtimeContract: {
|
|
|
2759
2779
|
binding: z.ZodString;
|
|
2760
2780
|
serviceId: z.ZodString;
|
|
2761
2781
|
}, z.core.$strict>, z.ZodObject<{
|
|
2782
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
2762
2783
|
connectionMethodId: z.ZodString;
|
|
2763
2784
|
secret: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2764
2785
|
serviceId: z.ZodString;
|
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"
|
|
@@ -18,6 +19,7 @@ import { linearEventsContract } from "./linear"
|
|
|
18
19
|
import { millionVerifierEventsContract } from "./millionverifier"
|
|
19
20
|
import { mailhookEventsContract } from "./mailhook"
|
|
20
21
|
import { microsoftEventsContract } from "./microsoft"
|
|
22
|
+
import { metaAdsEventsContract } from "./meta-ads"
|
|
21
23
|
import { notionEventsContract } from "./notion"
|
|
22
24
|
import { resendEventsContract } from "./resend"
|
|
23
25
|
import { slackEventsContract } from "./slack"
|
|
@@ -38,6 +40,7 @@ export const eventsContract = {
|
|
|
38
40
|
...discordEventsContract,
|
|
39
41
|
...closeEventsContract,
|
|
40
42
|
...cloudflareEventsContract,
|
|
43
|
+
...clickUpEventsContract,
|
|
41
44
|
...googleCalendarEventsContract,
|
|
42
45
|
...googleDriveEventsContract,
|
|
43
46
|
...googleFormsEventsContract,
|
|
@@ -48,6 +51,7 @@ export const eventsContract = {
|
|
|
48
51
|
...millionVerifierEventsContract,
|
|
49
52
|
...mailhookEventsContract,
|
|
50
53
|
...microsoftEventsContract,
|
|
54
|
+
...metaAdsEventsContract,
|
|
51
55
|
...notionEventsContract,
|
|
52
56
|
...resendEventsContract,
|
|
53
57
|
...slackEventsContract,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { META_ADS_WEBHOOK_ENVELOPE_SCHEMA } from "@automate.ax/integration-contracts/meta-ads"
|
|
2
|
+
import { oc } from "@orpc/contract"
|
|
3
|
+
import * as z from "zod"
|
|
4
|
+
|
|
5
|
+
export const metaAdsEventsContract = {
|
|
6
|
+
metaAdsEvent: oc
|
|
7
|
+
.route({
|
|
8
|
+
description: "Receives and authenticates Meta Ads and Lead Ads webhooks.",
|
|
9
|
+
method: "POST",
|
|
10
|
+
operationId: "receiveMetaAdsEvent",
|
|
11
|
+
path: "/events/meta-ads",
|
|
12
|
+
successStatus: 200,
|
|
13
|
+
summary: "Receive a Meta Ads event",
|
|
14
|
+
tags: ["Events"],
|
|
15
|
+
})
|
|
16
|
+
.input(META_ADS_WEBHOOK_ENVELOPE_SCHEMA)
|
|
17
|
+
.output(z.void()),
|
|
18
|
+
}
|
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(),
|