import type { TelegramUpdate, TelegramMessage, PreCheckoutQuery, SuccessfulPayment } from '../../types/telegram.js';
import type { KIETaskResponse } from '../../types/api.js';
export type MessageHandler = (botToken: string, message: TelegramMessage) => void | Promise<void>;
export type PreCheckoutQueryHandler = (botToken: string, query: PreCheckoutQuery) => void | Promise<void>;
export type SuccessfulPaymentHandler = (botToken: string, payment: SuccessfulPayment, message: TelegramMessage) => void | Promise<void>;
export type KIECompleteHandler = (response: KIETaskResponse) => void | Promise<void>;
export declare class WebhookHandler {
    private registeredTokens;
    private messageHandlers;
    private preCheckoutHandlers;
    private successfulPaymentHandlers;
    private kieCompleteHandlers;
    constructor(registeredTokens: Map<string, string> | Set<string> | string[]);
    validateToken(botToken: string): boolean;
    registerToken(botToken: string): void;
    unregisterToken(botToken: string): void;
    onMessage(botToken: string, handler: MessageHandler): void;
    onPreCheckoutQuery(botToken: string, handler: PreCheckoutQueryHandler): void;
    onSuccessfulPayment(botToken: string, handler: SuccessfulPaymentHandler): void;
    onKIEComplete(handler: KIECompleteHandler): void;
    handleTelegramWebhook(botToken: string, update: TelegramUpdate): Promise<{
        ok: boolean;
        error?: string;
    }>;
    handleKIEWebhook(payload: unknown): Promise<{
        ok: boolean;
        error?: string;
    }>;
    private handleMessage;
    private handlePreCheckoutQuery;
    private handleSuccessfulPayment;
}
//# sourceMappingURL=webhook-handler.d.ts.map