@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.
- package/package.json +1 -1
- package/src/modules/browse.js +7 -0
- package/src/modules/catalog.js +177 -129
- package/src/modules/search.js +8 -0
- package/src/modules/tracker.js +311 -251
- package/src/types/browse.d.ts +2 -1
- package/src/types/search.d.ts +1 -0
- package/src/utils/helpers.js +13 -0
package/package.json
CHANGED
package/src/modules/browse.js
CHANGED
|
@@ -37,6 +37,7 @@ function createQueryParams(parameters, userParameters, options) {
|
|
|
37
37
|
hiddenFacets,
|
|
38
38
|
variationsMap,
|
|
39
39
|
preFilterExpression,
|
|
40
|
+
qsParam,
|
|
40
41
|
} = parameters;
|
|
41
42
|
|
|
42
43
|
// Pull page from parameters
|
|
@@ -105,6 +106,11 @@ function createQueryParams(parameters, userParameters, options) {
|
|
|
105
106
|
if (preFilterExpression) {
|
|
106
107
|
queryParams.pre_filter_expression = JSON.stringify(preFilterExpression);
|
|
107
108
|
}
|
|
109
|
+
|
|
110
|
+
// Pull qs param from parameters
|
|
111
|
+
if (qsParam) {
|
|
112
|
+
queryParams.qs = JSON.stringify(qsParam);
|
|
113
|
+
}
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
// Pull test cells from options
|
|
@@ -252,6 +258,7 @@ class Browse {
|
|
|
252
258
|
* @param {string[]} [parameters.hiddenFacets] - Hidden facet fields to return
|
|
253
259
|
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.io/rest_api/variations_mapping for details
|
|
254
260
|
* @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
|
|
261
|
+
* @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/browse/queries for details
|
|
255
262
|
* @param {object} [userParameters] - Parameters relevant to the user request
|
|
256
263
|
* @param {number} [userParameters.sessionId] - Session ID, utilized to personalize results
|
|
257
264
|
* @param {number} [userParameters.clientId] - Client ID, utilized to personalize results
|