/// import { Plugin } from '@ascot/core'; import { WSClass } from './meta/models'; import { WSEndpoint } from './meta/endpoint'; import { WSModel } from './meta/model'; import { WebService } from './models/base'; import * as Koa from 'koa'; import * as http from 'http'; export interface HTTPPluginOptions { baseUrl?: string; port: number; middlewares?: any[]; errorHandlers?: ((err: any, ctx: any) => void)[]; register: (plugin: HTTPPlugin) => void; bodyParser?: any; busboy?: any; } export declare class HTTPPlugin extends Plugin { protected koa: Koa; protected router: any; protected server: http.Server; protected endpoints: { [path: string]: { meta: WSEndpoint; handler: (...args: any[]) => any | Promise; }; }; protected services: { [key: string]: { meta: WSModel; instance: WebService; }; }; constructor(); onSetup(): Promise; onTeardown(): Promise; register(ws: WSClass): Promise; }