import * as http from "http";
import * as https from "https";
import express from "express";
import { HotServer } from "./HotServer";
import { HotStaq } from "./HotStaq";
import { HotRoute } from "./HotRoute";
import { HotEventMethod } from "./HotRouteMethod";
import { HotLogLevel } from "./HotLog";
import { HotTester } from "./HotTester";
/**
 * An API server for use during testing.
 */
export declare class HotTesterServer extends HotServer {
    /**
     * The express app to use.
     */
    expressApp: express.Express;
    /**
     * The HTTP listener to use.
     */
    httpListener: http.Server;
    /**
     * The HTTPS listener to use.
     */
    httpsListener: https.Server;
    /**
     * Any non-static routes that need to be added. These
     * will be added during the preregistration phase, before
     * all API routes are added.
     */
    routes: {
        /**
         * The type of route.
         */
        type: HotEventMethod;
        /**
         * The type of route.
         */
        route: string;
        /**
         * The method to execute when this route is hit.
         */
        method: (req: express.Request, res: express.Response) => Promise<void>;
    }[];
    constructor(processor: HotStaq | HotServer, httpPort?: number, httpsPort?: number);
    /**
     * Add a tester for use later.
     */
    addTester(tester: HotTester): void;
    /**
     * Execute tests.
     */
    executeTests(testerName: string, mapName: string): Promise<void>;
    /**
     * Execute all web tests for all maps in the HotSite testing web object.
     */
    executeAllWebTests(testerName: string): Promise<void>;
    /**
     * Execute all api tests for all maps in the HotSite testing api object.
     */
    executeAllAPITests(testerName: string): Promise<void>;
    /**
     * Add a route. This will be registered before any APIs are registered.
     */
    addRoute(route: string, method: (req: express.Request, res: express.Response) => Promise<void>, type?: HotEventMethod): void;
    /**
     * Register a route.
     */
    registerRoute(route: HotRoute): Promise<void>;
    /**
     * Check if a file exists.
     */
    static checkIfFileExists(filepath: string): Promise<boolean>;
    /**
     * The routes to add before registering a route.
     */
    preregisterRoute(): void;
    /**
     * Set the error handlers. This will create two express routes at the bottom of the
     * route stack. The first will be to capture any 404 errors, the second would be to
     * catch any remaining errors.
     */
    setErrorHandlingRoutes(handle404?: (req: express.Request, res: express.Response, next: any) => void, handleOther?: (err: any, req: express.Request, res: express.Response, next: any) => void): void;
    /**
     * Clear the last two express routes, which are reserved for the
     * error handlers.
     */
    clearErrorHandlingRoutes(): void;
    /**
     * Start listening for requests.
     */
    listen(): Promise<void>;
    /**
     * Setup the tester api.
     */
    setupTesterAPI(baseUrl: string): Promise<void>;
    /**
     * Start the server.
     *
     * @param httpPort The HTTP port to listen on.
     * @param httpsPort The HTTPS port to listen on.
     * @param processor The HotStaq or parent server being used for communication.
     */
    static startServer(baseUrl?: string, httpPort?: number, httpsPort?: number, processor?: HotServer | HotStaq, logLevel?: HotLogLevel): Promise<{
        processor: HotServer | HotStaq;
        server: HotTesterServer;
    }>;
    /**
     * Shutdown the server.
     */
    shutdown(): Promise<void>;
}
//# sourceMappingURL=HotTesterServer.d.ts.map