testit-js-commons 3.7.9 → 4.0.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 (45) hide show
  1. package/lib/common/types/config.type.d.ts +8 -0
  2. package/lib/common/utils/index.d.ts +1 -0
  3. package/lib/common/utils/index.js +1 -0
  4. package/lib/common/utils/tms-load-test-run-debug.d.ts +3 -0
  5. package/lib/common/utils/tms-load-test-run-debug.js +20 -0
  6. package/lib/helpers/config/config.helper.js +14 -6
  7. package/lib/helpers/config/config.helper.test.d.ts +1 -0
  8. package/lib/helpers/config/config.helper.test.js +40 -0
  9. package/lib/services/attachments/attachments.service.js +89 -22
  10. package/lib/services/index.d.ts +1 -0
  11. package/lib/services/index.js +1 -0
  12. package/lib/services/syncstorage/index.d.ts +2 -0
  13. package/lib/services/syncstorage/index.js +18 -0
  14. package/lib/services/syncstorage/syncstorage.runner.d.ts +49 -0
  15. package/lib/services/syncstorage/syncstorage.runner.js +350 -0
  16. package/lib/services/syncstorage/syncstorage.runner.test.d.ts +1 -0
  17. package/lib/services/syncstorage/syncstorage.runner.test.js +78 -0
  18. package/lib/services/syncstorage/syncstorage.type.d.ts +21 -0
  19. package/lib/services/syncstorage/syncstorage.type.js +19 -0
  20. package/lib/services/testruns/testruns.converter.d.ts +2 -0
  21. package/lib/services/testruns/testruns.converter.js +3 -0
  22. package/lib/services/testruns/testruns.service.d.ts +2 -0
  23. package/lib/services/testruns/testruns.service.js +62 -1
  24. package/lib/services/testruns/testruns.type.d.ts +2 -0
  25. package/lib/strategy/base.strategy.d.ts +4 -0
  26. package/lib/strategy/base.strategy.js +97 -2
  27. package/lib/sync-storage/dist/ApiClient.js +655 -0
  28. package/lib/sync-storage/dist/api/CompletionApi.js +114 -0
  29. package/lib/sync-storage/dist/api/HealthApi.js +69 -0
  30. package/lib/sync-storage/dist/api/SystemApi.js +69 -0
  31. package/lib/sync-storage/dist/api/TestResultsApi.js +122 -0
  32. package/lib/sync-storage/dist/api/WorkersApi.js +113 -0
  33. package/lib/sync-storage/dist/index.js +118 -0
  34. package/lib/sync-storage/dist/model/CompletionResponse.js +86 -0
  35. package/lib/sync-storage/dist/model/HealthStatusResponse.js +86 -0
  36. package/lib/sync-storage/dist/model/InProgressPublishedResponse.js +74 -0
  37. package/lib/sync-storage/dist/model/RegisterRequest.js +114 -0
  38. package/lib/sync-storage/dist/model/RegisterResponse.js +122 -0
  39. package/lib/sync-storage/dist/model/SetWorkerStatusRequest.js +102 -0
  40. package/lib/sync-storage/dist/model/SetWorkerStatusResponse.js +90 -0
  41. package/lib/sync-storage/dist/model/ShutdownResponse.js +90 -0
  42. package/lib/sync-storage/dist/model/TestResultCutApiModel.js +122 -0
  43. package/lib/sync-storage/dist/model/TestResultSaveResponse.js +90 -0
  44. package/lib/sync-storage/index.d.ts +772 -0
  45. package/package.json +7 -4
@@ -0,0 +1,122 @@
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
+ * Sync Storage Service API
11
+ * This is a sync storage service for coordinating test workers.
12
+ *
13
+ * The version of the OpenAPI document: 1.0
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 TestResultCutApiModel model module.
24
+ * @module model/TestResultCutApiModel
25
+ * @version 0.1.0
26
+ */
27
+ class TestResultCutApiModel {
28
+ /**
29
+ * Constructs a new <code>TestResultCutApiModel</code>.
30
+ * @alias module:model/TestResultCutApiModel
31
+ */
32
+ constructor() {
33
+ TestResultCutApiModel.initialize(this);
34
+ }
35
+
36
+ /**
37
+ * Initializes the fields of this object.
38
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
39
+ * Only for internal use.
40
+ */
41
+ static initialize(obj) {}
42
+
43
+ /**
44
+ * Constructs a <code>TestResultCutApiModel</code> from a plain JavaScript object, optionally creating a new instance.
45
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
46
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
47
+ * @param {module:model/TestResultCutApiModel} obj Optional instance to populate.
48
+ * @return {module:model/TestResultCutApiModel} The populated <code>TestResultCutApiModel</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new TestResultCutApiModel();
53
+ if (data.hasOwnProperty('projectId')) {
54
+ obj['projectId'] = _ApiClient.default.convertToType(data['projectId'], 'String');
55
+ }
56
+ if (data.hasOwnProperty('autoTestExternalId')) {
57
+ obj['autoTestExternalId'] = _ApiClient.default.convertToType(data['autoTestExternalId'], 'String');
58
+ }
59
+ if (data.hasOwnProperty('statusCode')) {
60
+ obj['statusCode'] = _ApiClient.default.convertToType(data['statusCode'], 'String');
61
+ }
62
+ if (data.hasOwnProperty('statusType')) {
63
+ obj['statusType'] = _ApiClient.default.convertToType(data['statusType'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('startedOn')) {
66
+ obj['startedOn'] = _ApiClient.default.convertToType(data['startedOn'], 'Date');
67
+ }
68
+ }
69
+ return obj;
70
+ }
71
+
72
+ /**
73
+ * Validates the JSON data with respect to <code>TestResultCutApiModel</code>.
74
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
75
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TestResultCutApiModel</code>.
76
+ */
77
+ static validateJSON(data) {
78
+ // ensure the json data is a string
79
+ if (data['projectId'] && !(typeof data['projectId'] === 'string' || data['projectId'] instanceof String)) {
80
+ throw new Error("Expected the field `projectId` to be a primitive type in the JSON string but got " + data['projectId']);
81
+ }
82
+ // ensure the json data is a string
83
+ if (data['autoTestExternalId'] && !(typeof data['autoTestExternalId'] === 'string' || data['autoTestExternalId'] instanceof String)) {
84
+ throw new Error("Expected the field `autoTestExternalId` to be a primitive type in the JSON string but got " + data['autoTestExternalId']);
85
+ }
86
+ // ensure the json data is a string
87
+ if (data['statusCode'] && !(typeof data['statusCode'] === 'string' || data['statusCode'] instanceof String)) {
88
+ throw new Error("Expected the field `statusCode` to be a primitive type in the JSON string but got " + data['statusCode']);
89
+ }
90
+ // ensure the json data is a string
91
+ if (data['statusType'] && !(typeof data['statusType'] === 'string' || data['statusType'] instanceof String)) {
92
+ throw new Error("Expected the field `statusType` to be a primitive type in the JSON string but got " + data['statusType']);
93
+ }
94
+ return true;
95
+ }
96
+ }
97
+
98
+ /**
99
+ * @member {String} projectId
100
+ */
101
+ TestResultCutApiModel.prototype['projectId'] = undefined;
102
+
103
+ /**
104
+ * @member {String} autoTestExternalId
105
+ */
106
+ TestResultCutApiModel.prototype['autoTestExternalId'] = undefined;
107
+
108
+ /**
109
+ * @member {String} statusCode
110
+ */
111
+ TestResultCutApiModel.prototype['statusCode'] = undefined;
112
+
113
+ /**
114
+ * @member {String} statusType
115
+ */
116
+ TestResultCutApiModel.prototype['statusType'] = undefined;
117
+
118
+ /**
119
+ * @member {Date} startedOn
120
+ */
121
+ TestResultCutApiModel.prototype['startedOn'] = undefined;
122
+ var _default = exports.default = TestResultCutApiModel;
@@ -0,0 +1,90 @@
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
+ * Sync Storage Service API
11
+ * This is a sync storage service for coordinating test workers.
12
+ *
13
+ * The version of the OpenAPI document: 1.0
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 TestResultSaveResponse model module.
24
+ * @module model/TestResultSaveResponse
25
+ * @version 0.1.0
26
+ */
27
+ class TestResultSaveResponse {
28
+ /**
29
+ * Constructs a new <code>TestResultSaveResponse</code>.
30
+ * @alias module:model/TestResultSaveResponse
31
+ */
32
+ constructor() {
33
+ TestResultSaveResponse.initialize(this);
34
+ }
35
+
36
+ /**
37
+ * Initializes the fields of this object.
38
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
39
+ * Only for internal use.
40
+ */
41
+ static initialize(obj) {}
42
+
43
+ /**
44
+ * Constructs a <code>TestResultSaveResponse</code> from a plain JavaScript object, optionally creating a new instance.
45
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
46
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
47
+ * @param {module:model/TestResultSaveResponse} obj Optional instance to populate.
48
+ * @return {module:model/TestResultSaveResponse} The populated <code>TestResultSaveResponse</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new TestResultSaveResponse();
53
+ if (data.hasOwnProperty('status')) {
54
+ obj['status'] = _ApiClient.default.convertToType(data['status'], 'String');
55
+ }
56
+ if (data.hasOwnProperty('message')) {
57
+ obj['message'] = _ApiClient.default.convertToType(data['message'], 'String');
58
+ }
59
+ }
60
+ return obj;
61
+ }
62
+
63
+ /**
64
+ * Validates the JSON data with respect to <code>TestResultSaveResponse</code>.
65
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
66
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TestResultSaveResponse</code>.
67
+ */
68
+ static validateJSON(data) {
69
+ // ensure the json data is a string
70
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
71
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
72
+ }
73
+ // ensure the json data is a string
74
+ if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
75
+ throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
76
+ }
77
+ return true;
78
+ }
79
+ }
80
+
81
+ /**
82
+ * @member {String} status
83
+ */
84
+ TestResultSaveResponse.prototype['status'] = undefined;
85
+
86
+ /**
87
+ * @member {String} message
88
+ */
89
+ TestResultSaveResponse.prototype['message'] = undefined;
90
+ var _default = exports.default = TestResultSaveResponse;