new NotificationService()
Service for managing user notifications.
Methods
delete(notificationId) → {Promise.<Object>}
Delete a notification by its ID.
Parameters:
| Name | Type | Description |
|---|---|---|
notificationId | string | ID of the notification to delete |
Returns:
Response data
- Type:
- Promise.<Object>
getAll() → {Promise.<Array>}
Get all notifications for the user.
Returns:
Array of notification objects
- Type:
- Promise.<Array>
markAsNotRead(notificationId) → {Promise.<Object>}
Mark a notification as not read.
Parameters:
| Name | Type | Description |
|---|---|---|
notificationId | string | ID of the notification to mark as not read |
Returns:
Response data
- Type:
- Promise.<Object>
markAsRead(notificationId) → {Promise.<Object>}
Mark a notification as read.
Parameters:
| Name | Type | Description |
|---|---|---|
notificationId | string | ID of the notification to mark as read |
Returns:
Response data
- Type:
- Promise.<Object>