@esri/hub-common 17.21.0 → 18.1.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/esm/events/_internal/EventBusinessRules.js +19 -0
- package/dist/esm/events/_internal/EventBusinessRules.js.map +1 -1
- package/dist/esm/events/_internal/PropertyMapper.js +0 -1
- package/dist/esm/events/_internal/PropertyMapper.js.map +1 -1
- package/dist/esm/events/_internal/getPropertyMap.js +4 -0
- package/dist/esm/events/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/events/defaults.js +2 -2
- package/dist/esm/events/defaults.js.map +1 -1
- package/dist/esm/events/edit.js +1 -0
- package/dist/esm/events/edit.js.map +1 -1
- package/dist/esm/search/_internal/commonHelpers/getApi.js +7 -27
- package/dist/esm/search/_internal/commonHelpers/getApi.js.map +1 -1
- package/dist/esm/search/_internal/commonHelpers/shouldUseOgcApi.js +2 -2
- package/dist/esm/search/_internal/commonHelpers/shouldUseOgcApi.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js +4 -7
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcApiRequest.js +3 -24
- package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcApiRequest.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcItems.js +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcItems.js.map +1 -1
- package/dist/esm/search/hubSearch.js +4 -4
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/searchAssociatedContent.js +4 -4
- package/dist/esm/search/searchAssociatedContent.js.map +1 -1
- package/dist/esm/search/utils.js +0 -61
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/node/events/_internal/EventBusinessRules.js +19 -0
- package/dist/node/events/_internal/EventBusinessRules.js.map +1 -1
- package/dist/node/events/_internal/PropertyMapper.js +0 -1
- package/dist/node/events/_internal/PropertyMapper.js.map +1 -1
- package/dist/node/events/_internal/getPropertyMap.js +4 -0
- package/dist/node/events/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/events/defaults.js +2 -2
- package/dist/node/events/defaults.js.map +1 -1
- package/dist/node/events/edit.js +1 -0
- package/dist/node/events/edit.js.map +1 -1
- package/dist/node/search/_internal/commonHelpers/getApi.js +7 -27
- package/dist/node/search/_internal/commonHelpers/getApi.js.map +1 -1
- package/dist/node/search/_internal/commonHelpers/shouldUseOgcApi.js +2 -2
- package/dist/node/search/_internal/commonHelpers/shouldUseOgcApi.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js +4 -7
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/ogcApiRequest.js +3 -24
- package/dist/node/search/_internal/hubSearchItemsHelpers/ogcApiRequest.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcItems.js +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcItems.js.map +1 -1
- package/dist/node/search/hubSearch.js +4 -4
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/searchAssociatedContent.js +4 -4
- package/dist/node/search/searchAssociatedContent.js.map +1 -1
- package/dist/node/search/utils.js +1 -64
- package/dist/node/search/utils.js.map +1 -1
- package/dist/types/events/_internal/EventBusinessRules.d.ts +1 -1
- package/dist/types/search/_internal/commonHelpers/getApi.d.ts +4 -7
- package/dist/types/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.d.ts +5 -4
- package/dist/types/search/_internal/hubSearchItemsHelpers/ogcApiRequest.d.ts +5 -15
- package/dist/types/search/hubSearch.d.ts +4 -1
- package/dist/types/search/types/IHubSearchOptions.d.ts +3 -9
- package/dist/types/search/types/types.d.ts +3 -18
- package/dist/types/search/utils.d.ts +1 -21
- package/package.json +1 -1
- package/dist/esm/search/_internal/commonHelpers/getDiscussionsApiDefinition.js +0 -10
- package/dist/esm/search/_internal/commonHelpers/getDiscussionsApiDefinition.js.map +0 -1
- package/dist/esm/search/_internal/commonHelpers/getOgcApiDefinition.js +0 -20
- package/dist/esm/search/_internal/commonHelpers/getOgcApiDefinition.js.map +0 -1
- package/dist/node/search/_internal/commonHelpers/getDiscussionsApiDefinition.js +0 -14
- package/dist/node/search/_internal/commonHelpers/getDiscussionsApiDefinition.js.map +0 -1
- package/dist/node/search/_internal/commonHelpers/getOgcApiDefinition.js +0 -24
- package/dist/node/search/_internal/commonHelpers/getOgcApiDefinition.js.map +0 -1
- package/dist/types/search/_internal/commonHelpers/getDiscussionsApiDefinition.d.ts +0 -2
- package/dist/types/search/_internal/commonHelpers/getOgcApiDefinition.d.ts +0 -11
|
@@ -61,20 +61,7 @@ export interface IMatchOptions {
|
|
|
61
61
|
*/
|
|
62
62
|
exact?: string | string[];
|
|
63
63
|
}
|
|
64
|
-
export
|
|
65
|
-
arcgis: IApiDefinition;
|
|
66
|
-
arcgisQA: IApiDefinition;
|
|
67
|
-
arcgisDEV: IApiDefinition;
|
|
68
|
-
hub: IApiDefinition;
|
|
69
|
-
hubQA: IApiDefinition;
|
|
70
|
-
hubDEV: IApiDefinition;
|
|
71
|
-
}
|
|
72
|
-
export declare type NamedApis = keyof IWellKnownApis;
|
|
73
|
-
export interface IApiDefinition {
|
|
74
|
-
label?: string;
|
|
75
|
-
url: string;
|
|
76
|
-
type: "arcgis" | "arcgis-hub";
|
|
77
|
-
}
|
|
64
|
+
export declare type ApiTarget = "portal" | "hub";
|
|
78
65
|
/**
|
|
79
66
|
* Base options when checking catalog containment
|
|
80
67
|
*/
|
|
@@ -92,8 +79,7 @@ export interface IContainsOptions {
|
|
|
92
79
|
/**
|
|
93
80
|
* Basic information about a catalog
|
|
94
81
|
*/
|
|
95
|
-
export
|
|
96
|
-
}
|
|
82
|
+
export declare type ICatalogInfo = Partial<IDeepCatalogInfo>;
|
|
97
83
|
/**
|
|
98
84
|
* Cacheable information about a catalog
|
|
99
85
|
*/
|
|
@@ -134,8 +120,7 @@ export interface ICatalogSearchResponse {
|
|
|
134
120
|
* Response from a Catalog search operation where the responses for different collections
|
|
135
121
|
* or entities are grouped into a single object.
|
|
136
122
|
*/
|
|
137
|
-
export
|
|
138
|
-
}
|
|
123
|
+
export declare type ISearchResponseHash = Record<string, IHubSearchResponse<IHubSearchResult>>;
|
|
139
124
|
/**
|
|
140
125
|
* Type wrapper for a kilobyte
|
|
141
126
|
* This is complete syntactic sugar, it makes sizes easier to understand
|
|
@@ -3,29 +3,9 @@ import { IGroup, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
|
|
|
3
3
|
import { IHubSite } from "../core";
|
|
4
4
|
import { IHubSearchResult } from "./types";
|
|
5
5
|
import { IPredicate, IQuery } from "./types/IHubCatalog";
|
|
6
|
-
import { IMatchOptions, IDateRange, IRelativeDate,
|
|
6
|
+
import { IMatchOptions, IDateRange, IRelativeDate, Kilobyte } from "./types/types";
|
|
7
7
|
import { WellKnownCollection } from "./wellKnownCatalog";
|
|
8
8
|
import { LegacySearchCategory } from "./_internal/commonHelpers/isLegacySearchCategory";
|
|
9
|
-
/**
|
|
10
|
-
* Well known APIs
|
|
11
|
-
* Short-forms for specifying common APIs
|
|
12
|
-
* We will likely deprecate this
|
|
13
|
-
*/
|
|
14
|
-
export declare const SEARCH_APIS: IWellKnownApis;
|
|
15
|
-
/**
|
|
16
|
-
* @private
|
|
17
|
-
* Convert array of api "names" into full ApiDefinitions
|
|
18
|
-
* @param apis
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
export declare function expandApis(apis: Array<NamedApis | IApiDefinition>): IApiDefinition[];
|
|
22
|
-
/**
|
|
23
|
-
* @private
|
|
24
|
-
* Convert an api "name" into a full ApiDefinition
|
|
25
|
-
* @param api
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
export declare function expandApi(api: NamedApis | IApiDefinition): IApiDefinition;
|
|
29
9
|
/**
|
|
30
10
|
* @private
|
|
31
11
|
* Convert a field value into a MatchOptions if it's not already one
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export function getDiscussionsApiDefinition() {
|
|
2
|
-
// Currently, url is null because this is handled internally by the
|
|
3
|
-
// discussions request method called by searchChannels, which relies on
|
|
4
|
-
// the URL defined in the request options.hubApiUrl
|
|
5
|
-
return {
|
|
6
|
-
type: "arcgis-hub",
|
|
7
|
-
url: null,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=getDiscussionsApiDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDiscussionsApiDefinition.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getDiscussionsApiDefinition.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,2BAA2B;IACzC,mEAAmE;IACnE,uEAAuE;IACvE,mDAAmD;IACnD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,IAAI;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @private
|
|
3
|
-
* Returns information about the current environment's OGC API
|
|
4
|
-
*
|
|
5
|
-
* @param options IHubRequestOptions to derive OGC API info from
|
|
6
|
-
* @returns an IApiDefinition with needed info to target the OGC API
|
|
7
|
-
*/
|
|
8
|
-
export function getOgcApiDefinition(targetEntity, requestOptions) {
|
|
9
|
-
const umbrellaDomain = new URL(requestOptions.hubApiUrl).hostname;
|
|
10
|
-
return targetEntity === "discussionPost"
|
|
11
|
-
? {
|
|
12
|
-
type: "arcgis-hub",
|
|
13
|
-
url: `https://${umbrellaDomain}/api/search/v2`,
|
|
14
|
-
}
|
|
15
|
-
: {
|
|
16
|
-
type: "arcgis-hub",
|
|
17
|
-
url: `https://${umbrellaDomain}/api/search/v1`,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=getOgcApiDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOgcApiDefinition.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getOgcApiDefinition.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,YAAwB,EACxB,cAAkC;IAElC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC;IAClE,OAAO,YAAY,KAAK,gBAAgB;QACtC,CAAC,CAAC;YACE,IAAI,EAAE,YAAY;YAClB,GAAG,EAAE,WAAW,cAAc,gBAAgB;SAC/C;QACH,CAAC,CAAC;YACE,IAAI,EAAE,YAAY;YAClB,GAAG,EAAE,WAAW,cAAc,gBAAgB;SAC/C,CAAC;AACR,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDiscussionsApiDefinition = void 0;
|
|
4
|
-
function getDiscussionsApiDefinition() {
|
|
5
|
-
// Currently, url is null because this is handled internally by the
|
|
6
|
-
// discussions request method called by searchChannels, which relies on
|
|
7
|
-
// the URL defined in the request options.hubApiUrl
|
|
8
|
-
return {
|
|
9
|
-
type: "arcgis-hub",
|
|
10
|
-
url: null,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
exports.getDiscussionsApiDefinition = getDiscussionsApiDefinition;
|
|
14
|
-
//# sourceMappingURL=getDiscussionsApiDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDiscussionsApiDefinition.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getDiscussionsApiDefinition.ts"],"names":[],"mappings":";;;AAEA,SAAgB,2BAA2B;IACzC,mEAAmE;IACnE,uEAAuE;IACvE,mDAAmD;IACnD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,IAAI;KACV,CAAC;AACJ,CAAC;AARD,kEAQC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOgcApiDefinition = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @private
|
|
6
|
-
* Returns information about the current environment's OGC API
|
|
7
|
-
*
|
|
8
|
-
* @param options IHubRequestOptions to derive OGC API info from
|
|
9
|
-
* @returns an IApiDefinition with needed info to target the OGC API
|
|
10
|
-
*/
|
|
11
|
-
function getOgcApiDefinition(targetEntity, requestOptions) {
|
|
12
|
-
const umbrellaDomain = new URL(requestOptions.hubApiUrl).hostname;
|
|
13
|
-
return targetEntity === "discussionPost"
|
|
14
|
-
? {
|
|
15
|
-
type: "arcgis-hub",
|
|
16
|
-
url: `https://${umbrellaDomain}/api/search/v2`,
|
|
17
|
-
}
|
|
18
|
-
: {
|
|
19
|
-
type: "arcgis-hub",
|
|
20
|
-
url: `https://${umbrellaDomain}/api/search/v1`,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
exports.getOgcApiDefinition = getOgcApiDefinition;
|
|
24
|
-
//# sourceMappingURL=getOgcApiDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOgcApiDefinition.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getOgcApiDefinition.ts"],"names":[],"mappings":";;;AAIA;;;;;;GAMG;AACH,SAAgB,mBAAmB,CACjC,YAAwB,EACxB,cAAkC;IAElC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC;IAClE,OAAO,YAAY,KAAK,gBAAgB;QACtC,CAAC,CAAC;YACE,IAAI,EAAE,YAAY;YAClB,GAAG,EAAE,WAAW,cAAc,gBAAgB;SAC/C;QACH,CAAC,CAAC;YACE,IAAI,EAAE,YAAY;YAClB,GAAG,EAAE,WAAW,cAAc,gBAAgB;SAC/C,CAAC;AACR,CAAC;AAdD,kDAcC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IHubRequestOptions } from "../../../hub-types";
|
|
2
|
-
import { EntityType } from "../../types";
|
|
3
|
-
import { IApiDefinition } from "../../types/types";
|
|
4
|
-
/**
|
|
5
|
-
* @private
|
|
6
|
-
* Returns information about the current environment's OGC API
|
|
7
|
-
*
|
|
8
|
-
* @param options IHubRequestOptions to derive OGC API info from
|
|
9
|
-
* @returns an IApiDefinition with needed info to target the OGC API
|
|
10
|
-
*/
|
|
11
|
-
export declare function getOgcApiDefinition(targetEntity: EntityType, requestOptions: IHubRequestOptions): IApiDefinition;
|