@constructor-io/constructorio-client-javascript 2.58.3 → 2.58.5
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/lib/modules/browse.js +14 -1
- package/lib/types/browse.d.ts +2 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/lib/modules/browse.js
CHANGED
|
@@ -55,7 +55,8 @@ function createQueryParams(parameters, options) {
|
|
|
55
55
|
hiddenFacets = parameters.hiddenFacets,
|
|
56
56
|
variationsMap = parameters.variationsMap,
|
|
57
57
|
qsParam = parameters.qsParam,
|
|
58
|
-
preFilterExpression = parameters.preFilterExpression
|
|
58
|
+
preFilterExpression = parameters.preFilterExpression,
|
|
59
|
+
filterMatchTypes = parameters.filterMatchTypes;
|
|
59
60
|
|
|
60
61
|
// Pull page from parameters
|
|
61
62
|
if (!helpers.isNil(page)) {
|
|
@@ -74,6 +75,9 @@ function createQueryParams(parameters, options) {
|
|
|
74
75
|
if (filters) {
|
|
75
76
|
queryParams.filters = filters;
|
|
76
77
|
}
|
|
78
|
+
if (filterMatchTypes) {
|
|
79
|
+
queryParams.filter_match_types = filterMatchTypes;
|
|
80
|
+
}
|
|
77
81
|
|
|
78
82
|
// Pull sort by from parameters
|
|
79
83
|
if (sortBy) {
|
|
@@ -233,6 +237,7 @@ var Browse = /*#__PURE__*/function () {
|
|
|
233
237
|
* @param {string[]} [parameters.hiddenFacets] - Hidden facets to return
|
|
234
238
|
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details
|
|
235
239
|
* @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.com/reference/browse-browse-results
|
|
240
|
+
* @param {object} [parameters.filterMatchTypes] - An object specifying whether results must match `all`, `any` or `none` of a given filter. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-results
|
|
236
241
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
237
242
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
238
243
|
* @returns {Promise}
|
|
@@ -243,6 +248,9 @@ var Browse = /*#__PURE__*/function () {
|
|
|
243
248
|
* filters: {
|
|
244
249
|
* size: 'medium'
|
|
245
250
|
* },
|
|
251
|
+
* filterMatchTypes: {
|
|
252
|
+
* size: 'all'
|
|
253
|
+
* }
|
|
246
254
|
* });
|
|
247
255
|
*/
|
|
248
256
|
(0, _createClass2["default"])(Browse, [{
|
|
@@ -300,6 +308,8 @@ var Browse = /*#__PURE__*/function () {
|
|
|
300
308
|
* @param {string[]} [parameters.hiddenFields] - Hidden metadata fields to return
|
|
301
309
|
* @param {string[]} [parameters.hiddenFacets] - Hidden facets to return
|
|
302
310
|
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details
|
|
311
|
+
* @param {object} [parameters.filterMatchTypes] - An object specifying whether results must match `all`, `any` or `none` of a given filter. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-items-results
|
|
312
|
+
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope browse results. Please refer to https://docs.constructor.com/reference/configuration-collections
|
|
303
313
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
304
314
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
305
315
|
* @returns {Promise}
|
|
@@ -309,6 +319,9 @@ var Browse = /*#__PURE__*/function () {
|
|
|
309
319
|
* filters: {
|
|
310
320
|
* size: 'medium'
|
|
311
321
|
* },
|
|
322
|
+
* filterMatchTypes: {
|
|
323
|
+
* size: 'all'
|
|
324
|
+
* }
|
|
312
325
|
* });
|
|
313
326
|
*/
|
|
314
327
|
}, {
|
package/lib/types/browse.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface IBrowseParameters {
|
|
|
31
31
|
hiddenFacets?: string[];
|
|
32
32
|
variationsMap?: VariationsMap;
|
|
33
33
|
qsParam?: Record<string, any>;
|
|
34
|
+
filterMatchTypes: Record<string, 'all'| 'any' | 'none'>
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
declare class Browse {
|
|
@@ -49,7 +50,7 @@ declare class Browse {
|
|
|
49
50
|
|
|
50
51
|
getBrowseResultsForItemIds(
|
|
51
52
|
itemIds: string[],
|
|
52
|
-
parameters?: Omit<IBrowseParameters, '
|
|
53
|
+
parameters?: Omit<IBrowseParameters, 'qsParam'>,
|
|
53
54
|
networkParameters?: NetworkParameters
|
|
54
55
|
): Promise<GetBrowseResultsForItemIdsResponse>;
|
|
55
56
|
|
package/lib/version.js
CHANGED