testit-js-commons 5.0.5 → 5.0.6

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 (33) hide show
  1. package/lib/adapters-api/dist/api/CustomAttributesApi.js +201 -0
  2. package/lib/adapters-api/dist/index.js +77 -0
  3. package/lib/adapters-api/dist/model/AutoTestApiResult.js +15 -0
  4. package/lib/adapters-api/dist/model/AutoTestCreateApiModel.js +15 -0
  5. package/lib/adapters-api/dist/model/AutoTestUpdateApiModel.js +30 -4
  6. package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +54 -4
  7. package/lib/adapters-api/dist/model/CustomAttributeOptionPostApiModel.js +98 -0
  8. package/lib/adapters-api/dist/model/CustomAttributeOptionUpdateApiModel.js +124 -0
  9. package/lib/adapters-api/dist/model/CustomAttributeSearchApiModel.js +137 -0
  10. package/lib/adapters-api/dist/model/CustomAttributeSearchApiResult.js +281 -0
  11. package/lib/adapters-api/dist/model/GlobalCustomAttributePostApiModel.js +141 -0
  12. package/lib/adapters-api/dist/model/GlobalCustomAttributeUpdateApiModel.js +129 -0
  13. package/lib/adapters-api/dist/model/LayerApiModel.js +102 -0
  14. package/lib/adapters-api/dist/model/LayerApiResult.js +102 -0
  15. package/lib/adapters-api/dist/model/LayerSource.js +61 -0
  16. package/lib/adapters-api/dist/model/ProjectShortestApiResult.js +138 -0
  17. package/lib/adapters-api/dist/model/ProjectsFilterModel.js +13 -13
  18. package/lib/adapters-api/dist/model/TestResultShortResponse.js +15 -4
  19. package/lib/adapters-api/dist/model/TestResultsFilterApiModel.js +14 -0
  20. package/lib/adapters-api/dist/model/TestRunApiResult.js +45 -4
  21. package/lib/adapters-api/index.d.ts +718 -8
  22. package/lib/common/index.d.ts +1 -0
  23. package/lib/common/index.js +1 -0
  24. package/lib/common/test-layers.d.ts +11 -0
  25. package/lib/common/test-layers.js +13 -0
  26. package/lib/common/types/common.type.d.ts +2 -0
  27. package/lib/services/autotests/autotests.converter.d.ts +6 -2
  28. package/lib/services/autotests/autotests.converter.js +41 -16
  29. package/lib/services/autotests/autotests.converter.test.d.ts +1 -0
  30. package/lib/services/autotests/autotests.converter.test.js +39 -0
  31. package/lib/services/autotests/autotests.service.js +3 -3
  32. package/lib/services/autotests/autotests.type.d.ts +2 -0
  33. package/package.json +1 -1
@@ -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;
@@ -0,0 +1,102 @@
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 _LayerSource = _interopRequireDefault(require("./LayerSource"));
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 LayerApiModel model module.
25
+ * @module model/LayerApiModel
26
+ * @version 1.0.0
27
+ */
28
+ class LayerApiModel {
29
+ /**
30
+ * Constructs a new <code>LayerApiModel</code>.
31
+ * Model of auto test layer for use in requests.
32
+ * @alias module:model/LayerApiModel
33
+ * @param name {String} Name of the test pyramid layer. Available layers: * Unit * Component * API * UI * E2E * Contract
34
+ * @param source {module:model/LayerSource} Source of the test pyramid layer.
35
+ */
36
+ constructor(name, source) {
37
+ LayerApiModel.initialize(this, name, source);
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, source) {
46
+ obj['name'] = name;
47
+ obj['source'] = source;
48
+ }
49
+
50
+ /**
51
+ * Constructs a <code>LayerApiModel</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/LayerApiModel} obj Optional instance to populate.
55
+ * @return {module:model/LayerApiModel} The populated <code>LayerApiModel</code> instance.
56
+ */
57
+ static constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new LayerApiModel();
60
+ if (data.hasOwnProperty('name')) {
61
+ obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
62
+ }
63
+ if (data.hasOwnProperty('source')) {
64
+ obj['source'] = _ApiClient.default.convertToType(data['source'], _LayerSource.default);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>LayerApiModel</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>LayerApiModel</code>.
74
+ */
75
+ static validateJSON(data) {
76
+ // check to make sure all required properties are present in the JSON string
77
+ for (const property of LayerApiModel.RequiredProperties) {
78
+ if (!data.hasOwnProperty(property)) {
79
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
80
+ }
81
+ }
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
+ return true;
87
+ }
88
+ }
89
+ LayerApiModel.RequiredProperties = ["name", "source"];
90
+
91
+ /**
92
+ * Name of the test pyramid layer. Available layers: * Unit * Component * API * UI * E2E * Contract
93
+ * @member {String} name
94
+ */
95
+ LayerApiModel.prototype['name'] = undefined;
96
+
97
+ /**
98
+ * Source of the test pyramid layer.
99
+ * @member {module:model/LayerSource} source
100
+ */
101
+ LayerApiModel.prototype['source'] = undefined;
102
+ var _default = exports.default = LayerApiModel;
@@ -0,0 +1,102 @@
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 _LayerSource = _interopRequireDefault(require("./LayerSource"));
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 LayerApiResult model module.
25
+ * @module model/LayerApiResult
26
+ * @version 1.0.0
27
+ */
28
+ class LayerApiResult {
29
+ /**
30
+ * Constructs a new <code>LayerApiResult</code>.
31
+ * Model of auto test layer for use in responses.
32
+ * @alias module:model/LayerApiResult
33
+ * @param name {String} Name of the test pyramid layer.
34
+ * @param source {module:model/LayerSource} Source of the test pyramid layer.
35
+ */
36
+ constructor(name, source) {
37
+ LayerApiResult.initialize(this, name, source);
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, source) {
46
+ obj['name'] = name;
47
+ obj['source'] = source;
48
+ }
49
+
50
+ /**
51
+ * Constructs a <code>LayerApiResult</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/LayerApiResult} obj Optional instance to populate.
55
+ * @return {module:model/LayerApiResult} The populated <code>LayerApiResult</code> instance.
56
+ */
57
+ static constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new LayerApiResult();
60
+ if (data.hasOwnProperty('name')) {
61
+ obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
62
+ }
63
+ if (data.hasOwnProperty('source')) {
64
+ obj['source'] = _ApiClient.default.convertToType(data['source'], _LayerSource.default);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>LayerApiResult</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>LayerApiResult</code>.
74
+ */
75
+ static validateJSON(data) {
76
+ // check to make sure all required properties are present in the JSON string
77
+ for (const property of LayerApiResult.RequiredProperties) {
78
+ if (!data.hasOwnProperty(property)) {
79
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
80
+ }
81
+ }
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
+ return true;
87
+ }
88
+ }
89
+ LayerApiResult.RequiredProperties = ["name", "source"];
90
+
91
+ /**
92
+ * Name of the test pyramid layer.
93
+ * @member {String} name
94
+ */
95
+ LayerApiResult.prototype['name'] = undefined;
96
+
97
+ /**
98
+ * Source of the test pyramid layer.
99
+ * @member {module:model/LayerSource} source
100
+ */
101
+ LayerApiResult.prototype['source'] = undefined;
102
+ var _default = exports.default = LayerApiResult;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ /**
10
+ * API
11
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
12
+ *
13
+ * The version of the OpenAPI document: adapters
14
+ *
15
+ *
16
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
17
+ * https://openapi-generator.tech
18
+ * Do not edit the class manually.
19
+ *
20
+ */
21
+
22
+ /**
23
+ * Enum class LayerSource.
24
+ * @enum {}
25
+ * @readonly
26
+ */
27
+ class LayerSource {
28
+ /**
29
+ * value: "Manual"
30
+ * @const
31
+ */
32
+ "Manual" = "Manual";
33
+
34
+ /**
35
+ * value: "Report"
36
+ * @const
37
+ */
38
+ "Report" = "Report";
39
+
40
+ /**
41
+ * value: "Run"
42
+ * @const
43
+ */
44
+ "Run" = "Run";
45
+
46
+ /**
47
+ * value: "Rule"
48
+ * @const
49
+ */
50
+ "Rule" = "Rule";
51
+
52
+ /**
53
+ * Returns a <code>LayerSource</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/LayerSource} The enum <code>LayerSource</code> value.
56
+ */
57
+ static constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }
61
+ exports.default = LayerSource;
@@ -0,0 +1,138 @@
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 _ProjectTypeModel = _interopRequireDefault(require("./ProjectTypeModel"));
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 ProjectShortestApiResult model module.
25
+ * @module model/ProjectShortestApiResult
26
+ * @version 1.0.0
27
+ */
28
+ class ProjectShortestApiResult {
29
+ /**
30
+ * Constructs a new <code>ProjectShortestApiResult</code>.
31
+ * @alias module:model/ProjectShortestApiResult
32
+ * @param id {String} Unique ID of project
33
+ * @param isDeleted {Boolean} Indicates whether the project is deleted
34
+ * @param globalId {Number} Global ID of project
35
+ * @param name {String} Name of project
36
+ * @param type {module:model/ProjectTypeModel} Type of the project
37
+ */
38
+ constructor(id, isDeleted, globalId, name, type) {
39
+ ProjectShortestApiResult.initialize(this, id, isDeleted, globalId, name, type);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ static initialize(obj, id, isDeleted, globalId, name, type) {
48
+ obj['id'] = id;
49
+ obj['isDeleted'] = isDeleted;
50
+ obj['globalId'] = globalId;
51
+ obj['name'] = name;
52
+ obj['type'] = type;
53
+ }
54
+
55
+ /**
56
+ * Constructs a <code>ProjectShortestApiResult</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/ProjectShortestApiResult} obj Optional instance to populate.
60
+ * @return {module:model/ProjectShortestApiResult} The populated <code>ProjectShortestApiResult</code> instance.
61
+ */
62
+ static constructFromObject(data, obj) {
63
+ if (data) {
64
+ obj = obj || new ProjectShortestApiResult();
65
+ if (data.hasOwnProperty('id')) {
66
+ obj['id'] = _ApiClient.default.convertToType(data['id'], 'String');
67
+ }
68
+ if (data.hasOwnProperty('isDeleted')) {
69
+ obj['isDeleted'] = _ApiClient.default.convertToType(data['isDeleted'], 'Boolean');
70
+ }
71
+ if (data.hasOwnProperty('globalId')) {
72
+ obj['globalId'] = _ApiClient.default.convertToType(data['globalId'], 'Number');
73
+ }
74
+ if (data.hasOwnProperty('name')) {
75
+ obj['name'] = _ApiClient.default.convertToType(data['name'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('type')) {
78
+ obj['type'] = _ApiClient.default.convertToType(data['type'], _ProjectTypeModel.default);
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>ProjectShortestApiResult</code>.
86
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ProjectShortestApiResult</code>.
88
+ */
89
+ static validateJSON(data) {
90
+ // check to make sure all required properties are present in the JSON string
91
+ for (const property of ProjectShortestApiResult.RequiredProperties) {
92
+ if (!data.hasOwnProperty(property)) {
93
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
94
+ }
95
+ }
96
+ // ensure the json data is a string
97
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
98
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
99
+ }
100
+ // ensure the json data is a string
101
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
102
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
103
+ }
104
+ return true;
105
+ }
106
+ }
107
+ ProjectShortestApiResult.RequiredProperties = ["id", "isDeleted", "globalId", "name", "type"];
108
+
109
+ /**
110
+ * Unique ID of project
111
+ * @member {String} id
112
+ */
113
+ ProjectShortestApiResult.prototype['id'] = undefined;
114
+
115
+ /**
116
+ * Indicates whether the project is deleted
117
+ * @member {Boolean} isDeleted
118
+ */
119
+ ProjectShortestApiResult.prototype['isDeleted'] = undefined;
120
+
121
+ /**
122
+ * Global ID of project
123
+ * @member {Number} globalId
124
+ */
125
+ ProjectShortestApiResult.prototype['globalId'] = undefined;
126
+
127
+ /**
128
+ * Name of project
129
+ * @member {String} name
130
+ */
131
+ ProjectShortestApiResult.prototype['name'] = undefined;
132
+
133
+ /**
134
+ * Type of the project
135
+ * @member {module:model/ProjectTypeModel} type
136
+ */
137
+ ProjectShortestApiResult.prototype['type'] = undefined;
138
+ var _default = exports.default = ProjectShortestApiResult;