@automate.ax/api-contract 0.3.1 → 0.4.1
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/deployment.d.ts +4 -0
- package/dist/deployment.js +6 -0
- package/dist/events/gmail.d.ts +10 -0
- package/dist/events/gmail.js +26 -0
- package/dist/events/index.d.ts +9 -0
- package/dist/events/index.js +4 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +2 -0
- package/package.json +10 -4
package/dist/deployment.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ export declare const deploymentContract: {
|
|
|
13
13
|
deploymentId: z.ZodString;
|
|
14
14
|
projectId: z.ZodString;
|
|
15
15
|
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
+
automations: z.ZodArray<z.ZodObject<{
|
|
17
|
+
description: z.ZodString;
|
|
18
|
+
identityKey: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>;
|
|
16
20
|
id: z.ZodString;
|
|
17
21
|
job: z.ZodNullable<z.ZodObject<{
|
|
18
22
|
attempts: z.ZodNumber;
|
package/dist/deployment.js
CHANGED
|
@@ -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
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -158,6 +158,10 @@ export declare const contract: {
|
|
|
158
158
|
deploymentId: import("zod").ZodString;
|
|
159
159
|
projectId: import("zod").ZodString;
|
|
160
160
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
161
|
+
automations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
162
|
+
description: import("zod").ZodString;
|
|
163
|
+
identityKey: import("zod").ZodString;
|
|
164
|
+
}, import("zod/v4/core").$strip>>;
|
|
161
165
|
id: import("zod").ZodString;
|
|
162
166
|
job: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
163
167
|
attempts: import("zod").ZodNumber;
|
|
@@ -181,6 +185,15 @@ export declare const contract: {
|
|
|
181
185
|
}>;
|
|
182
186
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
183
187
|
};
|
|
188
|
+
events: {
|
|
189
|
+
gmailPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
190
|
+
message: import("zod").ZodObject<{
|
|
191
|
+
data: import("zod").ZodString;
|
|
192
|
+
messageId: import("zod").ZodString;
|
|
193
|
+
}, import("zod/v4/core").$strip>;
|
|
194
|
+
subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-gmail-push">;
|
|
195
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
196
|
+
};
|
|
184
197
|
org: {
|
|
185
198
|
canInvite: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
186
199
|
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
|
+
"version": "0.4.1",
|
|
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
|
|
26
|
+
"@automate.ax/codec": "0.4.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"
|