feat: update webhook handling and triggering

This commit is contained in:
Mythie
2024-02-27 15:16:14 +11:00
parent 488464e3e7
commit 7dd2bbd8ab
17 changed files with 263 additions and 90 deletions

View File

@ -0,0 +1,12 @@
import { z } from 'zod';
import { WebhookTriggerEvents } from '@documenso/prisma/client';
export const ZTriggerWebhookBodySchema = z.object({
event: z.nativeEnum(WebhookTriggerEvents),
data: z.unknown(),
userId: z.number(),
teamId: z.number().optional(),
});
export type TTriggerWebhookBodySchema = z.infer<typeof ZTriggerWebhookBodySchema>;