/// /// import EventEmitter from 'events'; import type { Exporter, AuxiliaryData } from './index.js'; import type { SourceArtboard } from '../../../entities/source/source-artboard.js'; import type { SourceDesign } from '../../../entities/source/source-design.js'; import type { ArtboardConversionResult, DesignConversionResult } from '../design-converter/index.js'; type TempExporterOptions = { /** * Unique ID of the exported design. If not provided, will be generated by UUIDv4. * Exporter outputs will be generated into `tempDir/id` folder. */ id?: string; /** Path to directory, where designs outputs should be exported. */ tempDir: string; }; /** * Exporter created to be used in manual runs. */ export declare class TempExporter extends EventEmitter implements Exporter { private _outputDir; private _tempDir; private _completed; private _assetsSaves; static IMAGES_DIR_NAME: string; static OCTOPUS_MANIFEST_NAME: string; static METADATA_NAME: string; static ADDITIONAL_TEXT_DATA: string; /** * Exports octopus assets into given `tempDir`. * @constructor * @param {TempExporterOptions} [options] */ constructor(options: TempExporterOptions); private _stringify; private _initOutputDir; private _save; getBasePath(): Promise; /** * Exports metadata and additional text data * @param {SourceDesign} instance of SourceDesign is container for preprocessed input data, such as artboards, * metadata, images, etc. * @returns {Promise} metadata and additional text data */ exportAuxiliaryData(design: SourceDesign): Promise; completed(): Promise; /** * Exports given Octopus Artboard * @param {ArtboardConversionResult} artboard contains converted OctopuosArtboard or Error if conversion failed * @returns {Promise} path to the exported OctopusArtboard */ exportArtboard(source: SourceArtboard, artboard: ArtboardConversionResult): Promise; /** * Exports given Image into folder specified in `TempExporter.IMAGES_DIR_NAME` * @param {string} name Name of the exported Image * @param {Buffer} data Data representation of given image * @returns {Promise} which designates path to the exported Image */ exportImage(name: string, data: Buffer): Promise; finalizeExport(): void; /** * Exports given converted OctopusManifest. * @param {DesignConversionResult} result contains converted OctopusManifest + conversion Time * @returns {Promise} path to the OctopusManifest */ exportManifest(designConversionResult: DesignConversionResult): Promise; } export {};