Unblu Agent Embedded JS API
    Preparing search index...

    Class UnbluConversationConnectionsApi

    Provides access to the conversations the agent is currently connected to, and lets you connect to or disconnect from conversations programmatically (both as a regular participant and as a ghost).

    The application should make sure not to keep conversations connected unnecessarily as this keeps the conversation sessions alive on the Collaboration Server.

    Index

    Constructors

    • Parameters

      • conversationsModule: ConversationsModule
      • conversationModule: AgentConversationModule
      • apiStateProvider: ApiStateProvider

      Returns UnbluConversationConnectionsApi

    Methods

    • Connects the conversation for the given conversation ID

      Parameters

      • conversationId: string

      Returns Promise<Conversation>

      The connected conversation

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

      UnbluApiError if the conversation doesn't exist or cannot be accessed

    • Connects the conversation for the given conversation ID whereas the agent is connected as a ghost

      Parameters

      • conversationId: string

      Returns Promise<Conversation>

      The connected conversation

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

      UnbluApiError if the conversation doesn't exist or cannot be accessed

    • Returns the conversations where the local person is currently connected to normally.

      Returns Promise<Conversation[]>

      The conversations

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

    • Returns the conversations where the local person is currently connected to as ghost.

      Returns Promise<Conversation[]>

      The conversations

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

    • Removes a previously registered listener

      Parameters

      • event: ConversationsEventType

        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.

    Events

    CONNECTED_CONVERSATIONS_CHANGED: "connectedConversationsChanged" = ...

    Event emitted whenever the list of connected conversations changes

    connectedConversationsChanged

    CONVERSATION_CONNECTED: "conversationConnected" = ...

    Event emitted whenever a conversation is connected

    conversationConnected

    CONVERSATION_DISCONNECTED: "conversationDisconnected" = ...

    Event emitted whenever a conversation is disconnected

    conversationDisconnected

    GHOST_CONVERSATION_CONNECTED: "ghostConversationConnected" = ...

    Event emitted whenever a conversation is connected as a ghost

    ghostConversationConnected

    GHOST_CONVERSATION_DISCONNECTED: "ghostConversationDisconnected" = ...

    Event emitted whenever a conversation that the agent was connected to as a ghost is disconnected

    ghostConversationDisconnected

    GHOST_CONVERSATIONS_CHANGED: "ghostConversationsChanged" = ...

    Event emitted whenever the list of conversations that the agent is connected as a ghost changes

    ghostConversationsChanged