import type { IncomingMessage, ServerResponse } from "node:http"; import type { RouteCtx, RouteMatch, RouteIdsOf } from "../route-ctx.js"; /** 路由体 = 从 `server.ts` 的 `handle()` 里**整段剪切**过来的原文(唯一改动:统一去缩进两格)。裸 `return;` * 的语义原样 =「本域已应答」;走到函数尾才是「没匹配上」,置 `miss.fell` 交回装配器继续下一个域。 * 跨域的东西(deps / 助手 / 单域状态 / 每请求量)一律在首行解构出来,于是下面每一行都逐字不变。 */ export declare function handleAttachments(req: IncomingMessage, res: ServerResponse, match: RouteMatch, ctx: RouteCtx): Promise; export declare const ATTACHMENTS_ROUTES: readonly [{ readonly id: "attachment-upload"; readonly path: "/v1/attachments"; readonly methods: readonly ["POST"]; }, { readonly id: "attachment-fetch"; readonly pattern: RegExp; readonly label: "/v1/attachments/:id"; readonly methods: readonly ["GET"]; }, { readonly id: "attachment-delete"; readonly pattern: RegExp; readonly label: "/v1/attachments/:id"; readonly methods: readonly ["DELETE"]; }]; /** 本域可分派行的 `id` 闭集 —— handler 的 `switch` 按它判穷尽(漏一口 = 编译红)。 */ export type AttachmentsRouteId = RouteIdsOf; //# sourceMappingURL=attachments.d.ts.map