import { Update, Context, Path, AlarmOptions, SourceRef, NotificationId, Brand } from '@signalk/server-api';
import { NotificationApplication } from './index';
import { AlarmProperties } from './alarm';
export type NotificationKey = Brand<string, 'notificationKey'>;
/**
 *
 * @param context Signal K Context
 * @param path Signal K Path
 * @param source Delta sourceRef
 * @returns String representing a key associating notification deltas to their notificationId
 */
export declare const buildKey: (context: Context, path: Path, source: SourceRef) => NotificationKey;
/**
 * Class to manage the lifecycle of alarms
 */
export declare class NotificationManager {
    private server;
    private app;
    private alarms;
    private readonly deltaVersion;
    private cleanTimer?;
    private forCleaning;
    constructor(server: NotificationApplication);
    /**
     * Emit notification for the supplied alarm object
     * @param alarm Alarm object
     */
    private emitNotification;
    /** Return a list of Alarms keyed by their id */
    get list(): Record<string, AlarmProperties>;
    /**
     * Return alarm with specified identifier
     * @param id alarm identifier
     * @returns alarm properties
     */
    get(id: NotificationId): AlarmProperties | undefined;
    /**
     * Raise alarm and return identifier
     * @param options Object to initialise the Alarm
     * @returns alarm id
     */
    raise(options: AlarmOptions): NotificationId;
    /**
     * Update alarm properties
     * @param id Alarm identifier
     * @param options Key / values to update
     */
    update(id: NotificationId, options: AlarmOptions): void;
    /**
     * Raise MOB alarm and return identifier
     * @param options  Object to initialise the alarm. default= 'Person Overboard!'
     * @returns alarm id
     */
    mob(options?: {
        message: string;
    }): NotificationId;
    /**
     * Silence All alarms
     */
    silenceAll(): void;
    /**
     * Silence alarm by removing the 'sound' method from the notification
     * @param id Notification identifier
     */
    silence(id: NotificationId): void;
    /**
     * Acknowledge All alarms
     */
    acknowledgeAll(): void;
    /**
     * Acknowledge alarm by removing the 'sound' method from the notification
     * @param id Notification identifier
     */
    acknowledge(id: NotificationId): void;
    /**
     * Clear alarm by setting notification state to `normal`
     * @param id Notification identifier
     */
    clear(id: NotificationId): void;
    /**
     * Process alarm from notification delta
     * @param u Update object of incoming Delta message
     * @param context Incoming Delta message context value
     */
    processNotificationUpdate(u: Update, context: Context): void;
    /**
     * Clean out alarms that have returned to and remained in NORMAL state
     * for the duration of CLEAN_INTERVAL
     */
    private clean;
}
//# sourceMappingURL=notificationManager.d.ts.map