import type { Request, Response } from 'express'; import type { MastraModuleOptions } from '../mastra.module.js'; import { RequestContextService } from '../services/request-context.service.js'; import { RouteHandlerService } from '../services/route-handler.service.js'; /** * Main Mastra controller that handles all routes dynamically. * Routes are matched against SERVER_ROUTES from @mastra/server. * * Auth and rate limiting are handled via MastraRouteGuard so they only apply * to matched Mastra routes and do not affect the rest of the user's app. */ export declare class MastraController { private readonly options; private readonly routeHandler; private readonly requestContext; constructor(options: MastraModuleOptions, routeHandler: RouteHandlerService, requestContext: RequestContextService); /** * Catch-all handler that matches incoming requests to Mastra routes. */ handleRequest(req: Request, _res: Response): Promise; /** * Parse and normalize query parameters. * * Values are forwarded as the raw strings (or string arrays) the HTTP layer * delivered. The route's `queryParamSchema` decides whether and how to parse * or coerce each field — exactly as in `@mastra/hono`, `@mastra/express`, * `@mastra/fastify`, and `@mastra/koa`. Users who want booleans, numbers, or * parsed JSON should opt in via `z.coerce.boolean()`, `z.coerce.number()`, * or a JSON preprocessor on the field. See #16114. */ private parseQueryParams; /** * Parse request body, handling multipart/form-data and JSON. */ private parseBody; } //# sourceMappingURL=mastra.controller.d.ts.map