NotificationApiClient
Contains all the endpoints needed to manage notifications.
Constructors
new NotificationApiClient()
new NotificationApiClient():
NotificationApiClient
Returns
Methods
createCustomNotification()
static
createCustomNotification(data
,config
?):Promise
<any
>
This endpoint generates a custom notification starting from the user. The recipients of the notification can be the user's friends/followers or the user himself (based on recipients_type value). Es. connections -> "user" added an item to the wishlist.
Parameters
Parameter | Type | Description |
---|---|---|
data | CustomNotificationParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
services/notification/index.ts:58
disposeBroadcastMessages()
static
disposeBroadcastMessages(banner_ids
,config
?):Promise
<any
>
This endpoint disposes a broadcast message for a user.
Parameters
Parameter | Type | Description |
---|---|---|
banner_ids | number [] | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
services/notification/index.ts:109
getUnseenNotification()
static
getUnseenNotification(config
?):Promise
<SCNotificationUnseenCountType
>
This endpoint retrieves the number of unseen/unread notifications.
Parameters
Parameter | Type | Description |
---|---|---|
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCNotificationUnseenCountType
>
Source
services/notification/index.ts:49
listBroadcastMessages()
static
listBroadcastMessages(config
?):Promise
<SCPaginatedResponse
<SCBroadcastMessageType
>>
This endpoint lists all broadcast messages. Broadcast Message is a feature which allows a specific user to send messages and announcements to a larger group of users at once.
Parameters
Parameter | Type | Description |
---|---|---|
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCBroadcastMessageType
>>
Source
services/notification/index.ts:66
listBroadcastMessagesUndisposedCount()
static
listBroadcastMessagesUndisposedCount(config
?):Promise
<SCNotificationUnseenCountType
>
This endpoint retrieves the total number of broadcast messages not yet disposed by the user.
Parameters
Parameter | Type | Description |
---|---|---|
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCNotificationUnseenCountType
>
Source
services/notification/index.ts:82
listBroadcastMessagesUnseenCount()
static
listBroadcastMessagesUnseenCount(config
?):Promise
<SCNotificationUnseenCountType
>
This endpoint retrieves the total number of broadcast messages not yet seen by the user.
Parameters
Parameter | Type | Description |
---|---|---|
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCNotificationUnseenCountType
>
Source
services/notification/index.ts:74
listUserNotification()
static
listUserNotification(config
?):Promise
<SCPaginatedResponse
<SCNotificationAggregatedType
>>
List all user notifications (in aggregate form) related to the community.
Parameters
Parameter | Type | Description |
---|---|---|
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCNotificationAggregatedType
>>
Source
services/notification/index.ts:27
markReadBroadcastMessages()
static
markReadBroadcastMessages(banner_ids
,config
?):Promise
<any
>
This endpoint marks as viewed/read a broadcast message for a user.
Parameters
Parameter | Type | Description |
---|---|---|
banner_ids | number [] | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
services/notification/index.ts:95
markReadNotification()
static
markReadNotification(sids
,config
?):Promise
<any
>
This endpoint marks as read a list of notifications identified by serialization_ids (sids).
Parameters
Parameter | Type | Description |
---|---|---|
sids | string [] | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>