/// <reference types="node" />
import { AddressInfo } from "net";
import { Server } from "http";
import { Server as SecureServer } from "https";
import { RequestHandler } from "express";
import { OpenApiValidator } from "express-openapi-validator";
import { PluginRegistry } from "@hyperledger/cactus-core";
import { ICactusApiServerOptions } from "./config/config-service";
import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter";
export interface IApiServerConstructorOptions {
    pluginRegistry?: PluginRegistry;
    httpServerApi?: Server | SecureServer;
    httpServerCockpit?: Server | SecureServer;
    config: ICactusApiServerOptions;
    prometheusExporter?: PrometheusExporter;
}
export declare class ApiServer {
    readonly options: IApiServerConstructorOptions;
    private readonly log;
    private pluginRegistry;
    private readonly httpServerApi;
    private readonly httpServerCockpit;
    prometheusExporter: PrometheusExporter;
    constructor(options: IApiServerConstructorOptions);
    getPrometheusExporter(): PrometheusExporter;
    getPrometheusExporterMetrics(): Promise<string>;
    getPluginImportsCount(): number;
    start(): Promise<any>;
    /**
     * Verifies that the currently running NodeJS process is at least of a certain
     * NodeJS version as specified by the configuration.
     *
     * @throws {Error} if the version contraint is not satisfied by the runtime.
     */
    checkNodeVersion(currentVersion?: string): void;
    getHttpServerApi(): Server | SecureServer;
    getHttpServerCockpit(): Server | SecureServer;
    getOrInitPluginRegistry(): Promise<PluginRegistry>;
    initPluginRegistry(): Promise<PluginRegistry>;
    shutdown(): Promise<void>;
    startCockpitFileServer(): Promise<AddressInfo>;
    startApiServer(): Promise<AddressInfo>;
    createOpenApiValidator(): OpenApiValidator;
    createCorsMiddleware(allowedDomains: string[]): RequestHandler;
}
