全部產品
Search
文件中心

Drive and Photo Service:資源回收筒

更新時間:Dec 22, 2025

提供資源回收筒相關操作方法。

說明

請求參數中的 options: IPDSRequestConfig 基於 axios 的 request config 封裝,詳情請看:AxiosRequestConfig

clearRecycleBin 方法

清空資源回收筒。

const result = await client.clearRecycleBin(options)

參數說明

欄位

類型

必選

說明

options

IPDSRequestConfig

其它配置項

傳回值

欄位

類型

必選

說明

result

IListRes

返回結果

IListRes

欄位

類型

必選

說明

items

array

刪除的檔案清單,每一項包含三個欄位;

{

domain_id: string

drive_id: string

task_id: string

}

task_id 可用來查詢非同步任務進度

batchRestoreFiles 方法

資源回收筒檔案大量復原。

const result = await client.batchRestoreFiles(params, options)

參數說明

欄位

類型

必選

說明

params

IFileKey[]

要恢複的檔案清單,每一項可查看 IFileKey 類型

options

IPDSRequestConfig

其它配置項

返回

欄位

類型

必選

說明

result

object

返回結果

result

欄位

類型

必選

說明

successArr

IFileKey[]

成功的結果清單

errorArr

IFileKey[]

失敗的結果清單