import { AccountSearchRecordDTO } from '@openapi/idm';
import { DepartmentWithParent } from '@/models/DepartmentWithParent';

export interface AccountSearchRecord extends AccountSearchRecordDTO {
  sessionsCount?: number;
}
export interface PersonData {
  id?: string;
  surname: string;
  firstname: string;
  middlename?: string;
  sex?: string;
  email?: string;
  birthdate?: string;
  snils: string;
  ipAddresses?: string[];
}

export interface DepartmentWithLabel extends DepartmentWithParent {
  label: string;
}

export interface AccountOrganizationsData {
  start: string;
  enabled: boolean;
  schema: 'Account';
  'user-domain': string;
  userDomain?: {
    schema: string;
    id: string;
    fullname: string;
  };
  position?: string;
  finish?: string;
}

export interface ListToSelect<T> {
  search: string | null;
  records: Array<T>;
  selected: T | null;
}

export interface AccountLogin {
  userName: string;
}

export interface AccountRolesData {
  rolesList: string[];
  removeRoles: string[];
}

export interface FinishInfo {
  userName: string;
  password: string;
  recoverLink: string;
}
