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,86 @@
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 HealthStatusResponse model module.
24
+ * @module model/HealthStatusResponse
25
+ * @version 0.1.0
26
+ */
27
+ class HealthStatusResponse {
28
+ /**
29
+ * Constructs a new <code>HealthStatusResponse</code>.
30
+ * @alias module:model/HealthStatusResponse
31
+ */
32
+ constructor() {
33
+ HealthStatusResponse.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>HealthStatusResponse</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/HealthStatusResponse} obj Optional instance to populate.
48
+ * @return {module:model/HealthStatusResponse} The populated <code>HealthStatusResponse</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new HealthStatusResponse();
53
+ if (data.hasOwnProperty('status')) {
54
+ obj['status'] = _ApiClient.default.convertToType(data['status'], 'String');
55
+ }
56
+ if (data.hasOwnProperty('last_update')) {
57
+ obj['last_update'] = _ApiClient.default.convertToType(data['last_update'], 'Date');
58
+ }
59
+ }
60
+ return obj;
61
+ }
62
+
63
+ /**
64
+ * Validates the JSON data with respect to <code>HealthStatusResponse</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>HealthStatusResponse</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
+ return true;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * @member {String} status
79
+ */
80
+ HealthStatusResponse.prototype['status'] = undefined;
81
+
82
+ /**
83
+ * @member {Date} last_update
84
+ */
85
+ HealthStatusResponse.prototype['last_update'] = undefined;
86
+ var _default = exports.default = HealthStatusResponse;
@@ -0,0 +1,74 @@
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 InProgressPublishedResponse model module.
24
+ * @module model/InProgressPublishedResponse
25
+ * @version 0.1.0
26
+ */
27
+ class InProgressPublishedResponse {
28
+ /**
29
+ * Constructs a new <code>InProgressPublishedResponse</code>.
30
+ * @alias module:model/InProgressPublishedResponse
31
+ */
32
+ constructor() {
33
+ InProgressPublishedResponse.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>InProgressPublishedResponse</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/InProgressPublishedResponse} obj Optional instance to populate.
48
+ * @return {module:model/InProgressPublishedResponse} The populated <code>InProgressPublishedResponse</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new InProgressPublishedResponse();
53
+ if (data.hasOwnProperty('published')) {
54
+ obj['published'] = _ApiClient.default.convertToType(data['published'], 'Boolean');
55
+ }
56
+ }
57
+ return obj;
58
+ }
59
+
60
+ /**
61
+ * Validates the JSON data with respect to <code>InProgressPublishedResponse</code>.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>InProgressPublishedResponse</code>.
64
+ */
65
+ static validateJSON(data) {
66
+ return true;
67
+ }
68
+ }
69
+
70
+ /**
71
+ * @member {Boolean} published
72
+ */
73
+ InProgressPublishedResponse.prototype['published'] = undefined;
74
+ var _default = exports.default = InProgressPublishedResponse;
@@ -0,0 +1,114 @@
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 RegisterRequest model module.
24
+ * @module model/RegisterRequest
25
+ * @version 0.1.0
26
+ */
27
+ class RegisterRequest {
28
+ /**
29
+ * Constructs a new <code>RegisterRequest</code>.
30
+ * @alias module:model/RegisterRequest
31
+ */
32
+ constructor() {
33
+ RegisterRequest.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>RegisterRequest</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/RegisterRequest} obj Optional instance to populate.
48
+ * @return {module:model/RegisterRequest} The populated <code>RegisterRequest</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new RegisterRequest();
53
+ if (data.hasOwnProperty('pid')) {
54
+ obj['pid'] = _ApiClient.default.convertToType(data['pid'], 'String');
55
+ }
56
+ if (data.hasOwnProperty('testRunId')) {
57
+ obj['testRunId'] = _ApiClient.default.convertToType(data['testRunId'], 'String');
58
+ }
59
+ if (data.hasOwnProperty('baseUrl')) {
60
+ obj['baseUrl'] = _ApiClient.default.convertToType(data['baseUrl'], 'String');
61
+ }
62
+ if (data.hasOwnProperty('privateToken')) {
63
+ obj['privateToken'] = _ApiClient.default.convertToType(data['privateToken'], 'String');
64
+ }
65
+ }
66
+ return obj;
67
+ }
68
+
69
+ /**
70
+ * Validates the JSON data with respect to <code>RegisterRequest</code>.
71
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
72
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RegisterRequest</code>.
73
+ */
74
+ static validateJSON(data) {
75
+ // ensure the json data is a string
76
+ if (data['pid'] && !(typeof data['pid'] === 'string' || data['pid'] instanceof String)) {
77
+ throw new Error("Expected the field `pid` to be a primitive type in the JSON string but got " + data['pid']);
78
+ }
79
+ // ensure the json data is a string
80
+ if (data['testRunId'] && !(typeof data['testRunId'] === 'string' || data['testRunId'] instanceof String)) {
81
+ throw new Error("Expected the field `testRunId` to be a primitive type in the JSON string but got " + data['testRunId']);
82
+ }
83
+ // ensure the json data is a string
84
+ if (data['baseUrl'] && !(typeof data['baseUrl'] === 'string' || data['baseUrl'] instanceof String)) {
85
+ throw new Error("Expected the field `baseUrl` to be a primitive type in the JSON string but got " + data['baseUrl']);
86
+ }
87
+ // ensure the json data is a string
88
+ if (data['privateToken'] && !(typeof data['privateToken'] === 'string' || data['privateToken'] instanceof String)) {
89
+ throw new Error("Expected the field `privateToken` to be a primitive type in the JSON string but got " + data['privateToken']);
90
+ }
91
+ return true;
92
+ }
93
+ }
94
+
95
+ /**
96
+ * @member {String} pid
97
+ */
98
+ RegisterRequest.prototype['pid'] = undefined;
99
+
100
+ /**
101
+ * @member {String} testRunId
102
+ */
103
+ RegisterRequest.prototype['testRunId'] = undefined;
104
+
105
+ /**
106
+ * @member {String} baseUrl
107
+ */
108
+ RegisterRequest.prototype['baseUrl'] = undefined;
109
+
110
+ /**
111
+ * @member {String} privateToken
112
+ */
113
+ RegisterRequest.prototype['privateToken'] = undefined;
114
+ var _default = exports.default = RegisterRequest;
@@ -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 RegisterResponse model module.
24
+ * @module model/RegisterResponse
25
+ * @version 0.1.0
26
+ */
27
+ class RegisterResponse {
28
+ /**
29
+ * Constructs a new <code>RegisterResponse</code>.
30
+ * @alias module:model/RegisterResponse
31
+ */
32
+ constructor() {
33
+ RegisterResponse.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>RegisterResponse</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/RegisterResponse} obj Optional instance to populate.
48
+ * @return {module:model/RegisterResponse} The populated <code>RegisterResponse</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new RegisterResponse();
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
+ if (data.hasOwnProperty('pid')) {
60
+ obj['pid'] = _ApiClient.default.convertToType(data['pid'], 'String');
61
+ }
62
+ if (data.hasOwnProperty('testRunId')) {
63
+ obj['testRunId'] = _ApiClient.default.convertToType(data['testRunId'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('is_master')) {
66
+ obj['is_master'] = _ApiClient.default.convertToType(data['is_master'], 'Boolean');
67
+ }
68
+ }
69
+ return obj;
70
+ }
71
+
72
+ /**
73
+ * Validates the JSON data with respect to <code>RegisterResponse</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>RegisterResponse</code>.
76
+ */
77
+ static validateJSON(data) {
78
+ // ensure the json data is a string
79
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
80
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
81
+ }
82
+ // ensure the json data is a string
83
+ if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
84
+ throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
85
+ }
86
+ // ensure the json data is a string
87
+ if (data['pid'] && !(typeof data['pid'] === 'string' || data['pid'] instanceof String)) {
88
+ throw new Error("Expected the field `pid` to be a primitive type in the JSON string but got " + data['pid']);
89
+ }
90
+ // ensure the json data is a string
91
+ if (data['testRunId'] && !(typeof data['testRunId'] === 'string' || data['testRunId'] instanceof String)) {
92
+ throw new Error("Expected the field `testRunId` to be a primitive type in the JSON string but got " + data['testRunId']);
93
+ }
94
+ return true;
95
+ }
96
+ }
97
+
98
+ /**
99
+ * @member {String} status
100
+ */
101
+ RegisterResponse.prototype['status'] = undefined;
102
+
103
+ /**
104
+ * @member {String} message
105
+ */
106
+ RegisterResponse.prototype['message'] = undefined;
107
+
108
+ /**
109
+ * @member {String} pid
110
+ */
111
+ RegisterResponse.prototype['pid'] = undefined;
112
+
113
+ /**
114
+ * @member {String} testRunId
115
+ */
116
+ RegisterResponse.prototype['testRunId'] = undefined;
117
+
118
+ /**
119
+ * @member {Boolean} is_master
120
+ */
121
+ RegisterResponse.prototype['is_master'] = undefined;
122
+ var _default = exports.default = RegisterResponse;
@@ -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
+ 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 SetWorkerStatusRequest model module.
24
+ * @module model/SetWorkerStatusRequest
25
+ * @version 0.1.0
26
+ */
27
+ class SetWorkerStatusRequest {
28
+ /**
29
+ * Constructs a new <code>SetWorkerStatusRequest</code>.
30
+ * @alias module:model/SetWorkerStatusRequest
31
+ */
32
+ constructor() {
33
+ SetWorkerStatusRequest.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>SetWorkerStatusRequest</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/SetWorkerStatusRequest} obj Optional instance to populate.
48
+ * @return {module:model/SetWorkerStatusRequest} The populated <code>SetWorkerStatusRequest</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new SetWorkerStatusRequest();
53
+ if (data.hasOwnProperty('pid')) {
54
+ obj['pid'] = _ApiClient.default.convertToType(data['pid'], 'String');
55
+ }
56
+ if (data.hasOwnProperty('status')) {
57
+ obj['status'] = _ApiClient.default.convertToType(data['status'], 'String');
58
+ }
59
+ if (data.hasOwnProperty('testRunId')) {
60
+ obj['testRunId'] = _ApiClient.default.convertToType(data['testRunId'], 'String');
61
+ }
62
+ }
63
+ return obj;
64
+ }
65
+
66
+ /**
67
+ * Validates the JSON data with respect to <code>SetWorkerStatusRequest</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>SetWorkerStatusRequest</code>.
70
+ */
71
+ static validateJSON(data) {
72
+ // ensure the json data is a string
73
+ if (data['pid'] && !(typeof data['pid'] === 'string' || data['pid'] instanceof String)) {
74
+ throw new Error("Expected the field `pid` to be a primitive type in the JSON string but got " + data['pid']);
75
+ }
76
+ // ensure the json data is a string
77
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
78
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
79
+ }
80
+ // ensure the json data is a string
81
+ if (data['testRunId'] && !(typeof data['testRunId'] === 'string' || data['testRunId'] instanceof String)) {
82
+ throw new Error("Expected the field `testRunId` to be a primitive type in the JSON string but got " + data['testRunId']);
83
+ }
84
+ return true;
85
+ }
86
+ }
87
+
88
+ /**
89
+ * @member {String} pid
90
+ */
91
+ SetWorkerStatusRequest.prototype['pid'] = undefined;
92
+
93
+ /**
94
+ * @member {String} status
95
+ */
96
+ SetWorkerStatusRequest.prototype['status'] = undefined;
97
+
98
+ /**
99
+ * @member {String} testRunId
100
+ */
101
+ SetWorkerStatusRequest.prototype['testRunId'] = undefined;
102
+ var _default = exports.default = SetWorkerStatusRequest;
@@ -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 SetWorkerStatusResponse model module.
24
+ * @module model/SetWorkerStatusResponse
25
+ * @version 0.1.0
26
+ */
27
+ class SetWorkerStatusResponse {
28
+ /**
29
+ * Constructs a new <code>SetWorkerStatusResponse</code>.
30
+ * @alias module:model/SetWorkerStatusResponse
31
+ */
32
+ constructor() {
33
+ SetWorkerStatusResponse.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>SetWorkerStatusResponse</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/SetWorkerStatusResponse} obj Optional instance to populate.
48
+ * @return {module:model/SetWorkerStatusResponse} The populated <code>SetWorkerStatusResponse</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new SetWorkerStatusResponse();
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>SetWorkerStatusResponse</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>SetWorkerStatusResponse</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
+ SetWorkerStatusResponse.prototype['status'] = undefined;
85
+
86
+ /**
87
+ * @member {String} message
88
+ */
89
+ SetWorkerStatusResponse.prototype['message'] = undefined;
90
+ var _default = exports.default = SetWorkerStatusResponse;
@@ -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 ShutdownResponse model module.
24
+ * @module model/ShutdownResponse
25
+ * @version 0.1.0
26
+ */
27
+ class ShutdownResponse {
28
+ /**
29
+ * Constructs a new <code>ShutdownResponse</code>.
30
+ * @alias module:model/ShutdownResponse
31
+ */
32
+ constructor() {
33
+ ShutdownResponse.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>ShutdownResponse</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/ShutdownResponse} obj Optional instance to populate.
48
+ * @return {module:model/ShutdownResponse} The populated <code>ShutdownResponse</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new ShutdownResponse();
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>ShutdownResponse</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>ShutdownResponse</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
+ ShutdownResponse.prototype['status'] = undefined;
85
+
86
+ /**
87
+ * @member {String} message
88
+ */
89
+ ShutdownResponse.prototype['message'] = undefined;
90
+ var _default = exports.default = ShutdownResponse;