import { Codecs, ImageSource, ImageType, StreamTypes } from './common'; declare const eventNames: readonly ["onChannelStatus", "onTextMessage", "onStreamStart", "onStreamStop", "onImage", "onError"]; declare const eventCodes: readonly ["on_channel_status", "on_text_message", "on_stream_start", "on_stream_stop", "on_image", "on_error"]; declare type EventList = [EventChannelStatus, EventTextMessage, EventStreamStart, EventStreamStop, EventImage, EventError]; declare type EventCode = typeof eventCodes[number]; interface EventBase { command: EventCode; } interface EventChannelStatus extends EventBase { command: 'on_channel_status'; channel: string; status: 'online' | 'offline'; users_online: number; images_supported: boolean; texting_supported: boolean; locations_supported: boolean; error: string; error_type: string; } interface EventTextMessage extends EventBase { command: 'on_text_message'; channel: string; from: string; for: boolean | string; message_id: number; text: string; } interface EventStreamStart extends EventBase { command: 'on_stream_start'; type: StreamTypes; codec: Codecs; codec_header: string; packet_duration: number; stream_id: number; channel: string; from: string; for: string; } interface EventStreamStop extends EventBase { command: 'on_stream_stop'; stream_id: number; } interface EventImage extends EventBase { command: 'on_image'; channel: string; from: string; for: boolean | string; message_id: number; type: ImageType; source: ImageSource; width: number; height: number; } interface EventError extends EventBase { error: string; } declare function isEvent(arg: unknown): arg is EventBase; declare function isEventError(arg: EventBase): arg is EventError; declare function isEventStreamStart(arg: EventBase): arg is EventStreamStart; declare function isEventStreamStop(arg: EventBase): arg is EventStreamStop; export { eventCodes, eventNames, EventChannelStatus, EventStreamStart, EventTextMessage, EventImage, EventError, EventList, isEvent, isEventStreamStart, isEventStreamStop, isEventError, };