import type { StrictQueryPipe, StrictQueryRule } from '../core/index.js'; import { type QueryOperation } from './generated/query-params.js'; /** * The operations whose unknown query parameters production refuses. * * Production has no global validation pipe: each controller picks one per `@Query(...)`, and only * a pipe built with `forbidNonWhitelisted: true` turns a parameter its DTO does not declare into * a 422. The spec does not say which operations those are, so this table does, by hand: one entry * per `forbidNonWhitelisted` query pipe in production's `packages/api/src`, for the operations the * emulator serves. `controller` is the production file the pipe was read from, relative to that * directory, and `dto` the class it validates against. * * The parameters an operation accepts are not listed here. They come from the spec, through the * generated `QUERY_PARAMETERS` catalog, and `QUERY_PARAMETER_OVERRIDES` below records the places * production's DTO and the spec disagree. * * An operation that is absent is one whose query production does not police (a bare `@Query()`, * a named `@Query('name')`, or a pipe without `forbidNonWhitelisted`), or one the emulator does * not serve. */ interface StrictQueryOperation { controller: string; dto: string; /** Defaults to `validation`, production's `ValidationPipe`. */ pipe?: StrictQueryPipe; } export declare const STRICT_QUERY_OPERATIONS: Partial>; /** * Where production's DTO and the spec disagree about an operation's query parameters, the DTO * wins, since the DTO is what the pipe checks against: `add` is a parameter the DTO declares and * the spec leaves out, `remove` one the spec lists and the DTO does not declare. */ export declare const QUERY_PARAMETER_OVERRIDES: Partial>; /** The table above as rules for `strictQueryMiddleware`, each with the parameters it accepts. */ export declare function strictQueryRules(): StrictQueryRule[]; export {};