Hierarchy

  • ChatSdk

Constructors

Properties

#contactCustomFieldsQueue: CustomFieldsMap = ...
#customer: Customer
#customerId: undefined | CustomerIdentityIdOnExternalPlatform
#customerImage: undefined | string
#customerName: undefined | string
#incomingChatEventMiddleware: ChatEventMiddleware = ...
#isAuthorizationEnabled: undefined | boolean
#messageEmitter: IChatEventTarget
#ready: PromiseWithResolvers<void> = ...
#websocketClient: null | WebSocketClient = null
channelId: ChannelId = ''
isLivechat: undefined | boolean
onError?: ((error) => void)

Type declaration

    • (error): void
    • Parameters

      • error: Error

      Returns void

onRawEvent?: ((event) => void)

Type declaration

    • (event): void
    • Parameters

      Returns void

Methods

  • Returns Promise<void>

  • Returns Promise<string>

  • Setup Environment endpoints

    Parameters

    Returns void

  • Parameters

    • error: unknown

    Returns void

  • Returns Promise<void>

    Deprecated

    • do not use
  • Returns CustomFieldsObject

  • Initiate a WebSocket connection

    Parameters

    • Optional authorizationCode: string

      authorization code

    Returns Promise<boolean>

    Promise - true if the connection was created, false if the connection already exists

    Throws

    ChatSDKError

  • Get channel info Returns channel info like feature toggle status, translations, file upload restrictions, theme color settings etc.

    Returns Promise<ChannelInfo>

    ChannelInfo

    Throws

    ChatSDKError

  • Get list of available threads

    Returns Promise<null | ThreadView[]>

    list of threads

  • Returns Promise<void>

  • Reset the ChatSdk session and clear it from customer data

    • it disconnects the WS connection and creates a new one
    • generates new IDs if not provided

    Parameters

    Returns Promise<void>

  • Send the Offline Message

    Parameters

    Returns Promise<MessageSuccessEventData>

    success

    Throws

    SendMessageFailedError

    • This exception is thrown when a message fails to send. The error contains (error.data) a response from the backend with details.

Generated using TypeDoc