Files
sign/packages/trpc/server/auth-router/schema.ts

19 lines
587 B
TypeScript
Raw Normal View History

2023-06-09 18:21:18 +10:00
import { z } from 'zod';
export const ZSignUpMutationSchema = z.object({
name: z.string().min(1),
email: z.string().email(),
password: z.string().min(6),
2023-09-01 19:46:44 +10:00
signature: z.string().min(1, { message: 'A signature is required.' }),
2023-06-09 18:21:18 +10:00
});
export type TSignUpMutationSchema = z.infer<typeof ZSignUpMutationSchema>;
export const ZVerifyPasswordMutationSchema = ZSignUpMutationSchema.pick({ password: true });
export const ZDeleteAccountMutationSchema = z.object({
email: z.string().email(),
});
export type TDeleteAccountMutationSchema = z.infer<typeof ZDeleteAccountMutationSchema>;