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,327 @@
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 _AutoTestStep = _interopRequireDefault(require("./AutoTestStep"));
9
+ var _LabelApiModel = _interopRequireDefault(require("./LabelApiModel"));
10
+ var _LinkApiResult = _interopRequireDefault(require("./LinkApiResult"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /**
13
+ * API
14
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
15
+ *
16
+ * The version of the OpenAPI document: adapters
17
+ *
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+
25
+ /**
26
+ * The AutoTest model module.
27
+ * @module model/AutoTest
28
+ * @version 1.0.0
29
+ */
30
+ class AutoTest {
31
+ /**
32
+ * Constructs a new <code>AutoTest</code>.
33
+ * @alias module:model/AutoTest
34
+ * @param externalId {String} External ID of the autotest
35
+ * @param projectId {String} Unique ID of the autotest project
36
+ * @param name {String} Name of the autotest
37
+ * @param globalId {Number} Global ID of the autotest
38
+ * @param id {String} Unique ID of the autotest
39
+ */
40
+ constructor(externalId, projectId, name, globalId, id) {
41
+ AutoTest.initialize(this, externalId, projectId, name, globalId, id);
42
+ }
43
+
44
+ /**
45
+ * Initializes the fields of this object.
46
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
+ * Only for internal use.
48
+ */
49
+ static initialize(obj, externalId, projectId, name, globalId, id) {
50
+ obj['externalId'] = externalId;
51
+ obj['projectId'] = projectId;
52
+ obj['name'] = name;
53
+ obj['globalId'] = globalId;
54
+ obj['id'] = id;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>AutoTest</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/AutoTest} obj Optional instance to populate.
62
+ * @return {module:model/AutoTest} The populated <code>AutoTest</code> instance.
63
+ */
64
+ static constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new AutoTest();
67
+ if (data.hasOwnProperty('externalId')) {
68
+ obj['externalId'] = _ApiClient.default.convertToType(data['externalId'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('links')) {
71
+ obj['links'] = _ApiClient.default.convertToType(data['links'], [_LinkApiResult.default]);
72
+ }
73
+ if (data.hasOwnProperty('projectId')) {
74
+ obj['projectId'] = _ApiClient.default.convertToType(data['projectId'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('name')) {
77
+ obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('namespace')) {
80
+ obj['namespace'] = _ApiClient.default.convertToType(data['namespace'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('classname')) {
83
+ obj['classname'] = _ApiClient.default.convertToType(data['classname'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('steps')) {
86
+ obj['steps'] = _ApiClient.default.convertToType(data['steps'], [_AutoTestStep.default]);
87
+ }
88
+ if (data.hasOwnProperty('setup')) {
89
+ obj['setup'] = _ApiClient.default.convertToType(data['setup'], [_AutoTestStep.default]);
90
+ }
91
+ if (data.hasOwnProperty('teardown')) {
92
+ obj['teardown'] = _ApiClient.default.convertToType(data['teardown'], [_AutoTestStep.default]);
93
+ }
94
+ if (data.hasOwnProperty('title')) {
95
+ obj['title'] = _ApiClient.default.convertToType(data['title'], 'String');
96
+ }
97
+ if (data.hasOwnProperty('description')) {
98
+ obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
99
+ }
100
+ if (data.hasOwnProperty('labels')) {
101
+ obj['labels'] = _ApiClient.default.convertToType(data['labels'], [_LabelApiModel.default]);
102
+ }
103
+ if (data.hasOwnProperty('isFlaky')) {
104
+ obj['isFlaky'] = _ApiClient.default.convertToType(data['isFlaky'], 'Boolean');
105
+ }
106
+ if (data.hasOwnProperty('externalKey')) {
107
+ obj['externalKey'] = _ApiClient.default.convertToType(data['externalKey'], 'String');
108
+ }
109
+ if (data.hasOwnProperty('globalId')) {
110
+ obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
111
+ }
112
+ if (data.hasOwnProperty('id')) {
113
+ obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
114
+ }
115
+ }
116
+ return obj;
117
+ }
118
+
119
+ /**
120
+ * Validates the JSON data with respect to <code>AutoTest</code>.
121
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
122
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AutoTest</code>.
123
+ */
124
+ static validateJSON(data) {
125
+ // check to make sure all required properties are present in the JSON string
126
+ for (const property of AutoTest.RequiredProperties) {
127
+ if (!data.hasOwnProperty(property)) {
128
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
129
+ }
130
+ }
131
+ // ensure the json data is a string
132
+ if (data['externalId'] && !(typeof data['externalId'] === 'string' || data['externalId'] instanceof String)) {
133
+ throw new Error("Expected the field `externalId` to be a primitive type in the JSON string but got " + data['externalId']);
134
+ }
135
+ if (data['links']) {
136
+ // data not null
137
+ // ensure the json data is an array
138
+ if (!Array.isArray(data['links'])) {
139
+ throw new Error("Expected the field `links` to be an array in the JSON data but got " + data['links']);
140
+ }
141
+ // validate the optional field `links` (array)
142
+ for (const item of data['links']) {
143
+ _LinkApiResult.default.validateJSON(item);
144
+ }
145
+ ;
146
+ }
147
+ // ensure the json data is a string
148
+ if (data['projectId'] && !(typeof data['projectId'] === 'string' || data['projectId'] instanceof String)) {
149
+ throw new Error("Expected the field `projectId` to be a primitive type in the JSON string but got " + data['projectId']);
150
+ }
151
+ // ensure the json data is a string
152
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
153
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
154
+ }
155
+ // ensure the json data is a string
156
+ if (data['namespace'] && !(typeof data['namespace'] === 'string' || data['namespace'] instanceof String)) {
157
+ throw new Error("Expected the field `namespace` to be a primitive type in the JSON string but got " + data['namespace']);
158
+ }
159
+ // ensure the json data is a string
160
+ if (data['classname'] && !(typeof data['classname'] === 'string' || data['classname'] instanceof String)) {
161
+ throw new Error("Expected the field `classname` to be a primitive type in the JSON string but got " + data['classname']);
162
+ }
163
+ if (data['steps']) {
164
+ // data not null
165
+ // ensure the json data is an array
166
+ if (!Array.isArray(data['steps'])) {
167
+ throw new Error("Expected the field `steps` to be an array in the JSON data but got " + data['steps']);
168
+ }
169
+ // validate the optional field `steps` (array)
170
+ for (const item of data['steps']) {
171
+ _AutoTestStep.default.validateJSON(item);
172
+ }
173
+ ;
174
+ }
175
+ if (data['setup']) {
176
+ // data not null
177
+ // ensure the json data is an array
178
+ if (!Array.isArray(data['setup'])) {
179
+ throw new Error("Expected the field `setup` to be an array in the JSON data but got " + data['setup']);
180
+ }
181
+ // validate the optional field `setup` (array)
182
+ for (const item of data['setup']) {
183
+ _AutoTestStep.default.validateJSON(item);
184
+ }
185
+ ;
186
+ }
187
+ if (data['teardown']) {
188
+ // data not null
189
+ // ensure the json data is an array
190
+ if (!Array.isArray(data['teardown'])) {
191
+ throw new Error("Expected the field `teardown` to be an array in the JSON data but got " + data['teardown']);
192
+ }
193
+ // validate the optional field `teardown` (array)
194
+ for (const item of data['teardown']) {
195
+ _AutoTestStep.default.validateJSON(item);
196
+ }
197
+ ;
198
+ }
199
+ // ensure the json data is a string
200
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
201
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
202
+ }
203
+ // ensure the json data is a string
204
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
205
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
206
+ }
207
+ if (data['labels']) {
208
+ // data not null
209
+ // ensure the json data is an array
210
+ if (!Array.isArray(data['labels'])) {
211
+ throw new Error("Expected the field `labels` to be an array in the JSON data but got " + data['labels']);
212
+ }
213
+ // validate the optional field `labels` (array)
214
+ for (const item of data['labels']) {
215
+ _LabelApiModel.default.validateJSON(item);
216
+ }
217
+ ;
218
+ }
219
+ // ensure the json data is a string
220
+ if (data['externalKey'] && !(typeof data['externalKey'] === 'string' || data['externalKey'] instanceof String)) {
221
+ throw new Error("Expected the field `externalKey` to be a primitive type in the JSON string but got " + data['externalKey']);
222
+ }
223
+ // ensure the json data is a string
224
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
225
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
226
+ }
227
+ return true;
228
+ }
229
+ }
230
+ AutoTest.RequiredProperties = ["externalId", "projectId", "name", "globalId", "id"];
231
+
232
+ /**
233
+ * External ID of the autotest
234
+ * @member {String} externalId
235
+ */
236
+ AutoTest.prototype['externalId'] = undefined;
237
+
238
+ /**
239
+ * Collection of the autotest links
240
+ * @member {Array.<module:model/LinkApiResult>} links
241
+ */
242
+ AutoTest.prototype['links'] = undefined;
243
+
244
+ /**
245
+ * Unique ID of the autotest project
246
+ * @member {String} projectId
247
+ */
248
+ AutoTest.prototype['projectId'] = undefined;
249
+
250
+ /**
251
+ * Name of the autotest
252
+ * @member {String} name
253
+ */
254
+ AutoTest.prototype['name'] = undefined;
255
+
256
+ /**
257
+ * Name of the autotest namespace
258
+ * @member {String} namespace
259
+ */
260
+ AutoTest.prototype['namespace'] = undefined;
261
+
262
+ /**
263
+ * Name of the autotest class
264
+ * @member {String} classname
265
+ */
266
+ AutoTest.prototype['classname'] = undefined;
267
+
268
+ /**
269
+ * Collection of the autotest steps
270
+ * @member {Array.<module:model/AutoTestStep>} steps
271
+ */
272
+ AutoTest.prototype['steps'] = undefined;
273
+
274
+ /**
275
+ * Collection of the autotest setup steps
276
+ * @member {Array.<module:model/AutoTestStep>} setup
277
+ */
278
+ AutoTest.prototype['setup'] = undefined;
279
+
280
+ /**
281
+ * Collection of the autotest teardown steps
282
+ * @member {Array.<module:model/AutoTestStep>} teardown
283
+ */
284
+ AutoTest.prototype['teardown'] = undefined;
285
+
286
+ /**
287
+ * Name of the autotest in autotest's card
288
+ * @member {String} title
289
+ */
290
+ AutoTest.prototype['title'] = undefined;
291
+
292
+ /**
293
+ * Description of the autotest in autotest's card
294
+ * @member {String} description
295
+ */
296
+ AutoTest.prototype['description'] = undefined;
297
+
298
+ /**
299
+ * Collection of the autotest labels
300
+ * @member {Array.<module:model/LabelApiModel>} labels
301
+ */
302
+ AutoTest.prototype['labels'] = undefined;
303
+
304
+ /**
305
+ * Indicates if the autotest is marked as flaky
306
+ * @member {Boolean} isFlaky
307
+ */
308
+ AutoTest.prototype['isFlaky'] = undefined;
309
+
310
+ /**
311
+ * External key of the autotest
312
+ * @member {String} externalKey
313
+ */
314
+ AutoTest.prototype['externalKey'] = undefined;
315
+
316
+ /**
317
+ * Global ID of the autotest
318
+ * @member {Number} globalId
319
+ */
320
+ AutoTest.prototype['globalId'] = undefined;
321
+
322
+ /**
323
+ * Unique ID of the autotest
324
+ * @member {String} id
325
+ */
326
+ AutoTest.prototype['id'] = undefined;
327
+ var _default = exports.default = AutoTest;
@@ -0,0 +1,323 @@
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 _AutoTestStepApiResult = _interopRequireDefault(require("./AutoTestStepApiResult"));
9
+ var _LabelApiResult = _interopRequireDefault(require("./LabelApiResult"));
10
+ var _LinkApiResult = _interopRequireDefault(require("./LinkApiResult"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /**
13
+ * API
14
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
15
+ *
16
+ * The version of the OpenAPI document: adapters
17
+ *
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+
25
+ /**
26
+ * The AutoTestApiResult model module.
27
+ * @module model/AutoTestApiResult
28
+ * @version 1.0.0
29
+ */
30
+ class AutoTestApiResult {
31
+ /**
32
+ * Constructs a new <code>AutoTestApiResult</code>.
33
+ * @alias module:model/AutoTestApiResult
34
+ * @param id {String}
35
+ * @param projectId {String}
36
+ * @param name {String}
37
+ * @param isFlaky {Boolean}
38
+ * @param globalId {Number}
39
+ */
40
+ constructor(id, projectId, name, isFlaky, globalId) {
41
+ AutoTestApiResult.initialize(this, id, projectId, name, isFlaky, globalId);
42
+ }
43
+
44
+ /**
45
+ * Initializes the fields of this object.
46
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
+ * Only for internal use.
48
+ */
49
+ static initialize(obj, id, projectId, name, isFlaky, globalId) {
50
+ obj['id'] = id;
51
+ obj['projectId'] = projectId;
52
+ obj['name'] = name;
53
+ obj['isFlaky'] = isFlaky;
54
+ obj['globalId'] = globalId;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>AutoTestApiResult</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/AutoTestApiResult} obj Optional instance to populate.
62
+ * @return {module:model/AutoTestApiResult} The populated <code>AutoTestApiResult</code> instance.
63
+ */
64
+ static constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new AutoTestApiResult();
67
+ if (data.hasOwnProperty('id')) {
68
+ obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('projectId')) {
71
+ obj['projectId'] = _ApiClient.default.convertToType(data['projectId'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('externalId')) {
74
+ obj['externalId'] = _ApiClient.default.convertToType(data['externalId'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('name')) {
77
+ obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('namespace')) {
80
+ obj['namespace'] = _ApiClient.default.convertToType(data['namespace'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('classname')) {
83
+ obj['classname'] = _ApiClient.default.convertToType(data['classname'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('steps')) {
86
+ obj['steps'] = _ApiClient.default.convertToType(data['steps'], [_AutoTestStepApiResult.default]);
87
+ }
88
+ if (data.hasOwnProperty('setup')) {
89
+ obj['setup'] = _ApiClient.default.convertToType(data['setup'], [_AutoTestStepApiResult.default]);
90
+ }
91
+ if (data.hasOwnProperty('teardown')) {
92
+ obj['teardown'] = _ApiClient.default.convertToType(data['teardown'], [_AutoTestStepApiResult.default]);
93
+ }
94
+ if (data.hasOwnProperty('title')) {
95
+ obj['title'] = _ApiClient.default.convertToType(data['title'], 'String');
96
+ }
97
+ if (data.hasOwnProperty('description')) {
98
+ obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
99
+ }
100
+ if (data.hasOwnProperty('isFlaky')) {
101
+ obj['isFlaky'] = _ApiClient.default.convertToType(data['isFlaky'], 'Boolean');
102
+ }
103
+ if (data.hasOwnProperty('externalKey')) {
104
+ obj['externalKey'] = _ApiClient.default.convertToType(data['externalKey'], 'String');
105
+ }
106
+ if (data.hasOwnProperty('globalId')) {
107
+ obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
108
+ }
109
+ if (data.hasOwnProperty('links')) {
110
+ obj['links'] = _ApiClient.default.convertToType(data['links'], [_LinkApiResult.default]);
111
+ }
112
+ if (data.hasOwnProperty('labels')) {
113
+ obj['labels'] = _ApiClient.default.convertToType(data['labels'], [_LabelApiResult.default]);
114
+ }
115
+ if (data.hasOwnProperty('tags')) {
116
+ obj['tags'] = _ApiClient.default.convertToType(data['tags'], ['String']);
117
+ }
118
+ }
119
+ return obj;
120
+ }
121
+
122
+ /**
123
+ * Validates the JSON data with respect to <code>AutoTestApiResult</code>.
124
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
125
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AutoTestApiResult</code>.
126
+ */
127
+ static validateJSON(data) {
128
+ // check to make sure all required properties are present in the JSON string
129
+ for (const property of AutoTestApiResult.RequiredProperties) {
130
+ if (!data.hasOwnProperty(property)) {
131
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
132
+ }
133
+ }
134
+ // ensure the json data is a string
135
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
136
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
137
+ }
138
+ // ensure the json data is a string
139
+ if (data['projectId'] && !(typeof data['projectId'] === 'string' || data['projectId'] instanceof String)) {
140
+ throw new Error("Expected the field `projectId` to be a primitive type in the JSON string but got " + data['projectId']);
141
+ }
142
+ // ensure the json data is a string
143
+ if (data['externalId'] && !(typeof data['externalId'] === 'string' || data['externalId'] instanceof String)) {
144
+ throw new Error("Expected the field `externalId` to be a primitive type in the JSON string but got " + data['externalId']);
145
+ }
146
+ // ensure the json data is a string
147
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
148
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
149
+ }
150
+ // ensure the json data is a string
151
+ if (data['namespace'] && !(typeof data['namespace'] === 'string' || data['namespace'] instanceof String)) {
152
+ throw new Error("Expected the field `namespace` to be a primitive type in the JSON string but got " + data['namespace']);
153
+ }
154
+ // ensure the json data is a string
155
+ if (data['classname'] && !(typeof data['classname'] === 'string' || data['classname'] instanceof String)) {
156
+ throw new Error("Expected the field `classname` to be a primitive type in the JSON string but got " + data['classname']);
157
+ }
158
+ if (data['steps']) {
159
+ // data not null
160
+ // ensure the json data is an array
161
+ if (!Array.isArray(data['steps'])) {
162
+ throw new Error("Expected the field `steps` to be an array in the JSON data but got " + data['steps']);
163
+ }
164
+ // validate the optional field `steps` (array)
165
+ for (const item of data['steps']) {
166
+ _AutoTestStepApiResult.default.validateJSON(item);
167
+ }
168
+ ;
169
+ }
170
+ if (data['setup']) {
171
+ // data not null
172
+ // ensure the json data is an array
173
+ if (!Array.isArray(data['setup'])) {
174
+ throw new Error("Expected the field `setup` to be an array in the JSON data but got " + data['setup']);
175
+ }
176
+ // validate the optional field `setup` (array)
177
+ for (const item of data['setup']) {
178
+ _AutoTestStepApiResult.default.validateJSON(item);
179
+ }
180
+ ;
181
+ }
182
+ if (data['teardown']) {
183
+ // data not null
184
+ // ensure the json data is an array
185
+ if (!Array.isArray(data['teardown'])) {
186
+ throw new Error("Expected the field `teardown` to be an array in the JSON data but got " + data['teardown']);
187
+ }
188
+ // validate the optional field `teardown` (array)
189
+ for (const item of data['teardown']) {
190
+ _AutoTestStepApiResult.default.validateJSON(item);
191
+ }
192
+ ;
193
+ }
194
+ // ensure the json data is a string
195
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
196
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
197
+ }
198
+ // ensure the json data is a string
199
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
200
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
201
+ }
202
+ // ensure the json data is a string
203
+ if (data['externalKey'] && !(typeof data['externalKey'] === 'string' || data['externalKey'] instanceof String)) {
204
+ throw new Error("Expected the field `externalKey` to be a primitive type in the JSON string but got " + data['externalKey']);
205
+ }
206
+ if (data['links']) {
207
+ // data not null
208
+ // ensure the json data is an array
209
+ if (!Array.isArray(data['links'])) {
210
+ throw new Error("Expected the field `links` to be an array in the JSON data but got " + data['links']);
211
+ }
212
+ // validate the optional field `links` (array)
213
+ for (const item of data['links']) {
214
+ _LinkApiResult.default.validateJSON(item);
215
+ }
216
+ ;
217
+ }
218
+ if (data['labels']) {
219
+ // data not null
220
+ // ensure the json data is an array
221
+ if (!Array.isArray(data['labels'])) {
222
+ throw new Error("Expected the field `labels` to be an array in the JSON data but got " + data['labels']);
223
+ }
224
+ // validate the optional field `labels` (array)
225
+ for (const item of data['labels']) {
226
+ _LabelApiResult.default.validateJSON(item);
227
+ }
228
+ ;
229
+ }
230
+ // ensure the json data is an array
231
+ if (!Array.isArray(data['tags'])) {
232
+ throw new Error("Expected the field `tags` to be an array in the JSON data but got " + data['tags']);
233
+ }
234
+ return true;
235
+ }
236
+ }
237
+ AutoTestApiResult.RequiredProperties = ["id", "projectId", "name", "isFlaky", "globalId"];
238
+
239
+ /**
240
+ * @member {String} id
241
+ */
242
+ AutoTestApiResult.prototype['id'] = undefined;
243
+
244
+ /**
245
+ * @member {String} projectId
246
+ */
247
+ AutoTestApiResult.prototype['projectId'] = undefined;
248
+
249
+ /**
250
+ * @member {String} externalId
251
+ */
252
+ AutoTestApiResult.prototype['externalId'] = undefined;
253
+
254
+ /**
255
+ * @member {String} name
256
+ */
257
+ AutoTestApiResult.prototype['name'] = undefined;
258
+
259
+ /**
260
+ * @member {String} namespace
261
+ */
262
+ AutoTestApiResult.prototype['namespace'] = undefined;
263
+
264
+ /**
265
+ * @member {String} classname
266
+ */
267
+ AutoTestApiResult.prototype['classname'] = undefined;
268
+
269
+ /**
270
+ * @member {Array.<module:model/AutoTestStepApiResult>} steps
271
+ */
272
+ AutoTestApiResult.prototype['steps'] = undefined;
273
+
274
+ /**
275
+ * @member {Array.<module:model/AutoTestStepApiResult>} setup
276
+ */
277
+ AutoTestApiResult.prototype['setup'] = undefined;
278
+
279
+ /**
280
+ * @member {Array.<module:model/AutoTestStepApiResult>} teardown
281
+ */
282
+ AutoTestApiResult.prototype['teardown'] = undefined;
283
+
284
+ /**
285
+ * @member {String} title
286
+ */
287
+ AutoTestApiResult.prototype['title'] = undefined;
288
+
289
+ /**
290
+ * @member {String} description
291
+ */
292
+ AutoTestApiResult.prototype['description'] = undefined;
293
+
294
+ /**
295
+ * @member {Boolean} isFlaky
296
+ */
297
+ AutoTestApiResult.prototype['isFlaky'] = undefined;
298
+
299
+ /**
300
+ * @member {String} externalKey
301
+ */
302
+ AutoTestApiResult.prototype['externalKey'] = undefined;
303
+
304
+ /**
305
+ * @member {Number} globalId
306
+ */
307
+ AutoTestApiResult.prototype['globalId'] = undefined;
308
+
309
+ /**
310
+ * @member {Array.<module:model/LinkApiResult>} links
311
+ */
312
+ AutoTestApiResult.prototype['links'] = undefined;
313
+
314
+ /**
315
+ * @member {Array.<module:model/LabelApiResult>} labels
316
+ */
317
+ AutoTestApiResult.prototype['labels'] = undefined;
318
+
319
+ /**
320
+ * @member {Array.<String>} tags
321
+ */
322
+ AutoTestApiResult.prototype['tags'] = undefined;
323
+ var _default = exports.default = AutoTestApiResult;