import { CubeMetadata } from '../types/metadata.js'; /** A measure or dimension as carried in cube metadata. */ type Field = CubeMetadata['measures'][number] | CubeMetadata['dimensions'][number]; /** Scoring callbacks shared with discovery.ts (avoids a circular import). */ export interface ScoreFns { fuzzyMatchScore: (query: string, target: string) => number; matchAgainstArray: (query: string, targets: string[]) => number; } /** * Score a single field (measure or dimension) against a keyword. * Returns the best score across name, title, description and synonyms. */ export declare function scoreField(keyword: string, field: Field, fns: ScoreFns): number; /** * Accumulate field scores for a keyword into a running totals map. * Adds to `totalScore` (returned) and records the per-field best score when the * field clears the relevance threshold, mutating `scores` and `matchedOn`. */ export declare function accumulateFieldScores(keyword: string, fields: Field[], fns: ScoreFns, scores: Map, matchedOn: { hit: boolean; }): number; /** Return the top-N field names from a score map, highest score first. */ export declare function topScoredFields(scores: Map, limit: number): string[]; /** * Score a single field as a best-match candidate (used by findBestFieldMatch). * Returns the best score across name, title and synonyms (no description match). */ export declare function scoreFieldForBestMatch(fieldName: string, field: Field, fns: ScoreFns): number; export {};