/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/schemaoptions" />
/// <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, Model } from 'mongoose';
import Joi from 'joi';
import { ExternalProspectStageTwoTables } from './ProspectInfoStageTwo.model';
import { ExternalProspectStageOneTables } from './ProspectInfoStageOne.model';
import { TDictionary } from '../helpers/main.helper';
import { ICRMProspectInfoNote } from './ProspectInfoNote.model';
import { IProspectFile } from './ProspectFile.model';
export declare const prospectFieldsDictionary: TDictionary;
export declare const sharepointFoldersDictionary: {
    readonly confidential: "Confidential - Personal Information";
    readonly confidentialDeclined: "Declined";
    readonly legal: "Legal";
    readonly portfolio: "Portfolio";
    readonly underwriting: "Underwriting";
    readonly drafts: "Drafts";
    readonly finalDocuments: "Final Documents";
    readonly APReports: "01. AP Reports";
    readonly ARReports: "02. AR Reports";
    readonly borrowingBaseCertificatesAndBackup: "03. Borrowing Base Certificates and Backup";
    readonly financials: "04. Financials";
    readonly inventory: "05. Inventory";
    readonly machineryEquipment: "06. Machinery & Equipment";
    readonly taxes: "07. Taxes";
    readonly insurance: "08. Insurance";
    readonly fieldExams: "09. Field Exams";
    readonly payments: "10. Payments";
    readonly interestStatements: "11. Interest Statements";
    readonly leasesRealEstate: "12. Leases & Real Estate";
    readonly agreementsContracts: "13. Agreements & Contracts";
    readonly liensLitigation: "14. Liens & Litigation";
    readonly verifications: "15. Verifications";
    readonly onlineBankingInstructions: "16. Online Banking Instructions";
    readonly compliance: "17. Compliance";
    readonly portfolio_other: "18. Other";
    readonly dueDiligence: "01. Due Diligence";
    readonly loi: "02. LOI";
    readonly loanMemoApprovals: "03. Loan Memo & Approvals";
    readonly loiTemplates: "zz Templates";
    readonly loanMemo: "01. Loan Memo";
    readonly dataTablesWorkings: "02. Data, Tables & Workings";
    readonly approvalEmails: "03. Approval Emails";
    readonly templatesSamples: "zz Templates and Samples";
    readonly corporateDocuments: "01. Corporate Documents";
    readonly organizationDocumentsGoodStandings: "a. Organization Documents and Good Standings";
    readonly disclosureSchedule: "b. Disclosure Schedule";
    readonly corporateDocuments_insurance: "c. Insurance";
    readonly ownership: "d. Ownership";
    readonly officersManagersStaff: "e. Officers, Managers, Staff";
    readonly lienLitigationSearchesTaxes: "02. Lien & Litigation Searches and Taxes";
    readonly lienLitigationSearch: "a. Lien & Litigation Search";
    readonly disclosedLitigations: "b. Disclosed Litigations";
    readonly payrollTaxStatementsProofOfPayment: "c. Payroll Tax Statements & Proof of Payment";
    readonly incomeTaxReturns: "d. Income Tax Returns";
    readonly personalPropertyTaxStatementsProofOfPayment: "e. Personal Property Tax Statements and Proof of Payment";
    readonly KYC: "03. KYC";
    readonly collateral: "04. Collateral";
    readonly collateral_inventory: "a. Inventory";
    readonly receivables: "b. Receivables";
    readonly equipment: "c. Equipment";
    readonly fieldExamAppraisals: "d. Field Exam & Appraisals";
    readonly borrowingBases: "e. Borrowing Bases";
    readonly financialsBankStatements: "05. Financials and Bank Statements";
    readonly historicalFinancials: "a. Historical Financials";
    readonly projections: "b. Projections";
    readonly bankStatements: "c. Bank Statements";
    readonly accountsPayables: "d. Accounts Payables";
    readonly currentDebt: "e. Current Debt";
    readonly majorContracts: "06. Major Contracts";
    readonly leases: "a. Leases";
    readonly it: "b. IT";
    readonly majorContracts_other: "c. Other";
    readonly intellectualProperty: "07. Intellectual Property";
    readonly fieldExamRequests: "08. Field Exam Requests";
    readonly customerVendorLists: "09. Customer & Vendor Lists";
    readonly other: "10. Other";
    readonly standardEmailAttachments: "zz Standard Email Attachments";
    readonly underwriting_templates: "zz Templates";
};
export type TSharepointFolderKey = keyof typeof sharepointFoldersDictionary;
export type TSharepointFolderValue = typeof sharepointFoldersDictionary[TSharepointFolderKey];
export type TSharepointFolder = typeof sharepointFoldersDictionary[TSharepointFolderKey];
export declare enum EProspectPriority {
    LOW = "LOW",
    MEDIUM = "MEDIUM",
    HIGH = "HIGH"
}
export declare enum EProspectStatus {
    PROSPECT = "PROSPECT",
    TERM_SHEET = "TERM_SHEET",
    DUE_DILIGENCE = "DUE_DILIGENCE",
    PHASE_2 = "PHASE_2",
    LOAN_DOCUMENTS = "LOAN_DOCUMENTS",
    FUNDED = "FUNDED"
}
export declare enum EProspectStatusDict {
    PROSPECT = "Prospect",
    TERM_SHEET = "Term Sheet",
    DUE_DILIGENCE = "Due Diligence",
    PHASE_2 = "Phase II",
    LOAN_DOCUMENTS = "Loan Documents",
    FUNDED = "Funded"
}
export declare enum EProspectDeclineReason {
    NOT_DECLINED = "NOT_DECLINED",
    DO_NOT_LIKE_COLLATERAL = "DO_NOT_LIKE_COLLATERAL",
    INSUFFICIENT_COLLATERAL = "INSUFFICIENT_COLLATERAL",
    LOST_TO_COMPETITOR = "LOST_TO_COMPETITOR",
    DOES_NOT_FIT_LENDING_CRITERIA = "DOES_NOT_FIT_LENDING_CRITERIA",
    DATA_QUALITY = "DATA_QUALITY",
    DID_NOT_HEAR_BACK = "DID_NOT_HEAR_BACK",
    NOT_ENOUGH_CAPITAL_TO_FUND = "NOT_ENOUGH_CAPITAL_TO_FUND"
}
interface IProspectProduct {
    commitment: number;
    expected: number;
    maturity: number;
}
export interface IProspectBase {
    isDeclined: boolean;
    name: string;
    industryId: mongoose.Types.ObjectId;
    status: EProspectStatus;
    revolver: IProspectProduct;
    term: IProspectProduct;
}
export interface IProspectInfoRow {
    _id: string;
    name: string;
    value: string;
    extraValue?: string;
}
export interface IProspectInfoStageOne {
    companyLegalName: string;
    companyLegalAddress: string;
    companyCorrespondenceAddress: string;
    DBANames: string;
    websiteAddress: string;
    businessDescription: string;
    [ExternalProspectStageOneTables.litigation]: unknown[];
    [ExternalProspectStageOneTables.detailsOfCurrentDebt]: unknown[];
}
export interface IProspectInfoStageTwo {
    [ExternalProspectStageTwoTables.listOfShareholders]: unknown[];
    [ExternalProspectStageTwoTables.listOfOfficers]: unknown[];
    [ExternalProspectStageTwoTables.listOfManagers]: unknown[];
    [ExternalProspectStageTwoTables.addressesOfOffices]: unknown[];
    [ExternalProspectStageTwoTables.addressesOfWarehouses]: unknown[];
    [ExternalProspectStageTwoTables.topCustomers]: unknown[];
    [ExternalProspectStageTwoTables.itSystems]: unknown[];
    [ExternalProspectStageTwoTables.insuranceBrokers]: unknown[];
    [ExternalProspectStageTwoTables.insurancePolicies]: unknown[];
    [ExternalProspectStageTwoTables.financialInformation]: unknown[];
    [ExternalProspectStageTwoTables.accountsReceivables]: unknown[];
    [ExternalProspectStageTwoTables.accountsReceivablesLists]: unknown[];
    [ExternalProspectStageTwoTables.accountsReceivablesExtra]: unknown[];
    [ExternalProspectStageTwoTables.accountsReceivablesContacts]: unknown[];
    [ExternalProspectStageTwoTables.inventoryInformationFiles]: unknown[];
    [ExternalProspectStageTwoTables.inventoryInformationDetails]: unknown[];
    [ExternalProspectStageTwoTables.inventoryInformation]: unknown[];
    [ExternalProspectStageTwoTables.equipment]: unknown[];
}
export interface IProspectExternalInfo {
    stageOne: IProspectInfoStageOne;
    stageTwo: IProspectInfoStageTwo;
    notes: ICRMProspectInfoNote[];
}
export interface IProspectExternalNew {
    isLocked: boolean;
    lastSentDate: Date;
    info: IProspectExternalInfo;
}
export declare enum EProspectFileGroups {
    borrowingBase = "borrowingBase",
    corporateDocuments = "corporateDocuments",
    ownershipStructure = "ownershipStructure",
    organizationStructure = "organizationStructure",
    financialsBankInformation = "financialsBankInformation",
    financialsBankInformation_historicalFinancials = "financialsBankInformation_historicalFinancials",
    financialsBankInformation_projections = "financialsBankInformation_projections",
    financialsBankInformation_bankStatements = "financialsBankInformation_bankStatements",
    historicalFinancials = "historicalFinancials",
    projections = "projections",
    accountsPayables = "accountsPayables",
    collateralSales = "collateralSales",
    receivables = "receivables",
    taxes = "taxes",
    taxesIncome = "taxesIncome",
    taxesProperty = "taxesProperty",
    taxesPayroll = "taxesPayroll",
    majorContracts = "majorContracts",
    payrollRegister = "payrollRegister",
    litigationSummary = "litigationSummary",
    litigation = "litigation",
    itSystems = "itSystems",
    trademark = "trademark",
    websites = "websites",
    perfectionCertificate = "perfectionCertificate",
    other = "other",
    fieldAppraisal = "fieldAppraisal",
    confidential = "confidential",
    confidentialPersonalFinancial = "confidentialPersonalFinancial",
    confidentialDriverLicenses = "confidentialDriverLicenses",
    confidentialReferences = "confidentialReferences"
}
export declare const prospectFileGroups: string[];
export declare const prospectFileGroupsMap: {
    borrowingBase: string;
    corporateDocuments: string;
    financialsBankInformation: string;
    collateralSales: string;
    taxes: string;
    taxesIncome: string;
    taxesProperty: string;
    taxesPayroll: string;
    majorContracts: string;
    payrollRegister: string;
    litigationSummary: string;
    fieldAppraisal: string;
    confidential: string;
    confidentialPersonalFinancial: string;
    confidentialDriverLicenses: string;
    confidentialReferences: string;
    detailsOfCurrentDebt: string;
    litigation: string;
    financialInformation: string;
    accountsReceivables: string;
    inventoryInformationFiles: string;
    addressesOfOffices: string;
    addressesOfWarehouses: string;
    equipment: string;
    listOfManagers: string;
    listOfShareholders: string;
    listOfOfficers: string;
    itSystems: string;
    insuranceBrokers: string;
    insurancePolicies: string;
    accountsReceivablesExtra: string;
    inventoryInformation: string;
};
export declare const NO_ROW_ID = "__no_row__";
export declare const initialFileGroups: () => {};
export declare const externalProspectInitialInfo: () => IProspectExternalNew;
export type TProspectFiles = {
    [K in typeof prospectFileGroups[number]]: {
        [rowId: string]: IProspectFile[];
    };
};
export type TProspectAuditorFiles = Map<string, IProspectFile[]>;
export interface IProspectContact {
    name: string;
    email: string;
    phone: string;
    comment: string;
    companyName: string;
}
export interface IProspect extends IProspectBase, IProspectExternalNew {
    isLocked: boolean;
    probability: number;
    businessDescription: string;
    comments: string;
    collateralDescription: string;
    declineReason: EProspectDeclineReason;
    priority: EProspectPriority;
    sourceId: mongoose.Types.ObjectId;
    collaterals: {
        equipment: boolean;
        inventory: boolean;
        receivables: boolean;
        other: boolean;
    };
    keyDates: {
        lastContact: Date;
        receivedDate: Date;
        LOISubmitted: Date;
        DDStarted: Date;
        expectedFunding: Date;
        dropDate: Date;
    };
    closingPoints: number;
    expectedLoanYield: number;
    depositRequested: number;
    state: string;
    contacts: IProspectContact[];
    underwriterIds: mongoose.Types.ObjectId[];
    auditorIds: mongoose.Types.ObjectId[];
    appraiserIds: mongoose.Types.ObjectId[];
}
export interface IProspectBaseWithId extends IProspectBase {
    _id: string;
}
export interface IProspectWithId extends IProspect {
    _id: string;
}
export type IProspectExternal = Pick<IProspectWithId, 'info' | 'isLocked' | 'status' | '_id'> & {
    auditorFiles: IProspectFile[];
    files: IProspectFile[];
};
export type IProspectExternalAuditors = Pick<IProspectWithId, 'info' | 'isLocked'> & {
    files: IProspectFile[];
    auditorFiles: IProspectFile[];
    auditorSharedFiles: IProspectFile[];
};
export interface IProspectDoc extends IProspect, Document {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;
}
export interface IProspectLean extends IProspect {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;
}
export interface IProspectPlain extends IProspect {
    _id: string;
    createdAt: Date;
    updatedAt: Date;
}
export declare const baseFields: string[];
export declare const ProspectInfoExternalValidationSchema: Joi.ObjectSchema<any>;
export declare const ProspectInfoValidationSchema: Joi.ObjectSchema<any>;
export declare const ProspectValidationSchema: Joi.ObjectSchema<any>;
export type ProspectModel = Model<IProspectDoc>;
export declare const ProspectSchema: mongoose.Schema<IProspect, ProspectModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IProspect, mongoose.Document<unknown, {}, mongoose.FlatRecord<IProspect>> & mongoose.FlatRecord<IProspect> & {
    _id: mongoose.Types.ObjectId;
}>;
export declare const Prospect: ProspectModel;
export {};
