Giao diện
API · notification
Trang sinh tự động
Parse từ schema.graphql (SDL backend export) bằng parser graphql. Mô tả và quyền lấy nguyên văn từ description trong SDL.
3 query · 1 mutation.
Query
myNotifications
The caller's own notifications, newest first. notification.read (own).
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
unreadOnly | Boolean | ||
page | Int | ||
pageSize | Int |
Trả về NotificationPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [Notification!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
notificationEvent
One ledger entry by id; not_found when there is none. Requires notification_event.read.
query · quyền: notification_event.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về NotificationEvent!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | The ledger entry (the record id used by notificationEvent). |
state | NotificationState! | |
skipReason | NotificationSkipReason | |
kind | NotificationKind | |
recipient | NotificationRecipient | |
orderId | ID | |
orderCode | String | #298 business order code of orderId (temporary format, NEW-SL-12); null without an order. |
campaignId | ID | |
notificationId | ID | The recipient's own notification row (their inbox id), when one was created. |
sourceEventId | ID! | |
sourceEventType | String! | Domain event type that triggered it, for example order.locked. |
correlationId | String! | |
recordedAt | DateTime! | When the consumer recorded the event: the basis of the time window. |
createdAt | DateTime | |
readAt | DateTime |
notificationEvents
The in-app notification ledger, newest first. Filters: recipient app, kind, state and a half-open [from, to) window on recordedAt. kind and recipientApp match created notifications only (a skipped entry has neither). Requires notification_event.read (NTF-03, Admin).
query · quyền: notification_event.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
recipientApp | AppCode | ||
kind | NotificationKind | ||
state | NotificationState | ||
from | DateTime | ||
to | DateTime | ||
page | Int | ||
pageSize | Int |
Trả về NotificationEventPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [NotificationEvent!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! | Entries matching the filters, not only this page. |
Mutation
markNotificationRead
Mark one of the caller's notifications read. Idempotent: the first read time is kept. Another account's id is not_found. notification.mark_read.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | MarkNotificationReadInput! |
Trả về MarkNotificationReadResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
notification | Notification! |