evyos-frontend-development/frontend/app/api/users/update/schema.ts

21 lines
580 B
TypeScript

import { z } from "zod"
export const userUpdateSchema = z.object({
expiryStarts: z.string().optional(),
expiryEnds: z.string().optional(),
isConfirmed: z.boolean(),
isNotificationSend: z.boolean(),
tag: z.string().optional(),
email: z.string().email(),
phone: z.string().min(5),
person: z.string(),
collectionTokens: z.object({
defaultSelection: z.string(),
selectedBuildIDS: z.array(z.string()),
selectedCompanyIDS: z.array(z.string()),
}).optional()
})
export type UserUpdate = z.infer<typeof userUpdateSchema>