@esri/hub-common 9.31.3 → 9.32.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.
- package/dist/es2017/core/types/index.js +1 -0
- package/dist/es2017/core/types/index.js.map +1 -1
- package/dist/es2017/core/types/types.js +1 -0
- package/dist/es2017/core/types/types.js.map +1 -0
- package/dist/es2017/search/types/IHubApiSearchRequest.js +1 -0
- package/dist/es2017/search/types/IHubApiSearchRequest.js.map +1 -0
- package/dist/es2017/search/types/IHubSearchOptions.js +1 -0
- package/dist/es2017/search/types/IHubSearchOptions.js.map +1 -0
- package/dist/es2017/search/types/IHubSearchResult.js +1 -0
- package/dist/es2017/search/types/IHubSearchResult.js.map +1 -0
- package/dist/es2017/search/types/index.js +3 -0
- package/dist/es2017/search/types/index.js.map +1 -1
- package/dist/esm/core/types/index.js +1 -0
- package/dist/esm/core/types/index.js.map +1 -1
- package/dist/esm/core/types/types.js +1 -0
- package/dist/esm/core/types/types.js.map +1 -0
- package/dist/esm/search/types/IHubApiSearchRequest.js +1 -0
- package/dist/esm/search/types/IHubApiSearchRequest.js.map +1 -0
- package/dist/esm/search/types/IHubSearchOptions.js +1 -0
- package/dist/esm/search/types/IHubSearchOptions.js.map +1 -0
- package/dist/esm/search/types/IHubSearchResult.js +1 -0
- package/dist/esm/search/types/IHubSearchResult.js.map +1 -0
- package/dist/esm/search/types/index.js +3 -0
- package/dist/esm/search/types/index.js.map +1 -1
- package/dist/node/core/types/index.js +1 -0
- package/dist/node/core/types/index.js.map +1 -1
- package/dist/node/core/types/types.js +3 -0
- package/dist/node/core/types/types.js.map +1 -0
- package/dist/node/search/types/IHubApiSearchRequest.js +3 -0
- package/dist/node/search/types/IHubApiSearchRequest.js.map +1 -0
- package/dist/node/search/types/IHubSearchOptions.js +3 -0
- package/dist/node/search/types/IHubSearchOptions.js.map +1 -0
- package/dist/node/search/types/IHubSearchResult.js +3 -0
- package/dist/node/search/types/IHubSearchResult.js.map +1 -0
- package/dist/node/search/types/index.js +3 -0
- package/dist/node/search/types/index.js.map +1 -1
- package/dist/types/content/_internal.d.ts +1 -0
- package/dist/types/core/types/IHubEntityBase.d.ts +15 -5
- package/dist/types/core/types/IHubEntityManager.d.ts +2 -1
- package/dist/types/core/types/index.d.ts +1 -0
- package/dist/types/core/types/types.d.ts +4 -0
- package/dist/types/search/types/IFacet.d.ts +46 -5
- package/dist/types/search/types/IFacetOption.d.ts +23 -1
- package/dist/types/search/types/IHubApiSearchRequest.d.ts +16 -0
- package/dist/types/search/types/IHubSearchOptions.d.ts +26 -0
- package/dist/types/search/types/IHubSearchResult.d.ts +60 -0
- package/dist/types/search/types/index.d.ts +3 -0
- package/dist/types/search/types/types.d.ts +20 -25
- package/dist/types/types.d.ts +1 -1
- package/dist/umd/common.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/types/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=IHubApiSearchRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubApiSearchRequest.js","sourceRoot":"","sources":["../../../../src/search/types/IHubApiSearchRequest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=IHubSearchOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubSearchOptions.js","sourceRoot":"","sources":["../../../../src/search/types/IHubSearchOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=IHubSearchResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubSearchResult.js","sourceRoot":"","sources":["../../../../src/search/types/IHubSearchResult.ts"],"names":[],"mappings":""}
|
|
@@ -2,5 +2,8 @@ export * from "./ICatalog";
|
|
|
2
2
|
export * from "./ICollection";
|
|
3
3
|
export * from "./IFacet";
|
|
4
4
|
export * from "./IFacetOption";
|
|
5
|
+
export * from "./IHubApiSearchRequest";
|
|
6
|
+
export * from "./IHubSearchOptions";
|
|
7
|
+
export * from "./IHubSearchResult";
|
|
5
8
|
export * from "./types";
|
|
6
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/search/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/search/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/types/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=IHubApiSearchRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubApiSearchRequest.js","sourceRoot":"","sources":["../../../../src/search/types/IHubApiSearchRequest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=IHubSearchOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubSearchOptions.js","sourceRoot":"","sources":["../../../../src/search/types/IHubSearchOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=IHubSearchResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubSearchResult.js","sourceRoot":"","sources":["../../../../src/search/types/IHubSearchResult.ts"],"names":[],"mappings":""}
|
|
@@ -2,5 +2,8 @@ export * from "./ICatalog";
|
|
|
2
2
|
export * from "./ICollection";
|
|
3
3
|
export * from "./IFacet";
|
|
4
4
|
export * from "./IFacetOption";
|
|
5
|
+
export * from "./IHubApiSearchRequest";
|
|
6
|
+
export * from "./IHubSearchOptions";
|
|
7
|
+
export * from "./IHubSearchResult";
|
|
5
8
|
export * from "./types";
|
|
6
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/search/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/search/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
|
|
@@ -18,4 +18,5 @@ tslib_1.__exportStar(require("./IHubSiteTheme"), exports);
|
|
|
18
18
|
tslib_1.__exportStar(require("./IHubTimeline"), exports);
|
|
19
19
|
tslib_1.__exportStar(require("./IItemEnrichments"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./IServerEnrichments"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,mEAAyC;AACzC,2DAAiC;AACjC,8DAAoC;AACpC,sDAA4B;AAC5B,sDAA4B;AAC5B,2DAAiC;AACjC,2DAAiC;AACjC,kEAAwC;AACxC,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B;AAC9B,qDAA2B;AAC3B,0DAAgC;AAChC,yDAA+B;AAC/B,6DAAmC;AACnC,+DAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,mEAAyC;AACzC,2DAAiC;AACjC,8DAAoC;AACpC,sDAA4B;AAC5B,sDAA4B;AAC5B,2DAAiC;AACjC,2DAAiC;AACjC,kEAAwC;AACxC,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B;AAC9B,qDAA2B;AAC3B,0DAAgC;AAChC,yDAA+B;AAC/B,6DAAmC;AACnC,+DAAqC;AACrC,kDAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/types/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubApiSearchRequest.js","sourceRoot":"","sources":["../../../../src/search/types/IHubApiSearchRequest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubSearchOptions.js","sourceRoot":"","sources":["../../../../src/search/types/IHubSearchOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHubSearchResult.js","sourceRoot":"","sources":["../../../../src/search/types/IHubSearchResult.ts"],"names":[],"mappings":""}
|
|
@@ -5,5 +5,8 @@ tslib_1.__exportStar(require("./ICatalog"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./ICollection"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./IFacet"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./IFacetOption"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./IHubApiSearchRequest"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./IHubSearchOptions"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./IHubSearchResult"), exports);
|
|
8
11
|
tslib_1.__exportStar(require("./types"), exports);
|
|
9
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/search/types/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,wDAA8B;AAC9B,mDAAyB;AACzB,yDAA+B;AAC/B,kDAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/search/types/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,wDAA8B;AAC9B,mDAAyB;AACzB,yDAA+B;AAC/B,iEAAuC;AACvC,8DAAoC;AACpC,6DAAmC;AACnC,kDAAwB"}
|
|
@@ -14,8 +14,8 @@ export interface IHubEntityBase {
|
|
|
14
14
|
*/
|
|
15
15
|
name: string;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Sanitized summary derived from item.snippet, item.description,
|
|
18
|
+
* group.description, user.description, event.description etc
|
|
19
19
|
*/
|
|
20
20
|
summary?: string;
|
|
21
21
|
/**
|
|
@@ -23,11 +23,14 @@ export interface IHubEntityBase {
|
|
|
23
23
|
*/
|
|
24
24
|
createdDate: Date;
|
|
25
25
|
/**
|
|
26
|
-
* Source of the creation date
|
|
26
|
+
* Source of the creation date as a property path
|
|
27
|
+
* e.q `item.created`
|
|
27
28
|
*/
|
|
28
29
|
createdDateSource: string;
|
|
29
30
|
/**
|
|
30
|
-
* Date the entity was last updated
|
|
31
|
+
* Date when the entity was last updated
|
|
32
|
+
* Depending on the entity, this could be derived
|
|
33
|
+
* in many different ways
|
|
31
34
|
*/
|
|
32
35
|
updatedDate: Date;
|
|
33
36
|
/**
|
|
@@ -35,7 +38,14 @@ export interface IHubEntityBase {
|
|
|
35
38
|
*/
|
|
36
39
|
updatedDateSource: string;
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
41
|
+
* For Item backed results, this will be `item.type`
|
|
42
|
+
* Otherwise it will be "Group", "User", "Event" etc
|
|
39
43
|
*/
|
|
40
44
|
type: string;
|
|
45
|
+
/**
|
|
46
|
+
* Source of the entity.
|
|
47
|
+
* Exact logic for this tbd, but the intent is to allow the
|
|
48
|
+
* result to be attributed to something other than "owner"
|
|
49
|
+
*/
|
|
50
|
+
source?: string;
|
|
41
51
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
2
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
|
-
import { Filter
|
|
3
|
+
import { Filter } from "../../search/types/types";
|
|
4
|
+
import { IHubSearchOptions } from "../../search/types/IHubSearchOptions";
|
|
4
5
|
import { ISearchResponse } from "../../types";
|
|
5
6
|
/**
|
|
6
7
|
* Baseline CRUD+Search functions required for all Store classes
|
|
@@ -1,15 +1,56 @@
|
|
|
1
1
|
import { IFacetOption } from "./IFacetOption";
|
|
2
|
+
/**
|
|
3
|
+
* Definition of a Facet shown in the Gallery UI.
|
|
4
|
+
*
|
|
5
|
+
* If a `field` is specified, the Facet will be "dynamic" in that
|
|
6
|
+
* it will request aggregations for the field and use the returned
|
|
7
|
+
* values to create the FacetOptions.
|
|
8
|
+
*
|
|
9
|
+
* `Facet` contains and array if `FacetOptions`. When selected
|
|
10
|
+
* in the UI, a FilterGroup is constructed from the `Facet.operation`
|
|
11
|
+
* and the `Filters` are from the selected `FacetOptions`.
|
|
12
|
+
*/
|
|
2
13
|
export interface IFacet {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Translated label for the facet
|
|
16
|
+
*/
|
|
17
|
+
label?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Unique key, used for query params and telemetry
|
|
20
|
+
*/
|
|
21
|
+
key?: string;
|
|
22
|
+
/**
|
|
23
|
+
* field to generate the facet from
|
|
24
|
+
*/
|
|
25
|
+
field?: string;
|
|
26
|
+
/**
|
|
27
|
+
* limit of aggregates returned. Max 200
|
|
28
|
+
*/
|
|
6
29
|
aggLimit?: number;
|
|
7
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Display for this facet. Not all facets will be compatible with all displays
|
|
32
|
+
*/
|
|
33
|
+
display?: "map" | "single-select" | "multi-select" | "date-range" | "histogram";
|
|
34
|
+
/**
|
|
35
|
+
* State of the Facet
|
|
36
|
+
*/
|
|
8
37
|
state?: "open" | "closed";
|
|
38
|
+
/**
|
|
39
|
+
* Individual options for this Facet
|
|
40
|
+
*/
|
|
9
41
|
options?: IFacetOption[];
|
|
10
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Operation is passed into the FilterGroup that is constructed
|
|
44
|
+
* when the Facet is serialized.
|
|
45
|
+
* Implemetations should default to "OR" if not specified
|
|
46
|
+
*/
|
|
47
|
+
operation?: "OR" | "AND";
|
|
48
|
+
/**
|
|
49
|
+
* Number of facet options to show by default. Only applies to `multi-select`, and defaults to all.
|
|
50
|
+
*/
|
|
11
51
|
optionLimit?: number;
|
|
12
52
|
accordionClosed?: boolean;
|
|
13
53
|
type?: "single-select" | "multi-select" | "date-range" | "histogram";
|
|
14
54
|
pageSize?: number;
|
|
55
|
+
aggField?: string;
|
|
15
56
|
}
|
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
import { Filter, FilterType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Facet Option shown in the UI as either a radio button or checkbox
|
|
4
|
+
*/
|
|
2
5
|
export interface IFacetOption {
|
|
6
|
+
/**
|
|
7
|
+
* Translated label for the option
|
|
8
|
+
*/
|
|
3
9
|
label: string;
|
|
10
|
+
/**
|
|
11
|
+
* Unique key, used for query params and telemetry
|
|
12
|
+
*/
|
|
4
13
|
key: string;
|
|
14
|
+
/**
|
|
15
|
+
* For aggregate based Facets, the count of entries in the index with this value
|
|
16
|
+
*/
|
|
5
17
|
count?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Is this option selected when the UI loads
|
|
20
|
+
*/
|
|
6
21
|
selected: boolean;
|
|
7
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Filters to be applied when this option is selected
|
|
24
|
+
*/
|
|
25
|
+
filters?: Array<Filter<FilterType>>;
|
|
26
|
+
/**
|
|
27
|
+
* DEPRECATED: Filter to be applied when this option is selected
|
|
28
|
+
*/
|
|
29
|
+
filter?: Filter<FilterType>;
|
|
8
30
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Filter, IFilterGroup, FilterType } from "./types";
|
|
2
|
+
import { IHubSearchOptions } from "./IHubSearchOptions";
|
|
3
|
+
/**
|
|
4
|
+
* Structure for making Hub API Search Requests
|
|
5
|
+
*/
|
|
6
|
+
export interface IHubApiSearchRequest {
|
|
7
|
+
/**
|
|
8
|
+
* Can be a string like `term:"water"`, a single filter like `{ filterType: "item", term: "water" }`
|
|
9
|
+
* or an array of IFilterGroups, which allows for complex queries.
|
|
10
|
+
*/
|
|
11
|
+
q: string | Filter<FilterType> | Array<IFilterGroup<FilterType>>;
|
|
12
|
+
/**
|
|
13
|
+
* Search options like the number of results to return, sorting, aggregations etc
|
|
14
|
+
*/
|
|
15
|
+
options: IHubSearchOptions;
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IModel } from "../..";
|
|
3
|
+
import { NamedApis, IApiDefinition } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Requestable Enrichments
|
|
6
|
+
*/
|
|
7
|
+
export declare type Enrichments = "data" | "metadata" | "org" | "service" | "layers";
|
|
8
|
+
/**
|
|
9
|
+
* Search Options
|
|
10
|
+
*/
|
|
11
|
+
export interface IHubSearchOptions {
|
|
12
|
+
aggFields?: string[];
|
|
13
|
+
aggLimit?: number;
|
|
14
|
+
api?: NamedApis | IApiDefinition;
|
|
15
|
+
authentication?: UserSession;
|
|
16
|
+
bbox?: string;
|
|
17
|
+
enrichments?: Enrichments[];
|
|
18
|
+
fields?: string;
|
|
19
|
+
num?: number;
|
|
20
|
+
page?: string;
|
|
21
|
+
sortField?: string;
|
|
22
|
+
sortOrder?: "desc" | "asc";
|
|
23
|
+
start?: number;
|
|
24
|
+
aggregations?: string[];
|
|
25
|
+
site?: IModel;
|
|
26
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { HubFamily, IHubGeography } from "../..";
|
|
2
|
+
import { AccessLevel, IHubEntityBase } from "../../core";
|
|
3
|
+
/**
|
|
4
|
+
* Standardized light-weight search result structure, applicable to all
|
|
5
|
+
* types of search results - users, groups, content, events etc
|
|
6
|
+
*/
|
|
7
|
+
export interface IHubSearchResult extends IHubEntityBase {
|
|
8
|
+
/**
|
|
9
|
+
* Access level of the backing entity
|
|
10
|
+
*/
|
|
11
|
+
access: AccessLevel;
|
|
12
|
+
/**
|
|
13
|
+
* Hub Family
|
|
14
|
+
*/
|
|
15
|
+
family: HubFamily;
|
|
16
|
+
/**
|
|
17
|
+
* Owner; Applies to Items and Groups
|
|
18
|
+
*/
|
|
19
|
+
owner?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Fully qualified thumbnail url for items, groups, users
|
|
22
|
+
* Will not have the token appended. Consuming app needs to
|
|
23
|
+
* check the value of `access` and apply the token as needed
|
|
24
|
+
*/
|
|
25
|
+
thumbnailUrl: string;
|
|
26
|
+
/**
|
|
27
|
+
* Hash of pre-computed urls
|
|
28
|
+
*/
|
|
29
|
+
urls: {
|
|
30
|
+
/**
|
|
31
|
+
* Canononical ArcGIS Online Url for this entity (if applicable)
|
|
32
|
+
*/
|
|
33
|
+
portalHome?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Relative url, which can be appended to a Site's root Url
|
|
36
|
+
* e.g. /datasets/3ef8c7a, or /events/june-meeting
|
|
37
|
+
* This is much easier than passing a Site into the search
|
|
38
|
+
* system so the full url can be computed
|
|
39
|
+
*/
|
|
40
|
+
relative: string;
|
|
41
|
+
/**
|
|
42
|
+
* Allow for arbitrary other urls, including `.customUrl` which
|
|
43
|
+
* can ben generated client-side in the gallery via a callback
|
|
44
|
+
*/
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Geometry connected to this entity
|
|
49
|
+
* For items, it will default to the extent,
|
|
50
|
+
* but may be derived from a boundary resource
|
|
51
|
+
* or the extent of a layer
|
|
52
|
+
*/
|
|
53
|
+
geometry?: IHubGeography;
|
|
54
|
+
/**
|
|
55
|
+
* Optional metadata hash
|
|
56
|
+
* Any specified enrichments will be attached in here, as well
|
|
57
|
+
* as tags, typekeywords and culture
|
|
58
|
+
*/
|
|
59
|
+
metadata?: Record<string, any>;
|
|
60
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
-
import { IHubContent,
|
|
2
|
+
import { IHubContent, AccessLevel } from "../..";
|
|
3
3
|
import { IFacet } from "./IFacet";
|
|
4
4
|
/**
|
|
5
5
|
* Generic filter used with various search functions.
|
|
@@ -24,12 +24,20 @@ import { IFacet } from "./IFacet";
|
|
|
24
24
|
export declare type Filter<T extends FilterType> = IFilterTypeMap[T] & {
|
|
25
25
|
filterType: T;
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Groups of filters with an operation specifying how the
|
|
29
|
+
* filters should be connected when serialized
|
|
30
|
+
*/
|
|
31
|
+
export interface IFilterGroup<T extends FilterType> {
|
|
32
|
+
operation?: "AND" | "OR";
|
|
33
|
+
filters: Array<Filter<T>>;
|
|
34
|
+
}
|
|
27
35
|
/**
|
|
28
36
|
* Defines the valid FilterTypes for use with `Filter<T extends FilterType>`
|
|
29
37
|
* See [Filter](../Filter)
|
|
30
38
|
*/
|
|
31
39
|
export interface IFilterTypeMap {
|
|
32
|
-
|
|
40
|
+
item: IItemFilter;
|
|
33
41
|
content: IContentFilterDefinition;
|
|
34
42
|
user: IUserFilterDefinition;
|
|
35
43
|
group: IGroupFilterDefinition;
|
|
@@ -40,17 +48,22 @@ export declare type FilterType = keyof IFilterTypeMap;
|
|
|
40
48
|
* Common set of fields that are reasonable to apply at the
|
|
41
49
|
* top level of a Catalog
|
|
42
50
|
*/
|
|
43
|
-
export interface
|
|
44
|
-
|
|
45
|
-
access?: string | string[] | IMatchOptions;
|
|
51
|
+
export interface IItemFilter {
|
|
52
|
+
access?: AccessLevel | AccessLevel[] | IMatchOptions;
|
|
46
53
|
owner?: string | string[] | IMatchOptions;
|
|
47
54
|
tags?: string | string[] | IMatchOptions;
|
|
48
55
|
created?: IDateRange<number> | IRelativeDate;
|
|
49
|
-
modified?: IDateRange<number> | IRelativeDate;
|
|
50
56
|
description?: string | string[] | IMatchOptions;
|
|
57
|
+
snippet?: string | string[] | IMatchOptions;
|
|
51
58
|
group?: string | string[] | IMatchOptions;
|
|
59
|
+
id?: string | string[] | IMatchOptions;
|
|
60
|
+
modified?: IDateRange<number> | IRelativeDate;
|
|
52
61
|
orgid?: string | string[] | IMatchOptions;
|
|
53
|
-
|
|
62
|
+
term?: string;
|
|
63
|
+
title?: string | string[] | IMatchOptions;
|
|
64
|
+
type?: string | string[] | IMatchOptions;
|
|
65
|
+
typekeywords?: string | string[] | IMatchOptions;
|
|
66
|
+
[key: string]: any;
|
|
54
67
|
}
|
|
55
68
|
/**
|
|
56
69
|
* Fields related to Content based searches
|
|
@@ -194,24 +207,6 @@ export interface IMatchOptions {
|
|
|
194
207
|
*/
|
|
195
208
|
exact?: string | string[];
|
|
196
209
|
}
|
|
197
|
-
/**
|
|
198
|
-
* Search Options
|
|
199
|
-
*/
|
|
200
|
-
export interface IHubSearchOptions {
|
|
201
|
-
site?: IModel;
|
|
202
|
-
authentication?: UserSession;
|
|
203
|
-
sortField?: string;
|
|
204
|
-
sortOrder?: "desc" | "asc";
|
|
205
|
-
page?: string;
|
|
206
|
-
start?: number;
|
|
207
|
-
num?: number;
|
|
208
|
-
aggFields?: string[];
|
|
209
|
-
aggLimit?: number;
|
|
210
|
-
bbox?: string;
|
|
211
|
-
fields?: string;
|
|
212
|
-
api?: NamedApis | IApiDefinition;
|
|
213
|
-
aggregations?: string[];
|
|
214
|
-
}
|
|
215
210
|
/**
|
|
216
211
|
* searchContent return
|
|
217
212
|
*/
|
package/dist/types/types.d.ts
CHANGED
|
@@ -134,7 +134,7 @@ export declare type IRevertableTaskResult = IRevertableTaskSuccess | IRevertable
|
|
|
134
134
|
* DEPRECATED: Use HubFamily instead
|
|
135
135
|
*/
|
|
136
136
|
export declare type HubType = "member" | "team" | "event" | "dataset" | "document" | "map" | "app" | "site" | "initiative" | "template" | "organization";
|
|
137
|
-
export declare type HubFamily = "
|
|
137
|
+
export declare type HubFamily = "app" | "content" | "dataset" | "document" | "event" | "feedback" | "initiative" | "map" | "people" | "site" | "team" | "template";
|
|
138
138
|
/**
|
|
139
139
|
* Visibility levels of a Hub resource
|
|
140
140
|
*/
|
package/dist/umd/common.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* @preserve
|
|
2
|
-
* @esri/hub-common - v9.31.
|
|
2
|
+
* @esri/hub-common - v9.31.3 - Tue May 17 2022 15:35:53 GMT+0000 (Coordinated Universal Time)
|
|
3
3
|
* Copyright (c) 2022 Environmental Systems Research Institute, Inc.
|
|
4
4
|
* Apache-2.0
|
|
5
5
|
*/
|