/** * 获取腾讯云COS对象的元数据信息(不返回对象内容) * * @param secretId - 腾讯云API密钥ID * @param secretKey - 腾讯云API密钥Key * @param bucket - COS存储桶名称 * @param region - COS存储桶所在区域 * @param key - 对象键(Object Key),对象在存储桶中的唯一标识 * @returns Promise对象,成功时返回对象的元数据信息(如大小、修改时间等),失败时返回错误信息 * @throws 当参数不全时会抛出错误 * @example * ```typescript * getCosHeadObject({ * secretId: 'your-secret-id', * secretKey: 'your-secret-key', * bucket: 'test-bucket', * region: 'ap-beijing', * key: 'path/to/file.txt' * }) * .then(data => console.log(data)) * .catch(err => console.error(err)); * ``` */ export declare function getCosHeadObject({ secretId, secretKey, bucket, region, key, }: { secretId: string; secretKey: string; bucket: string; region: string; key: string; }): Promise; /** * 下载腾讯云COS对象内容 * * @param secretId - 腾讯云API密钥ID * @param secretKey - 腾讯云API密钥Key * @param bucket - COS存储桶名称 * @param region - COS存储桶所在区域 * @param key - 对象键(Object Key),对象在存储桶中的唯一标识 * @param output - 输出路径或输出流,可选参数。如果指定,对象内容将写入该路径或流 * @returns Promise对象,成功时返回对象内容数据,失败时返回错误信息 * @throws 当参数不全时会抛出错误 * @example * ```typescript * // 下载到内存 * downloadCosObject({ * secretId: 'your-secret-id', * secretKey: 'your-secret-key', * bucket: 'test-bucket', * region: 'ap-beijing', * key: 'path/to/file.txt' * }) * .then(data => console.log(data)) * .catch(err => console.error(err)); * * // 下载到文件 * downloadCosObject({ * secretId: 'your-secret-id', * secretKey: 'your-secret-key', * bucket: 'test-bucket', * region: 'ap-beijing', * key: 'path/to/file.txt', * output: './local/file.txt' * }) * .then(data => console.log('下载成功')) * .catch(err => console.error(err)); * ``` */ export declare function downloadCosObject({ secretId, secretKey, bucket, region, key, output, }: { secretId: string; secretKey: string; bucket: string; region: string; key: string; output?: string | any; }): Promise;