@esri/hub-common 9.48.0 → 10.0.0-next.2

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 (248) hide show
  1. package/dist/es2017/core/traits/WithCatalog.js +1 -0
  2. package/dist/es2017/core/traits/WithCatalog.js.map +1 -0
  3. package/dist/es2017/index.js +1 -0
  4. package/dist/es2017/index.js.map +1 -1
  5. package/dist/es2017/projects/HubProjects.js.map +1 -1
  6. package/dist/es2017/search/Catalog.js +346 -0
  7. package/dist/es2017/search/Catalog.js.map +1 -0
  8. package/dist/es2017/search/Collection.js +38 -19
  9. package/dist/es2017/search/Collection.js.map +1 -1
  10. package/dist/es2017/search/_internal/{ipredicate-utils.js → expandPredicate.js} +1 -1
  11. package/dist/es2017/search/_internal/expandPredicate.js.map +1 -0
  12. package/dist/es2017/search/_internal/hubSearchItems.js +3 -137
  13. package/dist/es2017/search/_internal/hubSearchItems.js.map +1 -1
  14. package/dist/es2017/search/_internal/index.js +0 -1
  15. package/dist/es2017/search/_internal/index.js.map +1 -1
  16. package/dist/es2017/search/_internal/portalSearchGroups.js +1 -2
  17. package/dist/es2017/search/_internal/portalSearchGroups.js.map +1 -1
  18. package/dist/es2017/search/_internal/portalSearchItems.js +5 -30
  19. package/dist/es2017/search/_internal/portalSearchItems.js.map +1 -1
  20. package/dist/es2017/search/_internal/portalSearchUsers.js +1 -2
  21. package/dist/es2017/search/_internal/portalSearchUsers.js.map +1 -1
  22. package/dist/es2017/search/fetchCatalog.js +46 -0
  23. package/dist/es2017/search/fetchCatalog.js.map +1 -0
  24. package/dist/es2017/search/hubSearch.js +1 -1
  25. package/dist/es2017/search/hubSearch.js.map +1 -1
  26. package/dist/es2017/search/index.js +3 -9
  27. package/dist/es2017/search/index.js.map +1 -1
  28. package/dist/es2017/search/serializeQueryForPortal.js +1 -1
  29. package/dist/es2017/search/serializeQueryForPortal.js.map +1 -1
  30. package/dist/es2017/search/types/index.js +0 -5
  31. package/dist/es2017/search/types/index.js.map +1 -1
  32. package/dist/es2017/search/upgradeCatalogSchema.js +66 -0
  33. package/dist/es2017/search/upgradeCatalogSchema.js.map +1 -0
  34. package/dist/es2017/search/utils.js +1 -207
  35. package/dist/es2017/search/utils.js.map +1 -1
  36. package/dist/es2017/types/IMessage.js +1 -0
  37. package/dist/es2017/types/IMessage.js.map +1 -0
  38. package/dist/es2017/types/index.js +2 -0
  39. package/dist/es2017/types/index.js.map +1 -0
  40. package/dist/es2017/types.js.map +1 -1
  41. package/dist/esm/core/traits/WithCatalog.js +1 -0
  42. package/dist/esm/core/traits/WithCatalog.js.map +1 -0
  43. package/dist/esm/index.js +1 -0
  44. package/dist/esm/index.js.map +1 -1
  45. package/dist/esm/projects/HubProjects.js.map +1 -1
  46. package/dist/esm/search/Catalog.js +404 -0
  47. package/dist/esm/search/Catalog.js.map +1 -0
  48. package/dist/esm/search/Collection.js +40 -24
  49. package/dist/esm/search/Collection.js.map +1 -1
  50. package/dist/esm/search/_internal/{ipredicate-utils.js → expandPredicate.js} +1 -1
  51. package/dist/esm/search/_internal/expandPredicate.js.map +1 -0
  52. package/dist/esm/search/_internal/hubSearchItems.js +4 -146
  53. package/dist/esm/search/_internal/hubSearchItems.js.map +1 -1
  54. package/dist/esm/search/_internal/index.js +0 -1
  55. package/dist/esm/search/_internal/index.js.map +1 -1
  56. package/dist/esm/search/_internal/portalSearchGroups.js +1 -2
  57. package/dist/esm/search/_internal/portalSearchGroups.js.map +1 -1
  58. package/dist/esm/search/_internal/portalSearchItems.js +6 -30
  59. package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
  60. package/dist/esm/search/_internal/portalSearchUsers.js +1 -2
  61. package/dist/esm/search/_internal/portalSearchUsers.js.map +1 -1
  62. package/dist/esm/search/fetchCatalog.js +59 -0
  63. package/dist/esm/search/fetchCatalog.js.map +1 -0
  64. package/dist/esm/search/hubSearch.js +1 -1
  65. package/dist/esm/search/hubSearch.js.map +1 -1
  66. package/dist/esm/search/index.js +3 -9
  67. package/dist/esm/search/index.js.map +1 -1
  68. package/dist/esm/search/serializeQueryForPortal.js +1 -1
  69. package/dist/esm/search/serializeQueryForPortal.js.map +1 -1
  70. package/dist/esm/search/types/index.js +0 -5
  71. package/dist/esm/search/types/index.js.map +1 -1
  72. package/dist/esm/search/upgradeCatalogSchema.js +66 -0
  73. package/dist/esm/search/upgradeCatalogSchema.js.map +1 -0
  74. package/dist/esm/search/utils.js +1 -204
  75. package/dist/esm/search/utils.js.map +1 -1
  76. package/dist/esm/types/IMessage.js +1 -0
  77. package/dist/esm/types/IMessage.js.map +1 -0
  78. package/dist/esm/types/index.js +2 -0
  79. package/dist/esm/types/index.js.map +1 -0
  80. package/dist/esm/types.js.map +1 -1
  81. package/dist/node/{search/types/ICollection.js → core/traits/WithCatalog.js} +1 -1
  82. package/dist/node/core/traits/WithCatalog.js.map +1 -0
  83. package/dist/node/index.js +1 -0
  84. package/dist/node/index.js.map +1 -1
  85. package/dist/node/projects/HubProjects.js.map +1 -1
  86. package/dist/node/search/Catalog.js +350 -0
  87. package/dist/node/search/Catalog.js.map +1 -0
  88. package/dist/node/search/Collection.js +37 -18
  89. package/dist/node/search/Collection.js.map +1 -1
  90. package/dist/node/search/_internal/{ipredicate-utils.js → expandPredicate.js} +1 -1
  91. package/dist/node/search/_internal/expandPredicate.js.map +1 -0
  92. package/dist/node/search/_internal/hubSearchItems.js +4 -139
  93. package/dist/node/search/_internal/hubSearchItems.js.map +1 -1
  94. package/dist/node/search/_internal/index.js +0 -1
  95. package/dist/node/search/_internal/index.js.map +1 -1
  96. package/dist/node/search/_internal/portalSearchGroups.js +2 -3
  97. package/dist/node/search/_internal/portalSearchGroups.js.map +1 -1
  98. package/dist/node/search/_internal/portalSearchItems.js +6 -31
  99. package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
  100. package/dist/node/search/_internal/portalSearchUsers.js +2 -3
  101. package/dist/node/search/_internal/portalSearchUsers.js.map +1 -1
  102. package/dist/node/search/fetchCatalog.js +50 -0
  103. package/dist/node/search/fetchCatalog.js.map +1 -0
  104. package/dist/node/search/hubSearch.js +1 -1
  105. package/dist/node/search/hubSearch.js.map +1 -1
  106. package/dist/node/search/index.js +3 -9
  107. package/dist/node/search/index.js.map +1 -1
  108. package/dist/node/search/serializeQueryForPortal.js +2 -2
  109. package/dist/node/search/serializeQueryForPortal.js.map +1 -1
  110. package/dist/node/search/types/index.js +0 -5
  111. package/dist/node/search/types/index.js.map +1 -1
  112. package/dist/node/search/upgradeCatalogSchema.js +71 -0
  113. package/dist/node/search/upgradeCatalogSchema.js.map +1 -0
  114. package/dist/node/search/utils.js +1 -213
  115. package/dist/node/search/utils.js.map +1 -1
  116. package/dist/node/{search/types/ICatalog.js → types/IMessage.js} +1 -1
  117. package/dist/node/types/IMessage.js.map +1 -0
  118. package/dist/node/types/index.js +5 -0
  119. package/dist/node/types/index.js.map +1 -0
  120. package/dist/node/types.js.map +1 -1
  121. package/dist/types/core/traits/WithCatalog.d.ts +7 -0
  122. package/dist/types/index.d.ts +1 -0
  123. package/dist/types/search/Catalog.d.ts +143 -0
  124. package/dist/types/search/Collection.d.ts +23 -2
  125. package/dist/types/search/_internal/{ipredicate-utils.d.ts → expandPredicate.d.ts} +0 -0
  126. package/dist/types/search/_internal/hubSearchItems.d.ts +3 -4
  127. package/dist/types/search/_internal/index.d.ts +0 -1
  128. package/dist/types/search/_internal/portalSearchItems.d.ts +15 -15
  129. package/dist/types/search/fetchCatalog.d.ts +10 -0
  130. package/dist/types/search/index.d.ts +3 -9
  131. package/dist/types/search/types/IHubSearchOptions.d.ts +5 -1
  132. package/dist/types/search/types/IHubSearchResponse.d.ts +3 -3
  133. package/dist/types/search/types/index.d.ts +0 -5
  134. package/dist/types/search/types/types.d.ts +0 -206
  135. package/dist/types/search/upgradeCatalogSchema.d.ts +12 -0
  136. package/dist/types/search/utils.d.ts +2 -58
  137. package/dist/types/types/IMessage.d.ts +32 -0
  138. package/dist/types/types/index.d.ts +1 -0
  139. package/dist/types/types.d.ts +0 -2
  140. package/dist/umd/common.umd.js +1374 -2450
  141. package/dist/umd/common.umd.js.map +1 -1
  142. package/package.json +1 -1
  143. package/dist/es2017/search/_internal/ipredicate-utils.js.map +0 -1
  144. package/dist/es2017/search/_internal/state.js +0 -155
  145. package/dist/es2017/search/_internal/state.js.map +0 -1
  146. package/dist/es2017/search/_searchContent.js +0 -116
  147. package/dist/es2017/search/_searchContent.js.map +0 -1
  148. package/dist/es2017/search/_searchGroups.js +0 -88
  149. package/dist/es2017/search/_searchGroups.js.map +0 -1
  150. package/dist/es2017/search/_searchUsers.js +0 -89
  151. package/dist/es2017/search/_searchUsers.js.map +0 -1
  152. package/dist/es2017/search/collectionState.js +0 -60
  153. package/dist/es2017/search/collectionState.js.map +0 -1
  154. package/dist/es2017/search/content-utils.js +0 -455
  155. package/dist/es2017/search/content-utils.js.map +0 -1
  156. package/dist/es2017/search/convertCatalog.js +0 -33
  157. package/dist/es2017/search/convertCatalog.js.map +0 -1
  158. package/dist/es2017/search/filter-utils.js +0 -31
  159. package/dist/es2017/search/filter-utils.js.map +0 -1
  160. package/dist/es2017/search/group-utils.js +0 -142
  161. package/dist/es2017/search/group-utils.js.map +0 -1
  162. package/dist/es2017/search/types/ICatalog.js +0 -1
  163. package/dist/es2017/search/types/ICatalog.js.map +0 -1
  164. package/dist/es2017/search/types/ICollection.js +0 -1
  165. package/dist/es2017/search/types/ICollection.js.map +0 -1
  166. package/dist/es2017/search/types/IFacet.js +0 -1
  167. package/dist/es2017/search/types/IFacet.js.map +0 -1
  168. package/dist/es2017/search/types/IFacetOption.js +0 -1
  169. package/dist/es2017/search/types/IFacetOption.js.map +0 -1
  170. package/dist/es2017/search/types/IHubApiSearchRequest.js +0 -1
  171. package/dist/es2017/search/types/IHubApiSearchRequest.js.map +0 -1
  172. package/dist/es2017/search/user-utils.js +0 -139
  173. package/dist/es2017/search/user-utils.js.map +0 -1
  174. package/dist/esm/search/_internal/ipredicate-utils.js.map +0 -1
  175. package/dist/esm/search/_internal/state.js +0 -155
  176. package/dist/esm/search/_internal/state.js.map +0 -1
  177. package/dist/esm/search/_searchContent.js +0 -118
  178. package/dist/esm/search/_searchContent.js.map +0 -1
  179. package/dist/esm/search/_searchGroups.js +0 -91
  180. package/dist/esm/search/_searchGroups.js.map +0 -1
  181. package/dist/esm/search/_searchUsers.js +0 -92
  182. package/dist/esm/search/_searchUsers.js.map +0 -1
  183. package/dist/esm/search/collectionState.js +0 -61
  184. package/dist/esm/search/collectionState.js.map +0 -1
  185. package/dist/esm/search/content-utils.js +0 -462
  186. package/dist/esm/search/content-utils.js.map +0 -1
  187. package/dist/esm/search/convertCatalog.js +0 -33
  188. package/dist/esm/search/convertCatalog.js.map +0 -1
  189. package/dist/esm/search/filter-utils.js +0 -31
  190. package/dist/esm/search/filter-utils.js.map +0 -1
  191. package/dist/esm/search/group-utils.js +0 -146
  192. package/dist/esm/search/group-utils.js.map +0 -1
  193. package/dist/esm/search/types/ICatalog.js +0 -1
  194. package/dist/esm/search/types/ICatalog.js.map +0 -1
  195. package/dist/esm/search/types/ICollection.js +0 -1
  196. package/dist/esm/search/types/ICollection.js.map +0 -1
  197. package/dist/esm/search/types/IFacet.js +0 -1
  198. package/dist/esm/search/types/IFacet.js.map +0 -1
  199. package/dist/esm/search/types/IFacetOption.js +0 -1
  200. package/dist/esm/search/types/IFacetOption.js.map +0 -1
  201. package/dist/esm/search/types/IHubApiSearchRequest.js +0 -1
  202. package/dist/esm/search/types/IHubApiSearchRequest.js.map +0 -1
  203. package/dist/esm/search/user-utils.js +0 -143
  204. package/dist/esm/search/user-utils.js.map +0 -1
  205. package/dist/node/search/_internal/ipredicate-utils.js.map +0 -1
  206. package/dist/node/search/_internal/state.js +0 -166
  207. package/dist/node/search/_internal/state.js.map +0 -1
  208. package/dist/node/search/_searchContent.js +0 -120
  209. package/dist/node/search/_searchContent.js.map +0 -1
  210. package/dist/node/search/_searchGroups.js +0 -92
  211. package/dist/node/search/_searchGroups.js.map +0 -1
  212. package/dist/node/search/_searchUsers.js +0 -93
  213. package/dist/node/search/_searchUsers.js.map +0 -1
  214. package/dist/node/search/collectionState.js +0 -65
  215. package/dist/node/search/collectionState.js.map +0 -1
  216. package/dist/node/search/content-utils.js +0 -466
  217. package/dist/node/search/content-utils.js.map +0 -1
  218. package/dist/node/search/convertCatalog.js +0 -37
  219. package/dist/node/search/convertCatalog.js.map +0 -1
  220. package/dist/node/search/filter-utils.js +0 -36
  221. package/dist/node/search/filter-utils.js.map +0 -1
  222. package/dist/node/search/group-utils.js +0 -148
  223. package/dist/node/search/group-utils.js.map +0 -1
  224. package/dist/node/search/types/ICatalog.js.map +0 -1
  225. package/dist/node/search/types/ICollection.js.map +0 -1
  226. package/dist/node/search/types/IFacet.js +0 -3
  227. package/dist/node/search/types/IFacet.js.map +0 -1
  228. package/dist/node/search/types/IFacetOption.js +0 -3
  229. package/dist/node/search/types/IFacetOption.js.map +0 -1
  230. package/dist/node/search/types/IHubApiSearchRequest.js +0 -3
  231. package/dist/node/search/types/IHubApiSearchRequest.js.map +0 -1
  232. package/dist/node/search/user-utils.js +0 -145
  233. package/dist/node/search/user-utils.js.map +0 -1
  234. package/dist/types/search/_internal/state.d.ts +0 -70
  235. package/dist/types/search/_searchContent.d.ts +0 -9
  236. package/dist/types/search/_searchGroups.d.ts +0 -17
  237. package/dist/types/search/_searchUsers.d.ts +0 -31
  238. package/dist/types/search/collectionState.d.ts +0 -19
  239. package/dist/types/search/content-utils.d.ts +0 -83
  240. package/dist/types/search/convertCatalog.d.ts +0 -6
  241. package/dist/types/search/filter-utils.d.ts +0 -13
  242. package/dist/types/search/group-utils.d.ts +0 -36
  243. package/dist/types/search/types/ICatalog.d.ts +0 -87
  244. package/dist/types/search/types/ICollection.d.ts +0 -28
  245. package/dist/types/search/types/IFacet.d.ts +0 -62
  246. package/dist/types/search/types/IFacetOption.d.ts +0 -30
  247. package/dist/types/search/types/IHubApiSearchRequest.d.ts +0 -16
  248. package/dist/types/search/user-utils.d.ts +0 -35
@@ -1,14 +1,8 @@
1
1
  export * from "./hub-api-search";
2
- export * from "./content-utils";
3
- export * from "./group-utils";
4
- export * from "./user-utils";
5
2
  export * from "./utils";
6
- export * from "./_searchContent";
7
- export * from "./_searchGroups";
8
- export * from "./_searchUsers";
9
3
  export * from "./types";
10
- export * from "./collectionState";
11
- export * from "./convertCatalog";
12
- export * from "./filter-utils";
4
+ export * from "./upgradeCatalogSchema";
13
5
  export * from "./serializeQueryForPortal";
14
6
  export * from "./hubSearch";
7
+ export * from "./Catalog";
8
+ export * from "./Collection";
@@ -1,5 +1,5 @@
1
1
  import { UserSession } from "@esri/arcgis-rest-auth";
2
- import { IHubRequestOptions, IModel } from "../..";
2
+ import { EntityType, IHubRequestOptions, IModel } from "../../index";
3
3
  import { NamedApis, IApiDefinition } from "./types";
4
4
  export declare type Enrichments = "data" | "metadata" | "org" | "service" | "layers";
5
5
  /**
@@ -42,6 +42,10 @@ export interface IHubSearchOptions {
42
42
  * DEPRECATED: Use `include` instead
43
43
  */
44
44
  enrichments?: Enrichments[];
45
+ /**
46
+ * Specify what entity to search for; For use with hubSearch
47
+ */
48
+ targetEntity?: EntityType;
45
49
  /**
46
50
  * Maximum number of results to return, per-page
47
51
  */
@@ -1,4 +1,4 @@
1
- import { IFacet } from "./IFacet";
1
+ import { IMessage } from "../../types/IMessage";
2
2
  import { IHubAggregation } from "./IHubAggregation";
3
3
  /**
4
4
  * Defines a generic search response interface with parameterized result type
@@ -31,7 +31,7 @@ export interface IHubSearchResponse<T> {
31
31
  */
32
32
  aggregations?: IHubAggregation[];
33
33
  /**
34
- * DEPRECATED - hub.js no longer computes facets; consumers need to construct them from aggregations
34
+ * Array of messages / warnings
35
35
  */
36
- facets?: IFacet[];
36
+ messages?: IMessage[];
37
37
  }
@@ -1,9 +1,4 @@
1
- export * from "./ICatalog";
2
- export * from "./ICollection";
3
- export * from "./IFacet";
4
- export * from "./IFacetOption";
5
1
  export * from "./IHubAggregation";
6
- export * from "./IHubApiSearchRequest";
7
2
  export * from "./IHubSearchOptions";
8
3
  export * from "./IHubSearchResult";
9
4
  export * from "./IHubSearchResponse";
@@ -1,179 +1,3 @@
1
- import { UserSession } from "@esri/arcgis-rest-auth";
2
- import { IHubContent, AccessLevel } from "../..";
3
- import { IFacet } from "./IFacet";
4
- /**
5
- * Generic filter used with various search functions.
6
- *
7
- * `Filter<T extends FilterType>` [FilterType](../FilterType) is constrained to
8
- *
9
- * - `Filter<"item">` [IContentFilterDefinition](../IContentFilterDefinition)
10
- * - `Filter<"user">` [IUserFilterDefinition](../IUserFilterDefinition)
11
- * - `Filter<"group">` [IGroupFilterDefinition](../IGroupFilterDefinition)
12
- *
13
- * When constructing a Filter as json, the `filterType` must be specified,
14
- * and it must be `keyof` [FilterTypeMap](../FilterTypeMap)
15
- *
16
- * ```ts
17
- * const f:Filter<"item"> = {
18
- * filterType: "item" // must match the FilterType
19
- * term: "water"
20
- * }
21
- * ```
22
- */
23
- export declare type Filter<T extends FilterType> = IFilterTypeMap[T] & {
24
- filterType: T;
25
- };
26
- /**
27
- * Groups of filters with an operation specifying how the
28
- * filters should be connected when serialized
29
- */
30
- export interface IFilterGroup<T extends FilterType> {
31
- filterType: T;
32
- operation?: "AND" | "OR";
33
- filters: Array<Filter<T>>;
34
- }
35
- /**
36
- * Defines the valid FilterTypes for use with `Filter<T extends FilterType>`
37
- * See [Filter](../Filter)
38
- */
39
- export interface IFilterTypeMap {
40
- item: IItemFilter;
41
- user: IUserFilterDefinition;
42
- group: IGroupFilterDefinition;
43
- groupMember: IGroupMemberFilterDefinition;
44
- event: IEventFilterDefinition;
45
- /**
46
- * DEPRECATED use item
47
- * // TODO: Remove with _searchContent
48
- */
49
- content: IContentFilterDefinition;
50
- }
51
- export declare type FilterType = keyof IFilterTypeMap;
52
- export interface IItemFilter {
53
- access?: AccessLevel | AccessLevel[] | IMatchOptions;
54
- owner?: string | string[] | IMatchOptions;
55
- tags?: string | string[] | IMatchOptions;
56
- categories?: string | string[] | IMatchOptions;
57
- created?: IDateRange<number> | IRelativeDate;
58
- description?: string | string[] | IMatchOptions;
59
- snippet?: string | string[] | IMatchOptions;
60
- group?: string | string[] | IMatchOptions;
61
- id?: string | string[] | IMatchOptions;
62
- modified?: IDateRange<number> | IRelativeDate;
63
- orgid?: string | string[] | IMatchOptions;
64
- term?: string;
65
- title?: string | string[] | IMatchOptions;
66
- type?: string | string[] | IMatchOptions;
67
- typekeywords?: string | string[] | IMatchOptions;
68
- [key: string]: any;
69
- }
70
- /**
71
- * Fields related to Content based searches
72
- * // TODO: Remove with _searchContent
73
- */
74
- export interface IContentFilterDefinition {
75
- access?: string | string[] | IMatchOptions;
76
- owner?: string | string[] | IMatchOptions;
77
- tags?: string | string[] | IMatchOptions;
78
- categories?: string | string[] | IMatchOptions;
79
- created?: IDateRange<number> | IRelativeDate;
80
- description?: string | string[] | IMatchOptions;
81
- snippet?: string | string[] | IMatchOptions;
82
- group?: string | string[] | IMatchOptions;
83
- id?: string | string[] | IMatchOptions;
84
- modified?: IDateRange<number> | IRelativeDate;
85
- orgid?: string | string[] | IMatchOptions;
86
- term?: string;
87
- title?: string | string[] | IMatchOptions;
88
- type?: string | NamedContentFilter | Array<string | NamedContentFilter> | IMatchOptions;
89
- typekeywords?: string | string[] | IMatchOptions;
90
- [key: string]: any;
91
- /**
92
- * @internal
93
- * Support for complex OR queries; Used with various expansions
94
- */
95
- subFilters?: Array<IContentFilterDefinition | NamedContentFilter>;
96
- }
97
- export interface IContentFilter {
98
- access?: IMatchOptions;
99
- created?: IDateRange<number>;
100
- description?: IMatchOptions;
101
- group?: IMatchOptions;
102
- id?: IMatchOptions;
103
- modified?: IDateRange<number>;
104
- orgid?: IMatchOptions;
105
- owner?: IMatchOptions;
106
- tags?: IMatchOptions;
107
- term?: string;
108
- title?: IMatchOptions;
109
- type?: IMatchOptions;
110
- typekeywords?: IMatchOptions;
111
- [key: string]: any;
112
- subFilters?: IContentFilter[];
113
- }
114
- export interface IWellKnownContentFilters {
115
- $apps: IContentFilterDefinition[];
116
- $dashboard: IContentFilterDefinition[];
117
- $dataset: IContentFilterDefinition[];
118
- $experience: IContentFilterDefinition[];
119
- $site: IContentFilterDefinition[];
120
- $storymap: IContentFilterDefinition[];
121
- $initiative: IContentFilterDefinition[];
122
- $document: IContentFilterDefinition[];
123
- }
124
- export declare type NamedContentFilter = keyof IWellKnownContentFilters;
125
- export interface IUserFilterDefinition {
126
- created?: IDateRange<number> | IRelativeDate;
127
- disabled?: boolean;
128
- email?: string | string[] | IMatchOptions;
129
- firstname?: string | string[] | IMatchOptions;
130
- fullname?: string | string[] | IMatchOptions;
131
- group?: string | string[] | IMatchOptions;
132
- lastlogin?: IDateRange<number> | IRelativeDate;
133
- lastname?: string | string[] | IMatchOptions;
134
- modified?: IDateRange<number> | IRelativeDate;
135
- role?: string | string[] | IMatchOptions;
136
- term?: string;
137
- userlicensetype?: string | string[] | IMatchOptions;
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;
154
- }
155
- export interface IGroupFilterDefinition {
156
- access?: string | string[] | IMatchOptions;
157
- created?: IDateRange<number> | IRelativeDate;
158
- id?: string | string[] | IMatchOptions;
159
- isInvitationOnly?: boolean;
160
- modified?: IDateRange<number> | IRelativeDate;
161
- orgid?: string | string[] | IMatchOptions;
162
- owner?: string | string[] | IMatchOptions;
163
- searchUserAccess?: "groupMember";
164
- searchUserName?: string;
165
- tags?: string | string[] | IMatchOptions;
166
- term?: string;
167
- title?: string | string[] | IMatchOptions;
168
- typekeywords?: string | string[] | IMatchOptions;
169
- isopendata?: boolean;
170
- }
171
- export interface IEventFilterDefinition {
172
- created?: IDateRange<number> | IRelativeDate;
173
- modified?: IDateRange<number> | IRelativeDate;
174
- orgid?: string | string[] | IMatchOptions;
175
- title?: string | string[] | IMatchOptions;
176
- }
177
1
  /**
178
2
  * Sort Option to be displayed in a UI
179
3
  */
@@ -228,17 +52,6 @@ export interface IMatchOptions {
228
52
  */
229
53
  exact?: string | string[];
230
54
  }
231
- /**
232
- * searchContent return
233
- * // TODO: Remove with _searchContent
234
- */
235
- export interface IContentSearchResult {
236
- total: number;
237
- results: IHubContent[];
238
- facets?: IFacet[];
239
- hasNext: boolean;
240
- next: (params?: any) => Promise<IContentSearchResult>;
241
- }
242
55
  export interface IWellKnownApis {
243
56
  arcgis: IApiDefinition;
244
57
  arcgisQA: IApiDefinition;
@@ -252,23 +65,4 @@ export interface IApiDefinition {
252
65
  label?: string;
253
66
  url: string;
254
67
  type: "arcgis" | "arcgis-hub";
255
- authentication?: UserSession;
256
- }
257
- export interface IFacetState {
258
- [key: string]: string;
259
- }
260
- export interface ICollectionState {
261
- query?: string;
262
- sort?: string;
263
- [key: string]: string;
264
- }
265
- export interface ICatalogState {
266
- collection: string;
267
- collectionState?: ICollectionState;
268
- }
269
- /**
270
- * Generic key/value type for storing component state
271
- */
272
- export interface IComponentState {
273
- [key: string]: string;
274
68
  }
@@ -0,0 +1,12 @@
1
+ import { IHubCatalog } from "./types";
2
+ /**
3
+ * Apply schema upgrades to Catalog objects
4
+ * @param catalog
5
+ * @returns
6
+ */
7
+ export declare function upgradeCatalogSchema(catalog: any): IHubCatalog;
8
+ /**
9
+ * DEPRECATED: Use upgradeCatalogSchema(...)
10
+ * @param original
11
+ */
12
+ export declare function convertCatalog(original: any): IHubCatalog;
@@ -1,4 +1,4 @@
1
- import { IUser } from "@esri/arcgis-rest-auth";
1
+ import { IUser, UserSession } from "@esri/arcgis-rest-auth";
2
2
  import { IGroup, ISearchOptions } from "@esri/arcgis-rest-portal";
3
3
  import { ISearchResponse } from "../types";
4
4
  import { IMatchOptions, IDateRange, IRelativeDate, IWellKnownApis, IApiDefinition, NamedApis } from "./types/types";
@@ -22,25 +22,6 @@ export declare function expandApis(apis: Array<NamedApis | IApiDefinition>): IAp
22
22
  * @returns
23
23
  */
24
24
  export declare function expandApi(api: NamedApis | IApiDefinition): IApiDefinition;
25
- /**
26
- * @private
27
- * Merge two date ranges by taking the longest span
28
- * @param dr1
29
- * @param dr2
30
- * @returns
31
- */
32
- export declare function mergeDateRange(dr1: IDateRange<number>, dr2: IDateRange<number>): IDateRange<number>;
33
- /**
34
- * @private
35
- * Merge two [`MatchOptions`](../MatchOptions)
36
- *
37
- * Currently a naieve implementation where the arrays are simply merged
38
- *
39
- * @param mo1
40
- * @param mo2
41
- * @returns
42
- */
43
- export declare function mergeMatchOptions(mo1: IMatchOptions, mo2: IMatchOptions): IMatchOptions;
44
25
  /**
45
26
  * @private
46
27
  * Convert a field value into a MatchOptions if it's not already one
@@ -55,43 +36,6 @@ export declare function valueToMatchOptions(value: string | string[] | IMatchOpt
55
36
  * @returns
56
37
  */
57
38
  export declare function relativeDateToDateRange(relative: IRelativeDate): IDateRange<number>;
58
- /**
59
- * @private
60
- * As a final `ISearchOptions` object gets created, many such objects are created, and
61
- * need to be systematically "merged" so as to return consistently structured `q` and `filter`
62
- * values.
63
- * @param so1
64
- * @param so2
65
- * @param join
66
- * @returns
67
- */
68
- export declare function mergeSearchOptions(so1: ISearchOptions, so2: ISearchOptions, join: "AND" | "OR"): ISearchOptions;
69
- /**
70
- * @private
71
- * Serialize a `MatchOptions` into `q` or `filter` on an `ISearchOptions`
72
- * DEPRECATED: Serialization should be handled in filter-utils.ts
73
- * @param key
74
- * @param opts
75
- * @returns
76
- */
77
- export declare function serializeMatchOptions(key: string, opts: IMatchOptions): ISearchOptions;
78
- /**
79
- * @private
80
- * Serialize a DateRange<number> into a Portal Query string
81
- * @param key
82
- * @param range
83
- * @returns
84
- */
85
- export declare function serializeDateRange(key: string, range: IDateRange<number>): ISearchOptions;
86
- /**
87
- * @private
88
- * Serialize a `string` or `string[]` into a string
89
- * @param join
90
- * @param key
91
- * @param value
92
- * @returns
93
- */
94
- export declare function serializeStringOrArray(join: "AND" | "OR", key: string, value: string | string[]): string;
95
39
  /**
96
40
  * Create a `.next()` function for a type
97
41
  * @param request
@@ -100,7 +44,7 @@ export declare function serializeStringOrArray(join: "AND" | "OR", key: string,
100
44
  * @param fn
101
45
  * @returns
102
46
  */
103
- export declare function getNextFunction<T>(request: ISearchOptions, nextStart: number, total: number, fn: (r: any) => Promise<ISearchResponse<T>>): () => Promise<ISearchResponse<T>>;
47
+ export declare function getNextFunction<T>(request: ISearchOptions, nextStart: number, total: number, fn: (r: any) => Promise<ISearchResponse<T>>): (authentication?: UserSession) => Promise<ISearchResponse<T>>;
104
48
  /**
105
49
  * Construct a the full url to a group thumbnail
106
50
  *
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Generic structure for returning a translatable message from
3
+ * one package to another, such that the calling package is responsible
4
+ * for the translation
5
+ *
6
+ * @export
7
+ * @interface IMessage
8
+ */
9
+ export interface IMessage {
10
+ /**
11
+ * Unique key that can be used with a i18n system in a consuming application
12
+ *
13
+ * @type {string}
14
+ * @memberof IMessage
15
+ */
16
+ code: string;
17
+ /**
18
+ * English message describing the issue, for debugging only. Not intended to be shown
19
+ * in an application interface.
20
+ *
21
+ * @type {string}
22
+ * @memberof IMessage
23
+ */
24
+ message: string;
25
+ /**
26
+ * Optional data that can be sent along
27
+ *
28
+ * @type {Record<string, unknown>}
29
+ * @memberof IMessage
30
+ */
31
+ data?: Record<string, unknown>;
32
+ }
@@ -0,0 +1 @@
1
+ export * from "./IMessage";
@@ -2,7 +2,6 @@ import { IItem, IUser, IGroup, IPolygon, ISpatialReference, IGeometry } from "@e
2
2
  import { IPortal, ISearchResult } from "@esri/arcgis-rest-portal";
3
3
  import { UserSession } from "@esri/arcgis-rest-auth";
4
4
  import { IRequestOptions } from "@esri/arcgis-rest-request";
5
- import { IFacet } from "./search";
6
5
  /**
7
6
  * Generic Model, used with all items that have a json
8
7
  * `/data` payload
@@ -337,7 +336,6 @@ export interface ISearchResponse<T> {
337
336
  results: T[];
338
337
  hasNext: boolean;
339
338
  next: (params?: any) => Promise<ISearchResponse<T>>;
340
- facets?: IFacet[];
341
339
  }
342
340
  /**
343
341
  * ENUM which defines File extensions.