UNPKG

bc-symbols-mcp

Version:

MCP server for analyzing Business Central .app files and BC object structures

107 lines 2.63 kB
import { BCApp } from '../types/bc-types.js'; interface ObjectIndexEntry { appId: string; objectType: string; objectId: number; objectName: string; namespace: string; filePath: string; lastModified: number; properties: { [key: string]: string; }; dependencies: string[]; keywords: string[]; } interface SearchFilter { appIds?: string[]; objectTypes?: string[]; objectNames?: string[]; objectIds?: number[]; namespaces?: string[]; keywords?: string[]; properties?: { [key: string]: string; }; minId?: number; maxId?: number; } interface IndexStats { totalObjects: number; objectsByType: { [type: string]: number; }; objectsByApp: { [appId: string]: number; }; memoryUsage: number; indexingTime: number; lastUpdated: number; } export declare class ObjectIndex { private index; private typeIndex; private nameIndex; private appIndex; private keywordIndex; private dependencyIndex; private indexingStartTime; private indexingEndTime; /** * Index all objects from an app */ indexApp(app: BCApp, objectLoader: any): Promise<void>; /** * Index a single object */ private indexObject; /** * Search objects using filters */ search(filter: SearchFilter): ObjectIndexEntry[]; /** * Find objects that depend on a specific object */ findDependents(appId: string, objectType: string, objectName: string): ObjectIndexEntry[]; /** * Find objects by partial name match */ findByPartialName(partialName: string): ObjectIndexEntry[]; /** * Get object by exact match */ getObject(appId: string, objectType: string, objectId: number, objectName: string): ObjectIndexEntry | null; /** * Get all objects of a specific type */ getObjectsByType(objectType: string): ObjectIndexEntry[]; /** * Get all objects from a specific app */ getObjectsByApp(appId: string): ObjectIndexEntry[]; /** * Get index statistics */ getStats(): IndexStats; /** * Remove objects from an app */ removeApp(appId: string): void; /** * Clear all indexes */ clear(): void; /** * Helper methods */ private createObjectKey; private addToIndex; private removeFromIndex; private intersectSets; private extractKeywords; private extractProperties; private extractDependencies; private calculateMemoryUsage; } export {}; //# sourceMappingURL=object-index.d.ts.map