mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-08 02:58:40 -06:00
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
15 lines
490 B
TypeScript
15 lines
490 B
TypeScript
import type { Webhook } from "@prisma/client";
|
|
import { z } from "zod";
|
|
|
|
export const ZWebhook = z.object({
|
|
id: z.string().cuid2(),
|
|
name: z.string().nullable(),
|
|
createdAt: z.date(),
|
|
updatedAt: z.date(),
|
|
url: z.string().url(),
|
|
source: z.enum(["user", "zapier", "make", "n8n"]),
|
|
environmentId: z.string().cuid2(),
|
|
triggers: z.array(z.enum(["responseFinished", "responseCreated", "responseUpdated"])),
|
|
surveyIds: z.array(z.string().cuid2()),
|
|
}) satisfies z.ZodType<Webhook>;
|