Files
turnosxpress/server/src/Models/Notifications/Notifications.Interface.ts
T

35 lines
719 B
TypeScript

export enum NOTIFICATION_TYPES {
EMAIL = "EMAIL",
WAP = "WAP",
SYSTEM = "SYSTEM",
}
export type NotificationDataEmail = {
email: string;
subject?: string;
message?: string;
templateId?: string;
context?: Record<string, unknown>;
substitutions?: Record<string, string | number | boolean>;
};
export type NotificationDataWap = {
phoneNumber: string;
message: string;
companyId: string;
sessionUser: string;
};
export type NotificationDataSystem = {
userId: string;
conversationId?: string;
subject: string;
message: string;
type?: string;
code?: string;
};
export interface INotificationsAdapter<T> {
send: (data: T) => Promise<void>;
}