@simonecoelhosfo/optimizely-mcp-server
Version:
Optimizely MCP Server for AI assistants with integrated CLI tools
40 lines • 1.55 kB
TypeScript
/**
* EntityMatcher - Utility for matching entities across different types
*
* This utility provides intelligent matching logic for different Optimizely entity types,
* supporting the smart entity adoption feature that allows reusing existing entities
* instead of creating duplicates.
*/
import type { EntityType } from '../tools/EntityRouter.js';
export interface EntityMatchCriteria {
id?: string;
key?: string;
}
export interface MatchResult {
matched: boolean;
entity?: any;
matchType?: 'exact_id' | 'exact_key';
}
export declare class EntityMatcher {
/**
* Determines if an entity matches the given criteria (ID or key only)
* @param entityType - The type of entity being matched (not used anymore)
* @param entity - The entity to check
* @param criteria - The matching criteria
* @returns Match result with details
*/
static matchEntity(entityType: EntityType, entity: any, criteria: EntityMatchCriteria): MatchResult;
/**
* Exact match by ID or key only
*/
private static exactMatch;
/**
* Find first match from a list of entities (ID or key match only)
* @param entityType - Type of entities being matched (not used anymore)
* @param entities - List of entities to search through
* @param criteria - Matching criteria (ID or key)
* @returns First matching entity or null
*/
static findBestMatch(entityType: EntityType, entities: any[], criteria: EntityMatchCriteria): any | null;
}
//# sourceMappingURL=EntityMatcher.d.ts.map