markNotificationRead()
markNotificationRead(
id:string,isRead:boolean):Promise<SimpleResponse>
Defined in: packages/core/src/index.ts:1429
Mark a notification as read or unread
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
id | string | undefined | The unique identifier of the notification |
isRead | boolean | true | Read status (default: true) |
Returns
Promise<SimpleResponse>
Confirmation of status update
Throws
401 - Not authenticated
Throws
404 - Notification not found
Example
import { markNotificationRead } from "@cpod/sdk";
// Mark as read
await markNotificationRead("notification-123");
// Mark as unread
await markNotificationRead("notification-123", false);