import type { ChannelConnector, ChannelConnectorEvents, ChannelStatus, InboundMessage, OutboundMessage } from "../types.js";
interface TelegramUser {
    id: number;
    is_bot?: boolean;
    first_name?: string;
    username?: string;
}
interface TelegramMessage {
    message_id: number;
    date?: number;
    chat: {
        id: number | string;
        type?: string;
    };
    from?: TelegramUser;
    text?: string;
}
export interface TelegramConnectorDeps {
    token?: string;
    baseUrl?: string;
    pollTimeoutSeconds?: number;
    fetchImpl?: typeof fetch;
    log?: (msg: string, ...args: unknown[]) => void;
}
export declare function telegramMessageToInbound(message: TelegramMessage): InboundMessage | null;
export declare class TelegramConnector implements ChannelConnector {
    readonly id = "telegram";
    readonly label = "Telegram";
    private readonly deps;
    private readonly baseUrl;
    private _status;
    private events;
    private abort;
    private offset;
    constructor(deps?: TelegramConnectorDeps);
    status(): ChannelStatus;
    currentQr(): string | null;
    private log;
    private token;
    private setStatus;
    start(events: ChannelConnectorEvents): Promise<void>;
    stop(): Promise<void>;
    send(msg: OutboundMessage): Promise<void>;
    private pollLoop;
    private api;
}
export {};
//# sourceMappingURL=connector.d.ts.map