import https from "node:https";
import type { TelegramBot } from "./telegram.js";
export interface WebHookOptions {
    host?: string;
    port?: number;
    /** Path to a PEM private key. Read synchronously at construction time. */
    key?: string;
    /** Path to a PEM certificate. Read synchronously at construction time. */
    cert?: string;
    /** Path to a PFX archive. Read synchronously at construction time. */
    pfx?: string;
    /** Raw `https.createServer` options that are merged with key/cert/pfx above. */
    https?: https.ServerOptions;
    /** Endpoint that always returns 200 OK — useful for healthchecks. */
    healthEndpoint?: string;
    /** Open the webhook automatically when the bot is constructed. */
    autoOpen?: boolean;
    /** When set, requests must include this token in `X-Telegram-Bot-Api-Secret-Token`. */
    secretToken?: string;
}
export declare class TelegramBotWebHook {
    private readonly bot;
    readonly host: string;
    readonly port: number;
    readonly healthEndpoint: string;
    private readonly _secretToken?;
    private readonly _server;
    private _open;
    constructor(bot: TelegramBot, options?: WebHookOptions);
    /** Begin listening for incoming Telegram webhook requests. */
    open(): Promise<void>;
    /** Stop accepting requests. Resolves once existing connections drain. */
    close(): Promise<void>;
    isOpen(): boolean;
    private _emitError;
    private readonly _handleRequest;
}
//# sourceMappingURL=webhook.d.ts.map