signalk-server
Version:
An implementation of a [Signal K](http://signalk.org) server for boats.
35 lines • 1.45 kB
TypeScript
import { Update, Context, Path, AlarmRaiseOptions, AlarmUpdateOptions, SourceRef, NotificationId, Brand, AlarmProperties } from '@signalk/server-api';
import { NotificationApplication } from './index';
export type NotificationKey = Brand<string, 'notificationKey'>;
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);
private emitNotification;
get list(): Record<string, AlarmProperties>;
get(id: NotificationId): AlarmProperties | undefined;
getPath(path: Path): Record<string, AlarmProperties>;
raise(options: AlarmRaiseOptions): NotificationId;
update(id: NotificationId, options: AlarmUpdateOptions): void;
mob(message?: string): NotificationId;
silenceAll(): void;
silence(id: NotificationId): void;
acknowledgeAll(): void;
acknowledge(id: NotificationId): void;
clear(id: NotificationId): void;
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