2023-09-29 17:26:37 +01:00
|
|
|
import { Role } from '@prisma/client';
|
|
|
|
|
import z from 'zod';
|
|
|
|
|
|
|
|
|
|
export const ZUpdateProfileMutationByAdminSchema = z.object({
|
|
|
|
|
id: z.number().min(1),
|
2023-10-02 11:38:04 +01:00
|
|
|
name: z.string().nullish(),
|
|
|
|
|
email: z.string().email().optional(),
|
|
|
|
|
roles: z.array(z.nativeEnum(Role)).optional(),
|
2023-09-29 17:26:37 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export type TUpdateProfileMutationByAdminSchema = z.infer<
|
|
|
|
|
typeof ZUpdateProfileMutationByAdminSchema
|
|
|
|
|
>;
|