feat: implement comprehensive notification engine with policies, preferences, and automated dispatching services
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
CreateJobParams,
|
||||
INotificationJob,
|
||||
} from "./NotificationJobs.Interface";
|
||||
import { NotificationJobsAdapterMongoose } from "./NotificationJobs.Adapter.Mongoose";
|
||||
|
||||
class NotificationJobManager {
|
||||
adapter: NotificationJobsAdapterMongoose;
|
||||
|
||||
constructor() {
|
||||
this.adapter = new NotificationJobsAdapterMongoose();
|
||||
}
|
||||
|
||||
public async createJob(data: CreateJobParams): Promise<INotificationJob> {
|
||||
return this.adapter.create(data);
|
||||
}
|
||||
|
||||
public async cancelByAppointment(appointmentId: string): Promise<void> {
|
||||
return this.adapter.cancelByAppointment(appointmentId);
|
||||
}
|
||||
|
||||
public async findByAppointment(appointmentId: string): Promise<INotificationJob[]> {
|
||||
return this.adapter.findByAppointment(appointmentId);
|
||||
}
|
||||
}
|
||||
|
||||
const NotificationJobsList = new NotificationJobManager();
|
||||
export default NotificationJobsList;
|
||||
Reference in New Issue
Block a user