permanentDelete through SDK

Open
#1,932 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
api

Research direction

Start with the JavaScript SDK's support for the Microsoft Graph driveItem operations and compare the existing delete usage with the linked driveitem-permanentdelete API documentation. Confirm how the permanent-delete operation should be exposed through the SDK and verify that callers can invoke it for a OneDrive file.

Written by the indexing model from the issue text.

Description

status:waiting-for-triage type:feature
Is your feature request related to a problem? Please describe the problem.

We are using the SDK in a project where we regularly need to delete files that were temporarily uploaded to OneDrive.

To do this, we use the delete function as provided by the npm package (3.0.7):

async function deleteFile(file) {
  await client
    .api(`/sites/${SITE_ID}/drive/root:/${file.id}.${file.extension}`)
    .delete();
}

However, we now noticed that the deleted files end up in the recycle bin of the site, instead of being permanently deleted. This is confirmed by the MS Graph docs: https://learn.microsoft.com/en-us/graph/api/driveitem-delete

Describe the solution you'd like.

What we really need seems to be driveitem-permanentdelete.

I couldn't find a function in the package that supports this. Is there one? If no, it there a possibility to add it?

Thanks in advance!

Additional context?

No response

Dominant language
TypeScript
Stars
833
Forks
240
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoftgraph/msgraph-sdk-javascript

All issues in microsoftgraph/msgraph-sdk-javascript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.