import { Controller } from "./controller.js"; import type { ControllerRoute, ControllerRouteParams } from "./route-params.js"; export declare abstract class QueryController extends Controller { readonly __route?: TRoute; abstract execute(...params: Array): Promise; } export type QueryControllerResponseBody = T extends abstract new (...args: Array) => infer TInstance ? TInstance extends QueryController ? TResBody : never : T extends QueryController ? TResBody : never; /** * Endpoint contract for a query (read) operation, derived entirely from the concrete * `QueryController` that serves it: the route (from the controller's declared route), its resolved * params, and the response body. A single generic is all a client passes (e.g. to `RpcClient.query`), * and there is no separate route argument that could drift from the controller. * * @example * type GetTodo = QueryEndpoint; * // route: ; params: { id: number }; res: */ export type QueryEndpoint | (abstract new (...args: Array) => QueryController)> = { readonly route: ControllerRoute; readonly params: ControllerRouteParams>; readonly res: QueryControllerResponseBody; }; //# sourceMappingURL=query-controller.d.ts.map