testit-js-commons 4.2.0-TMS-5.8 → 5.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.
Files changed (157) hide show
  1. package/lib/adapters-api/dist/ApiClient.js +683 -0
  2. package/lib/adapters-api/dist/api/AttachmentsApi.js +165 -0
  3. package/lib/adapters-api/dist/api/AutoTestsApi.js +536 -0
  4. package/lib/adapters-api/dist/api/ConfigurationsApi.js +91 -0
  5. package/lib/adapters-api/dist/api/ParametersApi.js +159 -0
  6. package/lib/adapters-api/dist/api/ProjectAttributesApi.js +140 -0
  7. package/lib/adapters-api/dist/api/ProjectSectionsApi.js +96 -0
  8. package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +99 -0
  9. package/lib/adapters-api/dist/api/ProjectsApi.js +200 -0
  10. package/lib/adapters-api/dist/api/SectionsApi.js +118 -0
  11. package/lib/adapters-api/dist/api/TestResultsApi.js +168 -0
  12. package/lib/adapters-api/dist/api/TestRunsApi.js +331 -0
  13. package/lib/adapters-api/dist/api/WorkItemsApi.js +170 -0
  14. package/lib/adapters-api/dist/api/WorkflowsApi.js +75 -0
  15. package/lib/adapters-api/dist/index.js +951 -0
  16. package/lib/adapters-api/dist/model/AssignAttachmentApiModel.js +89 -0
  17. package/lib/adapters-api/dist/model/AssignAutoTestCaseIdApiModel.js +89 -0
  18. package/lib/adapters-api/dist/model/AssignIterationApiModel.js +112 -0
  19. package/lib/adapters-api/dist/model/AttachmentApiResult.js +145 -0
  20. package/lib/adapters-api/dist/model/AttachmentModel.js +193 -0
  21. package/lib/adapters-api/dist/model/AttachmentPutModel.js +89 -0
  22. package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +196 -0
  23. package/lib/adapters-api/dist/model/AttachmentUpdateRequest.js +89 -0
  24. package/lib/adapters-api/dist/model/AutoTest.js +327 -0
  25. package/lib/adapters-api/dist/model/AutoTestApiResult.js +323 -0
  26. package/lib/adapters-api/dist/model/AutoTestCaseApiModel.js +89 -0
  27. package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +323 -0
  28. package/lib/adapters-api/dist/model/AutoTestFilterApiModel.js +201 -0
  29. package/lib/adapters-api/dist/model/AutoTestIdModel.js +88 -0
  30. package/lib/adapters-api/dist/model/AutoTestModel.js +488 -0
  31. package/lib/adapters-api/dist/model/AutoTestResultReasonShort.js +99 -0
  32. package/lib/adapters-api/dist/model/AutoTestResultsForTestRunModel.js +334 -0
  33. package/lib/adapters-api/dist/model/AutoTestSearchApiModel.js +96 -0
  34. package/lib/adapters-api/dist/model/AutoTestSearchIncludeApiModel.js +93 -0
  35. package/lib/adapters-api/dist/model/AutoTestStep.js +123 -0
  36. package/lib/adapters-api/dist/model/AutoTestStepApiModel.js +123 -0
  37. package/lib/adapters-api/dist/model/AutoTestStepApiResult.js +123 -0
  38. package/lib/adapters-api/dist/model/AutoTestStepModel.js +123 -0
  39. package/lib/adapters-api/dist/model/AutoTestStepResult.js +196 -0
  40. package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +196 -0
  41. package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +327 -0
  42. package/lib/adapters-api/dist/model/AutoTestWorkItemIdentifierApiResult.js +100 -0
  43. package/lib/adapters-api/dist/model/AvailableTestResultOutcome.js +67 -0
  44. package/lib/adapters-api/dist/model/ConfigurationFilterModel.js +114 -0
  45. package/lib/adapters-api/dist/model/ConfigurationModel.js +213 -0
  46. package/lib/adapters-api/dist/model/ConfigurationShortModel.js +102 -0
  47. package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +185 -0
  48. package/lib/adapters-api/dist/model/CreateLinkApiModel.js +127 -0
  49. package/lib/adapters-api/dist/model/CreateParameterApiModel.js +117 -0
  50. package/lib/adapters-api/dist/model/CreateProjectApiModel.js +124 -0
  51. package/lib/adapters-api/dist/model/CreateStepApiModel.js +131 -0
  52. package/lib/adapters-api/dist/model/CreateWorkItemApiModel.js +384 -0
  53. package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +184 -0
  54. package/lib/adapters-api/dist/model/CustomAttributeGetModel.js +184 -0
  55. package/lib/adapters-api/dist/model/CustomAttributeOptionApiResult.js +124 -0
  56. package/lib/adapters-api/dist/model/CustomAttributeOptionModel.js +124 -0
  57. package/lib/adapters-api/dist/model/CustomAttributePutModel.js +182 -0
  58. package/lib/adapters-api/dist/model/CustomAttributeType.js +73 -0
  59. package/lib/adapters-api/dist/model/CustomAttributeTypesEnum.js +73 -0
  60. package/lib/adapters-api/dist/model/DateTimeRangeSelectorModel.js +82 -0
  61. package/lib/adapters-api/dist/model/DeletionState.js +55 -0
  62. package/lib/adapters-api/dist/model/DetailedProjectApiResult.js +204 -0
  63. package/lib/adapters-api/dist/model/FailureCategoryModel.js +67 -0
  64. package/lib/adapters-api/dist/model/GuidExtractionModel.js +90 -0
  65. package/lib/adapters-api/dist/model/ImageResizeType.js +49 -0
  66. package/lib/adapters-api/dist/model/Int32RangeSelectorModel.js +82 -0
  67. package/lib/adapters-api/dist/model/Int64RangeSelectorModel.js +82 -0
  68. package/lib/adapters-api/dist/model/IterationApiResult.js +109 -0
  69. package/lib/adapters-api/dist/model/IterationModel.js +109 -0
  70. package/lib/adapters-api/dist/model/LabelApiModel.js +100 -0
  71. package/lib/adapters-api/dist/model/LabelApiResult.js +100 -0
  72. package/lib/adapters-api/dist/model/LabelShortModel.js +100 -0
  73. package/lib/adapters-api/dist/model/LinkApiResult.js +140 -0
  74. package/lib/adapters-api/dist/model/LinkCreateApiModel.js +127 -0
  75. package/lib/adapters-api/dist/model/LinkModel.js +149 -0
  76. package/lib/adapters-api/dist/model/LinkPostModel.js +137 -0
  77. package/lib/adapters-api/dist/model/LinkPutModel.js +149 -0
  78. package/lib/adapters-api/dist/model/LinkShortApiResult.js +126 -0
  79. package/lib/adapters-api/dist/model/LinkType.js +73 -0
  80. package/lib/adapters-api/dist/model/LinkUpdateApiModel.js +140 -0
  81. package/lib/adapters-api/dist/model/ManualRerunApiResult.js +84 -0
  82. package/lib/adapters-api/dist/model/ManualRerunSelectTestResultsApiModel.js +109 -0
  83. package/lib/adapters-api/dist/model/ManualRerunTestResultApiModel.js +81 -0
  84. package/lib/adapters-api/dist/model/Operation.js +110 -0
  85. package/lib/adapters-api/dist/model/ParameterApiResult.js +154 -0
  86. package/lib/adapters-api/dist/model/ParameterIterationModel.js +100 -0
  87. package/lib/adapters-api/dist/model/ParameterShortApiResult.js +132 -0
  88. package/lib/adapters-api/dist/model/ParameterShortModel.js +158 -0
  89. package/lib/adapters-api/dist/model/ParametersFilterApiModel.js +98 -0
  90. package/lib/adapters-api/dist/model/ProblemDetails.js +124 -0
  91. package/lib/adapters-api/dist/model/ProjectApiResult.js +165 -0
  92. package/lib/adapters-api/dist/model/ProjectAttributesFilterModel.js +132 -0
  93. package/lib/adapters-api/dist/model/ProjectTypeModel.js +49 -0
  94. package/lib/adapters-api/dist/model/ProjectsFilterModel.js +209 -0
  95. package/lib/adapters-api/dist/model/SectionModel.js +180 -0
  96. package/lib/adapters-api/dist/model/SectionPostModel.js +178 -0
  97. package/lib/adapters-api/dist/model/SectionWithStepsModel.js +242 -0
  98. package/lib/adapters-api/dist/model/SharedStepModel.js +145 -0
  99. package/lib/adapters-api/dist/model/SharedStepResultApiModel.js +102 -0
  100. package/lib/adapters-api/dist/model/StepCommentApiModel.js +207 -0
  101. package/lib/adapters-api/dist/model/StepModel.js +163 -0
  102. package/lib/adapters-api/dist/model/StepPostModel.js +126 -0
  103. package/lib/adapters-api/dist/model/StepResultApiModel.js +149 -0
  104. package/lib/adapters-api/dist/model/TagModel.js +88 -0
  105. package/lib/adapters-api/dist/model/TestResultLinkApiResult.js +153 -0
  106. package/lib/adapters-api/dist/model/TestResultOutcome.js +67 -0
  107. package/lib/adapters-api/dist/model/TestResultResponse.js +400 -0
  108. package/lib/adapters-api/dist/model/TestResultShortResponse.js +311 -0
  109. package/lib/adapters-api/dist/model/TestResultStepCommentUpdateRequest.js +152 -0
  110. package/lib/adapters-api/dist/model/TestResultUpdateRequest.js +285 -0
  111. package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +226 -0
  112. package/lib/adapters-api/dist/model/TestRunApiResult.js +196 -0
  113. package/lib/adapters-api/dist/model/TestRunState.js +61 -0
  114. package/lib/adapters-api/dist/model/TestStatusApiResult.js +114 -0
  115. package/lib/adapters-api/dist/model/TestStatusApiType.js +67 -0
  116. package/lib/adapters-api/dist/model/TestStatusModel.js +149 -0
  117. package/lib/adapters-api/dist/model/TestStatusType.js +67 -0
  118. package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +187 -0
  119. package/lib/adapters-api/dist/model/UpdateLinkApiModel.js +140 -0
  120. package/lib/adapters-api/dist/model/ValidationProblemDetails.js +144 -0
  121. package/lib/adapters-api/dist/model/WorkItemApiResult.js +499 -0
  122. package/lib/adapters-api/dist/model/WorkItemEntityTypeApiModel.js +55 -0
  123. package/lib/adapters-api/dist/model/WorkItemFilterApiModel.js +309 -0
  124. package/lib/adapters-api/dist/model/WorkItemIdApiModel.js +89 -0
  125. package/lib/adapters-api/dist/model/WorkItemParameterKeyApiModel.js +89 -0
  126. package/lib/adapters-api/dist/model/WorkItemParameterKeyApiResult.js +88 -0
  127. package/lib/adapters-api/dist/model/WorkItemPriorityApiModel.js +67 -0
  128. package/lib/adapters-api/dist/model/WorkItemPriorityModel.js +67 -0
  129. package/lib/adapters-api/dist/model/WorkItemSelectApiModel.js +90 -0
  130. package/lib/adapters-api/dist/model/WorkItemShortApiResult.js +316 -0
  131. package/lib/adapters-api/dist/model/WorkItemSourceTypeModel.js +49 -0
  132. package/lib/adapters-api/dist/model/WorkItemStateApiModel.js +55 -0
  133. package/lib/adapters-api/dist/model/WorkItemStates.js +55 -0
  134. package/lib/adapters-api/dist/model/WorkItemTypeModel.js +55 -0
  135. package/lib/adapters-api/dist/model/WorkflowApiResult.js +111 -0
  136. package/lib/adapters-api/dist/model/WorkflowStatusApiResult.js +114 -0
  137. package/lib/adapters-api/index.d.ts +8862 -0
  138. package/lib/common/base.converter.d.ts +16 -17
  139. package/lib/common/base.converter.js +12 -14
  140. package/lib/common/base.service.d.ts +1 -1
  141. package/lib/common/base.service.js +6 -36
  142. package/lib/services/attachments/attachments.service.d.ts +1 -2
  143. package/lib/services/attachments/attachments.service.js +7 -7
  144. package/lib/services/autotests/autotests.converter.d.ts +2 -3
  145. package/lib/services/autotests/autotests.converter.js +0 -5
  146. package/lib/services/autotests/autotests.service.d.ts +1 -2
  147. package/lib/services/autotests/autotests.service.js +11 -44
  148. package/lib/services/testresults/testresults.converter.d.ts +4 -5
  149. package/lib/services/testresults/testresults.converter.js +0 -15
  150. package/lib/services/testresults/testresults.service.d.ts +2 -3
  151. package/lib/services/testresults/testresults.service.js +16 -44
  152. package/lib/services/testresults/testresults.type.d.ts +1 -1
  153. package/lib/services/testruns/testruns.converter.d.ts +12 -13
  154. package/lib/services/testruns/testruns.converter.js +19 -8
  155. package/lib/services/testruns/testruns.service.d.ts +1 -2
  156. package/lib/services/testruns/testruns.service.js +13 -46
  157. package/package.json +7 -5
@@ -0,0 +1,311 @@
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
+ var _AttachmentApiResult = _interopRequireDefault(require("./AttachmentApiResult"));
9
+ var _AutoTestResultReasonShort = _interopRequireDefault(require("./AutoTestResultReasonShort"));
10
+ var _TestResultLinkApiResult = _interopRequireDefault(require("./TestResultLinkApiResult"));
11
+ var _TestStatusApiResult = _interopRequireDefault(require("./TestStatusApiResult"));
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ /**
14
+ * API
15
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
16
+ *
17
+ * The version of the OpenAPI document: adapters
18
+ *
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+
26
+ /**
27
+ * The TestResultShortResponse model module.
28
+ * @module model/TestResultShortResponse
29
+ * @version 1.0.0
30
+ */
31
+ class TestResultShortResponse {
32
+ /**
33
+ * Constructs a new <code>TestResultShortResponse</code>.
34
+ * @alias module:model/TestResultShortResponse
35
+ * @param id {String} Unique ID of the test result
36
+ * @param name {String} Name of autotest represented by the test result
37
+ * @param autoTestTags {Array.<String>} Tags of the autotest represented by the test result
38
+ * @param testRunId {String} Unique ID of test run where the test result is located
39
+ * @param configurationId {String} Unique ID of configuration which the test result uses
40
+ * @param configurationName {String} Name of configuration which the test result uses
41
+ * @param status {module:model/TestStatusApiResult}
42
+ * @param resultReasons {Array.<module:model/AutoTestResultReasonShort>} Collection of result reasons which the test result have
43
+ * @param links {Array.<module:model/TestResultLinkApiResult>} Collection of links attached to the test result
44
+ * @param attachments {Array.<module:model/AttachmentApiResult>} Collection of files attached to the test result
45
+ * @param rerunCompletedCount {Number} Run count
46
+ */
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);
49
+ }
50
+
51
+ /**
52
+ * Initializes the fields of this object.
53
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
+ * Only for internal use.
55
+ */
56
+ static initialize(obj, id, name, autoTestTags, testRunId, configurationId, configurationName, status, resultReasons, links, attachments, rerunCompletedCount) {
57
+ obj['id'] = id;
58
+ obj['name'] = name;
59
+ obj['autoTestTags'] = autoTestTags;
60
+ obj['testRunId'] = testRunId;
61
+ obj['configurationId'] = configurationId;
62
+ obj['configurationName'] = configurationName;
63
+ obj['status'] = status;
64
+ obj['resultReasons'] = resultReasons;
65
+ obj['links'] = links;
66
+ obj['attachments'] = attachments;
67
+ obj['rerunCompletedCount'] = rerunCompletedCount;
68
+ }
69
+
70
+ /**
71
+ * Constructs a <code>TestResultShortResponse</code> from a plain JavaScript object, optionally creating a new instance.
72
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
73
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
74
+ * @param {module:model/TestResultShortResponse} obj Optional instance to populate.
75
+ * @return {module:model/TestResultShortResponse} The populated <code>TestResultShortResponse</code> instance.
76
+ */
77
+ static constructFromObject(data, obj) {
78
+ if (data) {
79
+ obj = obj || new TestResultShortResponse();
80
+ if (data.hasOwnProperty('id')) {
81
+ obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('name')) {
84
+ obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('autotestExternalId')) {
87
+ obj['autotestExternalId'] = _ApiClient.default.convertToType(data['autotestExternalId'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('autoTestTags')) {
90
+ obj['autoTestTags'] = _ApiClient.default.convertToType(data['autoTestTags'], ['String']);
91
+ }
92
+ if (data.hasOwnProperty('testRunId')) {
93
+ obj['testRunId'] = _ApiClient.default.convertToType(data['testRunId'], 'String');
94
+ }
95
+ if (data.hasOwnProperty('configurationId')) {
96
+ obj['configurationId'] = _ApiClient.default.convertToType(data['configurationId'], 'String');
97
+ }
98
+ if (data.hasOwnProperty('configurationName')) {
99
+ obj['configurationName'] = _ApiClient.default.convertToType(data['configurationName'], 'String');
100
+ }
101
+ if (data.hasOwnProperty('outcome')) {
102
+ obj['outcome'] = _ApiClient.default.convertToType(data['outcome'], 'String');
103
+ }
104
+ if (data.hasOwnProperty('status')) {
105
+ obj['status'] = _ApiClient.default.convertToType(data['status'], _TestStatusApiResult.default);
106
+ }
107
+ if (data.hasOwnProperty('resultReasons')) {
108
+ obj['resultReasons'] = _ApiClient.default.convertToType(data['resultReasons'], [_AutoTestResultReasonShort.default]);
109
+ }
110
+ if (data.hasOwnProperty('comment')) {
111
+ obj['comment'] = _ApiClient.default.convertToType(data['comment'], 'String');
112
+ }
113
+ if (data.hasOwnProperty('duration')) {
114
+ obj['duration'] = _ApiClient.default.convertToType(data['duration'], 'Number');
115
+ }
116
+ if (data.hasOwnProperty('links')) {
117
+ obj['links'] = _ApiClient.default.convertToType(data['links'], [_TestResultLinkApiResult.default]);
118
+ }
119
+ if (data.hasOwnProperty('attachments')) {
120
+ obj['attachments'] = _ApiClient.default.convertToType(data['attachments'], [_AttachmentApiResult.default]);
121
+ }
122
+ if (data.hasOwnProperty('rerunCompletedCount')) {
123
+ obj['rerunCompletedCount'] = _ApiClient.default.convertToType(data['rerunCompletedCount'], 'Number');
124
+ }
125
+ }
126
+ return obj;
127
+ }
128
+
129
+ /**
130
+ * Validates the JSON data with respect to <code>TestResultShortResponse</code>.
131
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
132
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TestResultShortResponse</code>.
133
+ */
134
+ static validateJSON(data) {
135
+ // check to make sure all required properties are present in the JSON string
136
+ for (const property of TestResultShortResponse.RequiredProperties) {
137
+ if (!data.hasOwnProperty(property)) {
138
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
139
+ }
140
+ }
141
+ // ensure the json data is a string
142
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
143
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
144
+ }
145
+ // ensure the json data is a string
146
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
147
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
148
+ }
149
+ // ensure the json data is a string
150
+ if (data['autotestExternalId'] && !(typeof data['autotestExternalId'] === 'string' || data['autotestExternalId'] instanceof String)) {
151
+ throw new Error("Expected the field `autotestExternalId` to be a primitive type in the JSON string but got " + data['autotestExternalId']);
152
+ }
153
+ // ensure the json data is an array
154
+ if (!Array.isArray(data['autoTestTags'])) {
155
+ throw new Error("Expected the field `autoTestTags` to be an array in the JSON data but got " + data['autoTestTags']);
156
+ }
157
+ // ensure the json data is a string
158
+ if (data['testRunId'] && !(typeof data['testRunId'] === 'string' || data['testRunId'] instanceof String)) {
159
+ throw new Error("Expected the field `testRunId` to be a primitive type in the JSON string but got " + data['testRunId']);
160
+ }
161
+ // ensure the json data is a string
162
+ if (data['configurationId'] && !(typeof data['configurationId'] === 'string' || data['configurationId'] instanceof String)) {
163
+ throw new Error("Expected the field `configurationId` to be a primitive type in the JSON string but got " + data['configurationId']);
164
+ }
165
+ // ensure the json data is a string
166
+ if (data['configurationName'] && !(typeof data['configurationName'] === 'string' || data['configurationName'] instanceof String)) {
167
+ throw new Error("Expected the field `configurationName` to be a primitive type in the JSON string but got " + data['configurationName']);
168
+ }
169
+ // ensure the json data is a string
170
+ if (data['outcome'] && !(typeof data['outcome'] === 'string' || data['outcome'] instanceof String)) {
171
+ throw new Error("Expected the field `outcome` to be a primitive type in the JSON string but got " + data['outcome']);
172
+ }
173
+ // validate the optional field `status`
174
+ if (data['status']) {
175
+ // data not null
176
+ _TestStatusApiResult.default.validateJSON(data['status']);
177
+ }
178
+ if (data['resultReasons']) {
179
+ // data not null
180
+ // ensure the json data is an array
181
+ if (!Array.isArray(data['resultReasons'])) {
182
+ throw new Error("Expected the field `resultReasons` to be an array in the JSON data but got " + data['resultReasons']);
183
+ }
184
+ // validate the optional field `resultReasons` (array)
185
+ for (const item of data['resultReasons']) {
186
+ _AutoTestResultReasonShort.default.validateJSON(item);
187
+ }
188
+ ;
189
+ }
190
+ // ensure the json data is a string
191
+ if (data['comment'] && !(typeof data['comment'] === 'string' || data['comment'] instanceof String)) {
192
+ throw new Error("Expected the field `comment` to be a primitive type in the JSON string but got " + data['comment']);
193
+ }
194
+ if (data['links']) {
195
+ // data not null
196
+ // ensure the json data is an array
197
+ if (!Array.isArray(data['links'])) {
198
+ throw new Error("Expected the field `links` to be an array in the JSON data but got " + data['links']);
199
+ }
200
+ // validate the optional field `links` (array)
201
+ for (const item of data['links']) {
202
+ _TestResultLinkApiResult.default.validateJSON(item);
203
+ }
204
+ ;
205
+ }
206
+ if (data['attachments']) {
207
+ // data not null
208
+ // ensure the json data is an array
209
+ if (!Array.isArray(data['attachments'])) {
210
+ throw new Error("Expected the field `attachments` to be an array in the JSON data but got " + data['attachments']);
211
+ }
212
+ // validate the optional field `attachments` (array)
213
+ for (const item of data['attachments']) {
214
+ _AttachmentApiResult.default.validateJSON(item);
215
+ }
216
+ ;
217
+ }
218
+ return true;
219
+ }
220
+ }
221
+ TestResultShortResponse.RequiredProperties = ["id", "name", "autoTestTags", "testRunId", "configurationId", "configurationName", "status", "resultReasons", "links", "attachments", "rerunCompletedCount"];
222
+
223
+ /**
224
+ * Unique ID of the test result
225
+ * @member {String} id
226
+ */
227
+ TestResultShortResponse.prototype['id'] = undefined;
228
+
229
+ /**
230
+ * Name of autotest represented by the test result
231
+ * @member {String} name
232
+ */
233
+ TestResultShortResponse.prototype['name'] = undefined;
234
+
235
+ /**
236
+ * External ID of autotest represented by the test result
237
+ * @member {String} autotestExternalId
238
+ */
239
+ TestResultShortResponse.prototype['autotestExternalId'] = undefined;
240
+
241
+ /**
242
+ * Tags of the autotest represented by the test result
243
+ * @member {Array.<String>} autoTestTags
244
+ */
245
+ TestResultShortResponse.prototype['autoTestTags'] = undefined;
246
+
247
+ /**
248
+ * Unique ID of test run where the test result is located
249
+ * @member {String} testRunId
250
+ */
251
+ TestResultShortResponse.prototype['testRunId'] = undefined;
252
+
253
+ /**
254
+ * Unique ID of configuration which the test result uses
255
+ * @member {String} configurationId
256
+ */
257
+ TestResultShortResponse.prototype['configurationId'] = undefined;
258
+
259
+ /**
260
+ * Name of configuration which the test result uses
261
+ * @member {String} configurationName
262
+ */
263
+ TestResultShortResponse.prototype['configurationName'] = undefined;
264
+
265
+ /**
266
+ * Outcome of the test result
267
+ * @member {String} outcome
268
+ */
269
+ TestResultShortResponse.prototype['outcome'] = undefined;
270
+
271
+ /**
272
+ * @member {module:model/TestStatusApiResult} status
273
+ */
274
+ TestResultShortResponse.prototype['status'] = undefined;
275
+
276
+ /**
277
+ * Collection of result reasons which the test result have
278
+ * @member {Array.<module:model/AutoTestResultReasonShort>} resultReasons
279
+ */
280
+ TestResultShortResponse.prototype['resultReasons'] = undefined;
281
+
282
+ /**
283
+ * Comment to the test result
284
+ * @member {String} comment
285
+ */
286
+ TestResultShortResponse.prototype['comment'] = undefined;
287
+
288
+ /**
289
+ * Time which it took to run the test
290
+ * @member {Number} duration
291
+ */
292
+ TestResultShortResponse.prototype['duration'] = undefined;
293
+
294
+ /**
295
+ * Collection of links attached to the test result
296
+ * @member {Array.<module:model/TestResultLinkApiResult>} links
297
+ */
298
+ TestResultShortResponse.prototype['links'] = undefined;
299
+
300
+ /**
301
+ * Collection of files attached to the test result
302
+ * @member {Array.<module:model/AttachmentApiResult>} attachments
303
+ */
304
+ TestResultShortResponse.prototype['attachments'] = undefined;
305
+
306
+ /**
307
+ * Run count
308
+ * @member {Number} rerunCompletedCount
309
+ */
310
+ TestResultShortResponse.prototype['rerunCompletedCount'] = undefined;
311
+ var _default = exports.default = TestResultShortResponse;
@@ -0,0 +1,152 @@
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
+ var _AttachmentUpdateRequest = _interopRequireDefault(require("./AttachmentUpdateRequest"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ /**
11
+ * API
12
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
13
+ *
14
+ * The version of the OpenAPI document: adapters
15
+ *
16
+ *
17
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
18
+ * https://openapi-generator.tech
19
+ * Do not edit the class manually.
20
+ *
21
+ */
22
+
23
+ /**
24
+ * The TestResultStepCommentUpdateRequest model module.
25
+ * @module model/TestResultStepCommentUpdateRequest
26
+ * @version 1.0.0
27
+ */
28
+ class TestResultStepCommentUpdateRequest {
29
+ /**
30
+ * Constructs a new <code>TestResultStepCommentUpdateRequest</code>.
31
+ * @alias module:model/TestResultStepCommentUpdateRequest
32
+ * @param id {String} Entity unique identifier
33
+ * @param text {String}
34
+ * @param stepId {String}
35
+ * @param attachments {Array.<module:model/AttachmentUpdateRequest>}
36
+ */
37
+ constructor(id, text, stepId, attachments) {
38
+ TestResultStepCommentUpdateRequest.initialize(this, id, text, stepId, attachments);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ static initialize(obj, id, text, stepId, attachments) {
47
+ obj['id'] = id;
48
+ obj['text'] = text;
49
+ obj['stepId'] = stepId;
50
+ obj['attachments'] = attachments;
51
+ }
52
+
53
+ /**
54
+ * Constructs a <code>TestResultStepCommentUpdateRequest</code> from a plain JavaScript object, optionally creating a new instance.
55
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
56
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
57
+ * @param {module:model/TestResultStepCommentUpdateRequest} obj Optional instance to populate.
58
+ * @return {module:model/TestResultStepCommentUpdateRequest} The populated <code>TestResultStepCommentUpdateRequest</code> instance.
59
+ */
60
+ static constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new TestResultStepCommentUpdateRequest();
63
+ if (data.hasOwnProperty('id')) {
64
+ obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
65
+ }
66
+ if (data.hasOwnProperty('text')) {
67
+ obj['text'] = _ApiClient.default.convertToType(data['text'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('stepId')) {
70
+ obj['stepId'] = _ApiClient.default.convertToType(data['stepId'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('parentStepId')) {
73
+ obj['parentStepId'] = _ApiClient.default.convertToType(data['parentStepId'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('attachments')) {
76
+ obj['attachments'] = _ApiClient.default.convertToType(data['attachments'], [_AttachmentUpdateRequest.default]);
77
+ }
78
+ }
79
+ return obj;
80
+ }
81
+
82
+ /**
83
+ * Validates the JSON data with respect to <code>TestResultStepCommentUpdateRequest</code>.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TestResultStepCommentUpdateRequest</code>.
86
+ */
87
+ static validateJSON(data) {
88
+ // check to make sure all required properties are present in the JSON string
89
+ for (const property of TestResultStepCommentUpdateRequest.RequiredProperties) {
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ // ensure the json data is a string
95
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
96
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
97
+ }
98
+ // ensure the json data is a string
99
+ if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) {
100
+ throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']);
101
+ }
102
+ // ensure the json data is a string
103
+ if (data['stepId'] && !(typeof data['stepId'] === 'string' || data['stepId'] instanceof String)) {
104
+ throw new Error("Expected the field `stepId` to be a primitive type in the JSON string but got " + data['stepId']);
105
+ }
106
+ // ensure the json data is a string
107
+ if (data['parentStepId'] && !(typeof data['parentStepId'] === 'string' || data['parentStepId'] instanceof String)) {
108
+ throw new Error("Expected the field `parentStepId` to be a primitive type in the JSON string but got " + data['parentStepId']);
109
+ }
110
+ if (data['attachments']) {
111
+ // data not null
112
+ // ensure the json data is an array
113
+ if (!Array.isArray(data['attachments'])) {
114
+ throw new Error("Expected the field `attachments` to be an array in the JSON data but got " + data['attachments']);
115
+ }
116
+ // validate the optional field `attachments` (array)
117
+ for (const item of data['attachments']) {
118
+ _AttachmentUpdateRequest.default.validateJSON(item);
119
+ }
120
+ ;
121
+ }
122
+ return true;
123
+ }
124
+ }
125
+ TestResultStepCommentUpdateRequest.RequiredProperties = ["id", "text", "stepId", "attachments"];
126
+
127
+ /**
128
+ * Entity unique identifier
129
+ * @member {String} id
130
+ */
131
+ TestResultStepCommentUpdateRequest.prototype['id'] = undefined;
132
+
133
+ /**
134
+ * @member {String} text
135
+ */
136
+ TestResultStepCommentUpdateRequest.prototype['text'] = undefined;
137
+
138
+ /**
139
+ * @member {String} stepId
140
+ */
141
+ TestResultStepCommentUpdateRequest.prototype['stepId'] = undefined;
142
+
143
+ /**
144
+ * @member {String} parentStepId
145
+ */
146
+ TestResultStepCommentUpdateRequest.prototype['parentStepId'] = undefined;
147
+
148
+ /**
149
+ * @member {Array.<module:model/AttachmentUpdateRequest>} attachments
150
+ */
151
+ TestResultStepCommentUpdateRequest.prototype['attachments'] = undefined;
152
+ var _default = exports.default = TestResultStepCommentUpdateRequest;