testit-js-commons 5.0.9-TMS-5.8 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/lib/adapters-api/dist/ApiClient.js +6 -5
  2. package/lib/adapters-api/dist/api/AttachmentsApi.js +5 -5
  3. package/lib/adapters-api/dist/api/AutoTestsApi.js +11 -11
  4. package/lib/adapters-api/dist/api/ConfigurationsApi.js +1 -1
  5. package/lib/adapters-api/dist/api/CustomAttributesApi.js +201 -0
  6. package/lib/adapters-api/dist/api/ParametersApi.js +3 -3
  7. package/lib/adapters-api/dist/api/ProjectAttributesApi.js +6 -6
  8. package/lib/adapters-api/dist/api/ProjectSectionsApi.js +1 -1
  9. package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +1 -1
  10. package/lib/adapters-api/dist/api/ProjectsApi.js +4 -4
  11. package/lib/adapters-api/dist/api/SectionsApi.js +2 -2
  12. package/lib/adapters-api/dist/api/TestResultsApi.js +3 -3
  13. package/lib/adapters-api/dist/api/TestRunsApi.js +8 -8
  14. package/lib/adapters-api/dist/api/WorkItemsApi.js +3 -3
  15. package/lib/adapters-api/dist/api/WorkflowsApi.js +1 -1
  16. package/lib/adapters-api/dist/index.js +80 -3
  17. package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +1 -1
  18. package/lib/adapters-api/dist/model/AutoTestApiResult.js +15 -0
  19. package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +15 -0
  20. package/lib/adapters-api/dist/model/AutoTestStepResult.js +1 -1
  21. package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +1 -1
  22. package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +30 -4
  23. package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +2 -2
  24. package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +56 -6
  25. package/lib/adapters-api/dist/model/{CustomAttributeGetModel.js → CustomAttributeModel.js} +89 -39
  26. package/lib/adapters-api/dist/model/CustomAttributeOptionPostApiModel.js +98 -0
  27. package/lib/adapters-api/dist/model/CustomAttributeOptionUpdateApiModel.js +124 -0
  28. package/lib/adapters-api/dist/model/CustomAttributePutModel.js +1 -1
  29. package/lib/adapters-api/dist/model/CustomAttributeSearchApiModel.js +137 -0
  30. package/lib/adapters-api/dist/model/CustomAttributeSearchApiResult.js +281 -0
  31. package/lib/adapters-api/dist/model/GlobalCustomAttributePostApiModel.js +141 -0
  32. package/lib/adapters-api/dist/model/GlobalCustomAttributeUpdateApiModel.js +129 -0
  33. package/lib/adapters-api/dist/model/LabelApiModel.js +4 -15
  34. package/lib/adapters-api/dist/model/LayerApiModel.js +102 -0
  35. package/lib/adapters-api/dist/model/LayerApiResult.js +102 -0
  36. package/lib/adapters-api/dist/model/LayerSource.js +61 -0
  37. package/lib/adapters-api/dist/model/ProjectShortestApiResult.js +138 -0
  38. package/lib/adapters-api/dist/model/ProjectsFilterModel.js +13 -13
  39. package/lib/adapters-api/dist/model/TestResultResponse.js +18 -4
  40. package/lib/adapters-api/dist/model/TestResultShortResponse.js +15 -4
  41. package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +14 -0
  42. package/lib/adapters-api/dist/model/TestRunApiResult.js +45 -4
  43. package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +1 -1
  44. package/lib/adapters-api/index.d.ts +758 -204
  45. package/lib/common/index.d.ts +1 -0
  46. package/lib/common/index.js +1 -0
  47. package/lib/common/test-layers.d.ts +11 -0
  48. package/lib/common/test-layers.js +13 -0
  49. package/lib/common/types/common.type.d.ts +6 -0
  50. package/lib/common/utils/index.d.ts +1 -0
  51. package/lib/common/utils/index.js +1 -0
  52. package/lib/common/utils/log-sanitize.util.d.ts +12 -0
  53. package/lib/common/utils/log-sanitize.util.js +112 -0
  54. package/lib/common/utils/log-sanitize.util.test.d.ts +1 -0
  55. package/lib/common/utils/log-sanitize.util.test.js +55 -0
  56. package/lib/common/utils/tms-load-test-run-debug.d.ts +2 -0
  57. package/lib/common/utils/tms-load-test-run-debug.js +6 -0
  58. package/lib/logger/index.d.ts +1 -1
  59. package/lib/logger/index.js +19 -21
  60. package/lib/services/attachments/attachments.service.js +2 -14
  61. package/lib/services/autotests/autotests.converter.d.ts +6 -2
  62. package/lib/services/autotests/autotests.converter.js +41 -16
  63. package/lib/services/autotests/autotests.converter.test.d.ts +1 -0
  64. package/lib/services/autotests/autotests.converter.test.js +39 -0
  65. package/lib/services/autotests/autotests.service.js +4 -5
  66. package/lib/services/autotests/autotests.type.d.ts +2 -0
  67. package/lib/services/syncstorage/syncstorage.runner.js +6 -5
  68. package/lib/services/syncstorage/syncstorage.runner.test.js +16 -0
  69. package/lib/services/testruns/testruns.converter.d.ts +5 -0
  70. package/lib/services/testruns/testruns.converter.js +18 -1
  71. package/lib/services/testruns/testruns.converter.test.js +24 -0
  72. package/lib/services/testruns/testruns.handler.d.ts +2 -2
  73. package/lib/services/testruns/testruns.handler.js +12 -2
  74. package/lib/services/testruns/testruns.service.d.ts +3 -1
  75. package/lib/services/testruns/testruns.service.js +33 -18
  76. package/lib/services/testruns/testruns.service.test.js +0 -43
  77. package/lib/services/testruns/testruns.type.d.ts +3 -1
  78. package/lib/strategy/base.strategy.d.ts +1 -0
  79. package/lib/strategy/base.strategy.js +35 -12
  80. package/lib/strategy/strategy.type.d.ts +2 -0
  81. package/lib/sync-storage/dist/ApiClient.js +3 -0
  82. 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 CustomAttributeGetModel model module.
26
- * @module model/CustomAttributeGetModel
25
+ * The CustomAttributeModel model module.
26
+ * @module model/CustomAttributeModel
27
27
  * @version 1.0.0
28
28
  */
29
- class CustomAttributeGetModel {
29
+ class CustomAttributeModel {
30
30
  /**
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
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, type, isDeleted, name, isEnabled, isRequired, isGlobal) {
43
- CustomAttributeGetModel.initialize(this, id, options, type, isDeleted, name, isEnabled, isRequired, isGlobal);
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, type, isDeleted, name, isEnabled, isRequired, isGlobal) {
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>CustomAttributeGetModel</code> from a plain JavaScript object, optionally creating a new instance.
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/CustomAttributeGetModel} obj Optional instance to populate.
67
- * @return {module:model/CustomAttributeGetModel} The populated <code>CustomAttributeGetModel</code> instance.
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 CustomAttributeGetModel();
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('options')) {
76
- obj['options'] = _ApiClient.default.convertToType(data['options'], [_CustomAttributeOptionModel.default]);
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>CustomAttributeGetModel</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>CustomAttributeGetModel</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 CustomAttributeGetModel.RequiredProperties) {
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
- CustomAttributeGetModel.RequiredProperties = ["id", "options", "type", "isDeleted", "name", "isEnabled", "isRequired", "isGlobal"];
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
- CustomAttributeGetModel.prototype['id'] = undefined;
167
+ CustomAttributeModel.prototype['id'] = undefined;
142
168
 
143
169
  /**
144
- * Collection of the attribute options
145
- * @member {Array.<module:model/CustomAttributeOptionModel>} options
170
+ * Optional code identifier for the attribute.
171
+ * @member {String} code
146
172
  */
147
- CustomAttributeGetModel.prototype['options'] = undefined;
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
- CustomAttributeGetModel.prototype['type'] = undefined;
179
+ CustomAttributeModel.prototype['type'] = undefined;
154
180
 
155
181
  /**
156
- * Indicates if the attribute is deleted
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
- CustomAttributeGetModel.prototype['isDeleted'] = undefined;
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
- CustomAttributeGetModel.prototype['name'] = undefined;
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
- CustomAttributeGetModel.prototype['isEnabled'] = undefined;
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
- CustomAttributeGetModel.prototype['isRequired'] = undefined;
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
- CustomAttributeGetModel.prototype['isGlobal'] = undefined;
184
- var _default = exports.default = CustomAttributeGetModel;
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 Available for attributes of type `options` and `multiple options` only
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;