@automate.ax/api-contract 0.3.1 → 0.4.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,10 @@
1
+ import { z } from "zod";
2
+ export declare const gmailEventsContract: {
3
+ gmailPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4
+ message: z.ZodObject<{
5
+ data: z.ZodString;
6
+ messageId: z.ZodString;
7
+ }, z.core.$strip>;
8
+ subscription: z.ZodLiteral<"projects/opkitty/subscriptions/automate-ax-gmail-push">;
9
+ }, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
10
+ };
@@ -0,0 +1,26 @@
1
+ import { oc } from "@orpc/contract";
2
+ import { z } from "zod";
3
+ export const gmailEventsContract = {
4
+ gmailPush: oc
5
+ .route({
6
+ method: "POST",
7
+ path: "/events/gmail",
8
+ operationId: "receiveGmailPush",
9
+ summary: "Receive a Gmail push notification",
10
+ description: "Receives and authenticates Gmail mailbox notifications delivered by Google Cloud Pub/Sub.",
11
+ tags: ["Events"],
12
+ successStatus: 204,
13
+ })
14
+ .input(z.object({
15
+ /** Pub/Sub message containing the encoded Gmail notification. */
16
+ message: z.object({
17
+ /** Base64-encoded Gmail mailbox notification. */
18
+ data: z.string().min(1),
19
+ /** Provider-assigned identifier used to deduplicate delivery. */
20
+ messageId: z.string().min(1),
21
+ }),
22
+ /** Pub/Sub subscription that delivered the message. */
23
+ subscription: z.literal("projects/opkitty/subscriptions/automate-ax-gmail-push"),
24
+ }))
25
+ .output(z.void()),
26
+ };
@@ -0,0 +1,9 @@
1
+ export declare const eventsContract: {
2
+ gmailPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
3
+ message: import("zod").ZodObject<{
4
+ data: import("zod").ZodString;
5
+ messageId: import("zod").ZodString;
6
+ }, import("zod/v4/core").$strip>;
7
+ subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-gmail-push">;
8
+ }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
9
+ };
@@ -0,0 +1,4 @@
1
+ import { gmailEventsContract } from "./gmail.js";
2
+ export const eventsContract = {
3
+ ...gmailEventsContract,
4
+ };
package/dist/index.d.ts CHANGED
@@ -181,6 +181,15 @@ export declare const contract: {
181
181
  }>;
182
182
  }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
183
183
  };
184
+ events: {
185
+ gmailPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
186
+ message: import("zod").ZodObject<{
187
+ data: import("zod").ZodString;
188
+ messageId: import("zod").ZodString;
189
+ }, import("zod/v4/core").$strip>;
190
+ subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-gmail-push">;
191
+ }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
192
+ };
184
193
  org: {
185
194
  canInvite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
186
195
  organizationId: import("zod").ZodString;
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ import { apiKeyContract } from "./api-key.js";
2
2
  import { authContract } from "./auth.js";
3
3
  import { authorizationContract } from "./authorization.js";
4
4
  import { deploymentContract } from "./deployment.js";
5
+ import { eventsContract } from "./events/index.js";
5
6
  import { orgContract } from "./org.js";
6
7
  import { projectContract } from "./project.js";
7
8
  import { runtimeContract } from "./runtime.js";
@@ -15,6 +16,7 @@ export const contract = {
15
16
  apiKey: apiKeyContract,
16
17
  authorization: authorizationContract,
17
18
  deployment: deploymentContract,
19
+ events: eventsContract,
18
20
  org: orgContract,
19
21
  project: projectContract,
20
22
  runtime: runtimeContract,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/api-contract",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Public oRPC contract for the Automate.ax API.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,19 +23,25 @@
23
23
  "cjs": false
24
24
  },
25
25
  "dependencies": {
26
- "@automate.ax/codec": "0.1.3",
26
+ "@automate.ax/codec": "0.3.1",
27
27
  "@orpc/contract": "1.13.14",
28
28
  "zod": "^4.3.6"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@internal/config": "0.0.0",
32
32
  "@types/bun": "latest",
33
+ "@typescript/native": "npm:typescript@^7.0.2",
34
+ "@zachsents/oxlint-config": "^0.4.1",
35
+ "concurrently": "^10.0.4",
36
+ "eslint": "^9.39.5",
37
+ "oxlint": "^1.76.0",
38
+ "oxlint-tsgolint": "^7.0.2001",
33
39
  "zshy": "^0.7.2"
34
40
  },
35
41
  "scripts": {
36
42
  "typecheck": "tsc --noEmit",
37
- "lint": "oxlint --type-aware",
38
- "lint:fix": "oxlint --type-aware --fix-suggestions",
43
+ "lint": "concurrently --success all --kill-others-on-fail \"oxlint --type-aware\" \"bun --bun eslint .\"",
44
+ "lint:fix": "concurrently --success all --kill-others-on-fail \"oxlint --type-aware --fix --fix-suggestions\" \"bun --bun eslint . --fix\"",
39
45
  "check": "bun run typecheck && bun run lint",
40
46
  "build": "zshy",
41
47
  "prepublishOnly": "bun run check && bun run build"