INotificationsQuery
Service to query notifications.
export interface INotificationsQuery
Methods
Method | Description |
|---|---|
Starts the notifications query. | |
Starts the notifications query. | |
Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0 | |
Sets number of notifications to return per page. Default size: 100 | |
Filter notifications by read status. | |
Filter notifications by workspace. |
Method details
INotificationsQuery.query()method
Starts the notifications query.
query(): Promise<INotificationsQueryResult>;
Returns
Promise<INotificationsQueryResult>
promise of first page of the results
INotificationsQuery.queryAll()method
Starts the notifications query.
queryAll(): Promise<INotification[]>;
Returns
Promise<INotification[]>
promise with a list of all notifications matching the specified options
INotificationsQuery.withPage()method
Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0
withPage(page: number): INotificationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
page | number | zero indexed, must be non-negative |
Returns
notifications query
INotificationsQuery.withSize()method
Sets number of notifications to return per page. Default size: 100
withSize(size: number): INotificationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
size | number | desired max number of notifications per page must be a positive number |
Returns
notifications query
INotificationsQuery.withStatus()method
Filter notifications by read status.
withStatus(status: "read" | "unread"): INotificationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
status | “read” | “unread” | “read” or “unread” |
Returns
notifications query
INotificationsQuery.withWorkspace()method
Filter notifications by workspace.
withWorkspace(workspaceId: string): INotificationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
workspaceId | string | id of the workspace |
Returns
notifications query