/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/query" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/populate" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/schemaoptions" />
/// <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 { ILedgerDataRow } from './reports.db';
import { ILoanProductDoc } from '../models/LoanProducts.model';
import { IProductBrokerDocWithBroker } from '../models/ProductBroker.model';
export declare const getProductBrokers: (productId: string) => Promise<IProductBrokerDocWithBroker[]>;
export declare const enrichWithBrokers: (transactions: ILedgerDataRow[], product: ILoanProductDoc) => Promise<ILedgerDataRow[]>;
export declare const getBorrowerBrokers: (borrowerId: string) => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
    _id: mongoose.Types.ObjectId;
}>)[]>;
export declare const getAllProductBrokers: () => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
    _id: mongoose.Types.ObjectId;
}>)[]>;
export declare const getAllLoanBrokers: () => Promise<{
    emails: mongoose.FlattenMaps<import("../models/LoanBroker.model").ILoanBrokerEmail>[];
    order: number;
    active: boolean;
    name: string;
    _id: any;
    __v?: any;
    $assertPopulated: <Paths = {}>(path: string | string[], values?: Partial<Paths>) => Omit<import("../models/LoanBroker.model").ILoanBrokerDoc, keyof Paths> & Paths;
    $clone: () => import("../models/LoanBroker.model").ILoanBrokerDoc;
    $getAllSubdocs: () => mongoose.Document<any, any, any>[];
    $ignore: (path: string) => void;
    $isDefault: (path: string) => boolean;
    $isDeleted: (val?: boolean) => boolean;
    $getPopulatedDocs: () => mongoose.Document<any, any, any>[];
    $inc: (path: string | string[], val?: number) => import("../models/LoanBroker.model").ILoanBrokerDoc;
    $isEmpty: (path: string) => boolean;
    $isValid: (path: string) => boolean;
    $locals: mongoose.FlattenMaps<Record<string, unknown>>;
    $markValid: (path: string) => void;
    $model: {
        <ModelType = mongoose.Model<unknown, {}, {}, {}, mongoose.Document<unknown, {}, unknown> & Required<{
            _id: unknown;
        }>, any>>(name: string): ModelType;
        <ModelType_1 = mongoose.Model<any, {}, {}, {}, any, any>>(): ModelType_1;
    };
    $op: "save" | "validate" | "remove";
    $session: (session?: mongoose.mongo.ClientSession) => mongoose.mongo.ClientSession;
    $set: {
        (path: string | Record<string, any>, val: any, type: any, options?: mongoose.DocumentSetOptions): import("../models/LoanBroker.model").ILoanBrokerDoc;
        (path: string | Record<string, any>, val: any, options?: mongoose.DocumentSetOptions): import("../models/LoanBroker.model").ILoanBrokerDoc;
        (value: string | Record<string, any>): import("../models/LoanBroker.model").ILoanBrokerDoc;
    };
    $where: mongoose.FlattenMaps<Record<string, unknown>>;
    baseModelName?: string;
    collection: mongoose.Collection<mongoose.mongo.BSON.Document>;
    db: mongoose.FlattenMaps<mongoose.Connection>;
    deleteOne: (options?: mongoose.QueryOptions<unknown>) => any;
    depopulate: (path?: string | string[]) => import("../models/LoanBroker.model").ILoanBrokerDoc;
    directModifiedPaths: () => string[];
    equals: (doc: mongoose.Document<any, any, any>) => boolean;
    errors?: mongoose.Error.ValidationError;
    get: {
        <T extends string | number | symbol>(path: T, type?: any, options?: any): any;
        (path: string, type?: any, options?: any): any;
    };
    getChanges: () => mongoose.UpdateQuery<import("../models/LoanBroker.model").ILoanBrokerDoc>;
    id?: any;
    increment: () => import("../models/LoanBroker.model").ILoanBrokerDoc;
    init: (obj: mongoose.AnyObject, opts?: mongoose.AnyObject) => import("../models/LoanBroker.model").ILoanBrokerDoc;
    invalidate: {
        <T_1 extends string | number | symbol>(path: T_1, errorMsg: string | NativeError, value?: any, kind?: string): NativeError;
        (path: string, errorMsg: string | NativeError, value?: any, kind?: string): NativeError;
    };
    isDirectModified: {
        <T_2 extends string | number | symbol>(path: T_2 | T_2[]): boolean;
        (path: string | string[]): boolean;
    };
    isDirectSelected: {
        <T_3 extends string | number | symbol>(path: T_3): boolean;
        (path: string): boolean;
    };
    isInit: {
        <T_4 extends string | number | symbol>(path: T_4): boolean;
        (path: string): boolean;
    };
    isModified: {
        <T_5 extends string | number | symbol>(path?: T_5 | T_5[], options?: {
            ignoreAtomics?: boolean;
        }): boolean;
        (path?: string | string[], options?: {
            ignoreAtomics?: boolean;
        }): boolean;
    };
    isNew: boolean;
    isSelected: {
        <T_6 extends string | number | symbol>(path: T_6): boolean;
        (path: string): boolean;
    };
    markModified: {
        <T_7 extends string | number | symbol>(path: T_7, scope?: any): void;
        (path: string, scope?: any): void;
    };
    model: {
        <ModelType_2 = mongoose.Model<unknown, {}, {}, {}, mongoose.Document<unknown, {}, unknown> & Required<{
            _id: unknown;
        }>, any>>(name: string): ModelType_2;
        <ModelType_3 = mongoose.Model<any, {}, {}, {}, any, any>>(): ModelType_3;
    };
    modifiedPaths: (options?: {
        includeChildren?: boolean;
    }) => string[];
    overwrite: (obj: mongoose.AnyObject) => import("../models/LoanBroker.model").ILoanBrokerDoc;
    $parent: () => mongoose.Document<any, any, any>;
    populate: {
        <Paths_1 = {}>(path: string | mongoose.PopulateOptions | (string | mongoose.PopulateOptions)[]): Promise<mongoose.MergeType<import("../models/LoanBroker.model").ILoanBrokerDoc, Paths_1>>;
        <Paths_2 = {}>(path: string, select?: string | mongoose.AnyObject, model?: mongoose.Model<any, {}, {}, {}, any, any>, match?: mongoose.AnyObject, options?: mongoose.PopulateOptions): Promise<mongoose.MergeType<import("../models/LoanBroker.model").ILoanBrokerDoc, Paths_2>>;
    };
    populated: (path: string) => any;
    replaceOne: (replacement?: mongoose.AnyObject, options?: mongoose.QueryOptions<unknown>) => mongoose.Query<any, import("../models/LoanBroker.model").ILoanBrokerDoc, {}, import("../models/LoanBroker.model").ILoanBrokerDoc, "find">;
    save: (options?: mongoose.SaveOptions) => Promise<import("../models/LoanBroker.model").ILoanBrokerDoc>;
    schema: mongoose.FlattenMaps<mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
        [x: string]: unknown;
    }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
        [x: string]: unknown;
    }>> & mongoose.FlatRecord<{
        [x: string]: unknown;
    }> & Required<{
        _id: unknown;
    }>>>;
    set: {
        <T_8 extends string | number | symbol>(path: T_8, val: any, type: any, options?: mongoose.DocumentSetOptions): import("../models/LoanBroker.model").ILoanBrokerDoc;
        (path: string | Record<string, any>, val: any, type: any, options?: mongoose.DocumentSetOptions): import("../models/LoanBroker.model").ILoanBrokerDoc;
        (path: string | Record<string, any>, val: any, options?: mongoose.DocumentSetOptions): import("../models/LoanBroker.model").ILoanBrokerDoc;
        (value: string | Record<string, any>): import("../models/LoanBroker.model").ILoanBrokerDoc;
    };
    toJSON: {
        <T_9 = any>(options?: mongoose.ToObjectOptions<mongoose.Document<unknown, {}, unknown> & Required<{
            _id: unknown;
        }>> & {
            flattenMaps?: true;
        }): mongoose.FlattenMaps<T_9>;
        <T_10 = any>(options: mongoose.ToObjectOptions<mongoose.Document<unknown, {}, unknown> & Required<{
            _id: unknown;
        }>> & {
            flattenMaps: false;
        }): T_10;
    };
    toObject: <T_11 = any>(options?: mongoose.ToObjectOptions<mongoose.Document<unknown, {}, unknown> & Required<{
        _id: unknown;
    }>>) => mongoose.Require_id<T_11>;
    unmarkModified: {
        <T_12 extends string | number | symbol>(path: T_12): void;
        (path: string): void;
    };
    updateOne: (update?: mongoose.UpdateWithAggregationPipeline | mongoose.UpdateQuery<import("../models/LoanBroker.model").ILoanBrokerDoc>, options?: mongoose.QueryOptions<unknown>) => mongoose.Query<any, import("../models/LoanBroker.model").ILoanBrokerDoc, {}, import("../models/LoanBroker.model").ILoanBrokerDoc, "find">;
    validate: {
        <T_13 extends string | number | symbol>(pathsToValidate?: T_13 | T_13[], options?: mongoose.AnyObject): Promise<void>;
        (pathsToValidate?: mongoose.PathsToValidate, options?: mongoose.AnyObject): Promise<void>;
        (options: {
            pathsToSkip?: mongoose.pathsToSkip;
        }): Promise<void>;
    };
    validateSync: {
        (options: {
            [k: string]: any;
            pathsToSkip?: mongoose.pathsToSkip;
        }): mongoose.Error.ValidationError;
        <T_14 extends string | number | symbol>(pathsToValidate?: T_14 | T_14[], options?: mongoose.AnyObject): mongoose.Error.ValidationError;
        (pathsToValidate?: mongoose.PathsToValidate, options?: mongoose.AnyObject): mongoose.Error.ValidationError;
    };
}[]>;
export declare const getBrokerProducts: (loanBrokerId: string) => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
    _id: mongoose.Types.ObjectId;
}>)[]>;
