import type { NativeEventEmitter } from 'react-native'; import type { ChatPresenceEventListener } from './ChatEvents'; import { ChatPresence } from './common/ChatPresence'; import { Native } from './__internal__/Native'; export declare class ChatPresenceManager extends Native { private static TAG; private _presenceListeners; private _presenceSubscriptions; constructor(); setNativeListener(event: NativeEventEmitter): void; private invokePresenceListener; /** * Add presence listener. * * @param listener The listener to be added. */ addPresenceListener(listener: ChatPresenceEventListener): void; /** * Remove presence listener. * * @param listener The listener to be deleted. */ removePresenceListener(listener: ChatPresenceEventListener): void; /** * Clear all presence listener. */ removeAllPresenceListener(): void; /** * Publishes a custom presence state. * * @param description The extension information of the presence state. It can be set as nil. * * @throws A description of the exception. See {@link ChatError}. */ publishPresenceWithDescription(description?: string): Promise; /** * Subscribes to a user's presence states. If the subscription succeeds, the subscriber will receive the callback when the user's presence state changes. * * @param members The list of IDs of users whose presence states you want to subscribe to. * @param expiry The expiration time of the presence subscription. * @returns Which contains IDs of users whose presence states you have subscribed to. * * @throws A description of the exception. See {@link ChatError}. */ subscribe(members: Array, expiry: number): Promise>; /** * Unsubscribes from a user's presence states. * * @param members The array of IDs of users whose presence states you want to unsubscribe from. * * @throws A description of the exception. See {@link ChatError}. */ unSubscribe(members: Array): Promise; /** * Uses pagination to get a list of users whose presence states you have subscribed to. * * @param pageNum The current page number, starting from 1. * @param pageSize The number of subscribed users on each page. * @returns Which contains IDs of users whose presence states you have subscribed to. Returns null if you subscribe to no user's presence state. * * @throws A description of the exception. See {@link ChatError}. */ fetchSubscribedMembers(pageNum?: number, pageSize?: number): Promise>; /** * Gets the current presence state of users. * * @param members The array of IDs of users whose current presence state you want to check. * @returns Which contains the users whose presence state you have subscribed to. * * @throws A description of the exception. See {@link ChatError}. */ fetchPresenceStatus(members: Array): Promise>; }