/** * Library Service * High-level API for installing components to KiCad libraries */ import type { LibraryCategory } from '../converter/category-router.js'; export interface InstallOptions { projectPath?: string; include3d?: boolean; force?: boolean; } export interface InstallResult { success: boolean; id: string; source: 'lcsc' | 'easyeda_community'; storageMode: 'global' | 'project-local'; category?: string; symbolName: string; symbolRef: string; footprintRef: string; footprintType: 'reference' | 'generated'; datasheet?: string; files: { symbolLibrary: string; footprint?: string; model3d?: string; }; symbolAction: 'created' | 'appended' | 'exists' | 'replaced'; validationData: ValidationData; } export interface ValidationData { component: { name: string; description?: string; package?: string; manufacturer?: string; datasheet_url?: string; }; symbol: { pin_count: number; pins: Array<{ number: string; name: string; electrical_type?: string; }>; }; footprint: { type: string; pad_count: number; pads?: Array<{ number: string; shape: string; }> | null; is_kicad_standard: boolean; kicad_ref: string; }; checks: { pin_pad_count_match: boolean; has_power_pins: boolean; has_ground_pins: boolean; }; } export interface InstalledComponent { lcscId: string; name: string; category: LibraryCategory; symbolRef: string; footprintRef: string; library: string; has3dModel: boolean; } export interface LibraryStatus { installed: boolean; linked: boolean; version: string; componentCount: number; paths: { symbolsDir: string; footprintsDir: string; models3dDir: string; symLibTable: string; fpLibTable: string; }; } export interface ListOptions { category?: LibraryCategory; projectPath?: string; } export interface UpdateOptions { category?: LibraryCategory; projectPath?: string; dryRun?: boolean; } export interface UpdateResult { updated: number; failed: number; skipped: number; components: Array<{ id: string; status: 'updated' | 'failed' | 'skipped'; error?: string; }>; } export interface RegenerateOptions { projectPath?: string; include3d?: boolean; onProgress?: (current: number, total: number, component: InstalledComponent, status: 'start' | 'success' | 'error', error?: string) => void; } export interface RegenerateResult { total: number; success: number; failed: number; components: Array<{ id: string; name: string; status: 'success' | 'failed'; error?: string; }>; } export interface RemoveOptions { projectPath?: string; } export interface RemoveResult { success: boolean; lcscId: string; symbolRemoved: boolean; footprintRemoved: boolean; model3dRemoved: boolean; } export interface LibraryService { install(id: string, options?: InstallOptions): Promise; listInstalled(options?: ListOptions): Promise; update(options?: UpdateOptions): Promise; regenerate(options?: RegenerateOptions): Promise; remove(lcscId: string, options?: RemoveOptions): Promise; ensureGlobalTables(): Promise; getStatus(): Promise; isEasyEDAInstalled(componentName: string): Promise; } export declare function createLibraryService(): LibraryService; //# sourceMappingURL=library-service.d.ts.map