import { Entry } from 'contensis-management-api'; import { EntryBuilder } from './EntryBuilder'; import { DownloadStatus, MigrateStatus } from '../models'; import ContensisRepository from '../repositories/ContensisRepository'; /** * Build a complete entry specifically for the target repository, providing * context of source and target repositories we can check each field in the * given source entry for any dependencies and set a two-pass loading status * if any dependencies do not exist * * Output the entry as JSON for loading into the Management API using the `toJSON` method */ export declare class AssetEntryBuilder extends EntryBuilder { assetLocalPath: string; assetUri: string; downloadUri: string; localAssetsFolder: string; /** The CMS file name and path where the asset will be uploaded to */ get filePath(): string | undefined; /** Download the asset from the CMS Image API if a source repo is available - CHALKY-1666 */ get imageApiUri(): string | undefined; /** Assert if the entry we are building is an image */ get isImage(): boolean; constructor(contensis: ContensisRepository, source: ContensisRepository, sourceEntry: Entry); /** * Build and return a copy of the asset entry as JSON */ toJSON: () => Entry; /** * Build a copy of the source entry for the current repository * and check against any existing entry to set a migrate status */ build: () => void; /** * Check the asset entry for update status */ checkStatus: () => MigrateStatus; /** * Download an asset from a given url to a given localPath */ downloadAssetContent: (url?: string, localPath?: string) => Promise<[MappedError | undefined, DownloadStatus]>; }