mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
Co-authored-by: Carina Wollendorfer <[email protected]> Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: zomars <[email protected]>
22 lines
809 B
TypeScript
22 lines
809 B
TypeScript
import { z } from "zod";
|
|
|
|
import { TIME_UNIT } from "@calcom/features/ee/workflows/lib/constants";
|
|
import { WEBHOOK_TRIGGER_EVENTS } from "@calcom/features/webhooks/lib/constants";
|
|
|
|
import { webhookIdAndEventTypeIdSchema } from "./types";
|
|
|
|
export const ZEditInputSchema = webhookIdAndEventTypeIdSchema.extend({
|
|
id: z.string(),
|
|
subscriberUrl: z.string().url().optional(),
|
|
eventTriggers: z.enum(WEBHOOK_TRIGGER_EVENTS).array().optional(),
|
|
active: z.boolean().optional(),
|
|
payloadTemplate: z.string().nullable(),
|
|
eventTypeId: z.number().optional(),
|
|
appId: z.string().optional().nullable(),
|
|
secret: z.string().optional().nullable(),
|
|
time: z.number().nullable().optional(),
|
|
timeUnit: z.enum(TIME_UNIT).nullable().optional(),
|
|
});
|
|
|
|
export type TEditInputSchema = z.infer<typeof ZEditInputSchema>;
|