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(group): refactor searchGroups to make use of SearchQueryBuilder #517

Merged
merged 3 commits into from
Apr 17, 2019

Conversation

jgravois
Copy link
Contributor

  • make searchGroups and searchItems signatures consistent
  • add support for SearchQueryBuilder to searchGroups
  • refactor out a shared internal method to keep things DRY
  • deprecate IGroupSearchRequest and IGroupSearchResult interfaces
  • make ISearchResult and ISearchRequestOptions a little more generic

disclaimer: skipping export * "./util/generic-search"; is not enough to ensure the internal utility method is excluded from the API reference.

AFFECTS PACKAGES:
@esri/arcgis-rest-portal

BREAKING CHANGE:
searchGroups signature change

ISSUES CLOSED: #104

AFFECTS PACKAGES:
@esri/arcgis-rest-portal

BREAKING CHANGE:
searchGroups signature change

ISSUES CLOSED: #104
@jgravois jgravois requested a review from patrickarlt April 17, 2019 00:43
Copy link
Member

@tomwayson tomwayson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

genericSearch()++

* ```
* Search a portal for groups. See the [REST Documentation](https://developers.arcgis.com/rest/users-groups-and-items/group-search.htm) for more information.
* Search a portal for items. See the [REST Documentation](https://developers.arcgis.com/rest/users-groups-and-items/search.htm) for more information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be "Search portal for groups"?


export function genericSearch(
search: string | ISearchRequestOptions | SearchQueryBuilder,
searchType: "item" | "group"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jgravois this LGTM but I'm going to pull this down and see if I can improve this typing at all.

@patrickarlt
Copy link
Contributor

@jgravois I've updated the types for genericSearch and ISearchResponse to more clearly indicate that they will ONLY return an array of IGroup or IItem, I had to npm update to get typedoc to accept the latest changes so that is why there is a bunch of random package updates.

@jgravois
Copy link
Contributor Author

I've updated the types for genericSearch and ISearchResponse to more clearly indicate that they will ONLY return an array of IGroup or IItem

very cool!

@jgravois jgravois merged commit a747a4b into v2.0.0 Apr 17, 2019
@jgravois jgravois deleted the refactor/search-groups branch April 17, 2019 18:04
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.

3 participants