/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/aggregate" />
/// <reference types="mongoose/types/callback" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/cursor" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/expressions" />
/// <reference types="mongoose/types/helpers" />
/// <reference types="mongoose/types/middlewares" />
/// <reference types="mongoose/types/indexes" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/mongooseoptions" />
/// <reference types="mongoose/types/pipelinestage" />
/// <reference types="mongoose/types/populate" />
/// <reference types="mongoose/types/query" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/schematypes" />
/// <reference types="mongoose/types/session" />
/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/validation" />
/// <reference types="mongoose/types/virtuals" />
/// <reference types="mongoose/types/inferschematype" />
import mongoose from 'mongoose';
import { IMulterFile } from '../interfaces/multer.interface';
import { IPaginatorOptions } from '../interfaces/collaterals.interface';
import { ECollaterals } from '../enums/collaterals.enum';
import { IUploadedDataView } from '../interfaces/upload-data.interface';
import { EUploadTypes } from '../enums/upload-types.enum';
import { IUploadedFileDoc } from '../models/UploadedFile.model';
import { IUploadedSheetView } from '../models/UploadedSheet.model';
import { BankUploadedTransactionsService } from './bank-uploaded-transactions.service';
import { CollateralsService } from './collaterals.service';
import { LoanTransactionsService } from './loan-transactions.service';
import { QuickbooksService } from './quickbooks.service';
import { UserLogsService } from './user-logs.service';
import { LockService } from './lock.service';
import { BorrowersDB } from './borrowers.db';
import { UsersService } from './users.service';
interface IMappedColumns {
    [columnName: string]: number;
}
export interface IMapping {
    sheetId: string;
    startRow: number;
    endRow: number;
    bbcDate: Date;
    effectiveDate?: string;
    sheetType: ECollaterals;
    mappedColumns: IMappedColumns;
    extraOptions?: {
        [key: string]: string;
    };
}
export interface IExcelDataCellWithStyles {
    v: string | number | Date | boolean;
    t?: string;
    s?: object;
    z?: object;
}
export interface IUploadOption {
    fileName: string;
    sheetName: string;
    userUploaded?: string;
    effectiveDate: string;
}
export declare class UploadsService {
    private readonly rootDir;
    private readonly bankUploadedTransactionsService;
    private readonly getCollateralsService;
    private readonly getLoanTransactionsService;
    private readonly getQuickbooksService;
    private readonly getLockService;
    private readonly userLogsService;
    private readonly borrowersDB;
    private readonly usersService;
    constructor(rootDir: string, bankUploadedTransactionsService: BankUploadedTransactionsService, getCollateralsService: () => CollateralsService, getLoanTransactionsService: () => LoanTransactionsService, getQuickbooksService: () => QuickbooksService, getLockService: () => LockService, userLogsService: UserLogsService, borrowersDB: BorrowersDB, usersService: UsersService);
    createUploadFile(file: IMulterFile, borrowerId: string, userId: string, uploadType: EUploadTypes): Promise<mongoose.Document<unknown, {}, IUploadedFileDoc> & IUploadedFileDoc & {
        _id: mongoose.Types.ObjectId;
    }>;
    convertFileToData(uploadedFileId: string): Promise<void>;
    convertDataToFile(dataToConvert: {
        [sheetName: string]: any[];
    }[]): Promise<any>;
    convertDataToFileWithStyleOld(dataToConvert: {
        [sheetName: string]: IExcelDataCellWithStyles[][];
    }, options?: {
        width?: {
            [sheetName: string]: {
                [columnId: string]: number;
            };
        };
        sheetOptions?: {
            [sheetName: string]: {
                showGridLines?: boolean;
            };
        };
    }): Promise<any>;
    deleteFile(uploadedFileId: string): Promise<void>;
    deleteSheet(uploadedSheetId: string): Promise<IUploadedSheetView[]>;
    deleteAllSheets(uploadType: EUploadTypes): Promise<void>;
    trimExcelArray(data: any[]): unknown[];
    getUploadedRawFiles(borrowerId: string, uploadType: EUploadTypes): Promise<(mongoose.FlattenMaps<IUploadedFileDoc> & {
        _id: mongoose.Types.ObjectId;
    })[]>;
    getUploadedSheets(borrowerId: string, uploadType: EUploadTypes): Promise<IUploadedSheetView[]>;
    getUploadedData(sheetId: string, paginatorOptions?: IPaginatorOptions): Promise<IUploadedDataView>;
    private transformNumberIntoDate;
    private validateRow;
    mapData(mapData: IMapping, paginators: {
        [table: string]: IPaginatorOptions;
    }): Promise<{}>;
    convertData(mapData: IMapping, userId: string): Promise<{
        success: boolean;
        message: string;
        data: {
            taskId: string;
        };
    }>;
    prepareData(mapData: IMapping): Promise<{
        approved: {
            items: any[];
            totalItems: number;
        };
        removed: {
            items: any[];
            totalItems: number;
        };
    }>;
    removeConvertedData(sheetId: string): Promise<void>;
    removeEntriesWithoutFiles(): Promise<void>;
    cleanUploads(): Promise<void>;
    removeEmptyBBC(remove?: boolean): Promise<void>;
}
export {};
