import type { WebNextRequest, WebNextResponse } from './base-http/web';
import type RenderResult from './render-result';
import type { NextParsedUrlQuery, NextUrlWithParsedQuery } from './request-meta';
import type { Params } from '../shared/lib/router/utils/route-matcher';
import type { LoadComponentsReturnType } from './load-components';
import type { PrerenderManifest } from '../build';
import type { LoadedRenderOpts, MiddlewareRoutingItem, NormalizedRouteManifest, Options, RouteHandler } from './base-server';
import type { Revalidate, SwrDelta } from './lib/revalidate';
import BaseServer from './base-server';
import WebResponseCache from './response-cache/web';
import { IncrementalCache } from './lib/incremental-cache';
import type { PAGE_TYPES } from '../lib/page-types';
import type { Rewrite } from '../lib/load-custom-routes';
import type { DeepReadonly } from '../shared/lib/deep-readonly';
import type { ServerOnInstrumentationRequestError } from './app-render/types';
interface WebServerOptions extends Options {
    webServerConfig: {
        page: string;
        pathname: string;
        pagesType: PAGE_TYPES;
        loadComponent: (page: string) => Promise<LoadComponentsReturnType | null>;
        extendRenderOpts: Partial<BaseServer['renderOpts']> & Pick<BaseServer['renderOpts'], 'buildId'> & {
            serverActionsManifest?: any;
        };
        renderToHTML: typeof import('./app-render/app-render').renderToHTMLOrFlight | undefined;
        incrementalCacheHandler?: any;
        prerenderManifest: DeepReadonly<PrerenderManifest> | undefined;
        interceptionRouteRewrites?: Rewrite[];
    };
}
type WebRouteHandler = RouteHandler<WebNextRequest, WebNextResponse>;
export default class NextWebServer extends BaseServer<WebServerOptions, WebNextRequest, WebNextResponse> {
    constructor(options: WebServerOptions);
    protected getIncrementalCache({ requestHeaders, }: {
        requestHeaders: IncrementalCache['requestHeaders'];
    }): Promise<IncrementalCache>;
    protected getResponseCache(): WebResponseCache;
    protected hasPage(page: string): Promise<boolean>;
    protected getBuildId(): string;
    protected getEnabledDirectories(): {
        app: boolean;
        pages: boolean;
    };
    protected getPagesManifest(): {
        [x: string]: string;
    };
    protected getAppPathsManifest(): {
        [x: string]: string;
    };
    protected attachRequestMeta(req: WebNextRequest, parsedUrl: NextUrlWithParsedQuery): void;
    protected getPrerenderManifest(): {
        readonly version: 4;
        readonly routes: {
            readonly [x: string]: {
                readonly initialRevalidateSeconds: Revalidate;
                readonly srcRoute: string | null;
                readonly initialStatus?: number;
                readonly initialHeaders?: {
                    readonly [x: string]: string;
                } | undefined;
                readonly experimentalBypassFor?: readonly ({
                    readonly type: "header" | "query" | "cookie";
                    readonly key: string;
                    readonly value?: string;
                } | {
                    readonly type: "host";
                    readonly key?: undefined;
                    readonly value: string;
                })[] | undefined;
                readonly dataRoute: string | null;
                readonly prefetchDataRoute: string | null | undefined;
                readonly experimentalPPR: boolean | undefined;
            };
        };
        readonly dynamicRoutes: {
            readonly [x: string]: {
                readonly fallback: string | null | false;
                readonly routeRegex: string;
                readonly dataRouteRegex: string | null;
                readonly prefetchDataRouteRegex: string | null | undefined;
                readonly experimentalBypassFor?: readonly ({
                    readonly type: "header" | "query" | "cookie";
                    readonly key: string;
                    readonly value?: string;
                } | {
                    readonly type: "host";
                    readonly key?: undefined;
                    readonly value: string;
                })[] | undefined;
                readonly dataRoute: string | null;
                readonly prefetchDataRoute: string | null | undefined;
                readonly experimentalPPR: boolean | undefined;
            };
        };
        readonly notFoundRoutes: readonly string[];
        readonly preview: {
            readonly previewModeId: string;
            readonly previewModeEncryptionKey: string;
            readonly previewModeSigningKey: string;
        };
    } | {
        version: any;
        routes: {};
        dynamicRoutes: {};
        notFoundRoutes: never[];
        preview: any;
    };
    protected getNextFontManifest(): {
        readonly pages: {
            readonly [x: string]: readonly string[];
        };
        readonly app: {
            readonly [x: string]: readonly string[];
        };
        readonly appUsingSizeAdjust: boolean;
        readonly pagesUsingSizeAdjust: boolean;
    } | undefined;
    protected handleCatchallRenderRequest: WebRouteHandler;
    protected renderHTML(req: WebNextRequest, res: WebNextResponse, pathname: string, query: NextParsedUrlQuery, renderOpts: LoadedRenderOpts): Promise<RenderResult>;
    protected sendRenderResult(_req: WebNextRequest, res: WebNextResponse, options: {
        result: RenderResult;
        type: 'html' | 'json';
        generateEtags: boolean;
        poweredByHeader: boolean;
        revalidate: Revalidate | undefined;
        swrDelta: SwrDelta | undefined;
    }): Promise<void>;
    protected findPageComponents({ page, query, params, url: _url, }: {
        page: string;
        query: NextParsedUrlQuery;
        params: Params | null;
        isAppPath: boolean;
        url?: string;
    }): Promise<{
        query: {
            [x: string]: any;
            __nextNotFoundSrcPage?: string;
            __nextDefaultLocale?: string;
            __nextFallback?: "true";
            __nextLocale?: string;
            __nextInferredLocaleFromDefault?: "1";
            __nextSsgPath?: string;
            _nextBubbleNoFallback?: "1";
            __nextDataReq?: "1";
            __nextCustomErrorRender?: "1";
            _rsc?: string;
            amp?: "1";
        };
        components: LoadComponentsReturnType;
    } | null>;
    protected runApi(): Promise<boolean>;
    protected handleApiRequest(): Promise<boolean>;
    protected loadEnvConfig(): void;
    protected getPublicDir(): string;
    protected getHasStaticDir(): boolean;
    protected getFallback(): Promise<string>;
    protected getFontManifest(): undefined;
    protected handleCompression(): void;
    protected handleUpgrade(): Promise<void>;
    protected getFallbackErrorComponents(_url?: string): Promise<LoadComponentsReturnType | null>;
    protected getRoutesManifest(): NormalizedRouteManifest | undefined;
    protected getMiddleware(): MiddlewareRoutingItem | undefined;
    protected getFilesystemPaths(): Set<string>;
    protected getinterceptionRoutePatterns(): RegExp[];
    protected loadInstrumentationModule(): Promise<import("./instrumentation/types").InstrumentationModule | undefined>;
    protected instrumentationOnRequestError(...args: Parameters<ServerOnInstrumentationRequestError>): Promise<void>;
}
export {};
