/// <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, { Document } from 'mongoose';
import { IReceivableAvailabilityItem, IReceivableAvailabilityItemView } from './ReceivableAvailabilityItem.model';
import { IUser } from '../interfaces/auth-user.interface';
import { SummaryMultipliers } from './ReceivableAvailabilityManualSummary.model';
export declare enum ELimitSettings {
    EXCLUDED_CUSTOMERS = "excludedCustomers",
    PERMITTED_CONCENTRATION = "permittedConcentration",
    PERMITTED_EXTENDED_AR_DAYS = "permittedExtendedARDays",
    INSURED_CUSTOMERS = "insuredCustomers"
}
export type IAvailabilitySettingsLimits = {
    [key in ELimitSettings]: IAvailabilityLimits[];
};
export interface IAvailabilityLimits {
    customer: string;
    limit: number;
}
export interface IAvailabilitySettings extends IAvailabilitySettingsLimits {
    standardARDays: number;
    customerConcentrationLimit: number;
    crossAgeLimit: number;
    contraProvision: number;
    paidDays: number;
    insuredARAdvanceRate: number;
    uninsuredARAdvanceRate: number;
    excludeFromTotal: boolean;
    waiveInsuredCustomers: boolean;
}
export interface IAvailabilitySummary {
    invoiceAmount: number;
    creditNotes: number;
    excludedCustomerDeduction: number;
    grossAR: number;
    permittedOver: number;
    preliminaryEligibleBalance: number;
    creditNotesNegative: number;
    deduction: number;
    partiallyPaidDeduction: number;
    contraDeduction: number;
    crossAgeDeduction: number;
    waivedDeduction: number;
    balanceAfterCrossAge: number;
    finalResult: number;
    insuredComponent: number;
    uninsuredComponent: number;
    insuredAvailability: number;
    uninsuredAvailability: number;
    ARReserves: number;
    ARAvailability: number;
}
export interface IReceivableManualSummary {
    summary: IAvailabilitySummary;
    multipliers: SummaryMultipliers;
}
export interface IReceivableAvailability {
    borrowerId: mongoose.Types.ObjectId;
    bbcDateId: mongoose.Types.ObjectId;
    userCalculatedId: string;
    calculatedAt: Date;
    actual: boolean;
    settings?: IAvailabilitySettings;
    summary?: IAvailabilitySummary;
    items: IReceivableAvailabilityItem[];
    totalItems: number;
    useManualInputs: boolean;
}
export interface IReceivableAvailabilityDoc extends IReceivableAvailability, Document {
}
export interface IReceivableAvailabilityView extends IReceivableAvailabilityDoc {
    items: IReceivableAvailabilityItemView[];
    uniqueCustomers: string[];
    totalItems: number;
    userCalculated?: IUser;
}
export declare const summarySchemeDesc: {
    invoiceAmount: {
        type: NumberConstructor;
        required: boolean;
    };
    creditNotes: {
        type: NumberConstructor;
        required: boolean;
    };
    excludedCustomerDeduction: {
        type: NumberConstructor;
        required: boolean;
    };
    grossAR: {
        type: NumberConstructor;
        required: boolean;
    };
    permittedOver: {
        type: NumberConstructor;
        required: boolean;
    };
    preliminaryEligibleBalance: {
        type: NumberConstructor;
        required: boolean;
    };
    creditNotesNegative: {
        type: NumberConstructor;
        required: boolean;
    };
    deduction: {
        type: NumberConstructor;
        required: boolean;
    };
    partiallyPaidDeduction: {
        type: NumberConstructor;
        required: boolean;
    };
    contraDeduction: {
        type: NumberConstructor;
        required: boolean;
    };
    crossAgeDeduction: {
        type: NumberConstructor;
        required: boolean;
    };
    waivedDeduction: {
        type: NumberConstructor;
        required: boolean;
    };
    balanceAfterCrossAge: {
        type: NumberConstructor;
        required: boolean;
    };
    finalResult: {
        type: NumberConstructor;
        required: boolean;
    };
    insuredComponent: {
        type: NumberConstructor;
        required: boolean;
    };
    uninsuredComponent: {
        type: NumberConstructor;
        required: boolean;
    };
    insuredAvailability: {
        type: NumberConstructor;
        required: boolean;
    };
    uninsuredAvailability: {
        type: NumberConstructor;
        required: boolean;
    };
    ARReserves: {
        type: NumberConstructor;
        required: boolean;
    };
    ARAvailability: {
        type: NumberConstructor;
        required: boolean;
    };
};
export declare const AvailabilitySchema: 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;
    useManualInputs: boolean;
    __v?: number;
    actual?: boolean;
    summary?: {
        invoiceAmount: number;
        grossAR: number;
        balanceAfterCrossAge: number;
        permittedOver: number;
        creditNotes: number;
        excludedCustomerDeduction: number;
        deduction: number;
        partiallyPaidDeduction: number;
        contraDeduction: number;
        crossAgeDeduction: number;
        waivedDeduction: number;
        finalResult: number;
        insuredComponent: number;
        preliminaryEligibleBalance: number;
        uninsuredComponent: number;
        insuredAvailability: number;
        uninsuredAvailability: number;
        creditNotesNegative: number;
        ARReserves: number;
        ARAvailability: number;
    };
    userCalculatedId?: string;
    calculatedAt?: Date;
    settings?: {
        excludedCustomers: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        permittedConcentration: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        permittedExtendedARDays: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        insuredCustomers: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        standardARDays?: number;
        customerConcentrationLimit?: number;
        crossAgeLimit?: number;
        contraProvision?: number;
        paidDays?: number;
        insuredARAdvanceRate?: number;
        uninsuredARAdvanceRate?: number;
        excludeFromTotal?: boolean;
        waiveInsuredCustomers?: boolean;
    };
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    borrowerId: mongoose.Types.ObjectId;
    bbcDateId: mongoose.Types.ObjectId;
    useManualInputs: boolean;
    __v?: number;
    actual?: boolean;
    summary?: {
        invoiceAmount: number;
        grossAR: number;
        balanceAfterCrossAge: number;
        permittedOver: number;
        creditNotes: number;
        excludedCustomerDeduction: number;
        deduction: number;
        partiallyPaidDeduction: number;
        contraDeduction: number;
        crossAgeDeduction: number;
        waivedDeduction: number;
        finalResult: number;
        insuredComponent: number;
        preliminaryEligibleBalance: number;
        uninsuredComponent: number;
        insuredAvailability: number;
        uninsuredAvailability: number;
        creditNotesNegative: number;
        ARReserves: number;
        ARAvailability: number;
    };
    userCalculatedId?: string;
    calculatedAt?: Date;
    settings?: {
        excludedCustomers: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        permittedConcentration: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        permittedExtendedARDays: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        insuredCustomers: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        standardARDays?: number;
        customerConcentrationLimit?: number;
        crossAgeLimit?: number;
        contraProvision?: number;
        paidDays?: number;
        insuredARAdvanceRate?: number;
        uninsuredARAdvanceRate?: number;
        excludeFromTotal?: boolean;
        waiveInsuredCustomers?: boolean;
    };
}>> & mongoose.FlatRecord<{
    createdAt: NativeDate;
    updatedAt: NativeDate;
} & {
    borrowerId: mongoose.Types.ObjectId;
    bbcDateId: mongoose.Types.ObjectId;
    useManualInputs: boolean;
    __v?: number;
    actual?: boolean;
    summary?: {
        invoiceAmount: number;
        grossAR: number;
        balanceAfterCrossAge: number;
        permittedOver: number;
        creditNotes: number;
        excludedCustomerDeduction: number;
        deduction: number;
        partiallyPaidDeduction: number;
        contraDeduction: number;
        crossAgeDeduction: number;
        waivedDeduction: number;
        finalResult: number;
        insuredComponent: number;
        preliminaryEligibleBalance: number;
        uninsuredComponent: number;
        insuredAvailability: number;
        uninsuredAvailability: number;
        creditNotesNegative: number;
        ARReserves: number;
        ARAvailability: number;
    };
    userCalculatedId?: string;
    calculatedAt?: Date;
    settings?: {
        excludedCustomers: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        permittedConcentration: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        permittedExtendedARDays: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        insuredCustomers: mongoose.Types.DocumentArray<{
            limit?: number;
            customer?: string;
        }>;
        standardARDays?: number;
        customerConcentrationLimit?: number;
        crossAgeLimit?: number;
        contraProvision?: number;
        paidDays?: number;
        insuredARAdvanceRate?: number;
        uninsuredARAdvanceRate?: number;
        excludeFromTotal?: boolean;
        waiveInsuredCustomers?: boolean;
    };
}> & {
    _id: mongoose.Types.ObjectId;
}>;
export declare const ReceivableAvailabilityModel: mongoose.Model<IReceivableAvailabilityDoc>;
