import EntriesMigrationService from './EntriesMigrationService'; import { CopyFieldResult, EntriesResult, MigrateRequest } from '../models/Operations'; import ContentTypeHelper from '../util/content-type/ContentTypeHelper'; declare class CopyFieldService extends EntriesMigrationService { contentTypeHelper: ContentTypeHelper; contentTypeId: string; fieldId: string; destinationId: string; template?: string; rootUri?: string; fields: { source?: ReturnType; target?: ReturnType; }; transformType: 'none' | 'direct' | 'array' | 'flatten' | 'canvas' | 'integer' | 'decimal' | 'boolean' | 'truthy' | 'error'; private htmlCanvasParser; private renderComposer; private templateEngine; constructor(payload: MigrateRequest, preview: boolean); /** * Migrate the contents of one field within a given content type to another field * in the same content type */ MigrateFieldContent: () => Promise; /** * Resolve a content type fieldId in source and destinationId in target repository * Checking field configurations for compatibility and determining the type of * transformation we will apply on this combination of source and destination field */ ResolveCopyFields: () => Promise; /** * Add the new field value to the source entries, * applying transformations to the field value * and/or applying any provided template to modify the value * overwrites any existing data in destination field */ TransformEntries: () => Promise; /** * Transforms a given entry's field value according to the determined `transformType` * @param fieldValue the value from the source field (the original field value) * @returns the transformed field value */ TransformEntryFieldValue: (fieldValue: any) => Promise; /** * Apply a liquidjs tempate with a set of prepared variables */ ApplyTemplate: (templateVariables: { [key: string]: any; }) => Promise; /** * Add additional info regarding the copy operation to the entries migration result * @param entriesResult The result of the entries migration * @returns The result of the copy field operation */ MapCopyFieldResult: (entriesResult: EntriesResult) => CopyFieldResult; } export default CopyFieldService;