games_app/backend/dist-test-faq/repositories/userSecurityNotificationRepository.d.ts

29 lines
921 B
TypeScript

export type UserSecurityNotificationRow = {
id: string;
user_id: string;
event_type: string;
title: string;
body: string | null;
read_at: Date | null;
metadata: Record<string, unknown> | null;
created_at: Date;
};
export declare function createUserSecurityNotification(data: {
userId: string;
eventType: string;
title: string;
body?: string | null;
metadata?: Record<string, unknown> | null;
}): Promise<void>;
export declare function listForUser(userId: string, opts?: {
limit?: number;
offset?: number;
unreadOnly?: boolean;
}): Promise<{
items: UserSecurityNotificationRow[];
total: number;
unreadCount: number;
}>;
export declare function markRead(userId: string, notificationId: string): Promise<boolean>;
export declare function markAllRead(userId: string): Promise<number>;
//# sourceMappingURL=userSecurityNotificationRepository.d.ts.map