import type { QRCodeResponse, QRCodeStatusResponse, Credentials, CDNMedia, GetUpdatesResponse, SendMessageResponse } from './ilink-types.js';
export declare class ILinkClient {
    private baseUrl;
    private botToken;
    private accountId;
    private userId;
    private channelId;
    constructor(baseUrl?: string);
    /**
     * Get channel ID
     */
    getChannelId(): string;
    /**
     * Set channel ID
     */
    setChannelId(channelId: string): void;
    /**
     * Get QR code for login
     */
    getQRCode(): Promise<QRCodeResponse>;
    /**
     * Poll QR code status
     */
    getQRCodeStatus(qrcode: string): Promise<QRCodeStatusResponse>;
    /**
     * Set credentials after successful login
     */
    setCredentials(credentials: Credentials): void;
    /**
     * Clear credentials (logout)
     */
    clearCredentials(): void;
    /**
     * Check if credentials are set
     */
    hasCredentials(): boolean;
    /**
     * Get credentials (for channel ID access)
     */
    getCredentials(): Credentials | null;
    /**
     * Get updates (long polling)
     */
    getUpdates(getUpdatesBuf?: string): Promise<GetUpdatesResponse>;
    /**
     * Send a text message
     */
    sendMessage(toUserId: string, text: string, contextToken: string): Promise<SendMessageResponse>;
    /**
     * Download media content via the signed CDN URL embedded in the message
     * payload. iLink delivers media as an AES-128-ECB encrypted blob behind
     * `media.full_url`; `media.aes_key` is base64 of a 32-char ASCII hex
     * string, which after hex-decode becomes the 16-byte AES-128 key. There is
     * no `/ilink/bot/downloadmedia` endpoint — the bot fetches the CDN
     * directly with no auth header.
     */
    downloadMedia(cdnMedia: CDNMedia): Promise<Buffer>;
    /**
     * Lightweight session-keepalive probe. Issues a getconfig call against
     * the bot's own user id; success → token still valid. Used by the
     * polling loop's heartbeat tick (does NOT touch the long-poll cursor,
     * unlike getUpdates).
     */
    pingConfig(): Promise<boolean>;
    /**
     * Get typing ticket for a user
     */
    getTypingTicket(userId: string, contextToken?: string): Promise<string | null>;
    /**
     * Send typing indicator
     */
    sendTyping(userId: string, typingTicket: string, status: 1 | 2): Promise<boolean>;
    private getAuthHeaders;
}
//# sourceMappingURL=ilink-client.d.ts.map