Skip to content

MT-22678: Add search param to contact lists getList#142

Open
Rabsztok wants to merge 2 commits into
mainfrom
MT-22678-nodejs-contact-list-search
Open

MT-22678: Add search param to contact lists getList#142
Rabsztok wants to merge 2 commits into
mainfrom
MT-22678-nodejs-contact-list-search

Conversation

@Rabsztok

@Rabsztok Rabsztok commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

https://railsware.atlassian.net/browse/MT-22678

Changes

  • Add an optional { search } option to contactLists.getList — filters contact lists by name (case-insensitive prefix match), per the OpenAPI GET /api/contacts/lists param. Sent only when provided, so the no-arg call is unchanged.

How to test

  • client.contactLists.getList() — returns all contact lists (unchanged behaviour).
  • client.contactLists.getList({ search: "news" }) — returns only lists whose name starts with "news" (case-insensitive).

Summary by CodeRabbit

  • New Features
    • Added contact list search by name using an optional search term.
    • Search supports case-insensitive prefix matching.
    • Updated the contact list example to demonstrate filtered results.
  • Documentation
    • Updated supported functionality documentation to include contact list search.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 584acf33-8a94-400f-a4b6-ab1a91763822

📥 Commits

Reviewing files that changed from the base of the PR and between acd1973 and 00139ff.

📒 Files selected for processing (6)
  • README.md
  • examples/contact-lists/everything.ts
  • src/__tests__/lib/api/ContactLists.test.ts
  • src/__tests__/lib/api/resources/ContactLists.test.ts
  • src/lib/api/resources/ContactLists.ts
  • src/types/api/contactlist.ts

📝 Walkthrough

Walkthrough

Adds optional case-insensitive prefix search by name to contact list retrieval, with API type support, request handling, tests, and updated usage documentation.

Changes

Contact list search

Layer / File(s) Summary
Search contract and API implementation
src/types/api/contactlist.ts, src/lib/api/resources/ContactLists.ts
Adds ContactListsListOptions.search and conditionally passes it as Axios query parameters in getList.
Search validation and example usage
src/__tests__/lib/api/ContactLists.test.ts, src/__tests__/lib/api/resources/ContactLists.test.ts, examples/contact-lists/everything.ts, README.md
Tests filtered retrieval and query propagation, then demonstrates and documents searching contact lists by name.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Example
  participant ContactListsApi
  participant ContactListsEndpoint
  Example->>ContactListsApi: getList({ search: "news" })
  ContactListsApi->>ContactListsEndpoint: GET contact lists with search parameter
  ContactListsEndpoint-->>ContactListsApi: Return filtered contact lists
  ContactListsApi-->>Example: Provide filtered results
Loading

Possibly related PRs

Suggested labels: feature request

Suggested reviewers: VladimirTaytor, mklocek, vittorius

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding a search parameter to contactLists.getList.
Description check ✅ Passed The description follows the template with Motivation, Changes, and How to test, and is specific enough despite omitting Images and GIFs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@Rabsztok Rabsztok requested a review from mklocek July 10, 2026 12:08
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