import ImportRecord from './ImportRecord'; import { ImportField } from './MainElement'; export type MapperContext = { fields: { [key: string]: ImportField; }; headers: string[]; records: ImportRecord[]; meta: { importok: { fileSize: number; fileName: string; fileType: string; withHeader: boolean; }; [key: string]: any; }; }; export type MapperStrategy = (fields: string[], headers: string[], records: ImportRecord[], hasNumericHeaders: boolean) => Promise<{ [key: string]: string | null; }>; export type MapperStrategyWithContext = (context: MapperContext) => Promise<{ [key: string]: string | null; }>; /** * Goes through each field in the source array and maps it to the corresponding field in the target array. * * It uses lavenshtein distance to find the closest match. * * Note: This legacy mapper does not support field aliases. Use the context-based version for alias support. */ export declare const LevenshteinMappingStrategy: MapperStrategy; /** * AI-powered mapping strategy that connects to the APP to retrieve field mappings dynamically. * * This strategy sends a POST request to the APP_URL/api/fields-matching endpoint with the fields * and headers, then receives a mapping response from the AI service. */ export declare const AiMappingStrategy: MapperStrategy; /** * Context-based version of LevenshteinMappingStrategy. * Uses Levenshtein distance to find the closest match between fields and headers. * Supports field aliases for improved matching accuracy. */ export declare const LevenshteinMappingStrategyWithContext: MapperStrategyWithContext; /** * Context-based version of AiMappingStrategy. * AI-powered mapping that connects to the APP to retrieve field mappings dynamically. * Supports field aliases for improved AI matching accuracy. */ export declare const AiMappingStrategyWithContext: MapperStrategyWithContext; /** * Factory function that returns the appropriate mapping strategy based on configuration. * * Returns AiMappingStrategy if license is provided, otherwise returns LevenshteinMappingStrategy. */ export declare function createMappingStrategy(license?: string): MapperStrategy; /** * Factory function that returns the appropriate context-based mapping strategy. * Context-based strategies support aliases and other enhanced features. * * Returns AiMappingStrategyWithContext if license is provided, otherwise returns LevenshteinMappingStrategyWithContext. */ export declare function createMappingStrategyWithContext(license?: string): MapperStrategyWithContext;