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