chore: update CHANGELOG for version 0.6.0-alpha, add in-app notification center, and update package dependencies

This commit is contained in:
Usman Baig
2026-02-13 09:36:18 +01:00
parent 08110d7245
commit 18a54401ef
6 changed files with 317 additions and 29 deletions

39
lib/api/notifications.ts Normal file
View File

@@ -0,0 +1,39 @@
/**
* @file Notifications API client
*/
import apiRequest from './client'
export interface Notification {
id: string
organization_id: string
type: string
title: string
body?: string
read: boolean
link_url?: string
link_label?: string
metadata?: Record<string, unknown>
created_at: string
}
export interface ListNotificationsResponse {
notifications: Notification[]
unread_count: number
}
export async function listNotifications(): Promise<ListNotificationsResponse> {
return apiRequest<ListNotificationsResponse>('/notifications')
}
export async function markNotificationRead(id: string): Promise<void> {
return apiRequest<void>(`/notifications/${id}/read`, {
method: 'PATCH',
})
}
export async function markAllNotificationsRead(): Promise<void> {
return apiRequest<void>('/notifications/mark-all-read', {
method: 'POST',
})
}