Headless API Reference
This page contains the complete documentation about the Headless Notification Center package. You can find here the list of all the methods that you can use.
initializeSession
To use the headless service, you’ll need to initialize the session first. This sets the token and starts the socket listener service.
method args interface
fetchOrganization
Fetches the details of the current organization
method args interface
fetchUnseenCount
Fetches the count of unseen messages
method args interface
fetchUnreadCount
Fetches the count of unread messages
method args interface
listenNotificationReceive
Listens to a new notification being added. Can be used to retrieve a new notification in real-time and trigger UI changes.
method args interface
listenUnseenCountChange
Listens to the changes of the unseen count. Can be used to get real time count of the unseen messages.
method args interface
listenUnreadCountChange
Listens to the changes of the unread count. Can be used to get real time count of the unread messages.
method args interface
fetchNotifications
Retrieves the list of notifications for the subscriber. Can also be used to get the notifications of a particular tab.
method args interface
fetchUserPreferences
Fetches the user preferences
method args interface
updateUserPreferences
Updates the user preferences.
method args interface
markNotificationsAsRead
Mark a single or multiple notifications as read using the message id.
method args interface
markNotificationsAsSeen
Mark a single or multiple notifications as seen using the message id.
method args interface
markNotificationsAs
Mark a single or multiple notifications using the message id.
method args interface
removeNotification
Removes a single notification using the message id.
method args interface
removeNotifications
Removes multiple notifications using array of message ids (limit of 100).
method args interface
removeAllNotifications
Removes all notifications. Can be used to remove all notifications of a feed by passing the feedId
method args interface
updateAction
Updates the action button for the notifications.
method args interface
markAllMessagesAsRead
Mark subscriber’s all unread messages as read. Can be used to mark all messages as read of a single or multiple feeds by passing the feedId
method args interface
markAllMessagesAsSeen
Mark subscriber’s all unread messages as seen. Can be used to mark all messages as seen of a single or multiple feeds by passing the feedId
method args interface
Types and Interfaces
QueryObserverResult and MutationObserverResult are imported from
the @tanstack/query-core
library.
Was this page helpful?