@constructor-io/constructorio-node 4.4.7 → 4.5.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.
@@ -61,6 +61,7 @@ function createSearchUrl(query, parameters, userParameters, options, isVoiceSear
61
61
  hiddenFacets,
62
62
  variationsMap,
63
63
  preFilterExpression,
64
+ qsParam,
64
65
  } = parameters;
65
66
 
66
67
  // Pull page from parameters
@@ -130,6 +131,11 @@ function createSearchUrl(query, parameters, userParameters, options, isVoiceSear
130
131
  if (preFilterExpression) {
131
132
  queryParams.pre_filter_expression = JSON.stringify(preFilterExpression);
132
133
  }
134
+
135
+ // Pull qs param from parameters
136
+ if (qsParam) {
137
+ queryParams.qs = JSON.stringify(qsParam);
138
+ }
133
139
  }
134
140
 
135
141
  queryParams._dt = Date.now();
@@ -172,6 +178,7 @@ class Search {
172
178
  * @param {string[]} [parameters.hiddenFacets] - Hidden facet fields to return
173
179
  * @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.io/rest_api/variations_mapping for details
174
180
  * @param {object} [parameters.preFilterExpression] - Faceting expression to scope search results. Please refer to https://docs.constructor.io/rest_api/collections/#add-items-dynamically for details
181
+ * @param {object} [parameters.qsParam] - Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.io/rest_api/search/queries for details
175
182
  * @param {object} [userParameters] - Parameters relevant to the user request
176
183
  * @param {number} [userParameters.sessionId] - Session ID, utilized to personalize results
177
184
  * @param {number} [userParameters.clientId] - Client ID, utilized to personalize results
@@ -273,6 +280,7 @@ class Search {
273
280
  * @param {string[]} [parameters.hiddenFacets] - Hidden facet fields to return
274
281
  * @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.io/rest_api/variations_mapping for details
275
282
  * @param {object} [parameters.preFilterExpression] - Faceting expression to scope search results. Please refer to https://docs.constructor.io/rest_api/collections/#add-items-dynamically for details
283
+ * @param {object} [parameters.qsParam] - Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.io/rest_api/search/queries for details
276
284
  * @param {object} [userParameters] - Parameters relevant to the user request
277
285
  * @param {number} [userParameters.sessionId] - Session ID, utilized to personalize results
278
286
  * @param {number} [userParameters.clientId] - Client ID, utilized to personalize results