@esri/hub-common 9.39.0 → 9.41.1

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.
Files changed (108) hide show
  1. package/dist/es2017/content/_internal.js +83 -0
  2. package/dist/es2017/content/_internal.js.map +1 -1
  3. package/dist/es2017/content/compose.js +7 -11
  4. package/dist/es2017/content/compose.js.map +1 -1
  5. package/dist/es2017/core/types/IHubContent.js +7 -0
  6. package/dist/es2017/core/types/IHubContent.js.map +1 -1
  7. package/dist/es2017/index.js +2 -0
  8. package/dist/es2017/index.js.map +1 -1
  9. package/dist/es2017/items/_enrichments.js +21 -0
  10. package/dist/es2017/items/_enrichments.js.map +1 -1
  11. package/dist/es2017/org/fetch-org.js +21 -0
  12. package/dist/es2017/org/fetch-org.js.map +1 -0
  13. package/dist/es2017/org/index.js +2 -0
  14. package/dist/es2017/org/index.js.map +1 -0
  15. package/dist/es2017/search/_internal/portalSearchGroups.js.map +1 -1
  16. package/dist/es2017/search/_internal/portalSearchUsers.js +89 -0
  17. package/dist/es2017/search/_internal/portalSearchUsers.js.map +1 -0
  18. package/dist/es2017/search/filter-utils.js +59 -26
  19. package/dist/es2017/search/filter-utils.js.map +1 -1
  20. package/dist/es2017/search/hubSearch.js +4 -1
  21. package/dist/es2017/search/hubSearch.js.map +1 -1
  22. package/dist/es2017/urls/getUserHomeUrl.js +12 -0
  23. package/dist/es2017/urls/getUserHomeUrl.js.map +1 -0
  24. package/dist/es2017/urls/index.js +1 -0
  25. package/dist/es2017/urls/index.js.map +1 -1
  26. package/dist/es2017/users/HubUsers.js +64 -0
  27. package/dist/es2017/users/HubUsers.js.map +1 -0
  28. package/dist/es2017/users/_internal/enrichments.js +85 -0
  29. package/dist/es2017/users/_internal/enrichments.js.map +1 -0
  30. package/dist/es2017/users/index.js +2 -0
  31. package/dist/es2017/users/index.js.map +1 -0
  32. package/dist/esm/content/_internal.js +85 -0
  33. package/dist/esm/content/_internal.js.map +1 -1
  34. package/dist/esm/content/compose.js +5 -11
  35. package/dist/esm/content/compose.js.map +1 -1
  36. package/dist/esm/core/types/IHubContent.js +7 -0
  37. package/dist/esm/core/types/IHubContent.js.map +1 -1
  38. package/dist/esm/index.js +2 -0
  39. package/dist/esm/index.js.map +1 -1
  40. package/dist/esm/items/_enrichments.js +21 -0
  41. package/dist/esm/items/_enrichments.js.map +1 -1
  42. package/dist/esm/org/fetch-org.js +22 -0
  43. package/dist/esm/org/fetch-org.js.map +1 -0
  44. package/dist/esm/org/index.js +2 -0
  45. package/dist/esm/org/index.js.map +1 -0
  46. package/dist/esm/search/_internal/portalSearchGroups.js.map +1 -1
  47. package/dist/esm/search/_internal/portalSearchUsers.js +104 -0
  48. package/dist/esm/search/_internal/portalSearchUsers.js.map +1 -0
  49. package/dist/esm/search/filter-utils.js +60 -27
  50. package/dist/esm/search/filter-utils.js.map +1 -1
  51. package/dist/esm/search/hubSearch.js +4 -1
  52. package/dist/esm/search/hubSearch.js.map +1 -1
  53. package/dist/esm/urls/getUserHomeUrl.js +12 -0
  54. package/dist/esm/urls/getUserHomeUrl.js.map +1 -0
  55. package/dist/esm/urls/index.js +1 -0
  56. package/dist/esm/urls/index.js.map +1 -1
  57. package/dist/esm/users/HubUsers.js +66 -0
  58. package/dist/esm/users/HubUsers.js.map +1 -0
  59. package/dist/esm/users/_internal/enrichments.js +86 -0
  60. package/dist/esm/users/_internal/enrichments.js.map +1 -0
  61. package/dist/esm/users/index.js +2 -0
  62. package/dist/esm/users/index.js.map +1 -0
  63. package/dist/node/content/_internal.js +84 -1
  64. package/dist/node/content/_internal.js.map +1 -1
  65. package/dist/node/content/compose.js +6 -10
  66. package/dist/node/content/compose.js.map +1 -1
  67. package/dist/node/core/types/IHubContent.js +8 -0
  68. package/dist/node/core/types/IHubContent.js.map +1 -1
  69. package/dist/node/index.js +2 -0
  70. package/dist/node/index.js.map +1 -1
  71. package/dist/node/items/_enrichments.js +21 -0
  72. package/dist/node/items/_enrichments.js.map +1 -1
  73. package/dist/node/org/fetch-org.js +24 -0
  74. package/dist/node/org/fetch-org.js.map +1 -0
  75. package/dist/node/org/index.js +5 -0
  76. package/dist/node/org/index.js.map +1 -0
  77. package/dist/node/search/_internal/portalSearchGroups.js.map +1 -1
  78. package/dist/node/search/_internal/portalSearchUsers.js +93 -0
  79. package/dist/node/search/_internal/portalSearchUsers.js.map +1 -0
  80. package/dist/node/search/filter-utils.js +59 -26
  81. package/dist/node/search/filter-utils.js.map +1 -1
  82. package/dist/node/search/hubSearch.js +4 -1
  83. package/dist/node/search/hubSearch.js.map +1 -1
  84. package/dist/node/urls/getUserHomeUrl.js +16 -0
  85. package/dist/node/urls/getUserHomeUrl.js.map +1 -0
  86. package/dist/node/urls/index.js +1 -0
  87. package/dist/node/urls/index.js.map +1 -1
  88. package/dist/node/users/HubUsers.js +68 -0
  89. package/dist/node/users/HubUsers.js.map +1 -0
  90. package/dist/node/users/_internal/enrichments.js +89 -0
  91. package/dist/node/users/_internal/enrichments.js.map +1 -0
  92. package/dist/node/users/index.js +5 -0
  93. package/dist/node/users/index.js.map +1 -0
  94. package/dist/types/content/_internal.d.ts +54 -5
  95. package/dist/types/core/types/IHubContent.d.ts +21 -0
  96. package/dist/types/index.d.ts +2 -0
  97. package/dist/types/org/fetch-org.d.ts +9 -0
  98. package/dist/types/org/index.d.ts +1 -0
  99. package/dist/types/search/_internal/portalSearchUsers.d.ts +8 -0
  100. package/dist/types/search/types/types.d.ts +18 -1
  101. package/dist/types/urls/getUserHomeUrl.d.ts +10 -0
  102. package/dist/types/urls/index.d.ts +1 -0
  103. package/dist/types/users/HubUsers.d.ts +11 -0
  104. package/dist/types/users/_internal/enrichments.d.ts +28 -0
  105. package/dist/types/users/index.d.ts +1 -0
  106. package/dist/umd/common.umd.js +477 -69
  107. package/dist/umd/common.umd.js.map +1 -1
  108. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export * from "./fetch-org";
@@ -0,0 +1,8 @@
1
+ import { IFilterGroup, IHubSearchOptions, IHubSearchResponse, IHubSearchResult } from "../types";
2
+ /**
3
+ * @private
4
+ * Portal Search implementation for Users
5
+ * @param filterGroups
6
+ * @param options
7
+ */
8
+ export declare function portalSearchUsers(filterGroups: Array<IFilterGroup<"user">>, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
@@ -40,6 +40,7 @@ export interface IFilterTypeMap {
40
40
  item: IItemFilter;
41
41
  user: IUserFilterDefinition;
42
42
  group: IGroupFilterDefinition;
43
+ groupMember: IGroupMemberFilterDefinition;
43
44
  event: IEventFilterDefinition;
44
45
  /**
45
46
  * DEPRECATED use item
@@ -127,7 +128,7 @@ export interface IUserFilterDefinition {
127
128
  email?: string | string[] | IMatchOptions;
128
129
  firstname?: string | string[] | IMatchOptions;
129
130
  fullname?: string | string[] | IMatchOptions;
130
- groups?: string | string[] | IMatchOptions;
131
+ group?: string | string[] | IMatchOptions;
131
132
  lastlogin?: IDateRange<number> | IRelativeDate;
132
133
  lastname?: string | string[] | IMatchOptions;
133
134
  modified?: IDateRange<number> | IRelativeDate;
@@ -135,6 +136,21 @@ export interface IUserFilterDefinition {
135
136
  term?: string;
136
137
  userlicensetype?: string | string[] | IMatchOptions;
137
138
  username?: string | string[] | IMatchOptions;
139
+ emailstatus?: string | string[] | IMatchOptions;
140
+ provider?: string | string[] | IMatchOptions;
141
+ }
142
+ /**
143
+ * These properties must all be passed through
144
+ * so they are sent in separate fields and *not*
145
+ * serialized into a q
146
+ * Also `joined` does not take the same format as
147
+ * dates in `q`
148
+ */
149
+ export interface IGroupMemberFilterDefinition {
150
+ memberType?: "admin" | "member";
151
+ joined?: IDateRange<number> | IRelativeDate;
152
+ name?: string | string[] | IMatchOptions;
153
+ orgIds?: string | string[] | IMatchOptions;
138
154
  }
139
155
  export interface IGroupFilterDefinition {
140
156
  access?: string | string[] | IMatchOptions;
@@ -145,6 +161,7 @@ export interface IGroupFilterDefinition {
145
161
  orgid?: string | string[] | IMatchOptions;
146
162
  owner?: string | string[] | IMatchOptions;
147
163
  searchUserAccess?: "groupMember";
164
+ searchUserName?: string;
148
165
  tags?: string | string[] | IMatchOptions;
149
166
  term?: string;
150
167
  title?: string | string[] | IMatchOptions;
@@ -0,0 +1,10 @@
1
+ import { IRequestOptions } from "@esri/arcgis-rest-request";
2
+ import { IPortal } from "@esri/arcgis-rest-portal";
3
+ import { IHubRequestOptions } from "../types";
4
+ /**
5
+ * Return the URL of the user's page in the Portal Home application
6
+ * @param username The username
7
+ * @param portalUrlOrObject a portal base or API URL, a portal object, or request options containing either of those
8
+ * @returns URL to the user's profile, defaults to `https://www.arcgis.com/home/user.html?user={username}`
9
+ */
10
+ export declare function getUserHomeUrl(username: string, portalUrlOrObject?: string | IPortal | IHubRequestOptions | IRequestOptions): string;
@@ -16,6 +16,7 @@ export * from "./convert-urls-to-anchor-tags";
16
16
  export * from "./getHubApiFromPortalUrl";
17
17
  export * from "./getPortalBaseFromOrgUrl";
18
18
  export * from "./getGroupHomeUrl";
19
+ export * from "./getUserHomeUrl";
19
20
  /**
20
21
  *
21
22
  * @param url
@@ -0,0 +1,11 @@
1
+ import { IUser } from "@esri/arcgis-rest-types";
2
+ import { IHubSearchResult } from "../search";
3
+ import { IHubRequestOptions } from "../types";
4
+ /**
5
+ * Enrich a User object
6
+ * @param user
7
+ * @param includes
8
+ * @param requestOptions
9
+ * @returns
10
+ */
11
+ export declare function enrichUserSearchResult(user: IUser, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
@@ -0,0 +1,28 @@
1
+ import { IUser, IPortal } from "@esri/arcgis-rest-portal";
2
+ import { IEnrichmentErrorInfo, IHubRequestOptions } from "../../types";
3
+ /**
4
+ * Possible additional properties available through enrichments
5
+ */
6
+ export interface IUserEnrichments {
7
+ org?: IPortal;
8
+ /**
9
+ * Any errors encountered when fetching enrichments
10
+ * see https://github.com/ArcGIS/hub-indexer/blob/master/docs/errors.md#response-formatting-for-errors
11
+ */
12
+ errors?: IEnrichmentErrorInfo[];
13
+ }
14
+ export declare type UserEnrichment = keyof IUserEnrichments;
15
+ /**
16
+ * Merging of the Enrichment and the User
17
+ */
18
+ export interface IUserAndEnrichments extends IUserEnrichments {
19
+ user: IUser;
20
+ }
21
+ /**
22
+ * Fetch enrichments for Users
23
+ * @param group
24
+ * @param enrichments
25
+ * @param requestOptions
26
+ * @returns
27
+ */
28
+ export declare function fetchUserEnrichments(user: IUser, enrichments: UserEnrichment[], requestOptions?: IHubRequestOptions): Promise<IUserAndEnrichments>;
@@ -0,0 +1 @@
1
+ export * from "./HubUsers";