Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Robin

Hierarchy

  • Robin

Index

Constructors

constructor

  • new Robin(apiKey: string, tls?: boolean, retries?: number): Robin
  • Parameters

    • apiKey: string
    • Optional tls: boolean
    • Optional retries: number

    Returns Robin

Properties

apiKey

apiKey: string

baseUrl

baseUrl: string

isConnected

isConnected: boolean

retries

retries: number

Optional tls

tls?: boolean

wsUrl

wsUrl: string

Methods

addGroupParticipants

  • addGroupParticipants(id: string, participants: UserToken[]): Promise<any>

archiveConversation

  • archiveConversation(id: string, userToken: string): Promise<any>
  • Parameters

    • id: string
    • userToken: string

    Returns Promise<any>

assignGroupModerator

  • assignGroupModerator(id: string, userToken: string): Promise<any>
  • Parameters

    • id: string
    • userToken: string

    Returns Promise<any>

connect

  • connect(user_token: string, max_retries?: number): WebSocket
  • Parameters

    • user_token: string
    • Optional max_retries: number

    Returns WebSocket

createConversation

createGroupConversation

  • createGroupConversation(name: string, moderator: UserToken, participants: UserToken[]): Promise<any>

createSupportStaff

  • createSupportStaff(data: UserToken): Promise<any>

createSupportTicket

  • createSupportTicket(msg: object, conn: WebSocket, channel: string, support_name: string, sender_token: string, sender_name: string): void
  • Parameters

    • msg: object
    • conn: WebSocket
    • channel: string
    • support_name: string
    • sender_token: string
    • sender_name: string

    Returns void

createUserToken

  • createUserToken(data: UserToken): Promise<any>

deleteMessages

  • deleteMessages(ids: string[], requesterToken: string): Promise<any>
  • Parameters

    • ids: string[]
    • requesterToken: string

    Returns Promise<any>

forwardMessages

  • forwardMessages(user_token: string, message_ids: string[], conversation_ids: string[]): Promise<any>
  • Parameters

    • user_token: string
    • message_ids: string[]
    • conversation_ids: string[]

    Returns Promise<any>

getConversationMessages

  • getConversationMessages(id: string, userToken: string): Promise<any>
  • Parameters

    • id: string
    • userToken: string

    Returns Promise<any>

getSupportStaff

  • getSupportStaff(data: UserToken): Promise<any>

getUnassignedUsers

  • getUnassignedUsers(support_name: string): Promise<any>
  • Parameters

    • support_name: string

    Returns Promise<any>

getUserToken

removeGroupParticipant

  • removeGroupParticipant(id: string, userToken: string): Promise<any>
  • Parameters

    • id: string
    • userToken: string

    Returns Promise<any>

searchConversation

  • searchConversation(id: string, text: string): Promise<any>
  • Parameters

    • id: string
    • text: string

    Returns Promise<any>

sendMessageAttachment

  • sendMessageAttachment(user_token: string, conversation_id: string, file: File): Promise<any>
  • Parameters

    • user_token: string
    • conversation_id: string
    • file: File

    Returns Promise<any>

sendMessageToConversation

  • sendMessageToConversation(msg: object, conn: WebSocket, channel: string, conversation_id: string, senderToken?: string): void
  • Parameters

    • msg: object
    • conn: WebSocket
    • channel: string
    • conversation_id: string
    • Optional senderToken: string

    Returns void

subscribe

  • subscribe(channel: string, conn: WebSocket): void
  • Parameters

    • channel: string
    • conn: WebSocket

    Returns void

syncUserToken

unarchiveConversation

  • unarchiveConversation(id: string, userToken: string): Promise<any>
  • Parameters

    • id: string
    • userToken: string

    Returns Promise<any>

Generated using TypeDoc