/** * TOC Service — fetch and transform Fluid Topics TOC into TocEntry[] * * Replaces the scraper-based TOC fetching with the FT API * via ft-client + MapsRegistry. */ import type { ProductId } from '../constants.js'; import type { ServerContext } from '../types/context.js'; import type { FtTocNode, TocEntry, FetchTocOptions, FetchTocResult } from '../types.js'; /** * Recursively convert FtTocNode[] → TocEntry[] * * Enriches each entry with: * - url: buildDisplayUrl(prettyUrl) * - contentId / tocId from the FT node * - recursively transformed children */ export declare function transformFtTocToTocEntries(nodes: FtTocNode[]): TocEntry[]; /** * Fetch table of contents for a product via the Fluid Topics API. * * Resolution order: * 1. ctx.tocProvider (if configured) * 2. MapsRegistry → mapId → ft-client.fetchMapToc * 3. Transform FtTocNode[] → TocEntry[] * * Results are cached under `ft-toc:{locale}:{product}:{version}`. */ export declare function fetchTableOfContents(ctx: ServerContext, product: ProductId, version?: string, options?: FetchTocOptions): Promise; //# sourceMappingURL=toc-service.d.ts.map