/// <reference types="node" />
import * as events from 'events';
import { HtkConfig } from '../config';
import { HttpClient } from '../client/http-client';
/**
 * This file contains the core server API, used by the UI to query
 * machine state that isn't easily visible from the web (cert files,
 * network interfaces), and to launch intercepted applications
 * directly on this machine.
 *
 * This is a very powerful API! It's not far from remote code
 * execution. Because of that, access is tightly controlled:
 * - Only listens on 127.0.0.1
 * - All requests must include an acceptable Origin header, i.e.
 *   no browsers requests except from a strict whitelist of valid
 *   origins. In prod, that's just app.httptoolkit.tech.
 * - Optionally (always set in the HTK app) requires an auth
 *   token with every request, provided by $HTK_SERVER_TOKEN or
 *   --token at startup. For HTTP, this is a Bearer token in the
 *   Authorization header. For the UI WebSocket bridge, the token
 *   is sent in the initial 'auth' message after connection.
 *
 * The API is available in two formats: a simple REST-ish API,
 * and a GraphQL that exists for backward compatibility. All
 * future development will happen on the REST API, and the
 * GraphQL API will eventually be removed.
 */
export declare class HttpToolkitServerApi extends events.EventEmitter {
    private server;
    private bridge;
    constructor(config: HtkConfig, httpClient: HttpClient, getRuleParamKeys: () => string[]);
    start(port: number): Promise<void>;
    private attachWebSocketBridge;
    private startBridgeApiServer;
}
