@esri/hub-common 20.5.1 → 20.6.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.
@@ -1,13 +1,19 @@
1
1
  import { getProp } from "../../../objects/get-prop";
2
2
  import { getFilterQueryParam } from "./getFilterQueryParam";
3
+ import { getQQueryParam } from "./getQQueryParam";
4
+ import { getBboxQueryParam } from "./getBboxQueryParam";
3
5
  export function getOgcAggregationQueryParams(query, options) {
4
6
  // TODO: use options.aggLimit once the OGC API supports it
5
7
  const aggregations = `terms(fields=(${options.aggFields.join()}))`;
6
8
  const filter = getFilterQueryParam(query);
9
+ const bbox = getBboxQueryParam(query);
10
+ const q = getQQueryParam(query);
7
11
  const token = getProp(options, "requestOptions.authentication.token");
8
12
  return {
9
13
  aggregations,
14
+ bbox,
10
15
  filter,
16
+ q,
11
17
  token,
12
18
  };
13
19
  }
@@ -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,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,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,CACnB,OAAO,EACP,qCAAqC,CAC5B,CAAC;IAEZ,OAAO;QACL,YAAY;QACZ,MAAM;QACN,KAAK;KACN,CAAC;AACJ,CAAC"}
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;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAUxD,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,IAAI,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,OAAO,CACnB,OAAO,EACP,qCAAqC,CAC5B,CAAC;IAEZ,OAAO;QACL,YAAY;QACZ,IAAI;QACJ,MAAM;QACN,CAAC;QACD,KAAK;KACN,CAAC;AACJ,CAAC"}
@@ -3,14 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOgcAggregationQueryParams = void 0;
4
4
  const get_prop_1 = require("../../../objects/get-prop");
5
5
  const getFilterQueryParam_1 = require("./getFilterQueryParam");
6
+ const getQQueryParam_1 = require("./getQQueryParam");
7
+ const getBboxQueryParam_1 = require("./getBboxQueryParam");
6
8
  function getOgcAggregationQueryParams(query, options) {
7
9
  // TODO: use options.aggLimit once the OGC API supports it
8
10
  const aggregations = `terms(fields=(${options.aggFields.join()}))`;
9
11
  const filter = getFilterQueryParam_1.getFilterQueryParam(query);
12
+ const bbox = getBboxQueryParam_1.getBboxQueryParam(query);
13
+ const q = getQQueryParam_1.getQQueryParam(query);
10
14
  const token = get_prop_1.getProp(options, "requestOptions.authentication.token");
11
15
  return {
12
16
  aggregations,
17
+ bbox,
13
18
  filter,
19
+ q,
14
20
  token,
15
21
  };
16
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getOgcAggregationQueryParams.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AAGpD,+DAA4D;AAQ5D,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,CACnB,OAAO,EACP,qCAAqC,CAC5B,CAAC;IAEZ,OAAO;QACL,YAAY;QACZ,MAAM;QACN,KAAK;KACN,CAAC;AACJ,CAAC;AAjBD,oEAiBC"}
1
+ {"version":3,"file":"getOgcAggregationQueryParams.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/getOgcAggregationQueryParams.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AAGpD,+DAA4D;AAC5D,qDAAkD;AAClD,2DAAwD;AAUxD,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,IAAI,GAAG,qCAAiB,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,CAAC,GAAG,+BAAc,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,kBAAO,CACnB,OAAO,EACP,qCAAqC,CAC5B,CAAC;IAEZ,OAAO;QACL,YAAY;QACZ,IAAI;QACJ,MAAM;QACN,CAAC;QACD,KAAK;KACN,CAAC;AACJ,CAAC;AArBD,oEAqBC"}
@@ -2,7 +2,9 @@ import { IQuery } from "../../types/IHubCatalog";
2
2
  import { IHubSearchOptions } from "../../types/IHubSearchOptions";
3
3
  export interface IOgcAggregationQueryParams {
4
4
  aggregations: string;
5
+ bbox?: string;
5
6
  filter?: string;
7
+ q?: string;
6
8
  token?: string;
7
9
  }
8
10
  export declare function getOgcAggregationQueryParams(query: IQuery, options: IHubSearchOptions): IOgcAggregationQueryParams;
@@ -1,2 +1,2 @@
1
1
  import { IQuery } from "../../types/IHubCatalog";
2
- export declare function getQQueryParam(query: IQuery): any;
2
+ export declare function getQQueryParam(query: IQuery): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "20.5.1",
3
+ "version": "20.6.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",