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

26 lines
820 B
TypeScript
Raw Normal View History

2023-06-09 18:21:18 +10:00
import { z } from 'zod';
export const ZUpdateProfileMutationSchema = z.object({
name: z.string().min(1),
signature: z.string(),
});
export const ZUpdatePasswordMutationSchema = z.object({
currentPassword: z.string().min(6),
2023-06-09 18:21:18 +10:00
password: z.string().min(6),
});
2023-09-18 11:15:29 +00:00
export const ZForgotPasswordFormSchema = z.object({
email: z.string().email().min(1),
});
2023-09-18 14:03:33 +00:00
export const ZResetPasswordFormSchema = z.object({
password: z.string().min(6),
token: z.string().min(1),
});
2023-09-18 11:15:29 +00:00
export type TUpdateProfileMutationSchema = z.infer<typeof ZUpdateProfileMutationSchema>;
2023-06-09 18:21:18 +10:00
export type TUpdatePasswordMutationSchema = z.infer<typeof ZUpdatePasswordMutationSchema>;
2023-09-18 11:15:29 +00:00
export type TForgotPasswordFormSchema = z.infer<typeof ZForgotPasswordFormSchema>;
2023-09-18 14:03:33 +00:00
export type TResetPasswordFormSchema = z.infer<typeof ZResetPasswordFormSchema>;