@esri/arcgis-rest-portal 4.2.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/arcgis-rest-portal - v4.1.0 - Apache-2.0
2
+ * @esri/arcgis-rest-portal - v4.3.0 - Apache-2.0
3
3
  * Copyright (c) 2017-2023 Esri, Inc.
4
- * Thu Mar 02 2023 01:32:35 GMT+0000 (Coordinated Universal Time)
4
+ * Wed Sep 06 2023 15:33:48 GMT+0000 (Coordinated Universal Time)
5
5
  */
6
6
  import { cleanUrl, request, appendCustomParams, warn } from '@esri/arcgis-rest-request';
7
7
 
@@ -1422,6 +1422,9 @@ function genericSearch(search, searchType) {
1422
1422
  return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));
1423
1423
  }
1424
1424
  break;
1425
+ case "communityUser":
1426
+ path = "/community/users";
1427
+ break;
1425
1428
  default:
1426
1429
  // "users"
1427
1430
  path = "/portals/self/users/search";
@@ -2279,7 +2282,7 @@ function removeNotification(requestOptions) {
2279
2282
  * Search a portal for users.
2280
2283
  *
2281
2284
  * ```js
2282
- * import { searchItems } from "@esri/arcgis-rest-portal";
2285
+ * import { searchUsers } from "@esri/arcgis-rest-portal";
2283
2286
  * //
2284
2287
  * searchUsers({ q: 'tommy', authentication })
2285
2288
  * .then(response) // response.total => 355
@@ -2291,6 +2294,21 @@ function removeNotification(requestOptions) {
2291
2294
  function searchUsers(search) {
2292
2295
  return genericSearch(search, "user");
2293
2296
  }
2297
+ /**
2298
+ * ```js
2299
+ * import { searchCommunityUsers } from "@esri/arcgis-rest-portal";
2300
+ * //
2301
+ * searchCommunityUsers({ q: 'tommy', authentication })
2302
+ * .then(response) // response.total => 355
2303
+ * ```
2304
+ * Search all portals for users.
2305
+ *
2306
+ * @param search - A RequestOptions object to pass through to the endpoint.
2307
+ * @returns A Promise that will resolve with the data from the response.
2308
+ */
2309
+ function searchCommunityUsers(search) {
2310
+ return genericSearch(search, "communityUser");
2311
+ }
2294
2312
 
2295
2313
  /* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
2296
2314
  * Apache-2.0 */
@@ -2895,5 +2913,5 @@ function getPortalSettings(id, requestOptions) {
2895
2913
  return request(url, options);
2896
2914
  }
2897
2915
 
2898
- export { SearchQueryBuilder, acceptInvitation, addGroupUsers, addItemData, addItemPart, addItemRelationship, addItemResource, bboxToString, cancelItemUpload, commitItemUpload, createFolder, createGroup, createGroupNotification, createItem, createItemInFolder, createOrgNotification, declineInvitation, determineOwner, ensureMembership, exportItem, getGroup, getGroupCategorySchema, getGroupContent, getGroupUsers, getItem, getItemBaseUrl, getItemData, getItemGroups, getItemInfo, getItemMetadata, getItemParts, getItemResource, getItemResources, getItemStatus, getPortal, getPortalSettings, getPortalUrl, getRelatedItems, getSelf, getSharingUrl, getUniqueServiceName, getUser, getUserContent, getUserInvitation, getUserInvitations, getUserMembership, getUserNotifications, getUserProperties, getUserTags, getUserUrl, inviteGroupUsers, isBBox, isItemOwner, isItemSharedWithGroup, isOrgAdmin, isServiceNameAvailable, joinGroup, leaveGroup, moveItem, protectGroup, protectItem, reassignItem, removeFolder, removeGroup, removeGroupUsers, removeItem, removeItemRelationship, removeItemResource, removeNotification, scrubControlChars, searchGroupContent, searchGroupUsers, searchGroups, searchItems, searchUsers, setItemAccess, setUserProperties, shareItemWithGroup, unprotectGroup, unprotectItem, unshareItemWithGroup, updateGroup, updateItem, updateItemInfo, updateItemResource, updateUser, updateUserMemberships };
2916
+ export { SearchQueryBuilder, acceptInvitation, addGroupUsers, addItemData, addItemPart, addItemRelationship, addItemResource, bboxToString, cancelItemUpload, commitItemUpload, createFolder, createGroup, createGroupNotification, createItem, createItemInFolder, createOrgNotification, declineInvitation, determineOwner, ensureMembership, exportItem, getGroup, getGroupCategorySchema, getGroupContent, getGroupUsers, getItem, getItemBaseUrl, getItemData, getItemGroups, getItemInfo, getItemMetadata, getItemParts, getItemResource, getItemResources, getItemStatus, getPortal, getPortalSettings, getPortalUrl, getRelatedItems, getSelf, getSharingUrl, getUniqueServiceName, getUser, getUserContent, getUserInvitation, getUserInvitations, getUserMembership, getUserNotifications, getUserProperties, getUserTags, getUserUrl, inviteGroupUsers, isBBox, isItemOwner, isItemSharedWithGroup, isOrgAdmin, isServiceNameAvailable, joinGroup, leaveGroup, moveItem, protectGroup, protectItem, reassignItem, removeFolder, removeGroup, removeGroupUsers, removeItem, removeItemRelationship, removeItemResource, removeNotification, scrubControlChars, searchCommunityUsers, searchGroupContent, searchGroupUsers, searchGroups, searchItems, searchUsers, setItemAccess, setUserProperties, shareItemWithGroup, unprotectGroup, unprotectItem, unshareItemWithGroup, updateGroup, updateItem, updateItemInfo, updateItemResource, updateUser, updateUserMemberships };
2899
2917
  //# sourceMappingURL=portal.esm.js.map