/** * 初始化客户端 * @param options * securityToken 临时 token * accessKey ak * secretKey sk * endPoint 华为云地址 */ export declare function initWithSecurityToken(options: { securityToken: string; accessKey: string; secretKey: string; endPoint: string; }): void; /** * 上传 obs * @param options * bucketName 桶名 * objectName 对象名 * fileName 文件名(用于存储地址,建议唯一) * localFile 文件地址 * checkpoint 是否断点续传 * @returns Promise<{fileId: string, fileUrl: string}> obs 文件地址 */ export declare const upload: (options: { bucketName: string; localFile: string; }) => Promise<{ fileUrl: string; }>; export declare enum ReactNativeHWObsEvent { 'uploadProgress' = "uploadProgress", 'downloadProgress' = "downloadProgress" } /** * 上传进度监听 * @param event 事件名 uploadProgress | downloadProgress * @param callback */ export declare function addEventListener(event: ReactNativeHWObsEvent, callback: (params: { currentSize: string; totalSize: string; }) => void): void; /** * 移除事件监听 * @param event 事件名 uploadProgress | downloadProgress */ export declare function removeEventListener(event: ReactNativeHWObsEvent): void;