mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
feat: update webhook handling and triggering
This commit is contained in:
12
packages/lib/server-only/webhooks/trigger/schema.ts
Normal file
12
packages/lib/server-only/webhooks/trigger/schema.ts
Normal 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>;
|
||||
Reference in New Issue
Block a user