UNPKG

@opendesign/octopus-worker-utilities

Version:

55 lines (54 loc) 2 kB
import 'source-map-support/register'; declare class ManagedUpload { promise(): Promise<any>; } declare class S3 { upload(params: Object, options?: Object, callback?: Function): ManagedUpload; } declare class Semaphore { use(func: Function): Promise<any>; } declare type SourceDesign = any; declare type FileReaderOptions = { path: string; storeAssetsOnFs?: boolean; }; declare class FileReader { constructor(options: FileReaderOptions); get path(): string; get sourceDesign(): Promise<SourceDesign>; cleanup(): Promise<void>; } declare type LocalExporterOptions = { path: string; }; declare class LocalExporter { constructor(options: LocalExporterOptions); completed(): Promise<void>; } declare type OctopusConverterOptions = { sourceDesign: SourceDesign; }; declare type ConvertDesignOptions = { exporter?: any; }; declare class OctopusConverter { constructor(options: OctopusConverterOptions); convertDesign(options?: ConvertDesignOptions): Promise<any>; } declare type OctopusConverterOptionsV2 = { logger?: any; }; declare type ConvertDesignOptionsV2 = { exporter?: any; sourceDesign: SourceDesign; }; declare class OctopusConverterV2 { constructor(options: OctopusConverterOptionsV2); convertDesign(options?: ConvertDesignOptionsV2): Promise<any>; } export declare const getRandomString: () => string; export declare const uploadFolderOutput: (s3: S3, semaphore: Semaphore, parserOutputDir: string, s3OutputPrefix: string, s3Bucket?: string) => Promise<void>; export declare const convertOctopus: (fileReaderClass: typeof FileReader, octopusConverterClass: typeof OctopusConverter, localExporterClass: typeof LocalExporter, inputFile: string, outputDir: string) => Promise<void>; export declare const convertOctopusV2: (fileReaderClass: typeof FileReader, octopusConverterClass: typeof OctopusConverterV2, localExporterClass: typeof LocalExporter, inputFile: string, outputDir: string) => Promise<void>; export {};