27 lines
761 B
TypeScript
27 lines
761 B
TypeScript
import { NotificationChannel } from "../NotificationJobs/NotificationJobs.Interface";
|
|
|
|
export interface IClientNotificationPreferences {
|
|
id?: string;
|
|
userId: string;
|
|
preferredChannels: NotificationChannel[];
|
|
mutedChannels: NotificationChannel[];
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
}
|
|
|
|
export interface FindClientPreferencesParams {
|
|
userId?: string;
|
|
}
|
|
|
|
export interface IClientNotificationPreferencesAdapter {
|
|
findOne(
|
|
filters: FindClientPreferencesParams
|
|
): Promise<IClientNotificationPreferences | null>;
|
|
upsert(
|
|
userId: string,
|
|
data: Partial<
|
|
Omit<IClientNotificationPreferences, "id" | "userId" | "createdAt" | "updatedAt">
|
|
>
|
|
): Promise<IClientNotificationPreferences>;
|
|
}
|