@constructor-io/constructorio-node 4.5.3 → 4.5.6

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.5.3",
3
+ "version": "4.5.6",
4
4
  "description": "Constructor.io Node.js client",
5
5
  "main": "src/constructorio.js",
6
6
  "types": "src/types/constructorio.d.ts",
@@ -41,14 +41,14 @@
41
41
  "@typescript-eslint/parser": "^5.46.1",
42
42
  "chai": "^4.3.4",
43
43
  "chai-as-promised": "^7.1.1",
44
+ "docdash": "^2.0.1",
44
45
  "dotenv": "^8.6.0",
45
46
  "eslint": "^8.2.0",
46
47
  "eslint-config-airbnb-base": "^15.0.0",
47
48
  "husky": "^7.0.4",
48
- "jsdoc": "^3.6.7",
49
+ "jsdoc": "^4.0.2",
49
50
  "license-checker": "^25.0.1",
50
51
  "lodash.clonedeep": "^4.5.0",
51
- "minami": "^1.2.3",
52
52
  "mocha": "^9.1.3",
53
53
  "nyc": "^15.1.0",
54
54
  "sinon": "^7.5.0",
@@ -19,7 +19,7 @@ class ConstructorIO {
19
19
  /**
20
20
  * @param {object} parameters - Parameters for client instantiation
21
21
  * @param {string} parameters.apiKey - Constructor.io API key
22
- * @param {string} [parameters.apiToken] - Constructor.io API token (required for catalog methods)
22
+ * @param {string} [parameters.apiToken] - Constructor.io API token - Should only be supplied when utilizing the `catalog` module and should be treated as sensitive information
23
23
  * @param {string} [parameters.securityToken] - Constructor security token
24
24
  * @param {string} [parameters.serviceUrl='https://ac.cnstrc.com'] - API URL endpoint
25
25
  * @param {function} [parameters.fetch] - If supplied, will be utilized for requests rather than default Fetch API
@@ -40,9 +40,9 @@ function createAutocompleteUrl(query, parameters, userParameters, options) {
40
40
  queryParams.us = segments;
41
41
  }
42
42
 
43
- // Pull user id from options
43
+ // Pull user id from options and ensure string
44
44
  if (userId) {
45
- queryParams.ui = userId;
45
+ queryParams.ui = String(userId);
46
46
  }
47
47
 
48
48
  if (parameters) {
@@ -125,9 +125,9 @@ function createQueryParams(parameters, userParameters, options) {
125
125
  queryParams.us = segments;
126
126
  }
127
127
 
128
- // Pull user id from options
128
+ // Pull user id from options and ensure string
129
129
  if (userId) {
130
- queryParams.ui = userId;
130
+ queryParams.ui = String(userId);
131
131
  }
132
132
 
133
133
  queryParams._dt = Date.now();
@@ -28,9 +28,9 @@ function createQuizUrl(quizId, parameters, userParameters, options, path) {
28
28
  queryParams.us = segments;
29
29
  }
30
30
 
31
- // Pull user id from options
31
+ // Pull user id from options and ensure string
32
32
  if (userId) {
33
- queryParams.ui = userId;
33
+ queryParams.ui = String(userId);
34
34
  }
35
35
 
36
36
  // Validate quiz id is provided
@@ -32,9 +32,9 @@ function createRecommendationsUrl(podId, parameters, userParameters, options) {
32
32
  queryParams.us = segments;
33
33
  }
34
34
 
35
- // Pull user id from options
35
+ // Pull user id from options and ensure string
36
36
  if (userId) {
37
- queryParams.ui = userId;
37
+ queryParams.ui = String(userId);
38
38
  }
39
39
 
40
40
  if (parameters) {
@@ -42,9 +42,9 @@ function createSearchUrl(query, parameters, userParameters, options, isVoiceSear
42
42
  queryParams.us = segments;
43
43
  }
44
44
 
45
- // Pull user id from options
45
+ // Pull user id from options and ensure string
46
46
  if (userId) {
47
- queryParams.ui = userId;
47
+ queryParams.ui = String(userId);
48
48
  }
49
49
 
50
50
  if (parameters) {
@@ -42,7 +42,7 @@ function applyParams(parameters, userParameters, options) {
42
42
  }
43
43
 
44
44
  if (userId) {
45
- aggregateParams.ui = userId;
45
+ aggregateParams.ui = String(userId);
46
46
  }
47
47
 
48
48
  if (segments && segments.length) {