import type { NextRequest } from "next/server"; import { type GeistdocsConfig } from "../config.js"; import { type GeistdocsPageFilter } from "../page-visibility.js"; import type { GeistdocsSourceBundle } from "../source.js"; type SourceBundle = GeistdocsSourceBundle; type GeistdocsPage = NonNullable>; export interface DocsMarkdownParams extends Record { lang: string; slug?: string[]; } interface MarkdownTransformContext { lang: string; page: GeistdocsPage; source: SourceBundle; } type MarkdownTransform = (markdown: string, context: MarkdownTransformContext) => Promise | string; interface CreateLlmsRouteOptions { filterPage?: GeistdocsPageFilter; source?: SourceBundle; sources?: SourceBundle[]; transform?: MarkdownTransform; } export declare const createLlmsRoute: ({ filterPage, source, sources, transform, }: CreateLlmsRouteOptions) => { GET: (_req: NextRequest, { params }: { params: Promise<{ lang: string; }>; }) => Promise; revalidate: false; }; export interface MarkdownPageAccessContext { params: Params; request: Request; source: SourceBundle; } export type MarkdownPageAccessFilter = (page: GeistdocsPage, context: MarkdownPageAccessContext) => boolean | Promise; export interface CreateDocsMarkdownRouteOptions { /** Return false to serve the same response as a missing page. */ canViewPage?: MarkdownPageAccessFilter; config?: Pick; filterStaticParams?: (params: DocsMarkdownParams) => boolean; /** Customize the agent-readable Markdown response for missing pages, or disable it. */ notFound?: false | MarkdownNotFoundOptions; source?: SourceBundle; sources?: SourceBundle[]; transform?: MarkdownTransform; } export interface MarkdownNotFoundOptions { /** Map a source page to its app-local Markdown URL. */ getPageMarkdownUrl?: (context: { lang: string; page: GeistdocsPage; source: SourceBundle; }) => string; /** * Reconstruct the app-local public path from the Markdown route slug. The * path also scopes page lookup when multiple sources share this route. */ getRequestedPath?: (context: { lang: string; slug: string[]; }) => string; /** Maximum suggestions to return. Defaults to 5. */ maxSuggestions?: number; /** Minimum fuzzy-match score from 0 to 1. Defaults to 0.38. */ minScore?: number; /** * HTTP status for the useful not-found body. Defaults to 404. Legacy `200` * values are treated as 404 so missing pages always return a real error status. */ status?: 200 | 404 | 410; } export declare const createDocsMarkdownRoute: ({ canViewPage, config, filterStaticParams, notFound: notFoundOptions, source, sources, transform, }: CreateDocsMarkdownRouteOptions) => { GET: (request: Request, { params }: { params: Promise; }) => Promise; generateStaticParams: ({ params, }?: { params?: Promise<{ lang?: string; }>; }) => Promise; revalidate: false; }; export {}; //# sourceMappingURL=llms.d.ts.map