@esri/hub-common 14.55.0 → 14.56.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/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.js +3 -4
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.js +3 -4
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.js.map +1 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.d.ts +1 -1
- package/package.json +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOpenDataQueryParam.js +0 -15
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOpenDataQueryParam.js.map +0 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOpenDataQueryParam.js +0 -19
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOpenDataQueryParam.js.map +0 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/getOpenDataQueryParam.d.ts +0 -11
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { getProp } from "../../../objects/get-prop";
|
|
2
|
-
import {
|
|
2
|
+
import { getFilterQueryParam } from "./getFilterQueryParam";
|
|
3
3
|
export function getOgcAggregationQueryParams(query, options) {
|
|
4
4
|
// TODO: use options.aggLimit once the OGC API supports it
|
|
5
5
|
const aggregations = `terms(fields=(${options.aggFields.join()}))`;
|
|
6
|
-
|
|
7
|
-
const openData = getOpenDataQueryParam(query);
|
|
6
|
+
const filter = getFilterQueryParam(query);
|
|
8
7
|
const token = getProp(options, "requestOptions.authentication.token");
|
|
9
8
|
return {
|
|
10
9
|
aggregations,
|
|
11
|
-
|
|
10
|
+
filter,
|
|
12
11
|
token,
|
|
13
12
|
};
|
|
14
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOgcAggregationQueryParams.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"getOgcAggregationQueryParams.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,4BAA4B,CAC1C,KAAa,EACb,OAA0B;IAE1B,0DAA0D;IAC1D,MAAM,YAAY,GAAG,iBAAiB,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IACnE,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE,qCAAqC,CAAC,CAAC;IAEtE,OAAO;QACL,YAAY;QACZ,MAAM;QACN,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOgcAggregationQueryParams = void 0;
|
|
4
4
|
const get_prop_1 = require("../../../objects/get-prop");
|
|
5
|
-
const
|
|
5
|
+
const getFilterQueryParam_1 = require("./getFilterQueryParam");
|
|
6
6
|
function getOgcAggregationQueryParams(query, options) {
|
|
7
7
|
// TODO: use options.aggLimit once the OGC API supports it
|
|
8
8
|
const aggregations = `terms(fields=(${options.aggFields.join()}))`;
|
|
9
|
-
|
|
10
|
-
const openData = getOpenDataQueryParam_1.getOpenDataQueryParam(query);
|
|
9
|
+
const filter = getFilterQueryParam_1.getFilterQueryParam(query);
|
|
11
10
|
const token = get_prop_1.getProp(options, "requestOptions.authentication.token");
|
|
12
11
|
return {
|
|
13
12
|
aggregations,
|
|
14
|
-
|
|
13
|
+
filter,
|
|
15
14
|
token,
|
|
16
15
|
};
|
|
17
16
|
}
|
package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOgcAggregationQueryParams.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AAGpD
|
|
1
|
+
{"version":3,"file":"getOgcAggregationQueryParams.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AAGpD,+DAA4D;AAE5D,SAAgB,4BAA4B,CAC1C,KAAa,EACb,OAA0B;IAE1B,0DAA0D;IAC1D,MAAM,YAAY,GAAG,iBAAiB,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IACnE,MAAM,MAAM,GAAG,yCAAmB,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,kBAAO,CAAC,OAAO,EAAE,qCAAqC,CAAC,CAAC;IAEtE,OAAO;QACL,YAAY;QACZ,MAAM;QACN,KAAK;KACN,CAAC;AACJ,CAAC;AAdD,oEAcC"}
|
|
@@ -2,6 +2,6 @@ import { IQuery } from "../../types/IHubCatalog";
|
|
|
2
2
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
3
|
export declare function getOgcAggregationQueryParams(query: IQuery, options: IHubSearchOptions): {
|
|
4
4
|
aggregations: string;
|
|
5
|
-
|
|
5
|
+
filter: string;
|
|
6
6
|
token: any;
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getTopLevelPredicate } from "../commonHelpers/getTopLevelPredicate";
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* Extracts the openData flag that the search should be filtered by.
|
|
5
|
-
* Also validates that the openData predicate is not combined in some
|
|
6
|
-
* invalid way with other predicates.
|
|
7
|
-
*
|
|
8
|
-
* @param query query to extract the opendata predicate from
|
|
9
|
-
* @returns the openData value to filter by
|
|
10
|
-
*/
|
|
11
|
-
export function getOpenDataQueryParam(query) {
|
|
12
|
-
const openDataPredicate = getTopLevelPredicate("openData", query.filters);
|
|
13
|
-
return openDataPredicate === null || openDataPredicate === void 0 ? void 0 : openDataPredicate.openData;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=getOpenDataQueryParam.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOpenDataQueryParam.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/getOpenDataQueryParam.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1E,OAAO,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,QAAQ,CAAC;AACrC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOpenDataQueryParam = void 0;
|
|
4
|
-
const getTopLevelPredicate_1 = require("../commonHelpers/getTopLevelPredicate");
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
* Extracts the openData flag that the search should be filtered by.
|
|
8
|
-
* Also validates that the openData predicate is not combined in some
|
|
9
|
-
* invalid way with other predicates.
|
|
10
|
-
*
|
|
11
|
-
* @param query query to extract the opendata predicate from
|
|
12
|
-
* @returns the openData value to filter by
|
|
13
|
-
*/
|
|
14
|
-
function getOpenDataQueryParam(query) {
|
|
15
|
-
const openDataPredicate = getTopLevelPredicate_1.getTopLevelPredicate("openData", query.filters);
|
|
16
|
-
return openDataPredicate === null || openDataPredicate === void 0 ? void 0 : openDataPredicate.openData;
|
|
17
|
-
}
|
|
18
|
-
exports.getOpenDataQueryParam = getOpenDataQueryParam;
|
|
19
|
-
//# sourceMappingURL=getOpenDataQueryParam.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOpenDataQueryParam.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/getOpenDataQueryParam.ts"],"names":[],"mappings":";;;AACA,gFAA6E;AAE7E;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CAAC,KAAa;IACjD,MAAM,iBAAiB,GAAG,2CAAoB,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1E,OAAO,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,QAAQ,CAAC;AACrC,CAAC;AAHD,sDAGC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IQuery } from "../../types/IHubCatalog";
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* Extracts the openData flag that the search should be filtered by.
|
|
5
|
-
* Also validates that the openData predicate is not combined in some
|
|
6
|
-
* invalid way with other predicates.
|
|
7
|
-
*
|
|
8
|
-
* @param query query to extract the opendata predicate from
|
|
9
|
-
* @returns the openData value to filter by
|
|
10
|
-
*/
|
|
11
|
-
export declare function getOpenDataQueryParam(query: IQuery): string;
|