import { P as PageMetadata } from '../index.types-DMOO-uvF.js';
import 'express';

/**
 * Response data structure from server for route data requests
 */
type RouteDataResponse = {
    /** Combined props (layout + page) - kept for backward compatibility */
    props?: Record<string, unknown>;
    /** Layout props (from layout.server.hook.ts) - only present when layout hooks were executed */
    layoutProps?: Record<string, unknown>;
    /** Page props (from page.server.hook.ts) - always present in data requests */
    pageProps?: Record<string, unknown>;
    metadata?: PageMetadata | null;
    theme?: string;
    redirect?: {
        destination: string;
        permanent?: boolean;
    };
    notFound?: boolean;
    error?: boolean;
    message?: string;
    params?: Record<string, string>;
};
type RouteData = {
    ok: boolean;
    status: number;
    json: RouteDataResponse;
};
/**
 * Revalidates route data by removing it from the cache.
 * The next time you navigate to this route, fresh data will be fetched from the server.
 * This is a client-side function and does not require a server-side revalidation.
 *
 * @param path - The route path to revalidate (e.g., '/posts/1' or '/posts/1?page=2')
 *               If query params are not included, revalidates all variants of that route.
 *
 * @example
 * ```ts
 * // After saving something to the DB, revalidate the route
 * await saveToDatabase(data);
 * revalidatePath('/posts');
 *
 * // Revalidate a specific route with query params
 * revalidatePath('/posts?page=2');
 * ```
 */
declare function revalidatePath(path: string, skipAutoRevalidate?: boolean): void;
declare function revalidate(): Promise<RouteData>;
/**
 * @deprecated Use `revalidatePath()` instead. This function is kept for backwards compatibility.
 */
declare function revalidateRouteData(url: string): void;
declare function prefetchRouteData(url: string): void;
type GetRouteDataOptions = {
    /**
     * If true, forces revalidation of route data,
     * ignoring the cache and fetching fresh data from the server.
     * Similar to Next.js's `router.refresh()` behavior.
     */
    revalidate?: boolean;
};
declare function getRouteData(url: string, options?: GetRouteDataOptions): Promise<RouteData>;

export { type GetRouteDataOptions, type RouteDataResponse, getRouteData, prefetchRouteData, revalidate, revalidatePath, revalidateRouteData };
