@esri/hub-common 9.43.2 → 9.44.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.
- package/dist/es2017/ArcGISContext.js +1 -1
- package/dist/es2017/ArcGISContext.js.map +1 -1
- package/dist/es2017/items/_enrichments.js +9 -4
- package/dist/es2017/items/_enrichments.js.map +1 -1
- package/dist/es2017/search/Collection.js +71 -0
- package/dist/es2017/search/Collection.js.map +1 -0
- package/dist/es2017/search/_internal/ifilter-utils.js +221 -0
- package/dist/es2017/search/_internal/ifilter-utils.js.map +1 -0
- package/dist/es2017/search/_internal/portalSearchGroups.js +47 -2
- package/dist/es2017/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchItems.js +100 -7
- package/dist/es2017/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchUsers.js +46 -1
- package/dist/es2017/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchUtils.js +22 -0
- package/dist/es2017/search/_internal/portalSearchUtils.js.map +1 -0
- package/dist/es2017/search/filter-utils.js +1 -0
- package/dist/es2017/search/filter-utils.js.map +1 -1
- package/dist/es2017/search/hubSearch.js +47 -3
- package/dist/es2017/search/hubSearch.js.map +1 -1
- package/dist/es2017/search/types/IHubAggregation.js +1 -0
- package/dist/es2017/search/types/IHubAggregation.js.map +1 -0
- package/dist/es2017/search/types/IHubCatalog.js +1 -0
- package/dist/es2017/search/types/IHubCatalog.js.map +1 -0
- package/dist/es2017/search/types/index.js +2 -0
- package/dist/es2017/search/types/index.js.map +1 -1
- package/dist/esm/ArcGISContext.js +1 -1
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/items/_enrichments.js +9 -4
- package/dist/esm/items/_enrichments.js.map +1 -1
- package/dist/esm/search/Collection.js +106 -0
- package/dist/esm/search/Collection.js.map +1 -0
- package/dist/esm/search/_internal/ifilter-utils.js +222 -0
- package/dist/esm/search/_internal/ifilter-utils.js.map +1 -0
- package/dist/esm/search/_internal/portalSearchGroups.js +50 -2
- package/dist/esm/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js +101 -7
- package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchUsers.js +49 -1
- package/dist/esm/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchUtils.js +22 -0
- package/dist/esm/search/_internal/portalSearchUtils.js.map +1 -0
- package/dist/esm/search/filter-utils.js +1 -0
- package/dist/esm/search/filter-utils.js.map +1 -1
- package/dist/esm/search/hubSearch.js +50 -3
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/types/IHubAggregation.js +1 -0
- package/dist/esm/search/types/IHubAggregation.js.map +1 -0
- package/dist/esm/search/types/IHubCatalog.js +1 -0
- package/dist/esm/search/types/IHubCatalog.js.map +1 -0
- package/dist/esm/search/types/index.js +2 -0
- package/dist/esm/search/types/index.js.map +1 -1
- package/dist/node/ArcGISContext.js +1 -1
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/items/_enrichments.js +9 -4
- package/dist/node/items/_enrichments.js.map +1 -1
- package/dist/node/search/Collection.js +75 -0
- package/dist/node/search/Collection.js.map +1 -0
- package/dist/node/search/_internal/ifilter-utils.js +226 -0
- package/dist/node/search/_internal/ifilter-utils.js.map +1 -0
- package/dist/node/search/_internal/portalSearchGroups.js +49 -3
- package/dist/node/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/node/search/_internal/portalSearchItems.js +103 -7
- package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/node/search/_internal/portalSearchUsers.js +48 -2
- package/dist/node/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/node/search/_internal/portalSearchUtils.js +26 -0
- package/dist/node/search/_internal/portalSearchUtils.js.map +1 -0
- package/dist/node/search/filter-utils.js +1 -0
- package/dist/node/search/filter-utils.js.map +1 -1
- package/dist/node/search/hubSearch.js +48 -3
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/types/IHubAggregation.js +3 -0
- package/dist/node/search/types/IHubAggregation.js.map +1 -0
- package/dist/node/search/types/IHubCatalog.js +3 -0
- package/dist/node/search/types/IHubCatalog.js.map +1 -0
- package/dist/node/search/types/index.js +2 -0
- package/dist/node/search/types/index.js.map +1 -1
- package/dist/types/search/Collection.d.ts +18 -0
- package/dist/types/search/_internal/ifilter-utils.d.ts +4 -0
- package/dist/types/search/_internal/portalSearchGroups.d.ts +12 -3
- package/dist/types/search/_internal/portalSearchItems.d.ts +28 -4
- package/dist/types/search/_internal/portalSearchUsers.d.ts +11 -2
- package/dist/types/search/_internal/portalSearchUtils.d.ts +9 -0
- package/dist/types/search/hubSearch.d.ts +11 -1
- package/dist/types/search/types/IHubAggregation.d.ts +11 -0
- package/dist/types/search/types/IHubCatalog.d.ts +71 -0
- package/dist/types/search/types/IHubSearchResponse.d.ts +2 -0
- package/dist/types/search/types/index.d.ts +2 -0
- package/dist/umd/common.umd.js +528 -49
- package/dist/umd/common.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export interface IHubCatalog {
|
|
2
|
+
/**
|
|
3
|
+
* Title for the Gallery
|
|
4
|
+
*/
|
|
5
|
+
title?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Filter defines the "scopes" of the Catalog, on a per entity type basis
|
|
8
|
+
*/
|
|
9
|
+
scopes?: ICatalogScope;
|
|
10
|
+
/**
|
|
11
|
+
* Collections within the Catalog
|
|
12
|
+
*/
|
|
13
|
+
collections?: IHubCollection[];
|
|
14
|
+
}
|
|
15
|
+
export interface ICatalogScope extends Record<EntityType, IQuery> {
|
|
16
|
+
}
|
|
17
|
+
export interface IHubCollection {
|
|
18
|
+
/**
|
|
19
|
+
* String to show in the UI. translated.
|
|
20
|
+
*/
|
|
21
|
+
label: string;
|
|
22
|
+
/**
|
|
23
|
+
* Unique key, used for query params and telemetry
|
|
24
|
+
*/
|
|
25
|
+
key: string;
|
|
26
|
+
/**
|
|
27
|
+
* Specify the includes to be requested when working with this collection
|
|
28
|
+
*/
|
|
29
|
+
include?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* Default query for the Collection
|
|
32
|
+
*/
|
|
33
|
+
scope: IQuery;
|
|
34
|
+
/**
|
|
35
|
+
* Default sort field for the Collection
|
|
36
|
+
*/
|
|
37
|
+
sortField?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Default sort direction for the Collection
|
|
40
|
+
*/
|
|
41
|
+
sortDirection?: "asc" | "desc";
|
|
42
|
+
}
|
|
43
|
+
export declare type EntityType = "item" | "group" | "user" | "groupMember" | "event";
|
|
44
|
+
export interface IQuery {
|
|
45
|
+
/**
|
|
46
|
+
* What entity is this query targeting. This is used internally to
|
|
47
|
+
* ensure we query the correct API
|
|
48
|
+
*/
|
|
49
|
+
targetEntity: EntityType;
|
|
50
|
+
/**
|
|
51
|
+
* Filters that make up the query
|
|
52
|
+
*/
|
|
53
|
+
filters: IFilter[];
|
|
54
|
+
/**
|
|
55
|
+
* Additional properties. Useful for groupMember queries
|
|
56
|
+
* where we need to send in the groupId to construct the url
|
|
57
|
+
*/
|
|
58
|
+
properties?: Record<string, any>;
|
|
59
|
+
}
|
|
60
|
+
export interface IFilter {
|
|
61
|
+
/**
|
|
62
|
+
* Operation used to combine the predicates
|
|
63
|
+
*/
|
|
64
|
+
operation?: "AND" | "OR";
|
|
65
|
+
/**
|
|
66
|
+
* Predicates
|
|
67
|
+
*/
|
|
68
|
+
predicates: IPredicate[];
|
|
69
|
+
}
|
|
70
|
+
export interface IPredicate extends Record<string, any> {
|
|
71
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IFacet } from "./IFacet";
|
|
2
|
+
import { IHubAggregation } from "./IHubAggregation";
|
|
2
3
|
/**
|
|
3
4
|
* Defines a generic search response interface with parameterized result type
|
|
4
5
|
* for different types of searches
|
|
@@ -13,5 +14,6 @@ export interface IHubSearchResponse<T> {
|
|
|
13
14
|
results: T[];
|
|
14
15
|
hasNext: boolean;
|
|
15
16
|
next: (params?: any) => Promise<IHubSearchResponse<T>>;
|
|
17
|
+
aggregations?: IHubAggregation[];
|
|
16
18
|
facets?: IFacet[];
|
|
17
19
|
}
|
|
@@ -2,8 +2,10 @@ export * from "./ICatalog";
|
|
|
2
2
|
export * from "./ICollection";
|
|
3
3
|
export * from "./IFacet";
|
|
4
4
|
export * from "./IFacetOption";
|
|
5
|
+
export * from "./IHubAggregation";
|
|
5
6
|
export * from "./IHubApiSearchRequest";
|
|
6
7
|
export * from "./IHubSearchOptions";
|
|
7
8
|
export * from "./IHubSearchResult";
|
|
8
9
|
export * from "./IHubSearchResponse";
|
|
9
10
|
export * from "./types";
|
|
11
|
+
export * from "./IHubCatalog";
|