@constructor-io/constructorio-client-javascript 2.62.3 → 2.62.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.
@@ -6,6 +6,7 @@ import {
6
6
  RequestFeatureVariant,
7
7
  VariationsMap,
8
8
  FilterExpression,
9
+ FmtOptions,
9
10
  } from '.';
10
11
  import EventDispatcher from './event-dispatcher';
11
12
 
@@ -44,6 +45,7 @@ export interface AutocompleteResponse extends Record<string, any> {
44
45
  request: Partial<AutocompleteRequestType>;
45
46
  sections: Record<string, Item[]>;
46
47
  result_id: string;
48
+ total_num_results_per_section: Record<string, number>;
47
49
  }
48
50
 
49
51
  export interface AutocompleteRequestType extends Record<string, any> {
@@ -1,4 +1,4 @@
1
- import { ConstructorClientOptions, NetworkParameters, VariationsMap } from '.';
1
+ import { ConstructorClientOptions, NetworkParameters, VariationsMap, FilterExpression } from '.';
2
2
  import EventDispatcher from './event-dispatcher';
3
3
 
4
4
  export default Recommendations;
@@ -38,7 +38,8 @@ var RequestQueue = /*#__PURE__*/function () {
38
38
  var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GET';
39
39
  var body = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
40
40
  var networkParameters = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
41
- if (this.sendTrackingEvents && !this.humanity.isBot()) {
41
+ // Consider user "human" if no DOM context is available
42
+ if (this.sendTrackingEvents && (!helpers.canUseDOM() || !this.humanity.isBot())) {
42
43
  var queue = RequestQueue.get();
43
44
 
44
45
  // PII Detection & Obfuscation
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.62.3';
7
+ var _default = '2.62.5';
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.62.3",
3
+ "version": "2.62.5",
4
4
  "description": "Constructor.io JavaScript client",
5
5
  "main": "lib/constructorio.js",
6
6
  "types": "lib/types/index.d.ts",