testit-js-commons 5.1.2 → 5.1.3-TMS-6.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.
Files changed (33) hide show
  1. package/lib/adapters-api/dist/ApiClient.js +5 -6
  2. package/lib/adapters-api/dist/api/AttachmentsApi.js +5 -5
  3. package/lib/adapters-api/dist/api/AutoTestsApi.js +10 -118
  4. package/lib/adapters-api/dist/api/ConfigurationsApi.js +1 -1
  5. package/lib/adapters-api/dist/api/CustomAttributesApi.js +4 -4
  6. package/lib/adapters-api/dist/api/ParametersApi.js +3 -3
  7. package/lib/adapters-api/dist/api/ProjectAttributesApi.js +2 -2
  8. package/lib/adapters-api/dist/api/ProjectSectionsApi.js +1 -1
  9. package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +1 -1
  10. package/lib/adapters-api/dist/api/ProjectsApi.js +4 -4
  11. package/lib/adapters-api/dist/api/SectionsApi.js +2 -2
  12. package/lib/adapters-api/dist/api/TestResultsApi.js +3 -3
  13. package/lib/adapters-api/dist/api/TestRunsApi.js +8 -8
  14. package/lib/adapters-api/dist/api/WorkItemsApi.js +3 -3
  15. package/lib/adapters-api/dist/api/WorkflowsApi.js +1 -1
  16. package/lib/adapters-api/dist/index.js +7 -0
  17. package/lib/adapters-api/dist/model/AutoTestCaseModel.js +85 -0
  18. package/lib/adapters-api/dist/model/AutoTestFilterApiModel.js +27 -0
  19. package/lib/adapters-api/dist/model/AutoTestModel.js +15 -0
  20. package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +4 -6
  21. package/lib/adapters-api/dist/model/CreateWorkItemApiModel.js +22 -0
  22. package/lib/adapters-api/dist/model/CustomAttributeType.js +6 -0
  23. package/lib/adapters-api/dist/model/CustomAttributeTypesEnum.js +6 -0
  24. package/lib/adapters-api/dist/model/WorkItemApiResult.js +28 -4
  25. package/lib/adapters-api/dist/model/WorkItemEntityTypeApiModel.js +6 -0
  26. package/lib/adapters-api/dist/model/WorkItemFilterApiModel.js +40 -0
  27. package/lib/adapters-api/dist/model/WorkItemTypeModel.js +6 -0
  28. package/lib/adapters-api/index.d.ts +85 -96
  29. package/lib/common/base.service.js +4 -1
  30. package/lib/services/syncstorage/syncstorage.runner.d.ts +29 -7
  31. package/lib/services/syncstorage/syncstorage.runner.js +233 -22
  32. package/lib/services/syncstorage/syncstorage.runner.test.js +67 -3
  33. package/package.json +1 -1
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ /**
10
+ * API
11
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
12
+ *
13
+ * The version of the OpenAPI document: adapters
14
+ *
15
+ *
16
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
17
+ * https://openapi-generator.tech
18
+ * Do not edit the class manually.
19
+ *
20
+ */
21
+
22
+ /**
23
+ * The AutoTestCaseModel model module.
24
+ * @module model/AutoTestCaseModel
25
+ * @version 1.0.0
26
+ */
27
+ class AutoTestCaseModel {
28
+ /**
29
+ * Constructs a new <code>AutoTestCaseModel</code>.
30
+ * @alias module:model/AutoTestCaseModel
31
+ * @param globalId {Number} Global ID of the auto test case
32
+ */
33
+ constructor(globalId) {
34
+ AutoTestCaseModel.initialize(this, globalId);
35
+ }
36
+
37
+ /**
38
+ * Initializes the fields of this object.
39
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
40
+ * Only for internal use.
41
+ */
42
+ static initialize(obj, globalId) {
43
+ obj['globalId'] = globalId;
44
+ }
45
+
46
+ /**
47
+ * Constructs a <code>AutoTestCaseModel</code> from a plain JavaScript object, optionally creating a new instance.
48
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
49
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
50
+ * @param {module:model/AutoTestCaseModel} obj Optional instance to populate.
51
+ * @return {module:model/AutoTestCaseModel} The populated <code>AutoTestCaseModel</code> instance.
52
+ */
53
+ static constructFromObject(data, obj) {
54
+ if (data) {
55
+ obj = obj || new AutoTestCaseModel();
56
+ if (data.hasOwnProperty('globalId')) {
57
+ obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
58
+ }
59
+ }
60
+ return obj;
61
+ }
62
+
63
+ /**
64
+ * Validates the JSON data with respect to <code>AutoTestCaseModel</code>.
65
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
66
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AutoTestCaseModel</code>.
67
+ */
68
+ static validateJSON(data) {
69
+ // check to make sure all required properties are present in the JSON string
70
+ for (const property of AutoTestCaseModel.RequiredProperties) {
71
+ if (!data.hasOwnProperty(property)) {
72
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
73
+ }
74
+ }
75
+ return true;
76
+ }
77
+ }
78
+ AutoTestCaseModel.RequiredProperties = ["globalId"];
79
+
80
+ /**
81
+ * Global ID of the auto test case
82
+ * @member {Number} globalId
83
+ */
84
+ AutoTestCaseModel.prototype['globalId'] = undefined;
85
+ var _default = exports.default = AutoTestCaseModel;
@@ -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 _LayerSource = _interopRequireDefault(require("./LayerSource"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
10
  /**
10
11
  * API
@@ -83,6 +84,12 @@ class AutoTestFilterApiModel {
83
84
  if (data.hasOwnProperty('excludeTags')) {
84
85
  obj['excludeTags'] = _ApiClient.default.convertToType(data['excludeTags'], ['String']);
85
86
  }
87
+ if (data.hasOwnProperty('layers')) {
88
+ obj['layers'] = _ApiClient.default.convertToType(data['layers'], ['String']);
89
+ }
90
+ if (data.hasOwnProperty('layerSources')) {
91
+ obj['layerSources'] = _ApiClient.default.convertToType(data['layerSources'], [_LayerSource.default]);
92
+ }
86
93
  }
87
94
  return obj;
88
95
  }
@@ -129,6 +136,14 @@ class AutoTestFilterApiModel {
129
136
  if (!Array.isArray(data['excludeTags'])) {
130
137
  throw new Error("Expected the field `excludeTags` to be an array in the JSON data but got " + data['excludeTags']);
131
138
  }
139
+ // ensure the json data is an array
140
+ if (!Array.isArray(data['layers'])) {
141
+ throw new Error("Expected the field `layers` to be an array in the JSON data but got " + data['layers']);
142
+ }
143
+ // ensure the json data is an array
144
+ if (!Array.isArray(data['layerSources'])) {
145
+ throw new Error("Expected the field `layerSources` to be an array in the JSON data but got " + data['layerSources']);
146
+ }
132
147
  return true;
133
148
  }
134
149
  }
@@ -198,4 +213,16 @@ AutoTestFilterApiModel.prototype['tags'] = undefined;
198
213
  * @member {Array.<String>} excludeTags
199
214
  */
200
215
  AutoTestFilterApiModel.prototype['excludeTags'] = undefined;
216
+
217
+ /**
218
+ * Specifies auto test layers to search for
219
+ * @member {Array.<String>} layers
220
+ */
221
+ AutoTestFilterApiModel.prototype['layers'] = undefined;
222
+
223
+ /**
224
+ * Specifies list of auto test layer sources to search for
225
+ * @member {Array.<module:model/LayerSource>} layerSources
226
+ */
227
+ AutoTestFilterApiModel.prototype['layerSources'] = undefined;
201
228
  var _default = exports.default = AutoTestFilterApiModel;
@@ -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 _AutoTestCaseModel = _interopRequireDefault(require("./AutoTestCaseModel"));
8
9
  var _AutoTestStepModel = _interopRequireDefault(require("./AutoTestStepModel"));
9
10
  var _ConfigurationShortModel = _interopRequireDefault(require("./ConfigurationShortModel"));
10
11
  var _LabelShortModel = _interopRequireDefault(require("./LabelShortModel"));
@@ -119,6 +120,9 @@ class AutoTestModel {
119
120
  if (data.hasOwnProperty('stabilityPercentage')) {
120
121
  obj['stabilityPercentage'] = _ApiClient.default.convertToType(data['stabilityPercentage'], 'Number');
121
122
  }
123
+ if (data.hasOwnProperty('autoTestCase')) {
124
+ obj['autoTestCase'] = _ApiClient.default.convertToType(data['autoTestCase'], _AutoTestCaseModel.default);
125
+ }
122
126
  if (data.hasOwnProperty('externalId')) {
123
127
  obj['externalId'] = _ApiClient.default.convertToType(data['externalId'], 'String');
124
128
  }
@@ -215,6 +219,11 @@ class AutoTestModel {
215
219
  // data not null
216
220
  _TestStatusModel.default.validateJSON(data['lastTestResultStatus']);
217
221
  }
222
+ // validate the optional field `autoTestCase`
223
+ if (data['autoTestCase']) {
224
+ // data not null
225
+ _AutoTestCaseModel.default.validateJSON(data['autoTestCase']);
226
+ }
218
227
  // ensure the json data is a string
219
228
  if (data['externalId'] && !(typeof data['externalId'] === 'string' || data['externalId'] instanceof String)) {
220
229
  throw new Error("Expected the field `externalId` to be a primitive type in the JSON string but got " + data['externalId']);
@@ -402,6 +411,12 @@ AutoTestModel.prototype['lastTestResultStatus'] = undefined;
402
411
  */
403
412
  AutoTestModel.prototype['stabilityPercentage'] = undefined;
404
413
 
414
+ /**
415
+ * Auto test case linked with the autotest
416
+ * @member {module:model/AutoTestCaseModel} autoTestCase
417
+ */
418
+ AutoTestModel.prototype['autoTestCase'] = undefined;
419
+
405
420
  /**
406
421
  * External ID of the autotest
407
422
  * @member {String} externalId
@@ -35,10 +35,9 @@ class AutoTestUpdateApiModel {
35
35
  * @param projectId {String} Unique ID of the autotest project
36
36
  * @param externalId {String} External ID of the autotest
37
37
  * @param name {String} Name of the autotest
38
- * @param resetLayer {Boolean} Indicates if the autotest layer should be reset.
39
38
  */
40
- constructor(projectId, externalId, name, resetLayer) {
41
- AutoTestUpdateApiModel.initialize(this, projectId, externalId, name, resetLayer);
39
+ constructor(projectId, externalId, name) {
40
+ AutoTestUpdateApiModel.initialize(this, projectId, externalId, name);
42
41
  }
43
42
 
44
43
  /**
@@ -46,11 +45,10 @@ class AutoTestUpdateApiModel {
46
45
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
46
  * Only for internal use.
48
47
  */
49
- static initialize(obj, projectId, externalId, name, resetLayer) {
48
+ static initialize(obj, projectId, externalId, name) {
50
49
  obj['projectId'] = projectId;
51
50
  obj['externalId'] = externalId;
52
51
  obj['name'] = name;
53
- obj['resetLayer'] = resetLayer;
54
52
  }
55
53
 
56
54
  /**
@@ -241,7 +239,7 @@ class AutoTestUpdateApiModel {
241
239
  return true;
242
240
  }
243
241
  }
244
- AutoTestUpdateApiModel.RequiredProperties = ["projectId", "externalId", "name", "resetLayer"];
242
+ AutoTestUpdateApiModel.RequiredProperties = ["projectId", "externalId", "name"];
245
243
 
246
244
  /**
247
245
  * Autotest unique internal identifier
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _AssignAttachmentApiModel = _interopRequireDefault(require("./AssignAttachmentApiModel"));
9
+ var _AssignAutoTestCaseIdApiModel = _interopRequireDefault(require("./AssignAutoTestCaseIdApiModel"));
9
10
  var _AssignIterationApiModel = _interopRequireDefault(require("./AssignIterationApiModel"));
10
11
  var _AutoTestIdModel = _interopRequireDefault(require("./AutoTestIdModel"));
11
12
  var _CreateLinkApiModel = _interopRequireDefault(require("./CreateLinkApiModel"));
@@ -120,6 +121,9 @@ class CreateWorkItemApiModel {
120
121
  if (data.hasOwnProperty('autoTests')) {
121
122
  obj['autoTests'] = _ApiClient.default.convertToType(data['autoTests'], [_AutoTestIdModel.default]);
122
123
  }
124
+ if (data.hasOwnProperty('autoTestCases')) {
125
+ obj['autoTestCases'] = _ApiClient.default.convertToType(data['autoTestCases'], [_AssignAutoTestCaseIdApiModel.default]);
126
+ }
123
127
  if (data.hasOwnProperty('attachments')) {
124
128
  obj['attachments'] = _ApiClient.default.convertToType(data['attachments'], [_AssignAttachmentApiModel.default]);
125
129
  }
@@ -233,6 +237,18 @@ class CreateWorkItemApiModel {
233
237
  }
234
238
  ;
235
239
  }
240
+ if (data['autoTestCases']) {
241
+ // data not null
242
+ // ensure the json data is an array
243
+ if (!Array.isArray(data['autoTestCases'])) {
244
+ throw new Error("Expected the field `autoTestCases` to be an array in the JSON data but got " + data['autoTestCases']);
245
+ }
246
+ // validate the optional field `autoTestCases` (array)
247
+ for (const item of data['autoTestCases']) {
248
+ _AssignAutoTestCaseIdApiModel.default.validateJSON(item);
249
+ }
250
+ ;
251
+ }
236
252
  if (data['attachments']) {
237
253
  // data not null
238
254
  // ensure the json data is an array
@@ -364,6 +380,12 @@ CreateWorkItemApiModel.prototype['iterations'] = undefined;
364
380
  */
365
381
  CreateWorkItemApiModel.prototype['autoTests'] = undefined;
366
382
 
383
+ /**
384
+ * Set of automated test cases linked to the work item
385
+ * @member {Array.<module:model/AssignAutoTestCaseIdApiModel>} autoTestCases
386
+ */
387
+ CreateWorkItemApiModel.prototype['autoTestCases'] = undefined;
388
+
367
389
  /**
368
390
  * Set of files attached to the work item
369
391
  * @member {Array.<module:model/AssignAttachmentApiModel>} attachments
@@ -61,6 +61,12 @@ class CustomAttributeType {
61
61
  */
62
62
  "checkbox" = "checkbox";
63
63
 
64
+ /**
65
+ * value: "numeric"
66
+ * @const
67
+ */
68
+ "numeric" = "numeric";
69
+
64
70
  /**
65
71
  * Returns a <code>CustomAttributeType</code> enum value from a Javascript object name.
66
72
  * @param {Object} data The plain JavaScript object containing the name of the enum value.
@@ -61,6 +61,12 @@ class CustomAttributeTypesEnum {
61
61
  */
62
62
  "checkbox" = "checkbox";
63
63
 
64
+ /**
65
+ * value: "numeric"
66
+ * @const
67
+ */
68
+ "numeric" = "numeric";
69
+
64
70
  /**
65
71
  * Returns a <code>CustomAttributeTypesEnum</code> enum value from a Javascript object name.
66
72
  * @param {Object} data The plain JavaScript object containing the name of the enum value.
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _AttachmentModel = _interopRequireDefault(require("./AttachmentModel"));
9
+ var _AutoTestCaseApiModel = _interopRequireDefault(require("./AutoTestCaseApiModel"));
9
10
  var _AutoTestModel = _interopRequireDefault(require("./AutoTestModel"));
10
11
  var _IterationModel = _interopRequireDefault(require("./IterationModel"));
11
12
  var _LinkModel = _interopRequireDefault(require("./LinkModel"));
@@ -57,13 +58,14 @@ class WorkItemApiResult {
57
58
  * @param postconditionSteps {Array.<module:model/StepModel>} Set of postcondition steps that are executed after completing the main steps
58
59
  * @param iterations {Array.<module:model/IterationModel>} Associated iterations linked to the work item
59
60
  * @param autoTests {Array.<module:model/AutoTestModel>} Automated tests associated with the work item
61
+ * @param autoTestCases {Array.<module:model/AutoTestCaseApiModel>} Set of automated test cases linked to the work item
60
62
  * @param attachments {Array.<module:model/AttachmentModel>} Files attached to the work item
61
63
  * @param links {Array.<module:model/LinkModel>} Set of links related to the work item
62
64
  * @param parameters {Array.<module:model/WorkItemParameterKeyApiResult>} Set of parameters related to the work item
63
65
  * @param isDeleted {Boolean} Indicates whether the work item is marked as deleted
64
66
  */
65
- constructor(id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, attachments, links, parameters, isDeleted) {
66
- WorkItemApiResult.initialize(this, id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, attachments, links, parameters, isDeleted);
67
+ constructor(id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, autoTestCases, attachments, links, parameters, isDeleted) {
68
+ WorkItemApiResult.initialize(this, id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, autoTestCases, attachments, links, parameters, isDeleted);
67
69
  }
68
70
 
69
71
  /**
@@ -71,7 +73,7 @@ class WorkItemApiResult {
71
73
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
72
74
  * Only for internal use.
73
75
  */
74
- static initialize(obj, id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, attachments, links, parameters, isDeleted) {
76
+ static initialize(obj, id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, autoTestCases, attachments, links, parameters, isDeleted) {
75
77
  obj['id'] = id;
76
78
  obj['globalId'] = globalId;
77
79
  obj['projectId'] = projectId;
@@ -91,6 +93,7 @@ class WorkItemApiResult {
91
93
  obj['postconditionSteps'] = postconditionSteps;
92
94
  obj['iterations'] = iterations;
93
95
  obj['autoTests'] = autoTests;
96
+ obj['autoTestCases'] = autoTestCases;
94
97
  obj['attachments'] = attachments;
95
98
  obj['links'] = links;
96
99
  obj['parameters'] = parameters;
@@ -169,6 +172,9 @@ class WorkItemApiResult {
169
172
  if (data.hasOwnProperty('autoTests')) {
170
173
  obj['autoTests'] = _ApiClient.default.convertToType(data['autoTests'], [_AutoTestModel.default]);
171
174
  }
175
+ if (data.hasOwnProperty('autoTestCases')) {
176
+ obj['autoTestCases'] = _ApiClient.default.convertToType(data['autoTestCases'], [_AutoTestCaseApiModel.default]);
177
+ }
172
178
  if (data.hasOwnProperty('attachments')) {
173
179
  obj['attachments'] = _ApiClient.default.convertToType(data['attachments'], [_AttachmentModel.default]);
174
180
  }
@@ -313,6 +319,18 @@ class WorkItemApiResult {
313
319
  }
314
320
  ;
315
321
  }
322
+ if (data['autoTestCases']) {
323
+ // data not null
324
+ // ensure the json data is an array
325
+ if (!Array.isArray(data['autoTestCases'])) {
326
+ throw new Error("Expected the field `autoTestCases` to be an array in the JSON data but got " + data['autoTestCases']);
327
+ }
328
+ // validate the optional field `autoTestCases` (array)
329
+ for (const item of data['autoTestCases']) {
330
+ _AutoTestCaseApiModel.default.validateJSON(item);
331
+ }
332
+ ;
333
+ }
316
334
  if (data['attachments']) {
317
335
  // data not null
318
336
  // ensure the json data is an array
@@ -352,7 +370,7 @@ class WorkItemApiResult {
352
370
  return true;
353
371
  }
354
372
  }
355
- WorkItemApiResult.RequiredProperties = ["id", "globalId", "projectId", "sectionId", "name", "entityTypeName", "duration", "state", "priority", "isAutomated", "attributes", "tags", "sectionPreconditionSteps", "sectionPostconditionSteps", "preconditionSteps", "steps", "postconditionSteps", "iterations", "autoTests", "attachments", "links", "parameters", "isDeleted"];
373
+ WorkItemApiResult.RequiredProperties = ["id", "globalId", "projectId", "sectionId", "name", "entityTypeName", "duration", "state", "priority", "isAutomated", "attributes", "tags", "sectionPreconditionSteps", "sectionPostconditionSteps", "preconditionSteps", "steps", "postconditionSteps", "iterations", "autoTests", "autoTestCases", "attachments", "links", "parameters", "isDeleted"];
356
374
 
357
375
  /**
358
376
  * Unique identifier of the work item
@@ -473,6 +491,12 @@ WorkItemApiResult.prototype['iterations'] = undefined;
473
491
  */
474
492
  WorkItemApiResult.prototype['autoTests'] = undefined;
475
493
 
494
+ /**
495
+ * Set of automated test cases linked to the work item
496
+ * @member {Array.<module:model/AutoTestCaseApiModel>} autoTestCases
497
+ */
498
+ WorkItemApiResult.prototype['autoTestCases'] = undefined;
499
+
476
500
  /**
477
501
  * Files attached to the work item
478
502
  * @member {Array.<module:model/AttachmentModel>} attachments
@@ -43,6 +43,12 @@ class WorkItemEntityTypeApiModel {
43
43
  */
44
44
  "SharedSteps" = "SharedSteps";
45
45
 
46
+ /**
47
+ * value: "AutoTestCases"
48
+ * @const
49
+ */
50
+ "AutoTestCases" = "AutoTestCases";
51
+
46
52
  /**
47
53
  * Returns a <code>WorkItemEntityTypeApiModel</code> enum value from a Javascript object name.
48
54
  * @param {Object} data The plain JavaScript object containing the name of the enum value.
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _Int32RangeSelectorModel = _interopRequireDefault(require("./Int32RangeSelectorModel"));
9
+ var _LayerSource = _interopRequireDefault(require("./LayerSource"));
9
10
  var _WorkItemPriorityModel = _interopRequireDefault(require("./WorkItemPriorityModel"));
10
11
  var _WorkItemSourceTypeModel = _interopRequireDefault(require("./WorkItemSourceTypeModel"));
11
12
  var _WorkItemStates = _interopRequireDefault(require("./WorkItemStates"));
@@ -114,6 +115,15 @@ class WorkItemFilterApiModel {
114
115
  if (data.hasOwnProperty('autoTestIds')) {
115
116
  obj['autoTestIds'] = _ApiClient.default.convertToType(data['autoTestIds'], ['String']);
116
117
  }
118
+ if (data.hasOwnProperty('layers')) {
119
+ obj['layers'] = _ApiClient.default.convertToType(data['layers'], ['String']);
120
+ }
121
+ if (data.hasOwnProperty('layerSources')) {
122
+ obj['layerSources'] = _ApiClient.default.convertToType(data['layerSources'], [_LayerSource.default]);
123
+ }
124
+ if (data.hasOwnProperty('externalId')) {
125
+ obj['externalId'] = _ApiClient.default.convertToType(data['externalId'], 'String');
126
+ }
117
127
  }
118
128
  return obj;
119
129
  }
@@ -189,6 +199,18 @@ class WorkItemFilterApiModel {
189
199
  if (!Array.isArray(data['autoTestIds'])) {
190
200
  throw new Error("Expected the field `autoTestIds` to be an array in the JSON data but got " + data['autoTestIds']);
191
201
  }
202
+ // ensure the json data is an array
203
+ if (!Array.isArray(data['layers'])) {
204
+ throw new Error("Expected the field `layers` to be an array in the JSON data but got " + data['layers']);
205
+ }
206
+ // ensure the json data is an array
207
+ if (!Array.isArray(data['layerSources'])) {
208
+ throw new Error("Expected the field `layerSources` to be an array in the JSON data but got " + data['layerSources']);
209
+ }
210
+ // ensure the json data is a string
211
+ if (data['externalId'] && !(typeof data['externalId'] === 'string' || data['externalId'] instanceof String)) {
212
+ throw new Error("Expected the field `externalId` to be a primitive type in the JSON string but got " + data['externalId']);
213
+ }
192
214
  return true;
193
215
  }
194
216
  }
@@ -306,4 +328,22 @@ WorkItemFilterApiModel.prototype['excludeTags'] = undefined;
306
328
  * @member {Array.<String>} autoTestIds
307
329
  */
308
330
  WorkItemFilterApiModel.prototype['autoTestIds'] = undefined;
331
+
332
+ /**
333
+ * Specifies auto test case layers to search for
334
+ * @member {Array.<String>} layers
335
+ */
336
+ WorkItemFilterApiModel.prototype['layers'] = undefined;
337
+
338
+ /**
339
+ * Specifies list of auto test case layer sources to search for
340
+ * @member {Array.<module:model/LayerSource>} layerSources
341
+ */
342
+ WorkItemFilterApiModel.prototype['layerSources'] = undefined;
343
+
344
+ /**
345
+ * External identifier of the work item
346
+ * @member {String} externalId
347
+ */
348
+ WorkItemFilterApiModel.prototype['externalId'] = undefined;
309
349
  var _default = exports.default = WorkItemFilterApiModel;
@@ -43,6 +43,12 @@ class WorkItemTypeModel {
43
43
  */
44
44
  "SharedSteps" = "SharedSteps";
45
45
 
46
+ /**
47
+ * value: "AutoTestCases"
48
+ * @const
49
+ */
50
+ "AutoTestCases" = "AutoTestCases";
51
+
46
52
  /**
47
53
  * Returns a <code>WorkItemTypeModel</code> enum value from a Javascript object name.
48
54
  * @param {Object} data The plain JavaScript object containing the name of the enum value.