import EventEmitter$2, { EventEmitter as EventEmitter$1 } from 'eventemitter3';
import { AxiosRequestConfig } from 'axios';
import { TurnServerConfig, RemoteStreamType, RemoteStreamFallbackType, EncryptionMode, LiveStreamingTranscodingConfig, IChannelMediaRelayConfiguration, EventCustomReportParams } from 'agora-rtc-sdk-ng';

declare class Request {
    private axios;
    constructor(baseURL: string, appId: string);
    get(url: string, config?: AxiosRequestConfig): Record<string, any>;
    post(url: string, data: any, config?: AxiosRequestConfig): Record<string, any>;
}

declare interface OmniRTCStats {
    Duration: number;
    RecvBitrate: number;
    RecvBytes: number;
    SendBitrate: number;
    SendBytes: number;
    UserCount: number;
    RTT: number;
    OutgoingAvailableBandwidth: number;
}


declare enum AudienceLatencyLevelType {

    AUDIENCE_LEVEL_LOW_LATENCY = 1,

    AUDIENCE_LEVEL_ULTRA_LOW_LATENCY = 2,

    AUDIENCE_LEVEL_SYNC_LATENCY = 3
}


declare type ClientRole = "audience" | "host";


declare interface ClientRoleOptions {

    level: AudienceLatencyLevelType;
}


declare enum ConnectionDisconnectedReason {

    LEAVE = "LEAVE",

    NETWORK_ERROR = "NETWORK_ERROR",

    SERVER_ERROR = "SERVER_ERROR",

    UID_BANNED = "UID_BANNED",

    IP_BANNED = "IP_BANNED",

    CHANNEL_BANNED = "CHANNEL_BANNED",
    FALLBACK = "FALLBACK"
}

declare type ConnectionState = "DISCONNECTED" | "CONNECTING" | "RECONNECTING" | "CONNECTED" | "DISCONNECTING";


declare function event_connection_state_change(curState: ConnectionState, revState: ConnectionState, reason?: ConnectionDisconnectedReason): void;


declare function event_exception(event: {

    code: number;

    msg: string;

    uid: UID;
}): void;


declare function event_first_frame_decoded(): void;


declare function event_media_reconnect_end(uid: UID): void;


declare function event_media_reconnect_start(uid: UID): void;


declare function event_token_privilege_did_expire(): void;


declare function event_token_privilege_will_expire(): void;


declare function event_stream_message(uid: UID, payload: Uint8Array): void;


declare function event_track_ended(): void;


declare function event_user_info_updated(uid: UID, msg: "mute-audio" | "mute-video" | "enable-local-video" | "unmute-audio" | "unmute-video" | "disable-local-video"): void;


declare function event_user_joined(user: IOmniRTCRemoteUser): void;


declare function event_user_left(user: IOmniRTCRemoteUser, reason: string): void;


declare function event_user_published(user: IOmniRTCRemoteUser, mediaType: "audio" | "video" | "screen"): void;


declare function event_user_unpublished(user: IOmniRTCRemoteUser, mediaType: "audio" | "video" | "screen"): void;


declare function event_volume_indicator(result: {

    level: number;

    uid: UID;
}[]): void;


declare class EventEmitter {
    // private _events;

    getListeners(event: string): Function[];

    on(event: string, listener: Function): void;

    once(event: string, listener: Function): void;

    off(event: string, listener: Function): void;

    removeAllListeners(event?: string): void;
    // private _indexOfListener;
}


declare interface IOmniRTCClient extends EventEmitter {

    readonly connectionState: ConnectionState;

    readonly remoteUsers: IOmniRTCRemoteUser[];

    readonly localTracks: ILocalTrack[];

    readonly uid?: UID;

    readonly channelName?: string;
    on(event: "connection-state-change", listener: typeof event_connection_state_change): void;
    on(event: "user-joined", listener: typeof event_user_joined): void;
    on(event: "user-left", listener: typeof event_user_left): void;
    on(event: "user-published", listener: typeof event_user_published): void;
    on(event: "user-unpublished", listener: typeof event_user_unpublished): void;
    on(event: "user-info-updated", listener: typeof event_user_info_updated): void;
    on(event: "media-reconnect-start", listener: typeof event_media_reconnect_start): void;
    on(event: "media-reconnect-end", listener: typeof event_media_reconnect_end): void;
    // on(event: "stream-type-changed", listener: typeof event_stream_type_changed): void;
    // on(event: "stream-fallback", listener: typeof event_stream_fallback): void;
    // on(event: "channel-media-relay-state", listener: typeof event_channel_media_relay_state): void;
    // on(event: "channel-media-relay-event", listener: typeof event_channel_media_relay_event): void;
    on(event: "volume-indicator", listener: typeof event_volume_indicator): void;
    // on(event: "crypt-error", listener: typeof event_crypt_error): void;
    on(event: "token-privilege-will-expire", listener: typeof event_token_privilege_will_expire): void;
    on(event: "token-privilege-did-expire", listener: typeof event_token_privilege_did_expire): void;
    // on(event: "network-quality", listener: typeof event_network_quality): void;
    // on(event: "live-streaming-error", listener: typeof event_live_streaming_error): void;
    // on(event: "live-streaming-warning", listener: typeof event_live_streaming_warning): void;
    // on(event: "stream-inject-status", listener: typeof event_stream_inject_status): void;
    on(event: "stream-message", listener: typeof event_stream_message): void;
    on(event: "exception", listener: typeof event_exception): void;
    // on(event: "is-using-cloud-proxy", listener: typeof event_is_using_cloud_proxy): void;
    // on(event: "join-fallback-to-proxy", listener: typeof event_join_fallback_to_proxy): void;
    on(event: string, listener: Function): void;

    join(): Promise<UID>;

    leave(): Promise<void>;

    publish(tracks: ILocalTrack | ILocalTrack[]): Promise<void>;

    unpublish(tracks?: ILocalTrack | ILocalTrack[]): Promise<void>;

    subscribe(user: IOmniRTCRemoteUser, mediaType: "video"): Promise<IRemoteVideoTrack>;

    subscribe(user: IOmniRTCRemoteUser, mediaType: "audio"): Promise<IRemoteAudioTrack>;

    subscribe(user: IOmniRTCRemoteUser, mediaType: "screen"): Promise<IRemoteVideoTrack>;

    subscribe(user: IOmniRTCRemoteUser, mediaType: "video" | "audio" | "screen"): Promise<IRemoteTrack>;
    // massSubscribe(subscribeList: {
    //     user: IOmniRTCRemoteUser;
    //     mediaType: "audio" | "video";
    // }[]): Promise<{
    //     user: IOmniRTCRemoteUser;
    //     mediaType: "audio" | "video";
    //     track?: IRemoteTrack;
    //     error?: OmniRTCError;
    // }[]>;

    unsubscribe(user: IOmniRTCRemoteUser, mediaType?: "video" | "audio" | "screen"): Promise<void>;
    // massUnsubscribe(unsubscribeList: {
    //     user: IOmniRTCRemoteUser;
    //     mediaType?: "audio" | "video";
    // }[]): Promise<void>;

    // setLowStreamParameter(streamParameter: LowStreamParameter): void;

    // enableDualStream(): Promise<void>;

    // disableDualStream(): Promise<void>;

    setClientRole(role: ClientRole, options?: ClientRoleOptions): Promise<void>;

    // setProxyServer(proxyServer: string): void;

    // setTurnServer(turnServer: TurnServerConfig): void;

    // startProxyServer(mode?: number): void;

    // stopProxyServer(): void;

    // setRemoteVideoStreamType(uid: UID, streamType: RemoteStreamType): Promise<void>;

    // setRemoteDefaultVideoStreamType(streamType: RemoteStreamType): Promise<void>;

    // pickSVCLayer(uid: UID, layerOptions: {
    //     spatialLayer: 0 | 1 | 2 | 3;
    //     temporalLayer: 0 | 1 | 2 | 3;
    // }): Promise<void>;

    // setStreamFallbackOption(uid: UID, fallbackType: RemoteStreamFallbackType): Promise<void>;

    // setEncryptionConfig(encryptionMode: EncryptionMode, secret: string, salt?: Uint8Array): void;

    renewToken(token: string): Promise<void>;

    enableAudioVolumeIndicator(): void;

    getRTCStats(): OmniRTCStats;

    // setLiveTranscoding(config: LiveStreamingTranscodingConfig): Promise<void>;

    // startLiveStreaming(url: string, transcodingEnabled?: boolean): Promise<void>;

    // stopLiveStreaming(url: string): Promise<void>;

    // addInjectStreamUrl(url: string, config: InjectStreamConfig): Promise<void>;

    // removeInjectStreamUrl(): Promise<void>;

    // startChannelMediaRelay(config: IChannelMediaRelayConfiguration): Promise<void>;

    // updateChannelMediaRelay(config: IChannelMediaRelayConfiguration): Promise<void>;

    // stopChannelMediaRelay(): Promise<void>;

    // sendCustomReportMessage(reports: EventCustomReportParams[] | EventCustomReportParams): Promise<void>;

    getLocalAudioStats(): LocalAudioTrackStats;

    getRemoteAudioStats(): {
        [uid: string]: RemoteAudioTrackStats;
    };

    getRemoteNetworkQuality(): {
        [uid: string]: NetworkQuality;
    };

    getLocalVideoStats(): LocalVideoTrackStats;

    getRemoteVideoStats(): {
        [uid: string]: RemoteVideoTrackStats;
    };
}


declare interface IOmniRTCRemoteUser {

    uid: UID;

    audioTrack?: IRemoteAudioTrack;

    videoTrack?: IRemoteVideoTrack;

    screenTrack?: IRemoteVideoTrack;

    hasAudio: boolean;

    hasVideo: boolean;

    hasScreen: boolean;
}


declare interface ILocalTrack extends ITrack {
    on(event: "track-ended", listener: typeof event_track_ended): void;

    setEnabled(enabled: boolean): Promise<void>;

    // getStats(): LocalVideoTrackStats | LocalAudioTrackStats;

    getTrackLabel(): string;

    setMuted(muted: boolean): Promise<void>;

    close(): void;
    muted: boolean;
    enabled: boolean;
}


declare interface IRemoteAudioTrack extends IRemoteTrack {

    // getStats(): RemoteAudioTrackStats;
    /**
     * @ignore
     */
    consumer?: any;

    /**
     * @ignore
     */
    volume?: any;

    play(): void;

    setPlaybackDevice(deviceId: string): Promise<void>;

    // setAudioFrameCallback(audioFrameCallback: null | ((buffer: AudioBuffer) => void), frameSize?: number): void;

    setVolume(volume: number): void;

    getVolumeLevel(): number;
}


declare interface IRemoteTrack extends ITrack {
    on(event: "first-frame-decoded", listener: typeof event_first_frame_decoded): void;

    getUserId(): UID;

    // getStats(): RemoteAudioTrackStats | RemoteVideoTrackStats;
}


declare interface IRemoteVideoTrack extends IRemoteTrack {
    on(event: "first-frame-decoded", listener: typeof event_first_frame_decoded): void;
    // on(event: "video-element-visible-status", listener: typeof event_video_element_visible_status): void;

    // getStats(): RemoteVideoTrackStats;

    play(element: string | HTMLElement, config?: VideoPlayerConfig): void;

    getCurrentFrameData(): ImageData;

    // getVideoElementVisibleStatus(): CheckVideoVisibleResult | undefined;
}

declare interface ITrack extends EventEmitter {

    trackMediaType: "audio" | "video";

    track?: MediaStreamTrack;

    isPlaying: boolean;

    getTrackId(): string;

    getMediaStreamTrack(): MediaStreamTrack;

    play(element?: string | HTMLElement): void;

    stop(): void;
}


declare interface LocalAudioTrackStats {

    codecType?: "opus" | "aac" | "PCMU" | "PCMA" | "G722";

    sendVolumeLevel: number;

    sendBitrate: number;

    sendBytes: number;

    sendPackets: number;

    sendPacketsLost: number;

    currentPacketLossRate: number;
}


declare interface LocalVideoTrackStats {

    codecType?: "H264" | "VP8" | "VP9" | "AV1X" | "AV1";

    sendBytes: number;

    sendFrameRate?: number;

    captureFrameRate?: number;

    sendPackets: number;

    sendPacketsLost: number;

    sendResolutionHeight: number;

    sendResolutionWidth: number;

    captureResolutionHeight: number;

    captureResolutionWidth: number;

    encodeDelay?: number;

    sendBitrate: number;

    targetSendBitrate: number;

    totalDuration: number;

    totalFreezeTime: number;

    currentPacketLossRate: number;
}


declare interface LowStreamParameter {

    width: ConstrainULong;

    height: ConstrainULong;

    framerate?: ConstrainULong;

    bitrate?: number;
}


declare interface NetworkQuality {

    uplinkNetworkQuality: 0 | 1 | 2 | 3 | 4 | 5 | 6;

    downlinkNetworkQuality: 0 | 1 | 2 | 3 | 4 | 5 | 6;
}


declare interface RemoteAudioTrackStats {

    transportDelay: number;

    codecType?: "opus" | "aac" | "PCMU" | "PCMA" | "G722";

    end2EndDelay: number;

    receiveBitrate: number;

    receiveLevel: number;

    receiveBytes: number;

    receiveDelay: number;

    receivePackets: number;

    receivePacketsLost: number;

    packetLossRate: number;

    currentPacketLossRate: number;

    totalDuration: number;

    totalFreezeTime: number;

    freezeRate: number;
    publishDuration: number;
}


declare interface RemoteVideoTrackStats {

    transportDelay: number;

    codecType?: "H264" | "VP8" | "VP9" | "AV1X" | "AV1";

    end2EndDelay: number;

    receiveBitrate: number;

    receiveDelay: number;

    receiveBytes: number;

    decodeFrameRate?: number;

    receiveFrameRate?: number;

    renderFrameRate?: number;

    receivePackets: number;

    receivePacketsLost: number;

    packetLossRate: number;

    currentPacketLossRate: number;

    receiveResolutionHeight: number;

    receiveResolutionWidth: number;

    totalDuration: number;

    totalFreezeTime: number;

    freezeRate: number;
    publishDuration: number;
}


declare type UID = number | string;


declare interface VideoPlayerConfig {

    mirror?: boolean;

    fit?: "cover" | "contain" | "fill";
}

declare enum RTCEngineType {
    Agora = 1,
    Tencent = 2,
    XRTC = 3,
    Zego = 6,
    Core = 7,
    VolcEngine = 8
}
type RoomState = "init" | "joined" | "left" | "kicked";

declare class StatisticDynamicHelper extends EventEmitter$1 {
    private client;
    private running;
    private type;
    private localAudioStats;
    private localVideoStats;
    private remoteVideoStatsMap;
    private remoteAudioStatsMap;
    private lastRemoteAudioStatsMap;
    private lastRemoteVideoStatsMap;
    private rtt;
    queue: Function[];
    constructor();
    start(client: any, type: RTCEngineType): void;
    startPublish(audio: boolean, video: boolean): void;
    stopPublish(audio: boolean, video: boolean): void;
    getLocalVideoStats(): void;
    getLocalAudioStats(): void;
    getRemoteVideoStats(): void;
    getRemoteAudioStats(): void;
    getStatsLoop(): Promise<void>;
    startMainLoop(): Promise<void>;
    stop(): void;
}

interface PublicUserInfo {
    appId: string;
    psId: string;
    cip: string;
    lip: string;
    sip: string;
    tid: string;
}
interface PublicPrivateDataInfo {
    pri: number;
    pridata: any;
}
interface PrivateCommonInfo {
    ver: string;
    engine: string;
    code?: number;
    msg?: string;
    delay?: number;
    room?: string;
    roomStr: string;
    uid: string;
    sessionId?: string;
    plan?: string;
}
declare class StatisticLog extends EventEmitter$1 {
    private publicUserInfo;
    private running;
    private sendQueue;
    private condition;
    private commonInfo;
    private failedFrame;
    private signalUrl;
    static DisconnectReason: {
        NETWORK: string;
        SERVER: string;
        CLIENT: string;
    };
    static EngineMap: {
        1: string;
        7: string;
        8: string;
    };
    constructor();
    updatePublicUserInfo(userInfo: PublicUserInfo): void;
    updateCommonInfo(commonInfo: PrivateCommonInfo): void;
    listenEvent(): void;
    pushLogFrame(frame: LogFrame): void;
    run(): Promise<void>;
    updateCip(cip: string): void;
    setSignalUrl(url: string): void;
    stop(): void;
}
declare class LogFrame extends EventEmitter$1 {
    private publicDesciptionInfo;
    private publicStaticDeviceInfo;
    private publicDynamicDeviceInfo;
    private sendFailCount;
    private timestamp;
    privateData: PublicPrivateDataInfo;
    publicUserInfo: PublicUserInfo;
    callFailCount: number;
    failStartTime: number;
    constructor();
    addPublicFields(): void;
    addPrivate(pri: number, data: any): void;
    send(publicUserInfo: PublicUserInfo, commonInfo: PrivateCommonInfo): Promise<void>;
}

declare class Client implements IOmniRTCClient {
    get connectionState(): ConnectionState;
    get remoteUsers(): IOmniRTCRemoteUser[];
    get localTracks(): ILocalTrack[];
    get uid(): UID;
    get channelName(): string;
    protected _appId: string;
    protected _roomId: string;
    protected _userId: UID;
    protected _token: string;
    protected _type: RTCEngineType;
    protected _engineVersion: string;
    protected _plan: string;
    reconnectTimestamp: number;
    reconnectTimes: number;
    roomState: RoomState;
    _statisticLog: StatisticLog;
    protected _statisticHelper: StatisticDynamicHelper;
    protected _client: IOmniRTCClient;
    constructor(client: IOmniRTCClient, { appId, roomId, userId, token, type, plan, }: {
        appId: any;
        roomId: any;
        userId: any;
        token: any;
        type: any;
        plan: any;
    });
    on(event: "connection-state-change", listener: typeof event_connection_state_change): void;
    on(event: "user-joined", listener: typeof event_user_joined): void;
    on(event: "user-left", listener: typeof event_user_left): void;
    on(event: "user-published", listener: typeof event_user_published): void;
    on(event: "user-unpublished", listener: typeof event_user_unpublished): void;
    on(event: "user-info-updated", listener: typeof event_user_info_updated): void;
    on(event: "media-reconnect-start", listener: typeof event_media_reconnect_start): void;
    on(event: "media-reconnect-end", listener: typeof event_media_reconnect_end): void;
    on(event: "volume-indicator", listener: typeof event_volume_indicator): void;
    on(event: "token-privilege-will-expire", listener: typeof event_token_privilege_will_expire): void;
    on(event: "token-privilege-did-expire", listener: typeof event_token_privilege_did_expire): void;
    on(event: "stream-message", listener: typeof event_stream_message): void;
    on(event: "exception", listener: typeof event_exception): void;
    once(event: string, listener: Function): void;
    off(event: string, listener: Function): void;
    removeAllListeners(event?: string): void;
    join(): Promise<UID>;
    leave(): Promise<void>;
    publish(tracks: ILocalTrack | ILocalTrack[]): Promise<void>;
    unpublish(tracks?: ILocalTrack | ILocalTrack[]): Promise<void>;
    subscribe(user: IOmniRTCRemoteUser, mediaType: "video"): Promise<IRemoteVideoTrack>;
    subscribe(user: IOmniRTCRemoteUser, mediaType: "audio"): Promise<IRemoteAudioTrack>;
    subscribe(user: IOmniRTCRemoteUser, mediaType: "screen"): Promise<IRemoteVideoTrack>;
    unsubscribe(user: IOmniRTCRemoteUser, mediaType?: 'audio' | 'video' | 'screen'): Promise<void>;
    setLowStreamParameter(streamParameter: LowStreamParameter): void;
    enableDualStream(): Promise<void>;
    disableDualStream(): Promise<void>;
    setClientRole(role: ClientRole, options?: ClientRoleOptions): Promise<void>;
    setProxyServer(proxyServer: string): void;
    setTurnServer(turnServer: TurnServerConfig): void;
    startProxyServer(mode?: number): void;
    stopProxyServer(): void;
    setRemoteVideoStreamType(uid: UID, streamType: RemoteStreamType): Promise<void>;
    pickSVCLayer(uid: UID, layerOptions: {
        spatialLayer: 0 | 1 | 2 | 3;
        temporalLayer: 0 | 1 | 2 | 3;
    }): Promise<void>;
    setStreamFallbackOption(uid: UID, fallbackType: RemoteStreamFallbackType): Promise<void>;
    setEncryptionConfig(encryptionMode: EncryptionMode, secret: string, salt?: Uint8Array): void;
    renewToken(token: string): Promise<void>;
    enableAudioVolumeIndicator(): void;
    getRTCStats(): OmniRTCStats;
    setLiveTranscoding(config: LiveStreamingTranscodingConfig): Promise<void>;
    setRemoteDefaultVideoStreamType(streamType: RemoteStreamType): Promise<void>;
    startLiveStreaming(url: string, transcodingEnabled?: boolean): Promise<void>;
    stopLiveStreaming(url: string): Promise<void>;
    startChannelMediaRelay(config: IChannelMediaRelayConfiguration): Promise<void>;
    updateChannelMediaRelay(config: IChannelMediaRelayConfiguration): Promise<void>;
    stopChannelMediaRelay(): Promise<void>;
    sendCustomReportMessage(reports: EventCustomReportParams | EventCustomReportParams[]): Promise<void>;
    getLocalAudioStats(): LocalAudioTrackStats;
    getRemoteAudioStats(): {
        [uid: string]: RemoteAudioTrackStats;
    };
    getRemoteNetworkQuality(): {
        [uid: string]: NetworkQuality;
    };
    getLocalVideoStats(): LocalVideoTrackStats;
    getRemoteVideoStats(): {
        [uid: string]: RemoteVideoTrackStats;
    };
    getListeners(event: string): Function[];
}

type TaskType = 'asr' | 'voicechat' | 'visionchat' | 'avatarchat';
interface AsrConfig {
    vendor: number;
}
interface ChatConfig {
    /**
     * asr配置ID
     */
    asrConfig?: number;
    /**
     * llm配置ID
     */
    llmConfig?: number;
    /**
     * tts配置ID
     */
    ttsConfig?: number;
    /**
     * 聊天提示词
     */
    prompt?: string;
    /**
     * 欢迎语
     */
    welcome?: string;
    [key: string]: any;
}
interface AvatarConfig extends ChatConfig {
    /**
     * 数字人配置ID
     */
    avatarConfig?: number;
}
declare enum TaskTypeEnum {
    /**
     * 更新系统提示词
     */
    UPDATE_PROMPT = 1,
    /**
     * 打断AI回复
     */
    BREAK_AI_RESPONSE = 2,
    /**
     * 播报指定内容
     */
    BROADCAST_CONTENT = 3,
    /**
     * 指定内容调大模型
     */
    SEND_CONTENT_TO_LLM = 4,
    /**
     * 手动提交语音内容给大模型回复(仅手动提交模式任务下有效)
     */
    SUBMIT_VOICE_TO_LLM = 5,
    /**
     * 业务自定义信令推送到客户端,端上会收到onStreamMessage(uid, msg)回调
     */
    SEND_SIGNALING_TO_CLIENT = 6
}
interface SendPrompt {
    prompt: string;
}
interface BroadcastContent {
    content: string;
}
interface CustomSignaling {
    message: string;
}
declare enum Events {
    MESSAGE = "message"
}
interface EventMap {
    [Events.MESSAGE]: [data: object | string | Uint8Array];
}
declare class Aigc extends EventEmitter$2<EventMap> {
    static BASE_URL: string;
    static DICTIONARY: string;
    static UUID: string;
    request: Request;
    config: Record<string, any>;
    taskId?: string;
    taskType?: TaskType;
    client?: Client;
    private textDecoder;
    constructor(token: string);
    /**
     * 查询当前应用的AIGC配置
     * @returns
     */
    query(): Record<string, any>;
    /**
     *
     * @param taskType 使用的aigc类型
     * @param config 启动任务的参数
     * @param robotId 机器人id，纯数字字符串
     * @param options 附带信息
     * @returns
     */
    start(taskType: 'asr', config: AsrConfig, robotId: string, options?: Record<string, any>): any;
    start(taskType: 'voicechat' | 'visionchat', config: ChatConfig, robotId: string, options?: Record<string, any>): any;
    start(taskType: 'avatarchat', config: AvatarConfig, robotId: string, options?: Record<string, any>): any;
    /**
     * 停止当前aigc任务
     * @param options 附带信息
     * @returns
     */
    stop(options?: Record<string, any>): Record<string, any>;
    /**
     *
     * @param type 更新类型
     * @param config
     * @param options
     * @returns
     */
    update(type: TaskTypeEnum.UPDATE_PROMPT, config: SendPrompt, options?: Record<string, any>): any;
    update(type: TaskTypeEnum.BREAK_AI_RESPONSE, config: null, options?: Record<string, any>): any;
    update(type: TaskTypeEnum.BROADCAST_CONTENT, config: BroadcastContent, options?: Record<string, any>): any;
    update(type: TaskTypeEnum.SEND_CONTENT_TO_LLM, config: SendPrompt, options?: Record<string, any>): any;
    update(type: TaskTypeEnum.SUBMIT_VOICE_TO_LLM, config: null, options?: Record<string, any>): any;
    update(type: TaskTypeEnum.SEND_SIGNALING_TO_CLIENT, config: CustomSignaling, options?: Record<string, any>): any;
    /**
     * 绑定事件触发器
     */
    bind(client: Client): void;
    generateTaskId(len?: number): string;
}

export { Aigc, AsrConfig, AvatarConfig, BroadcastContent, ChatConfig, CustomSignaling, EventMap, Events, SendPrompt, TaskType, TaskTypeEnum };
