import { z } from "zod"; /** `.next/server/app-paths-manifest.json`: app path → server bundle. */ export declare const appPathsManifestSchema: z.ZodRecord; export type AppPathsManifest = z.infer; /** `.next/server/pages-manifest.json`: page path → server bundle. */ export declare const pagesManifestSchema: z.ZodRecord; export type PagesManifest = z.infer; /** `.next/routes-manifest.json` — only the fields the tool relies on. */ export declare const routesManifestSchema: z.ZodObject<{ version: z.ZodNumber; basePath: z.ZodString; staticRoutes: z.ZodArray>; dynamicRoutes: z.ZodArray>; }, z.core.$loose>; export type RoutesManifest = z.infer; /** * `.next/prerender-manifest.json` — only the fields ISR handling relies on. * * `routes` holds concrete prerendered paths; a dynamic template's revalidation * period lives on those entries, linked back by `srcRoute`, not on the * `dynamicRoutes` entry for the template itself. On the vercel/next.js#96533 * reproduction, `/posts/[slug]` carries no period while its 200 concrete * `/posts/post-N` entries each carry `initialRevalidateSeconds: 3600` with * `srcRoute: "/posts/[slug]"`. */ export declare const prerenderManifestSchema: z.ZodObject<{ routes: z.ZodOptional]>>; srcRoute: z.ZodOptional>; }, z.core.$loose>>>; preview: z.ZodOptional>; }, z.core.$loose>; export type PrerenderManifest = z.infer; export type RouteKind = "page" | "route-handler"; export type DiscoveredRoute = { /** Request path, e.g. "/" or "/products/[id]". */ path: string; kind: RouteKind; /** True when the path needs sample param values before it can be requested. */ dynamic: boolean; /** Set when the route exists but cannot be requested directly. */ unaddressableReason?: string; }; /** * Routes from a Pages Router build. * * Server-side leaks are not an App Router exclusive — vercel/next.js#95094 * leaks through Pages middleware — and refusing to read this manifest made * next-leak fail with a raw ENOENT on any Pages-only app. * * Statically prerendered pages (`.html` bundles) are kept deliberately: they * still travel the server's request path, so a leak there is a real finding, * and dropping routes silently is worse than measuring a cheap one. */ export declare function discoverPagesRoutes(pages: PagesManifest): DiscoveredRoute[]; export declare function discoverRoutes(appPaths: AppPathsManifest): DiscoveredRoute[];