UNPKG

@agility/cli

Version:

Agility CLI for working with your content. (Public Beta)

48 lines (47 loc) 1.62 kB
/** * Link Type Detection Service * * Detects Agility CMS link types from model field configurations to enable * proper handling of different content linking patterns and eliminate false * broken chain reports from field configuration misinterpretation. */ export interface LinkTypeDetection { type: 'dropdown' | 'searchlistbox' | 'grid' | 'nested' | 'shared' | 'unknown'; strategy: string; requiresMapping: boolean; followDependencies: boolean; isFieldConfiguration?: boolean; } export interface ContentFieldAnalysis { fieldName: string; linkType: LinkTypeDetection; contentDefinition: string; actualContentReferences: string[]; fieldConfigurationStrings: string[]; } export declare class LinkTypeDetector { /** * Detect link type from a Content field's settings */ detectLinkType(field: any): LinkTypeDetection; /** * Analyze all Content fields in a model and extract real references vs field settings */ analyzeModelContentFields(model: any): ContentFieldAnalysis[]; /** * Check if a reference string is a field configuration (should be ignored) */ isFieldConfigurationString(referenceString: string, model: any): boolean; /** * Extract only real content references from a model (filter out field settings) */ extractRealContentReferences(model: any): Array<{ fieldName: string; contentDefinition: string; linkType: LinkTypeDetection; }>; /** * Get human-readable description of link type */ getLinkTypeDescription(linkType: LinkTypeDetection): string; }