type FarmMarkdownRouteInput = string | { route: string; title?: string; cache?: number | false; }; interface FarmMarkdownUserConfig { /** * Enable generated markdown representations for React pages. * @default true */ enabled?: boolean; /** * Routes that may expose generated markdown. Every page is exposed by default. */ expose?: boolean | FarmMarkdownRouteInput[]; /** @deprecated Use `expose`. */ routes?: FarmMarkdownRouteInput[]; cache?: number | false; includeMetadata?: boolean; } interface FarmMarkdownResolvedRoute { route: string; title?: string; cache?: number | false; } interface FarmMarkdownResolvedConfig { enabled: boolean; expose: true | FarmMarkdownResolvedRoute[]; cache: number | false; includeMetadata: boolean; } interface FarmMarkdownMirrorTarget { pathname: string; route: FarmMarkdownResolvedRoute | null; } interface ResolveMarkdownMirrorTargetOptions { accept?: string | null; } interface CreateMarkdownMirrorResponseOptions { request: Request; config?: FarmMarkdownResolvedConfig; routeExists?: (pathname: string) => boolean; renderPage: (request: Request) => Response | Promise; } interface ApplyMarkdownNegotiationHeadersOptions { config?: FarmMarkdownResolvedConfig; pathname: string; } declare function resolveMarkdownConfig(config: FarmMarkdownUserConfig | boolean | undefined): FarmMarkdownResolvedConfig; declare function resolveMarkdownMirrorTarget(config: FarmMarkdownResolvedConfig | undefined, pathname: string, options?: ResolveMarkdownMirrorTargetOptions): FarmMarkdownMirrorTarget | null; declare function createMarkdownMirrorResponse(options: CreateMarkdownMirrorResponseOptions): Promise; declare function applyMarkdownNegotiationHeaders(response: Response, options: ApplyMarkdownNegotiationHeadersOptions): Response; declare function htmlToMarkdown(html: string, options?: { title?: string; sourcePath?: string; includeMetadata?: boolean; }): string; /** * Quality value an `Accept` header assigns a media type, or 0 when the client * will not take it. * * `q=0` means "not acceptable" per RFC 9110, so it has to be distinguished from * an absent entry rather than treated as a match. Wildcards are opt-in: a client * sending `*/*` will take anything, which says nothing about whether it would * rather have Markdown than HTML, so callers negotiating between two concrete * types should ask for exact entries only. */ declare function farmAcceptQuality(accept: string | null | undefined, mediaType: string, options?: { wildcards?: boolean; }): number; declare function requestAcceptsMarkdown(accept: string | null | undefined): boolean; export { type ApplyMarkdownNegotiationHeadersOptions, type CreateMarkdownMirrorResponseOptions, type FarmMarkdownMirrorTarget, type FarmMarkdownResolvedConfig, type FarmMarkdownResolvedRoute, type FarmMarkdownRouteInput, type FarmMarkdownUserConfig, type ResolveMarkdownMirrorTargetOptions, applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse, farmAcceptQuality, htmlToMarkdown, requestAcceptsMarkdown, resolveMarkdownConfig, resolveMarkdownMirrorTarget };