@constructor-io/constructorio-node 3.10.5 → 3.10.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": "3.10.5",
3
+ "version": "3.10.7",
4
4
  "description": "Constructor.io Node.js client",
5
5
  "main": "src/constructorio.js",
6
6
  "scripts": {
@@ -10,7 +10,7 @@
10
10
  "test": "mkdir -p test && cp -rf src/* test && mocha ./spec/*",
11
11
  "precoverage": "rm -rf ./coverage && rm -rf ./.nyc_output",
12
12
  "coverage": "nyc --all --reporter=html npm run test",
13
- "postcoverage": "serve --listen 8080 --config ./serve.json && rm -rf test",
13
+ "postcoverage": "open coverage/index.html && rm -rf test",
14
14
  "docs": "jsdoc --configure ./.jsdoc.json ./README.md --recurse ./src --destination ./docs",
15
15
  "prepare": "husky install"
16
16
  },
@@ -40,14 +40,11 @@
40
40
  "eslint-plugin-import": "^2.24.2",
41
41
  "husky": "^7.0.4",
42
42
  "jsdoc": "^3.6.7",
43
- "jsdom": "^15.1.1",
44
43
  "license-checker": "^25.0.1",
45
44
  "lodash.clonedeep": "^4.5.0",
46
45
  "minami": "^1.2.3",
47
46
  "mocha": "^9.1.3",
48
- "mocha-jsdom": "^2.0.0",
49
47
  "nyc": "^15.1.0",
50
- "serve": "^13.0.2",
51
48
  "sinon": "^7.5.0",
52
49
  "sinon-chai": "^3.7.0",
53
50
  "uuid": "^8.3.2"
@@ -49,6 +49,7 @@ class Tasks {
49
49
  * @param {string} [parameters.startDate] - The start date of results to return - YYYY-MM-DD
50
50
  * @param {string} [parameters.endDate] - The end date of results to return - YYYY-MM-DD
51
51
  * @param {string} [parameters.status] - The status of tasks to return - 'QUEUED', 'IN_PROGRESS', 'DONE', 'FAILED', 'CANCELED'
52
+ * @param {string} [parameters.type] - The type of tasks to return - 'ingestion', 'user_data_request'
52
53
  * @param {object} [networkParameters] - Parameters relevant to the network request
53
54
  * @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
54
55
  * @returns {Promise}
@@ -62,7 +63,7 @@ class Tasks {
62
63
  const { signal } = controller;
63
64
 
64
65
  if (parameters) {
65
- const { num_results_per_page: numResultsPerPageOld, numResultsPerPage, page, startDate, endDate, status } = parameters;
66
+ const { num_results_per_page: numResultsPerPageOld, numResultsPerPage, page, startDate, endDate, status, type } = parameters;
66
67
 
67
68
  // Pull number of results per page from parameters
68
69
  if (numResultsPerPageOld || numResultsPerPage) {
@@ -85,6 +86,10 @@ class Tasks {
85
86
  if (status) {
86
87
  queryParams.status = status;
87
88
  }
89
+
90
+ if (type) {
91
+ queryParams.type = type;
92
+ }
88
93
  }
89
94
 
90
95
  try {