/// <reference types="node" />
import { Buffer } from 'buffer';
import { IMulterFile } from '../interfaces/multer.interface';
import { IEmail } from '../interfaces/email.interface';
import { IFinancialComplianceBorrowerDocumentWithMails } from '../models/FinancialComplianceBorrower.model';
import { FileManagerService } from './file-manager.service';
import { BorrowerService } from './borrowers.service';
import { ComplianceBorrowersService } from './compliance-borrowers.service';
import { FinancialComplianceService } from './financial-compliance.service';
import { LoanChargesService } from './loan-charges.service';
import { OrganizationEmailsService } from './organization-emails.service';
import { OrganizationsService } from './organizations.service';
import { SentryService } from './sentry.service';
export declare enum ESenderType {
    REGULAR = 0,
    FINANCIAL = 1,
    FINANCIAL_ONLY = 2,
    GOAT = 3,
    NEW_BUSINESS = 4
}
type EmailWithItems = IEmail & {
    recipientName: string;
    hasPastDueItems: boolean;
    complianceBorrowerId: string;
    items: {
        itemName: string;
        dateDue: Date;
        status: string;
    }[];
};
export type EmailWithFinancial = IEmail & {
    borrowers: IFinancialComplianceBorrowerDocumentWithMails[];
};
interface INodemailerServiceConfig {
    appTitle: string;
    sender: string;
    senderFinancial: string;
    senderNewBusiness: string;
    hiddenRecipient: string[];
    mailerConfig: {
        host: string;
        port: number;
        auth: {
            user: string;
            pass: string;
        };
    };
}
export declare class NodemailerService {
    private readonly borrowerService;
    private readonly getComplianceBorrowersService;
    private readonly fileManagerService;
    private readonly financialComplianceService;
    private readonly loanChargesService;
    private readonly organizationEmailsService;
    private readonly organizationsService;
    private readonly sentryService;
    private readonly config;
    private senders;
    private transporter;
    constructor(config: INodemailerServiceConfig, borrowerService: BorrowerService, getComplianceBorrowersService: () => ComplianceBorrowersService, fileManagerService: FileManagerService, financialComplianceService: FinancialComplianceService, loanChargesService: LoanChargesService, organizationEmailsService: OrganizationEmailsService, organizationsService: OrganizationsService, sentryService: SentryService);
    private getSender;
    private senderHandler;
    getSignatureAsync(senderType: ESenderType, organizationSubfolder?: string): Promise<string>;
    collectItemsAndNotify(borrowerId: string): Promise<void>;
    sendEmailNotification(email: EmailWithItems, borrowerId: string): Promise<void>;
    sendDailyUpdates(): Promise<void>;
    sendSimpleNotificationMail(email: IEmail): Promise<void>;
    sendFinancialExternal(email: IEmail, organizationId: string, stopFunding?: boolean): Promise<void>;
    sendFinancialInternal(email: EmailWithFinancial, stopFunding?: boolean): Promise<void>;
    private getEmailStatementParams;
    sendEmailWithAttach(borrowerCode: string, files: IMulterFile[]): Promise<void>;
    sendEmailWithStatement(borrowerId: string, statement: {
        filename: string;
        content: Buffer;
    }): Promise<void>;
    sendEmailWithSimpleAttachments(email: IEmail, attachments: any[]): Promise<void>;
    sendLoanUploadReport(email: IEmail, attachments: any[], borrowerId: string): Promise<void>;
    sendPlaidReminder(email: IEmail): Promise<void>;
    sendEmailFTP(email: Partial<IEmail>, attachments: any[], success: boolean): Promise<void>;
    sendBrokerEmail(email: Partial<IEmail>, attachments: any[], replacements: {
        broker: string;
        month: string;
    }): Promise<void>;
    sendProspectForm(email: Partial<IEmail>, replacements: {
        link: string;
        contactName: string;
        prospectName: string;
        password: string;
    }, stage: 'one' | 'two'): Promise<void>;
    sendProspectReminder(email: Partial<IEmail>, replacements: {
        link: string;
        contactName: string;
        hasEmptyFields: boolean;
        requiredGroups: string[];
        prospectName: string;
        password: string;
    }): Promise<void>;
}
export {};
