add alert routes
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { EventEmitter } from "stream";
|
||||
import { Claim } from "./utils/claims";
|
||||
|
||||
export type ChangeEvent = {
|
||||
type: "insert" | "update" | "delete";
|
||||
@@ -7,4 +6,18 @@ export type ChangeEvent = {
|
||||
document?: Object;
|
||||
};
|
||||
|
||||
export type AlertEvent = {
|
||||
type: "insert";
|
||||
collection: "alerts";
|
||||
document: {
|
||||
pid: string;
|
||||
title: string;
|
||||
recipientType: "user" | "team";
|
||||
recipientId: string;
|
||||
referenceId?: string;
|
||||
referenceCollection?: string;
|
||||
createdAt: Date;
|
||||
};
|
||||
};
|
||||
|
||||
export const dbEvents = new EventEmitter();
|
||||
|
||||
Reference in New Issue
Block a user