import * as KoaRouter from "koa-router"; import { IInfoObject, IOpenApiObject, ISecurityRequirementObject, IServerObject, ITagObject } from "open-api.d.ts"; import { Implementations } from "../../interface"; import { HandleRequest } from "../handle-request"; import * as router from "./router"; export interface IRouterOptions extends router.IRouterOptions { services: string[]; implementation: Implementations; definitionEndpoint?: string; toObjectOptions?: object; customType?: { [protoType: string]: any; }; openapi: { info: IInfoObject; servers?: IServerObject[]; security?: ISecurityRequirementObject[]; tags?: ITagObject[]; }; } export interface IHandleRequestInfo { handleRequest: HandleRequest; prefix: string; path: string; method: string; } export interface IResolvedHttpOptions { method: SupportedHttpMethod; path: string; body: string; } export declare type SupportedHttpMethod = "get" | "post" | "put" | "delete"; export declare class OpenApiRouter extends router.Router { static resolveOptions(options?: { [key: string]: any; }): IResolvedHttpOptions | null; static resolveRequestObject(ctx: KoaRouter.IRouterContext, bodyPosition: string): object; private handleRequests; private openapi; constructor(options: IRouterOptions); handles(): IHandleRequestInfo[]; openApiDefinition(): IOpenApiObject; }