import { ContentType, Editor, Field } from 'contensis-core-api'; import ContensisRepository from '../../repositories/ContensisRepository'; type EditorProperties = Required['properties']; /** * A series of static helper methods for transforming data within content types or components */ export declare class ContentTypeTransformations { /** * Replaces TransformLanguageCodes */ static RenameKeysAndValues: (obj: T, find: string, replace: string) => T; /** * Replaces TransformReadOnlyFields */ static SetFieldEditorProperty: (field: Field, property: T, value: EditorProperties[T]) => Field; static TransformLanguageCodes: (contentTypes: T, source: string, target: string) => T; static TransformReadOnlyFields: (fields?: Field[]) => { id: string; name: import("contensis-core-api").LocalisedString; description: import("contensis-core-api").LocalisedString; dataType: "string" | "boolean" | "object" | "dateTime" | "decimal" | "integer" | "stringArray" | "booleanArray" | "dateTimeArray" | "decimalArray" | "integerArray" | "objectArray"; dataFormat: import("contensis-core-api").FieldDataFormat; default: import("contensis-core-api").LocalisedValue; groupId: string; validations: import("contensis-core-api/lib/models/Validations").Validations; editor: Editor; readonly fields: Field[]; }[]; static CanvasNoRestrictions: () => Field["validations"]; static RemoveFieldValidations: (field: Field, contensis: ContensisRepository) => Field; /** Transform the returned content types to not show the full fields:[] inside composer fields * to match the behaviour in the Contensis 14 UI and to prevent changes in components causing * updates in content types that are not needed * * Filter classic webpage content types as these are not in the scope of this tool * Also filter asset dataFormat such as pdf and image because these often contain * dependent asset types that won't exist in a new project * e.g.: "The field with ID 'thumbnail' has an 'allowedContentTypes' validator with an invalid value 'Image', the content type does not exist in the project 'baseContentTypes'" */ static SeparateContentTypesAndFilterComponentFields: (contentTypes: ContentType[]) => { entryContentTypes: (ContentType & { dataFormat: "entry"; })[]; assetTypes: (ContentType & { dataFormat: "asset"; })[]; formContentTypes: never[]; webpageTypes: never[]; }; } export {};