/** * Fetch and validate sitemap.xml, sitemap-unindexed.xml, and discovery endpoints. * When sitemap.xml or sitemap-unindexed.xml is a sitemap index, follows child * sitemaps and collects page URLs from their urlset content. */ import { type DiscoveryValidationResult } from './discovery/index.js'; import type { DiscoverySmokeConfig } from './discovery/types.js'; export interface ValidationResult { sitemapXml: { ok: boolean; status: number; body?: string; }; sitemapUnindexedXml: { ok: boolean; status: number; body?: string; warned?: boolean; }; /** @deprecated Use discovery.endpoints for llmsTxt — kept for CLI backward compatibility */ llmsTxt: { ok: boolean; status: number; body?: string; warned?: boolean; }; discovery: DiscoveryValidationResult; /** Page URLs from sitemap.xml (resolved from child sitemaps when root is an index). */ sitemapPageUrls?: string[]; /** Page URLs from sitemap-unindexed.xml (resolved from child sitemaps when root is an index). */ sitemapUnindexedPageUrls?: string[]; /** True when sitemap.xml was a sitemap index (child sitemaps were followed). */ sitemapWasIndex?: boolean; /** Child sitemap URLs that returned 404 and were skipped (only when ignoreMissingChildSitemaps is used). */ skippedMissingChildSitemaps?: string[]; } export interface ValidateOptions { /** When resolving a sitemap index, treat 404 on a child `` as optional (skip that child). */ ignoreMissingChildSitemaps?: boolean; /** Require all four discovery endpoints with content validation (llms.txt, markdown-index.txt, cms.txt, site-info.md). */ strictDiscovery?: boolean; /** Per-endpoint enable flags; only used when strictDiscovery is true. Omitted keys default to required. */ discovery?: DiscoverySmokeConfig; fetch?: typeof fetch; } export declare function validate(baseUrl: string, fetchInit: RequestInit, options?: ValidateOptions): Promise; export declare function validationFailed(result: ValidationResult, strictDiscovery?: boolean): boolean; //# sourceMappingURL=validate.d.ts.map