Unblu Agent Embedded JS API
    Preparing search index...

    Class UnbluNotificationApi

    This class provides functionality around agent notifications.

    Index

    Constructors

    • Parameters

      • notificationModule: NotificationModule
      • apiStateProvider: ApiStateProvider

      Returns UnbluNotificationApi

    Methods

    • Returns the number of unread messages.

      Returns Promise<number>

      The number of unread messages

      UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.

    • Removes a previously registered listener

      Parameters

      • event: NotificationEventType

        The event to unregister from.

      • listener: (data?: any) => void

        The listener to remove.

      Returns Promise<boolean>

      UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.

    • Registers an event listener for the given event.

      Parameters

      Returns void

      UnbluAgentEmbeddedApi.NOTIFICATION_COUNT_CHANGE

      UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.

    • Registers an event listener for the given event.

      Parameters

      Returns void

      UnbluAgentEmbeddedApi.NEW_NOTIFICATION

      UnbluApiError with type UnbluErrorType.ILLEGAL_STATE when the API instance is deinitialized.

    Events

    NEW_NOTIFICATION: "newNotification" = ...

    Event emitted every time there is a new notification

    newNotification

    NOTIFICATION_COUNT_CHANGE: "notificationCountChange" = ...

    Event emitted every time the notification count (unread messages) changes.

    notificationCountChange