@constructor-io/constructorio-client-javascript 2.68.0 → 2.69.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.
@@ -160,6 +160,7 @@ var ConstructorIO = /*#__PURE__*/function () {
160
160
  * @param {object} [options.testCells] - User test cells
161
161
  * @param {number} [options.sessionId] - Session ID - Will only be set in DOM-less environments
162
162
  * @param {string} [options.userId] - User ID
163
+ * @param {boolean} [options.sendTrackingEvents] - Indicates if tracking events should be dispatched
163
164
  */
164
165
  return (0, _createClass2["default"])(ConstructorIO, [{
165
166
  key: "setClientOptions",
@@ -169,7 +170,8 @@ var ConstructorIO = /*#__PURE__*/function () {
169
170
  segments = options.segments,
170
171
  testCells = options.testCells,
171
172
  sessionId = options.sessionId,
172
- userId = options.userId;
173
+ userId = options.userId,
174
+ sendTrackingEvents = options.sendTrackingEvents;
173
175
  if (apiKey) {
174
176
  this.options.apiKey = apiKey;
175
177
  }
@@ -179,6 +181,10 @@ var ConstructorIO = /*#__PURE__*/function () {
179
181
  if (testCells) {
180
182
  this.options.testCells = testCells;
181
183
  }
184
+ if (typeof sendTrackingEvents === 'boolean') {
185
+ this.options.sendTrackingEvents = sendTrackingEvents;
186
+ this.tracker.requests.sendTrackingEvents = sendTrackingEvents;
187
+ }
182
188
 
183
189
  // Set Session ID in dom-less environments only
184
190
  if (sessionId && !helpers.canUseDOM()) {
@@ -137,7 +137,7 @@ export interface BaseQuestion extends Record<string, any> {
137
137
  export interface FilterValueQuestion extends BaseQuestion {
138
138
  type: 'single_filter_value' |'multiple_filter_values';
139
139
  filter_name: string;
140
- options: QuestionOption[];
140
+ options: FilterQuestionOption[];
141
141
  }
142
142
 
143
143
  export interface SelectQuestion extends BaseQuestion {
@@ -159,8 +159,7 @@ export interface QuizResult extends Record<string, any> {
159
159
  results_url: string;
160
160
  }
161
161
 
162
- export interface QuestionOption extends Record<string, any> {
163
- id: number;
162
+ export interface BaseQuestionOption extends Record<string, any> {
164
163
  value: string;
165
164
  attribute: Nullable<{
166
165
  name: string;
@@ -169,6 +168,14 @@ export interface QuestionOption extends Record<string, any> {
169
168
  images?: Nullable<QuestionImages>;
170
169
  }
171
170
 
171
+ export interface QuestionOption extends BaseQuestionOption {
172
+ id: number;
173
+ }
174
+
175
+ export interface FilterQuestionOption extends BaseQuestionOption {
176
+ id: string;
177
+ }
178
+
172
179
  export interface QuestionImages extends Record<string, any> {
173
180
  primary_url?: Nullable<string>;
174
181
  primary_alt?: Nullable<string>;
package/lib/version.js CHANGED
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _default = exports["default"] = '2.68.0';
7
+ var _default = exports["default"] = '2.69.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-client-javascript",
3
- "version": "2.68.0",
3
+ "version": "2.69.0",
4
4
  "description": "Constructor.io JavaScript client",
5
5
  "main": "lib/constructorio.js",
6
6
  "types": "lib/types/index.d.ts",