Skip to content
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

feat: Allow searching by email and phone number in the contacts.search endpoint #34107

Closed
wants to merge 7 commits into from

Conversation

matheusbsilva137
Copy link
Member

@matheusbsilva137 matheusbsilva137 commented Dec 4, 2024

Proposed changes (including videos or screenshots)

  • Added optional email and phone query params to the omnichannel/contacts.search endpoint, which allow applying an "exact match" search to these fields (in addition to the regex search that is currently applied when providing the searchTerm fields).

Issue(s)

Steps to test or reproduce

Example request (cURL):

curl --request GET \
  --url 'http://localhost:3000/api/v1/omnichannel/contacts.search?email=testee%40example.com' \
  --header 'X-Auth-Token: jVrwkAmobgfne3aEdL-dJh-znNXMkhg79pEAZS2rEIg' \
  --header 'X-User-Id: rMq9ovRmZabXHW4Do' \

In case searchTerm is also provided, the endpoint will only return contacts that match the provided email/phone and the search term (which is compared to the contact name, emails and phones using regex)

Further comments

SCI-147

@matheusbsilva137 matheusbsilva137 added this to the 7.2.0 milestone Dec 4, 2024
Copy link
Contributor

dionisio-bot bot commented Dec 4, 2024

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

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Dec 4, 2024

🦋 Changeset detected

Latest commit: 5476698

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

This PR includes changesets to release 35 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/model-typings Minor
@rocket.chat/rest-typings Minor
@rocket.chat/apps Patch
@rocket.chat/models Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/omnichannel-services Patch
rocketchat-services Patch
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/ui-contexts Major
@rocket.chat/presence Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/network-broker Patch
@rocket.chat/livechat Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@rocket.chat/web-ui-registration Major
@rocket.chat/core-typings Minor
@rocket.chat/freeswitch 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

Copy link
Contributor

github-actions bot commented Dec 4, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-34107/
on branch gh-pages at 2024-12-04 00:35 UTC

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.75%. Comparing base (d9de9fb) to head (7a4c23e).
Report is 37 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #34107   +/-   ##
========================================
  Coverage    75.75%   75.75%           
========================================
  Files          510      510           
  Lines        22078    22078           
  Branches      5387     5387           
========================================
  Hits         16726    16726           
  Misses        4706     4706           
  Partials       646      646           
Flag Coverage Δ
unit 75.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review December 4, 2024 12:43
@matheusbsilva137 matheusbsilva137 requested review from a team as code owners December 4, 2024 12:43
@matheusbsilva137 matheusbsilva137 marked this pull request as draft December 16, 2024 19:19
@matheusbsilva137
Copy link
Member Author

Closed in favor of #34194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants