import type { ControlPlaneStore, JsonValue } from '../control-plane';
import type { Alert, AlertRule, HealthCheck, HealthResult, NotificationChannel, NotificationDelivery, NotificationRoute } from './model';
export declare class AlertStore {
    readonly controlPlane: ControlPlaneStore;
    private readonly options;
    private readonly key;
    constructor(controlPlane: ControlPlaneStore, options: {
        now?: () => Date;
        encryptionKey: string;
    });
    now(): string;
    private encrypt;
    private decrypt;
    createHealthCheck(input: Omit<HealthCheck, 'id' | 'version' | 'createdAt' | 'updatedAt'>): HealthCheck;
    getHealthCheck(id: string): HealthCheck | undefined;
    listHealthChecks(projectId: string, environmentId?: string): HealthCheck[];
    setHealthCheckEnabled(id: string, enabled: boolean): HealthCheck;
    appendHealthResult(input: Omit<HealthResult, 'id'>): HealthResult;
    listHealthResults(checkId: string, limit?: number): HealthResult[];
    createRule(input: Omit<AlertRule, 'id' | 'version' | 'createdAt' | 'updatedAt'>): AlertRule;
    getRule(id: string): AlertRule | undefined;
    listRules(projectId: string, environmentId?: string): AlertRule[];
    setRuleEnabled(id: string, enabled: boolean): AlertRule;
    getAlertByDedup(dedupKey: string): Alert | undefined;
    getAlert(id: string): Alert | undefined;
    listAlerts(projectId: string, input?: {
        environmentId?: string;
        states?: string[];
        limit?: number;
    }): Alert[];
    saveAlert(value: Alert, eventType: string, actorId?: string): Alert;
    acknowledge(id: string, actorId: string): Alert;
    assign(id: string, ownerActorId: string | undefined, actorId?: string): Alert;
    silenceAlert(id: string, until: string, actorId?: string): Alert;
    createSilence(input: {
        projectId: string;
        environmentId?: string;
        resourceId?: string;
        matcher?: Record<string, unknown>;
        reason: string;
        startsAt: string;
        endsAt: string;
        timezone: string;
        actorId?: string;
    }): string;
    isSilenced(rule: AlertRule, group: Record<string, string>, at: string): boolean;
    createChannel(input: {
        organizationId: string;
        name: string;
        kind: NotificationChannel['kind'];
        config?: Record<string, unknown>;
        credential?: string;
        actorId?: string;
    }): NotificationChannel;
    getChannel(id: string): NotificationChannel | undefined;
    channelCredential(id: string): string | undefined;
    listChannels(organizationId: string): NotificationChannel[];
    rotateChannel(id: string, credential: string): NotificationChannel;
    setChannelStatus(id: string, status: NotificationChannel['status'], error?: string): NotificationChannel;
    markChannelTest(id: string, ok: boolean, error?: string): NotificationChannel;
    createRoute(input: Omit<NotificationRoute, 'id' | 'version' | 'createdAt' | 'updatedAt'>): NotificationRoute;
    getRoute(id: string): NotificationRoute | undefined;
    listRoutes(organizationId: string): NotificationRoute[];
    countRouteDeliveries(routeId: string, since: string): number;
    setRouteEnabled(id: string, enabled: boolean): NotificationRoute;
    createDelivery(input: {
        alertId?: string;
        channelId: string;
        routeId?: string;
        eventType: string;
        idempotencyKey: string;
        payload: Record<string, JsonValue>;
        maxAttempts?: number;
        nextAttemptAt?: string;
    }): NotificationDelivery;
    getDelivery(id: string): NotificationDelivery | undefined;
    listDeliveries(input?: {
        alertId?: string;
        states?: string[];
        limit?: number;
    }): NotificationDelivery[];
    updateDelivery(id: string, input: {
        state: NotificationDelivery['state'];
        attempt: number;
        nextAttemptAt?: string;
        responseStatus?: number;
        error?: string;
        deliveredAt?: string;
    }): NotificationDelivery;
}
