UNPKG

@agility/cli

Version:

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

70 lines (69 loc) 2.15 kB
import * as mgmtApi from '@agility/management-sdk'; /** * Content classification result */ export interface ContentClassification { normalContentItems: mgmtApi.ContentItem[]; linkedContentItems: mgmtApi.ContentItem[]; classificationDetails: { totalItems: number; normalCount: number; linkedCount: number; analysisTime: number; }; } /** * Content Classifier - separates content into normal vs linked based on legacy pattern * * Based on push_legacy.ts logic: * - Normal content: No Content fields with linked content references * - Linked content: Has Content fields with LinkeContentDropdownValueField, SortIDFieldName, contentid, etc. */ export declare class ContentClassifier { private modelAnalysisCache; private readonly CACHE_TTL; /** * Classify content items into normal vs linked categories */ classifyContent(contentItems: mgmtApi.ContentItem[], models: mgmtApi.Model[]): Promise<ContentClassification>; /** * Check if content item has linked content references based on model fields */ private hasLinkedContentReferences; /** * Get or create model field analysis with caching */ private getModelAnalysis; /** * Analyze model fields to identify Content fields and their settings */ private analyzeModelFields; /** * Check content item fields for actual linked content references */ private checkContentFieldsForLinkedReferences; /** * Check field value for linked content patterns from legacy logic */ private hasLinkedContentPatterns; /** * Check for direct content ID references in any field */ private hasDirectContentReferences; /** * Recursively scan object for content reference patterns */ private scanObjectForContentReferences; /** * Convert field name to camelCase (from legacy logic) */ private camelize; /** * Clear model analysis cache */ clearCache(): void; /** * Get classification statistics */ getClassificationStats(classification: ContentClassification): string; }