Download src/dtos/auth.dto.ts from lynfera/api: direct link, hf CLI and curl.
- Browser
- Download file 789 Bytes
-
https://huggingface.co/spaces/lynfera/api/resolve/main/src/dtos/auth.dto.ts
- Command line
-
hf download hf://spaces/lynfera/api/src/dtos/auth.dto.ts
-
curl -L -o auth.dto.ts https://huggingface.co/spaces/lynfera/api/resolve/main/src/dtos/auth.dto.ts
789 Bytes
| import z from "zod"; | |
| export const SignUpSchema = z.object({ | |
| name: z.string().min(3).max(30).regex(/^[^\p{Emoji_Presentation}\p{Extended_Pictographic}]*$/u, "Name cannot contain emojis"), | |
| email: z.email(), | |
| password: z.string().min(8).max(64).regex(/\d/, "Password must contain at least one number"), | |
| }); | |
| export const LoginSchema = z.object({ | |
| email: z.email(), | |
| password: z.string().min(8), | |
| }); | |
| export const VerifyOtpSchema = z.object({ | |
| email: z.email(), | |
| otp: z.number().min(6), | |
| }); | |
| export const ResendOtpSchema = z.object({ | |
| email: z.email(), | |
| }); | |
| export type SignUpUserDTO = z.infer<typeof SignUpSchema>; | |
| export type LoginUserDTO = z.infer<typeof LoginSchema>; | |
| export type VerifyOtpDTO = z.infer<typeof VerifyOtpSchema>; | |
| export type ResendOtpDTO = z.infer<typeof ResendOtpSchema>; | |