// Define types for nested objects
export type AuthUserLogin = {
  id: number;
  equifax_flag: number;
  experian_flag: number;
  transunion_flag: number;
  salesforce_id: string;
  client: number;
  archived: number;
  company_id: number;
  suffix: string;
  first_name: string;
  middle_name: string;
  last_name: string;
  email: string;
  phone_home: string;
  phone_work: string;
  phone_mobile: string;
  fax: string;
  password: string;
  dob: string;
  address_one: string;
  address_two: string;
  city: string;
  state: string;
  zipcode: string;
  mailing_address_one: string;
  mailing_address_two: string;
  mailing_city: string;
  mailing_state: string;
  mailing_zipcode: string;
  mailing_country: string;
  website: string;
  occupation: string;
  income: number;
  email_opt_out: number;
  sms_opt_out: number;
  date_created: string;
  billing_status_id: number;
  monitoring_site_id: number;
  monitoring_username: string;
  monitoring_password: string;
  security_word: string;
  ssn: string;
  payment_arrangement: string;
  status_id: number;
  source: string;
  affiliate_id: number;
  sales_rep_id: string;
  processor_id: number;
  enroll_date: string;
  cancel_date: string | null;
  joint_customer_id: string;
  InfusionID: number;
  portal_access: number;
  tu_subscription: number;
  lead_status: number;
  is_app: string;
  infusionsoft_contact_id: number;
  interview_agreement_terms: number;
  reset_password_code: string;
  verifiedAddressFlag: number;
  last_login: string;
  otp: string;
  portal_id: string;
  trigger_email_date: string;
  trigger_bypassemail_date: string;
  unique_email_token: string;
  interviewflag: string;
  powerwallet: number;
  client_agreement_ip: string;
  client_agreement_signDate: string;
  clientkey: string;
  tu_authflag: number;
  tu_authflag_delay: string;
  joint_customer_sfid: string;
  show_fitnesscontent: string;
  fitness_month_limit: string;
  profile_image: string;
  post_date: string;
  transaction_date: string;
  android_device_id: string;
  affID: string;
  email_activation_token: string | null;
  email_bypass_token: string | null;
  iphone_device_id: string;
  failed_login_count: number;
  is_block: number;
  reset_pwd_request_time: string;
  remaining_tu_attempts: number;
  inquiryhelperflag: number;
  inquiryhelperdate: string;
  huttonchaseflag: number;
  huttonchasedate: string;
  huttonchaseid: string;
  tu_score: number;
  score_change: number;
  document_type: string;
  alertOnapp: number;
  fb_access_token: string;
  fb_expire: string;
  fb_disconnect: string;
  pfa_auth: number;
  pfa_auto_login: string | null;
  pfm_jwt_token: string | null;
  login_count: number;
  IDP_subscription: string | null;
  name_subscription: number;
  address_subscription: number;
  internet_subscription: number;
  dispute_subscription: number;
  reportcomparisonflag: string | null;
  onlineReference: number;
  is_app_first_download: string | null;
  reset_password_code_: string;
  reset_pwd_request_time_: string;
  is_email_sent_for_wrong_onlinereference: number;
  tuSessionID: string;
  tu_auth_token: string;
  tu_client_token: string | null;
  efx_score: number | null;
  efx_score_change: number | null;
  exp_score: number | null;
  exp_score_change: number | null;
  efx_subscription: string | null;
  exp_subscription: string | null;
  bundle_insurance_restore_bundle_subscription: string | null;
  bundle2_subscription: string | null;
  insurance_restore_subscription: string | null;
  change_of_address_subscription: string | null;
  ssn_subscription: string | null;
  auth_skip: string | null;
  auth_update_date: string | null;
  auto_login_code: string | null;
  auto_login_date: string | null;
  reattempt_count: number;
  password_code: string | null;
  forcelogout: number;
  mfa_code: string | null;
  ssn_auth_step: number;
  cap_completed_date: string | null;
  unique_identifier: string | null;
  updated_at: string;
};

export type AuthUniqueAccount = {
  id: number;
  user_id: number;
  affiliate_id: number;
  client_id: number;
  availability: number;
};

export type ClientRelation = {
  id: number;
  client_id: number;
  spouse: string | null;
  lead_upsell: string | null;
  program_upsell: string | null;
  reset_pwd_reqest_hour_time: string;
  reset_pwd_in_hour_count: number;
  created_at: string;
  proximail: string;
  magic_link: string | null;
  updated_at: string;
  login_prefrence: string;
  google_id: string | null;
  spin_userid: string | null;
  spin_auth_status: string | null;
  ext_request_id: string | null;
  spin_skip_auth: string | null;
  idiq_auth_status: number;
  idiq_skip_auth: string | null;
  idiq_register: number;
};

export type Authorisation = {
  token: string;
  type: string;
};

export type LoginApiResponse = {
  status: string;
  message: string;
  code: number;
  results: {
    user: AuthUserLogin;
    company_id: number;
    unique_account: AuthUniqueAccount;
    client_relation: ClientRelation;
    authorisation: Authorisation;
  };
};
