Options
All
  • Public
  • Public/Protected
  • All
Menu

unblu-visitor-js-api

Index

Type aliases

AgentAvailabilityChangeListener

AgentAvailabilityChangeListener: function

Listener called whenever the agent availability changes.

param

The new availability.

Type declaration

CallStateListener

CallStateListener: function

Type declaration

ConnectionStateListener

ConnectionStateListener: function

Type declaration

ConversationChangeListener

ConversationChangeListener: function

Listener called whenever the active conversation changes.

Note: If no conversation is currently active the passed conversation object will be null

param

API object for the active conversation or null if no conversation is active.

Type declaration

ConversationStateListener

ConversationStateListener: function

Type declaration

ConversationsChangeListener

ConversationsChangeListener: function

Listener called whenever a conversation changed, added or removed from all conversations.

param

All conversations of the current visitor.

Type declaration

ErrorListener

ErrorListener: function

Type declaration

    • (e: Error): void
    • Parameters

      • e: Error

      Returns void

InvitationsListener

InvitationsListener: function

Type declaration

NewConversationInterceptor

NewConversationInterceptor: function

Interceptor function which is called every time a new conversation is started from the UI or JS API.

The starting of the conversation will be deferred until the Promis returned by this interceptor resolves: If the interceptor rejects the Promise, the starting of the conversation will be canceled. If the interceptor resolves the Promise with a String, its value will be used and set as "visitorData" for the created conversation. If the interceptor resolves the Promise without any value or something else then a String the conversation will be started without any visitorData. If visitorData was passed to the startConversation it will be passed to this callback as second argument.

param

The type of the conversation being started.

param

Optional visitorData, only present if passed to the startConversation method

returns

A Promise deferring the start of the conversation until it resolves.

Type declaration

    • Parameters

      Returns Promise<String>

NotificationCountChangeListener

NotificationCountChangeListener: function

Listener called whenever the notification count of a person (i.e. unread messages) changes.

param

The number of unseen notifications.

Type declaration

    • (count: number): void
    • Parameters

      • count: number

      Returns void

PersonChangeListener

PersonChangeListener: function

Listener called whenever the local person changes.

param

Info about the person.

Type declaration

ReadyListener

ReadyListener: function

Type declaration

UiStateChangeListener

UiStateChangeListener: function

Listener called whenever the UI state changes.

param

The new UI state.

Type declaration

Variables

Const unblu

unblu: Unblu = (UnbluUtil.getUnbluObject() || UnbluUtil.createUnbluObject()) as Unblu