/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/document" />
/// <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, { Model } from 'mongoose';
import { IBorrowerNoteSubjectLean, IBorrowerNoteSubjectPlain } from './BorrowerNoteSubject.model';
type BorrowerNoteStatus = 'draft' | 'processing' | 'ready' | 'failed';
export interface IBorrowerNoteAttachment {
    fileId: string;
    fileName: string;
    filePath: string;
    mimeType: string;
    size: number;
    fieldName: string;
    contentId: string | null;
    isInline: boolean;
}
export interface IBorrowerNote {
    taskId?: string;
    status: BorrowerNoteStatus;
    borrowerId: mongoose.Types.ObjectId;
    subjectId?: mongoose.Types.ObjectId;
    text?: string;
    attachments: IBorrowerNoteAttachment[];
    createdBy: string;
    updatedBy?: string;
    source?: {
        type: 'manual' | 'email';
        emailFrom?: string;
        emailTo?: string;
        emailText?: string;
        emailHtml?: string;
    };
}
export interface IBorrowerNoteDoc extends IBorrowerNote, Document {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;
}
export interface IBorrowerNoteCreate extends Omit<IBorrowerNote, '_id' | 'borrowerId' | 'attachments' | 'updatedBy'> {
    borrowerId: string;
}
export interface IBorrowerNoteUpdate extends Omit<IBorrowerNote, '_id' | 'borrowerId' | 'attachments' | 'createdBy'> {
    borrowerId: string;
    removedAttachments: string[];
}
export interface IBorrowerNoteLean extends IBorrowerNote {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;
}
export interface IBorrowerNoteWithSubjectLean extends Omit<IBorrowerNoteLean, 'subjectId'> {
    subjectId: IBorrowerNoteSubjectLean | null;
}
export interface IBorrowerNotePlain extends Omit<IBorrowerNote, 'borrowerId' | 'subjectId'> {
    _id: string;
    borrowerId: string;
    subjectId: string;
    createdAt: string;
    updatedAt: string;
}
export interface IBorrowerNoteWithSubjectPlain extends Omit<IBorrowerNotePlain, 'subjectId'> {
    subjectId: IBorrowerNoteSubjectPlain | null;
}
export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
export declare const BorrowerNoteSchema: mongoose.Schema<IBorrowerNoteDoc, mongoose.Model<IBorrowerNoteDoc, any, any, any, mongoose.Document<unknown, any, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
    _id: mongoose.Types.ObjectId;
}>, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IBorrowerNoteDoc, mongoose.Document<unknown, {}, mongoose.FlatRecord<IBorrowerNoteDoc>> & mongoose.FlatRecord<IBorrowerNoteDoc> & Required<{
    _id: mongoose.Types.ObjectId;
}>>;
export declare const BorrowerNote: mongoose.Model<IBorrowerNoteDoc, {}, {}, {}, mongoose.Document<unknown, {}, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
    _id: mongoose.Types.ObjectId;
}>, any>;
export {};
