Options
All
  • Public
  • Public/Protected
  • All
Menu

web socket class for agent copilot

Hierarchy

Index

Constructors

Properties

IsSubscribeDummyResponse: boolean = true
agentAssistInput: AgentAssistInput = empytyAgentAssistInput
auth: CXoneAuth = CXoneAuth.instance
connectionId: string = ''
logger: Logger
onMessageNotification: Subject<AgentAssistBaseResponse> = ...
subscriptions: string[] = []
topic: string = ''
wssWorker: any

Methods

  • broadcastCopilotNotifications(message: any): void
  • used to broadcast the acp messages to other tabs.

    example
    • broadcastCopilotNotifications();

    Parameters

    • message: any

      message to broadcast

    Returns void

  • close(): void
  • connect(websocketServerUri: string): boolean
  • used to connect to the socket.

    example
    • connect('ws://localhost:8080');

    Parameters

    • websocketServerUri: string

      websocketServer uri

    Returns boolean

  • disconnectWebsocket(): void
  • initLogger(providerId: string): void
  • Use to initializing the web socket worker and will return the method inside the worker

    example
    this.initLogger('ccai');
    

    Parameters

    • providerId: string

      AAH provider

    Returns void

  • initWebSocketWorker(providerId: string): void
  • onClosed(): boolean
  • onError(): void
  • onMessage(message: any): void
  • onOpen(): void
  • onReconnect(_msg: any): void
  • onReconnectComplete(): void
  • onReconnectSuccess(): void
  • method to parse the response

    @example
    const AgentAssistMessageResponse = new AgentAssistMessageResponse();

    Parameters

    • response: any

    Returns AgentAssistBaseResponse

  • reconnectWebsocket(): void
  • sendMessage(msg: unknown, wsWorker: any): void
  • subscribeToSocket(topic: string): boolean
  • terminateWebSocketWorker(): void

Generated using TypeDoc