UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

64 lines 1.93 kB
/** * ViewAwareFieldResolver - Extends FieldLocalityResolver to support view-based queries * * This resolver adds view awareness to the existing field resolution system, * allowing queries to be routed to views instead of complex JOINs when appropriate. */ import { FieldLocalityResolver } from './FieldLocalityResolver.js'; export interface ViewResolutionResult { useView: boolean; viewName?: string; columnName?: string; legacyResult?: any; } export declare class ViewAwareFieldResolver extends FieldLocalityResolver { private viewMappings; private viewPreference; constructor(); /** * Resolve field with view awareness */ resolveField(fieldName: string, context?: any): any; /** * Determine if a field should be resolved through a view */ private resolveWithView; /** * Determine if view should be used based on performance characteristics */ private shouldUseViewForPerformance; /** * Get all fields available in a specific view */ getViewFields(viewName: string): string[]; /** * Check if a field exists in any view */ hasViewMapping(fieldName: string): boolean; /** * Get the view name for a field */ getViewName(fieldName: string): string | undefined; /** * Set view preference for routing */ setViewPreference(preference: 'always' | 'performance' | 'never'): void; /** * Get statistics about view coverage */ getViewCoverageStats(): { totalFields: number; viewMappedFields: number; preComputedFields: number; coveragePercent: number; }; /** * Enhanced field information with view details */ getFieldInfo(fieldName: string): any; /** * Get all fields from the parent FieldLocalityResolver */ private getAllFieldNames; } //# sourceMappingURL=ViewAwareFieldResolver.d.ts.map