testit-js-commons 5.0.8-TMS-5.8 → 5.0.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 +6 -5
- 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/CustomAttributesApi.js +201 -0
- 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 +80 -3
- package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +1 -1
- package/lib/adapters-api/dist/model/AutoTestApiResult.js +15 -0
- package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +15 -0
- 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 +30 -4
- package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +2 -2
- package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +56 -6
- package/lib/adapters-api/dist/model/{CustomAttributeGetModel.js → CustomAttributeModel.js} +89 -39
- package/lib/adapters-api/dist/model/CustomAttributeOptionPostApiModel.js +98 -0
- package/lib/adapters-api/dist/model/CustomAttributeOptionUpdateApiModel.js +124 -0
- package/lib/adapters-api/dist/model/CustomAttributePutModel.js +1 -1
- package/lib/adapters-api/dist/model/CustomAttributeSearchApiModel.js +137 -0
- package/lib/adapters-api/dist/model/CustomAttributeSearchApiResult.js +281 -0
- package/lib/adapters-api/dist/model/GlobalCustomAttributePostApiModel.js +141 -0
- package/lib/adapters-api/dist/model/GlobalCustomAttributeUpdateApiModel.js +129 -0
- package/lib/adapters-api/dist/model/LabelApiModel.js +4 -15
- package/lib/adapters-api/dist/model/LayerApiModel.js +102 -0
- package/lib/adapters-api/dist/model/LayerApiResult.js +102 -0
- package/lib/adapters-api/dist/model/LayerSource.js +61 -0
- package/lib/adapters-api/dist/model/ProjectShortestApiResult.js +138 -0
- package/lib/adapters-api/dist/model/ProjectsFilterModel.js +13 -13
- package/lib/adapters-api/dist/model/TestResultResponse.js +18 -4
- package/lib/adapters-api/dist/model/TestResultShortResponse.js +15 -4
- package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +14 -0
- package/lib/adapters-api/dist/model/TestRunApiResult.js +45 -4
- package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +1 -1
- package/lib/adapters-api/index.d.ts +758 -204
- package/lib/common/index.d.ts +1 -0
- package/lib/common/index.js +1 -0
- package/lib/common/test-layers.d.ts +11 -0
- package/lib/common/test-layers.js +13 -0
- package/lib/common/types/common.type.d.ts +6 -0
- package/lib/common/utils/tms-load-test-run-debug.d.ts +2 -0
- package/lib/common/utils/tms-load-test-run-debug.js +6 -0
- package/lib/services/autotests/autotests.converter.d.ts +6 -2
- package/lib/services/autotests/autotests.converter.js +41 -16
- package/lib/services/autotests/autotests.converter.test.d.ts +1 -0
- package/lib/services/autotests/autotests.converter.test.js +39 -0
- package/lib/services/autotests/autotests.service.js +3 -3
- package/lib/services/autotests/autotests.type.d.ts +2 -0
- package/lib/services/syncstorage/syncstorage.runner.js +6 -5
- package/lib/services/syncstorage/syncstorage.runner.test.js +16 -0
- package/lib/services/testruns/testruns.handler.d.ts +2 -2
- package/lib/services/testruns/testruns.handler.js +12 -2
- package/lib/services/testruns/testruns.service.js +21 -6
- package/lib/services/testruns/testruns.service.test.js +0 -43
- package/lib/sync-storage/dist/ApiClient.js +3 -0
- package/package.json +1 -1
|
@@ -22,25 +22,28 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* The
|
|
26
|
-
* @module model/
|
|
25
|
+
* The CustomAttributeModel model module.
|
|
26
|
+
* @module model/CustomAttributeModel
|
|
27
27
|
* @version 1.0.0
|
|
28
28
|
*/
|
|
29
|
-
class
|
|
29
|
+
class CustomAttributeModel {
|
|
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
|
|
31
|
+
* Constructs a new <code>CustomAttributeModel</code>.
|
|
32
|
+
* @alias module:model/CustomAttributeModel
|
|
33
|
+
* @param id {String} Unique ID of the attribute.
|
|
34
|
+
* @param type {module:model/CustomAttributeTypesEnum} Type of the attribute.
|
|
35
|
+
* @param options {Array.<module:model/CustomAttributeOptionModel>} Collection of the attribute options.
|
|
36
|
+
* @param targets {Array.<String>} Collection of the attribute targets. Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans).
|
|
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.
|
|
37
40
|
* @param name {String} Name of the attribute
|
|
38
41
|
* @param isEnabled {Boolean} Indicates if the attribute is enabled
|
|
39
|
-
* @param isRequired {Boolean} Indicates if the attribute is mandatory to specify
|
|
42
|
+
* @param isRequired {Boolean} Indicates if the attribute value is mandatory to specify
|
|
40
43
|
* @param isGlobal {Boolean} Indicates if the attribute is available across all projects
|
|
41
44
|
*/
|
|
42
|
-
constructor(id, options,
|
|
43
|
-
|
|
45
|
+
constructor(id, type, options, targets, isReadOnly, isDeleted, isSystem, name, isEnabled, isRequired, isGlobal) {
|
|
46
|
+
CustomAttributeModel.initialize(this, id, type, options, targets, isReadOnly, isDeleted, isSystem, name, isEnabled, isRequired, isGlobal);
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
/**
|
|
@@ -48,11 +51,14 @@ class CustomAttributeGetModel {
|
|
|
48
51
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
52
|
* Only for internal use.
|
|
50
53
|
*/
|
|
51
|
-
static initialize(obj, id, options,
|
|
54
|
+
static initialize(obj, id, type, options, targets, isReadOnly, isDeleted, isSystem, name, isEnabled, isRequired, isGlobal) {
|
|
52
55
|
obj['id'] = id;
|
|
53
|
-
obj['options'] = options;
|
|
54
56
|
obj['type'] = type;
|
|
57
|
+
obj['options'] = options;
|
|
58
|
+
obj['targets'] = targets;
|
|
59
|
+
obj['isReadOnly'] = isReadOnly;
|
|
55
60
|
obj['isDeleted'] = isDeleted;
|
|
61
|
+
obj['isSystem'] = isSystem;
|
|
56
62
|
obj['name'] = name;
|
|
57
63
|
obj['isEnabled'] = isEnabled;
|
|
58
64
|
obj['isRequired'] = isRequired;
|
|
@@ -60,27 +66,39 @@ class CustomAttributeGetModel {
|
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
/**
|
|
63
|
-
* Constructs a <code>
|
|
69
|
+
* Constructs a <code>CustomAttributeModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
64
70
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
65
71
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
-
* @param {module:model/
|
|
67
|
-
* @return {module:model/
|
|
72
|
+
* @param {module:model/CustomAttributeModel} obj Optional instance to populate.
|
|
73
|
+
* @return {module:model/CustomAttributeModel} The populated <code>CustomAttributeModel</code> instance.
|
|
68
74
|
*/
|
|
69
75
|
static constructFromObject(data, obj) {
|
|
70
76
|
if (data) {
|
|
71
|
-
obj = obj || new
|
|
77
|
+
obj = obj || new CustomAttributeModel();
|
|
72
78
|
if (data.hasOwnProperty('id')) {
|
|
73
79
|
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
74
80
|
}
|
|
75
|
-
if (data.hasOwnProperty('
|
|
76
|
-
obj['
|
|
81
|
+
if (data.hasOwnProperty('code')) {
|
|
82
|
+
obj['code'] = _ApiClient.default.convertToType(data['code'], 'String');
|
|
77
83
|
}
|
|
78
84
|
if (data.hasOwnProperty('type')) {
|
|
79
85
|
obj['type'] = _ApiClient.default.convertToType(data['type'], _CustomAttributeTypesEnum.default);
|
|
80
86
|
}
|
|
87
|
+
if (data.hasOwnProperty('options')) {
|
|
88
|
+
obj['options'] = _ApiClient.default.convertToType(data['options'], [_CustomAttributeOptionModel.default]);
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('targets')) {
|
|
91
|
+
obj['targets'] = _ApiClient.default.convertToType(data['targets'], ['String']);
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('isReadOnly')) {
|
|
94
|
+
obj['isReadOnly'] = _ApiClient.default.convertToType(data['isReadOnly'], 'Boolean');
|
|
95
|
+
}
|
|
81
96
|
if (data.hasOwnProperty('isDeleted')) {
|
|
82
97
|
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
83
98
|
}
|
|
99
|
+
if (data.hasOwnProperty('isSystem')) {
|
|
100
|
+
obj['isSystem'] = _ApiClient.default.convertToType(data['isSystem'], 'Boolean');
|
|
101
|
+
}
|
|
84
102
|
if (data.hasOwnProperty('name')) {
|
|
85
103
|
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
86
104
|
}
|
|
@@ -98,13 +116,13 @@ class CustomAttributeGetModel {
|
|
|
98
116
|
}
|
|
99
117
|
|
|
100
118
|
/**
|
|
101
|
-
* Validates the JSON data with respect to <code>
|
|
119
|
+
* Validates the JSON data with respect to <code>CustomAttributeModel</code>.
|
|
102
120
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
103
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
121
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeModel</code>.
|
|
104
122
|
*/
|
|
105
123
|
static validateJSON(data) {
|
|
106
124
|
// check to make sure all required properties are present in the JSON string
|
|
107
|
-
for (const property of
|
|
125
|
+
for (const property of CustomAttributeModel.RequiredProperties) {
|
|
108
126
|
if (!data.hasOwnProperty(property)) {
|
|
109
127
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
110
128
|
}
|
|
@@ -113,6 +131,10 @@ class CustomAttributeGetModel {
|
|
|
113
131
|
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
114
132
|
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
115
133
|
}
|
|
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
|
+
}
|
|
116
138
|
if (data['options']) {
|
|
117
139
|
// data not null
|
|
118
140
|
// ensure the json data is an array
|
|
@@ -125,6 +147,10 @@ class CustomAttributeGetModel {
|
|
|
125
147
|
}
|
|
126
148
|
;
|
|
127
149
|
}
|
|
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
|
+
}
|
|
128
154
|
// ensure the json data is a string
|
|
129
155
|
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
130
156
|
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
@@ -132,53 +158,77 @@ class CustomAttributeGetModel {
|
|
|
132
158
|
return true;
|
|
133
159
|
}
|
|
134
160
|
}
|
|
135
|
-
|
|
161
|
+
CustomAttributeModel.RequiredProperties = ["id", "type", "options", "targets", "isReadOnly", "isDeleted", "isSystem", "name", "isEnabled", "isRequired", "isGlobal"];
|
|
136
162
|
|
|
137
163
|
/**
|
|
138
|
-
* Unique ID of the attribute
|
|
164
|
+
* Unique ID of the attribute.
|
|
139
165
|
* @member {String} id
|
|
140
166
|
*/
|
|
141
|
-
|
|
167
|
+
CustomAttributeModel.prototype['id'] = undefined;
|
|
142
168
|
|
|
143
169
|
/**
|
|
144
|
-
*
|
|
145
|
-
* @member {
|
|
170
|
+
* Optional code identifier for the attribute.
|
|
171
|
+
* @member {String} code
|
|
146
172
|
*/
|
|
147
|
-
|
|
173
|
+
CustomAttributeModel.prototype['code'] = undefined;
|
|
148
174
|
|
|
149
175
|
/**
|
|
150
|
-
* Type of the attribute
|
|
176
|
+
* Type of the attribute.
|
|
151
177
|
* @member {module:model/CustomAttributeTypesEnum} type
|
|
152
178
|
*/
|
|
153
|
-
|
|
179
|
+
CustomAttributeModel.prototype['type'] = undefined;
|
|
154
180
|
|
|
155
181
|
/**
|
|
156
|
-
*
|
|
182
|
+
* Collection of the attribute options.
|
|
183
|
+
* @member {Array.<module:model/CustomAttributeOptionModel>} options
|
|
184
|
+
*/
|
|
185
|
+
CustomAttributeModel.prototype['options'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Collection of the attribute targets. Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans).
|
|
189
|
+
* @member {Array.<String>} targets
|
|
190
|
+
*/
|
|
191
|
+
CustomAttributeModel.prototype['targets'] = undefined;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Indicates if the attribute is read-only.
|
|
195
|
+
* @member {Boolean} isReadOnly
|
|
196
|
+
*/
|
|
197
|
+
CustomAttributeModel.prototype['isReadOnly'] = undefined;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Indicates if the attribute is deleted.
|
|
157
201
|
* @member {Boolean} isDeleted
|
|
158
202
|
*/
|
|
159
|
-
|
|
203
|
+
CustomAttributeModel.prototype['isDeleted'] = undefined;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Indicates if the attribute is system.
|
|
207
|
+
* @member {Boolean} isSystem
|
|
208
|
+
*/
|
|
209
|
+
CustomAttributeModel.prototype['isSystem'] = undefined;
|
|
160
210
|
|
|
161
211
|
/**
|
|
162
212
|
* Name of the attribute
|
|
163
213
|
* @member {String} name
|
|
164
214
|
*/
|
|
165
|
-
|
|
215
|
+
CustomAttributeModel.prototype['name'] = undefined;
|
|
166
216
|
|
|
167
217
|
/**
|
|
168
218
|
* Indicates if the attribute is enabled
|
|
169
219
|
* @member {Boolean} isEnabled
|
|
170
220
|
*/
|
|
171
|
-
|
|
221
|
+
CustomAttributeModel.prototype['isEnabled'] = undefined;
|
|
172
222
|
|
|
173
223
|
/**
|
|
174
|
-
* Indicates if the attribute is mandatory to specify
|
|
224
|
+
* Indicates if the attribute value is mandatory to specify
|
|
175
225
|
* @member {Boolean} isRequired
|
|
176
226
|
*/
|
|
177
|
-
|
|
227
|
+
CustomAttributeModel.prototype['isRequired'] = undefined;
|
|
178
228
|
|
|
179
229
|
/**
|
|
180
230
|
* Indicates if the attribute is available across all projects
|
|
181
231
|
* @member {Boolean} isGlobal
|
|
182
232
|
*/
|
|
183
|
-
|
|
184
|
-
var _default = exports.default =
|
|
233
|
+
CustomAttributeModel.prototype['isGlobal'] = undefined;
|
|
234
|
+
var _default = exports.default = CustomAttributeModel;
|
|
@@ -0,0 +1,98 @@
|
|
|
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 CustomAttributeOptionPostApiModel model module.
|
|
24
|
+
* @module model/CustomAttributeOptionPostApiModel
|
|
25
|
+
* @version 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
class CustomAttributeOptionPostApiModel {
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>CustomAttributeOptionPostApiModel</code>.
|
|
30
|
+
* @alias module:model/CustomAttributeOptionPostApiModel
|
|
31
|
+
* @param isDefault {Boolean} Indicates if the attribute option is used by default
|
|
32
|
+
*/
|
|
33
|
+
constructor(isDefault) {
|
|
34
|
+
CustomAttributeOptionPostApiModel.initialize(this, isDefault);
|
|
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, isDefault) {
|
|
43
|
+
obj['isDefault'] = isDefault;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Constructs a <code>CustomAttributeOptionPostApiModel</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/CustomAttributeOptionPostApiModel} obj Optional instance to populate.
|
|
51
|
+
* @return {module:model/CustomAttributeOptionPostApiModel} The populated <code>CustomAttributeOptionPostApiModel</code> instance.
|
|
52
|
+
*/
|
|
53
|
+
static constructFromObject(data, obj) {
|
|
54
|
+
if (data) {
|
|
55
|
+
obj = obj || new CustomAttributeOptionPostApiModel();
|
|
56
|
+
if (data.hasOwnProperty('value')) {
|
|
57
|
+
obj['value'] = _ApiClient.default.convertToType(data['value'], 'String');
|
|
58
|
+
}
|
|
59
|
+
if (data.hasOwnProperty('isDefault')) {
|
|
60
|
+
obj['isDefault'] = _ApiClient.default.convertToType(data['isDefault'], 'Boolean');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Validates the JSON data with respect to <code>CustomAttributeOptionPostApiModel</code>.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeOptionPostApiModel</code>.
|
|
70
|
+
*/
|
|
71
|
+
static validateJSON(data) {
|
|
72
|
+
// check to make sure all required properties are present in the JSON string
|
|
73
|
+
for (const property of CustomAttributeOptionPostApiModel.RequiredProperties) {
|
|
74
|
+
if (!data.hasOwnProperty(property)) {
|
|
75
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// ensure the json data is a string
|
|
79
|
+
if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
|
|
80
|
+
throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
CustomAttributeOptionPostApiModel.RequiredProperties = ["isDefault"];
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Value of the attribute option
|
|
89
|
+
* @member {String} value
|
|
90
|
+
*/
|
|
91
|
+
CustomAttributeOptionPostApiModel.prototype['value'] = undefined;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Indicates if the attribute option is used by default
|
|
95
|
+
* @member {Boolean} isDefault
|
|
96
|
+
*/
|
|
97
|
+
CustomAttributeOptionPostApiModel.prototype['isDefault'] = undefined;
|
|
98
|
+
var _default = exports.default = CustomAttributeOptionPostApiModel;
|
|
@@ -0,0 +1,124 @@
|
|
|
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 CustomAttributeOptionUpdateApiModel model module.
|
|
24
|
+
* @module model/CustomAttributeOptionUpdateApiModel
|
|
25
|
+
* @version 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
class CustomAttributeOptionUpdateApiModel {
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>CustomAttributeOptionUpdateApiModel</code>.
|
|
30
|
+
* @alias module:model/CustomAttributeOptionUpdateApiModel
|
|
31
|
+
* @param id {String} Unique ID of the attribute option
|
|
32
|
+
* @param isDefault {Boolean} Indicates if the attribute option is used by default
|
|
33
|
+
* @param isDeleted {Boolean} Indicates if the attributes option is deleted
|
|
34
|
+
*/
|
|
35
|
+
constructor(id, isDefault, isDeleted) {
|
|
36
|
+
CustomAttributeOptionUpdateApiModel.initialize(this, id, isDefault, isDeleted);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initializes the fields of this object.
|
|
41
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
42
|
+
* Only for internal use.
|
|
43
|
+
*/
|
|
44
|
+
static initialize(obj, id, isDefault, isDeleted) {
|
|
45
|
+
obj['id'] = id;
|
|
46
|
+
obj['isDefault'] = isDefault;
|
|
47
|
+
obj['isDeleted'] = isDeleted;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>CustomAttributeOptionUpdateApiModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
+
* @param {module:model/CustomAttributeOptionUpdateApiModel} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/CustomAttributeOptionUpdateApiModel} The populated <code>CustomAttributeOptionUpdateApiModel</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
static constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new CustomAttributeOptionUpdateApiModel();
|
|
60
|
+
if (data.hasOwnProperty('id')) {
|
|
61
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('value')) {
|
|
64
|
+
obj['value'] = _ApiClient.default.convertToType(data['value'], 'String');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('isDefault')) {
|
|
67
|
+
obj['isDefault'] = _ApiClient.default.convertToType(data['isDefault'], 'Boolean');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('isDeleted')) {
|
|
70
|
+
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>CustomAttributeOptionUpdateApiModel</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeOptionUpdateApiModel</code>.
|
|
80
|
+
*/
|
|
81
|
+
static validateJSON(data) {
|
|
82
|
+
// check to make sure all required properties are present in the JSON string
|
|
83
|
+
for (const property of CustomAttributeOptionUpdateApiModel.RequiredProperties) {
|
|
84
|
+
if (!data.hasOwnProperty(property)) {
|
|
85
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// ensure the json data is a string
|
|
89
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
90
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
91
|
+
}
|
|
92
|
+
// ensure the json data is a string
|
|
93
|
+
if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
CustomAttributeOptionUpdateApiModel.RequiredProperties = ["id", "isDefault", "isDeleted"];
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Unique ID of the attribute option
|
|
103
|
+
* @member {String} id
|
|
104
|
+
*/
|
|
105
|
+
CustomAttributeOptionUpdateApiModel.prototype['id'] = undefined;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Value of the attribute option
|
|
109
|
+
* @member {String} value
|
|
110
|
+
*/
|
|
111
|
+
CustomAttributeOptionUpdateApiModel.prototype['value'] = undefined;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Indicates if the attribute option is used by default
|
|
115
|
+
* @member {Boolean} isDefault
|
|
116
|
+
*/
|
|
117
|
+
CustomAttributeOptionUpdateApiModel.prototype['isDefault'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Indicates if the attributes option is deleted
|
|
121
|
+
* @member {Boolean} isDeleted
|
|
122
|
+
*/
|
|
123
|
+
CustomAttributeOptionUpdateApiModel.prototype['isDeleted'] = undefined;
|
|
124
|
+
var _default = exports.default = CustomAttributeOptionUpdateApiModel;
|
|
@@ -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;
|
|
@@ -0,0 +1,137 @@
|
|
|
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 _CustomAttributeType = _interopRequireDefault(require("./CustomAttributeType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* API
|
|
12
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
13
|
+
*
|
|
14
|
+
* The version of the OpenAPI document: adapters
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
18
|
+
* https://openapi-generator.tech
|
|
19
|
+
* Do not edit the class manually.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The CustomAttributeSearchApiModel model module.
|
|
25
|
+
* @module model/CustomAttributeSearchApiModel
|
|
26
|
+
* @version 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
class CustomAttributeSearchApiModel {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>CustomAttributeSearchApiModel</code>.
|
|
31
|
+
* @alias module:model/CustomAttributeSearchApiModel
|
|
32
|
+
*/
|
|
33
|
+
constructor() {
|
|
34
|
+
CustomAttributeSearchApiModel.initialize(this);
|
|
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) {}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Constructs a <code>CustomAttributeSearchApiModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
46
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
47
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
48
|
+
* @param {module:model/CustomAttributeSearchApiModel} obj Optional instance to populate.
|
|
49
|
+
* @return {module:model/CustomAttributeSearchApiModel} The populated <code>CustomAttributeSearchApiModel</code> instance.
|
|
50
|
+
*/
|
|
51
|
+
static constructFromObject(data, obj) {
|
|
52
|
+
if (data) {
|
|
53
|
+
obj = obj || new CustomAttributeSearchApiModel();
|
|
54
|
+
if (data.hasOwnProperty('name')) {
|
|
55
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
56
|
+
}
|
|
57
|
+
if (data.hasOwnProperty('projectIds')) {
|
|
58
|
+
obj['projectIds'] = _ApiClient.default.convertToType(data['projectIds'], ['String']);
|
|
59
|
+
}
|
|
60
|
+
if (data.hasOwnProperty('customAttributeIds')) {
|
|
61
|
+
obj['customAttributeIds'] = _ApiClient.default.convertToType(data['customAttributeIds'], ['String']);
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('customAttributeTypes')) {
|
|
64
|
+
obj['customAttributeTypes'] = _ApiClient.default.convertToType(data['customAttributeTypes'], [_CustomAttributeType.default]);
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('isGlobal')) {
|
|
67
|
+
obj['isGlobal'] = _ApiClient.default.convertToType(data['isGlobal'], 'Boolean');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('isDeleted')) {
|
|
70
|
+
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>CustomAttributeSearchApiModel</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeSearchApiModel</code>.
|
|
80
|
+
*/
|
|
81
|
+
static validateJSON(data) {
|
|
82
|
+
// ensure the json data is a string
|
|
83
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
84
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
85
|
+
}
|
|
86
|
+
// ensure the json data is an array
|
|
87
|
+
if (!Array.isArray(data['projectIds'])) {
|
|
88
|
+
throw new Error("Expected the field `projectIds` to be an array in the JSON data but got " + data['projectIds']);
|
|
89
|
+
}
|
|
90
|
+
// ensure the json data is an array
|
|
91
|
+
if (!Array.isArray(data['customAttributeIds'])) {
|
|
92
|
+
throw new Error("Expected the field `customAttributeIds` to be an array in the JSON data but got " + data['customAttributeIds']);
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is an array
|
|
95
|
+
if (!Array.isArray(data['customAttributeTypes'])) {
|
|
96
|
+
throw new Error("Expected the field `customAttributeTypes` to be an array in the JSON data but got " + data['customAttributeTypes']);
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Name of attribute
|
|
104
|
+
* @member {String} name
|
|
105
|
+
*/
|
|
106
|
+
CustomAttributeSearchApiModel.prototype['name'] = undefined;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Unique IDs of projects where attribute is in use
|
|
110
|
+
* @member {Array.<String>} projectIds
|
|
111
|
+
*/
|
|
112
|
+
CustomAttributeSearchApiModel.prototype['projectIds'] = undefined;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Unique IDs of attributes for search restriction
|
|
116
|
+
* @member {Array.<String>} customAttributeIds
|
|
117
|
+
*/
|
|
118
|
+
CustomAttributeSearchApiModel.prototype['customAttributeIds'] = undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Collection of attribute types
|
|
122
|
+
* @member {Array.<module:model/CustomAttributeType>} customAttributeTypes
|
|
123
|
+
*/
|
|
124
|
+
CustomAttributeSearchApiModel.prototype['customAttributeTypes'] = undefined;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Indicates whether the attribute is available across all projects
|
|
128
|
+
* @member {Boolean} isGlobal
|
|
129
|
+
*/
|
|
130
|
+
CustomAttributeSearchApiModel.prototype['isGlobal'] = undefined;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Indicates whether the attribute is deleted
|
|
134
|
+
* @member {Boolean} isDeleted
|
|
135
|
+
*/
|
|
136
|
+
CustomAttributeSearchApiModel.prototype['isDeleted'] = undefined;
|
|
137
|
+
var _default = exports.default = CustomAttributeSearchApiModel;
|