/** * Search service — Fluid Topics powered search */ import type { SearchResult, SearchParams, SearchDocumentationResult, FtSearchEntry, FtSearchCluster, FtSearchFilter } from '../types.js'; import type { ServerContext } from '../types/context.js'; export type { SearchDocumentationResult } from '../types.js'; /** * Build Fluid Topics search filters from search params. * * - product → `zoominmetadata` filter using searchLabel * - docType → `jamf:contentType` filter using DOC_TYPE_CONTENT_TYPE_MAP * - version → `version` filter (only when a specific version is requested) * * NOTE: we intentionally do NOT add `latestVersion=yes` when no version is given. * Jamf migrated all non-Pro products (School, Connect, Protect, Now, …) to an * unversioned documentation model with no `latestVersion` metadata, so that filter * silently dropped every non-Pro product from results (and returned zero results * for product-filtered non-Pro searches). Jamf Pro's many version snapshots are * instead collapsed client-side via {@link dedupeToLatestVersions}. */ export declare function buildSearchFilters(params: Pick): FtSearchFilter[]; /** * Collapse Fluid Topics version snapshots to a single result per topic. * * Jamf Pro documentation publishes a separate search entry for every product * version (11.13 … 11.29), all sharing the same `ft:clusterId`. We keep only the * highest-versioned entry per cluster so the user sees one (latest) result per * topic. Non-versioned products (Jamf School, Connect, Protect, …) carry a single * entry per topic and a distinct `ft:clusterId`, so they pass through untouched. * Entries with no `ft:clusterId` cannot be version-deduped and are each kept. * * First-seen (relevance) order is preserved. */ export declare function dedupeToLatestVersions(clusters: FtSearchCluster[]): FtSearchEntry[]; /** * Transform a Fluid Topics search entry into an enriched SearchResult. */ export declare function transformFtSearchResult(entry: FtSearchEntry): SearchResult; /** * Search Jamf documentation using the Fluid Topics clustered-search API. * * 1. Checks SearchProvider first (custom backend injection). * 2. Calls ft-client.search() with constructed filters. * 3. Transforms results and applies post-processing pipeline: * - Client-side topic/docType filtering with progressive relaxation * - Pagination * - Token truncation */ export declare function searchDocumentation(ctx: ServerContext, params: SearchParams): Promise; //# sourceMappingURL=search-service.d.ts.map