testit-js-commons 5.0.6 → 5.0.8-TMS-5.8
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 +5 -6
- package/lib/adapters-api/dist/api/AttachmentsApi.js +5 -5
- package/lib/adapters-api/dist/api/AutoTestsApi.js +11 -11
- package/lib/adapters-api/dist/api/ConfigurationsApi.js +1 -1
- package/lib/adapters-api/dist/api/ParametersApi.js +3 -3
- package/lib/adapters-api/dist/api/ProjectAttributesApi.js +6 -6
- package/lib/adapters-api/dist/api/ProjectSectionsApi.js +1 -1
- package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +1 -1
- package/lib/adapters-api/dist/api/ProjectsApi.js +4 -4
- package/lib/adapters-api/dist/api/SectionsApi.js +2 -2
- package/lib/adapters-api/dist/api/TestResultsApi.js +3 -3
- package/lib/adapters-api/dist/api/TestRunsApi.js +8 -8
- package/lib/adapters-api/dist/api/WorkItemsApi.js +3 -3
- package/lib/adapters-api/dist/api/WorkflowsApi.js +1 -1
- package/lib/adapters-api/dist/index.js +3 -80
- package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +1 -1
- package/lib/adapters-api/dist/model/AutoTestApiResult.js +0 -15
- package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +0 -15
- package/lib/adapters-api/dist/model/AutoTestStepResult.js +1 -1
- package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +1 -1
- package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +4 -30
- package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +2 -2
- package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +6 -56
- package/lib/adapters-api/dist/model/{CustomAttributeModel.js → CustomAttributeGetModel.js} +39 -89
- package/lib/adapters-api/dist/model/CustomAttributePutModel.js +1 -1
- package/lib/adapters-api/dist/model/LabelApiModel.js +15 -4
- package/lib/adapters-api/dist/model/ProjectsFilterModel.js +13 -13
- package/lib/adapters-api/dist/model/TestResultResponse.js +4 -18
- package/lib/adapters-api/dist/model/TestResultShortResponse.js +4 -15
- package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +0 -14
- package/lib/adapters-api/dist/model/TestRunApiResult.js +4 -45
- package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +1 -1
- package/lib/adapters-api/index.d.ts +204 -758
- package/lib/common/index.d.ts +0 -1
- package/lib/common/index.js +0 -1
- package/lib/common/types/common.type.d.ts +0 -2
- package/lib/common/utils/tms-load-test-run-debug.d.ts +0 -2
- package/lib/common/utils/tms-load-test-run-debug.js +0 -6
- package/lib/services/attachments/attachments.service.d.ts +1 -0
- package/lib/services/attachments/attachments.service.js +10 -2
- package/lib/services/autotests/autotests.converter.d.ts +2 -6
- package/lib/services/autotests/autotests.converter.js +16 -41
- package/lib/services/autotests/autotests.service.js +3 -3
- package/lib/services/autotests/autotests.type.d.ts +0 -2
- package/lib/services/syncstorage/syncstorage.runner.js +5 -6
- package/lib/services/syncstorage/syncstorage.runner.test.js +0 -16
- package/lib/services/testresults/testresults.converter.d.ts +5 -4
- package/lib/services/testresults/testresults.converter.js +8 -0
- package/lib/services/testresults/testresults.service.js +18 -1
- package/lib/services/testruns/testruns.handler.d.ts +2 -2
- package/lib/services/testruns/testruns.handler.js +2 -12
- package/lib/services/testruns/testruns.service.d.ts +0 -2
- package/lib/services/testruns/testruns.service.js +6 -31
- package/lib/services/testruns/testruns.service.test.js +47 -5
- package/lib/strategy/base.strategy.d.ts +11 -0
- package/lib/strategy/base.strategy.js +73 -4
- package/lib/strategy/zero.strategy.js +1 -1
- package/lib/sync-storage/dist/ApiClient.js +0 -3
- package/package.json +1 -1
- package/lib/adapters-api/dist/api/CustomAttributesApi.js +0 -201
- package/lib/adapters-api/dist/model/CustomAttributeOptionPostApiModel.js +0 -98
- package/lib/adapters-api/dist/model/CustomAttributeOptionUpdateApiModel.js +0 -124
- package/lib/adapters-api/dist/model/CustomAttributeSearchApiModel.js +0 -137
- package/lib/adapters-api/dist/model/CustomAttributeSearchApiResult.js +0 -281
- package/lib/adapters-api/dist/model/GlobalCustomAttributePostApiModel.js +0 -141
- package/lib/adapters-api/dist/model/GlobalCustomAttributeUpdateApiModel.js +0 -129
- package/lib/adapters-api/dist/model/LayerApiModel.js +0 -102
- package/lib/adapters-api/dist/model/LayerApiResult.js +0 -102
- package/lib/adapters-api/dist/model/LayerSource.js +0 -61
- package/lib/adapters-api/dist/model/ProjectShortestApiResult.js +0 -138
- package/lib/common/test-layers.d.ts +0 -11
- package/lib/common/test-layers.js +0 -13
- package/lib/services/autotests/autotests.converter.test.d.ts +0 -1
- package/lib/services/autotests/autotests.converter.test.js +0 -39
|
@@ -7,7 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AutoTestStepApiResult = _interopRequireDefault(require("./AutoTestStepApiResult"));
|
|
9
9
|
var _LabelApiResult = _interopRequireDefault(require("./LabelApiResult"));
|
|
10
|
-
var _LayerApiResult = _interopRequireDefault(require("./LayerApiResult"));
|
|
11
10
|
var _LinkApiResult = _interopRequireDefault(require("./LinkApiResult"));
|
|
12
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
12
|
/**
|
|
@@ -107,9 +106,6 @@ class AutoTestApiResult {
|
|
|
107
106
|
if (data.hasOwnProperty('globalId')) {
|
|
108
107
|
obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
|
|
109
108
|
}
|
|
110
|
-
if (data.hasOwnProperty('layer')) {
|
|
111
|
-
obj['layer'] = _ApiClient.default.convertToType(data['layer'], _LayerApiResult.default);
|
|
112
|
-
}
|
|
113
109
|
if (data.hasOwnProperty('links')) {
|
|
114
110
|
obj['links'] = _ApiClient.default.convertToType(data['links'], [_LinkApiResult.default]);
|
|
115
111
|
}
|
|
@@ -207,11 +203,6 @@ class AutoTestApiResult {
|
|
|
207
203
|
if (data['externalKey'] && !(typeof data['externalKey'] === 'string' || data['externalKey'] instanceof String)) {
|
|
208
204
|
throw new Error("Expected the field `externalKey` to be a primitive type in the JSON string but got " + data['externalKey']);
|
|
209
205
|
}
|
|
210
|
-
// validate the optional field `layer`
|
|
211
|
-
if (data['layer']) {
|
|
212
|
-
// data not null
|
|
213
|
-
_LayerApiResult.default.validateJSON(data['layer']);
|
|
214
|
-
}
|
|
215
206
|
if (data['links']) {
|
|
216
207
|
// data not null
|
|
217
208
|
// ensure the json data is an array
|
|
@@ -315,12 +306,6 @@ AutoTestApiResult.prototype['externalKey'] = undefined;
|
|
|
315
306
|
*/
|
|
316
307
|
AutoTestApiResult.prototype['globalId'] = undefined;
|
|
317
308
|
|
|
318
|
-
/**
|
|
319
|
-
* Model of auto test layer for use in responses.
|
|
320
|
-
* @member {module:model/LayerApiResult} layer
|
|
321
|
-
*/
|
|
322
|
-
AutoTestApiResult.prototype['layer'] = undefined;
|
|
323
|
-
|
|
324
309
|
/**
|
|
325
310
|
* @member {Array.<module:model/LinkApiResult>} links
|
|
326
311
|
*/
|
|
@@ -7,7 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AutoTestStepApiModel = _interopRequireDefault(require("./AutoTestStepApiModel"));
|
|
9
9
|
var _LabelApiModel = _interopRequireDefault(require("./LabelApiModel"));
|
|
10
|
-
var _LayerApiModel = _interopRequireDefault(require("./LayerApiModel"));
|
|
11
10
|
var _LinkCreateApiModel = _interopRequireDefault(require("./LinkCreateApiModel"));
|
|
12
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
12
|
/**
|
|
@@ -88,9 +87,6 @@ class AutoTestCreateApiModel {
|
|
|
88
87
|
if (data.hasOwnProperty('isFlaky')) {
|
|
89
88
|
obj['isFlaky'] = _ApiClient.default.convertToType(data['isFlaky'], 'Boolean');
|
|
90
89
|
}
|
|
91
|
-
if (data.hasOwnProperty('layer')) {
|
|
92
|
-
obj['layer'] = _ApiClient.default.convertToType(data['layer'], _LayerApiModel.default);
|
|
93
|
-
}
|
|
94
90
|
if (data.hasOwnProperty('steps')) {
|
|
95
91
|
obj['steps'] = _ApiClient.default.convertToType(data['steps'], [_AutoTestStepApiModel.default]);
|
|
96
92
|
}
|
|
@@ -160,11 +156,6 @@ class AutoTestCreateApiModel {
|
|
|
160
156
|
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
161
157
|
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
162
158
|
}
|
|
163
|
-
// validate the optional field `layer`
|
|
164
|
-
if (data['layer']) {
|
|
165
|
-
// data not null
|
|
166
|
-
_LayerApiModel.default.validateJSON(data['layer']);
|
|
167
|
-
}
|
|
168
159
|
if (data['steps']) {
|
|
169
160
|
// data not null
|
|
170
161
|
// ensure the json data is an array
|
|
@@ -288,12 +279,6 @@ AutoTestCreateApiModel.prototype['description'] = undefined;
|
|
|
288
279
|
*/
|
|
289
280
|
AutoTestCreateApiModel.prototype['isFlaky'] = undefined;
|
|
290
281
|
|
|
291
|
-
/**
|
|
292
|
-
* Layer of the autotest. Assigns layer by rules if omitted.
|
|
293
|
-
* @member {module:model/LayerApiModel} layer
|
|
294
|
-
*/
|
|
295
|
-
AutoTestCreateApiModel.prototype['layer'] = undefined;
|
|
296
|
-
|
|
297
282
|
/**
|
|
298
283
|
* Collection of the autotest steps
|
|
299
284
|
* @member {Array.<module:model/AutoTestStepApiModel>} steps
|
|
@@ -183,7 +183,7 @@ AutoTestStepResult.prototype['outcome'] = undefined;
|
|
|
183
183
|
AutoTestStepResult.prototype['stepResults'] = undefined;
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
|
-
* /// <summary>
|
|
186
|
+
* /// <summary> Specifies an attachment GUID. Multiple values can be sent. </summary>
|
|
187
187
|
* @member {Array.<module:model/AttachmentApiResult>} attachments
|
|
188
188
|
*/
|
|
189
189
|
AutoTestStepResult.prototype['attachments'] = undefined;
|
|
@@ -183,7 +183,7 @@ AutoTestStepResultUpdateRequest.prototype['outcome'] = undefined;
|
|
|
183
183
|
AutoTestStepResultUpdateRequest.prototype['stepResults'] = undefined;
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
|
-
* /// <summary>
|
|
186
|
+
* /// <summary> Specifies an attachment GUID. Multiple values can be sent. </summary>
|
|
187
187
|
* @member {Array.<module:model/AttachmentUpdateRequest>} attachments
|
|
188
188
|
*/
|
|
189
189
|
AutoTestStepResultUpdateRequest.prototype['attachments'] = undefined;
|
|
@@ -7,7 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AutoTestStepApiModel = _interopRequireDefault(require("./AutoTestStepApiModel"));
|
|
9
9
|
var _LabelApiModel = _interopRequireDefault(require("./LabelApiModel"));
|
|
10
|
-
var _LayerApiModel = _interopRequireDefault(require("./LayerApiModel"));
|
|
11
10
|
var _LinkUpdateApiModel = _interopRequireDefault(require("./LinkUpdateApiModel"));
|
|
12
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
12
|
/**
|
|
@@ -35,10 +34,9 @@ class AutoTestUpdateApiModel {
|
|
|
35
34
|
* @param projectId {String} Unique ID of the autotest project
|
|
36
35
|
* @param externalId {String} External ID of the autotest
|
|
37
36
|
* @param name {String} Name of the autotest
|
|
38
|
-
* @param resetLayer {Boolean} Indicates if the autotest layer should be reset.
|
|
39
37
|
*/
|
|
40
|
-
constructor(projectId, externalId, name
|
|
41
|
-
AutoTestUpdateApiModel.initialize(this, projectId, externalId, name
|
|
38
|
+
constructor(projectId, externalId, name) {
|
|
39
|
+
AutoTestUpdateApiModel.initialize(this, projectId, externalId, name);
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
/**
|
|
@@ -46,11 +44,10 @@ class AutoTestUpdateApiModel {
|
|
|
46
44
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
45
|
* Only for internal use.
|
|
48
46
|
*/
|
|
49
|
-
static initialize(obj, projectId, externalId, name
|
|
47
|
+
static initialize(obj, projectId, externalId, name) {
|
|
50
48
|
obj['projectId'] = projectId;
|
|
51
49
|
obj['externalId'] = externalId;
|
|
52
50
|
obj['name'] = name;
|
|
53
|
-
obj['resetLayer'] = resetLayer;
|
|
54
51
|
}
|
|
55
52
|
|
|
56
53
|
/**
|
|
@@ -93,12 +90,6 @@ class AutoTestUpdateApiModel {
|
|
|
93
90
|
if (data.hasOwnProperty('isFlaky')) {
|
|
94
91
|
obj['isFlaky'] = _ApiClient.default.convertToType(data['isFlaky'], 'Boolean');
|
|
95
92
|
}
|
|
96
|
-
if (data.hasOwnProperty('layer')) {
|
|
97
|
-
obj['layer'] = _ApiClient.default.convertToType(data['layer'], _LayerApiModel.default);
|
|
98
|
-
}
|
|
99
|
-
if (data.hasOwnProperty('resetLayer')) {
|
|
100
|
-
obj['resetLayer'] = _ApiClient.default.convertToType(data['resetLayer'], 'Boolean');
|
|
101
|
-
}
|
|
102
93
|
if (data.hasOwnProperty('steps')) {
|
|
103
94
|
obj['steps'] = _ApiClient.default.convertToType(data['steps'], [_AutoTestStepApiModel.default]);
|
|
104
95
|
}
|
|
@@ -169,11 +160,6 @@ class AutoTestUpdateApiModel {
|
|
|
169
160
|
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
170
161
|
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
171
162
|
}
|
|
172
|
-
// validate the optional field `layer`
|
|
173
|
-
if (data['layer']) {
|
|
174
|
-
// data not null
|
|
175
|
-
_LayerApiModel.default.validateJSON(data['layer']);
|
|
176
|
-
}
|
|
177
163
|
if (data['steps']) {
|
|
178
164
|
// data not null
|
|
179
165
|
// ensure the json data is an array
|
|
@@ -241,7 +227,7 @@ class AutoTestUpdateApiModel {
|
|
|
241
227
|
return true;
|
|
242
228
|
}
|
|
243
229
|
}
|
|
244
|
-
AutoTestUpdateApiModel.RequiredProperties = ["projectId", "externalId", "name"
|
|
230
|
+
AutoTestUpdateApiModel.RequiredProperties = ["projectId", "externalId", "name"];
|
|
245
231
|
|
|
246
232
|
/**
|
|
247
233
|
* Autotest unique internal identifier
|
|
@@ -303,18 +289,6 @@ AutoTestUpdateApiModel.prototype['description'] = undefined;
|
|
|
303
289
|
*/
|
|
304
290
|
AutoTestUpdateApiModel.prototype['isFlaky'] = undefined;
|
|
305
291
|
|
|
306
|
-
/**
|
|
307
|
-
* Layer of the autotest. Assigns layer by rules if omitted.
|
|
308
|
-
* @member {module:model/LayerApiModel} layer
|
|
309
|
-
*/
|
|
310
|
-
AutoTestUpdateApiModel.prototype['layer'] = undefined;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Indicates if the autotest layer should be reset.
|
|
314
|
-
* @member {Boolean} resetLayer
|
|
315
|
-
*/
|
|
316
|
-
AutoTestUpdateApiModel.prototype['resetLayer'] = undefined;
|
|
317
|
-
|
|
318
292
|
/**
|
|
319
293
|
* Collection of the autotest steps
|
|
320
294
|
* @member {Array.<module:model/AutoTestStepApiModel>} steps
|
|
@@ -30,7 +30,7 @@ class CreateEmptyTestRunApiModel {
|
|
|
30
30
|
/**
|
|
31
31
|
* Constructs a new <code>CreateEmptyTestRunApiModel</code>.
|
|
32
32
|
* @alias module:model/CreateEmptyTestRunApiModel
|
|
33
|
-
* @param projectId {String} Project unique identifier
|
|
33
|
+
* @param projectId {String} Project unique identifier This property is to link test run with a project
|
|
34
34
|
*/
|
|
35
35
|
constructor(projectId) {
|
|
36
36
|
CreateEmptyTestRunApiModel.initialize(this, projectId);
|
|
@@ -142,7 +142,7 @@ class CreateEmptyTestRunApiModel {
|
|
|
142
142
|
CreateEmptyTestRunApiModel.RequiredProperties = ["projectId"];
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
|
-
* Project unique identifier
|
|
145
|
+
* Project unique identifier This property is to link test run with a project
|
|
146
146
|
* @member {String} projectId
|
|
147
147
|
*/
|
|
148
148
|
CreateEmptyTestRunApiModel.prototype['projectId'] = undefined;
|
|
@@ -31,19 +31,16 @@ class CustomAttributeApiResult {
|
|
|
31
31
|
* Constructs a new <code>CustomAttributeApiResult</code>.
|
|
32
32
|
* @alias module:model/CustomAttributeApiResult
|
|
33
33
|
* @param id {String} Unique ID of the attribute
|
|
34
|
-
* @param options {Array.<module:model/CustomAttributeOptionApiResult>} Collection of the attribute options
|
|
34
|
+
* @param options {Array.<module:model/CustomAttributeOptionApiResult>} Collection of the attribute options Available for attributes of type `options` and `multiple options` only
|
|
35
35
|
* @param type {module:model/CustomAttributeType} Type of the attribute
|
|
36
36
|
* @param isDeleted {Boolean} Indicates if the attribute is deleted
|
|
37
37
|
* @param name {String} Name of the attribute
|
|
38
38
|
* @param isEnabled {Boolean} Indicates if the attribute is enabled
|
|
39
39
|
* @param isRequired {Boolean} Indicates if the attribute value is mandatory to specify
|
|
40
40
|
* @param isGlobal {Boolean} Indicates if the attribute is available across all projects
|
|
41
|
-
* @param isReadOnly {Boolean} Indicates if the attribute is read-only
|
|
42
|
-
* @param isSystem {Boolean} Indicates if the attribute is system
|
|
43
|
-
* @param targets {Array.<String>} Collection of the attribute targets Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans)
|
|
44
41
|
*/
|
|
45
|
-
constructor(id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal
|
|
46
|
-
CustomAttributeApiResult.initialize(this, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal
|
|
42
|
+
constructor(id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal) {
|
|
43
|
+
CustomAttributeApiResult.initialize(this, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal);
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
/**
|
|
@@ -51,7 +48,7 @@ class CustomAttributeApiResult {
|
|
|
51
48
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
49
|
* Only for internal use.
|
|
53
50
|
*/
|
|
54
|
-
static initialize(obj, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal
|
|
51
|
+
static initialize(obj, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal) {
|
|
55
52
|
obj['id'] = id;
|
|
56
53
|
obj['options'] = options;
|
|
57
54
|
obj['type'] = type;
|
|
@@ -60,9 +57,6 @@ class CustomAttributeApiResult {
|
|
|
60
57
|
obj['isEnabled'] = isEnabled;
|
|
61
58
|
obj['isRequired'] = isRequired;
|
|
62
59
|
obj['isGlobal'] = isGlobal;
|
|
63
|
-
obj['isReadOnly'] = isReadOnly;
|
|
64
|
-
obj['isSystem'] = isSystem;
|
|
65
|
-
obj['targets'] = targets;
|
|
66
60
|
}
|
|
67
61
|
|
|
68
62
|
/**
|
|
@@ -78,9 +72,6 @@ class CustomAttributeApiResult {
|
|
|
78
72
|
if (data.hasOwnProperty('id')) {
|
|
79
73
|
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
80
74
|
}
|
|
81
|
-
if (data.hasOwnProperty('code')) {
|
|
82
|
-
obj['code'] = _ApiClient.default.convertToType(data['code'], 'String');
|
|
83
|
-
}
|
|
84
75
|
if (data.hasOwnProperty('options')) {
|
|
85
76
|
obj['options'] = _ApiClient.default.convertToType(data['options'], [_CustomAttributeOptionApiResult.default]);
|
|
86
77
|
}
|
|
@@ -102,15 +93,6 @@ class CustomAttributeApiResult {
|
|
|
102
93
|
if (data.hasOwnProperty('isGlobal')) {
|
|
103
94
|
obj['isGlobal'] = _ApiClient.default.convertToType(data['isGlobal'], 'Boolean');
|
|
104
95
|
}
|
|
105
|
-
if (data.hasOwnProperty('isReadOnly')) {
|
|
106
|
-
obj['isReadOnly'] = _ApiClient.default.convertToType(data['isReadOnly'], 'Boolean');
|
|
107
|
-
}
|
|
108
|
-
if (data.hasOwnProperty('isSystem')) {
|
|
109
|
-
obj['isSystem'] = _ApiClient.default.convertToType(data['isSystem'], 'Boolean');
|
|
110
|
-
}
|
|
111
|
-
if (data.hasOwnProperty('targets')) {
|
|
112
|
-
obj['targets'] = _ApiClient.default.convertToType(data['targets'], ['String']);
|
|
113
|
-
}
|
|
114
96
|
}
|
|
115
97
|
return obj;
|
|
116
98
|
}
|
|
@@ -131,10 +113,6 @@ class CustomAttributeApiResult {
|
|
|
131
113
|
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
132
114
|
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
133
115
|
}
|
|
134
|
-
// ensure the json data is a string
|
|
135
|
-
if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) {
|
|
136
|
-
throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']);
|
|
137
|
-
}
|
|
138
116
|
if (data['options']) {
|
|
139
117
|
// data not null
|
|
140
118
|
// ensure the json data is an array
|
|
@@ -151,14 +129,10 @@ class CustomAttributeApiResult {
|
|
|
151
129
|
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
152
130
|
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
153
131
|
}
|
|
154
|
-
// ensure the json data is an array
|
|
155
|
-
if (!Array.isArray(data['targets'])) {
|
|
156
|
-
throw new Error("Expected the field `targets` to be an array in the JSON data but got " + data['targets']);
|
|
157
|
-
}
|
|
158
132
|
return true;
|
|
159
133
|
}
|
|
160
134
|
}
|
|
161
|
-
CustomAttributeApiResult.RequiredProperties = ["id", "options", "type", "isDeleted", "name", "isEnabled", "isRequired", "isGlobal"
|
|
135
|
+
CustomAttributeApiResult.RequiredProperties = ["id", "options", "type", "isDeleted", "name", "isEnabled", "isRequired", "isGlobal"];
|
|
162
136
|
|
|
163
137
|
/**
|
|
164
138
|
* Unique ID of the attribute
|
|
@@ -167,13 +141,7 @@ CustomAttributeApiResult.RequiredProperties = ["id", "options", "type", "isDelet
|
|
|
167
141
|
CustomAttributeApiResult.prototype['id'] = undefined;
|
|
168
142
|
|
|
169
143
|
/**
|
|
170
|
-
*
|
|
171
|
-
* @member {String} code
|
|
172
|
-
*/
|
|
173
|
-
CustomAttributeApiResult.prototype['code'] = undefined;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Collection of the attribute options Available for attributes of type `options` and `multiple options` only
|
|
144
|
+
* Collection of the attribute options Available for attributes of type `options` and `multiple options` only
|
|
177
145
|
* @member {Array.<module:model/CustomAttributeOptionApiResult>} options
|
|
178
146
|
*/
|
|
179
147
|
CustomAttributeApiResult.prototype['options'] = undefined;
|
|
@@ -213,22 +181,4 @@ CustomAttributeApiResult.prototype['isRequired'] = undefined;
|
|
|
213
181
|
* @member {Boolean} isGlobal
|
|
214
182
|
*/
|
|
215
183
|
CustomAttributeApiResult.prototype['isGlobal'] = undefined;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Indicates if the attribute is read-only
|
|
219
|
-
* @member {Boolean} isReadOnly
|
|
220
|
-
*/
|
|
221
|
-
CustomAttributeApiResult.prototype['isReadOnly'] = undefined;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Indicates if the attribute is system
|
|
225
|
-
* @member {Boolean} isSystem
|
|
226
|
-
*/
|
|
227
|
-
CustomAttributeApiResult.prototype['isSystem'] = undefined;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Collection of the attribute targets Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans)
|
|
231
|
-
* @member {Array.<String>} targets
|
|
232
|
-
*/
|
|
233
|
-
CustomAttributeApiResult.prototype['targets'] = undefined;
|
|
234
184
|
var _default = exports.default = CustomAttributeApiResult;
|
|
@@ -22,28 +22,25 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* The
|
|
26
|
-
* @module model/
|
|
25
|
+
* The CustomAttributeGetModel model module.
|
|
26
|
+
* @module model/CustomAttributeGetModel
|
|
27
27
|
* @version 1.0.0
|
|
28
28
|
*/
|
|
29
|
-
class
|
|
29
|
+
class CustomAttributeGetModel {
|
|
30
30
|
/**
|
|
31
|
-
* Constructs a new <code>
|
|
32
|
-
* @alias module:model/
|
|
33
|
-
* @param id {String} Unique ID of the attribute
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @param isReadOnly {Boolean} Indicates if the attribute is read-only.
|
|
38
|
-
* @param isDeleted {Boolean} Indicates if the attribute is deleted.
|
|
39
|
-
* @param isSystem {Boolean} Indicates if the attribute is system.
|
|
31
|
+
* Constructs a new <code>CustomAttributeGetModel</code>.
|
|
32
|
+
* @alias module:model/CustomAttributeGetModel
|
|
33
|
+
* @param id {String} Unique ID of the attribute
|
|
34
|
+
* @param options {Array.<module:model/CustomAttributeOptionModel>} Collection of the attribute options
|
|
35
|
+
* @param type {module:model/CustomAttributeTypesEnum} Type of the attribute
|
|
36
|
+
* @param isDeleted {Boolean} Indicates if the attribute is deleted
|
|
40
37
|
* @param name {String} Name of the attribute
|
|
41
38
|
* @param isEnabled {Boolean} Indicates if the attribute is enabled
|
|
42
|
-
* @param isRequired {Boolean} Indicates if the attribute
|
|
39
|
+
* @param isRequired {Boolean} Indicates if the attribute is mandatory to specify
|
|
43
40
|
* @param isGlobal {Boolean} Indicates if the attribute is available across all projects
|
|
44
41
|
*/
|
|
45
|
-
constructor(id,
|
|
46
|
-
|
|
42
|
+
constructor(id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal) {
|
|
43
|
+
CustomAttributeGetModel.initialize(this, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal);
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
/**
|
|
@@ -51,14 +48,11 @@ class CustomAttributeModel {
|
|
|
51
48
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
49
|
* Only for internal use.
|
|
53
50
|
*/
|
|
54
|
-
static initialize(obj, id,
|
|
51
|
+
static initialize(obj, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal) {
|
|
55
52
|
obj['id'] = id;
|
|
56
|
-
obj['type'] = type;
|
|
57
53
|
obj['options'] = options;
|
|
58
|
-
obj['
|
|
59
|
-
obj['isReadOnly'] = isReadOnly;
|
|
54
|
+
obj['type'] = type;
|
|
60
55
|
obj['isDeleted'] = isDeleted;
|
|
61
|
-
obj['isSystem'] = isSystem;
|
|
62
56
|
obj['name'] = name;
|
|
63
57
|
obj['isEnabled'] = isEnabled;
|
|
64
58
|
obj['isRequired'] = isRequired;
|
|
@@ -66,39 +60,27 @@ class CustomAttributeModel {
|
|
|
66
60
|
}
|
|
67
61
|
|
|
68
62
|
/**
|
|
69
|
-
* Constructs a <code>
|
|
63
|
+
* Constructs a <code>CustomAttributeGetModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
70
64
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
71
65
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
-
* @param {module:model/
|
|
73
|
-
* @return {module:model/
|
|
66
|
+
* @param {module:model/CustomAttributeGetModel} obj Optional instance to populate.
|
|
67
|
+
* @return {module:model/CustomAttributeGetModel} The populated <code>CustomAttributeGetModel</code> instance.
|
|
74
68
|
*/
|
|
75
69
|
static constructFromObject(data, obj) {
|
|
76
70
|
if (data) {
|
|
77
|
-
obj = obj || new
|
|
71
|
+
obj = obj || new CustomAttributeGetModel();
|
|
78
72
|
if (data.hasOwnProperty('id')) {
|
|
79
73
|
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
80
74
|
}
|
|
81
|
-
if (data.hasOwnProperty('code')) {
|
|
82
|
-
obj['code'] = _ApiClient.default.convertToType(data['code'], 'String');
|
|
83
|
-
}
|
|
84
|
-
if (data.hasOwnProperty('type')) {
|
|
85
|
-
obj['type'] = _ApiClient.default.convertToType(data['type'], _CustomAttributeTypesEnum.default);
|
|
86
|
-
}
|
|
87
75
|
if (data.hasOwnProperty('options')) {
|
|
88
76
|
obj['options'] = _ApiClient.default.convertToType(data['options'], [_CustomAttributeOptionModel.default]);
|
|
89
77
|
}
|
|
90
|
-
if (data.hasOwnProperty('
|
|
91
|
-
obj['
|
|
92
|
-
}
|
|
93
|
-
if (data.hasOwnProperty('isReadOnly')) {
|
|
94
|
-
obj['isReadOnly'] = _ApiClient.default.convertToType(data['isReadOnly'], 'Boolean');
|
|
78
|
+
if (data.hasOwnProperty('type')) {
|
|
79
|
+
obj['type'] = _ApiClient.default.convertToType(data['type'], _CustomAttributeTypesEnum.default);
|
|
95
80
|
}
|
|
96
81
|
if (data.hasOwnProperty('isDeleted')) {
|
|
97
82
|
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
98
83
|
}
|
|
99
|
-
if (data.hasOwnProperty('isSystem')) {
|
|
100
|
-
obj['isSystem'] = _ApiClient.default.convertToType(data['isSystem'], 'Boolean');
|
|
101
|
-
}
|
|
102
84
|
if (data.hasOwnProperty('name')) {
|
|
103
85
|
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
104
86
|
}
|
|
@@ -116,13 +98,13 @@ class CustomAttributeModel {
|
|
|
116
98
|
}
|
|
117
99
|
|
|
118
100
|
/**
|
|
119
|
-
* Validates the JSON data with respect to <code>
|
|
101
|
+
* Validates the JSON data with respect to <code>CustomAttributeGetModel</code>.
|
|
120
102
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
121
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
103
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeGetModel</code>.
|
|
122
104
|
*/
|
|
123
105
|
static validateJSON(data) {
|
|
124
106
|
// check to make sure all required properties are present in the JSON string
|
|
125
|
-
for (const property of
|
|
107
|
+
for (const property of CustomAttributeGetModel.RequiredProperties) {
|
|
126
108
|
if (!data.hasOwnProperty(property)) {
|
|
127
109
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
128
110
|
}
|
|
@@ -131,10 +113,6 @@ class CustomAttributeModel {
|
|
|
131
113
|
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
132
114
|
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
133
115
|
}
|
|
134
|
-
// ensure the json data is a string
|
|
135
|
-
if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) {
|
|
136
|
-
throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']);
|
|
137
|
-
}
|
|
138
116
|
if (data['options']) {
|
|
139
117
|
// data not null
|
|
140
118
|
// ensure the json data is an array
|
|
@@ -147,10 +125,6 @@ class CustomAttributeModel {
|
|
|
147
125
|
}
|
|
148
126
|
;
|
|
149
127
|
}
|
|
150
|
-
// ensure the json data is an array
|
|
151
|
-
if (!Array.isArray(data['targets'])) {
|
|
152
|
-
throw new Error("Expected the field `targets` to be an array in the JSON data but got " + data['targets']);
|
|
153
|
-
}
|
|
154
128
|
// ensure the json data is a string
|
|
155
129
|
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
156
130
|
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
@@ -158,77 +132,53 @@ class CustomAttributeModel {
|
|
|
158
132
|
return true;
|
|
159
133
|
}
|
|
160
134
|
}
|
|
161
|
-
|
|
135
|
+
CustomAttributeGetModel.RequiredProperties = ["id", "options", "type", "isDeleted", "name", "isEnabled", "isRequired", "isGlobal"];
|
|
162
136
|
|
|
163
137
|
/**
|
|
164
|
-
* Unique ID of the attribute
|
|
138
|
+
* Unique ID of the attribute
|
|
165
139
|
* @member {String} id
|
|
166
140
|
*/
|
|
167
|
-
|
|
141
|
+
CustomAttributeGetModel.prototype['id'] = undefined;
|
|
168
142
|
|
|
169
143
|
/**
|
|
170
|
-
*
|
|
171
|
-
* @member {String} code
|
|
172
|
-
*/
|
|
173
|
-
CustomAttributeModel.prototype['code'] = undefined;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Type of the attribute.
|
|
177
|
-
* @member {module:model/CustomAttributeTypesEnum} type
|
|
178
|
-
*/
|
|
179
|
-
CustomAttributeModel.prototype['type'] = undefined;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Collection of the attribute options.
|
|
144
|
+
* Collection of the attribute options
|
|
183
145
|
* @member {Array.<module:model/CustomAttributeOptionModel>} options
|
|
184
146
|
*/
|
|
185
|
-
|
|
147
|
+
CustomAttributeGetModel.prototype['options'] = undefined;
|
|
186
148
|
|
|
187
149
|
/**
|
|
188
|
-
*
|
|
189
|
-
* @member {
|
|
190
|
-
*/
|
|
191
|
-
CustomAttributeModel.prototype['targets'] = undefined;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Indicates if the attribute is read-only.
|
|
195
|
-
* @member {Boolean} isReadOnly
|
|
150
|
+
* Type of the attribute
|
|
151
|
+
* @member {module:model/CustomAttributeTypesEnum} type
|
|
196
152
|
*/
|
|
197
|
-
|
|
153
|
+
CustomAttributeGetModel.prototype['type'] = undefined;
|
|
198
154
|
|
|
199
155
|
/**
|
|
200
|
-
* Indicates if the attribute is deleted
|
|
156
|
+
* Indicates if the attribute is deleted
|
|
201
157
|
* @member {Boolean} isDeleted
|
|
202
158
|
*/
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Indicates if the attribute is system.
|
|
207
|
-
* @member {Boolean} isSystem
|
|
208
|
-
*/
|
|
209
|
-
CustomAttributeModel.prototype['isSystem'] = undefined;
|
|
159
|
+
CustomAttributeGetModel.prototype['isDeleted'] = undefined;
|
|
210
160
|
|
|
211
161
|
/**
|
|
212
162
|
* Name of the attribute
|
|
213
163
|
* @member {String} name
|
|
214
164
|
*/
|
|
215
|
-
|
|
165
|
+
CustomAttributeGetModel.prototype['name'] = undefined;
|
|
216
166
|
|
|
217
167
|
/**
|
|
218
168
|
* Indicates if the attribute is enabled
|
|
219
169
|
* @member {Boolean} isEnabled
|
|
220
170
|
*/
|
|
221
|
-
|
|
171
|
+
CustomAttributeGetModel.prototype['isEnabled'] = undefined;
|
|
222
172
|
|
|
223
173
|
/**
|
|
224
|
-
* Indicates if the attribute
|
|
174
|
+
* Indicates if the attribute is mandatory to specify
|
|
225
175
|
* @member {Boolean} isRequired
|
|
226
176
|
*/
|
|
227
|
-
|
|
177
|
+
CustomAttributeGetModel.prototype['isRequired'] = undefined;
|
|
228
178
|
|
|
229
179
|
/**
|
|
230
180
|
* Indicates if the attribute is available across all projects
|
|
231
181
|
* @member {Boolean} isGlobal
|
|
232
182
|
*/
|
|
233
|
-
|
|
234
|
-
var _default = exports.default =
|
|
183
|
+
CustomAttributeGetModel.prototype['isGlobal'] = undefined;
|
|
184
|
+
var _default = exports.default = CustomAttributeGetModel;
|
|
@@ -139,7 +139,7 @@ CustomAttributePutModel.RequiredProperties = ["id", "type", "isDeleted", "name",
|
|
|
139
139
|
CustomAttributePutModel.prototype['id'] = undefined;
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
* Collection of the attribute options
|
|
142
|
+
* Collection of the attribute options Available for attributes of type `options` and `multiple options` only
|
|
143
143
|
* @member {Array.<module:model/CustomAttributeOptionModel>} options
|
|
144
144
|
*/
|
|
145
145
|
CustomAttributePutModel.prototype['options'] = undefined;
|
|
@@ -29,9 +29,10 @@ class LabelApiModel {
|
|
|
29
29
|
* Constructs a new <code>LabelApiModel</code>.
|
|
30
30
|
* @alias module:model/LabelApiModel
|
|
31
31
|
* @param name {String} Name of the label
|
|
32
|
+
* @param globalId {Number} Global ID of the label
|
|
32
33
|
*/
|
|
33
|
-
constructor(name) {
|
|
34
|
-
LabelApiModel.initialize(this, name);
|
|
34
|
+
constructor(name, globalId) {
|
|
35
|
+
LabelApiModel.initialize(this, name, globalId);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -39,8 +40,9 @@ class LabelApiModel {
|
|
|
39
40
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
40
41
|
* Only for internal use.
|
|
41
42
|
*/
|
|
42
|
-
static initialize(obj, name) {
|
|
43
|
+
static initialize(obj, name, globalId) {
|
|
43
44
|
obj['name'] = name;
|
|
45
|
+
obj['globalId'] = globalId;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
/**
|
|
@@ -56,6 +58,9 @@ class LabelApiModel {
|
|
|
56
58
|
if (data.hasOwnProperty('name')) {
|
|
57
59
|
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
58
60
|
}
|
|
61
|
+
if (data.hasOwnProperty('globalId')) {
|
|
62
|
+
obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
|
|
63
|
+
}
|
|
59
64
|
}
|
|
60
65
|
return obj;
|
|
61
66
|
}
|
|
@@ -79,11 +84,17 @@ class LabelApiModel {
|
|
|
79
84
|
return true;
|
|
80
85
|
}
|
|
81
86
|
}
|
|
82
|
-
LabelApiModel.RequiredProperties = ["name"];
|
|
87
|
+
LabelApiModel.RequiredProperties = ["name", "globalId"];
|
|
83
88
|
|
|
84
89
|
/**
|
|
85
90
|
* Name of the label
|
|
86
91
|
* @member {String} name
|
|
87
92
|
*/
|
|
88
93
|
LabelApiModel.prototype['name'] = undefined;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Global ID of the label
|
|
97
|
+
* @member {Number} globalId
|
|
98
|
+
*/
|
|
99
|
+
LabelApiModel.prototype['globalId'] = undefined;
|
|
89
100
|
var _default = exports.default = LabelApiModel;
|