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
|
@@ -0,0 +1,281 @@
|
|
|
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 _CustomAttributeOptionApiResult = _interopRequireDefault(require("./CustomAttributeOptionApiResult"));
|
|
9
|
+
var _CustomAttributeType = _interopRequireDefault(require("./CustomAttributeType"));
|
|
10
|
+
var _ProjectShortestApiResult = _interopRequireDefault(require("./ProjectShortestApiResult"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* API
|
|
14
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
15
|
+
*
|
|
16
|
+
* The version of the OpenAPI document: adapters
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20
|
+
* https://openapi-generator.tech
|
|
21
|
+
* Do not edit the class manually.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The CustomAttributeSearchApiResult model module.
|
|
27
|
+
* @module model/CustomAttributeSearchApiResult
|
|
28
|
+
* @version 1.0.0
|
|
29
|
+
*/
|
|
30
|
+
class CustomAttributeSearchApiResult {
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a new <code>CustomAttributeSearchApiResult</code>.
|
|
33
|
+
* @alias module:model/CustomAttributeSearchApiResult
|
|
34
|
+
* @param workItemUsage {Array.<module:model/ProjectShortestApiResult>} Projects where attribute is used in work items
|
|
35
|
+
* @param testPlanUsage {Array.<module:model/ProjectShortestApiResult>} Projects where attribute is used in test plans
|
|
36
|
+
* @param id {String} Unique ID of the attribute
|
|
37
|
+
* @param options {Array.<module:model/CustomAttributeOptionApiResult>} Collection of the attribute options Available for attributes of type `options` and `multiple options` only
|
|
38
|
+
* @param type {module:model/CustomAttributeType} Type of the attribute
|
|
39
|
+
* @param isDeleted {Boolean} Indicates if the attribute is deleted
|
|
40
|
+
* @param name {String} Name of the attribute
|
|
41
|
+
* @param isEnabled {Boolean} Indicates if the attribute is enabled
|
|
42
|
+
* @param isRequired {Boolean} Indicates if the attribute value is mandatory to specify
|
|
43
|
+
* @param isGlobal {Boolean} Indicates if the attribute is available across all projects
|
|
44
|
+
* @param isReadOnly {Boolean} Indicates if the attribute is read-only
|
|
45
|
+
* @param isSystem {Boolean} Indicates if the attribute is system
|
|
46
|
+
* @param targets {Array.<String>} Collection of the attribute targets Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans)
|
|
47
|
+
*/
|
|
48
|
+
constructor(workItemUsage, testPlanUsage, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal, isReadOnly, isSystem, targets) {
|
|
49
|
+
CustomAttributeSearchApiResult.initialize(this, workItemUsage, testPlanUsage, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal, isReadOnly, isSystem, targets);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Initializes the fields of this object.
|
|
54
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
55
|
+
* Only for internal use.
|
|
56
|
+
*/
|
|
57
|
+
static initialize(obj, workItemUsage, testPlanUsage, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal, isReadOnly, isSystem, targets) {
|
|
58
|
+
obj['workItemUsage'] = workItemUsage;
|
|
59
|
+
obj['testPlanUsage'] = testPlanUsage;
|
|
60
|
+
obj['id'] = id;
|
|
61
|
+
obj['options'] = options;
|
|
62
|
+
obj['type'] = type;
|
|
63
|
+
obj['isDeleted'] = isDeleted;
|
|
64
|
+
obj['name'] = name;
|
|
65
|
+
obj['isEnabled'] = isEnabled;
|
|
66
|
+
obj['isRequired'] = isRequired;
|
|
67
|
+
obj['isGlobal'] = isGlobal;
|
|
68
|
+
obj['isReadOnly'] = isReadOnly;
|
|
69
|
+
obj['isSystem'] = isSystem;
|
|
70
|
+
obj['targets'] = targets;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Constructs a <code>CustomAttributeSearchApiResult</code> from a plain JavaScript object, optionally creating a new instance.
|
|
75
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @param {module:model/CustomAttributeSearchApiResult} obj Optional instance to populate.
|
|
78
|
+
* @return {module:model/CustomAttributeSearchApiResult} The populated <code>CustomAttributeSearchApiResult</code> instance.
|
|
79
|
+
*/
|
|
80
|
+
static constructFromObject(data, obj) {
|
|
81
|
+
if (data) {
|
|
82
|
+
obj = obj || new CustomAttributeSearchApiResult();
|
|
83
|
+
if (data.hasOwnProperty('workItemUsage')) {
|
|
84
|
+
obj['workItemUsage'] = _ApiClient.default.convertToType(data['workItemUsage'], [_ProjectShortestApiResult.default]);
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('testPlanUsage')) {
|
|
87
|
+
obj['testPlanUsage'] = _ApiClient.default.convertToType(data['testPlanUsage'], [_ProjectShortestApiResult.default]);
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('id')) {
|
|
90
|
+
obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('code')) {
|
|
93
|
+
obj['code'] = _ApiClient.default.convertToType(data['code'], 'String');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('options')) {
|
|
96
|
+
obj['options'] = _ApiClient.default.convertToType(data['options'], [_CustomAttributeOptionApiResult.default]);
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('type')) {
|
|
99
|
+
obj['type'] = _ApiClient.default.convertToType(data['type'], _CustomAttributeType.default);
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('isDeleted')) {
|
|
102
|
+
obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('name')) {
|
|
105
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('isEnabled')) {
|
|
108
|
+
obj['isEnabled'] = _ApiClient.default.convertToType(data['isEnabled'], 'Boolean');
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('isRequired')) {
|
|
111
|
+
obj['isRequired'] = _ApiClient.default.convertToType(data['isRequired'], 'Boolean');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('isGlobal')) {
|
|
114
|
+
obj['isGlobal'] = _ApiClient.default.convertToType(data['isGlobal'], 'Boolean');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('isReadOnly')) {
|
|
117
|
+
obj['isReadOnly'] = _ApiClient.default.convertToType(data['isReadOnly'], 'Boolean');
|
|
118
|
+
}
|
|
119
|
+
if (data.hasOwnProperty('isSystem')) {
|
|
120
|
+
obj['isSystem'] = _ApiClient.default.convertToType(data['isSystem'], 'Boolean');
|
|
121
|
+
}
|
|
122
|
+
if (data.hasOwnProperty('targets')) {
|
|
123
|
+
obj['targets'] = _ApiClient.default.convertToType(data['targets'], ['String']);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return obj;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Validates the JSON data with respect to <code>CustomAttributeSearchApiResult</code>.
|
|
131
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
132
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeSearchApiResult</code>.
|
|
133
|
+
*/
|
|
134
|
+
static validateJSON(data) {
|
|
135
|
+
// check to make sure all required properties are present in the JSON string
|
|
136
|
+
for (const property of CustomAttributeSearchApiResult.RequiredProperties) {
|
|
137
|
+
if (!data.hasOwnProperty(property)) {
|
|
138
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (data['workItemUsage']) {
|
|
142
|
+
// data not null
|
|
143
|
+
// ensure the json data is an array
|
|
144
|
+
if (!Array.isArray(data['workItemUsage'])) {
|
|
145
|
+
throw new Error("Expected the field `workItemUsage` to be an array in the JSON data but got " + data['workItemUsage']);
|
|
146
|
+
}
|
|
147
|
+
// validate the optional field `workItemUsage` (array)
|
|
148
|
+
for (const item of data['workItemUsage']) {
|
|
149
|
+
_ProjectShortestApiResult.default.validateJSON(item);
|
|
150
|
+
}
|
|
151
|
+
;
|
|
152
|
+
}
|
|
153
|
+
if (data['testPlanUsage']) {
|
|
154
|
+
// data not null
|
|
155
|
+
// ensure the json data is an array
|
|
156
|
+
if (!Array.isArray(data['testPlanUsage'])) {
|
|
157
|
+
throw new Error("Expected the field `testPlanUsage` to be an array in the JSON data but got " + data['testPlanUsage']);
|
|
158
|
+
}
|
|
159
|
+
// validate the optional field `testPlanUsage` (array)
|
|
160
|
+
for (const item of data['testPlanUsage']) {
|
|
161
|
+
_ProjectShortestApiResult.default.validateJSON(item);
|
|
162
|
+
}
|
|
163
|
+
;
|
|
164
|
+
}
|
|
165
|
+
// ensure the json data is a string
|
|
166
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
167
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
168
|
+
}
|
|
169
|
+
// ensure the json data is a string
|
|
170
|
+
if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) {
|
|
171
|
+
throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']);
|
|
172
|
+
}
|
|
173
|
+
if (data['options']) {
|
|
174
|
+
// data not null
|
|
175
|
+
// ensure the json data is an array
|
|
176
|
+
if (!Array.isArray(data['options'])) {
|
|
177
|
+
throw new Error("Expected the field `options` to be an array in the JSON data but got " + data['options']);
|
|
178
|
+
}
|
|
179
|
+
// validate the optional field `options` (array)
|
|
180
|
+
for (const item of data['options']) {
|
|
181
|
+
_CustomAttributeOptionApiResult.default.validateJSON(item);
|
|
182
|
+
}
|
|
183
|
+
;
|
|
184
|
+
}
|
|
185
|
+
// ensure the json data is a string
|
|
186
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
187
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
188
|
+
}
|
|
189
|
+
// ensure the json data is an array
|
|
190
|
+
if (!Array.isArray(data['targets'])) {
|
|
191
|
+
throw new Error("Expected the field `targets` to be an array in the JSON data but got " + data['targets']);
|
|
192
|
+
}
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
CustomAttributeSearchApiResult.RequiredProperties = ["workItemUsage", "testPlanUsage", "id", "options", "type", "isDeleted", "name", "isEnabled", "isRequired", "isGlobal", "isReadOnly", "isSystem", "targets"];
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Projects where attribute is used in work items
|
|
200
|
+
* @member {Array.<module:model/ProjectShortestApiResult>} workItemUsage
|
|
201
|
+
*/
|
|
202
|
+
CustomAttributeSearchApiResult.prototype['workItemUsage'] = undefined;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Projects where attribute is used in test plans
|
|
206
|
+
* @member {Array.<module:model/ProjectShortestApiResult>} testPlanUsage
|
|
207
|
+
*/
|
|
208
|
+
CustomAttributeSearchApiResult.prototype['testPlanUsage'] = undefined;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Unique ID of the attribute
|
|
212
|
+
* @member {String} id
|
|
213
|
+
*/
|
|
214
|
+
CustomAttributeSearchApiResult.prototype['id'] = undefined;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Optional code identifier for the attribute
|
|
218
|
+
* @member {String} code
|
|
219
|
+
*/
|
|
220
|
+
CustomAttributeSearchApiResult.prototype['code'] = undefined;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Collection of the attribute options Available for attributes of type `options` and `multiple options` only
|
|
224
|
+
* @member {Array.<module:model/CustomAttributeOptionApiResult>} options
|
|
225
|
+
*/
|
|
226
|
+
CustomAttributeSearchApiResult.prototype['options'] = undefined;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Type of the attribute
|
|
230
|
+
* @member {module:model/CustomAttributeType} type
|
|
231
|
+
*/
|
|
232
|
+
CustomAttributeSearchApiResult.prototype['type'] = undefined;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Indicates if the attribute is deleted
|
|
236
|
+
* @member {Boolean} isDeleted
|
|
237
|
+
*/
|
|
238
|
+
CustomAttributeSearchApiResult.prototype['isDeleted'] = undefined;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Name of the attribute
|
|
242
|
+
* @member {String} name
|
|
243
|
+
*/
|
|
244
|
+
CustomAttributeSearchApiResult.prototype['name'] = undefined;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Indicates if the attribute is enabled
|
|
248
|
+
* @member {Boolean} isEnabled
|
|
249
|
+
*/
|
|
250
|
+
CustomAttributeSearchApiResult.prototype['isEnabled'] = undefined;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Indicates if the attribute value is mandatory to specify
|
|
254
|
+
* @member {Boolean} isRequired
|
|
255
|
+
*/
|
|
256
|
+
CustomAttributeSearchApiResult.prototype['isRequired'] = undefined;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Indicates if the attribute is available across all projects
|
|
260
|
+
* @member {Boolean} isGlobal
|
|
261
|
+
*/
|
|
262
|
+
CustomAttributeSearchApiResult.prototype['isGlobal'] = undefined;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Indicates if the attribute is read-only
|
|
266
|
+
* @member {Boolean} isReadOnly
|
|
267
|
+
*/
|
|
268
|
+
CustomAttributeSearchApiResult.prototype['isReadOnly'] = undefined;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Indicates if the attribute is system
|
|
272
|
+
* @member {Boolean} isSystem
|
|
273
|
+
*/
|
|
274
|
+
CustomAttributeSearchApiResult.prototype['isSystem'] = undefined;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Collection of the attribute targets Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans)
|
|
278
|
+
* @member {Array.<String>} targets
|
|
279
|
+
*/
|
|
280
|
+
CustomAttributeSearchApiResult.prototype['targets'] = undefined;
|
|
281
|
+
var _default = exports.default = CustomAttributeSearchApiResult;
|
|
@@ -0,0 +1,141 @@
|
|
|
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 _CustomAttributeOptionPostApiModel = _interopRequireDefault(require("./CustomAttributeOptionPostApiModel"));
|
|
9
|
+
var _CustomAttributeType = _interopRequireDefault(require("./CustomAttributeType"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/**
|
|
12
|
+
* API
|
|
13
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
14
|
+
*
|
|
15
|
+
* The version of the OpenAPI document: adapters
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
19
|
+
* https://openapi-generator.tech
|
|
20
|
+
* Do not edit the class manually.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The GlobalCustomAttributePostApiModel model module.
|
|
26
|
+
* @module model/GlobalCustomAttributePostApiModel
|
|
27
|
+
* @version 1.0.0
|
|
28
|
+
*/
|
|
29
|
+
class GlobalCustomAttributePostApiModel {
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new <code>GlobalCustomAttributePostApiModel</code>.
|
|
32
|
+
* @alias module:model/GlobalCustomAttributePostApiModel
|
|
33
|
+
* @param name {String} Name of attribute
|
|
34
|
+
* @param type {module:model/CustomAttributeType} Type of attribute
|
|
35
|
+
*/
|
|
36
|
+
constructor(name, type) {
|
|
37
|
+
GlobalCustomAttributePostApiModel.initialize(this, name, type);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Initializes the fields of this object.
|
|
42
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
43
|
+
* Only for internal use.
|
|
44
|
+
*/
|
|
45
|
+
static initialize(obj, name, type) {
|
|
46
|
+
obj['name'] = name;
|
|
47
|
+
obj['type'] = type;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>GlobalCustomAttributePostApiModel</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/GlobalCustomAttributePostApiModel} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/GlobalCustomAttributePostApiModel} The populated <code>GlobalCustomAttributePostApiModel</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
static constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new GlobalCustomAttributePostApiModel();
|
|
60
|
+
if (data.hasOwnProperty('name')) {
|
|
61
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('isEnabled')) {
|
|
64
|
+
obj['isEnabled'] = _ApiClient.default.convertToType(data['isEnabled'], 'Boolean');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('isRequired')) {
|
|
67
|
+
obj['isRequired'] = _ApiClient.default.convertToType(data['isRequired'], 'Boolean');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('options')) {
|
|
70
|
+
obj['options'] = _ApiClient.default.convertToType(data['options'], [_CustomAttributeOptionPostApiModel.default]);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('type')) {
|
|
73
|
+
obj['type'] = _ApiClient.default.convertToType(data['type'], _CustomAttributeType.default);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>GlobalCustomAttributePostApiModel</code>.
|
|
81
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
82
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GlobalCustomAttributePostApiModel</code>.
|
|
83
|
+
*/
|
|
84
|
+
static validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
for (const property of GlobalCustomAttributePostApiModel.RequiredProperties) {
|
|
87
|
+
if (!data.hasOwnProperty(property)) {
|
|
88
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// ensure the json data is a string
|
|
92
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
93
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
94
|
+
}
|
|
95
|
+
if (data['options']) {
|
|
96
|
+
// data not null
|
|
97
|
+
// ensure the json data is an array
|
|
98
|
+
if (!Array.isArray(data['options'])) {
|
|
99
|
+
throw new Error("Expected the field `options` to be an array in the JSON data but got " + data['options']);
|
|
100
|
+
}
|
|
101
|
+
// validate the optional field `options` (array)
|
|
102
|
+
for (const item of data['options']) {
|
|
103
|
+
_CustomAttributeOptionPostApiModel.default.validateJSON(item);
|
|
104
|
+
}
|
|
105
|
+
;
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
GlobalCustomAttributePostApiModel.RequiredProperties = ["name", "type"];
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Name of attribute
|
|
114
|
+
* @member {String} name
|
|
115
|
+
*/
|
|
116
|
+
GlobalCustomAttributePostApiModel.prototype['name'] = undefined;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Indicates whether the attribute is available
|
|
120
|
+
* @member {Boolean} isEnabled
|
|
121
|
+
*/
|
|
122
|
+
GlobalCustomAttributePostApiModel.prototype['isEnabled'] = undefined;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Indicates whether the attribute value is mandatory to specify
|
|
126
|
+
* @member {Boolean} isRequired
|
|
127
|
+
*/
|
|
128
|
+
GlobalCustomAttributePostApiModel.prototype['isRequired'] = undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Collection of attribute options Available for attributes of type `options` and `multiple options` only
|
|
132
|
+
* @member {Array.<module:model/CustomAttributeOptionPostApiModel>} options
|
|
133
|
+
*/
|
|
134
|
+
GlobalCustomAttributePostApiModel.prototype['options'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Type of attribute
|
|
138
|
+
* @member {module:model/CustomAttributeType} type
|
|
139
|
+
*/
|
|
140
|
+
GlobalCustomAttributePostApiModel.prototype['type'] = undefined;
|
|
141
|
+
var _default = exports.default = GlobalCustomAttributePostApiModel;
|
|
@@ -0,0 +1,129 @@
|
|
|
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 _CustomAttributeOptionUpdateApiModel = _interopRequireDefault(require("./CustomAttributeOptionUpdateApiModel"));
|
|
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 GlobalCustomAttributeUpdateApiModel model module.
|
|
25
|
+
* @module model/GlobalCustomAttributeUpdateApiModel
|
|
26
|
+
* @version 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
class GlobalCustomAttributeUpdateApiModel {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>GlobalCustomAttributeUpdateApiModel</code>.
|
|
31
|
+
* @alias module:model/GlobalCustomAttributeUpdateApiModel
|
|
32
|
+
* @param name {String} Name of attribute
|
|
33
|
+
*/
|
|
34
|
+
constructor(name) {
|
|
35
|
+
GlobalCustomAttributeUpdateApiModel.initialize(this, name);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Initializes the fields of this object.
|
|
40
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
41
|
+
* Only for internal use.
|
|
42
|
+
*/
|
|
43
|
+
static initialize(obj, name) {
|
|
44
|
+
obj['name'] = name;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>GlobalCustomAttributeUpdateApiModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
49
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
50
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
51
|
+
* @param {module:model/GlobalCustomAttributeUpdateApiModel} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/GlobalCustomAttributeUpdateApiModel} The populated <code>GlobalCustomAttributeUpdateApiModel</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
static constructFromObject(data, obj) {
|
|
55
|
+
if (data) {
|
|
56
|
+
obj = obj || new GlobalCustomAttributeUpdateApiModel();
|
|
57
|
+
if (data.hasOwnProperty('name')) {
|
|
58
|
+
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
59
|
+
}
|
|
60
|
+
if (data.hasOwnProperty('options')) {
|
|
61
|
+
obj['options'] = _ApiClient.default.convertToType(data['options'], [_CustomAttributeOptionUpdateApiModel.default]);
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('isEnabled')) {
|
|
64
|
+
obj['isEnabled'] = _ApiClient.default.convertToType(data['isEnabled'], 'Boolean');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('isRequired')) {
|
|
67
|
+
obj['isRequired'] = _ApiClient.default.convertToType(data['isRequired'], 'Boolean');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return obj;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Validates the JSON data with respect to <code>GlobalCustomAttributeUpdateApiModel</code>.
|
|
75
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
76
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GlobalCustomAttributeUpdateApiModel</code>.
|
|
77
|
+
*/
|
|
78
|
+
static validateJSON(data) {
|
|
79
|
+
// check to make sure all required properties are present in the JSON string
|
|
80
|
+
for (const property of GlobalCustomAttributeUpdateApiModel.RequiredProperties) {
|
|
81
|
+
if (!data.hasOwnProperty(property)) {
|
|
82
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// ensure the json data is a string
|
|
86
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
87
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
88
|
+
}
|
|
89
|
+
if (data['options']) {
|
|
90
|
+
// data not null
|
|
91
|
+
// ensure the json data is an array
|
|
92
|
+
if (!Array.isArray(data['options'])) {
|
|
93
|
+
throw new Error("Expected the field `options` to be an array in the JSON data but got " + data['options']);
|
|
94
|
+
}
|
|
95
|
+
// validate the optional field `options` (array)
|
|
96
|
+
for (const item of data['options']) {
|
|
97
|
+
_CustomAttributeOptionUpdateApiModel.default.validateJSON(item);
|
|
98
|
+
}
|
|
99
|
+
;
|
|
100
|
+
}
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
GlobalCustomAttributeUpdateApiModel.RequiredProperties = ["name"];
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Name of attribute
|
|
108
|
+
* @member {String} name
|
|
109
|
+
*/
|
|
110
|
+
GlobalCustomAttributeUpdateApiModel.prototype['name'] = undefined;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Collection of attribute options Available for attributes of type `options` and `multiple options` only
|
|
114
|
+
* @member {Array.<module:model/CustomAttributeOptionUpdateApiModel>} options
|
|
115
|
+
*/
|
|
116
|
+
GlobalCustomAttributeUpdateApiModel.prototype['options'] = undefined;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Indicates whether the attribute is available
|
|
120
|
+
* @member {Boolean} isEnabled
|
|
121
|
+
*/
|
|
122
|
+
GlobalCustomAttributeUpdateApiModel.prototype['isEnabled'] = undefined;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Indicates whether the attribute value is mandatory to specify
|
|
126
|
+
* @member {Boolean} isRequired
|
|
127
|
+
*/
|
|
128
|
+
GlobalCustomAttributeUpdateApiModel.prototype['isRequired'] = undefined;
|
|
129
|
+
var _default = exports.default = GlobalCustomAttributeUpdateApiModel;
|
|
@@ -29,10 +29,9 @@ 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
|
|
33
32
|
*/
|
|
34
|
-
constructor(name
|
|
35
|
-
LabelApiModel.initialize(this, name
|
|
33
|
+
constructor(name) {
|
|
34
|
+
LabelApiModel.initialize(this, name);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
/**
|
|
@@ -40,9 +39,8 @@ class LabelApiModel {
|
|
|
40
39
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
41
40
|
* Only for internal use.
|
|
42
41
|
*/
|
|
43
|
-
static initialize(obj, name
|
|
42
|
+
static initialize(obj, name) {
|
|
44
43
|
obj['name'] = name;
|
|
45
|
-
obj['globalId'] = globalId;
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
/**
|
|
@@ -58,9 +56,6 @@ class LabelApiModel {
|
|
|
58
56
|
if (data.hasOwnProperty('name')) {
|
|
59
57
|
obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
|
|
60
58
|
}
|
|
61
|
-
if (data.hasOwnProperty('globalId')) {
|
|
62
|
-
obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
|
|
63
|
-
}
|
|
64
59
|
}
|
|
65
60
|
return obj;
|
|
66
61
|
}
|
|
@@ -84,17 +79,11 @@ class LabelApiModel {
|
|
|
84
79
|
return true;
|
|
85
80
|
}
|
|
86
81
|
}
|
|
87
|
-
LabelApiModel.RequiredProperties = ["name"
|
|
82
|
+
LabelApiModel.RequiredProperties = ["name"];
|
|
88
83
|
|
|
89
84
|
/**
|
|
90
85
|
* Name of the label
|
|
91
86
|
* @member {String} name
|
|
92
87
|
*/
|
|
93
88
|
LabelApiModel.prototype['name'] = undefined;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Global ID of the label
|
|
97
|
-
* @member {Number} globalId
|
|
98
|
-
*/
|
|
99
|
-
LabelApiModel.prototype['globalId'] = undefined;
|
|
100
89
|
var _default = exports.default = LabelApiModel;
|