Skip to content

Adds command 'spe container recyclebinitem list'#6691

Closed
milanholemans wants to merge 1 commit intopnp:mainfrom
milanholemans:spe-container-recycle-list
Closed

Adds command 'spe container recyclebinitem list'#6691
milanholemans wants to merge 1 commit intopnp:mainfrom
milanholemans:spe-container-recycle-list

Conversation

@milanholemans
Copy link
Copy Markdown
Contributor

@milanholemans milanholemans commented Apr 18, 2025

Closes #6156


Additionally, I've created an spe util to centralize shared code. I've also updated all existing commands that could benefit from this util.

@milanholemans milanholemans requested a review from Copilot April 18, 2025 09:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the way container type information is retrieved and processed by replacing functions in the spo module with improved versions in the spe module while adding a new command that lists deleted containers (recycle bin items) for a given container type.

  • Removed the legacy getAllContainerTypes implementation from the spo module and updated tests accordingly.
  • Introduced new spe module functions (getAllContainerTypes and getContainerTypeIdByName) and updated related containertype commands and tests.
  • Added a new command (container recyclebinitem list) along with its corresponding tests and documentation sidebar updates.

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/spo.ts Removed ContainerTypeProperties interface and getAllContainerTypes, as functionality has moved to spe.ts.
src/utils/spo.spec.ts Removed tests for getAllContainerTypes, maintaining focus on the new implementation.
src/utils/spe.ts Added new functions to retrieve and process container type data, including GUID extraction.
src/utils/spe.spec.ts Added tests to validate the new spe module functions.
src/utils/formatting.ts / formatting.spec.ts Introduced and tested a helper function to extract GUIDs from CSOM-formatted strings.
src/m365/spe/commands/containertype/* Updated containertype list and get commands to use the new spe module functions.
src/m365/spe/commands/container/* Added a new command for listing container recycle bin items and updated container list command to use spe.
src/m365/spe/commands.ts Registered the new container recyclebinitem list command.
docs/src/config/sidebars.ts Updated sidebar configuration to include documentation on the new command.
Files not reviewed (1)
  • docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx: Language not supported

Comment thread src/m365/spe/commands/container/container-recyclebinitem-list.ts
@milanholemans milanholemans force-pushed the spe-container-recycle-list branch from 0e2c0e6 to 4fbe863 Compare April 18, 2025 09:35
@martinlingstuyl martinlingstuyl self-assigned this May 22, 2025
Copy link
Copy Markdown
Contributor

@martinlingstuyl martinlingstuyl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Milan! I'll fix the one comment while merging

Comment thread src/m365/spe/commands/containertype/containertype-get.ts
@martinlingstuyl
Copy link
Copy Markdown
Contributor

Merged manually, thanks!! ⚡

@milanholemans milanholemans deleted the spe-container-recycle-list branch May 22, 2025 22:33
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.

New command: m365 spe container recyclebinitem list

3 participants