import { Request, Response, NextFunction, Router } from 'express';
import { OpenAPIV3 } from 'express-openapi-validator/dist/framework/types';
import { operations as Operations, paths as Paths } from './generated';
declare type KeysOfUnion<T> = T extends T ? keyof T : never;
declare type Url = keyof Paths;
declare type Method = KeysOfUnion<Paths[Url]>;
export declare const openapi: OpenAPIV3.Document;
export declare type RouteType<O extends keyof Operations> = [
    Operations[O] extends {
        parameters: {
            path: any;
        };
    } ? Operations[O]['parameters']['path'] : undefined,
    Operations[O]['responses'][200]['content'][keyof Operations[O]['responses'][200]['content']],
    undefined,
    Operations[O] extends {
        parameters: {
            query: any;
        };
    } ? Operations[O]['parameters']['query'] : undefined
];
export interface Route<O extends keyof Operations = any> {
    url: string;
    method: Method;
    resolver: (req: Request<RouteType<O>[0], RouteType<O>[1], RouteType<O>[2], RouteType<O>[3]>, resp: Response<RouteType<O>[1]>, next: NextFunction) => unknown;
}
export declare function createRoute<O extends keyof Operations>(operation: O, resolver: (req: Request<RouteType<O>[0], RouteType<O>[1], RouteType<O>[2], RouteType<O>[3]>, resp: Response<RouteType<O>[1]>, next: NextFunction) => unknown): Route<O>;
export declare function createRouter(routes: Route<any>[]): Router;
export declare function getRouteUrl<O extends keyof Operations>(operation: O, params: RouteType<O>[0], query: RouteType<O>[3]): string;
export {};
