import type { IncomingMessage, ServerResponse } from "node:http"; import { type UpdateSink, type WebhookOptions } from "./webhook.js"; /** * build a fetch `Request` from a node request. the body streams through (no * buffering here) so the webhook's size cap applies as bytes arrive. */ export declare function toFetchRequest(req: IncomingMessage): Request; /** write a fetch `Response` back to a node response. */ export declare function sendFetchResponse(response: Response, res: ServerResponse): Promise; /** * a node `http` webhook handler — `http.createServer(nodeWebhookCallback(bot))`. * a thin bridge over {@link webhookCallback}, so every option (secret, path, * body cap, timeout/error policies, webhook reply) behaves identically to the * fetch handler. */ export declare function nodeWebhookCallback(bot: UpdateSink, options?: WebhookOptions): (req: IncomingMessage, res: ServerResponse) => void; //# sourceMappingURL=node.d.ts.map