-
Notifications
You must be signed in to change notification settings - Fork 271
Home
Daniel Cardenas edited this page Jun 11, 2019
·
3 revisions
/**
* Listens to messages received
* @returns Observable stream of messages
*/
public onMessage(fn: (message: Message) => void) {}
/**
* Sends a text message to given chat
* @param to chat id: [email protected]
* @param content text message
*/
public async sendText(to: string, content: string) {}
/**
* Sends contact card to given chat id
* @param {string} to '[email protected]'
* @param {string|array} contact '[email protected]' | ['[email protected]', '[email protected]', ...]
*/
public async sendContact(to: string, contactId: string | string[]) {}
/**
* Retrieves all contacts
* @returns array of [Contact]
*/
public async getAllContacts() {}
/**
* Retrieves all chats
* @returns array of [Chat]
*/
public async getAllChats(withNewMessageOnly = false) {}
/**
* Retrieve all groups
* @returns array of groups
*/
public async getAllGroups(withNewMessagesOnly = false) {}
/**
* Retrieves group members as [Id] objects
* @param groupId group id
*/
public async getGroupMembersId(groupId: string) {}
/**
* Returns group members [Contact] objects
* @param groupId
*/
public async getGroupMembers(groupId: string) {}
/**
* Retrieves contact detail object of given contact id
* @param contactId
* @returns contact detial as promise
*/
public async getContact(contactId: string) {}