import { apiRequest } from './api'; export type NotificationItem = { id: string; kind: string; title: string; body: string; href: string; readAt: string | null; createdAt: string; }; export type NotificationFeed = { items: NotificationItem[]; unread: number; }; export const getNotifications = async (): Promise => { const response = await apiRequest<{ data: NotificationFeed }>('/notifications'); return response.data; }; export const markNotificationRead = async (notificationId: string): Promise => { await apiRequest(`/notifications/${notificationId}/read`, { method: 'POST' }); }; export const markAllNotificationsRead = async (): Promise => { await apiRequest('/notifications/read-all', { method: 'POST' }); };