@constructor-io/constructorio-client-javascript 2.53.1 → 2.54.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.
@@ -58,7 +58,8 @@ function createAutocompleteUrl(query, parameters, options) {
58
58
  filtersPerSection = parameters.filtersPerSection,
59
59
  hiddenFields = parameters.hiddenFields,
60
60
  variationsMap = parameters.variationsMap,
61
- preFilterExpression = parameters.preFilterExpression;
61
+ preFilterExpression = parameters.preFilterExpression,
62
+ qsParam = parameters.qsParam;
62
63
 
63
64
  // Pull results number from parameters
64
65
  if (numResults) {
@@ -104,6 +105,11 @@ function createAutocompleteUrl(query, parameters, options) {
104
105
  if (variationsMap) {
105
106
  queryParams.variations_map = JSON.stringify(variationsMap);
106
107
  }
108
+
109
+ // pull qs param from parameters
110
+ if (qsParam) {
111
+ queryParams.qs = JSON.stringify(qsParam);
112
+ }
107
113
  }
108
114
  queryParams._dt = Date.now();
109
115
  queryParams = cleanParams(queryParams);
@@ -141,6 +147,7 @@ var Autocomplete = /*#__PURE__*/function () {
141
147
  * @param {object} [parameters.preFilterExpression] - Faceting expression to scope autocomplete results. Please refer to https://docs.constructor.io/rest_api/collections/#add-items-dynamically for details
142
148
  * @param {string[]} [parameters.hiddenFields] - Hidden metadata fields to return
143
149
  * @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.io/rest_api/variations_mapping for details
150
+ * @param {object} [parameters.qsParam] - object of additional query parameters to be appended to requests for results
144
151
  * @param {object} [networkParameters] - Parameters relevant to the network request
145
152
  * @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
146
153
  * @returns {Promise}
@@ -19,6 +19,7 @@ export interface IAutocompleteParameters {
19
19
  hiddenFields?: string[];
20
20
  variationsMap?: VariationsMap;
21
21
  preFilterExpression?: FilterExpression;
22
+ qsParam?: Record<string, any>;
22
23
  }
23
24
 
24
25
  declare class Autocomplete {
package/lib/version.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _default = '2.53.1';
7
+ var _default = '2.54.0';
8
8
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-client-javascript",
3
- "version": "2.53.1",
3
+ "version": "2.54.0",
4
4
  "description": "Constructor.io JavaScript client",
5
5
  "main": "lib/constructorio.js",
6
6
  "types": "lib/types/index.d.ts",