apple-dev-mcp
Version:
Complete Apple development guidance: Human Interface Guidelines (design) + Technical Documentation for iOS, macOS, watchOS, tvOS, and visionOS
74 lines • 2.25 kB
TypeScript
/**
* Search Indexer Service
*
* Generates search indices and metadata for static HIG content
*/
import type { HIGSection } from '../../types.js';
import type { ContentQualityMetrics } from './content-processor.service.js';
export interface SearchIndexEntry {
id: string;
title: string;
platform: string;
category: string;
url: string;
filename: string;
keywords: string[];
snippet: string;
quality?: ContentQualityMetrics;
lastUpdated: string;
hasStructuredContent: boolean;
hasGuidelines: boolean;
hasExamples: boolean;
hasSpecifications: boolean;
conceptCount: number;
}
export interface CrossReference {
fromSection: string;
toSection: string;
relationshipType: 'related' | 'parent' | 'child' | 'see-also';
relevanceScore: number;
}
export interface GenerationInfo {
generatedAt: string;
totalSections: number;
successfulExtractions: number;
averageQuality: number;
platforms: string[];
categories: string[];
version: string;
}
export declare class SearchIndexerService {
private searchIndex;
private crossReferences;
/**
* Generate search index from processed sections
*/
generateSearchIndex(sections: HIGSection[], processedContent: Map<string, any>): SearchIndexEntry[];
/**
* Generate cross-references between sections
*/
generateCrossReferences(sections: HIGSection[], processedContent: Map<string, any>): CrossReference[];
/**
* Generate metadata about the content generation process
*/
generateMetadata(sections: HIGSection[], processedContent: Map<string, any>): GenerationInfo;
/**
* Search the index for matching entries
*/
search(query: string, filters?: {
platform?: string;
category?: string;
minQuality?: number;
}): SearchIndexEntry[];
private generateFilename;
private hasStructuredContent;
private hasGuidelines;
private hasExamples;
private hasSpecifications;
private countConcepts;
private calculateRelevanceScore;
private addPlatformRelationships;
private addCategoryRelationships;
private areTopicallySimilar;
}
//# sourceMappingURL=search-indexer.service.d.ts.map