import axios from "../../../config/axios"; import type { GetNotificationsResponse, GetUnseenCountResponse, } from "../types/NotificationTypes"; export const getNotifications = async ( cursor: string | undefined, status: "all" | "seen" | "unseen" ): Promise => { let query = ``; if (status !== "all") { query = `&status=${status}`; } const cursorParam = cursor ? `&cursor=${cursor}` : ``; const { data } = await axios.get( `/admin/notifications?limit=10${cursorParam}${query}` ); return data; }; export const readAll = async () => { const { data } = await axios.put(`/admin/notifications/read/all`); return data; }; export const getUnseenCount = async (): Promise => { const { data } = await axios.get( `/admin/notifications/unseen-count` ); return data; };