import type { Alert, NotificationChannel, NotificationDelivery, NotificationRoute } from './model';
import { AlertStore } from './store';
export type NotificationFetch = (input: string, init: {
    method: string;
    headers: Record<string, string>;
    body: string;
    signal?: AbortSignal;
}) => Promise<{
    ok: boolean;
    status: number;
}>;
export type NotificationEmail = (input: {
    to: string | string[];
    from?: string;
    subject: string;
    text: string;
}) => Promise<unknown>;
export declare function isQuietHours(route: NotificationRoute, at: Date): boolean;
export declare class NotificationRouter {
    private readonly store;
    private readonly options;
    private readonly fetchImpl;
    constructor(store: AlertStore, options?: {
        fetchImpl?: NotificationFetch;
        emailImpl?: NotificationEmail;
        now?: () => Date;
    });
    private now;
    preview(organizationId: string, alert: Alert, eventType: string): Array<{
        route: NotificationRoute;
        channels: NotificationChannel[];
        quiet: boolean;
    }>;
    enqueue(organizationId: string, alert: Alert, eventType: 'firing' | 'resolved' | 'reminder' | 'escalation'): NotificationDelivery[];
    enqueueRemindersAndEscalations(organizationId: string, alerts: Alert[]): NotificationDelivery[];
    private send;
    deliver(id: string): Promise<NotificationDelivery>;
    deliverAll(deliveries: NotificationDelivery[]): Promise<NotificationDelivery[]>;
    retryDue(): Promise<NotificationDelivery[]>;
    testChannel(id: string): Promise<{
        ok: boolean;
        status?: number;
        error?: string;
    }>;
}
