import { PrismaService } from "../../database/prisma/prisma.service";
import { EmailAdapter } from './adapters/email.adapter';
import { TemplateService } from './services/template.service';
import { NotificationChannel, NotificationSendStatus } from '@prisma/client';
export interface SendNotificationDto {
    channel: NotificationChannel;
    to: string;
    subject?: string;
    content?: string;
    templateCode?: string;
    variables?: Record<string, any>;
    priority?: 'HIGH' | 'NORMAL' | 'LOW';
    metadata?: any;
}
export declare class NotificationService {
    private readonly prisma;
    private readonly emailAdapter;
    private readonly templateService;
    private readonly logger;
    constructor(prisma: PrismaService, emailAdapter: EmailAdapter, templateService: TemplateService);
    send(dto: SendNotificationDto): Promise<{
        id: string;
        createdAt: Date;
        status: import("@prisma/client").$Enums.NotificationSendStatus;
        errorMessage: string | null;
        metadata: import("@prisma/client/runtime/library").JsonValue | null;
        updatedAt: Date;
        channel: import("@prisma/client").$Enums.NotificationChannel;
        subject: string | null;
        variables: import("@prisma/client/runtime/library").JsonValue | null;
        priority: import("@prisma/client").$Enums.NotificationPriority;
        content: string;
        recipientEmail: string | null;
        sentAt: Date | null;
        retryCount: number;
        maxRetries: number;
        nextRetryAt: Date | null;
        recipientId: string;
        templateId: string | null;
    }>;
    private sendAsync;
    private calculateNextRetry;
    private getRecipient;
    sendBatch(notifications: SendNotificationDto[]): Promise<{
        total: number;
        successful: number;
        failed: number;
        results: PromiseSettledResult<{
            id: string;
            createdAt: Date;
            status: import("@prisma/client").$Enums.NotificationSendStatus;
            errorMessage: string | null;
            metadata: import("@prisma/client/runtime/library").JsonValue | null;
            updatedAt: Date;
            channel: import("@prisma/client").$Enums.NotificationChannel;
            subject: string | null;
            variables: import("@prisma/client/runtime/library").JsonValue | null;
            priority: import("@prisma/client").$Enums.NotificationPriority;
            content: string;
            recipientEmail: string | null;
            sentAt: Date | null;
            retryCount: number;
            maxRetries: number;
            nextRetryAt: Date | null;
            recipientId: string;
            templateId: string | null;
        }>[];
    }>;
    getLogs(filters: {
        recipientId?: string;
        channel?: NotificationChannel;
        status?: NotificationSendStatus;
        startDate?: Date;
        endDate?: Date;
        page?: number;
        limit?: number;
    }): Promise<{
        data: ({
            template: {
                code: string;
                name: string;
            } | null;
            recipient: {
                displayName: string;
                id: string;
                username: string;
                email: string;
            };
        } & {
            id: string;
            createdAt: Date;
            status: import("@prisma/client").$Enums.NotificationSendStatus;
            errorMessage: string | null;
            metadata: import("@prisma/client/runtime/library").JsonValue | null;
            updatedAt: Date;
            channel: import("@prisma/client").$Enums.NotificationChannel;
            subject: string | null;
            variables: import("@prisma/client/runtime/library").JsonValue | null;
            priority: import("@prisma/client").$Enums.NotificationPriority;
            content: string;
            recipientEmail: string | null;
            sentAt: Date | null;
            retryCount: number;
            maxRetries: number;
            nextRetryAt: Date | null;
            recipientId: string;
            templateId: string | null;
        })[];
        total: number;
        page: number;
        limit: number;
        totalPages: number;
    }>;
    retryFailed(logId: string): Promise<{
        success: boolean;
        message: string;
    }>;
    getStatistics(startDate?: Date, endDate?: Date): Promise<{
        total: number;
        sent: number;
        failed: number;
        pending: number;
        successRate: string;
        byChannel: {
            channel: any;
            count: any;
        }[];
    }>;
}
