import { ReportsApiResponseData } from './api/report.response.model';
import { PaginationMeta } from './pagination-meta.model';

export interface Report {
  type: string;
  sendDate: Date;
  status: string;
}

export interface ReportsData {
  data: Report[];
  meta: PaginationMeta;
}

export function mapReportsResponseToReport(data: ReportsApiResponseData): Report {
  const { type, sendDate, status } = data;
  return {
    type,
    sendDate,
    status
  }
}
