cal.pub0.org/packages/trpc/server/routers/viewer/teams/inviteMember.schema.ts

14 lines
439 B
TypeScript

import { z } from "zod";
import { MembershipRole } from "@calcom/prisma/enums";
export const ZInviteMemberInputSchema = z.object({
teamId: z.number(),
usernameOrEmail: z.string().transform((usernameOrEmail) => usernameOrEmail.trim().toLowerCase()),
role: z.nativeEnum(MembershipRole),
language: z.string(),
sendEmailInvitation: z.boolean(),
});
export type TInviteMemberInputSchema = z.infer<typeof ZInviteMemberInputSchema>;