Skip to content

feat(graph): recycle bin as drive special folder - #3482

Draft
dschmidt wants to merge 5 commits into
mainfrom
feat/graph-drive-special-recyclebin
Draft

feat(graph): recycle bin as drive special folder#3482
dschmidt wants to merge 5 commits into
mainfrom
feat/graph-drive-special-recyclebin

Conversation

@dschmidt

@dschmidt dschmidt commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Server side of opencloud-eu/libre-graph-api#74: address a drive's trash as the special folder recyclebin.

Listing:

  • GET /v1.0/drives/{id}/special/recyclebin returns a synthetic folder driveItem, $expand=children embeds the trash listing
  • GET /v1.0/drives/{id}/special/recyclebin/children lists trashed items as driveItems with the trash facet (trashedDateTime) and a parentReference for the original location
  • the MS Graph colon forms special/recyclebin:/{key} and :/{key}:/children work through the existing path middleware without a lookup; the key travels in the context

Mutations:

  • POST .../items/{id}/restore (v1.0 and v1beta1 drives, me/drive), optional body {parentReference, name}, returns the restored driveItem
  • POST .../items/{id}/permanentDelete: reva has no delete that bypasses the trash, so this is Delete plus PurgeRecycle of the node id; refused for the space root and share jail items
  • DELETE .../special/recyclebin/items/{id} purges one trashed item, DELETE .../special/recyclebin empties the trash (the colon form purges only the addressed key)

Item ids of trashed items carry the recycle key as opaque id (storage$space!nodeid, nested storage$space!nodeid/rel/path). trashedBy stays unset, reva does not record who deleted. No entry in drive.special for now.

Depends on the spec PR; the vendored SDK is not regenerated, the restore body is a local struct.

@codacy-production

codacy-production Bot commented Sep 7, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 167 complexity

Metric Results
Complexity 167

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@dschmidt dschmidt changed the title graph: recycle bin as drive special folder (listing, restore, permanentDelete, purge) feat(graph): recycle bin as drive special folder Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant