/** * Metadata service for Jamf documentation * * Dynamically fetches product versions and topic categories from the * Fluid Topics MapsRegistry with fallback to static constants. */ import { type ProductId } from '../constants.js'; import type { ServerContext } from '../types/context.js'; export interface ProductMetadata { id: string; name: string; description: string; bundleId: string; latestVersion: string; availableVersions: string[]; labelKey: string; } export interface TopicMetadata { id: string; name: string; source: 'toc' | 'manual'; articleCount?: number; } export interface TocCategory { navId: string; title: string; articleCount: number; children: string[]; } /** * Get all products with their latest metadata. * Uses MapsRegistry to discover products and versions dynamically, * with fallback to static JAMF_PRODUCTS constants. */ export declare function getProductsMetadata(ctx: ServerContext): Promise; /** * Get the bundle ID for a specific product and version. * Returns the latest bundle ID if version is undefined or 'current'. * * The returned value is a legacy-compatible bundleId string * (e.g. 'jamf-pro-documentation-11.24.0') used for URL construction. */ export declare function getBundleIdForVersion(ctx: ServerContext, productId: ProductId, version?: string): Promise; /** * Get available versions for a product. * * Uses MapsRegistry.getVersions() to fetch versions for a single product * instead of loading the full product catalogue via getProductsMetadata(). * Falls back to the static JAMF_PRODUCTS constant on failure. */ export declare function getAvailableVersions(ctx: ServerContext, productId: ProductId): Promise; /** * Get all topics. Returns manual topics from JAMF_TOPICS constants. * The manual topics serve as the authoritative topic category list. */ export declare function getTopicsMetadata(ctx: ServerContext): Promise; /** * Check which products have documentation available via MapsRegistry. */ export declare function getProductAvailability(ctx: ServerContext): Promise>; /** * Get products data formatted for resource response */ export declare function getProductsResourceData(ctx: ServerContext): Promise<{ description: string; products: { id: string; name: string; description: string; latestVersion: string; availableVersions: string[]; bundleId: string; }[]; lastUpdated: string; usage: string; }>; /** * Get topics data formatted for resource response */ export declare function getTopicsResourceData(ctx: ServerContext): Promise<{ description: string; totalTopics: number; topics: { id: string; name: string; source: string; articleCount?: number; }[]; lastUpdated: string; usage: string; }>; //# sourceMappingURL=metadata.d.ts.map