refactor: migrate groups.delete to new architecture
Closed
CE
10d ago+84+84+01234567890123456789-29-29-01234567890123456789
Description
Migrates the legacy groups.delete endpoint to the new REST API architecture using inline AJV validation.
Key Changes:
- Replaced manual parameter validation with inline AJV schema.
- Implemented
oneOflogic to strictly handleroomIdORroomNamemutually exclusively (matching legacy behavior exactly). - Removed the redundant
GroupsDeletePropsinterface and updated index exports to reduce double-bookkeeping. - Appended
ExtractRoutesFromAPIto register the endpoint globally in@rocket.chat/rest-typings. - Generated changeset.
Testing Performed
- Verified locally using
TEST_MODE=true. yarn testapi -g 'groups.delete'passes completely (5/5 tests).- Targeted
eslint --fixpasses with 0 errors on modified files. - Verified correct schema in swagger.
Summary by CodeRabbit
-
New Features
- Added a new API endpoint to delete private groups by ID or name.
-
Bug Fixes
- Improved input validation and error responses for the group deletion flow.
-
Refactor
- Migrated groups management to the new REST API architecture for greater consistency.