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.
- package/lib/adapters-api/dist/ApiClient.js +683 -0
- package/lib/adapters-api/dist/api/AttachmentsApi.js +165 -0
- package/lib/adapters-api/dist/api/AutoTestsApi.js +536 -0
- package/lib/adapters-api/dist/api/ConfigurationsApi.js +91 -0
- package/lib/adapters-api/dist/api/ParametersApi.js +159 -0
- package/lib/adapters-api/dist/api/ProjectAttributesApi.js +140 -0
- package/lib/adapters-api/dist/api/ProjectSectionsApi.js +96 -0
- package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +99 -0
- package/lib/adapters-api/dist/api/ProjectsApi.js +200 -0
- package/lib/adapters-api/dist/api/SectionsApi.js +118 -0
- package/lib/adapters-api/dist/api/TestResultsApi.js +168 -0
- package/lib/adapters-api/dist/api/TestRunsApi.js +331 -0
- package/lib/adapters-api/dist/api/WorkItemsApi.js +170 -0
- package/lib/adapters-api/dist/api/WorkflowsApi.js +75 -0
- package/lib/adapters-api/dist/index.js +951 -0
- package/lib/adapters-api/dist/model/AssignAttachmentApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AssignAutoTestCaseIdApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AssignIterationApiModel.js +112 -0
- package/lib/adapters-api/dist/model/AttachmentApiResult.js +145 -0
- package/lib/adapters-api/dist/model/AttachmentModel.js +193 -0
- package/lib/adapters-api/dist/model/AttachmentPutModel.js +89 -0
- package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +196 -0
- package/lib/adapters-api/dist/model/AttachmentUpdateRequest.js +89 -0
- package/lib/adapters-api/dist/model/AutoTest.js +327 -0
- package/lib/adapters-api/dist/model/AutoTestApiResult.js +323 -0
- package/lib/adapters-api/dist/model/AutoTestCaseApiModel.js +89 -0
- package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +323 -0
- package/lib/adapters-api/dist/model/AutoTestFilterApiModel.js +201 -0
- package/lib/adapters-api/dist/model/AutoTestIdModel.js +88 -0
- package/lib/adapters-api/dist/model/AutoTestModel.js +488 -0
- package/lib/adapters-api/dist/model/AutoTestResultReasonShort.js +99 -0
- package/lib/adapters-api/dist/model/AutoTestResultsForTestRunModel.js +334 -0
- package/lib/adapters-api/dist/model/AutoTestSearchApiModel.js +96 -0
- package/lib/adapters-api/dist/model/AutoTestSearchIncludeApiModel.js +93 -0
- package/lib/adapters-api/dist/model/AutoTestStep.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepApiModel.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepApiResult.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepModel.js +123 -0
- package/lib/adapters-api/dist/model/AutoTestStepResult.js +196 -0
- package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +196 -0
- package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +327 -0
- package/lib/adapters-api/dist/model/AutoTestWorkItemIdentifierApiResult.js +100 -0
- package/lib/adapters-api/dist/model/AvailableTestResultOutcome.js +67 -0
- package/lib/adapters-api/dist/model/ConfigurationFilterModel.js +114 -0
- package/lib/adapters-api/dist/model/ConfigurationModel.js +213 -0
- package/lib/adapters-api/dist/model/ConfigurationShortModel.js +102 -0
- package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +185 -0
- package/lib/adapters-api/dist/model/CreateLinkApiModel.js +127 -0
- package/lib/adapters-api/dist/model/CreateParameterApiModel.js +117 -0
- package/lib/adapters-api/dist/model/CreateProjectApiModel.js +124 -0
- package/lib/adapters-api/dist/model/CreateStepApiModel.js +131 -0
- package/lib/adapters-api/dist/model/CreateWorkItemApiModel.js +384 -0
- package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +184 -0
- package/lib/adapters-api/dist/model/CustomAttributeGetModel.js +184 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionApiResult.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionModel.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributePutModel.js +182 -0
- package/lib/adapters-api/dist/model/CustomAttributeType.js +73 -0
- package/lib/adapters-api/dist/model/CustomAttributeTypesEnum.js +73 -0
- package/lib/adapters-api/dist/model/DateTimeRangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/DeletionState.js +55 -0
- package/lib/adapters-api/dist/model/DetailedProjectApiResult.js +204 -0
- package/lib/adapters-api/dist/model/FailureCategoryModel.js +67 -0
- package/lib/adapters-api/dist/model/GuidExtractionModel.js +90 -0
- package/lib/adapters-api/dist/model/ImageResizeType.js +49 -0
- package/lib/adapters-api/dist/model/Int32RangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/Int64RangeSelectorModel.js +82 -0
- package/lib/adapters-api/dist/model/IterationApiResult.js +109 -0
- package/lib/adapters-api/dist/model/IterationModel.js +109 -0
- package/lib/adapters-api/dist/model/LabelApiModel.js +100 -0
- package/lib/adapters-api/dist/model/LabelApiResult.js +100 -0
- package/lib/adapters-api/dist/model/LabelShortModel.js +100 -0
- package/lib/adapters-api/dist/model/LinkApiResult.js +140 -0
- package/lib/adapters-api/dist/model/LinkCreateApiModel.js +127 -0
- package/lib/adapters-api/dist/model/LinkModel.js +149 -0
- package/lib/adapters-api/dist/model/LinkPostModel.js +137 -0
- package/lib/adapters-api/dist/model/LinkPutModel.js +149 -0
- package/lib/adapters-api/dist/model/LinkShortApiResult.js +126 -0
- package/lib/adapters-api/dist/model/LinkType.js +73 -0
- package/lib/adapters-api/dist/model/LinkUpdateApiModel.js +140 -0
- package/lib/adapters-api/dist/model/ManualRerunApiResult.js +84 -0
- package/lib/adapters-api/dist/model/ManualRerunSelectTestResultsApiModel.js +109 -0
- package/lib/adapters-api/dist/model/ManualRerunTestResultApiModel.js +81 -0
- package/lib/adapters-api/dist/model/Operation.js +110 -0
- package/lib/adapters-api/dist/model/ParameterApiResult.js +154 -0
- package/lib/adapters-api/dist/model/ParameterIterationModel.js +100 -0
- package/lib/adapters-api/dist/model/ParameterShortApiResult.js +132 -0
- package/lib/adapters-api/dist/model/ParameterShortModel.js +158 -0
- package/lib/adapters-api/dist/model/ParametersFilterApiModel.js +98 -0
- package/lib/adapters-api/dist/model/ProblemDetails.js +124 -0
- package/lib/adapters-api/dist/model/ProjectApiResult.js +165 -0
- package/lib/adapters-api/dist/model/ProjectAttributesFilterModel.js +132 -0
- package/lib/adapters-api/dist/model/ProjectTypeModel.js +49 -0
- package/lib/adapters-api/dist/model/ProjectsFilterModel.js +209 -0
- package/lib/adapters-api/dist/model/SectionModel.js +180 -0
- package/lib/adapters-api/dist/model/SectionPostModel.js +178 -0
- package/lib/adapters-api/dist/model/SectionWithStepsModel.js +242 -0
- package/lib/adapters-api/dist/model/SharedStepModel.js +145 -0
- package/lib/adapters-api/dist/model/SharedStepResultApiModel.js +102 -0
- package/lib/adapters-api/dist/model/StepCommentApiModel.js +207 -0
- package/lib/adapters-api/dist/model/StepModel.js +163 -0
- package/lib/adapters-api/dist/model/StepPostModel.js +126 -0
- package/lib/adapters-api/dist/model/StepResultApiModel.js +149 -0
- package/lib/adapters-api/dist/model/TagModel.js +88 -0
- package/lib/adapters-api/dist/model/TestResultLinkApiResult.js +153 -0
- package/lib/adapters-api/dist/model/TestResultOutcome.js +67 -0
- package/lib/adapters-api/dist/model/TestResultResponse.js +400 -0
- package/lib/adapters-api/dist/model/TestResultShortResponse.js +311 -0
- package/lib/adapters-api/dist/model/TestResultStepCommentUpdateRequest.js +152 -0
- package/lib/adapters-api/dist/model/TestResultUpdateRequest.js +285 -0
- package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +226 -0
- package/lib/adapters-api/dist/model/TestRunApiResult.js +196 -0
- package/lib/adapters-api/dist/model/TestRunState.js +61 -0
- package/lib/adapters-api/dist/model/TestStatusApiResult.js +114 -0
- package/lib/adapters-api/dist/model/TestStatusApiType.js +67 -0
- package/lib/adapters-api/dist/model/TestStatusModel.js +149 -0
- package/lib/adapters-api/dist/model/TestStatusType.js +67 -0
- package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +187 -0
- package/lib/adapters-api/dist/model/UpdateLinkApiModel.js +140 -0
- package/lib/adapters-api/dist/model/ValidationProblemDetails.js +144 -0
- package/lib/adapters-api/dist/model/WorkItemApiResult.js +499 -0
- package/lib/adapters-api/dist/model/WorkItemEntityTypeApiModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemFilterApiModel.js +309 -0
- package/lib/adapters-api/dist/model/WorkItemIdApiModel.js +89 -0
- package/lib/adapters-api/dist/model/WorkItemParameterKeyApiModel.js +89 -0
- package/lib/adapters-api/dist/model/WorkItemParameterKeyApiResult.js +88 -0
- package/lib/adapters-api/dist/model/WorkItemPriorityApiModel.js +67 -0
- package/lib/adapters-api/dist/model/WorkItemPriorityModel.js +67 -0
- package/lib/adapters-api/dist/model/WorkItemSelectApiModel.js +90 -0
- package/lib/adapters-api/dist/model/WorkItemShortApiResult.js +316 -0
- package/lib/adapters-api/dist/model/WorkItemSourceTypeModel.js +49 -0
- package/lib/adapters-api/dist/model/WorkItemStateApiModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemStates.js +55 -0
- package/lib/adapters-api/dist/model/WorkItemTypeModel.js +55 -0
- package/lib/adapters-api/dist/model/WorkflowApiResult.js +111 -0
- package/lib/adapters-api/dist/model/WorkflowStatusApiResult.js +114 -0
- package/lib/adapters-api/index.d.ts +8862 -0
- package/lib/common/base.converter.d.ts +16 -17
- package/lib/common/base.converter.js +12 -14
- package/lib/common/base.service.d.ts +1 -1
- package/lib/common/base.service.js +6 -36
- package/lib/services/attachments/attachments.service.d.ts +1 -2
- package/lib/services/attachments/attachments.service.js +7 -7
- package/lib/services/autotests/autotests.converter.d.ts +2 -3
- package/lib/services/autotests/autotests.converter.js +0 -5
- package/lib/services/autotests/autotests.service.d.ts +1 -2
- package/lib/services/autotests/autotests.service.js +11 -44
- package/lib/services/testresults/testresults.converter.d.ts +4 -5
- package/lib/services/testresults/testresults.converter.js +0 -15
- package/lib/services/testresults/testresults.service.d.ts +2 -3
- package/lib/services/testresults/testresults.service.js +16 -44
- package/lib/services/testresults/testresults.type.d.ts +1 -1
- package/lib/services/testruns/testruns.converter.d.ts +12 -13
- package/lib/services/testruns/testruns.converter.js +19 -8
- package/lib/services/testruns/testruns.service.d.ts +1 -2
- package/lib/services/testruns/testruns.service.js +13 -46
- package/package.json +7 -5
|
@@ -0,0 +1,499 @@
|
|
|
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 _AttachmentModel = _interopRequireDefault(require("./AttachmentModel"));
|
|
9
|
+
var _AutoTestModel = _interopRequireDefault(require("./AutoTestModel"));
|
|
10
|
+
var _IterationModel = _interopRequireDefault(require("./IterationModel"));
|
|
11
|
+
var _LinkModel = _interopRequireDefault(require("./LinkModel"));
|
|
12
|
+
var _StepModel = _interopRequireDefault(require("./StepModel"));
|
|
13
|
+
var _TagModel = _interopRequireDefault(require("./TagModel"));
|
|
14
|
+
var _WorkItemEntityTypeApiModel = _interopRequireDefault(require("./WorkItemEntityTypeApiModel"));
|
|
15
|
+
var _WorkItemParameterKeyApiResult = _interopRequireDefault(require("./WorkItemParameterKeyApiResult"));
|
|
16
|
+
var _WorkItemPriorityApiModel = _interopRequireDefault(require("./WorkItemPriorityApiModel"));
|
|
17
|
+
var _WorkItemStateApiModel = _interopRequireDefault(require("./WorkItemStateApiModel"));
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
/**
|
|
20
|
+
* API
|
|
21
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document: adapters
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The WorkItemApiResult model module.
|
|
34
|
+
* @module model/WorkItemApiResult
|
|
35
|
+
* @version 1.0.0
|
|
36
|
+
*/
|
|
37
|
+
class WorkItemApiResult {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>WorkItemApiResult</code>.
|
|
40
|
+
* @alias module:model/WorkItemApiResult
|
|
41
|
+
* @param id {String} Unique identifier of the work item
|
|
42
|
+
* @param globalId {Number} Global identifier of the work item
|
|
43
|
+
* @param projectId {String} Unique identifier of the project
|
|
44
|
+
* @param sectionId {String} Unique identifier of the section within a project
|
|
45
|
+
* @param name {String} Name of the work item
|
|
46
|
+
* @param entityTypeName {module:model/WorkItemEntityTypeApiModel} Type of entity associated with this work item
|
|
47
|
+
* @param duration {Number} Duration of the work item in milliseconds
|
|
48
|
+
* @param state {module:model/WorkItemStateApiModel} State of the work item
|
|
49
|
+
* @param priority {module:model/WorkItemPriorityApiModel} Priority level of the work item
|
|
50
|
+
* @param isAutomated {Boolean}
|
|
51
|
+
* @param attributes {Object.<String, Object>} Set of custom attributes associated with the work item
|
|
52
|
+
* @param tags {Array.<module:model/TagModel>} Set of tags applied to the work item
|
|
53
|
+
* @param sectionPreconditionSteps {Array.<module:model/StepModel>} Set of section precondition steps that need to be executed before starting the work item steps
|
|
54
|
+
* @param sectionPostconditionSteps {Array.<module:model/StepModel>} Set of section postcondition steps that need to be executed after completing the work item steps
|
|
55
|
+
* @param preconditionSteps {Array.<module:model/StepModel>} Set of precondition steps that need to be executed before starting the main steps
|
|
56
|
+
* @param steps {Array.<module:model/StepModel>} Main steps or actions defined for the work item
|
|
57
|
+
* @param postconditionSteps {Array.<module:model/StepModel>} Set of postcondition steps that are executed after completing the main steps
|
|
58
|
+
* @param iterations {Array.<module:model/IterationModel>} Associated iterations linked to the work item
|
|
59
|
+
* @param autoTests {Array.<module:model/AutoTestModel>} Automated tests associated with the work item
|
|
60
|
+
* @param attachments {Array.<module:model/AttachmentModel>} Files attached to the work item
|
|
61
|
+
* @param links {Array.<module:model/LinkModel>} Set of links related to the work item
|
|
62
|
+
* @param parameters {Array.<module:model/WorkItemParameterKeyApiResult>} Set of parameters related to the work item
|
|
63
|
+
* @param isDeleted {Boolean} Indicates whether the work item is marked as deleted
|
|
64
|
+
*/
|
|
65
|
+
constructor(id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, attachments, links, parameters, isDeleted) {
|
|
66
|
+
WorkItemApiResult.initialize(this, id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, attachments, links, parameters, isDeleted);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Initializes the fields of this object.
|
|
71
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
72
|
+
* Only for internal use.
|
|
73
|
+
*/
|
|
74
|
+
static initialize(obj, id, globalId, projectId, sectionId, name, entityTypeName, duration, state, priority, isAutomated, attributes, tags, sectionPreconditionSteps, sectionPostconditionSteps, preconditionSteps, steps, postconditionSteps, iterations, autoTests, attachments, links, parameters, isDeleted) {
|
|
75
|
+
obj['id'] = id;
|
|
76
|
+
obj['globalId'] = globalId;
|
|
77
|
+
obj['projectId'] = projectId;
|
|
78
|
+
obj['sectionId'] = sectionId;
|
|
79
|
+
obj['name'] = name;
|
|
80
|
+
obj['entityTypeName'] = entityTypeName;
|
|
81
|
+
obj['duration'] = duration;
|
|
82
|
+
obj['state'] = state;
|
|
83
|
+
obj['priority'] = priority;
|
|
84
|
+
obj['isAutomated'] = isAutomated;
|
|
85
|
+
obj['attributes'] = attributes;
|
|
86
|
+
obj['tags'] = tags;
|
|
87
|
+
obj['sectionPreconditionSteps'] = sectionPreconditionSteps;
|
|
88
|
+
obj['sectionPostconditionSteps'] = sectionPostconditionSteps;
|
|
89
|
+
obj['preconditionSteps'] = preconditionSteps;
|
|
90
|
+
obj['steps'] = steps;
|
|
91
|
+
obj['postconditionSteps'] = postconditionSteps;
|
|
92
|
+
obj['iterations'] = iterations;
|
|
93
|
+
obj['autoTests'] = autoTests;
|
|
94
|
+
obj['attachments'] = attachments;
|
|
95
|
+
obj['links'] = links;
|
|
96
|
+
obj['parameters'] = parameters;
|
|
97
|
+
obj['isDeleted'] = isDeleted;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Constructs a <code>WorkItemApiResult</code> from a plain JavaScript object, optionally creating a new instance.
|
|
102
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
103
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
104
|
+
* @param {module:model/WorkItemApiResult} obj Optional instance to populate.
|
|
105
|
+
* @return {module:model/WorkItemApiResult} The populated <code>WorkItemApiResult</code> instance.
|
|
106
|
+
*/
|
|
107
|
+
static constructFromObject(data, obj) {
|
|
108
|
+
if (data) {
|
|
109
|
+
obj = obj || new WorkItemApiResult();
|
|
110
|
+
if (data.hasOwnProperty('id')) {
|
|
111
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('globalId')) {
|
|
114
|
+
obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('projectId')) {
|
|
117
|
+
obj['projectId'] = _ApiClient.default.convertToType(data['projectId'], 'String');
|
|
118
|
+
}
|
|
119
|
+
if (data.hasOwnProperty('sectionId')) {
|
|
120
|
+
obj['sectionId'] = _ApiClient.default.convertToType(data['sectionId'], 'String');
|
|
121
|
+
}
|
|
122
|
+
if (data.hasOwnProperty('name')) {
|
|
123
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
124
|
+
}
|
|
125
|
+
if (data.hasOwnProperty('description')) {
|
|
126
|
+
obj['description'] = _ApiClient.default.convertToType(data['description'], 'String');
|
|
127
|
+
}
|
|
128
|
+
if (data.hasOwnProperty('entityTypeName')) {
|
|
129
|
+
obj['entityTypeName'] = _ApiClient.default.convertToType(data['entityTypeName'], _WorkItemEntityTypeApiModel.default);
|
|
130
|
+
}
|
|
131
|
+
if (data.hasOwnProperty('duration')) {
|
|
132
|
+
obj['duration'] = _ApiClient.default.convertToType(data['duration'], 'Number');
|
|
133
|
+
}
|
|
134
|
+
if (data.hasOwnProperty('state')) {
|
|
135
|
+
obj['state'] = _ApiClient.default.convertToType(data['state'], _WorkItemStateApiModel.default);
|
|
136
|
+
}
|
|
137
|
+
if (data.hasOwnProperty('priority')) {
|
|
138
|
+
obj['priority'] = _ApiClient.default.convertToType(data['priority'], _WorkItemPriorityApiModel.default);
|
|
139
|
+
}
|
|
140
|
+
if (data.hasOwnProperty('isAutomated')) {
|
|
141
|
+
obj['isAutomated'] = _ApiClient.default.convertToType(data['isAutomated'], 'Boolean');
|
|
142
|
+
}
|
|
143
|
+
if (data.hasOwnProperty('attributes')) {
|
|
144
|
+
obj['attributes'] = _ApiClient.default.convertToType(data['attributes'], {
|
|
145
|
+
'String': Object
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
if (data.hasOwnProperty('tags')) {
|
|
149
|
+
obj['tags'] = _ApiClient.default.convertToType(data['tags'], [_TagModel.default]);
|
|
150
|
+
}
|
|
151
|
+
if (data.hasOwnProperty('sectionPreconditionSteps')) {
|
|
152
|
+
obj['sectionPreconditionSteps'] = _ApiClient.default.convertToType(data['sectionPreconditionSteps'], [_StepModel.default]);
|
|
153
|
+
}
|
|
154
|
+
if (data.hasOwnProperty('sectionPostconditionSteps')) {
|
|
155
|
+
obj['sectionPostconditionSteps'] = _ApiClient.default.convertToType(data['sectionPostconditionSteps'], [_StepModel.default]);
|
|
156
|
+
}
|
|
157
|
+
if (data.hasOwnProperty('preconditionSteps')) {
|
|
158
|
+
obj['preconditionSteps'] = _ApiClient.default.convertToType(data['preconditionSteps'], [_StepModel.default]);
|
|
159
|
+
}
|
|
160
|
+
if (data.hasOwnProperty('steps')) {
|
|
161
|
+
obj['steps'] = _ApiClient.default.convertToType(data['steps'], [_StepModel.default]);
|
|
162
|
+
}
|
|
163
|
+
if (data.hasOwnProperty('postconditionSteps')) {
|
|
164
|
+
obj['postconditionSteps'] = _ApiClient.default.convertToType(data['postconditionSteps'], [_StepModel.default]);
|
|
165
|
+
}
|
|
166
|
+
if (data.hasOwnProperty('iterations')) {
|
|
167
|
+
obj['iterations'] = _ApiClient.default.convertToType(data['iterations'], [_IterationModel.default]);
|
|
168
|
+
}
|
|
169
|
+
if (data.hasOwnProperty('autoTests')) {
|
|
170
|
+
obj['autoTests'] = _ApiClient.default.convertToType(data['autoTests'], [_AutoTestModel.default]);
|
|
171
|
+
}
|
|
172
|
+
if (data.hasOwnProperty('attachments')) {
|
|
173
|
+
obj['attachments'] = _ApiClient.default.convertToType(data['attachments'], [_AttachmentModel.default]);
|
|
174
|
+
}
|
|
175
|
+
if (data.hasOwnProperty('links')) {
|
|
176
|
+
obj['links'] = _ApiClient.default.convertToType(data['links'], [_LinkModel.default]);
|
|
177
|
+
}
|
|
178
|
+
if (data.hasOwnProperty('parameters')) {
|
|
179
|
+
obj['parameters'] = _ApiClient.default.convertToType(data['parameters'], [_WorkItemParameterKeyApiResult.default]);
|
|
180
|
+
}
|
|
181
|
+
if (data.hasOwnProperty('isDeleted')) {
|
|
182
|
+
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return obj;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Validates the JSON data with respect to <code>WorkItemApiResult</code>.
|
|
190
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
191
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>WorkItemApiResult</code>.
|
|
192
|
+
*/
|
|
193
|
+
static validateJSON(data) {
|
|
194
|
+
// check to make sure all required properties are present in the JSON string
|
|
195
|
+
for (const property of WorkItemApiResult.RequiredProperties) {
|
|
196
|
+
if (!data.hasOwnProperty(property)) {
|
|
197
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
// ensure the json data is a string
|
|
201
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
202
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
203
|
+
}
|
|
204
|
+
// ensure the json data is a string
|
|
205
|
+
if (data['projectId'] && !(typeof data['projectId'] === 'string' || data['projectId'] instanceof String)) {
|
|
206
|
+
throw new Error("Expected the field `projectId` to be a primitive type in the JSON string but got " + data['projectId']);
|
|
207
|
+
}
|
|
208
|
+
// ensure the json data is a string
|
|
209
|
+
if (data['sectionId'] && !(typeof data['sectionId'] === 'string' || data['sectionId'] instanceof String)) {
|
|
210
|
+
throw new Error("Expected the field `sectionId` to be a primitive type in the JSON string but got " + data['sectionId']);
|
|
211
|
+
}
|
|
212
|
+
// ensure the json data is a string
|
|
213
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
214
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
215
|
+
}
|
|
216
|
+
// ensure the json data is a string
|
|
217
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
218
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
219
|
+
}
|
|
220
|
+
if (data['tags']) {
|
|
221
|
+
// data not null
|
|
222
|
+
// ensure the json data is an array
|
|
223
|
+
if (!Array.isArray(data['tags'])) {
|
|
224
|
+
throw new Error("Expected the field `tags` to be an array in the JSON data but got " + data['tags']);
|
|
225
|
+
}
|
|
226
|
+
// validate the optional field `tags` (array)
|
|
227
|
+
for (const item of data['tags']) {
|
|
228
|
+
_TagModel.default.validateJSON(item);
|
|
229
|
+
}
|
|
230
|
+
;
|
|
231
|
+
}
|
|
232
|
+
if (data['sectionPreconditionSteps']) {
|
|
233
|
+
// data not null
|
|
234
|
+
// ensure the json data is an array
|
|
235
|
+
if (!Array.isArray(data['sectionPreconditionSteps'])) {
|
|
236
|
+
throw new Error("Expected the field `sectionPreconditionSteps` to be an array in the JSON data but got " + data['sectionPreconditionSteps']);
|
|
237
|
+
}
|
|
238
|
+
// validate the optional field `sectionPreconditionSteps` (array)
|
|
239
|
+
for (const item of data['sectionPreconditionSteps']) {
|
|
240
|
+
_StepModel.default.validateJSON(item);
|
|
241
|
+
}
|
|
242
|
+
;
|
|
243
|
+
}
|
|
244
|
+
if (data['sectionPostconditionSteps']) {
|
|
245
|
+
// data not null
|
|
246
|
+
// ensure the json data is an array
|
|
247
|
+
if (!Array.isArray(data['sectionPostconditionSteps'])) {
|
|
248
|
+
throw new Error("Expected the field `sectionPostconditionSteps` to be an array in the JSON data but got " + data['sectionPostconditionSteps']);
|
|
249
|
+
}
|
|
250
|
+
// validate the optional field `sectionPostconditionSteps` (array)
|
|
251
|
+
for (const item of data['sectionPostconditionSteps']) {
|
|
252
|
+
_StepModel.default.validateJSON(item);
|
|
253
|
+
}
|
|
254
|
+
;
|
|
255
|
+
}
|
|
256
|
+
if (data['preconditionSteps']) {
|
|
257
|
+
// data not null
|
|
258
|
+
// ensure the json data is an array
|
|
259
|
+
if (!Array.isArray(data['preconditionSteps'])) {
|
|
260
|
+
throw new Error("Expected the field `preconditionSteps` to be an array in the JSON data but got " + data['preconditionSteps']);
|
|
261
|
+
}
|
|
262
|
+
// validate the optional field `preconditionSteps` (array)
|
|
263
|
+
for (const item of data['preconditionSteps']) {
|
|
264
|
+
_StepModel.default.validateJSON(item);
|
|
265
|
+
}
|
|
266
|
+
;
|
|
267
|
+
}
|
|
268
|
+
if (data['steps']) {
|
|
269
|
+
// data not null
|
|
270
|
+
// ensure the json data is an array
|
|
271
|
+
if (!Array.isArray(data['steps'])) {
|
|
272
|
+
throw new Error("Expected the field `steps` to be an array in the JSON data but got " + data['steps']);
|
|
273
|
+
}
|
|
274
|
+
// validate the optional field `steps` (array)
|
|
275
|
+
for (const item of data['steps']) {
|
|
276
|
+
_StepModel.default.validateJSON(item);
|
|
277
|
+
}
|
|
278
|
+
;
|
|
279
|
+
}
|
|
280
|
+
if (data['postconditionSteps']) {
|
|
281
|
+
// data not null
|
|
282
|
+
// ensure the json data is an array
|
|
283
|
+
if (!Array.isArray(data['postconditionSteps'])) {
|
|
284
|
+
throw new Error("Expected the field `postconditionSteps` to be an array in the JSON data but got " + data['postconditionSteps']);
|
|
285
|
+
}
|
|
286
|
+
// validate the optional field `postconditionSteps` (array)
|
|
287
|
+
for (const item of data['postconditionSteps']) {
|
|
288
|
+
_StepModel.default.validateJSON(item);
|
|
289
|
+
}
|
|
290
|
+
;
|
|
291
|
+
}
|
|
292
|
+
if (data['iterations']) {
|
|
293
|
+
// data not null
|
|
294
|
+
// ensure the json data is an array
|
|
295
|
+
if (!Array.isArray(data['iterations'])) {
|
|
296
|
+
throw new Error("Expected the field `iterations` to be an array in the JSON data but got " + data['iterations']);
|
|
297
|
+
}
|
|
298
|
+
// validate the optional field `iterations` (array)
|
|
299
|
+
for (const item of data['iterations']) {
|
|
300
|
+
_IterationModel.default.validateJSON(item);
|
|
301
|
+
}
|
|
302
|
+
;
|
|
303
|
+
}
|
|
304
|
+
if (data['autoTests']) {
|
|
305
|
+
// data not null
|
|
306
|
+
// ensure the json data is an array
|
|
307
|
+
if (!Array.isArray(data['autoTests'])) {
|
|
308
|
+
throw new Error("Expected the field `autoTests` to be an array in the JSON data but got " + data['autoTests']);
|
|
309
|
+
}
|
|
310
|
+
// validate the optional field `autoTests` (array)
|
|
311
|
+
for (const item of data['autoTests']) {
|
|
312
|
+
_AutoTestModel.default.validateJSON(item);
|
|
313
|
+
}
|
|
314
|
+
;
|
|
315
|
+
}
|
|
316
|
+
if (data['attachments']) {
|
|
317
|
+
// data not null
|
|
318
|
+
// ensure the json data is an array
|
|
319
|
+
if (!Array.isArray(data['attachments'])) {
|
|
320
|
+
throw new Error("Expected the field `attachments` to be an array in the JSON data but got " + data['attachments']);
|
|
321
|
+
}
|
|
322
|
+
// validate the optional field `attachments` (array)
|
|
323
|
+
for (const item of data['attachments']) {
|
|
324
|
+
_AttachmentModel.default.validateJSON(item);
|
|
325
|
+
}
|
|
326
|
+
;
|
|
327
|
+
}
|
|
328
|
+
if (data['links']) {
|
|
329
|
+
// data not null
|
|
330
|
+
// ensure the json data is an array
|
|
331
|
+
if (!Array.isArray(data['links'])) {
|
|
332
|
+
throw new Error("Expected the field `links` to be an array in the JSON data but got " + data['links']);
|
|
333
|
+
}
|
|
334
|
+
// validate the optional field `links` (array)
|
|
335
|
+
for (const item of data['links']) {
|
|
336
|
+
_LinkModel.default.validateJSON(item);
|
|
337
|
+
}
|
|
338
|
+
;
|
|
339
|
+
}
|
|
340
|
+
if (data['parameters']) {
|
|
341
|
+
// data not null
|
|
342
|
+
// ensure the json data is an array
|
|
343
|
+
if (!Array.isArray(data['parameters'])) {
|
|
344
|
+
throw new Error("Expected the field `parameters` to be an array in the JSON data but got " + data['parameters']);
|
|
345
|
+
}
|
|
346
|
+
// validate the optional field `parameters` (array)
|
|
347
|
+
for (const item of data['parameters']) {
|
|
348
|
+
_WorkItemParameterKeyApiResult.default.validateJSON(item);
|
|
349
|
+
}
|
|
350
|
+
;
|
|
351
|
+
}
|
|
352
|
+
return true;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
WorkItemApiResult.RequiredProperties = ["id", "globalId", "projectId", "sectionId", "name", "entityTypeName", "duration", "state", "priority", "isAutomated", "attributes", "tags", "sectionPreconditionSteps", "sectionPostconditionSteps", "preconditionSteps", "steps", "postconditionSteps", "iterations", "autoTests", "attachments", "links", "parameters", "isDeleted"];
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Unique identifier of the work item
|
|
359
|
+
* @member {String} id
|
|
360
|
+
*/
|
|
361
|
+
WorkItemApiResult.prototype['id'] = undefined;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Global identifier of the work item
|
|
365
|
+
* @member {Number} globalId
|
|
366
|
+
*/
|
|
367
|
+
WorkItemApiResult.prototype['globalId'] = undefined;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Unique identifier of the project
|
|
371
|
+
* @member {String} projectId
|
|
372
|
+
*/
|
|
373
|
+
WorkItemApiResult.prototype['projectId'] = undefined;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Unique identifier of the section within a project
|
|
377
|
+
* @member {String} sectionId
|
|
378
|
+
*/
|
|
379
|
+
WorkItemApiResult.prototype['sectionId'] = undefined;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Name of the work item
|
|
383
|
+
* @member {String} name
|
|
384
|
+
*/
|
|
385
|
+
WorkItemApiResult.prototype['name'] = undefined;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Description of the work item
|
|
389
|
+
* @member {String} description
|
|
390
|
+
*/
|
|
391
|
+
WorkItemApiResult.prototype['description'] = undefined;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Type of entity associated with this work item
|
|
395
|
+
* @member {module:model/WorkItemEntityTypeApiModel} entityTypeName
|
|
396
|
+
*/
|
|
397
|
+
WorkItemApiResult.prototype['entityTypeName'] = undefined;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Duration of the work item in milliseconds
|
|
401
|
+
* @member {Number} duration
|
|
402
|
+
*/
|
|
403
|
+
WorkItemApiResult.prototype['duration'] = undefined;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* State of the work item
|
|
407
|
+
* @member {module:model/WorkItemStateApiModel} state
|
|
408
|
+
*/
|
|
409
|
+
WorkItemApiResult.prototype['state'] = undefined;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Priority level of the work item
|
|
413
|
+
* @member {module:model/WorkItemPriorityApiModel} priority
|
|
414
|
+
*/
|
|
415
|
+
WorkItemApiResult.prototype['priority'] = undefined;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* @member {Boolean} isAutomated
|
|
419
|
+
*/
|
|
420
|
+
WorkItemApiResult.prototype['isAutomated'] = undefined;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Set of custom attributes associated with the work item
|
|
424
|
+
* @member {Object.<String, Object>} attributes
|
|
425
|
+
*/
|
|
426
|
+
WorkItemApiResult.prototype['attributes'] = undefined;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Set of tags applied to the work item
|
|
430
|
+
* @member {Array.<module:model/TagModel>} tags
|
|
431
|
+
*/
|
|
432
|
+
WorkItemApiResult.prototype['tags'] = undefined;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Set of section precondition steps that need to be executed before starting the work item steps
|
|
436
|
+
* @member {Array.<module:model/StepModel>} sectionPreconditionSteps
|
|
437
|
+
*/
|
|
438
|
+
WorkItemApiResult.prototype['sectionPreconditionSteps'] = undefined;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Set of section postcondition steps that need to be executed after completing the work item steps
|
|
442
|
+
* @member {Array.<module:model/StepModel>} sectionPostconditionSteps
|
|
443
|
+
*/
|
|
444
|
+
WorkItemApiResult.prototype['sectionPostconditionSteps'] = undefined;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Set of precondition steps that need to be executed before starting the main steps
|
|
448
|
+
* @member {Array.<module:model/StepModel>} preconditionSteps
|
|
449
|
+
*/
|
|
450
|
+
WorkItemApiResult.prototype['preconditionSteps'] = undefined;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Main steps or actions defined for the work item
|
|
454
|
+
* @member {Array.<module:model/StepModel>} steps
|
|
455
|
+
*/
|
|
456
|
+
WorkItemApiResult.prototype['steps'] = undefined;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Set of postcondition steps that are executed after completing the main steps
|
|
460
|
+
* @member {Array.<module:model/StepModel>} postconditionSteps
|
|
461
|
+
*/
|
|
462
|
+
WorkItemApiResult.prototype['postconditionSteps'] = undefined;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Associated iterations linked to the work item
|
|
466
|
+
* @member {Array.<module:model/IterationModel>} iterations
|
|
467
|
+
*/
|
|
468
|
+
WorkItemApiResult.prototype['iterations'] = undefined;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Automated tests associated with the work item
|
|
472
|
+
* @member {Array.<module:model/AutoTestModel>} autoTests
|
|
473
|
+
*/
|
|
474
|
+
WorkItemApiResult.prototype['autoTests'] = undefined;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Files attached to the work item
|
|
478
|
+
* @member {Array.<module:model/AttachmentModel>} attachments
|
|
479
|
+
*/
|
|
480
|
+
WorkItemApiResult.prototype['attachments'] = undefined;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Set of links related to the work item
|
|
484
|
+
* @member {Array.<module:model/LinkModel>} links
|
|
485
|
+
*/
|
|
486
|
+
WorkItemApiResult.prototype['links'] = undefined;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Set of parameters related to the work item
|
|
490
|
+
* @member {Array.<module:model/WorkItemParameterKeyApiResult>} parameters
|
|
491
|
+
*/
|
|
492
|
+
WorkItemApiResult.prototype['parameters'] = undefined;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Indicates whether the work item is marked as deleted
|
|
496
|
+
* @member {Boolean} isDeleted
|
|
497
|
+
*/
|
|
498
|
+
WorkItemApiResult.prototype['isDeleted'] = undefined;
|
|
499
|
+
var _default = exports.default = WorkItemApiResult;
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
* Enum class WorkItemEntityTypeApiModel.
|
|
24
|
+
* @enum {}
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
class WorkItemEntityTypeApiModel {
|
|
28
|
+
/**
|
|
29
|
+
* value: "TestCases"
|
|
30
|
+
* @const
|
|
31
|
+
*/
|
|
32
|
+
"TestCases" = "TestCases";
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* value: "CheckLists"
|
|
36
|
+
* @const
|
|
37
|
+
*/
|
|
38
|
+
"CheckLists" = "CheckLists";
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* value: "SharedSteps"
|
|
42
|
+
* @const
|
|
43
|
+
*/
|
|
44
|
+
"SharedSteps" = "SharedSteps";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Returns a <code>WorkItemEntityTypeApiModel</code> enum value from a Javascript object name.
|
|
48
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
49
|
+
* @return {module:model/WorkItemEntityTypeApiModel} The enum <code>WorkItemEntityTypeApiModel</code> value.
|
|
50
|
+
*/
|
|
51
|
+
static constructFromObject(object) {
|
|
52
|
+
return object;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.default = WorkItemEntityTypeApiModel;
|