testit-js-commons 1.1.7 → 2.0.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.
@@ -28,7 +28,6 @@ class BaseConverter {
28
28
  title: (_a = link.title) !== null && _a !== void 0 ? _a : link.url,
29
29
  description: (_b = link.description) !== null && _b !== void 0 ? _b : undefined,
30
30
  type: link.type ? this.toLocalLinkType(link.type) : undefined,
31
- hasInfo: link.hasInfo,
32
31
  };
33
32
  }
34
33
  toLocalShortStep(step) {
@@ -73,8 +73,16 @@ class AutotestsService extends base_service_1.BaseService {
73
73
  }
74
74
  getAutotestByExternalId(externalId) {
75
75
  return __awaiter(this, void 0, void 0, function* () {
76
- return yield this._client
77
- .getAllAutoTests(this.config.projectId, externalId, undefined, undefined, undefined, undefined, undefined, undefined, undefined, false)
76
+ const filterModel = {
77
+ externalIds: [externalId],
78
+ projectIds: [this.config.projectId],
79
+ isDeleted: false,
80
+ };
81
+ const requestModel = {
82
+ filter: filterModel,
83
+ includes: undefined
84
+ };
85
+ return yield this._client.apiV2AutoTestsSearchPost(undefined, undefined, undefined, undefined, undefined, requestModel)
78
86
  .then(({ body }) => body[0])
79
87
  .then((autotest) => {
80
88
  return autotest ? this._converter.toLocalAutotest(autotest) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testit-js-commons",
3
- "version": "1.1.7",
3
+ "version": "2.0.0",
4
4
  "description": "JavaScript commons for Test IT",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "dotenv": "^16.0.3",
27
- "testit-api-client": "^3.2.0"
27
+ "testit-api-client": "^4.0.0"
28
28
  },
29
29
  "files": [
30
30
  "lib"