assets.folders.delete
Puck Assets is in early access. Request access.
Delete a folder and all its assets by id.
await puck.assets.folders.delete("folder_123");Returns an object.
Args
| Param | Example | Type | Status |
|---|---|---|---|
id | "folder_123" | String | Required |
options | { auth: {} } | Object | - |
id
The folder’s id.
options
Set the request options for this call.
Returns
Returns an object with the shape:
| Param | Example | Type |
|---|---|---|
id | id: "folder_123" | String |
deleted | deleted: true | true |
deletedAssetIds | deletedAssetIds: ["asset_123"] | String[] |
id
The deleted folder’s id.
deleted
Always true.
deletedAssetIds
The ids of the assets that were deleted with the folder.