@automate.ax/api-contract 0.120.0 → 0.121.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.
@@ -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
+ };
@@ -3627,6 +3627,14 @@ export declare const eventsContract: {
3627
3627
  }, import("zod/v4/core").$strip>;
3628
3628
  subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-sheets-push">;
3629
3629
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
3630
+ hubspotEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodArray<import("zod").ZodObject<{
3631
+ attemptNumber: import("zod").ZodNumber;
3632
+ eventId: import("zod").ZodNumber;
3633
+ objectId: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodString]>>;
3634
+ portalId: import("zod").ZodNumber;
3635
+ subscriptionId: import("zod").ZodNumber;
3636
+ subscriptionType: import("zod").ZodString;
3637
+ }, import("zod/v4/core").$loose>>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
3630
3638
  googleMeetPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
3631
3639
  message: import("zod").ZodObject<{
3632
3640
  attributes: import("zod").ZodObject<{
@@ -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 { hubspotEventsContract } from "./hubspot.js";
10
11
  import { googleSheetsEventsContract } from "./google-sheets.js";
11
12
  import { gmailEventsContract } from "./gmail.js";
12
13
  import { githubEventsContract } from "./github.js";
@@ -32,6 +33,7 @@ export const eventsContract = {
32
33
  ...googleCalendarEventsContract,
33
34
  ...googleFormsEventsContract,
34
35
  ...googleMeetEventsContract,
36
+ ...hubspotEventsContract,
35
37
  ...googleSheetsEventsContract,
36
38
  ...gmailEventsContract,
37
39
  ...githubEventsContract,
package/dist/index.d.ts CHANGED
@@ -5893,6 +5893,14 @@ export declare const contract: {
5893
5893
  }, import("zod/v4/core").$strip>;
5894
5894
  subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-sheets-push">;
5895
5895
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
5896
+ hubspotEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodArray<import("zod").ZodObject<{
5897
+ attemptNumber: import("zod").ZodNumber;
5898
+ eventId: import("zod").ZodNumber;
5899
+ objectId: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodString]>>;
5900
+ portalId: import("zod").ZodNumber;
5901
+ subscriptionId: import("zod").ZodNumber;
5902
+ subscriptionType: import("zod").ZodString;
5903
+ }, import("zod/v4/core").$loose>>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
5896
5904
  googleMeetPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5897
5905
  message: import("zod").ZodObject<{
5898
5906
  attributes: import("zod").ZodObject<{
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.121.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.121.0",
35
+ "@automate.ax/integration-contracts": "0.121.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,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
+ }
@@ -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 { hubspotEventsContract } from "./hubspot"
10
11
  import { googleSheetsEventsContract } from "./google-sheets"
11
12
  import { gmailEventsContract } from "./gmail"
12
13
  import { githubEventsContract } from "./github"
@@ -33,6 +34,7 @@ export const eventsContract = {
33
34
  ...googleCalendarEventsContract,
34
35
  ...googleFormsEventsContract,
35
36
  ...googleMeetEventsContract,
37
+ ...hubspotEventsContract,
36
38
  ...googleSheetsEventsContract,
37
39
  ...gmailEventsContract,
38
40
  ...githubEventsContract,