import type { FastifyInstance, RawServerBase } from 'fastify';
import type { ApiDefaultEnvironment, HttpServerInterface, ApiServerInterface, ApiServerOptions } from '../../types/index.js';
/**
 * @file The API server.
 * @copyright Piggly Lab 2023
 */
export declare abstract class AbstractServer<Server extends RawServerBase, AppEnvironment extends ApiDefaultEnvironment> implements ApiServerInterface<Server, AppEnvironment> {
    /**
     * The Fastify application.
     *
     * @protected
     * @memberof ApiServer
     * @since 1.0.0
     * @author Caique Araujo <caique@piggly.com.br>
     */
    protected _app: FastifyInstance<Server>;
    /**
     * The options.
     *
     * @protected
     * @memberof ApiServer
     * @since 1.0.0
     * @author Caique Araujo <caique@piggly.com.br>
     */
    protected _options: ApiServerOptions<Server, AppEnvironment>;
    /**
     * Create a new API server.
     *
     * @param options The options.
     * @public
     * @constructor
     * @memberof ApiServer
     * @since 1.0.0
     * @author Caique Araujo <caique@piggly.com.br>
     */
    constructor(options: ApiServerOptions<Server, AppEnvironment>, app: FastifyInstance<Server>);
    /**
     * Bootstrap the API server.
     *
     * This method will prepare the environment, the logger,
     * the plugins and the routes for fastify.
     *
     * After that, it will return a new HttpServer instance.
     * This instance will be used to start the server.
     *
     * @public
     * @async
     * @memberof ApiServer
     * @since 1.0.0
     * @author Caique Araujo <caique@piggly.com.br>
     */
    bootstrap(): Promise<HttpServerInterface<Server, AppEnvironment>>;
    /**
     * Get the Fastify application.
     *
     * @public
     * @memberof ApiServer
     * @since 1.0.0
     * @author Caique Araujo <caique@piggly.com.br>
     */
    getApp(): FastifyInstance<Server, import("fastify").RawRequestDefaultExpression<Server>, import("fastify").RawReplyDefaultExpression<Server>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault>;
    /**
     * Get the global environment.
     *
     * @public
     * @memberof ApiServer
     * @since 1.0.0
     * @author Caique Araujo <caique@piggly.com.br>
     */
    getEnv(): AppEnvironment;
    /**
     * Initialize the API server.
     *
     * @protected
     * @memberof ApiServer
     * @since 1.0.0
     * @author Caique Araujo <caique@piggly.com.br>
     */
    protected init(): Promise<void>;
    /**
     * Get the default logger configuration.
     *
     * @deprecated There is no reason to log with fastify. High memory usage and throughput.
     * @public
     * @static
     * @memberof AbstractServer
     * @since 3.0.0
     * @author Caique Araujo <caique@piggly.com.br>
     */
    protected static defaultLogger(env: string, root_path: string, debug: boolean): Record<string, any>;
}
