@esri/hub-common 9.31.2 → 9.32.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/content/_internal.js +1 -1
- package/dist/es2017/content/_internal.js.map +1 -1
- 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/content/_internal.js +1 -1
- package/dist/esm/content/_internal.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/content/_internal.js +1 -1
- package/dist/node/content/_internal.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/IHubTimeline.d.ts +2 -4
- 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 +2 -2
- package/dist/umd/common.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
2
|
+
* @esri/hub-common - v9.32.0 - Wed May 18 2022 18:25:39 GMT+0000 (Coordinated Universal Time)
|
|
3
3
|
* Copyright (c) 2022 Environmental Systems Research Institute, Inc.
|
|
4
4
|
* Apache-2.0
|
|
5
5
|
*/
|
|
@@ -6885,7 +6885,7 @@
|
|
|
6885
6885
|
*/
|
|
6886
6886
|
var isDataSourceOfItem = function (resource, item) {
|
|
6887
6887
|
var serviceUrl = item.url && parseServiceUrl(item.url);
|
|
6888
|
-
return serviceUrl && resource.linkage.includes(serviceUrl);
|
|
6888
|
+
return (serviceUrl && resource.linkage && resource.linkage.includes(serviceUrl));
|
|
6889
6889
|
};
|
|
6890
6890
|
/**
|
|
6891
6891
|
* Returns the url for an additional resource.
|