/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/query" />
/// <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 { IPaginatorOptions } from '../interfaces/collaterals.interface';
import { ECollaterals } from '../enums/collaterals.enum';
import { IBBCSheetDoc } from '../models/BBCSheet.model';
export interface IBbcDateWithSheets {
    _id: mongoose.Types.ObjectId;
    bbcDate: Date;
    collateralType?: string;
    sheets?: {
        name: string;
        _id: string;
    }[];
    extraInfo?: string;
}
export declare const collateralMap: {
    INVENTORY: mongoose.Model<import("../models/InventoryItem.model").IInventoryItemDoc, {}, {}, {}, mongoose.Document<unknown, {}, import("../models/InventoryItem.model").IInventoryItemDoc> & import("../models/InventoryItem.model").IInventoryItemDoc & {
        _id: mongoose.Types.ObjectId;
    }, any>;
    RECEIVABLE: mongoose.Model<import("../models/ReceivableItem.model").IReceivableItemDoc, {}, {}, {}, mongoose.Document<unknown, {}, import("../models/ReceivableItem.model").IReceivableItemDoc> & import("../models/ReceivableItem.model").IReceivableItemDoc & {
        _id: mongoose.Types.ObjectId;
    }, any>;
    ACCOUNT_PAYABLE: mongoose.Model<import("../models/AccountPayableItem.model").IAccountPayableItemDoc, {}, {}, {}, mongoose.Document<unknown, {}, import("../models/AccountPayableItem.model").IAccountPayableItemDoc> & import("../models/AccountPayableItem.model").IAccountPayableItemDoc & {
        _id: mongoose.Types.ObjectId;
    }, any>;
    SALES: import("../models/SalesItem.model").TSalesItemModel;
};
export declare const collateralFields: {
    INVENTORY: string[];
    RECEIVABLE: string[];
    ACCOUNT_PAYABLE: string[];
    SALES: string[];
};
export declare const COLLATERALS_LOOKUP: ({
    $lookup: {
        from: string;
        localField: string;
        foreignField: string;
        as: string;
    };
    $unwind?: undefined;
} | {
    $unwind: {
        path: string;
    };
    $lookup?: undefined;
})[];
export declare const createQuery: (groupFields: {
    [groupFields: string]: string;
}, collateralType: string) => {
    groupQueries: {
        [x: string]: {
            $first: string;
        };
    };
    itemQueries: any;
    enumKey: "INVENTORY" | "RECEIVABLE" | "ACCOUNT_PAYABLE" | "SALES" | "OTHER" | "CASH" | "LOAN_TRANSACTIONS" | "QUICKBOOKS" | "UPLOADED_BANK_TRANSACTIONS";
};
export declare const ITEMS_PAGINATION: (paginatorOptions: IPaginatorOptions) => ({
    $skip: number;
    $limit?: undefined;
} | {
    $limit: number;
    $skip?: undefined;
})[];
export declare const findCollateralsWithSheets: (borrowerId: string, collateralTypes?: ECollaterals[]) => Promise<IBbcDateWithSheets[]>;
export declare const getBBCSheetsForBorrowerAndType: (borrowerId: string, collateralType: ECollaterals) => Promise<IBBCSheetDoc[]>;
export declare const getCollateralListBySheet: (sheetIds: string[], collateralType: ECollaterals) => Promise<any>;
export declare const getPreviousCollateralDocument: (borrowerId: string, date: Date, collateralType: ECollaterals, limit?: number) => Promise<{
    _id: mongoose.Types.ObjectId;
    bbcDate: Date;
}[]>;
export declare const getCollateralDocsByBBC: (bbcIds: string[], collateralType: ECollaterals) => Promise<any>;
export declare const getCollateralListByBBCAndType: (bbcDateId: string, collateralType: ECollaterals) => Promise<any>;
export declare const findCollateralSheets: (bbcDateId: string, collateralType: ECollaterals) => mongoose.Query<(mongoose.Document<unknown, {}, IBBCSheetDoc> & IBBCSheetDoc & {
    _id: mongoose.Types.ObjectId;
})[], mongoose.Document<unknown, {}, IBBCSheetDoc> & IBBCSheetDoc & {
    _id: mongoose.Types.ObjectId;
}, {}, IBBCSheetDoc, "find">;
export declare const findCollateralSheetsById: (collateralsId: string) => Promise<IBBCSheetDoc>;
export declare const getCollateralListBySheetId: (sheet: IBBCSheetDoc, paginatorOptions?: IPaginatorOptions) => Promise<any>;
export declare const findCollaterals: (collateralsId: string, group: boolean, paginatorOptions?: IPaginatorOptions) => Promise<any>;
export declare const excludeNoDataColumns: (data: any[], columns: string[]) => Pick<any, string>[];
export declare const addCustomerGroups: (data: any[], borrowerId: string) => Promise<any[]>;
