import { ControlAction, RoomVerifyMessage, WebcastBarrageMessage, WebcastCaptionMessage, WebcastChatMessage, WebcastControlMessage, WebcastEmoteChatMessage, WebcastEnvelopeMessage, WebcastGiftMessage, WebcastGoalUpdateMessage, WebcastHourlyRankMessage, WebcastImDeleteMessage, WebcastInRoomBannerMessage, WebcastLikeMessage, WebcastLinkLayerMessage, WebcastLinkMessage, WebcastLinkMicArmies, WebcastLinkMicBattle, WebcastLinkMicBattlePunishFinish, WebcastLinkmicBattleTaskMessage, WebcastLinkMicFanTicketMethod, WebcastLinkMicMethod, WebcastLiveIntroMessage, WebcastMemberMessage, WebcastMsgDetectMessage, WebcastOecLiveShoppingMessage, WebcastPollMessage, WebcastQuestionNewMessage, WebcastRankTextMessage, WebcastRankUpdateMessage, WebcastRoomMessage, WebcastRoomPinMessage, WebcastRoomUserSeqMessage, WebcastSocialMessage, WebcastUnauthorizedMemberMessage } from '../types/tiktok-schema'; import { DecodedWebcastPushFrame, RoomGiftInfo, RoomInfo, WebcastEventMessage } from '../types/client'; import TikTokWsClient from '../lib/ws/lib/ws-client'; export declare enum ControlEvent { CONNECTED = "connected", DISCONNECTED = "disconnected", ERROR = "error", RAW_DATA = "rawData", DECODED_DATA = "decodedData", WEBSOCKET_CONNECTED = "websocketConnected", WEBSOCKET_DATA = "websocketData", ENTER_ROOM = "enterRoom" } export declare enum WebcastEvent { CHAT = "chat", MEMBER = "member", GIFT = "gift", ROOM_USER = "roomUser", SOCIAL = "social", LIKE = "like", QUESTION_NEW = "questionNew", LINK_MIC_BATTLE = "linkMicBattle", LINK_MIC_ARMIES = "linkMicArmies", LIVE_INTRO = "liveIntro", EMOTE = "emote", ENVELOPE = "envelope", FOLLOW = "follow", SHARE = "share", STREAM_END = "streamEnd", CONTROL_MESSAGE = "controlMessage", BARRAGE = "barrage", HOURLY_RANK = "hourlyRank", GOAL_UPDATE = "goalUpdate", ROOM_MESSAGE = "roomMessage", CAPTION_MESSAGE = "captionMessage", IM_DELETE = "imDelete", IN_ROOM_BANNER = "inRoomBanner", RANK_UPDATE = "rankUpdate", POLL_MESSAGE = "pollMessage", RANK_TEXT = "rankText", LINK_MIC_BATTLE_PUNISH_FINISH = "linkMicBattlePunishFinish", LINK_MIC_BATTLE_TASK = "linkMicBattleTask", LINK_MIC_FAN_TICKET_METHOD = "linkMicFanTicketMethod", LINK_MIC_METHOD = "linkMicMethod", UNAUTHORIZED_MEMBER = "unauthorizedMember", OEC_LIVE_SHOPPING = "oecLiveShopping", MSG_DETECT = "msgDetect", LINK_MESSAGE = "linkMessage", ROOM_VERIFY = "roomVerify", LINK_LAYER = "linkLayer", ROOM_PIN = "roomPin", SUPER_FAN = "superFan" } export declare enum ConnectState { DISCONNECTED = "DISCONNECTED", CONNECTING = "CONNECTING", CONNECTED = "CONNECTED" } export type EventHandler = (event: T) => void | Promise; export type ClientEventMap = { [WebcastEvent.FOLLOW]: EventHandler; [WebcastEvent.SUPER_FAN]: EventHandler; [WebcastEvent.SHARE]: EventHandler; [WebcastEvent.STREAM_END]: (event: { action: ControlAction; }) => void | Promise; [WebcastEvent.SUPER_FAN]: EventHandler; [ControlEvent.CONNECTED]: EventHandler; [ControlEvent.DISCONNECTED]: EventHandler<{ code: number; reason?: string; }>; [ControlEvent.ERROR]: EventHandler; [ControlEvent.WEBSOCKET_DATA]: EventHandler; [ControlEvent.RAW_DATA]: (type: string, data: Uint8Array) => void | Promise; [ControlEvent.DECODED_DATA]: (type: string, event: any, binary: Uint8Array) => void | Promise; [ControlEvent.WEBSOCKET_CONNECTED]: EventHandler; [ControlEvent.ENTER_ROOM]: EventHandler; [WebcastEvent.CHAT]: EventHandler; [WebcastEvent.MEMBER]: EventHandler; [WebcastEvent.GIFT]: EventHandler; [WebcastEvent.ROOM_USER]: EventHandler; [WebcastEvent.SOCIAL]: EventHandler; [WebcastEvent.LIKE]: EventHandler; [WebcastEvent.QUESTION_NEW]: EventHandler; [WebcastEvent.LINK_MIC_BATTLE]: EventHandler; [WebcastEvent.LINK_MIC_ARMIES]: EventHandler; [WebcastEvent.LIVE_INTRO]: EventHandler; [WebcastEvent.EMOTE]: EventHandler; [WebcastEvent.ENVELOPE]: EventHandler; [WebcastEvent.CONTROL_MESSAGE]: EventHandler; [WebcastEvent.BARRAGE]: EventHandler; [WebcastEvent.HOURLY_RANK]: EventHandler; [WebcastEvent.GOAL_UPDATE]: EventHandler; [WebcastEvent.ROOM_MESSAGE]: EventHandler; [WebcastEvent.CAPTION_MESSAGE]: EventHandler; [WebcastEvent.IM_DELETE]: EventHandler; [WebcastEvent.IN_ROOM_BANNER]: EventHandler; [WebcastEvent.RANK_UPDATE]: EventHandler; [WebcastEvent.POLL_MESSAGE]: EventHandler; [WebcastEvent.RANK_TEXT]: EventHandler; [WebcastEvent.LINK_MIC_BATTLE_PUNISH_FINISH]: EventHandler; [WebcastEvent.LINK_MIC_BATTLE_TASK]: EventHandler; [WebcastEvent.LINK_MIC_FAN_TICKET_METHOD]: EventHandler; [WebcastEvent.LINK_MIC_METHOD]: EventHandler; [WebcastEvent.UNAUTHORIZED_MEMBER]: EventHandler; [WebcastEvent.OEC_LIVE_SHOPPING]: EventHandler; [WebcastEvent.MSG_DETECT]: EventHandler; [WebcastEvent.LINK_MESSAGE]: EventHandler; [WebcastEvent.ROOM_VERIFY]: EventHandler; [WebcastEvent.LINK_LAYER]: EventHandler; [WebcastEvent.ROOM_PIN]: EventHandler; }; export declare const WebcastEventMap: Record; export type BasicWebcastEventMessage = keyof Omit; export type TikTokLiveConnectionState = { isConnected: boolean; roomId: string; roomInfo: RoomInfo | null; availableGifts: RoomGiftInfo | null; }; //# sourceMappingURL=events.d.ts.map