Skip to main content

Overview

The Siren JS SDK enhances Siren’s capabilities by providing advanced notification management functionalities within JavaScript applications. It offers seamless integration, robust error handling, and compatibility with Siren’s ecosystem.

Installation

Usage

Initialization

Constructor Options

Methods

fetchUnviewedNotificationsCount()

Retrieves the count of unviewed notifications.

fetchAllNotifications(options)

Retrieves a paginated list of notifications.

Options

Response

startRealTimeFetch(options)

Starts real-time notification updates.

stopRealTimeFetch(eventType)

Stops real-time updates.

markAsReadById(notificationId)

Marks a notification as read.

markAsReadByDate(params)

Marks notifications as read until a specific date.

deleteById(notificationId)

Deletes a notification.

deleteByDate(params)

Deletes notifications until a specific date.

markAllAsViewed(date)

Marks all notifications as viewed until the specified date.

Example