@automate.ax/api-contract 0.112.10 → 0.114.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/google-sheets.d.ts +20 -0
- package/dist/events/google-sheets.js +32 -0
- package/dist/events/index.d.ts +17 -0
- package/dist/events/index.js +2 -0
- package/dist/index.d.ts +17 -0
- package/package.json +3 -3
- package/src/events/google-sheets.ts +38 -0
- package/src/events/index.ts +2 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const googleSheetsEventsContract: {
|
|
3
|
+
googleSheetsPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4
|
+
message: z.ZodObject<{
|
|
5
|
+
attributes: z.ZodObject<{
|
|
6
|
+
"ce-datacontenttype": z.ZodLiteral<"application/json">;
|
|
7
|
+
"ce-id": z.ZodString;
|
|
8
|
+
"ce-source": z.ZodString;
|
|
9
|
+
"ce-specversion": z.ZodLiteral<"1.0">;
|
|
10
|
+
"ce-subject": z.ZodString;
|
|
11
|
+
"ce-time": z.ZodISODateTime;
|
|
12
|
+
"ce-type": z.ZodString;
|
|
13
|
+
}, z.core.$loose>;
|
|
14
|
+
data: z.ZodString;
|
|
15
|
+
messageId: z.ZodString;
|
|
16
|
+
publishTime: z.ZodISODateTime;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
subscription: z.ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-sheets-push">;
|
|
19
|
+
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const googleSheetsEventsContract = {
|
|
4
|
+
googleSheetsPush: oc
|
|
5
|
+
.route({
|
|
6
|
+
method: "POST",
|
|
7
|
+
path: "/events/google-sheets",
|
|
8
|
+
operationId: "receiveGoogleSheetsPush",
|
|
9
|
+
summary: "Receive a Google Sheets change notification",
|
|
10
|
+
description: "Receives and authenticates Google Drive file-change CloudEvents delivered by Google Cloud Pub/Sub.",
|
|
11
|
+
tags: ["Events"],
|
|
12
|
+
successStatus: 204,
|
|
13
|
+
})
|
|
14
|
+
.input(z.object({
|
|
15
|
+
message: z.object({
|
|
16
|
+
attributes: z.looseObject({
|
|
17
|
+
"ce-datacontenttype": z.literal("application/json"),
|
|
18
|
+
"ce-id": z.string().min(1),
|
|
19
|
+
"ce-source": z.string().min(1),
|
|
20
|
+
"ce-specversion": z.literal("1.0"),
|
|
21
|
+
"ce-subject": z.string().min(1),
|
|
22
|
+
"ce-time": z.iso.datetime({ offset: true }),
|
|
23
|
+
"ce-type": z.string().min(1),
|
|
24
|
+
}),
|
|
25
|
+
data: z.string().min(1),
|
|
26
|
+
messageId: z.string().min(1),
|
|
27
|
+
publishTime: z.iso.datetime({ offset: true }),
|
|
28
|
+
}),
|
|
29
|
+
subscription: z.literal("projects/opkitty/subscriptions/automate-ax-google-sheets-push"),
|
|
30
|
+
}))
|
|
31
|
+
.output(z.void()),
|
|
32
|
+
};
|
package/dist/events/index.d.ts
CHANGED
|
@@ -3597,6 +3597,23 @@ export declare const eventsContract: {
|
|
|
3597
3597
|
}, import("zod/v4/core").$strip>;
|
|
3598
3598
|
subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-gmail-push">;
|
|
3599
3599
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
3600
|
+
googleSheetsPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
3601
|
+
message: import("zod").ZodObject<{
|
|
3602
|
+
attributes: import("zod").ZodObject<{
|
|
3603
|
+
"ce-datacontenttype": import("zod").ZodLiteral<"application/json">;
|
|
3604
|
+
"ce-id": import("zod").ZodString;
|
|
3605
|
+
"ce-source": import("zod").ZodString;
|
|
3606
|
+
"ce-specversion": import("zod").ZodLiteral<"1.0">;
|
|
3607
|
+
"ce-subject": import("zod").ZodString;
|
|
3608
|
+
"ce-time": import("zod").ZodISODateTime;
|
|
3609
|
+
"ce-type": import("zod").ZodString;
|
|
3610
|
+
}, import("zod/v4/core").$loose>;
|
|
3611
|
+
data: import("zod").ZodString;
|
|
3612
|
+
messageId: import("zod").ZodString;
|
|
3613
|
+
publishTime: import("zod").ZodISODateTime;
|
|
3614
|
+
}, import("zod/v4/core").$strip>;
|
|
3615
|
+
subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-sheets-push">;
|
|
3616
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
3600
3617
|
googleMeetPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
3601
3618
|
message: import("zod").ZodObject<{
|
|
3602
3619
|
attributes: import("zod").ZodObject<{
|
package/dist/events/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { cloudflareEventsContract } from "./cloudflare.js";
|
|
|
7
7
|
import { googleCalendarEventsContract } from "./google-calendar.js";
|
|
8
8
|
import { googleFormsEventsContract } from "./google-forms.js";
|
|
9
9
|
import { googleMeetEventsContract } from "./google-meet.js";
|
|
10
|
+
import { googleSheetsEventsContract } from "./google-sheets.js";
|
|
10
11
|
import { gmailEventsContract } from "./gmail.js";
|
|
11
12
|
import { githubEventsContract } from "./github.js";
|
|
12
13
|
import { linearEventsContract } from "./linear.js";
|
|
@@ -30,6 +31,7 @@ export const eventsContract = {
|
|
|
30
31
|
...googleCalendarEventsContract,
|
|
31
32
|
...googleFormsEventsContract,
|
|
32
33
|
...googleMeetEventsContract,
|
|
34
|
+
...googleSheetsEventsContract,
|
|
33
35
|
...gmailEventsContract,
|
|
34
36
|
...githubEventsContract,
|
|
35
37
|
...linearEventsContract,
|
package/dist/index.d.ts
CHANGED
|
@@ -5863,6 +5863,23 @@ export declare const contract: {
|
|
|
5863
5863
|
}, import("zod/v4/core").$strip>;
|
|
5864
5864
|
subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-gmail-push">;
|
|
5865
5865
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
5866
|
+
googleSheetsPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
5867
|
+
message: import("zod").ZodObject<{
|
|
5868
|
+
attributes: import("zod").ZodObject<{
|
|
5869
|
+
"ce-datacontenttype": import("zod").ZodLiteral<"application/json">;
|
|
5870
|
+
"ce-id": import("zod").ZodString;
|
|
5871
|
+
"ce-source": import("zod").ZodString;
|
|
5872
|
+
"ce-specversion": import("zod").ZodLiteral<"1.0">;
|
|
5873
|
+
"ce-subject": import("zod").ZodString;
|
|
5874
|
+
"ce-time": import("zod").ZodISODateTime;
|
|
5875
|
+
"ce-type": import("zod").ZodString;
|
|
5876
|
+
}, import("zod/v4/core").$loose>;
|
|
5877
|
+
data: import("zod").ZodString;
|
|
5878
|
+
messageId: import("zod").ZodString;
|
|
5879
|
+
publishTime: import("zod").ZodISODateTime;
|
|
5880
|
+
}, import("zod/v4/core").$strip>;
|
|
5881
|
+
subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-sheets-push">;
|
|
5882
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
5866
5883
|
googleMeetPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
5867
5884
|
message: import("zod").ZodObject<{
|
|
5868
5885
|
attributes: import("zod").ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.114.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
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.114.0",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.114.0",
|
|
36
36
|
"@orpc/contract": "1.15.0",
|
|
37
37
|
"fast-json-stable-stringify": "^2.1.0",
|
|
38
38
|
"zod": "^4.3.6"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract"
|
|
2
|
+
import { z } from "zod"
|
|
3
|
+
|
|
4
|
+
export const googleSheetsEventsContract = {
|
|
5
|
+
googleSheetsPush: oc
|
|
6
|
+
.route({
|
|
7
|
+
method: "POST",
|
|
8
|
+
path: "/events/google-sheets",
|
|
9
|
+
operationId: "receiveGoogleSheetsPush",
|
|
10
|
+
summary: "Receive a Google Sheets change notification",
|
|
11
|
+
description:
|
|
12
|
+
"Receives and authenticates Google Drive file-change CloudEvents delivered by Google Cloud Pub/Sub.",
|
|
13
|
+
tags: ["Events"],
|
|
14
|
+
successStatus: 204,
|
|
15
|
+
})
|
|
16
|
+
.input(
|
|
17
|
+
z.object({
|
|
18
|
+
message: z.object({
|
|
19
|
+
attributes: z.looseObject({
|
|
20
|
+
"ce-datacontenttype": z.literal("application/json"),
|
|
21
|
+
"ce-id": z.string().min(1),
|
|
22
|
+
"ce-source": z.string().min(1),
|
|
23
|
+
"ce-specversion": z.literal("1.0"),
|
|
24
|
+
"ce-subject": z.string().min(1),
|
|
25
|
+
"ce-time": z.iso.datetime({ offset: true }),
|
|
26
|
+
"ce-type": z.string().min(1),
|
|
27
|
+
}),
|
|
28
|
+
data: z.string().min(1),
|
|
29
|
+
messageId: z.string().min(1),
|
|
30
|
+
publishTime: z.iso.datetime({ offset: true }),
|
|
31
|
+
}),
|
|
32
|
+
subscription: z.literal(
|
|
33
|
+
"projects/opkitty/subscriptions/automate-ax-google-sheets-push",
|
|
34
|
+
),
|
|
35
|
+
}),
|
|
36
|
+
)
|
|
37
|
+
.output(z.void()),
|
|
38
|
+
}
|
package/src/events/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { cloudflareEventsContract } from "./cloudflare"
|
|
|
7
7
|
import { googleCalendarEventsContract } from "./google-calendar"
|
|
8
8
|
import { googleFormsEventsContract } from "./google-forms"
|
|
9
9
|
import { googleMeetEventsContract } from "./google-meet"
|
|
10
|
+
import { googleSheetsEventsContract } from "./google-sheets"
|
|
10
11
|
import { gmailEventsContract } from "./gmail"
|
|
11
12
|
import { githubEventsContract } from "./github"
|
|
12
13
|
import { linearEventsContract } from "./linear"
|
|
@@ -31,6 +32,7 @@ export const eventsContract = {
|
|
|
31
32
|
...googleCalendarEventsContract,
|
|
32
33
|
...googleFormsEventsContract,
|
|
33
34
|
...googleMeetEventsContract,
|
|
35
|
+
...googleSheetsEventsContract,
|
|
34
36
|
...gmailEventsContract,
|
|
35
37
|
...githubEventsContract,
|
|
36
38
|
...linearEventsContract,
|