import { type ScreenConfig, type AudioPropertiesConfig, type IRTCEngine } from '@volcengine/rtc';
import { type CreateRoomData, type GetToken, type RoomMode } from '@coze/api';
import * as RealtimeUtils from './utils';
import EventNames from './event-names';
import { RealtimeEventHandler } from './event-handler';
import { RealtimeAPIError, RealtimeError } from './error';
export interface VideoConfig {
    videoOnDefault?: boolean /** optional, Whether to turn on video by default, defaults to true */;
    renderDom?: string /** optional, The DOM element to render the video stream to */;
    videoInputDeviceId?: string /** optional, The device ID of the video input device to use */;
    screenConfig?: ScreenConfig;
}
export interface RealtimeClientConfig {
    accessToken: GetToken /** required, Access Token */;
    botId: string /** required, Bot Id */;
    voiceId?: string /** optional, Voice Id */;
    conversationId?: string /** optional, Conversation Id */;
    userId?: string /** optional, User Id */;
    workflowId?: string /** optional, Workflow Id */;
    baseURL?: string /** optional, defaults to "https://api.coze.cn" */;
    debug?: boolean /** optional, defaults to false */;
    getRoomInfo?: () => Promise<CreateRoomData> /** optional, Customize get room info */;
    /** Whether Personal Access Tokens (PAT) are allowed in browser environments */
    allowPersonalAccessTokenInBrowser?: boolean;
    /** Whether to mute by default, defaults to false
     * If set to true, audio streams will not be automatically published and subscribed */
    audioMutedDefault?: boolean;
    connectorId: string /** required, Connector Id */;
    suppressStationaryNoise?: boolean /** optional, Suppress stationary noise, defaults to false */;
    suppressNonStationaryNoise?: boolean /** optional, Suppress non-stationary noise, defaults to false */;
    videoConfig?: VideoConfig /** optional, Video configuration */;
    isAutoSubscribeAudio?: boolean /** optional, Whether to automatically subscribe to bot reply audio streams, defaults to true */;
    prologueContent?: string /** optional, Prologue content */;
    roomMode?: RoomMode /** optional, Room mode */;
}
declare class RealtimeClient extends RealtimeEventHandler {
    _config: RealtimeClientConfig;
    private _client;
    isConnected: boolean;
    private _api;
    private _isTestEnv;
    _isSupportVideo: boolean;
    /**
     * Constructor for initializing a RealtimeClient instance.
     *
     * 构造函数，初始化RealtimeClient实例。
     *
     * @param config
     * @param config.accessToken - Required, Access Token. |
     *                            必填，Access Token。
     * @param config.botId - Required, Bot Id. |
     *                       必填，Bot Id。
     * @param config.voiceId - Optional, Voice Id. |
     *                         可选，音色Id。
     * @param config.conversationId - Optional, Conversation Id. |
     *                               可选，会话Id。
     * @param config.userId - Optional, User Id. |
     *                        可选，用户Id。
     * @param config.baseURL - Optional, defaults to "https://api.coze.cn". |
     *                        可选，默认值为 "https://api.coze.cn"。
     * @param config.debug - Optional, defaults to false.
     *                      可选，默认值为 false。
     * @param config.allowPersonalAccessTokenInBrowser
     * - Optional, whether to allow personal access tokens in browser environment. |
     *   可选，是否允许在浏览器环境中使用个人访问令牌。
     * @param config.audioMutedDefault - Optional, whether audio is muted by default, defaults to false. |
     *                                  可选，默认是否静音，默认值为 false。
     * @param config.connectorId - Required, Connector Id. |
     *                             必填，渠道 Id。
     * @param config.suppressStationaryNoise - Optional, suppress stationary noise, defaults to false. |
     *                                       可选，默认是否抑制静态噪声，默认值为 false。
     * @param config.suppressNonStationaryNoise - Optional, suppress non-stationary noise, defaults to false. |
     *                                         可选，默认是否抑制非静态噪声，默认值为 false。
     * @param config.isAutoSubscribeAudio - Optional, whether to automatically subscribe to bot reply audio streams, defaults to true. |
     * @param config.videoConfig - Optional, Video configuration. |
     *                            可选，视频配置。
     * @param config.videoConfig.videoOnDefault - Optional, Whether to turn on video by default, defaults to true. |
     *                                            可选，默认是否开启视频，默认值为 true。
     * @param config.videoConfig.renderDom - Optional, The DOM element to render the video stream to. |
     *                                       可选，渲染视频流的 DOM 元素。
     * @param config.videoConfig.videoInputDeviceId - Optional, The device ID of the video input device to use. |
     *                                               可选，视频输入设备的设备 ID。
     * @param config.videoConfig.screenConfig - Optional, Screen share configuration if videoInputDeviceId is 'screenShare' see https://www.volcengine.com/docs/6348/104481#screenconfig for more details. |
     *                                         可选，屏幕共享配置，如果 videoInputDeviceId 是 'screenShare'，请参考 https://www.volcengine.com/docs/6348/104481#screenconfig 了解更多详情。
     * @param config.prologueContent - Optional, Prologue content. | 可选，开场白内容。
     * @param config.roomMode - Optional, Room mode. | 可选，房间模式。
     */
    constructor(config: RealtimeClientConfig);
    /**
     * en: Establish a connection to the Coze API and join the room
     *
     * zh: 建立与 Coze API 的连接并加入房间
     */
    connect(): Promise<void>;
    /**
     * en: Interrupt the current conversation
     *
     * zh: 中断当前对话
     */
    interrupt(): Promise<void>;
    /**
     * en: Disconnect from the current session
     *
     * zh: 断开与当前会话的连接
     */
    disconnect(): Promise<void>;
    /**
     * en: Send a message to the bot
     *
     * zh: 发送消息给Bot
     */
    sendMessage(message: Record<string, unknown>): Promise<void>;
    /**
     * en: Enable or disable audio
     *
     * zh: 启用或禁用音频
     */
    setAudioEnable(isEnable: boolean): Promise<void>;
    setVideoEnable(isEnable: boolean): Promise<void>;
    /**
     * en: Enable audio properties reporting (debug mode only)
     *
     * zh: 启用音频属性报告（仅限调试模式）
     */
    enableAudioPropertiesReport(config?: AudioPropertiesConfig): boolean;
    /**
     * en: Start audio playback device test (debug mode only)
     *
     * zh: 开始音频播放设备测试（仅限调试模式）
     */
    startAudioPlaybackDeviceTest(): Promise<void>;
    /**
     * en: Stop audio playback device test (debug mode only)
     *
     * zh: 停止音频播放设备测试（仅限调试模式）
     */
    stopAudioPlaybackDeviceTest(): void;
    /**
     * en: Set the audio input device
     *
     * zh: 设置音频输入设备
     */
    setAudioInputDevice(deviceId: string): Promise<void>;
    /**
     * en: Set the audio output device
     *
     * zh: 设置音频输出设备
     */
    setAudioOutputDevice(deviceId: string): Promise<void>;
    /**
     * en: Set the video input device
     *
     * zh: 设置视频输入设备
     */
    setVideoInputDevice(deviceId: string | 'screenShare' | 'user' | 'environment'): Promise<void>;
    /**
     * en: Get the RTC engine instance, for detail visit https://www.volcengine.com/docs/6348/104481
     *
     * zh: 获取 RTC 引擎实例，详情请访问 https://www.volcengine.com/docs/6348/104481
     */
    getRtcEngine(): IRTCEngine | undefined;
}
export { RealtimeUtils, RealtimeClient, RealtimeAPIError, RealtimeError, EventNames, };
