/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/utility" />
/// <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 { IInventoryItemDocWithCalculation } from './InventoryItem.model';
import { EInventoryAvailabilityResults } from '../enums/inventory-availability-results.enum';
import { IPaginatorOptions } from '../interfaces/collaterals.interface';
export interface IInventoryQuery {
    conjunction: string;
    field: string;
    filter: string;
    filterValue: string | number | Date;
}
export interface IInventoryFilter {
    active: boolean;
    inventoryName: string;
    advanceRate: number;
    queries: IInventoryQuery[];
    valid: boolean;
}
export interface IInventoryAvailabilitySummary {
    order: number;
    isGroup: boolean;
    inventoryName: string;
    totalQty: number;
    totalValue: number;
    advanceRate: number;
    availability: number;
}
export interface IInventoryAvailabilityResultsView {
    items: IInventoryItemDocWithCalculation[];
    totalItems: number;
    paginatorOptions?: IPaginatorOptions;
}
export type InventoryAvailabilityPaginators = {
    [key in EInventoryAvailabilityResults]: IPaginatorOptions;
};
export interface IInventoryAvailabilityResults {
    [EInventoryAvailabilityResults.UNIQ_ITEMS]: IInventoryAvailabilityResultsView;
    [EInventoryAvailabilityResults.NON_UNIQ_ITEMS]: IInventoryAvailabilityResultsView;
    [EInventoryAvailabilityResults.NOT_MATCHED_ITEMS]: IInventoryAvailabilityResultsView;
}
export interface IInventoryAvailability {
    status: string;
    bbcDateId: mongoose.Types.ObjectId;
    borrowerId: mongoose.Types.ObjectId;
    options: {
        maxAdvanceRatePriority: boolean;
    };
    useManualInputs: boolean;
    filters: IInventoryFilter[];
    summary: IInventoryAvailabilitySummary[];
    results?: IInventoryAvailabilityResults;
}
export interface IInventoryAvailabilityDocument extends IInventoryAvailability, mongoose.Document {
}
type MyFunctionType = (name: IInventoryQuery) => Object;
export interface IMapMatcherObj {
    [equation: string]: MyFunctionType;
}
export declare const mapMatcherObj: IMapMatcherObj;
export declare const mapMatcherObjNew: (queries: IInventoryQuery[]) => any[];
export declare const getNormalizedValue: (value: string | number | Date) => string | number | Date;
export declare const InventoryAvailabilityScheme: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
    timestamps: true;
}, {
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    borrowerId: mongoose.Types.ObjectId;
    bbcDateId: mongoose.Types.ObjectId;
    summary: mongoose.Types.DocumentArray<{
        order: number;
        advanceRate: number;
        availability: number;
        inventoryName: string;
        isGroup: boolean;
        totalQty: number;
        totalValue: number;
    }>;
    useManualInputs: boolean;
    status: string;
    filters: mongoose.Types.DocumentArray<{
        active: boolean;
        advanceRate: number;
        queries: mongoose.Types.DocumentArray<{
            filter: string;
            field: string;
            conjunction: string;
            filterValue: any;
        }>;
        inventoryName: string;
        valid: boolean;
    }>;
    __v?: number;
    options?: {
        maxAdvanceRatePriority: boolean;
    };
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    borrowerId: mongoose.Types.ObjectId;
    bbcDateId: mongoose.Types.ObjectId;
    summary: mongoose.Types.DocumentArray<{
        order: number;
        advanceRate: number;
        availability: number;
        inventoryName: string;
        isGroup: boolean;
        totalQty: number;
        totalValue: number;
    }>;
    useManualInputs: boolean;
    status: string;
    filters: mongoose.Types.DocumentArray<{
        active: boolean;
        advanceRate: number;
        queries: mongoose.Types.DocumentArray<{
            filter: string;
            field: string;
            conjunction: string;
            filterValue: any;
        }>;
        inventoryName: string;
        valid: boolean;
    }>;
    __v?: number;
    options?: {
        maxAdvanceRatePriority: boolean;
    };
}>> & mongoose.FlatRecord<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    borrowerId: mongoose.Types.ObjectId;
    bbcDateId: mongoose.Types.ObjectId;
    summary: mongoose.Types.DocumentArray<{
        order: number;
        advanceRate: number;
        availability: number;
        inventoryName: string;
        isGroup: boolean;
        totalQty: number;
        totalValue: number;
    }>;
    useManualInputs: boolean;
    status: string;
    filters: mongoose.Types.DocumentArray<{
        active: boolean;
        advanceRate: number;
        queries: mongoose.Types.DocumentArray<{
            filter: string;
            field: string;
            conjunction: string;
            filterValue: any;
        }>;
        inventoryName: string;
        valid: boolean;
    }>;
    __v?: number;
    options?: {
        maxAdvanceRatePriority: boolean;
    };
}> & {
    _id: mongoose.Types.ObjectId;
}>;
export declare const InventoryAvailabilityModel: mongoose.Model<IInventoryAvailabilityDocument>;
export {};
