UNPKG

504 BTypeScriptView Raw
1import { Middleware, Pipelines } from '../types/middleware';
2export interface Alert {
3 id: number;
4 accountId: string;
5 triggeredBy: string;
6 message: string;
7 count: number;
8 createdAt: Date;
9 updatedAt: Date;
10}
11export default class AlertMiddleware implements Middleware {
12 private alerts;
13 private nextAlertId;
14 applyToPipelines(pipelines: Pipelines, accountId: string): Promise<void>;
15 getAlerts(): Alert[];
16 dismissAlert(id: number): void;
17 private addAlert;
18}