import { EstructuraImportacionLayout, TipoImportacion } from "@win2win/shared";

export type ProveedoresQueryParams = {
    startRow?: number;
    fetchCount?: number;
    sortBy?: string;
    descending?: boolean;
    bycol?: object;
    byEqualCol?: object;
    terms?: string;
};

export interface Importacion {
    id: number,
    nombre: string,
    codigo: string,
    tipo: TipoImportacion
    fecha_creado: string,
    imp_layout: ImportacionLayout
}

export interface ImportacionLayout {
    id: number,
    titulo: string,
    estructura: EstructuraImportacionLayout,
    fecha_creado: string,
    version: number
}


export enum EstadoLineaImportacion {
    PENDIENTE = 'pendiente',
    VALIDA = 'valida',
    INVALIDA = 'invalida'
}


export interface ImportacionLineaRaw {
    ID_PROV_IMP_FILE_LINEA: number;
    ID_PROV_IMP_FILE: number;
    LINEA_XLS: number;
    CODIGO: string;
    CONTENT: Record<string, string | number | Date>;
    R_ESTADO: EstadoLineaImportacion;
    R_ERROR_MSG: string;
    FECHA_CREADO: string;
}