import { IUpdateTag, Tag, TagGroup } from 'contensis-management-api'; import { MigrateStatus } from '../models'; import ContensisRepository from '../repositories/ContensisRepository'; /** * Build a complete tag specifically for the target repository, providing * context of source and target repositories we can validate any field in the * given source tag for any required dependencies * * Output the tag as JSON for loading into the Management API using the `toJSON` method */ export declare class TagBuilder { contensis: ContensisRepository; origin: ContensisRepository; tagGroup?: TagGroup; finalValue?: IUpdateTag; existing?: Tag; source: Tag; status: MigrateStatus; error?: MappedError; diff?: string; private overrideId?; /** Indicates the group does not exist but will be created as part of this migration */ get builtGroup(): TagGroup | undefined; /** Tags supplied in the payload do not require an id * so we can generate a deterministic one for previews * and repeating migrations */ get generateId(): string; get id(): string; set id(val: string); get languages(): string[]; get originalId(): string; constructor(contensis: ContensisRepository, origin: ContensisRepository, source: Tag); init: () => void; /** * @returns tag as JSON */ toJSON: (opts?: {}) => IUpdateTag; /** * Check we have the tag group and languages available to process this tag */ validate: () => void; /** * Build the tag for the target taking the values from the source tag * Iterate all validated languages when building the localised label */ build: () => void; /** * Check the tag for update status */ checkStatus: () => MigrateStatus; /** * Set Contensis controlled fields to null before doing a diff as these will always be different */ nullFields: (tag: IUpdateTag) => Tag & { id: null; }; }