import type { NativeEventEmitter } from 'react-native'; import type { ChatContactEventListener } from './ChatEvents'; import { BaseManager } from './__internal__/Base'; /** * The contact manager class, which manages chat contacts such as adding, deleting, retrieving, and modifying contacts. */ export declare class ChatContactManager extends BaseManager { protected static TAG: string; constructor(); private _contactListeners; private _contactSubscriptions; setNativeListener(event: NativeEventEmitter): void; private invokeContactListener; /** * Add contact listener * * @param listener The listener to be added. */ addContactListener(listener: ChatContactEventListener): void; /** * Remove contact listener * * @param listener The listener to be deleted. */ removeContactListener(listener: ChatContactEventListener): void; /** * Clear contact listener */ removeAllContactListener(): void; /** * Adds a new contact. * * @param username The user to be added. * @param reason (optional) The invitation message. * * @throws A description of the exception. See {@link ChatError}. */ addContact(username: string, reason?: string): Promise; /** * Deletes a contact and all the related conversations. * * @param username The contact to be deleted. * @param keepConversation Whether to retain conversations of the deleted contact. * - `true`: Yes. * - `false`: (default) No. * * @throws A description of the exception. See {@link ChatError}. */ deleteContact(username: string, keepConversation?: boolean): Promise; /** * Gets all the contacts from the server. * * @returns The list of contacts. * * @throws A description of the exception. See {@link ChatError}. */ getAllContactsFromServer(): Promise>; /** * Gets the contact list from the local database. * * @returns The contact list. * * @throws A description of the exception. See {@link ChatError}. */ getAllContactsFromDB(): Promise>; /** * Adds a user to the block list. * You can send messages to the users on the block list, but cannot receive messages from them. * * @param username The user to be added to the block list. * * @throws A description of the exception. See {@link ChatError}. */ addUserToBlockList(username: string): Promise; /** * Removes the contact from the block list. * * @param username The contact to be removed from the block list. * * @throws A description of the exception. See {@link ChatError}. */ removeUserFromBlockList(username: string): Promise; /** * Gets the block list from the server. * * @returns The block list obtained from the server. * * @throws A description of the exception. See {@link ChatError}. */ getBlockListFromServer(): Promise>; /** * Gets the block list from the local database. * * @returns The block list obtained from the local database. * * @throws A description of the exception. See {@link ChatError}. */ getBlockListFromDB(): Promise>; /** * Accepts a friend invitation。 * * @param username The user who sends the friend invitation. * * @throws A description of the exception. See {@link ChatError}. */ acceptInvitation(username: string): Promise; /** * Declines a friend invitation. * * @param username The user who sends the friend invitation. * * @throws A description of the exception. See {@link ChatError}. */ declineInvitation(username: string): Promise; /** * Gets the unique IDs of the current user on the other devices. The ID is in the format of username + "/" + resource. * * @returns The list of unique IDs of users on the other devices if the method succeeds. * * @throws A description of the exception. See {@link ChatError}. */ getSelfIdsOnOtherPlatform(): Promise>; }