@esri/hub-common 9.49.1 → 10.0.0-next.3
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/categories.js +4 -2
- package/dist/es2017/categories.js.map +1 -1
- package/dist/es2017/collections.js +3 -8
- package/dist/es2017/collections.js.map +1 -1
- package/dist/es2017/content/compose.js +1 -18
- package/dist/es2017/content/compose.js.map +1 -1
- package/dist/es2017/content/get-family.js +1 -3
- package/dist/es2017/content/get-family.js.map +1 -1
- package/dist/es2017/content/index.js +8 -71
- package/dist/es2017/content/index.js.map +1 -1
- package/dist/es2017/extent.js +1 -14
- package/dist/es2017/extent.js.map +1 -1
- package/dist/es2017/index.js +1 -0
- package/dist/es2017/index.js.map +1 -1
- package/dist/es2017/projects/HubProjectManager.js +0 -8
- package/dist/es2017/projects/HubProjectManager.js.map +1 -1
- package/dist/es2017/projects/HubProjects.js.map +1 -1
- package/dist/es2017/search/_internal/hubSearchItems.js +3 -137
- package/dist/es2017/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/es2017/search/_internal/index.js +0 -1
- package/dist/es2017/search/_internal/index.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchGroups.js +0 -1
- package/dist/es2017/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchItems.js +4 -29
- package/dist/es2017/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/es2017/search/_internal/portalSearchUsers.js +0 -1
- package/dist/es2017/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/es2017/search/hubSearch.js +0 -16
- package/dist/es2017/search/hubSearch.js.map +1 -1
- package/dist/es2017/search/index.js +0 -9
- package/dist/es2017/search/index.js.map +1 -1
- package/dist/es2017/search/serializeQueryForPortal.js +0 -1
- package/dist/es2017/search/serializeQueryForPortal.js.map +1 -1
- package/dist/es2017/search/types/index.js +0 -5
- package/dist/es2017/search/types/index.js.map +1 -1
- package/dist/es2017/search/upgradeCatalogSchema.js +0 -8
- package/dist/es2017/search/upgradeCatalogSchema.js.map +1 -1
- package/dist/es2017/search/utils.js +1 -207
- package/dist/es2017/search/utils.js.map +1 -1
- package/dist/es2017/sites/fetchSiteModel.js +0 -9
- package/dist/es2017/sites/fetchSiteModel.js.map +1 -1
- package/dist/es2017/types.js.map +1 -1
- package/dist/esm/categories.js +4 -2
- package/dist/esm/categories.js.map +1 -1
- package/dist/esm/collections.js +3 -8
- package/dist/esm/collections.js.map +1 -1
- package/dist/esm/content/compose.js +1 -18
- package/dist/esm/content/compose.js.map +1 -1
- package/dist/esm/content/get-family.js +1 -3
- package/dist/esm/content/get-family.js.map +1 -1
- package/dist/esm/content/index.js +8 -71
- package/dist/esm/content/index.js.map +1 -1
- package/dist/esm/extent.js +1 -14
- package/dist/esm/extent.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/projects/HubProjectManager.js +0 -12
- package/dist/esm/projects/HubProjectManager.js.map +1 -1
- package/dist/esm/projects/HubProjects.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItems.js +4 -146
- package/dist/esm/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/index.js +0 -1
- package/dist/esm/search/_internal/index.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchGroups.js +0 -1
- package/dist/esm/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js +5 -29
- package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchUsers.js +0 -1
- package/dist/esm/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/esm/search/hubSearch.js +0 -20
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/index.js +0 -9
- package/dist/esm/search/index.js.map +1 -1
- package/dist/esm/search/serializeQueryForPortal.js +0 -1
- package/dist/esm/search/serializeQueryForPortal.js.map +1 -1
- package/dist/esm/search/types/index.js +0 -5
- package/dist/esm/search/types/index.js.map +1 -1
- package/dist/esm/search/upgradeCatalogSchema.js +0 -8
- package/dist/esm/search/upgradeCatalogSchema.js.map +1 -1
- package/dist/esm/search/utils.js +1 -204
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/esm/sites/fetchSiteModel.js +0 -9
- package/dist/esm/sites/fetchSiteModel.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/node/categories.js +4 -2
- package/dist/node/categories.js.map +1 -1
- package/dist/node/collections.js +3 -8
- package/dist/node/collections.js.map +1 -1
- package/dist/node/content/compose.js +1 -18
- package/dist/node/content/compose.js.map +1 -1
- package/dist/node/content/get-family.js +1 -3
- package/dist/node/content/get-family.js.map +1 -1
- package/dist/node/content/index.js +9 -73
- package/dist/node/content/index.js.map +1 -1
- package/dist/node/extent.js +2 -16
- package/dist/node/extent.js.map +1 -1
- package/dist/node/index.js +1 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/projects/HubProjectManager.js +0 -8
- package/dist/node/projects/HubProjectManager.js.map +1 -1
- package/dist/node/projects/HubProjects.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItems.js +4 -139
- package/dist/node/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/node/search/_internal/index.js +0 -1
- package/dist/node/search/_internal/index.js.map +1 -1
- package/dist/node/search/_internal/portalSearchGroups.js +0 -1
- package/dist/node/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/node/search/_internal/portalSearchItems.js +4 -29
- package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/node/search/_internal/portalSearchUsers.js +0 -1
- package/dist/node/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/node/search/hubSearch.js +1 -18
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/index.js +0 -9
- package/dist/node/search/index.js.map +1 -1
- package/dist/node/search/serializeQueryForPortal.js +0 -1
- package/dist/node/search/serializeQueryForPortal.js.map +1 -1
- package/dist/node/search/types/index.js +0 -5
- package/dist/node/search/types/index.js.map +1 -1
- package/dist/node/search/upgradeCatalogSchema.js +1 -10
- package/dist/node/search/upgradeCatalogSchema.js.map +1 -1
- package/dist/node/search/utils.js +1 -213
- package/dist/node/search/utils.js.map +1 -1
- package/dist/node/sites/fetchSiteModel.js +1 -11
- package/dist/node/sites/fetchSiteModel.js.map +1 -1
- package/dist/node/types.js.map +1 -1
- package/dist/types/collections.d.ts +1 -6
- package/dist/types/content/_internal.d.ts +0 -3
- package/dist/types/content/get-family.d.ts +1 -1
- package/dist/types/content/index.d.ts +3 -36
- package/dist/types/core/types/IHubContent.d.ts +0 -3
- package/dist/types/core/types/IServerEnrichments.d.ts +0 -2
- package/dist/types/extent.d.ts +0 -2
- package/dist/types/projects/HubProjectManager.d.ts +0 -1
- package/dist/types/search/_internal/hubSearchItems.d.ts +3 -4
- package/dist/types/search/_internal/index.d.ts +0 -1
- package/dist/types/search/_internal/portalSearchItems.d.ts +15 -15
- package/dist/types/search/hubSearch.d.ts +0 -13
- package/dist/types/search/index.d.ts +0 -9
- package/dist/types/search/types/IHubSearchOptions.d.ts +1 -17
- package/dist/types/search/types/IHubSearchResponse.d.ts +0 -5
- package/dist/types/search/types/IHubSearchResult.d.ts +0 -39
- package/dist/types/search/types/index.d.ts +0 -5
- package/dist/types/search/types/types.d.ts +0 -206
- package/dist/types/search/upgradeCatalogSchema.d.ts +0 -5
- package/dist/types/search/utils.d.ts +2 -58
- package/dist/types/sites/fetchSiteModel.d.ts +2 -6
- package/dist/types/types.d.ts +0 -70
- package/dist/umd/common.umd.js +42 -1900
- package/dist/umd/common.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/es2017/search/_internal/state.js +0 -155
- package/dist/es2017/search/_internal/state.js.map +0 -1
- package/dist/es2017/search/_searchContent.js +0 -116
- package/dist/es2017/search/_searchContent.js.map +0 -1
- package/dist/es2017/search/_searchGroups.js +0 -88
- package/dist/es2017/search/_searchGroups.js.map +0 -1
- package/dist/es2017/search/_searchUsers.js +0 -89
- package/dist/es2017/search/_searchUsers.js.map +0 -1
- package/dist/es2017/search/collectionState.js +0 -60
- package/dist/es2017/search/collectionState.js.map +0 -1
- package/dist/es2017/search/content-utils.js +0 -455
- package/dist/es2017/search/content-utils.js.map +0 -1
- package/dist/es2017/search/filter-utils.js +0 -31
- package/dist/es2017/search/filter-utils.js.map +0 -1
- package/dist/es2017/search/group-utils.js +0 -142
- package/dist/es2017/search/group-utils.js.map +0 -1
- package/dist/es2017/search/hub-api-search.js +0 -19
- package/dist/es2017/search/hub-api-search.js.map +0 -1
- package/dist/es2017/search/types/ICatalog.js +0 -1
- package/dist/es2017/search/types/ICatalog.js.map +0 -1
- package/dist/es2017/search/types/ICollection.js +0 -1
- package/dist/es2017/search/types/ICollection.js.map +0 -1
- package/dist/es2017/search/types/IFacet.js +0 -1
- package/dist/es2017/search/types/IFacet.js.map +0 -1
- package/dist/es2017/search/types/IFacetOption.js +0 -1
- package/dist/es2017/search/types/IFacetOption.js.map +0 -1
- package/dist/es2017/search/types/IHubApiSearchRequest.js +0 -1
- package/dist/es2017/search/types/IHubApiSearchRequest.js.map +0 -1
- package/dist/es2017/search/user-utils.js +0 -139
- package/dist/es2017/search/user-utils.js.map +0 -1
- package/dist/esm/search/_internal/state.js +0 -155
- package/dist/esm/search/_internal/state.js.map +0 -1
- package/dist/esm/search/_searchContent.js +0 -118
- package/dist/esm/search/_searchContent.js.map +0 -1
- package/dist/esm/search/_searchGroups.js +0 -91
- package/dist/esm/search/_searchGroups.js.map +0 -1
- package/dist/esm/search/_searchUsers.js +0 -92
- package/dist/esm/search/_searchUsers.js.map +0 -1
- package/dist/esm/search/collectionState.js +0 -61
- package/dist/esm/search/collectionState.js.map +0 -1
- package/dist/esm/search/content-utils.js +0 -462
- package/dist/esm/search/content-utils.js.map +0 -1
- package/dist/esm/search/filter-utils.js +0 -31
- package/dist/esm/search/filter-utils.js.map +0 -1
- package/dist/esm/search/group-utils.js +0 -146
- package/dist/esm/search/group-utils.js.map +0 -1
- package/dist/esm/search/hub-api-search.js +0 -20
- package/dist/esm/search/hub-api-search.js.map +0 -1
- package/dist/esm/search/types/ICatalog.js +0 -1
- package/dist/esm/search/types/ICatalog.js.map +0 -1
- package/dist/esm/search/types/ICollection.js +0 -1
- package/dist/esm/search/types/ICollection.js.map +0 -1
- package/dist/esm/search/types/IFacet.js +0 -1
- package/dist/esm/search/types/IFacet.js.map +0 -1
- package/dist/esm/search/types/IFacetOption.js +0 -1
- package/dist/esm/search/types/IFacetOption.js.map +0 -1
- package/dist/esm/search/types/IHubApiSearchRequest.js +0 -1
- package/dist/esm/search/types/IHubApiSearchRequest.js.map +0 -1
- package/dist/esm/search/user-utils.js +0 -143
- package/dist/esm/search/user-utils.js.map +0 -1
- package/dist/node/search/_internal/state.js +0 -166
- package/dist/node/search/_internal/state.js.map +0 -1
- package/dist/node/search/_searchContent.js +0 -120
- package/dist/node/search/_searchContent.js.map +0 -1
- package/dist/node/search/_searchGroups.js +0 -92
- package/dist/node/search/_searchGroups.js.map +0 -1
- package/dist/node/search/_searchUsers.js +0 -93
- package/dist/node/search/_searchUsers.js.map +0 -1
- package/dist/node/search/collectionState.js +0 -65
- package/dist/node/search/collectionState.js.map +0 -1
- package/dist/node/search/content-utils.js +0 -466
- package/dist/node/search/content-utils.js.map +0 -1
- package/dist/node/search/filter-utils.js +0 -36
- package/dist/node/search/filter-utils.js.map +0 -1
- package/dist/node/search/group-utils.js +0 -148
- package/dist/node/search/group-utils.js.map +0 -1
- package/dist/node/search/hub-api-search.js +0 -23
- package/dist/node/search/hub-api-search.js.map +0 -1
- package/dist/node/search/types/ICatalog.js +0 -3
- package/dist/node/search/types/ICatalog.js.map +0 -1
- package/dist/node/search/types/ICollection.js +0 -3
- package/dist/node/search/types/ICollection.js.map +0 -1
- package/dist/node/search/types/IFacet.js +0 -3
- package/dist/node/search/types/IFacet.js.map +0 -1
- package/dist/node/search/types/IFacetOption.js +0 -3
- package/dist/node/search/types/IFacetOption.js.map +0 -1
- package/dist/node/search/types/IHubApiSearchRequest.js +0 -3
- package/dist/node/search/types/IHubApiSearchRequest.js.map +0 -1
- package/dist/node/search/user-utils.js +0 -145
- package/dist/node/search/user-utils.js.map +0 -1
- package/dist/types/search/_internal/state.d.ts +0 -70
- package/dist/types/search/_searchContent.d.ts +0 -9
- package/dist/types/search/_searchGroups.d.ts +0 -17
- package/dist/types/search/_searchUsers.d.ts +0 -31
- package/dist/types/search/collectionState.d.ts +0 -19
- package/dist/types/search/content-utils.d.ts +0 -83
- package/dist/types/search/filter-utils.d.ts +0 -13
- package/dist/types/search/group-utils.d.ts +0 -36
- package/dist/types/search/hub-api-search.d.ts +0 -10
- package/dist/types/search/types/ICatalog.d.ts +0 -87
- package/dist/types/search/types/ICollection.d.ts +0 -28
- package/dist/types/search/types/IFacet.d.ts +0 -62
- package/dist/types/search/types/IFacetOption.d.ts +0 -30
- package/dist/types/search/types/IHubApiSearchRequest.d.ts +0 -16
- package/dist/types/search/user-utils.d.ts +0 -35
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
-
import { EntityType, IHubRequestOptions
|
|
2
|
+
import { EntityType, IHubRequestOptions } from "../../index";
|
|
3
3
|
import { NamedApis, IApiDefinition } from "./types";
|
|
4
4
|
export declare type Enrichments = "data" | "metadata" | "org" | "service" | "layers";
|
|
5
5
|
/**
|
|
@@ -38,10 +38,6 @@ export interface IHubSearchOptions {
|
|
|
38
38
|
* Objects or fields to include e.g. `server.layers AS serverLayers`
|
|
39
39
|
*/
|
|
40
40
|
include?: string[];
|
|
41
|
-
/**
|
|
42
|
-
* DEPRECATED: Use `include` instead
|
|
43
|
-
*/
|
|
44
|
-
enrichments?: Enrichments[];
|
|
45
41
|
/**
|
|
46
42
|
* Specify what entity to search for; For use with hubSearch
|
|
47
43
|
*/
|
|
@@ -66,16 +62,4 @@ export interface IHubSearchOptions {
|
|
|
66
62
|
* The result number of the first entry in the result set response. The start parameter, along with the num parameter, can be used to paginate the search results.
|
|
67
63
|
*/
|
|
68
64
|
start?: number;
|
|
69
|
-
/**
|
|
70
|
-
* DEPRECATED
|
|
71
|
-
*/
|
|
72
|
-
aggregations?: string[];
|
|
73
|
-
/**
|
|
74
|
-
* DEPRECATED
|
|
75
|
-
*/
|
|
76
|
-
site?: IModel;
|
|
77
|
-
/**
|
|
78
|
-
* DEPRECATED
|
|
79
|
-
*/
|
|
80
|
-
fields?: string;
|
|
81
65
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IMessage } from "../../types/IMessage";
|
|
2
|
-
import { IFacet } from "./IFacet";
|
|
3
2
|
import { IHubAggregation } from "./IHubAggregation";
|
|
4
3
|
/**
|
|
5
4
|
* Defines a generic search response interface with parameterized result type
|
|
@@ -35,8 +34,4 @@ export interface IHubSearchResponse<T> {
|
|
|
35
34
|
* Array of messages / warnings
|
|
36
35
|
*/
|
|
37
36
|
messages?: IMessage[];
|
|
38
|
-
/**
|
|
39
|
-
* DEPRECATED - hub.js no longer computes facets; consumers need to construct them from aggregations
|
|
40
|
-
*/
|
|
41
|
-
facets?: IFacet[];
|
|
42
37
|
}
|
|
@@ -30,38 +30,6 @@ export interface IHubSearchResult extends IHubEntityBase {
|
|
|
30
30
|
* Owner; Applies to Items and Groups
|
|
31
31
|
*/
|
|
32
32
|
owner?: string;
|
|
33
|
-
/**
|
|
34
|
-
* DEPRECATED use links.thumbnail
|
|
35
|
-
* Fully qualified thumbnail url for items, groups, users
|
|
36
|
-
* Will not have the token appended. Consuming app needs to
|
|
37
|
-
* check the value of `access` and apply the token as needed
|
|
38
|
-
*/
|
|
39
|
-
thumbnailUrl?: string;
|
|
40
|
-
/**
|
|
41
|
-
* DEPRECATED - use links
|
|
42
|
-
* Hash of pre-computed urls
|
|
43
|
-
*/
|
|
44
|
-
urls?: {
|
|
45
|
-
/**
|
|
46
|
-
* DEPRECATED - use links
|
|
47
|
-
* Canononical ArcGIS Online Url for this entity (if applicable)
|
|
48
|
-
*/
|
|
49
|
-
portalHome?: string;
|
|
50
|
-
/**
|
|
51
|
-
* DEPRECATED - use links
|
|
52
|
-
* Relative url, which can be appended to a Site's root Url
|
|
53
|
-
* e.g. /datasets/3ef8c7a, or /events/june-meeting
|
|
54
|
-
* This is much easier than passing a Site into the search
|
|
55
|
-
* system so the full url can be computed
|
|
56
|
-
*/
|
|
57
|
-
relative: string;
|
|
58
|
-
/**
|
|
59
|
-
* DEPRECATED - use links
|
|
60
|
-
* Allow for arbitrary other urls, including `.customUrl` which
|
|
61
|
-
* can ben generated client-side in the gallery via a callback
|
|
62
|
-
*/
|
|
63
|
-
[key: string]: string;
|
|
64
|
-
};
|
|
65
33
|
/**
|
|
66
34
|
* Links to related things
|
|
67
35
|
*/
|
|
@@ -92,13 +60,6 @@ export interface IHubSearchResult extends IHubEntityBase {
|
|
|
92
60
|
* or the extent of a layer
|
|
93
61
|
*/
|
|
94
62
|
geometry?: IHubGeography;
|
|
95
|
-
/**
|
|
96
|
-
* DEPRECATED - includes/enrichments are directly attached
|
|
97
|
-
* Optional metadata hash
|
|
98
|
-
* Any specified enrichments will be attached in here, as well
|
|
99
|
-
* as tags, typekeywords and culture
|
|
100
|
-
*/
|
|
101
|
-
metadata?: Record<string, any>;
|
|
102
63
|
/** Allow any additional properties to be added */
|
|
103
64
|
[key: string]: any;
|
|
104
65
|
}
|
|
@@ -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
|
}
|
|
@@ -5,8 +5,3 @@ import { IHubCatalog } from "./types";
|
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
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
|
*
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { IHubRequestOptions
|
|
1
|
+
import { IHubRequestOptions } from "..";
|
|
2
2
|
/**
|
|
3
3
|
* Returns site model given various kinds of identifier
|
|
4
4
|
*
|
|
5
5
|
* @param identifier - a site item ID, site hostname, enterprise site slug, or full site URL
|
|
6
6
|
* @param hubRequestOptions
|
|
7
7
|
*/
|
|
8
|
-
export declare function fetchSiteModel(identifier: string, hubRequestOptions: IHubRequestOptions): Promise<IModel>;
|
|
9
|
-
/**
|
|
10
|
-
* @private // keep out of docs
|
|
11
|
-
*/
|
|
12
|
-
export declare function fetchSite(identifier: string, hubRequestOptions: IHubRequestOptions): Promise<IModel>;
|
|
8
|
+
export declare function fetchSiteModel(identifier: string, hubRequestOptions: IHubRequestOptions): Promise<import("..").IModel>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -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
|
|
@@ -106,7 +105,6 @@ export interface IItemResource {
|
|
|
106
105
|
name: string;
|
|
107
106
|
}
|
|
108
107
|
export declare type BBox = number[][];
|
|
109
|
-
export declare type IBBox = number[][];
|
|
110
108
|
export declare type IBatch = any[];
|
|
111
109
|
export declare type IBatchTransform = (value: any) => any;
|
|
112
110
|
export interface IGetSurveyModelsResponse {
|
|
@@ -129,11 +127,6 @@ export interface IRevertableTaskFailed {
|
|
|
129
127
|
error: Error;
|
|
130
128
|
}
|
|
131
129
|
export declare type IRevertableTaskResult = IRevertableTaskSuccess | IRevertableTaskFailed;
|
|
132
|
-
/**
|
|
133
|
-
* Types of Hub resources
|
|
134
|
-
* DEPRECATED: Use HubFamily instead
|
|
135
|
-
*/
|
|
136
|
-
export declare type HubType = "member" | "team" | "event" | "dataset" | "document" | "map" | "app" | "site" | "initiative" | "template" | "organization";
|
|
137
130
|
export declare type HubFamily = "app" | "content" | "dataset" | "document" | "event" | "feedback" | "initiative" | "map" | "people" | "site" | "team" | "template" | "project";
|
|
138
131
|
/**
|
|
139
132
|
* Visibility levels of a Hub resource
|
|
@@ -167,53 +160,6 @@ export interface IHubGeography {
|
|
|
167
160
|
}
|
|
168
161
|
export declare type SearchableType = IItem | IGroup | IUser;
|
|
169
162
|
export declare type SearchFunction = (...args: any[]) => Promise<ISearchResult<SearchableType>>;
|
|
170
|
-
/**
|
|
171
|
-
* DEPRECATED: Use IHubEntityBase instead.
|
|
172
|
-
* Properties that are common to Hub content, community, members, etc
|
|
173
|
-
*
|
|
174
|
-
* @export
|
|
175
|
-
* @interface IHubResource
|
|
176
|
-
*/
|
|
177
|
-
export interface IHubResource {
|
|
178
|
-
/** Generic term for the primary label (title, fullname, username, etc.) */
|
|
179
|
-
name: string;
|
|
180
|
-
/** Content snippet or other summary */
|
|
181
|
-
summary?: string;
|
|
182
|
-
/** Type of Hub resource */
|
|
183
|
-
hubType: HubType;
|
|
184
|
-
/** Date the item was created */
|
|
185
|
-
createdDate: Date;
|
|
186
|
-
/**
|
|
187
|
-
* description of what was used for this attribute
|
|
188
|
-
* the item key, e.g. `item.created` or `item.metadata.created_date`
|
|
189
|
-
*/
|
|
190
|
-
createdDateSource?: string;
|
|
191
|
-
/** Date the item was last updated */
|
|
192
|
-
updatedDate: Date;
|
|
193
|
-
/**
|
|
194
|
-
* description of what was used for this attribute
|
|
195
|
-
* the item key, e.g. `item.modified` or `item.metadata.modified_date`
|
|
196
|
-
*/
|
|
197
|
-
updatedDateSource?: string;
|
|
198
|
-
/** URL of the resource"s page in the Portal Home application */
|
|
199
|
-
portalHomeUrl?: string;
|
|
200
|
-
/** URL of the Portal API endpoint for the resource */
|
|
201
|
-
portalApiUrl?: string;
|
|
202
|
-
/** Fully qualified URL for the item"s thumbnail, including current user"s token if authenticated and required */
|
|
203
|
-
thumbnailUrl?: string;
|
|
204
|
-
/**
|
|
205
|
-
* boundary will default to the item extent
|
|
206
|
-
* but can be overwritten by enrichments from the Hub API (inline)
|
|
207
|
-
* or fetched from a location such as /resources/boundary.json
|
|
208
|
-
*/
|
|
209
|
-
boundary?: IHubGeography;
|
|
210
|
-
/**
|
|
211
|
-
* Additional metadata from a metadata document using a formal or custom schema.
|
|
212
|
-
* For example, [item metadata in ArcGIS Online](https://doc.arcgis.com/en/arcgis-online/manage-data/metadata.htm)
|
|
213
|
-
* Metadata stored in XML format is parsed into JSON.
|
|
214
|
-
*/
|
|
215
|
-
metadata?: any;
|
|
216
|
-
}
|
|
217
163
|
/**
|
|
218
164
|
* Information about an error that occurred while indexing or composing content
|
|
219
165
|
*/
|
|
@@ -303,21 +249,6 @@ export interface IDomainEntry {
|
|
|
303
249
|
sslOnly: boolean;
|
|
304
250
|
updatedAt?: string;
|
|
305
251
|
}
|
|
306
|
-
/**
|
|
307
|
-
* The catalog object found on Hub Site Application items.
|
|
308
|
-
* It defines a selection of content to show up in the site"s
|
|
309
|
-
* search context.
|
|
310
|
-
*/
|
|
311
|
-
export interface ISiteCatalog {
|
|
312
|
-
/**
|
|
313
|
-
* A list of groups containing searchable content.
|
|
314
|
-
*/
|
|
315
|
-
groups: string[];
|
|
316
|
-
/**
|
|
317
|
-
* An org to limit searching to.
|
|
318
|
-
*/
|
|
319
|
-
orgId: string;
|
|
320
|
-
}
|
|
321
252
|
export interface IHubTeam extends IGroup {
|
|
322
253
|
properties: {
|
|
323
254
|
[key: string]: any;
|
|
@@ -337,7 +268,6 @@ export interface ISearchResponse<T> {
|
|
|
337
268
|
results: T[];
|
|
338
269
|
hasNext: boolean;
|
|
339
270
|
next: (params?: any) => Promise<ISearchResponse<T>>;
|
|
340
|
-
facets?: IFacet[];
|
|
341
271
|
}
|
|
342
272
|
/**
|
|
343
273
|
* ENUM which defines File extensions.
|