import * as S from 'ufc-schema'; import { RunOptions } from '../../env'; export interface FileProcessReq { type: 'compress/decompressZlibBin' | 'model/convert' | 'model/fixAndReadStlAttribute' | 'model/readStlAttribute' | 'model/thumbnailStl'; params?: Record; persist?: boolean; pass?: boolean; persistStoreId?: S.Id; uploadCredentials?: { url: string; method: string; }; } export interface FileProcessResult> { resultFileId: S.Id; info: T; exception: string; } export declare function doFileProcess(fileId: S.Id, req: FileProcessReq[], { useAsync, HOST }: RunOptions): Promise; /** 获取某个 STL 文件的缩略图信息 */ export declare function getStlThumbnail(inputFileId: S.Id, runOptions?: RunOptions): Promise<{ url: string; fileId: S.Id; }>; /** 处理 STL 模型,注意,这里的 STL 模型默认它是 */ export declare function processStlModel({ fileId, }: { fileId: S.Id; }, { isCompressed, useAsync, }?: { isCompressed?: boolean; useAsync?: boolean; }): Promise<{ admeshProcess: S.AdMeshProcess; attr: S.D3FormatAttr; }>; /** * 对文件进行解压缩 * @param param0 * @param param1 */ export declare function decompressFile({ fileId, }: { fileId: S.Id; }, runOptions?: RunOptions): Promise<"string">; /** * 3D 模型处理【3dmodel】 * assimp 文件转换【assimpExport】 * @param fileId 待转换的文件id * @format format 目标格式,默认为 stl */ export declare function assimpExport({ fileId, srcFormat, dstFormat, }: { fileId: S.Id; srcFormat: string; dstFormat: string; }, runOptions?: RunOptions): Promise; interface processModelOptions { isZipped?: boolean; externalAttrs?: Record; size?: number; onProgress?: (status: 'uplaoding' | 'start-processing') => void; } /** 综合处理某个模型 */ export declare function processModel(fileStore: S.FileStore, fileName: string, storeKey: string, inputOptions: processModelOptions, runOptions?: RunOptions): Promise; export {};