import type { NativeEventEmitter } from 'react-native'; import { Native } from './__internal__/Native'; import type { ChatUserInfoEventListener } from './ChatEvents'; import { ChatUserInfo } from './common/ChatUserInfo'; /** * The user information manager for updating and getting user attributes. */ export declare class ChatUserInfoManager extends Native { private static TAG; private _userInfoListeners; private _userInfoSubscriptions; constructor(); setNativeListener(event: NativeEventEmitter): void; private invokeUserInfoListener; /** * Adds a user information listener. * * @param listener The listener to add. */ addUserInfoListener(listener: ChatUserInfoEventListener): void; /** * Removes the user information listener. * * @param listener The listener to remove. */ removeUserInfoListener(listener: ChatUserInfoEventListener): void; /** * Removes all user information listeners. */ removeAllUserInfoListener(): void; /** * Modifies the user attributes of the current user. * * @params The parameter set. * - [nickName] The nickname of the user. * - [avatarUrl] The avatar URL of the user. * - [mail] The email address of the user. * - [phone] The phone number of the user. * - [gender] The gender of the user. The value can only be `0`, `1`, or `2`. Other values are invalid. * - `0`: (Default) Unknown; * - `1`: Male; * - `2`: Female. * - [sign] The signature of the user. * - [birth] The birthday of the user. * - [ext] The custom extension information of the user. You can set it to an empty string or type custom information and encapsulate them as a JSON string. * * @throws A description of the exception. See {@link ChatError}. */ updateOwnUserInfo(params: { nickName?: string; avatarUrl?: string; mail?: string; phone?: string; gender?: number; sign?: string; birth?: string; ext?: string; }): Promise; /** * Gets the user attributes of the specified users. * * @param userIds The user ID array. * @returns A map that contains key-value pairs where the key is the user ID and the value is user attributes,see {@link ChatUserInfo}. * * @throws A description of the exception. See {@link ChatError}. */ fetchUserInfoById(userIds: Array): Promise>; /** * Gets the user attributes of the specified users from the local database. * * @param userIds The user ID array. * @returns A map that contains key-value pairs where the key is the user ID and the value is user attributes, see {@link ChatUserInfo}. * * @throws A description of the exception. See {@link ChatError}. */ getLocalUserInfoByIds(userIds: Array): Promise>; /** * Subscribes to the user attributes of the specified users. * * When the user attributes of a subscribed user are updated, the {@link ChatUserInfoEventListener.onUserInfoUpdate} callback is triggered. * * @param userIds The user ID array. * * @throws A description of the exception. See {@link ChatError}. */ subscribeUsersInfo(userIds: Array): Promise; /** * Unsubscribes from the user attributes of the specified users. * * @param userIds The user ID array. * * @throws A description of the exception. See {@link ChatError}. */ unsubscribeUsersInfo(userIds: Array): Promise; /** * Gets the list of users whose user attributes are subscribed by the current user. * * @returns The list of user attributes of the subscribed users. See {@link ChatUserInfo}. * * @throws A description of the exception. See {@link ChatError}. */ fetchSubscribedUsers(): Promise; /** * Gets attributes of the current user from the server. * * @returns The obtained user attributes. See {@link ChatUserInfo}. * * @throws A description of the exception. See {@link ChatError}. */ fetchOwnInfo(): Promise; } //# sourceMappingURL=ChatUserInfoManager.d.ts.map