Constructors
constructor
- new Robin(apiKey: string, tls?: boolean, retries?: number): Robin
Parameters
apiKey: string
Optional tls: boolean
Optional retries: number
Properties
isConnected
isConnected: boolean
Optional tls
tls?: boolean
Methods
addGroupParticipants
- addGroupParticipants(id: string, participants: UserToken[]): Promise<any>
Parameters
Returns 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
Parameters
Returns Promise<any>
createGroupConversation
- createGroupConversation(name: string, moderator: UserToken, participants: UserToken[]): Promise<any>
Parameters
Returns Promise<any>
createSupportStaff
- createSupportStaff(data: UserToken): Promise<any>
Parameters
Returns 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>
Parameters
Returns 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>
Parameters
Returns Promise<any>
getUnassignedUsers
- getUnassignedUsers(support_name: string): Promise<any>
Parameters
Returns Promise<any>
getUserToken
Parameters
Returns Promise<any>
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
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
Parameters
Returns Promise<any>
unarchiveConversation
- unarchiveConversation(id: string, userToken: string): Promise<any>
Parameters
id: string
userToken: string
Returns Promise<any>