import api from "@/lib/api-client"; import { INotification } from "../types/notification.types"; import { IPagination } from "@/lib/types"; export async function getNotifications(params: { limit?: number; cursor?: string; type?: string; }): Promise> { const req = await api.post>( "/notifications", params, ); return req.data; } export async function getUnreadCount(): Promise<{ count: number }> { const req = await api.post<{ count: number }>( "/notifications/unread-count", ); return req.data; } export async function markNotificationsRead( notificationIds: string[], ): Promise { await api.post("/notifications/mark-read", { notificationIds }); } export async function markAllNotificationsRead(): Promise { await api.post("/notifications/mark-all-read"); }