import type { IncomingMessage } from "node:http"; import { Abstraction } from "@webiny/di"; import type { InputHandler, IHttpResponse } from "~/index.js"; /** * Handler abstraction for Node HTTP server events (an `IncomingMessage`). Mirrors AWS's * `ApiGatewayInputHandler`: the terminal (`NodeHttpRouterHandler`) is registered as this abstraction, * and transport decorators (auth/tenant loaders) wrap it — so they see the raw IncomingMessage. */ export interface INodeHttpInputHandler extends InputHandler.Interface< IncomingMessage, IHttpResponse > {} export const NodeHttpInputHandler = new Abstraction("NodeHttpInputHandler"); export namespace NodeHttpInputHandler { export type Interface = INodeHttpInputHandler; }