export interface AlgoliaNetworkError {
  message: string;
  name: string;
  status: number;
  transporterStackTrace: {
    host: { protocol: string; url: string; accept: number };
    request: any;
    response: any;
    triesLeft: number;
  }[];
}

export interface MyAccountLink {
  id: number;
  area:
    | 'left-side-logged-in'
    | 'left-side-logged-out'
    | 'right-side-logged-in'
    | 'right-side-logged-out'
    | 'profile-panel-block'
    | 'profile-panel-list';
  address: string;
  title: string;
  order: number;
  target: '_blank' | '_self' | '_parent' | '_top' | null;
}

export interface MyAccountUser {
  id: string | null;
  uuid: string;
  name: string | null;
  first_name: string | null;
  last_name: string | null;
  email: string | null;
  company: string | null;
  lifecycle_stage: string | null;
  indirect_customer: boolean;
  small_avatar_url: string | null;
  job_title: string | null;
  is_nanopore_user: boolean;
  kudos: number;
}

export interface MyAccountData {
  user: MyAccountUser;
  cart: {
    count: number;
    url: string;
  };
  notifications: { count: number };
  hs: { lists?: Array<number> };
  registration: { next_url: string | null };
  links: null | MyAccountLink[];
  urls: {
    forgot_password: string | null;
    logout: string | null;
    login: string | null;
    messages: string | null;
    cart: string | null;
  };
  domains: [
    {
      origin: string;
      domain: string;
    }
  ];
  search: {
    app_id: string;
    api_key: string;
    indeces: [
      {
        index: string;
        name: string;
        domain: string;
        all_group?: boolean;
        filters?: [string];
        replicas: {
          name: string;
          index: string;
        }[];
      }
    ];
  };
}
