UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

73 lines 1.99 kB
/** * FieldMappingAutoGenerator - Automatically generates field mappings from view definitions * * This tool solves the critical challenge of maintaining 450+ field mappings by: * 1. Parsing view definitions to extract columns * 2. Tracing each column back to its source table/column * 3. Generating TypeScript field mapping definitions * 4. Supporting both legacy table paths and new view paths */ export declare class FieldMappingAutoGenerator { private dbPath; private db; private viewDefinitions; private generatedMappings; constructor(dbPath: string); /** * Main entry point - generates all field mappings */ generateComprehensiveMappings(): Promise<void>; /** * Parse SQL view definitions from files */ private parseAllViewDefinitions; /** * Parse a CREATE VIEW SQL statement */ private parseViewSQL; /** * Parse individual column expression */ private parseColumnExpression; /** * Extract source table and column from expression */ private extractSourceField; /** * Extract actual column information from database views */ private extractViewColumnsFromDB; /** * Load existing field mappings from FieldLocalityResolver */ private loadExistingMappings; /** * Generate new mappings for view columns */ private generateViewMappings; /** * Determine performance characteristics of a field */ private determinePerformance; /** * Infer data type from column information */ private inferDataType; /** * Generate human-readable description */ private generateDescription; /** * Merge with legacy mappings */ private mergeLegacyMappings; /** * Generate TypeScript code */ private generateTypeScriptCode; /** * Close database connection */ close(): void; } //# sourceMappingURL=FieldMappingAutoGenerator.d.ts.map