import { DeleteDTO } from '@hed-hog/api';
import { LocaleService } from '@hed-hog/api-locale';
import { MailService as MailMainService } from '@hed-hog/api-mail';
import { PaginationDTO } from '@hed-hog/api-pagination';
import { PrismaService } from '@hed-hog/api-prisma';
import { OnModuleInit } from '@nestjs/common';
import { IntegrationDeveloperApiService } from '../integration/services/integration-developer-api.service';
import { SettingService } from '../setting/setting.service';
import { CreateDTO } from './dto/create.dto';
import { ImportDTO } from './dto/import.dto';
import { SendTemplatedMailDTO } from './dto/send.dto';
import { TestMailDTO } from './dto/test-mail.dto';
import { UpdateDTO } from './dto/update.dto';
export declare class MailService implements OnModuleInit {
    private readonly prismaService;
    private readonly mailMainService;
    private readonly localeService;
    private readonly setting;
    private readonly integrationApi;
    private readonly logger;
    private readonly modelName;
    constructor(prismaService: PrismaService, mailMainService: MailMainService, localeService: LocaleService, setting: SettingService, integrationApi: IntegrationDeveloperApiService);
    onModuleInit(): void;
    private isMailConfigSlug;
    private isSettingEnabled;
    private syncConfiguredMailFlag;
    /**
     * Reload mail configuration from database and update MailMainService.
     * Returns the active from address and the built config object.
     */
    reloadConfig(): Promise<{
        success: boolean;
        provider: string;
        from: string;
        config: any;
    }>;
    private buildMailConfig;
    list(locale: string, paginationParams: PaginationDTO): Promise<{
        total: any;
        lastPage: number;
        page: number;
        pageSize: number;
        prev: number;
        next: number;
        data: any[];
    }>;
    get(locale: string, id: number): Promise<{
        id: number;
        slug: string;
        locale_id: number;
        mail_id: number;
        subject: string;
        body: string;
        mail_var: {
            name: string;
            id: number;
        }[];
        locale: {
            code: string;
        };
        created_at: Date;
        updated_at: Date;
    }>;
    create(data: CreateDTO): Promise<{
        mail_locale: {
            id: number;
            body: string;
            created_at: Date;
            updated_at: Date;
            subject: string;
            locale_id: number;
            mail_id: number;
        }[];
        mail_var: {
            name: string;
            id: number;
            created_at: Date;
            updated_at: Date;
            mail_id: number;
        }[];
    } & {
        id: number;
        created_at: Date;
        updated_at: Date;
        slug: string;
    }>;
    update({ id, data }: {
        id: number;
        data: UpdateDTO;
    }): Promise<{
        mail_locale: {
            id: number;
            body: string;
            created_at: Date;
            updated_at: Date;
            subject: string;
            locale_id: number;
            mail_id: number;
        }[];
        mail_var: {
            name: string;
            id: number;
            created_at: Date;
            updated_at: Date;
            mail_id: number;
        }[];
    } & {
        id: number;
        created_at: Date;
        updated_at: Date;
        slug: string;
    }>;
    delete({ ids }: DeleteDTO): Promise<{
        count: number;
    }>;
    sendTemplatedMail(locale: string, { email, slug, variables }: SendTemplatedMailDTO): Promise<void>;
    private getLocaleRecord;
    private getMailTemplate;
    private interpolateTemplate;
    sendTestMail(locale: string, { slug, email, subject, body, variables, }: TestMailDTO): Promise<any>;
    importTemplates({ data, overwrite }: ImportDTO): Promise<{
        conflicts: string[];
        success?: undefined;
        imported?: undefined;
        templates?: undefined;
    } | {
        success: boolean;
        imported: number;
        templates: any[];
        conflicts?: undefined;
    }>;
}
//# sourceMappingURL=mail.service.d.ts.map