export interface UserbotConfig {
    characterId: string;
    phoneNumber: string;
    session?: string;
    telegramApiId?: number;
    telegramApiHash?: string;
}
export interface IncomingPhotoInfo {
    imagePath: string;
    imageUrl?: string;
}
export type MessageHandler = (characterId: string, senderId: number, senderName: string, text: string, chatId: number, isPrivate: boolean, photo?: IncomingPhotoInfo) => Promise<string | null>;
export declare class UserbotClient {
    private client;
    private characterId;
    private phoneNumber;
    private messageHandler?;
    private connected;
    private session;
    private peerCache;
    constructor(cfg: UserbotConfig);
    onMessage(handler: MessageHandler): void;
    /**
     * Start the client. If no session exists, requires interactive login.
     * Returns the session string to persist for future logins.
     */
    start(codeCallback: () => Promise<string>, passwordCallback?: () => Promise<string>): Promise<string>;
    /**
     * Reconnect using saved session (no code needed)
     */
    reconnect(): Promise<void>;
    /**
     * Create a Telegram group via GramJS.
     * If supergroup is true, creates a megagroup (supergroup) via channels.CreateChannel.
     * Otherwise creates a normal group via messages.CreateChat.
     * Returns the chatId and an invite link.
     */
    createGroup(title: string, description?: string, supergroup?: boolean): Promise<{
        chatId: number;
        inviteLink?: string;
    }>;
    /**
     * Create a Telegram channel (broadcast) via GramJS.
     * Returns the chatId and an invite link.
     */
    createChannel(title: string, description?: string): Promise<{
        chatId: number;
        inviteLink?: string;
    }>;
    /**
     * Resolve a chatId to a proper InputPeer that GramJS can use.
     * Telegram channels/supergroups use -100 prefix internally.
     * GramJS needs the full marked ID to resolve them.
     */
    private resolvePeer;
    /**
     * Resolve an image URL/path to a Buffer.
     * Handles both local /static/ paths and remote URLs.
     */
    private resolveImageToBuffer;
    /**
     * Send paid media (Stars-locked photo) to a channel via GramJS.
     * Users must pay the specified amount of Stars to view the media.
     */
    sendPaidMedia(chatId: number | string, starAmount: number, imageUrl: string, caption?: string): Promise<void>;
    /**
     * Create a subscription invite link for a channel.
     * Users must pay the specified Stars amount monthly to access the channel.
     */
    createSubscriptionInvite(chatId: number | string, starAmount: number): Promise<string>;
    /**
     * Get available Telegram Star Gifts catalog.
     * Returns the list of gifts with their sticker info, price, and availability.
     */
    getStarGifts(): Promise<Array<{
        id: string;
        stars: number;
        limited: boolean;
        soldOut: boolean;
        availabilityRemains?: number;
        availabilityTotal?: number;
        convertStars: number;
        stickerId?: string;
    }>>;
    /**
     * Send a Star Gift to a Telegram user.
     * Uses the payment flow: getPaymentForm + sendStarsForm with inputInvoiceStarGift.
     */
    sendGift(userId: number | string, giftId: string, message?: string): Promise<void>;
    sendMessage(chatId: number | string, text: string, imageUrl?: string): Promise<void>;
    sendPhoto(chatId: number | string, filePath: string): Promise<void>;
    sendPhotoFromBuffer(chatId: number | string, buffer: Buffer, filename: string): Promise<void>;
    sendTyping(chatId: number | string): Promise<void>;
    /**
     * Update Telegram profile: first name, last name, about (bio).
     */
    updateProfile(opts: {
        firstName?: string;
        lastName?: string;
        about?: string;
    }): Promise<void>;
    /**
     * Update a channel/group title and about text.
     */
    updateChatInfo(chatId: number | string, opts: {
        title?: string;
        about?: string;
    }): Promise<void>;
    /**
     * Update a channel/group profile photo from a Buffer.
     */
    updateChatPhoto(chatId: number | string, imageBuffer: Buffer, filename?: string): Promise<void>;
    /**
     * Update Telegram profile photo from a Buffer.
     */
    updateProfilePhoto(imageBuffer: Buffer, filename?: string): Promise<void>;
    disconnect(): Promise<void>;
    isConnected(): boolean;
    getSessionString(): string;
    private handleNewMessage;
}
//# sourceMappingURL=client.d.ts.map