Constructor
new NotificationServer(sdk, serverUrl, opts)
Create a new Notifications server instance.
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sdk |
ShelfNetwork
|
Parent SDK instance. |
|||||||||||||||||||||||||||||||||||
serverUrl |
string
|
Notifications URL. |
|||||||||||||||||||||||||||||||||||
opts |
Object
|
|
Members
Methods
(async) getAll(optsopt) → {Promise.<JsonApiResponse>}
Get all notifications.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object
|
<optional> |
Request options.
|
Returns:
- Type:
-
Promise.<JsonApiResponse>
(async) getCounters() → {Promise.<JsonApiResponse>}
Get notification counters.
- Source:
Returns:
- Type:
-
Promise.<JsonApiResponse>
(async) markAsSeen(id) → {Promise.<JsonApiResponse>}
Mark some type of notifications as seen.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string
|
ID of the notification to mark as seen. |
Returns:
- Type:
-
Promise.<JsonApiResponse>
(async) markAsSeenBulk(ids) → {Promise.<JsonApiResponse>}
Mark an array of notifications as seen.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
ids |
Array.<string>
|
IDs of the notifications to mark as seen. |
Returns:
- Type:
-
Promise.<JsonApiResponse>