/** * Generated by orval v7.0.1 🍺 * Do not edit manually. * Serve API * Serve应用接口文档 * OpenAPI spec version: 0.0.1-SNAPSHOT */ import type { ResponseListNotificationVo, ResponseUnreadCountVo, ResponseVoid, } from "./models"; import { customAxiosInstance } from "../util/axios-instance"; export const getNotificationController = () => { /** * @summary 标记已读 */ const markRead = (id: number) => { return customAxiosInstance({ url: `/notifications/${id}/read`, method: "PUT", }); }; /** * @summary 获取通知列表 */ const listNotifications = () => { return customAxiosInstance({ url: `/notifications`, method: "GET", }); }; /** * @summary 获取未读数 */ const getUnreadCount = () => { return customAxiosInstance({ url: `/notifications/unread-count`, method: "GET", }); }; return { markRead, listNotifications, getUnreadCount }; }; export type MarkReadResult = NonNullable< Awaited["markRead"]>> >; export type ListNotificationsResult = NonNullable< Awaited< ReturnType< ReturnType["listNotifications"] > > >; export type GetUnreadCountResult = NonNullable< Awaited< ReturnType["getUnreadCount"]> > >;