/** * Shared route execution * * The single place a shipped route's input is assembled, validated and handed to its * handler. All three mounts call this, so a NestJS request and an Express request to * the same route validate identically and fail identically. * * @packageDocumentation */ import { NAuthConfig } from '../../interfaces/config.interface'; import { AnyNAuthRouteDefinition } from '../route-manifest.types'; import { NAuthRouteServices } from '../route-services'; /** The parts of an incoming request a shipped route can read. */ export interface RouteInvocation { body?: unknown; query?: Record; params?: Record; cookies?: Record; } /** * Assemble a route's input from the request, according to its declared source. * * Path parameters are merged *under* the body so an explicit body value wins, matching * how the hand-written controllers behaved. * * @param route - The route being invoked * @param request - The incoming request parts * @returns The raw input object to validate */ export declare function buildRouteInput(route: AnyNAuthRouteDefinition, request: RouteInvocation): Record; /** * Validate and run one shipped route. * * Validation happens here rather than in a framework pipe so that Express and Fastify — * which have no pipe — get the same guarantee as NestJS, and so every mount produces * the identical `VALIDATION_FAILED` error shape. * * @param route - The route to run * @param request - The incoming request parts * @param services - The resolved service container * @param config - The active configuration * @returns Whatever the route's handler resolves to */ export declare function runRoute(route: AnyNAuthRouteDefinition, request: RouteInvocation, services: NAuthRouteServices, config: NAuthConfig): Promise; //# sourceMappingURL=run-route.d.ts.map