import type { BaseNextRequest, BaseNextResponse } from '../base-http';
import type { RequestStore } from '../../client/components/request-async-storage.external';
import type { RenderOpts } from '../app-render/types';
import type { WithStore } from './with-store';
import type { NextRequest } from '../web/spec-extension/request';
import type { __ApiPreviewProps } from '../api-utils';
import type { RequestLifecycleOpts } from '../base-server';
import type { ServerComponentsHmrCache } from '../response-cache';
export type WrapperRenderOpts = RequestLifecycleOpts & Partial<Pick<RenderOpts, 'onUpdateCookies'>> & {
    experimental: Pick<RenderOpts['experimental'], 'after'>;
    previewProps?: __ApiPreviewProps;
};
export type RequestContext = RequestResponsePair & {
    /**
     * The URL of the request. This only specifies the pathname and the search
     * part of the URL. This is only undefined when generating static paths (ie,
     * there is no request in progress, nor do we know one).
     */
    url: {
        /**
         * The pathname of the requested URL.
         */
        pathname: string;
        /**
         * The search part of the requested URL. If the request did not provide a
         * search part, this will be an empty string.
         */
        search?: string;
    };
    renderOpts?: WrapperRenderOpts;
    isHmrRefresh?: boolean;
    serverComponentsHmrCache?: ServerComponentsHmrCache;
};
type RequestResponsePair = {
    req: BaseNextRequest;
    res: BaseNextResponse;
} | {
    req: NextRequest;
    res: undefined;
};
export declare const withRequestStore: WithStore<RequestStore, RequestContext>;
export {};
