PERS SDK - v2.3.26 / Exports / NotificationApi
Notification API - Low-level API client for the notification inbox
Backend routes (src/notification/infrastructure/notifications.controller.ts):
GET /notifications/channel-id- Besu channelId for real-time WS bindingGET /notifications- paginated inboxGET /notifications/unread-count- unread badge countPATCH /notifications/:id/read- mark as readDELETE /notifications/:id- deletePOST /notifications/send- direct push (BUSINESS → USER, TENANT → USER|BUSINESS)
Use NotificationService or NotificationManager for higher-level operations
• new NotificationApi(apiClient): NotificationApi
| Name | Type |
|---|---|
apiClient | PersApiClient |
notification/api/notification-api.ts:26
▸ getChannelId(): Promise<null | string>
Get the Besu channelId for the authenticated account (auto-provisioned on first call). GET /notifications/channel-id
Promise<null | string>
notification/api/notification-api.ts:32
▸ list(options?): Promise<PaginatedResponseDTO<NotificationDTO>>
List the authenticated account's notification inbox (paginated). GET /notifications
| Name | Type |
|---|---|
options? | NotificationQueryOptions |
Promise<PaginatedResponseDTO<NotificationDTO>>
notification/api/notification-api.ts:41
▸ getUnreadCount(): Promise<NotificationUnreadCountDTO>
Get unread notification count. GET /notifications/unread-count
Promise<NotificationUnreadCountDTO>
notification/api/notification-api.ts:58
▸ markAsRead(id): Promise<NotificationDTO>
Mark a notification as read. PATCH /notifications/:id/read
| Name | Type |
|---|---|
id | string |
Promise<NotificationDTO>
notification/api/notification-api.ts:66
▸ delete(id): Promise<void>
Delete a notification. DELETE /notifications/:id
| Name | Type |
|---|---|
id | string |
Promise<void>
notification/api/notification-api.ts:74
▸ send(dto): Promise<NotificationDTO>
Send a direct notification (BUSINESS → USER, or TENANT → USER|BUSINESS). POST /notifications/send
| Name | Type |
|---|---|
dto | SendNotificationDTO |
Promise<NotificationDTO>