import type { ParsedUrlQuery, Redirect } from "../types"; export interface NextaneEnvironment { ASSETS: { fetch(request: Request): Promise; }; } export interface NextaneManifest { buildId?: string; routes: Array<{ route: string; regexSource: string; params: unknown[]; id: number; kind: "page" | "api"; load(): Promise>; }>; loadApp: null | (() => Promise>); loadDocument: null | (() => Promise>); loadError: null | (() => Promise>); config?: { rewrites?: Array<{ source: string; destination: string; has?: Array<{ type: string; key: string; value?: string }>; missing?: Array<{ type: string; key: string; value?: string }>; basePath?: false; }>; redirects?: Array<{ source: string; destination: string; permanent?: boolean; statusCode?: number; has?: Array<{ type: string; key: string; value?: string }>; missing?: Array<{ type: string; key: string; value?: string }>; basePath?: false; }>; headers?: Array<{ source: string; headers: Array<{ key: string; value: string }>; has?: Array<{ type: string; key: string; value?: string }>; missing?: Array<{ type: string; key: string; value?: string }>; basePath?: false; }>; crossOrigin?: string; trailingSlash?: boolean; basePath?: string; assetPrefix?: string; }; preview?: { previewModeId: string; encryptionKey: string; signingKey: string; }; } export interface RenderArtifact { buildId?: string; route: string; pageProps: Record; appProps?: Record; query: ParsedUrlQuery; gsp: boolean; gssp: boolean; isFallback?: boolean; resolvedPath?: string; revalidate?: number | boolean; notFound?: boolean; redirect?: Redirect; cacheable?: boolean; generatedAt: number; [key: string]: unknown; } export declare function cacheTagForPath(pathname: string): string; export declare function createIsrArtifactHandler( manifest: NextaneManifest, ): (request: Request) => Promise; export declare function createNextaneHandler( manifest: NextaneManifest, options?: { loadCachedArtifact?: ( request: Request, route: NextaneManifest["routes"][number], ) => Promise; revalidatePath?: ( pathname: string, options?: { unstable_onlyGenerated?: boolean }, ) => Promise | boolean; }, ): (request: Request, env: NextaneEnvironment) => Promise;