@constructor-io/constructorio-node 4.6.6 → 4.6.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-node",
3
- "version": "4.6.6",
3
+ "version": "4.6.7",
4
4
  "description": "Constructor.io Node.js client",
5
5
  "main": "src/constructorio.js",
6
6
  "types": "src/types/constructorio.d.ts",
@@ -133,10 +133,6 @@ class Autocomplete {
133
133
  * filters: {
134
134
  * size: 'medium'
135
135
  * },
136
- * }, {
137
- * testCells: {
138
- * testName: 'cellName',
139
- * },
140
136
  * });
141
137
  */
142
138
  getAutocompleteResults(query, parameters = {}, userParameters = {}, networkParameters = {}) {
@@ -277,10 +277,6 @@ class Browse {
277
277
  * filters: {
278
278
  * size: 'medium'
279
279
  * },
280
- * }, {
281
- * testCells: {
282
- * testName: 'cellName',
283
- * },
284
280
  * });
285
281
  */
286
282
  getBrowseResults(filterName, filterValue, parameters = {}, userParameters = {}, networkParameters = {}) {
@@ -361,10 +357,6 @@ class Browse {
361
357
  * filters: {
362
358
  * size: 'medium'
363
359
  * },
364
- * }, {
365
- * testCells: {
366
- * 'testName': 'cellName',
367
- * },
368
360
  * });
369
361
  */
370
362
  getBrowseResultsForItemIds(itemIds, parameters = {}, userParameters = {}, networkParameters = {}) {
@@ -433,10 +425,6 @@ class Browse {
433
425
  * fmtOptions: {
434
426
  * groups_max_depth: 2
435
427
  * }
436
- * }, {
437
- * testCells: {
438
- * 'testName': 'cellName',
439
- * },
440
428
  * });
441
429
  */
442
430
  getBrowseGroups(parameters = {}, userParameters = {}, networkParameters = {}) {
@@ -492,10 +480,6 @@ class Browse {
492
480
  * constructorio.browse.getBrowseFacets({
493
481
  * page: 1,
494
482
  * resultsPerPage: 10,
495
- * }, {
496
- * testCells: {
497
- * 'testName': 'cellName',
498
- * },
499
483
  * });
500
484
  */
501
485
  getBrowseFacets(parameters = {}, userParameters = {}, networkParameters = {}) {
@@ -120,10 +120,6 @@ class Recommendations {
120
120
  * filters: {
121
121
  * size: 'medium'
122
122
  * },
123
- * }, {
124
- * testCells: {
125
- * testName: 'cellName',
126
- * },
127
123
  * });
128
124
  */
129
125
  getRecommendations(podId, parameters = {}, userParameters = {}, networkParameters = {}) {
@@ -197,10 +197,6 @@ class Search {
197
197
  * filters: {
198
198
  * size: 'medium'
199
199
  * },
200
- * }, {
201
- * testCells: {
202
- * testName: 'cellName',
203
- * },
204
200
  * });
205
201
  */
206
202
 
@@ -548,7 +548,7 @@ class Tracker {
548
548
  * @param {string} term - Search results query term
549
549
  * @param {object} parameters - Additional parameters to be sent with request
550
550
  * @param {number} parameters.numResults - Total number of results
551
- * @param {string[]} [parameters.itemIds] - List of product item unique identifiers in search results listing
551
+ * @param {string[]} parameters.itemIds - List of product item unique identifiers in search results listing
552
552
  * @param {object} userParameters - Parameters relevant to the user request
553
553
  * @param {number} userParameters.sessionId - Session ID, utilized to personalize results
554
554
  * @param {string} userParameters.clientId - Client ID, utilized to personalize results
@@ -1237,6 +1237,7 @@ class Tracker {
1237
1237
  * @param {string} parameters.url - Current page URL
1238
1238
  * @param {string} parameters.filterName - Filter name
1239
1239
  * @param {string} parameters.filterValue - Filter value
1240
+ * @param {object[]} parameters.items - List of product item objects
1240
1241
  * @param {string} [parameters.section="Products"] - Index section
1241
1242
  * @param {number} [parameters.resultCount] - Total number of results
1242
1243
  * @param {number} [parameters.resultPage] - Page number of results
@@ -1244,7 +1245,6 @@ class Tracker {
1244
1245
  * @param {object} [parameters.selectedFilters] - Selected filters
1245
1246
  * @param {string} [parameters.sortOrder] - Sort order ('ascending' or 'descending')
1246
1247
  * @param {string} [parameters.sortBy] - Sorting method
1247
- * @param {object[]} [parameters.items] - List of product item objects
1248
1248
  * @param {object} userParameters - Parameters relevant to the user request
1249
1249
  * @param {number} userParameters.sessionId - Session ID, utilized to personalize results
1250
1250
  * @param {string} userParameters.clientId - Client ID, utilized to personalize results
@@ -332,3 +332,9 @@ export interface SearchabilityConfiguration {
332
332
  displayable?: boolean,
333
333
  hidden?: boolean,
334
334
  }
335
+
336
+ export interface ItemTracked {
337
+ itemName?: string;
338
+ itemId?: string;
339
+ variationId?: string;
340
+ }
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from 'events';
2
- import { ConstructorClientOptions, NetworkParameters } from '.';
2
+ import { ConstructorClientOptions, NetworkParameters, ItemTracked } from '.';
3
3
 
4
4
  export default Tracker;
5
5
 
@@ -72,7 +72,7 @@ declare class Tracker {
72
72
  term: string,
73
73
  parameters: {
74
74
  numResults: number;
75
- itemIds?: string[];
75
+ itemIds: string[];
76
76
  },
77
77
  userParameters?: TrackerUserParameters,
78
78
  networkParameters?: NetworkParameters
@@ -111,7 +111,7 @@ declare class Tracker {
111
111
 
112
112
  trackPurchase(
113
113
  parameters: {
114
- items: object[];
114
+ items: ItemTracked & {quantity: number}[];
115
115
  revenue: number;
116
116
  orderId?: string;
117
117
  section?: string;
@@ -125,7 +125,6 @@ declare class Tracker {
125
125
  url: string;
126
126
  podId: string;
127
127
  numResultsViewed: number;
128
- items?: object[];
129
128
  resultCount?: number;
130
129
  resultPage?: number;
131
130
  resultId?: string;
@@ -165,7 +164,7 @@ declare class Tracker {
165
164
  selectedFilters?: object;
166
165
  sortOrder?: string;
167
166
  sortBy?: string;
168
- items?: object[];
167
+ items: ItemTracked[];
169
168
  },
170
169
  userParameters?: TrackerUserParameters,
171
170
  networkParameters?: NetworkParameters