/// <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 { ISelectedMonth } from '../helpers/date.helper';
import { FinancialSpreadingDTO, IFinancialSpreading, IFinancialSpreadingParams, IFinancialSpreadingUpload, IFinancialSpreadingView } from '../models/FinancialSpreading.model';
import { FinancialSpreadingSheetDTO, IFinancialSpreadingSheet, IFinancialSpreadingSheetView } from '../models/FinancialSpreadingSheet.model';
import { UploadsService } from './uploads.service';
export declare const getShiftedMonth: (month: ISelectedMonth, shift: number) => {
    year: number;
    month: number;
};
export declare class FinancialSpreadingService {
    private readonly uploadsService;
    constructor(uploadsService: UploadsService);
    clearData(rawData: IFinancialSpreading[], rawSheets: IFinancialSpreadingSheet[]): {
        data: FinancialSpreadingDTO[];
        sheets: FinancialSpreadingSheetDTO[];
    };
    getLastMonth(borrowerId: string): Promise<ISelectedMonth>;
    addNewMonth(params: IFinancialSpreadingParams): Promise<ISelectedMonth>;
    clearMonth(params: IFinancialSpreadingParams): Promise<ISelectedMonth>;
    resetAll(params: IFinancialSpreadingParams): Promise<ISelectedMonth>;
    resetSheets(): Promise<void>;
    getFinancialSpreadingData(params: IFinancialSpreadingParams, monthDeep?: number): Promise<{
        data: FinancialSpreadingDTO[];
        sheets: FinancialSpreadingSheetDTO[];
    }>;
    updateFinancialSpreadingData(params: IFinancialSpreadingParams, data: IFinancialSpreadingView[], sheets: IFinancialSpreadingSheetView[]): Promise<{
        success: boolean;
        data: IFinancialSpreadingView[];
        sheets: IFinancialSpreadingSheetView[];
        message: string;
    } | {
        success: boolean;
        message: string;
        data?: undefined;
        sheets?: undefined;
    }>;
    calculateTotals(params: IFinancialSpreadingParams): Promise<void>;
    private calculatePL;
    private calculateBS;
    createNewSheet(sheet: IFinancialSpreadingSheetView): Promise<mongoose.Document<unknown, {}, IFinancialSpreadingSheet> & IFinancialSpreadingSheet & {
        _id: mongoose.Types.ObjectId;
    }>;
    deleteRedundantSheets(sheetIds: string[]): Promise<void>;
    private getAllBorrowerSheets;
    getCreateAllBorrowerSheet(params: IFinancialSpreadingParams): Promise<(mongoose.FlattenMaps<IFinancialSpreadingSheet> & {
        _id: mongoose.Types.ObjectId;
    })[]>;
    getExcelFile(params: IFinancialSpreadingParams): Promise<any>;
    uploadData(data: IFinancialSpreadingUpload[], params: IFinancialSpreadingParams): Promise<void>;
}
