import type { Participant, Room, ChatMessage } from '@cc-livekit/livekit-client'; import { BehaviorSubject } from 'rxjs'; /** @public */ export type { ChatMessage }; /** @public */ export interface ReceivedChatMessage extends ChatMessage { from?: Participant; } export interface LegacyChatMessage extends ChatMessage { ignore?: boolean; } export interface LegacyReceivedChatMessage extends ReceivedChatMessage { ignore?: boolean; } /** * @public * @deprecated the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead */ export type MessageEncoder = (message: LegacyChatMessage) => Uint8Array; /** * @public * @deprecated the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead */ export type MessageDecoder = (message: Uint8Array) => LegacyReceivedChatMessage; /** @public */ export type ChatOptions = { /** @deprecated the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead */ messageEncoder?: (message: LegacyChatMessage) => Uint8Array; /** @deprecated the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead */ messageDecoder?: (message: Uint8Array) => LegacyReceivedChatMessage; /** @deprecated the new chat API doesn't rely on topics anymore and uses a dedicated chat API instead */ channelTopic?: string; /** @deprecated the new chat API doesn't rely on topics anymore and uses a dedicated chat API instead */ updateChannelTopic?: string; }; export declare function setupChat(room: Room, options?: ChatOptions): { messageObservable: import("rxjs").Observable; isSendingObservable: BehaviorSubject; send: (message: string) => Promise; update: (message: string, originalMessageOrId: string | ChatMessage) => Promise<{ readonly message: string; readonly editTimestamp: number; readonly id: string; readonly timestamp: number; readonly attachedFiles?: Array; }>; }; //# sourceMappingURL=chat.d.ts.map