Revert "Tweak/gitignore prisma zod (#1905)" (#1906)

This reverts commit 15bfeb30d7.
This commit is contained in:
Omar López authored and GitHub committed 2022-02-17 18:11:33 -07:00
1 parent 15bfeb30d7
commit 152bb57bc1
4 files changed
+1 -23

No files matched your search

-18
View File
@@ -2,8 +2,6 @@ import { z } from "zod";
import { LocationType } from "@calcom/lib/location";
import { _EventTypeModel } from "./zod/eventtype";
export const eventTypeLocations = z.array(
z.object({ type: z.nativeEnum(LocationType), address: z.string().optional() })
);
@@ -11,19 +9,3 @@ export const eventTypeLocations = z.array(
export const eventTypeSlug = z.string().transform((val) => val.trim());
export const stringToDate = z.string().transform((a) => new Date(a));
export const stringOrNumber = z.union([z.string().transform((v) => parseInt(v, 10)), z.number().int()]);
const createEventTypeBaseInput = _EventTypeModel
.pick({
title: true,
slug: true,
description: true,
length: true,
teamId: true,
schedulingType: true,
})
.refine((data) => (data.teamId ? data.teamId && data.schedulingType : true), {
path: ["schedulingType"],
message: "You must select a scheduling type for team events",
});
export const createEventTypeInput = createEventTypeBaseInput;