-
Notifications
You must be signed in to change notification settings - Fork 13k
feat: Room List Bridge #37719
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
Merged
Merged
feat: Room List Bridge #37719
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
b21607a
Introduce bridge to read rooms
Dnouv 8224b9c
Limit 100 rooms, use lightweight room converter
Dnouv 7f2531e
Add changeset
Dnouv ef18f11
Introduce discussion and team type
Dnouv 7ed4173
use roomraw type
Dnouv 7ff350d
Fix discussion filter
Dnouv f9589a7
Avoid repeated checks
Dnouv f847149
Remove duplicate imports
Dnouv 851fc46
Correct error message
Dnouv aa4c18c
Make the types consistent
Dnouv 0d421c0
Remove unused convertRoomWithoutLookups
Dnouv ea626e0
refactor: Copilot nitpick
d-gubert 81c52b4
Update .changeset/chatty-dingos-bathe.md
Dnouv 139d265
handle reviews \- Remove DISCUSSION and TEAM from RoomType (they’re n…
Dnouv 9471487
Introduce teamId and teamMain
Dnouv 26bd440
Add more fields, buildRoomQuery was refactored so filtering discussio…
Dnouv 448a726
Handle nit for doc update
Dnouv 0d81c52
optimize code
Dnouv 4687c38
Remove type casting
Dnouv d9eb3e1
remove cache field _USERNAMES
Dnouv 6606e7e
Fixed the type filter leak: when onlyDiscussions or onlyTeamMain is s…
Dnouv 5694531
Delete mapped fields
Dnouv 611cb98
fix: convertRoomRaw should not be async
d-gubert 4ad6ebd
Add projections following adminFields
Dnouv 3b89b28
Revert "fix: convertRoomRaw should not be async"
d-gubert 00b9449
test: Add comprehensive edge case validation tests for getAllRooms (#…
Copilot 59674fb
Handle v._id
Dnouv 500aa0a
Remove duplicate test and introduce new params tests
Dnouv 6322662
Delete u
Dnouv 60318fe
Merge branch 'develop' into new/ae/list_rooms
d-gubert 849757e
Add view all permissions
Dnouv 118f795
Use a dedicated rooms model method instead of using find directly;
Dnouv 74bbe9a
Merge branch 'develop' into new/ae/list_rooms
d-gubert 43a9612
refactor: make new method more similar to existing query
d-gubert f8614cc
refactor: apps API to better interact with model method
d-gubert f578f63
test: fix unit tests
d-gubert 491864e
Merge remote-tracking branch 'origin' into new/ae/list_rooms
d-gubert 6104365
Apply suggestion from @ggazzo
d-gubert 3ac453f
feat: add index to cover room teamMain field
d-gubert a52324a
refactor: simplify query in new method
d-gubert 3a6df16
feat: increase visitor entity parity
d-gubert a6f3877
fix: room raw types
d-gubert 832a1a5
fix: properly convert visitor property
d-gubert ab7112d
Apply suggestions from code review
d-gubert 40ea800
fix: room bridge fixture
d-gubert 1558452
Merge branch 'develop' into new/ae/list_rooms
d-gubert b6bac7f
change 'filter' parameter to 'filters'
Dnouv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@rocket.chat/apps-engine': minor | ||
| '@rocket.chat/apps': minor | ||
| '@rocket.chat/meteor': minor | ||
| --- | ||
|
|
||
| Adds a new method to the Apps-Engine that allows apps to retrieve multiple rooms from database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import type { IVisitor } from '../livechat'; | ||
| import type { IOmnichannelSource, IVisitorChannelInfo } from '../livechat/ILivechatRoom'; | ||
| import type { IUserLookup } from '../users'; | ||
| import type { RoomType } from './RoomType'; | ||
|
|
||
| /** | ||
| * A lightweight representation of a room without resolving relational data. | ||
| * This is intended for listing operations to avoid additional database lookups. | ||
| */ | ||
| export interface IRoomRaw { | ||
| id: string; | ||
| slugifiedName: string; | ||
| displayName?: string; | ||
| type: RoomType; | ||
| creator?: IUserLookup; | ||
| members?: Array<string>; | ||
| userIds?: Array<string>; | ||
| usernames?: Array<string>; | ||
| isDefault?: boolean; | ||
| isReadOnly?: boolean; | ||
| displaySystemMessages?: boolean; | ||
| messageCount?: number; | ||
| createdAt?: Date; | ||
| updatedAt?: Date; | ||
| closedAt?: Date; | ||
| lastModifiedAt?: Date; | ||
| description?: string; | ||
| customFields?: { [key: string]: any }; | ||
| parentRoomId?: string; | ||
| teamId?: string; | ||
| isTeamMain?: boolean; | ||
Dnouv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| livechatData?: { [key: string]: any }; | ||
| isWaitingResponse?: boolean; | ||
| isOpen?: boolean; | ||
| closer?: 'user' | 'visitor' | 'bot'; | ||
| closedBy?: IUserLookup; | ||
| servedBy?: IUserLookup; | ||
| responseBy?: IUserLookup; | ||
| source?: IOmnichannelSource; | ||
| visitor?: Pick<IVisitor, 'id' | 'token' | 'username' | 'name' | 'status' | 'activity'> & IVisitorChannelInfo; | ||
| departmentId?: string; | ||
| contactId?: string; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.