Skip to content

refactor(groups): Migrated groups.invites to typed REST endpoint#39867

Draft
Harxhit wants to merge 2 commits intoRocketChat:developfrom
Harxhit:groups.invite
Draft

refactor(groups): Migrated groups.invites to typed REST endpoint#39867
Harxhit wants to merge 2 commits intoRocketChat:developfrom
Harxhit:groups.invite

Conversation

@Harxhit
Copy link
Copy Markdown

@Harxhit Harxhit commented Mar 25, 2026

Proposed changes

Refactors the groups.invite endpoint to use the typed REST API endpoint system used by other API routes.

The endpoint now includes:

  • Typed request validation using AJV
  • Typed response validation using AJV
  • TypeScript schema definitions for request and response
  • Support for multiple user input formats (userId, userIds, usernames)
  • Consistent error handling aligned with other endpoints
  • OpenAPI-compatible schema support

Issue(s)

N/A


Further comments

This migration aligns the groups.invite endpoint with the typed REST API route pattern used across the codebase.

The request schema was expanded to reflect the actual runtime behavior of the endpoint, which supports inviting users via multiple input formats (userId, userIds, or usernames).

No functional changes were introduced. Only structure, validation, and documentation improvements were made.

There were no available TestAPI cases for this endpoint, so no additional proof of testing has been attached.


Swagger UI Proof

Schema

schema

200

200cacacac

400

400

@Harxhit Harxhit requested review from a team as code owners March 25, 2026 19:03
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Mar 25, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 25, 2026

🦋 Changeset detected

Latest commit: ea12207

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/rest-typings Minor
@rocket.chat/meteor Minor
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/http-router Patch
@rocket.chat/models Patch
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/livechat Patch
@rocket.chat/mock-providers Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch Patch
@rocket.chat/ui-client Major
@rocket.chat/media-calls Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/ui-avatar Major
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@rocket.chat/core-typings Minor
@rocket.chat/apps Patch
@rocket.chat/model-typings Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Harxhit Harxhit marked this pull request as draft March 25, 2026 19:03
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 25, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 141b0ca2-e74f-47ec-b2c7-7bdb0deef209

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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 5 files

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/groups.ts">

<violation number="1" location="apps/meteor/app/api/server/v1/groups.ts:58">
P2: AJV schema for groups.invite omits legacy username/user fields that getUserListFromParams still accepts, so existing clients sending those fields will now fail validation.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

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.

1 participant