Notifications hooks
Hand-written shim. Generated list/delete/restore via ./notifications.gen. useGetNotificationUnreadCount, useMarkNotificationRead, useMarkAllNotificationsRead stay hand-written (custom ops + raw fetch).
Hooks
useDeleteNotification mutation
Soft-delete a notification.
TypeScript
useDeleteNotification(options?: MutationOpts<SuccessResponse, string>)Types: SuccessResponse
useGetNotificationUnreadCount query
TypeScript
useGetNotificationUnreadCount(options?: QueryOpts<{ count: number; }>)useListNotifications query
List notifications.
TypeScript
useListNotifications(params?: Omit<ListNotificationsParams, | > & { filter?: NotificationFilter; orderBy?: NotificationOrderBy[]; } & NotificationShorthands, options?: QueryOpts<Page<Notification>>)Types: ListNotificationsParams · NotificationFilter · NotificationOrderBy · NotificationShorthands · Page · Notification
useMarkAllNotificationsRead composite
TypeScript
useMarkAllNotificationsRead(options?: MutationOpts<SuccessResponse, void>)Types: SuccessResponse
useMarkNotificationRead composite
TypeScript
useMarkNotificationRead(options?: MutationOpts<Notification, string>)Types: Notification
usePurgeNotification composite
Permanently delete a soft-deleted notification.
TypeScript
usePurgeNotification(options?: MutationOpts<SuccessResponse, PurgeNotificationParams>)Types: SuccessResponse · PurgeNotificationParams
useRestoreNotification composite
Restore a notification.
TypeScript
useRestoreNotification(options?: MutationOpts<Notification, string>)Types: Notification
useRetrieveNotification query
Get a notification by ID.
TypeScript
useRetrieveNotification(id: string, options?: QueryOpts<Notification>)Types: Notification