import request from "../../http/request";

/**
 * 获取未读通知数量
 * @param
 * @returns
 */
export const getUnreadCountApi = () => {
  return request({
    url: `/notifications/unread-count`,
    method: "POST",
  });
};

/**
 * 获取通知列表
 * @param
 * @returns
 */
export const getNotificationListApi = (params) => {
  return request({
    url: `/notifications/`,
    method: "POST",
    data: params,
  });
};

/**
 * 标记消息类型通知为已读
 * @param params {id: number}
 * @returns
 */
export const markAsReadByTypeApi = (params) => {
  return request({
    url: `/notifications/mark-as-read-by-type`,
    method: "POST",
    data: params,
  });
};
