feat: implement comprehensive notification engine with policies, preferences, and automated dispatching services
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { NotificationChannel } from "../NotificationJobs/NotificationJobs.Interface";
|
||||
|
||||
export interface QuietHours {
|
||||
from: string; // "HH:mm" format, e.g. "22:00"
|
||||
to: string; // "HH:mm" format, e.g. "07:00"
|
||||
}
|
||||
|
||||
export interface ReminderRules {
|
||||
offset: number; // minutes before appointment
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
export interface ICompanyNotificationPolicy {
|
||||
id?: string;
|
||||
companyId: string;
|
||||
defaultChannels: NotificationChannel[];
|
||||
mutedChannels?: NotificationChannel[];
|
||||
timezone: string;
|
||||
quietHours?: QuietHours;
|
||||
reminderRules?: ReminderRules[];
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface FindCompanyPolicyParams {
|
||||
companyId?: string;
|
||||
}
|
||||
|
||||
export interface ICompanyNotificationPolicyAdapter {
|
||||
findOne(filters: FindCompanyPolicyParams): Promise<ICompanyNotificationPolicy | null>;
|
||||
upsert(
|
||||
companyId: string,
|
||||
data: Partial<Omit<ICompanyNotificationPolicy, "id" | "companyId" | "createdAt" | "updatedAt">>
|
||||
): Promise<ICompanyNotificationPolicy>;
|
||||
}
|
||||
Reference in New Issue
Block a user