/// import { Part } from '@li-mesh/bos'; import { Credential } from "../constant/common.model"; export declare class BosService { /** * 直接上传文件到bos * @param credential 身份标识 * @param fileKey 存储在bos的fileKey * @param filePath 本地文件路径 */ directUpload(credential: Credential, fileKey: string, filePath: string): Promise; /** * 分片上传文件到bos * @param credential 身份标识 * @param fileKey 存储在bos的fileKey * @param filePath 本地文件路径 */ shardUpload(credential: Credential, fileKey: string, filePath: string): Promise; /** * 直接从bos下载文件 * @param credential 身份标识 * @param fileKey 存储在bos的fileKey * @param filePath 下载到本地的文件路径 */ directDownload(credential: Credential, fileKey: string, filePath: string): Promise; /** * 根据身份标识获取bos客户端 * @param credential 身份标识 */ getBosClient(credential: Credential): { listBuckets: () => Promise; listMultipartUploads: (bucketName: string, params?: import("@li-mesh/bos").ListMultipartUploadsParams | undefined) => Promise; abortMultipartUpload: (bucketName: string, key: string, uploadId: string) => Promise>; listParts: (bucketName: string, key: string, uploadId: string, params?: import("@li-mesh/bos").ListPartsParams | undefined) => Promise; initiateMultipartUpload: (bucketName: string, key: string) => Promise; uploadPartFromFile: (bucketName: string, key: string, uploadId: string, partNumber: number, partSize: number, fileName: string, offset: number) => Promise; completeMultipartUpload: (bucketName: string, key: string, uploadId: string, partList: Part[]) => Promise; putObjectFromFile: (bucketName: string, key: string, fileName: string) => Promise; putObjectFromString: (bucketName: string, key: string, value: string, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | undefined) => Promise; putObjectFromBuffer: (bucketName: string, key: string, buf: Buffer) => Promise; createBucket: (bucketName: string) => Promise>; putBucket: (bucketName: string) => Promise>; deleteBucket: (bucketName: string) => Promise; listObjects: (bucketName: string, params?: import("@li-mesh/bos").ListBaseParams | undefined) => Promise; deleteObject: (bucketName: string, key: string) => Promise>; getObjectMeta: (bucketName: string, key: string) => Promise; getBucketLocation: (bucketName: string) => Promise; deleteMultipleObjects: (bucketName: string, objects: string[]) => Promise; bucketExists: (bucketName: string) => Promise; getObject: (bucketName: string, key: string, range?: import("@li-mesh/bos").Range | undefined) => Promise<{ meta: import("@li-mesh/bos").GetObjectMetaResponse; data: Buffer; }>; getObjectToStream: (bucketName: string, key: string, outStream: import("stream").Writable, range?: import("@li-mesh/bos").Range | undefined) => Promise; getObjectToFile: (bucketName: string, key: string, filename: string, range?: import("@li-mesh/bos").Range | undefined) => Promise; }; }