@esri/arcgis-rest-portal
Version:
ArcGIS Online and Enterprise content and user helpers for @esri/arcgis-rest-request
38 lines • 1.3 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchCommunityUsers = exports.searchUsers = void 0;
const generic_search_js_1 = require("../util/generic-search.js");
/**
* Search a portal for users.
*
* ```js
* import { searchUsers } from "@esri/arcgis-rest-portal";
* //
* searchUsers({ q: 'tommy', authentication })
* .then(response) // response.total => 355
* ```
*
* @param search - A RequestOptions object to pass through to the endpoint.
* @returns A Promise that will resolve with the data from the response.
*/
function searchUsers(search) {
return (0, generic_search_js_1.genericSearch)(search, "user");
}
exports.searchUsers = searchUsers;
/**
* ```js
* import { searchCommunityUsers } from "@esri/arcgis-rest-portal";
* //
* searchCommunityUsers({ q: 'tommy', authentication })
* .then(response) // response.total => 355
* ```
* Search all portals for users.
*
* @param search - A RequestOptions object to pass through to the endpoint.
* @returns A Promise that will resolve with the data from the response.
*/
function searchCommunityUsers(search) {
return (0, generic_search_js_1.genericSearch)(search, "communityUser");
}
exports.searchCommunityUsers = searchCommunityUsers;
//# sourceMappingURL=search-users.js.map