/// <reference types="node" />
import { Stream } from 'stream';
/**
 * OSS 对象存储服务(Object Storage Service)
 */
export declare abstract class OssService {
    abstract put(data: string | Buffer | Stream, name: string): Promise<string>;
}
/**
 * 上传base64到`OSS`服务器
 *
 * ```
 * import { downloadFile2Base64, putBase64File, uuid } from "refs/nslib";
 *
 * let base64 = await downloadFile2Base64('https://image-cn.keytop.cn/452/172.19.2.6/2022/08/25/20220825143509132_172.19.2.6_024231.jpg');
 * let url = await putBase64File(base64, `${uuid()}.jpg`);
 * ```
 * @param data base64字符串
 * @param name 对象名
 * @return 对象访问地址
 * @throw {@link Error}
 */
export declare function putBase64File(data: string, name: string): Promise<string>;
/**
 * 上传对象到`OSS`服务
 *
 * ```
 * import { downloadFileStream, putFile, uuid } from "refs/nslib";
 *
 * let stream = await downloadFileStream('https://image-cn.keytop.cn/452/172.19.2.6/2022/08/25/20220825143509132_172.19.2.6_024231.jpg');
 * let url = await putFile(stream, `${uuid()}.jpg`);
 * ```
 * @param name 对象名
 * @return 对象地址
 */
export declare function putFile(data: string | Buffer | Stream, name: string): Promise<string>;
