feat(graph): recycle bin as drive special folder - #3482
Draft
dschmidt wants to merge 5 commits into
Draft
Conversation
…ge the recycle bin tests
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 167 |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/recyclebinreturns a synthetic folder driveItem,$expand=childrenembeds the trash listingGET /v1.0/drives/{id}/special/recyclebin/childrenlists trashed items as driveItems with thetrashfacet (trashedDateTime) and aparentReferencefor the original locationspecial/recyclebin:/{key}and:/{key}:/childrenwork through the existing path middleware without a lookup; the key travels in the contextMutations:
POST .../items/{id}/restore(v1.0 and v1beta1 drives, me/drive), optional body{parentReference, name}, returns the restored driveItemPOST .../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 itemsDELETE .../special/recyclebin/items/{id}purges one trashed item,DELETE .../special/recyclebinempties 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, nestedstorage$space!nodeid/rel/path).trashedBystays unset, reva does not record who deleted. No entry indrive.specialfor now.Depends on the spec PR; the vendored SDK is not regenerated, the restore body is a local struct.