/**
 * HTTP-edge request-body validator for closed request shapes.
 *
 * Reads `openapi.yaml` once at module load, walks every request body whose
 * top-level schema (or referenced component) declares
 * `additionalProperties: false`, and builds a per-operation allow-list of
 * top-level field names. On each matching request, any extra top-level field
 * in the JSON body causes a 400 with the canonical error code
 * `ERR_UNKNOWN_FIELD` and the offending JSON path in `details`.
 *
 * Scope:
 *   - Only enforces at the top level of the JSON request body. Nested
 *     `additionalProperties: false` schemas are not traversed here; Zod +
 *     handler-level validation cover deeper shapes. Top-level is where the
 *     v0.5.0 `attributes`-nested regression would have been caught.
 *   - Only enforces on closed shapes. Shapes without
 *     `additionalProperties: false` (e.g. intentionally open `entities[]`
 *     payloads inside /store) are left alone.
 *
 * Home: `docs/subsystems/errors.md` § `ERR_UNKNOWN_FIELD` and
 * `docs/architecture/openapi_contract_flow.md` § Legacy-payload corpus.
 */
import type express from "express";
/**
 * Returns the list of unknown top-level keys the body contains relative to
 * `allowed`. Exported for test use.
 */
export declare function findUnknownFields(body: unknown, allowed: Set<string>): string[];
export declare function unknownFieldsGuard(req: express.Request, res: express.Response, next: express.NextFunction): void;
/** Test-only hook: drop the cached shape table so a new openapi.yaml is re-read. */
export declare function _resetUnknownFieldsGuardCache(): void;
//# sourceMappingURL=unknown_fields_guard.d.ts.map