@automate.ax/api-contract 0.120.0 → 0.122.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.
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- export declare const googleSheetsEventsContract: {
3
- googleSheetsPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2
+ export declare const googleDriveEventsContract: {
3
+ googleDrivePush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4
4
  message: z.ZodObject<{
5
5
  attributes: z.ZodObject<{
6
6
  "ce-datacontenttype": z.ZodLiteral<"application/json">;
@@ -15,6 +15,6 @@ export declare const googleSheetsEventsContract: {
15
15
  messageId: z.ZodString;
16
16
  publishTime: z.ZodISODateTime;
17
17
  }, z.core.$strip>;
18
- subscription: z.ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-sheets-push">;
18
+ subscription: z.ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-drive-push">;
19
19
  }, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
20
20
  };
@@ -1,13 +1,13 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- export const googleSheetsEventsContract = {
4
- googleSheetsPush: oc
3
+ export const googleDriveEventsContract = {
4
+ googleDrivePush: oc
5
5
  .route({
6
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.",
7
+ path: "/events/google-drive",
8
+ operationId: "receiveGoogleDrivePush",
9
+ summary: "Receive a Google Drive push notification",
10
+ description: "Receives and authenticates Google Drive CloudEvents delivered by Google Cloud Pub/Sub.",
11
11
  tags: ["Events"],
12
12
  successStatus: 204,
13
13
  })
@@ -26,7 +26,7 @@ export const googleSheetsEventsContract = {
26
26
  messageId: z.string().min(1),
27
27
  publishTime: z.iso.datetime({ offset: true }),
28
28
  }),
29
- subscription: z.literal("projects/opkitty/subscriptions/automate-ax-google-sheets-push"),
29
+ subscription: z.literal("projects/opkitty/subscriptions/automate-ax-google-drive-push"),
30
30
  }))
31
31
  .output(z.void()),
32
32
  };
@@ -0,0 +1,11 @@
1
+ import * as z from "zod";
2
+ export declare const hubspotEventsContract: {
3
+ hubspotEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodArray<z.ZodObject<{
4
+ attemptNumber: z.ZodNumber;
5
+ eventId: z.ZodNumber;
6
+ objectId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
7
+ portalId: z.ZodNumber;
8
+ subscriptionId: z.ZodNumber;
9
+ subscriptionType: z.ZodString;
10
+ }, z.core.$loose>>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
11
+ };
@@ -0,0 +1,26 @@
1
+ import { oc } from "@orpc/contract";
2
+ import * as z from "zod";
3
+ export const hubspotEventsContract = {
4
+ hubspotEvent: oc
5
+ .route({
6
+ description: "Receives and authenticates callbacks delivered by HubSpot webhooks.",
7
+ method: "POST",
8
+ operationId: "receiveHubSpotEvent",
9
+ path: "/events/hubspot",
10
+ successStatus: 200,
11
+ summary: "Receive HubSpot events",
12
+ tags: ["Events"],
13
+ })
14
+ .input(z
15
+ .looseObject({
16
+ attemptNumber: z.number(),
17
+ eventId: z.number(),
18
+ objectId: z.union([z.number(), z.string()]).optional(),
19
+ portalId: z.number(),
20
+ subscriptionId: z.number(),
21
+ subscriptionType: z.string(),
22
+ })
23
+ .array()
24
+ .max(100))
25
+ .output(z.object({})),
26
+ };
@@ -3610,23 +3610,14 @@ export declare const eventsContract: {
3610
3610
  }, import("zod/v4/core").$strip>;
3611
3611
  subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-gmail-push">;
3612
3612
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
3613
- googleSheetsPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
3614
- message: import("zod").ZodObject<{
3615
- attributes: import("zod").ZodObject<{
3616
- "ce-datacontenttype": import("zod").ZodLiteral<"application/json">;
3617
- "ce-id": import("zod").ZodString;
3618
- "ce-source": import("zod").ZodString;
3619
- "ce-specversion": import("zod").ZodLiteral<"1.0">;
3620
- "ce-subject": import("zod").ZodString;
3621
- "ce-time": import("zod").ZodISODateTime;
3622
- "ce-type": import("zod").ZodString;
3623
- }, import("zod/v4/core").$loose>;
3624
- data: import("zod").ZodString;
3625
- messageId: import("zod").ZodString;
3626
- publishTime: import("zod").ZodISODateTime;
3627
- }, import("zod/v4/core").$strip>;
3628
- subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-sheets-push">;
3629
- }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
3613
+ hubspotEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodArray<import("zod").ZodObject<{
3614
+ attemptNumber: import("zod").ZodNumber;
3615
+ eventId: import("zod").ZodNumber;
3616
+ objectId: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodString]>>;
3617
+ portalId: import("zod").ZodNumber;
3618
+ subscriptionId: import("zod").ZodNumber;
3619
+ subscriptionType: import("zod").ZodString;
3620
+ }, import("zod/v4/core").$loose>>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
3630
3621
  googleMeetPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
3631
3622
  message: import("zod").ZodObject<{
3632
3623
  attributes: import("zod").ZodObject<{
@@ -3659,6 +3650,23 @@ export declare const eventsContract: {
3659
3650
  }, import("zod/v4/core").$strip>;
3660
3651
  subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-forms-push">;
3661
3652
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
3653
+ googleDrivePush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
3654
+ message: import("zod").ZodObject<{
3655
+ attributes: import("zod").ZodObject<{
3656
+ "ce-datacontenttype": import("zod").ZodLiteral<"application/json">;
3657
+ "ce-id": import("zod").ZodString;
3658
+ "ce-source": import("zod").ZodString;
3659
+ "ce-specversion": import("zod").ZodLiteral<"1.0">;
3660
+ "ce-subject": import("zod").ZodString;
3661
+ "ce-time": import("zod").ZodISODateTime;
3662
+ "ce-type": import("zod").ZodString;
3663
+ }, import("zod/v4/core").$loose>;
3664
+ data: import("zod").ZodString;
3665
+ messageId: import("zod").ZodString;
3666
+ publishTime: import("zod").ZodISODateTime;
3667
+ }, import("zod/v4/core").$strip>;
3668
+ subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-drive-push">;
3669
+ }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
3662
3670
  googleCalendarPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodVoid, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
3663
3671
  cloudflareEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
3664
3672
  sourceId: import("zod").ZodString;
@@ -6,8 +6,9 @@ import { closeEventsContract } from "./close.js";
6
6
  import { cloudflareEventsContract } from "./cloudflare.js";
7
7
  import { googleCalendarEventsContract } from "./google-calendar.js";
8
8
  import { googleFormsEventsContract } from "./google-forms.js";
9
+ import { googleDriveEventsContract } from "./google-drive.js";
9
10
  import { googleMeetEventsContract } from "./google-meet.js";
10
- import { googleSheetsEventsContract } from "./google-sheets.js";
11
+ import { hubspotEventsContract } from "./hubspot.js";
11
12
  import { gmailEventsContract } from "./gmail.js";
12
13
  import { githubEventsContract } from "./github.js";
13
14
  import { linearEventsContract } from "./linear.js";
@@ -30,9 +31,10 @@ export const eventsContract = {
30
31
  ...closeEventsContract,
31
32
  ...cloudflareEventsContract,
32
33
  ...googleCalendarEventsContract,
34
+ ...googleDriveEventsContract,
33
35
  ...googleFormsEventsContract,
34
36
  ...googleMeetEventsContract,
35
- ...googleSheetsEventsContract,
37
+ ...hubspotEventsContract,
36
38
  ...gmailEventsContract,
37
39
  ...githubEventsContract,
38
40
  ...linearEventsContract,
package/dist/index.d.ts CHANGED
@@ -5876,23 +5876,14 @@ export declare const contract: {
5876
5876
  }, import("zod/v4/core").$strip>;
5877
5877
  subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-gmail-push">;
5878
5878
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
5879
- googleSheetsPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5880
- message: import("zod").ZodObject<{
5881
- attributes: import("zod").ZodObject<{
5882
- "ce-datacontenttype": import("zod").ZodLiteral<"application/json">;
5883
- "ce-id": import("zod").ZodString;
5884
- "ce-source": import("zod").ZodString;
5885
- "ce-specversion": import("zod").ZodLiteral<"1.0">;
5886
- "ce-subject": import("zod").ZodString;
5887
- "ce-time": import("zod").ZodISODateTime;
5888
- "ce-type": import("zod").ZodString;
5889
- }, import("zod/v4/core").$loose>;
5890
- data: import("zod").ZodString;
5891
- messageId: import("zod").ZodString;
5892
- publishTime: import("zod").ZodISODateTime;
5893
- }, import("zod/v4/core").$strip>;
5894
- subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-sheets-push">;
5895
- }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
5879
+ hubspotEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodArray<import("zod").ZodObject<{
5880
+ attemptNumber: import("zod").ZodNumber;
5881
+ eventId: import("zod").ZodNumber;
5882
+ objectId: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodString]>>;
5883
+ portalId: import("zod").ZodNumber;
5884
+ subscriptionId: import("zod").ZodNumber;
5885
+ subscriptionType: import("zod").ZodString;
5886
+ }, import("zod/v4/core").$loose>>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
5896
5887
  googleMeetPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5897
5888
  message: import("zod").ZodObject<{
5898
5889
  attributes: import("zod").ZodObject<{
@@ -5925,6 +5916,23 @@ export declare const contract: {
5925
5916
  }, import("zod/v4/core").$strip>;
5926
5917
  subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-forms-push">;
5927
5918
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
5919
+ googleDrivePush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5920
+ message: import("zod").ZodObject<{
5921
+ attributes: import("zod").ZodObject<{
5922
+ "ce-datacontenttype": import("zod").ZodLiteral<"application/json">;
5923
+ "ce-id": import("zod").ZodString;
5924
+ "ce-source": import("zod").ZodString;
5925
+ "ce-specversion": import("zod").ZodLiteral<"1.0">;
5926
+ "ce-subject": import("zod").ZodString;
5927
+ "ce-time": import("zod").ZodISODateTime;
5928
+ "ce-type": import("zod").ZodString;
5929
+ }, import("zod/v4/core").$loose>;
5930
+ data: import("zod").ZodString;
5931
+ messageId: import("zod").ZodString;
5932
+ publishTime: import("zod").ZodISODateTime;
5933
+ }, import("zod/v4/core").$strip>;
5934
+ subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-drive-push">;
5935
+ }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
5928
5936
  googleCalendarPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodVoid, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
5929
5937
  cloudflareEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5930
5938
  sourceId: import("zod").ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/api-contract",
3
- "version": "0.120.0",
3
+ "version": "0.122.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.120.0",
35
- "@automate.ax/integration-contracts": "0.120.0",
34
+ "@automate.ax/codec": "0.122.0",
35
+ "@automate.ax/integration-contracts": "0.122.0",
36
36
  "@orpc/contract": "1.15.0",
37
37
  "fast-json-stable-stringify": "^2.1.0",
38
38
  "zod": "^4.3.6"
@@ -48,7 +48,7 @@
48
48
  "zshy": "^0.7.2"
49
49
  },
50
50
  "scripts": {
51
- "typecheck": "tsc --noEmit",
51
+ "typecheck": "resource-broker run --pool automate-ax-validation --limit 2 --weight 1 -- tsc --noEmit",
52
52
  "lint": "oxlint --type-aware --threads=2 && bun --bun eslint . --cache --cache-strategy content",
53
53
  "lint:fix": "oxlint --type-aware --threads=2 --fix --fix-suggestions && bun --bun eslint . --fix --cache --cache-strategy content",
54
54
  "check": "bun run typecheck && bun run lint",
@@ -1,15 +1,15 @@
1
1
  import { oc } from "@orpc/contract"
2
2
  import { z } from "zod"
3
3
 
4
- export const googleSheetsEventsContract = {
5
- googleSheetsPush: oc
4
+ export const googleDriveEventsContract = {
5
+ googleDrivePush: oc
6
6
  .route({
7
7
  method: "POST",
8
- path: "/events/google-sheets",
9
- operationId: "receiveGoogleSheetsPush",
10
- summary: "Receive a Google Sheets change notification",
8
+ path: "/events/google-drive",
9
+ operationId: "receiveGoogleDrivePush",
10
+ summary: "Receive a Google Drive push notification",
11
11
  description:
12
- "Receives and authenticates Google Drive file-change CloudEvents delivered by Google Cloud Pub/Sub.",
12
+ "Receives and authenticates Google Drive CloudEvents delivered by Google Cloud Pub/Sub.",
13
13
  tags: ["Events"],
14
14
  successStatus: 204,
15
15
  })
@@ -30,7 +30,7 @@ export const googleSheetsEventsContract = {
30
30
  publishTime: z.iso.datetime({ offset: true }),
31
31
  }),
32
32
  subscription: z.literal(
33
- "projects/opkitty/subscriptions/automate-ax-google-sheets-push",
33
+ "projects/opkitty/subscriptions/automate-ax-google-drive-push",
34
34
  ),
35
35
  }),
36
36
  )
@@ -0,0 +1,30 @@
1
+ import { oc } from "@orpc/contract"
2
+ import * as z from "zod"
3
+
4
+ export const hubspotEventsContract = {
5
+ hubspotEvent: oc
6
+ .route({
7
+ description:
8
+ "Receives and authenticates callbacks delivered by HubSpot webhooks.",
9
+ method: "POST",
10
+ operationId: "receiveHubSpotEvent",
11
+ path: "/events/hubspot",
12
+ successStatus: 200,
13
+ summary: "Receive HubSpot events",
14
+ tags: ["Events"],
15
+ })
16
+ .input(
17
+ z
18
+ .looseObject({
19
+ attemptNumber: z.number(),
20
+ eventId: z.number(),
21
+ objectId: z.union([z.number(), z.string()]).optional(),
22
+ portalId: z.number(),
23
+ subscriptionId: z.number(),
24
+ subscriptionType: z.string(),
25
+ })
26
+ .array()
27
+ .max(100),
28
+ )
29
+ .output(z.object({})),
30
+ }
@@ -6,8 +6,9 @@ import { closeEventsContract } from "./close"
6
6
  import { cloudflareEventsContract } from "./cloudflare"
7
7
  import { googleCalendarEventsContract } from "./google-calendar"
8
8
  import { googleFormsEventsContract } from "./google-forms"
9
+ import { googleDriveEventsContract } from "./google-drive"
9
10
  import { googleMeetEventsContract } from "./google-meet"
10
- import { googleSheetsEventsContract } from "./google-sheets"
11
+ import { hubspotEventsContract } from "./hubspot"
11
12
  import { gmailEventsContract } from "./gmail"
12
13
  import { githubEventsContract } from "./github"
13
14
  import { linearEventsContract } from "./linear"
@@ -31,9 +32,10 @@ export const eventsContract = {
31
32
  ...closeEventsContract,
32
33
  ...cloudflareEventsContract,
33
34
  ...googleCalendarEventsContract,
35
+ ...googleDriveEventsContract,
34
36
  ...googleFormsEventsContract,
35
37
  ...googleMeetEventsContract,
36
- ...googleSheetsEventsContract,
38
+ ...hubspotEventsContract,
37
39
  ...gmailEventsContract,
38
40
  ...githubEventsContract,
39
41
  ...linearEventsContract,