feat: notification framework
This commit is contained in:
13
server/lib/notifications/agents/agent.ts
Normal file
13
server/lib/notifications/agents/agent.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Notification } from '..';
|
||||
|
||||
export interface NotificationPayload {
|
||||
subject: string;
|
||||
username?: string;
|
||||
image?: string;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export interface NotificationAgent {
|
||||
shouldSend(type: Notification): boolean;
|
||||
send(type: Notification, payload: NotificationPayload): Promise<boolean>;
|
||||
}
|
||||
Reference in New Issue
Block a user