-
Notifications
You must be signed in to change notification settings - Fork 53.3k
feat(Microsoft Outlook Node): Add permanentDelete option in delete operations
#23980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 7 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/nodes-base/nodes/Microsoft/Outlook/v2/helpers/utils.ts">
<violation number="1" location="packages/nodes-base/nodes/Microsoft/Outlook/v2/helpers/utils.ts:313">
P2: Rule violated: **Prefer Typeguards over Type casting**
Use a type annotation instead of `as` for type narrowing. The rule recommends preferring type annotations (`const x: A = y`) over casting (`const x = y as A`).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
packages/nodes-base/nodes/Microsoft/Outlook/v2/helpers/utils.ts
Outdated
Show resolved
Hide resolved
|
Hey @ByteEVM, Thank you for your contribution. We appreciate the time and effort you’ve taken to submit this pull request. Before we can proceed, please ensure the following: Regarding new nodes: If your node integrates with an AI service that you own or represent, please email [email protected] and we will be happy to discuss the best approach. About review timelines: Thank you again for contributing to n8n. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 8 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/nodes-base/nodes/Microsoft/Outlook/v2/helpers/delete.ts">
<violation number="1" location="packages/nodes-base/nodes/Microsoft/Outlook/v2/helpers/delete.ts:19">
P2: Rule violated: **Prefer Typeguards over Type casting**
Avoid using `as` for type narrowing. Per the rule, prefer type annotations or extract a type guard for the options parameter shape. Consider using a type annotation instead:
```typescript
interface DeleteOptions {
permanentDelete?: boolean;
}
const options = this.getNodeParameter('options', itemIndex, {}) as DeleteOptions;
Or better, if getNodeParameter generic allows, provide the type parameter directly.
</details>
<sub>Reply with feedback, questions, or to request a fix. Tag `@cubic-dev-ai` to re-run a review.</sub>
|
May @ShireenMissi review this? Thanks 😄 |
Summary
Since April 1st, 2025, Microsoft Graph supports skipping the Deleted Items folder by permanently deleting, which will move deleted items to the hidden
Purgesfolder within the user's mailbox.This behavior is the same as deleting with
Shift + Deletefrom Outlook web UI, to then delete fromDeleted Itemsa final time. Both API and web UI will move items toPurgesfolder, up to configured retention policies.A helper funcion i.e.,
executeDeletion, takes care of deciding whether the API request should use the HTTP methodDELETEorPOST, in response for "normal" deletions or permanent ones, respectively.See docs for message: permanentDelete in Microsoft Graph v1.0
Related Linear tickets, Github issues, and Community forum posts
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)