| import { z } from "zod";
|
|
|
|
|
| export const registerUserRequestSchema = z.object({
|
| fullName: z.string(),
|
| email: z.email(),
|
| phone: z.string(),
|
| password: z.string(),
|
| })
|
| export type RegisterUserRequestSchema = z.infer<typeof registerUserRequestSchema>;
|
|
|
|
|
| export const registerUserResponseSchema = z.object({
|
| email: z.string(),
|
| })
|
| export type RegisterUserResponseSchema = z.infer<typeof registerUserResponseSchema>;
|
|
|
|
|
|
|
| export const resendOtpRequestSchema = z.object({
|
| email: z.string(),
|
| })
|
| export type ResendOtpRequestSchema = z.infer<typeof resendOtpRequestSchema>;
|
|
|
|
|
|
|
| export const resendOtpResponseSchema = z.object({
|
| otpCode: z.string(),
|
| })
|
| export type ResendOtpResponseSchema = z.infer<typeof resendOtpResponseSchema>;
|
|
|
|
|
|
|
| export const verifyOtpRequestSchema = z.object({
|
| otpCode: z.string(),
|
| email: z.string(),
|
| })
|
| export type VerifyOtpRequestSchema = z.infer<typeof verifyOtpRequestSchema>;
|
|
|
|
|
|
|
| export const loginRequestSchema = z.object({
|
| email: z.email(),
|
| password: z.string(),
|
| })
|
| export type LoginRequestSchema = z.infer<typeof loginRequestSchema>;
|
|
|
|
|
| export const oauthTokenResponseSchema = z.object({
|
| provider_token: z.string().nullable().optional(),
|
| provider_refresh_token: z.string().nullable().optional(),
|
| access_token: z.string(),
|
| refresh_token: z.string(),
|
| expires_in: z.number(),
|
| expires_at: z.number().optional(),
|
| token_type: z.string(),
|
| user: z.any(),
|
| });
|
|
|
| export type OAuthTokenResponse = z.infer<typeof oauthTokenResponseSchema>;
|
|
|
|
|
|
|
| export const forgetPasswordResponseSchema = z.object({
|
| email: z.string(),
|
| })
|
| export type ForgetPasswordResponseSchema = z.infer<typeof forgetPasswordResponseSchema>;
|
|
|
|
|
|
|
| export const resetPasswordRequestSchema = z.object({
|
| email: z.string(),
|
| otpCode: z.string(),
|
| newPassword: z.string(),
|
| })
|
| export type ResetPasswordRequestSchema = z.infer<typeof resetPasswordRequestSchema>;
|
|
|
|
|
| export const refreshSessionRequestSchema = z.object({
|
| accessToken: z.string(),
|
| refreshToken: z.string(),
|
| });
|
|
|
| export type RefreshSessionRequestSchema = z.infer<typeof refreshSessionRequestSchema>; |