@automate.ax/api-contract 0.83.2 → 0.84.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/index.d.ts +3 -0
- package/dist/events/index.js +2 -0
- package/dist/events/stripe.d.ts +6 -0
- package/dist/events/stripe.js +16 -0
- package/dist/index.d.ts +4 -0
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1 -0
- package/package.json +3 -3
- package/src/events/index.ts +2 -0
- package/src/events/stripe.ts +18 -0
- package/src/runtime.ts +1 -0
package/dist/events/index.d.ts
CHANGED
|
@@ -22,6 +22,9 @@ export declare const eventsContract: {
|
|
|
22
22
|
trelloWebhookProbe: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
23
23
|
sourceId: import("zod").ZodString;
|
|
24
24
|
}, import("zod/v4/core").$loose>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
25
|
+
stripeEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
26
|
+
sourceId: import("zod").ZodString;
|
|
27
|
+
}, import("zod/v4/core").$loose>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
25
28
|
slackEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
26
29
|
type: import("zod").ZodString;
|
|
27
30
|
}, import("zod/v4/core").$loose>, import("zod").ZodObject<{
|
package/dist/events/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { mailhookEventsContract } from "./mailhook.js";
|
|
|
12
12
|
import { microsoftEventsContract } from "./microsoft.js";
|
|
13
13
|
import { resendEventsContract } from "./resend.js";
|
|
14
14
|
import { slackEventsContract } from "./slack.js";
|
|
15
|
+
import { stripeEventsContract } from "./stripe.js";
|
|
15
16
|
import { trelloEventsContract } from "./trello.js";
|
|
16
17
|
import { vercelEventsContract } from "./vercel.js";
|
|
17
18
|
import { whatsappEventsContract } from "./whatsapp.js";
|
|
@@ -30,6 +31,7 @@ export const eventsContract = {
|
|
|
30
31
|
...microsoftEventsContract,
|
|
31
32
|
...resendEventsContract,
|
|
32
33
|
...slackEventsContract,
|
|
34
|
+
...stripeEventsContract,
|
|
33
35
|
...trelloEventsContract,
|
|
34
36
|
...vercelEventsContract,
|
|
35
37
|
...whatsappEventsContract,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const stripeEventsContract: {
|
|
3
|
+
stripeEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4
|
+
sourceId: z.ZodString;
|
|
5
|
+
}, z.core.$loose>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
export const stripeEventsContract = {
|
|
4
|
+
stripeEvent: oc
|
|
5
|
+
.route({
|
|
6
|
+
method: "POST",
|
|
7
|
+
path: "/events/stripe/{sourceId}",
|
|
8
|
+
operationId: "receiveStripeEvent",
|
|
9
|
+
summary: "Receive a Stripe event",
|
|
10
|
+
description: "Receives and authenticates callbacks delivered by Stripe webhooks.",
|
|
11
|
+
tags: ["Events"],
|
|
12
|
+
successStatus: 204,
|
|
13
|
+
})
|
|
14
|
+
.input(z.looseObject({ sourceId: z.string() }))
|
|
15
|
+
.output(z.void()),
|
|
16
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2148,6 +2148,9 @@ export declare const contract: {
|
|
|
2148
2148
|
trelloWebhookProbe: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2149
2149
|
sourceId: import("zod").ZodString;
|
|
2150
2150
|
}, import("zod/v4/core").$loose>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
2151
|
+
stripeEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2152
|
+
sourceId: import("zod").ZodString;
|
|
2153
|
+
}, import("zod/v4/core").$loose>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
2151
2154
|
slackEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2152
2155
|
type: import("zod").ZodString;
|
|
2153
2156
|
}, import("zod/v4/core").$loose>, import("zod").ZodObject<{
|
|
@@ -3456,6 +3459,7 @@ export declare const contract: {
|
|
|
3456
3459
|
startedAt: import("zod").ZodDate;
|
|
3457
3460
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
3458
3461
|
sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
3462
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
3459
3463
|
replyTo: import("zod").ZodOptional<import("zod").ZodEmail>;
|
|
3460
3464
|
subject: import("zod").ZodString;
|
|
3461
3465
|
to: import("zod").ZodDefault<import("zod").ZodUnion<readonly [import("zod").ZodEmail, import("zod").ZodLiteral<"*">]>>;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1681,6 +1681,7 @@ export declare const runtimeContract: {
|
|
|
1681
1681
|
startedAt: z.ZodDate;
|
|
1682
1682
|
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1683
1683
|
sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
1684
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1684
1685
|
replyTo: z.ZodOptional<z.ZodEmail>;
|
|
1685
1686
|
subject: z.ZodString;
|
|
1686
1687
|
to: z.ZodDefault<z.ZodUnion<readonly [z.ZodEmail, z.ZodLiteral<"*">]>>;
|
package/dist/runtime.js
CHANGED
|
@@ -721,6 +721,7 @@ export const runtimeContract = {
|
|
|
721
721
|
sendEmail: oc
|
|
722
722
|
.input(z
|
|
723
723
|
.object({
|
|
724
|
+
headers: z.record(z.string().min(1), z.string()).optional(),
|
|
724
725
|
replyTo: z.email().optional(),
|
|
725
726
|
subject: z.string().min(1),
|
|
726
727
|
to: z.union([z.email(), z.literal("*")]).default("*"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.84.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.84.0",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.84.0",
|
|
36
36
|
"@orpc/contract": "1.15.0",
|
|
37
37
|
"fast-json-stable-stringify": "^2.1.0",
|
|
38
38
|
"zod": "^4.3.6"
|
package/src/events/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { mailhookEventsContract } from "./mailhook"
|
|
|
12
12
|
import { microsoftEventsContract } from "./microsoft"
|
|
13
13
|
import { resendEventsContract } from "./resend"
|
|
14
14
|
import { slackEventsContract } from "./slack"
|
|
15
|
+
import { stripeEventsContract } from "./stripe"
|
|
15
16
|
import { trelloEventsContract } from "./trello"
|
|
16
17
|
import { vercelEventsContract } from "./vercel"
|
|
17
18
|
import { whatsappEventsContract } from "./whatsapp"
|
|
@@ -31,6 +32,7 @@ export const eventsContract = {
|
|
|
31
32
|
...microsoftEventsContract,
|
|
32
33
|
...resendEventsContract,
|
|
33
34
|
...slackEventsContract,
|
|
35
|
+
...stripeEventsContract,
|
|
34
36
|
...trelloEventsContract,
|
|
35
37
|
...vercelEventsContract,
|
|
36
38
|
...whatsappEventsContract,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract"
|
|
2
|
+
import * as z from "zod"
|
|
3
|
+
|
|
4
|
+
export const stripeEventsContract = {
|
|
5
|
+
stripeEvent: oc
|
|
6
|
+
.route({
|
|
7
|
+
method: "POST",
|
|
8
|
+
path: "/events/stripe/{sourceId}",
|
|
9
|
+
operationId: "receiveStripeEvent",
|
|
10
|
+
summary: "Receive a Stripe event",
|
|
11
|
+
description:
|
|
12
|
+
"Receives and authenticates callbacks delivered by Stripe webhooks.",
|
|
13
|
+
tags: ["Events"],
|
|
14
|
+
successStatus: 204,
|
|
15
|
+
})
|
|
16
|
+
.input(z.looseObject({ sourceId: z.string() }))
|
|
17
|
+
.output(z.void()),
|
|
18
|
+
}
|
package/src/runtime.ts
CHANGED
|
@@ -839,6 +839,7 @@ export const runtimeContract = {
|
|
|
839
839
|
.input(
|
|
840
840
|
z
|
|
841
841
|
.object({
|
|
842
|
+
headers: z.record(z.string().min(1), z.string()).optional(),
|
|
842
843
|
replyTo: z.email().optional(),
|
|
843
844
|
subject: z.string().min(1),
|
|
844
845
|
to: z.union([z.email(), z.literal("*")]).default("*"),
|