corporateacademy-notification

Methods

(static) countNotifications(userId, getOnlyUnread, getOnlyRead, token) → {Array.<NotificationQueue>}

Retrieve the count notifications associated to a given userId

Parameters:
Name Type Description
userId string

The id of user

getOnlyUnread boolean

if true retrieve unread notifications, otherwise all

getOnlyRead boolean

if true retrieve read notifications, otherwise all

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/count-notifications
Returns:

The list of notifications

Type
Array.<NotificationQueue>

(static) getNotificationList(userId, fromRecord, numRecords, getOnlyUnread, getOnlyRead, token) → {Array.<NotificationQueue>}

Retrieve a list of notifications associated to a given userId

Parameters:
Name Type Description
userId string

The id of user

fromRecord number

Required by the action: The number of the first record to load (exclusive - 0 to start from the first)

numRecords number

Required by the action: The number of records to load

getOnlyUnread boolean

if true retrieve unread notifications, otherwise all

getOnlyRead boolean

if true retrieve read notifications, otherwise all

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP GET /rest-api/corporateacademy-mediator/get-notification-list/:fromRecord/:numRecords
Returns:

The list of notifications

Type
Array.<NotificationQueue>

(static) markAllNotificationAsRead(token) → {Array.<any>}

Mark all unread notifications of a given userId as read

Parameters:
Name Type Description
token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/mark-all-notification-as-read
Returns:

The data to display

Type
Array.<any>

(static) markNotificationAsRead(notificationQueueId, token) → {Array.<any>}

Mark a specific notification as read

Parameters:
Name Type Description
notificationQueueId String

notification's id

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/mark-notification-as-read
Returns:

The data to display

Type
Array.<any>

(static) markNotificationAsReadByReference(notificationQueueId, token) → {Array.<any>}

Mark a specific notification as read

Parameters:
Name Type Description
notificationQueueId String

notification's id

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/mark-notification-as-read-by-reference
Returns:

The data to display

Type
Array.<any>