import { ProviderType } from "../enums";

interface APIBaseModel {
  success: boolean;
  message: string;
}

export interface SignUpModel {
  normalizedNames?: object;
  lazyUpdate: boolean | null;
  firstName: string;
  lastName: string;
  mobileNo: string;
  email: string;
  password: string;
}

export interface SignInModel {
  email: string;
  password: string;
  recaptcha?: string;
  isSocial?: boolean;
}

export interface SignInResponse extends APIBaseModel {
  token?: string;
  user?: UserProfileModel;
}

export interface attributes {
  id: string;
  email: string;
  name: string;
  firstName: string;
  lastName: string;
  image?: string;
  mobileNo: string;
  profession?: string;
  IsSocial: boolean;
  IsDelete: boolean;
  gender: string;
  dob: string;
  middleName: string;
  alternativeContactNo: string;
  fax: string;
  ccEmail: string;
  companyName: string;
  _id: string;
  lastLogin: string;
  LogInTime: string;
  coupons: Coupon[];
}

export interface OldPassword {
  _id: string;
  date: string;
  Password: string;
}

export interface Coupon {
  _id: string;
  coupon: string;
  usedCoupon: number;
}
export interface ForgotPassword {
  email: string;
}
export interface ResetPassword {
  password: string;
  changepassword: boolean;
  token: string;
}
export interface ChangePassword {
  oldPassword: string;
  newPassword: string;
  confirmPassword: string;
}
export interface ConfirmUser {
  token: string;
}

export interface SocialSignInModel {
  token: string;
  provider: ProviderType;
  email: string;
  firstName: string;
  lastName: string;
}

export interface UserProfileModel {
  image: string;
  firstName: string;
  lastName: string;
  middleName: string;
  gender: string;
  dob: string;
  mobileNo: string;
  alternativeContactNo: string;
  fax: string;
  email: string;
  ccEmail: string;
  companyName: string;
  profession: string;
  id: string;
  exp?: number;
  iat?: number;
}
