You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -88,24 +91,28 @@ Siren constructor accepts the following arguments
88
91
</tbody>
89
92
</table>
90
93
91
-
92
94
## Siren Methods
93
95
94
96
### 1. verifyToken
97
+
95
98
This method verifies the validity of the given tokens (recipientId and userToken).This method is called automatically while creating the instance . Once the verification is successful, the remaining exposed methods can be accessed.
99
+
96
100
```bash
97
101
await sirenInstance.verifyToken();
98
102
```
99
103
100
104
### 2. fetchUnviewedNotificationsCount
105
+
101
106
This method retrieves the count of unviewed notifications.
This method initiates the real-time fetching of notifications
193
+
194
+
### 4. startRealTimeFetch
195
+
196
+
By specifying the parameter eventType as either `NOTIFICATIONS` or `UNVIEWED_COUNT`, this method triggers the real-time retrieval of notifications or the count of unviewed notifications. If `NOTIFICATIONS` is selected, further parameters (`params`) can be provided for additional customization or filtering
The notifications received can be subscribed using the `onNotificationReceived` actionCallback.
191
203
204
+
Below are the accepted filters for notifications
192
205
<table>
193
206
<thead>
194
207
<tr>
195
208
<th>Argument</th>
196
209
<th>Description</th>
197
210
<th>Type</th>
198
-
<th>Optional</th>
211
+
<th>Mandatory</th>
199
212
<th>Default</th>
200
213
</tr>
201
214
</thead>
@@ -238,55 +251,56 @@ The notifications received can be subscribed using the `onNotificationReceived`
238
251
</tbody>
239
252
</table>
240
253
241
-
### 5. startRealTimeUnviewedCountFetch
242
-
This method initiates the real-time fetching of unviewed notification count.The count can be subscribed using the onUnViewedCountReceived actionCallback. It returns the count after the last markNotificationsAsViewed functioncall.
By specifying the parameter eventType as either `NOTIFICATIONS` or `UNVIEWED_COUNT`, this method stops the real-time retrieval of notifications or the count of unviewed notifications.
252
257
253
-
### 7. stopRealTimeUnviewedCountFetch
254
-
This method stops the fetching of realtime unviewed count
0 commit comments