export interface QRCodeResponse {
    qrcode: string;
    qrcode_img_content: string;
}
export type QRCodeStatus = 'wait' | 'scaned' | 'confirmed' | 'expired';
export interface QRCodeStatusResponse {
    status: QRCodeStatus;
    bot_token?: string;
    ilink_bot_id?: string;
    ilink_user_id?: string;
    baseurl?: string;
}
export interface Credentials {
    bot_token: string;
    baseUrl: string;
    accountId: string;
    userId: string;
    channelId?: string;
    savedAt: string;
}
export type MessageType = 1 | 2;
export type MessageState = 0 | 1 | 2;
export interface CDNMedia {
    encrypt_query_param?: string;
    aes_key?: string;
    encrypt_type?: number;
    full_url?: string;
}
export interface TextItem {
    text?: string;
}
export interface ImageItem {
    media?: CDNMedia;
    thumb_media?: CDNMedia;
    aeskey?: string;
    url?: string;
    mid_size?: number;
    thumb_size?: number;
    thumb_height?: number;
    thumb_width?: number;
    hd_size?: number;
}
export interface VoiceItem {
    media?: CDNMedia;
    encode_type?: number;
    bits_per_sample?: number;
    sample_rate?: number;
    playtime?: number;
    text?: string;
}
export interface FileItem {
    media?: CDNMedia;
    file_name?: string;
    md5?: string;
    len?: string;
}
export interface VideoItem {
    media?: CDNMedia;
    video_size?: number;
    play_length?: number;
    video_md5?: string;
    thumb_media?: CDNMedia;
    thumb_size?: number;
    thumb_height?: number;
    thumb_width?: number;
}
export interface RefMessage {
    title?: string;
    message_item?: MessageItem;
}
export interface MessageItem {
    type?: number;
    create_time_ms?: number;
    update_time_ms?: number;
    is_completed?: boolean;
    msg_id?: string;
    ref_msg?: RefMessage;
    text_item?: TextItem;
    image_item?: ImageItem;
    voice_item?: VoiceItem;
    file_item?: FileItem;
    video_item?: VideoItem;
}
export interface WeixinMessage {
    seq?: number;
    message_id?: number;
    from_user_id?: string;
    to_user_id?: string;
    client_id?: string;
    create_time_ms?: number;
    update_time_ms?: number;
    delete_time_ms?: number;
    session_id?: string;
    group_id?: string;
    message_type?: MessageType;
    message_state?: MessageState;
    item_list?: MessageItem[];
    context_token?: string;
}
export interface GetUpdatesRequest {
    get_updates_buf: string;
    base_info: {
        channel_version: string;
    };
    sync_buf?: string;
}
export interface GetUpdatesResponse {
    ret: number;
    msgs?: WeixinMessage[];
    get_updates_buf: string;
    longpolling_timeout_ms?: number;
    errcode?: number;
    errmsg?: string;
}
export interface SendMessageRequest {
    msg: {
        from_user_id: string;
        to_user_id: string;
        client_id: string;
        message_type: MessageType;
        message_state: MessageState;
        context_token: string;
        item_list: MessageItem[];
    };
    base_info: {
        channel_version: string;
    };
}
export interface SendMessageResponse {
    ret?: number;
    errcode?: number;
    errmsg?: string;
}
export interface GetConfigRequest {
    ilink_user_id: string;
    context_token?: string;
    base_info: {
        channel_version: string;
    };
}
export interface GetConfigResponse {
    ret: number;
    typing_ticket?: string;
}
export interface SendTypingRequest {
    ilink_user_id: string;
    typing_ticket: string;
    status: 1 | 2;
    base_info: {
        channel_version: string;
    };
}
export interface SendTypingResponse {
    ret?: number;
    errcode?: number;
    errmsg?: string;
}
export declare const ITEM_TYPE: {
    readonly TEXT: 1;
    readonly IMAGE: 2;
    readonly VOICE: 3;
    readonly FILE: 4;
    readonly VIDEO: 5;
};
export declare const ILINK_ERRORS: {
    readonly SESSION_EXPIRED: -14;
    readonly NETWORK_ERROR: -1;
    readonly INVALID_PARAMS: -2;
    readonly RATE_LIMITED: -3;
};
export interface PollState {
    getUpdatesBuf: string;
    isPolling: boolean;
    lastPollTime: number;
}
export interface ContextTokenCache {
    userId: string;
    contextToken: string;
    timestamp: number;
}
//# sourceMappingURL=ilink-types.d.ts.map