Namespaces
notification
Methods and types of the `notification` namespace (`client.notification` / `bot.notification`).
Interfaces
BaseNotificationParams
Extended by
GetNotificationsDataGetNewNotificationsDataGetNewNotificationCountDataGetUsersLastNotificationsSeenDataUpdateUsersLastSeenData
Properties
ChannelQuery
Properties
GetNewNotificationCountBulkData
Properties
| Property | Type |
|---|---|
channelQueries | ChannelQuery[] |
GetNewNotificationCountData
Extends
Properties
| Property | Type | Inherited from |
|---|---|---|
channels | string[] | BaseNotificationParams.channels |
types? | string[] | BaseNotificationParams.types |
GetNewNotificationsData
Extends
Properties
| Property | Type | Inherited from |
|---|---|---|
channels | string[] | BaseNotificationParams.channels |
cursor? | string | PaginationParams.cursor |
includeCounts? | boolean | PaginationParams.includeCounts |
includeCursorRecord? | boolean | PaginationParams.includeCursorRecord |
includeStartAtRecord? | boolean | PaginationParams.includeStartAtRecord |
limit? | number | PaginationParams.limit |
page? | number | PaginationParams.page |
paginate? | "cursor" | "index" | - |
paginateReverse? | boolean | PaginationParams.paginateReverse |
startAt? | string | PaginationParams.startAt |
types? | string[] | BaseNotificationParams.types |
updateLastSeen? | boolean | - |
GetNotificationsData
Extends
Properties
| Property | Type | Inherited from |
|---|---|---|
channels | string[] | BaseNotificationParams.channels |
createdAfter? | number | - |
createdBefore? | number | - |
cursor? | string | PaginationParams.cursor |
includeCounts? | boolean | PaginationParams.includeCounts |
includeCursorRecord? | boolean | PaginationParams.includeCursorRecord |
includeStartAtRecord? | boolean | PaginationParams.includeStartAtRecord |
limit? | number | PaginationParams.limit |
page? | number | PaginationParams.page |
paginate? | "cursor" | "index" | - |
paginateReverse? | boolean | PaginationParams.paginateReverse |
sort? | Record<string, -1 | 1> | SortParams.sort |
startAt? | string | PaginationParams.startAt |
types? | string[] | BaseNotificationParams.types |
GetUsersLastNotificationsSeenData
Extends
Properties
| Property | Type | Inherited from |
|---|---|---|
channels | string[] | BaseNotificationParams.channels |
types? | string[] | BaseNotificationParams.types |
PaginationParams
Extended by
Properties
| Property | Type |
|---|---|
cursor? | string |
includeCounts? | boolean |
includeCursorRecord? | boolean |
includeStartAtRecord? | boolean |
limit? | number |
page? | number |
paginateReverse? | boolean |
startAt? | string |
SortParams
Extended by
Properties
UpdateUsersLastSeenData
Extends
Properties
| Property | Type | Inherited from |
|---|---|---|
channels | string[] | BaseNotificationParams.channels |
types? | string[] | BaseNotificationParams.types |
Type Aliases
LastSeenResponse
type LastSeenResponse = {
channels: string[];
lastSeen: number;
types?: string[];
};Properties
NotificationCountBulkResponse
type NotificationCountBulkResponse = {
channels: string[];
count: number;
types?: string[];
}[];Type Declaration
| Name | Type |
|---|---|
channels | string[] |
count | number |
types? | string[] |
NotificationCountResponse
type NotificationCountResponse = {
count: number;
};Properties
PaginatedNotificationResponse
type PaginatedNotificationResponse = PaginatedResponse<Notification>;PaginatedResponse
type PaginatedResponse<T> = PaginatedResult | CursorPaginatedResult & {
results?: T[];
};Type Declaration
| Name | Type |
|---|---|
results? | T[] |
Type Parameters
| Type Parameter |
|---|
T |
Functions
default()
function default(client): {
getNewNotificationCount: Promise<NotificationCountResponse>;
getNewNotificationCountBulk: Promise<NotificationCountBulkResponse>;
getNewNotifications: Promise<PaginatedNotificationResponse>;
getNotifications: Promise<PaginatedNotificationResponse>;
getUsersLastNotificationsSeen: Promise<LastSeenResponse>;
updateUsersLastSeen: Promise<LastSeenResponse>;
};Defines notification-related methods for the NuramaClient.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | default | The NuramaClient instance. |
Returns
An object containing the notification-related methods.
| Name | Type | Description |
|---|---|---|
getNewNotificationCount() | (data) => Promise<NotificationCountResponse> | Gets the count of new (unread) notifications for the specified channels. |
getNewNotificationCountBulk() | (data) => Promise<NotificationCountBulkResponse> | Gets the count of new notifications for multiple channel/type queries in a single request. |
getNewNotifications() | (data) => Promise<PaginatedNotificationResponse> | Retrieves new notifications since the user's last viewed timestamp for the specified channels. Optionally updates the last viewed timestamp. |
getNotifications() | (data) => Promise<PaginatedNotificationResponse> | Retrieves notifications for specified channels, with optional filtering and pagination. |
getUsersLastNotificationsSeen() | (data) => Promise<LastSeenResponse> | Retrieves the last seen timestamp record for the specified channels and optional types. |
updateUsersLastSeen() | (data) => Promise<LastSeenResponse> | Updates (or creates) the last seen timestamp for the user for the specified channels and optional types. |