
* Moves locations to App Store and Core * LocationType fixes * Update App.d.ts * Re-add Google Meet * Moves location labels to the app store * Renames labels to locationLabels * Update utils.ts Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
16 lines
562 B
TypeScript
16 lines
562 B
TypeScript
import { z } from "zod";
|
|
|
|
import { LocationType } from "@calcom/core/location";
|
|
import { slugify } from "@calcom/lib/slugify";
|
|
|
|
export const eventTypeLocations = z.array(
|
|
z.object({
|
|
type: z.nativeEnum(LocationType),
|
|
address: z.string().optional(),
|
|
link: z.string().url().optional(),
|
|
})
|
|
);
|
|
|
|
export const eventTypeSlug = z.string().transform((val) => slugify(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()]);
|