Skip to content

Commit

Permalink
feat: empty trash
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwynr committed May 5, 2024
1 parent 94a030a commit 59c70b4
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 3 deletions.
10 changes: 10 additions & 0 deletions dist/browser/cloud/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/browser/cloud/index.js.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions dist/node/cloud/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/node/cloud/index.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dist/types/cloud/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1085,5 +1085,13 @@ export declare class Cloud {
onUploaded?: (item: CloudItem) => Promise<void>;
onDirectoryCreated?: (item: CloudItem) => void;
}): Promise<void>;
/**
* Empty the trash.
*
* @public
* @async
* @returns {Promise<void>}
*/
emptyTrash(): Promise<void>;
}
export default Cloud;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@filen/sdk",
"version": "0.1.65",
"version": "0.1.66",
"description": "Filen SDK",
"main": "dist/node/index.js",
"browser": "dist/browser/index.js",
Expand Down
11 changes: 11 additions & 0 deletions src/cloud/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3992,6 +3992,17 @@ export class Cloud {
this._semaphores.directoryUploads.release()
}
}

/**
* Empty the trash.
*
* @public
* @async
* @returns {Promise<void>}
*/
public async emptyTrash(): Promise<void> {
return await this.api.v3().trash().empty()
}
}

export default Cloud

0 comments on commit 59c70b4

Please sign in to comment.