chore(api): migrate all teams endpoints #39824
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe teams API routes were refactored from legacy Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Suggested labels
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## chore/apis #39824 +/- ##
==============================================
- Coverage 70.58% 70.58% -0.01%
==============================================
Files 3256 3256
Lines 115778 115791 +13
Branches 21047 21039 -8
==============================================
+ Hits 81723 81731 +8
- Misses 31994 31996 +2
- Partials 2061 2064 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
1d16799 to
a54b30b
Compare
…onse schemas Migrates all 19 teams.* endpoints from addRoute to typed .get()/.post() pattern with AJV response validation schemas. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
a54b30b to
5274de8
Compare
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/meteor/app/api/server/v1/teams.ts">
<violation number="1" location="apps/meteor/app/api/server/v1/teams.ts:912">
P2: `TeamsEndpoints` is extracted from a partial route chain, so most migrated teams routes are omitted from the `Endpoints` type augmentation.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| }, | ||
| ); | ||
|
|
||
| export type TeamsEndpoints = ExtractRoutesFromAPI<typeof teamsEndpoints>; |
There was a problem hiding this comment.
P2: TeamsEndpoints is extracted from a partial route chain, so most migrated teams routes are omitted from the Endpoints type augmentation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/meteor/app/api/server/v1/teams.ts, line 912:
<comment>`TeamsEndpoints` is extracted from a partial route chain, so most migrated teams routes are omitted from the `Endpoints` type augmentation.</comment>
<file context>
@@ -386,322 +501,417 @@ const getTeamByIdOrNameOrParentRoom = async (
},
);
+
+export type TeamsEndpoints = ExtractRoutesFromAPI<typeof teamsEndpoints>;
+
+declare module '@rocket.chat/rest-typings' {
</file context>
…ge parameter
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit