testit-js-commons 5.0.5 → 5.0.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.
Files changed (33) hide show
  1. package/lib/adapters-api/dist/api/CustomAttributesApi.js +201 -0
  2. package/lib/adapters-api/dist/index.js +77 -0
  3. package/lib/adapters-api/dist/model/AutoTestApiResult.js +15 -0
  4. package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +15 -0
  5. package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +30 -4
  6. package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +54 -4
  7. package/lib/adapters-api/dist/model/CustomAttributeOptionPostApiModel.js +98 -0
  8. package/lib/adapters-api/dist/model/CustomAttributeOptionUpdateApiModel.js +124 -0
  9. package/lib/adapters-api/dist/model/CustomAttributeSearchApiModel.js +137 -0
  10. package/lib/adapters-api/dist/model/CustomAttributeSearchApiResult.js +281 -0
  11. package/lib/adapters-api/dist/model/GlobalCustomAttributePostApiModel.js +141 -0
  12. package/lib/adapters-api/dist/model/GlobalCustomAttributeUpdateApiModel.js +129 -0
  13. package/lib/adapters-api/dist/model/LayerApiModel.js +102 -0
  14. package/lib/adapters-api/dist/model/LayerApiResult.js +102 -0
  15. package/lib/adapters-api/dist/model/LayerSource.js +61 -0
  16. package/lib/adapters-api/dist/model/ProjectShortestApiResult.js +138 -0
  17. package/lib/adapters-api/dist/model/ProjectsFilterModel.js +13 -13
  18. package/lib/adapters-api/dist/model/TestResultShortResponse.js +15 -4
  19. package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +14 -0
  20. package/lib/adapters-api/dist/model/TestRunApiResult.js +45 -4
  21. package/lib/adapters-api/index.d.ts +718 -8
  22. package/lib/common/index.d.ts +1 -0
  23. package/lib/common/index.js +1 -0
  24. package/lib/common/test-layers.d.ts +11 -0
  25. package/lib/common/test-layers.js +13 -0
  26. package/lib/common/types/common.type.d.ts +2 -0
  27. package/lib/services/autotests/autotests.converter.d.ts +6 -2
  28. package/lib/services/autotests/autotests.converter.js +41 -16
  29. package/lib/services/autotests/autotests.converter.test.d.ts +1 -0
  30. package/lib/services/autotests/autotests.converter.test.js +39 -0
  31. package/lib/services/autotests/autotests.service.js +3 -3
  32. package/lib/services/autotests/autotests.type.d.ts +2 -0
  33. package/package.json +1 -1
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _DateTimeRangeSelectorModel = _interopRequireDefault(require("./DateTimeRangeSelectorModel"));
9
- var _Int32RangeSelectorModel = _interopRequireDefault(require("./Int32RangeSelectorModel"));
9
+ var _Int64RangeSelectorModel = _interopRequireDefault(require("./Int64RangeSelectorModel"));
10
10
  var _ProjectTypeModel = _interopRequireDefault(require("./ProjectTypeModel"));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /**
@@ -63,16 +63,16 @@ class ProjectsFilterModel {
63
63
  obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
64
64
  }
65
65
  if (data.hasOwnProperty('testCasesCount')) {
66
- obj['testCasesCount'] = _ApiClient.default.convertToType(data['testCasesCount'], _Int32RangeSelectorModel.default);
66
+ obj['testCasesCount'] = _ApiClient.default.convertToType(data['testCasesCount'], _Int64RangeSelectorModel.default);
67
67
  }
68
68
  if (data.hasOwnProperty('checklistsCount')) {
69
- obj['checklistsCount'] = _ApiClient.default.convertToType(data['checklistsCount'], _Int32RangeSelectorModel.default);
69
+ obj['checklistsCount'] = _ApiClient.default.convertToType(data['checklistsCount'], _Int64RangeSelectorModel.default);
70
70
  }
71
71
  if (data.hasOwnProperty('sharedStepsCount')) {
72
- obj['sharedStepsCount'] = _ApiClient.default.convertToType(data['sharedStepsCount'], _Int32RangeSelectorModel.default);
72
+ obj['sharedStepsCount'] = _ApiClient.default.convertToType(data['sharedStepsCount'], _Int64RangeSelectorModel.default);
73
73
  }
74
74
  if (data.hasOwnProperty('autotestsCount')) {
75
- obj['autotestsCount'] = _ApiClient.default.convertToType(data['autotestsCount'], _Int32RangeSelectorModel.default);
75
+ obj['autotestsCount'] = _ApiClient.default.convertToType(data['autotestsCount'], _Int64RangeSelectorModel.default);
76
76
  }
77
77
  if (data.hasOwnProperty('globalIds')) {
78
78
  obj['globalIds'] = _ApiClient.default.convertToType(data['globalIds'], ['Number']);
@@ -103,22 +103,22 @@ class ProjectsFilterModel {
103
103
  // validate the optional field `testCasesCount`
104
104
  if (data['testCasesCount']) {
105
105
  // data not null
106
- _Int32RangeSelectorModel.default.validateJSON(data['testCasesCount']);
106
+ _Int64RangeSelectorModel.default.validateJSON(data['testCasesCount']);
107
107
  }
108
108
  // validate the optional field `checklistsCount`
109
109
  if (data['checklistsCount']) {
110
110
  // data not null
111
- _Int32RangeSelectorModel.default.validateJSON(data['checklistsCount']);
111
+ _Int64RangeSelectorModel.default.validateJSON(data['checklistsCount']);
112
112
  }
113
113
  // validate the optional field `sharedStepsCount`
114
114
  if (data['sharedStepsCount']) {
115
115
  // data not null
116
- _Int32RangeSelectorModel.default.validateJSON(data['sharedStepsCount']);
116
+ _Int64RangeSelectorModel.default.validateJSON(data['sharedStepsCount']);
117
117
  }
118
118
  // validate the optional field `autotestsCount`
119
119
  if (data['autotestsCount']) {
120
120
  // data not null
121
- _Int32RangeSelectorModel.default.validateJSON(data['autotestsCount']);
121
+ _Int64RangeSelectorModel.default.validateJSON(data['autotestsCount']);
122
122
  }
123
123
  // ensure the json data is an array
124
124
  if (!Array.isArray(data['globalIds'])) {
@@ -161,25 +161,25 @@ ProjectsFilterModel.prototype['isDeleted'] = undefined;
161
161
 
162
162
  /**
163
163
  * Specifies a project range of test cases count to search for
164
- * @member {module:model/Int32RangeSelectorModel} testCasesCount
164
+ * @member {module:model/Int64RangeSelectorModel} testCasesCount
165
165
  */
166
166
  ProjectsFilterModel.prototype['testCasesCount'] = undefined;
167
167
 
168
168
  /**
169
169
  * Specifies a project range of checklists count to search for
170
- * @member {module:model/Int32RangeSelectorModel} checklistsCount
170
+ * @member {module:model/Int64RangeSelectorModel} checklistsCount
171
171
  */
172
172
  ProjectsFilterModel.prototype['checklistsCount'] = undefined;
173
173
 
174
174
  /**
175
175
  * Specifies a project range of shared steps count to search for
176
- * @member {module:model/Int32RangeSelectorModel} sharedStepsCount
176
+ * @member {module:model/Int64RangeSelectorModel} sharedStepsCount
177
177
  */
178
178
  ProjectsFilterModel.prototype['sharedStepsCount'] = undefined;
179
179
 
180
180
  /**
181
181
  * Specifies a project range of autotests count to search for
182
- * @member {module:model/Int32RangeSelectorModel} autotestsCount
182
+ * @member {module:model/Int64RangeSelectorModel} autotestsCount
183
183
  */
184
184
  ProjectsFilterModel.prototype['autotestsCount'] = undefined;
185
185
 
@@ -34,6 +34,7 @@ class TestResultShortResponse {
34
34
  * @alias module:model/TestResultShortResponse
35
35
  * @param id {String} Unique ID of the test result
36
36
  * @param name {String} Name of autotest represented by the test result
37
+ * @param autotestGlobalId {Number} Global ID of autotest represented by the test result
37
38
  * @param autoTestTags {Array.<String>} Tags of the autotest represented by the test result
38
39
  * @param testRunId {String} Unique ID of test run where the test result is located
39
40
  * @param configurationId {String} Unique ID of configuration which the test result uses
@@ -44,8 +45,8 @@ class TestResultShortResponse {
44
45
  * @param attachments {Array.<module:model/AttachmentApiResult>} Collection of files attached to the test result
45
46
  * @param rerunCompletedCount {Number} Run count
46
47
  */
47
- constructor(id, name, autoTestTags, testRunId, configurationId, configurationName, status, resultReasons, links, attachments, rerunCompletedCount) {
48
- TestResultShortResponse.initialize(this, id, name, autoTestTags, testRunId, configurationId, configurationName, status, resultReasons, links, attachments, rerunCompletedCount);
48
+ constructor(id, name, autotestGlobalId, autoTestTags, testRunId, configurationId, configurationName, status, resultReasons, links, attachments, rerunCompletedCount) {
49
+ TestResultShortResponse.initialize(this, id, name, autotestGlobalId, autoTestTags, testRunId, configurationId, configurationName, status, resultReasons, links, attachments, rerunCompletedCount);
49
50
  }
50
51
 
51
52
  /**
@@ -53,9 +54,10 @@ class TestResultShortResponse {
53
54
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
55
  * Only for internal use.
55
56
  */
56
- static initialize(obj, id, name, autoTestTags, testRunId, configurationId, configurationName, status, resultReasons, links, attachments, rerunCompletedCount) {
57
+ static initialize(obj, id, name, autotestGlobalId, autoTestTags, testRunId, configurationId, configurationName, status, resultReasons, links, attachments, rerunCompletedCount) {
57
58
  obj['id'] = id;
58
59
  obj['name'] = name;
60
+ obj['autotestGlobalId'] = autotestGlobalId;
59
61
  obj['autoTestTags'] = autoTestTags;
60
62
  obj['testRunId'] = testRunId;
61
63
  obj['configurationId'] = configurationId;
@@ -83,6 +85,9 @@ class TestResultShortResponse {
83
85
  if (data.hasOwnProperty('name')) {
84
86
  obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
85
87
  }
88
+ if (data.hasOwnProperty('autotestGlobalId')) {
89
+ obj['autotestGlobalId'] = _ApiClient.default.convertToType(data['autotestGlobalId'], 'Number');
90
+ }
86
91
  if (data.hasOwnProperty('autotestExternalId')) {
87
92
  obj['autotestExternalId'] = _ApiClient.default.convertToType(data['autotestExternalId'], 'String');
88
93
  }
@@ -218,7 +223,7 @@ class TestResultShortResponse {
218
223
  return true;
219
224
  }
220
225
  }
221
- TestResultShortResponse.RequiredProperties = ["id", "name", "autoTestTags", "testRunId", "configurationId", "configurationName", "status", "resultReasons", "links", "attachments", "rerunCompletedCount"];
226
+ TestResultShortResponse.RequiredProperties = ["id", "name", "autotestGlobalId", "autoTestTags", "testRunId", "configurationId", "configurationName", "status", "resultReasons", "links", "attachments", "rerunCompletedCount"];
222
227
 
223
228
  /**
224
229
  * Unique ID of the test result
@@ -232,6 +237,12 @@ TestResultShortResponse.prototype['id'] = undefined;
232
237
  */
233
238
  TestResultShortResponse.prototype['name'] = undefined;
234
239
 
240
+ /**
241
+ * Global ID of autotest represented by the test result
242
+ * @member {Number} autotestGlobalId
243
+ */
244
+ TestResultShortResponse.prototype['autotestGlobalId'] = undefined;
245
+
235
246
  /**
236
247
  * External ID of autotest represented by the test result
237
248
  * @member {String} autotestExternalId
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _FailureCategoryModel = _interopRequireDefault(require("./FailureCategoryModel"));
8
9
  var _Int64RangeSelectorModel = _interopRequireDefault(require("./Int64RangeSelectorModel"));
9
10
  var _TestResultOutcome = _interopRequireDefault(require("./TestResultOutcome"));
10
11
  var _TestStatusApiType = _interopRequireDefault(require("./TestStatusApiType"));
@@ -65,6 +66,9 @@ class TestResultsFilterApiModel {
65
66
  if (data.hasOwnProperty('statusTypes')) {
66
67
  obj['statusTypes'] = _ApiClient.default.convertToType(data['statusTypes'], [_TestStatusApiType.default]);
67
68
  }
69
+ if (data.hasOwnProperty('failureCategories')) {
70
+ obj['failureCategories'] = _ApiClient.default.convertToType(data['failureCategories'], [_FailureCategoryModel.default]);
71
+ }
68
72
  if (data.hasOwnProperty('namespace')) {
69
73
  obj['namespace'] = _ApiClient.default.convertToType(data['namespace'], 'String');
70
74
  }
@@ -115,6 +119,10 @@ class TestResultsFilterApiModel {
115
119
  if (!Array.isArray(data['statusTypes'])) {
116
120
  throw new Error("Expected the field `statusTypes` to be an array in the JSON data but got " + data['statusTypes']);
117
121
  }
122
+ // ensure the json data is an array
123
+ if (!Array.isArray(data['failureCategories'])) {
124
+ throw new Error("Expected the field `failureCategories` to be an array in the JSON data but got " + data['failureCategories']);
125
+ }
118
126
  // ensure the json data is a string
119
127
  if (data['namespace'] && !(typeof data['namespace'] === 'string' || data['namespace'] instanceof String)) {
120
128
  throw new Error("Expected the field `namespace` to be a primitive type in the JSON string but got " + data['namespace']);
@@ -176,6 +184,12 @@ TestResultsFilterApiModel.prototype['statusCodes'] = undefined;
176
184
  */
177
185
  TestResultsFilterApiModel.prototype['statusTypes'] = undefined;
178
186
 
187
+ /**
188
+ * Specifies a test result failure categories to search for
189
+ * @member {Array.<module:model/FailureCategoryModel>} failureCategories
190
+ */
191
+ TestResultsFilterApiModel.prototype['failureCategories'] = undefined;
192
+
179
193
  /**
180
194
  * Specifies a test result namespace to search for
181
195
  * @member {String} namespace
@@ -34,14 +34,15 @@ class TestRunApiResult {
34
34
  * @alias module:model/TestRunApiResult
35
35
  * @param id {String} Test run unique identifier
36
36
  * @param name {String} Test run name
37
+ * @param projectId {String} Project unique identifier This property is used to link test run with project.
37
38
  * @param stateName {module:model/TestRunState} Test run state
38
39
  * @param status {module:model/TestStatusApiResult} Test run status
39
40
  * @param attachments {Array.<module:model/AttachmentApiResult>} Collection of attachments related to the test run
40
41
  * @param links {Array.<module:model/LinkApiResult>} Collection of links related to the test run
41
42
  * @param tags {Array.<String>} Collection of tags associated with the test run
42
43
  */
43
- constructor(id, name, stateName, status, attachments, links, tags) {
44
- TestRunApiResult.initialize(this, id, name, stateName, status, attachments, links, tags);
44
+ constructor(id, name, projectId, stateName, status, attachments, links, tags) {
45
+ TestRunApiResult.initialize(this, id, name, projectId, stateName, status, attachments, links, tags);
45
46
  }
46
47
 
47
48
  /**
@@ -49,9 +50,10 @@ class TestRunApiResult {
49
50
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
51
  * Only for internal use.
51
52
  */
52
- static initialize(obj, id, name, stateName, status, attachments, links, tags) {
53
+ static initialize(obj, id, name, projectId, stateName, status, attachments, links, tags) {
53
54
  obj['id'] = id;
54
55
  obj['name'] = name;
56
+ obj['projectId'] = projectId;
55
57
  obj['stateName'] = stateName;
56
58
  obj['status'] = status;
57
59
  obj['attachments'] = attachments;
@@ -75,6 +77,15 @@ class TestRunApiResult {
75
77
  if (data.hasOwnProperty('name')) {
76
78
  obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
77
79
  }
80
+ if (data.hasOwnProperty('description')) {
81
+ obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('launchSource')) {
84
+ obj['launchSource'] = _ApiClient.default.convertToType(data['launchSource'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('projectId')) {
87
+ obj['projectId'] = _ApiClient.default.convertToType(data['projectId'], 'String');
88
+ }
78
89
  if (data.hasOwnProperty('stateName')) {
79
90
  obj['stateName'] = _ApiClient.default.convertToType(data['stateName'], _TestRunState.default);
80
91
  }
@@ -114,6 +125,18 @@ class TestRunApiResult {
114
125
  if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
115
126
  throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
116
127
  }
128
+ // ensure the json data is a string
129
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
130
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
131
+ }
132
+ // ensure the json data is a string
133
+ if (data['launchSource'] && !(typeof data['launchSource'] === 'string' || data['launchSource'] instanceof String)) {
134
+ throw new Error("Expected the field `launchSource` to be a primitive type in the JSON string but got " + data['launchSource']);
135
+ }
136
+ // ensure the json data is a string
137
+ if (data['projectId'] && !(typeof data['projectId'] === 'string' || data['projectId'] instanceof String)) {
138
+ throw new Error("Expected the field `projectId` to be a primitive type in the JSON string but got " + data['projectId']);
139
+ }
117
140
  // validate the optional field `status`
118
141
  if (data['status']) {
119
142
  // data not null
@@ -150,7 +173,7 @@ class TestRunApiResult {
150
173
  return true;
151
174
  }
152
175
  }
153
- TestRunApiResult.RequiredProperties = ["id", "name", "stateName", "status", "attachments", "links", "tags"];
176
+ TestRunApiResult.RequiredProperties = ["id", "name", "projectId", "stateName", "status", "attachments", "links", "tags"];
154
177
 
155
178
  /**
156
179
  * Test run unique identifier
@@ -164,6 +187,24 @@ TestRunApiResult.prototype['id'] = undefined;
164
187
  */
165
188
  TestRunApiResult.prototype['name'] = undefined;
166
189
 
190
+ /**
191
+ * Test run description
192
+ * @member {String} description
193
+ */
194
+ TestRunApiResult.prototype['description'] = undefined;
195
+
196
+ /**
197
+ * Test run launch source Once launch source is specified it cannot be updated.
198
+ * @member {String} launchSource
199
+ */
200
+ TestRunApiResult.prototype['launchSource'] = undefined;
201
+
202
+ /**
203
+ * Project unique identifier This property is used to link test run with project.
204
+ * @member {String} projectId
205
+ */
206
+ TestRunApiResult.prototype['projectId'] = undefined;
207
+
167
208
  /**
168
209
  * Test run state
169
210
  * @member {module:model/TestRunState} stateName