How to use the notification API to mark some or all notifications as read
window.CordSDK.notification.markAsRead('my-awesome-notification-id');
A promise which resolves when the database write has completed.
window.CordSDK.notification.markAllAsRead(
{ filter: { metadata: { flavor: 'minty' } } },
);
A promise which resolves when the database writes have completed.
This is an object with the following fields:
This is an object with the following fields:
metadata
entry should be an object representing the metadata key/value to filter on. For example, to show only notifications with the metadata key of "category"
set to "sales"
, set the filter to { metadata: { category: "sales" } }
.