@corellium/corellium-cli 1.3.4 → 1.3.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 (121) hide show
  1. package/coverage/cobertura-coverage.xml +1 -1
  2. package/coverage/lcov-report/index.html +1 -1
  3. package/node_modules/@corellium/client-api/README.md +177 -14
  4. package/node_modules/@corellium/client-api/dist/ApiClient.js +67 -138
  5. package/node_modules/@corellium/client-api/dist/api/CorelliumApi.js +4668 -905
  6. package/node_modules/@corellium/client-api/dist/index.js +469 -37
  7. package/node_modules/@corellium/client-api/dist/model/Address.js +158 -0
  8. package/node_modules/@corellium/client-api/dist/model/AgentApp.js +159 -0
  9. package/node_modules/@corellium/client-api/dist/model/AgentAppReadyResponse.js +112 -0
  10. package/node_modules/@corellium/client-api/dist/model/AgentAppStatus.js +102 -0
  11. package/node_modules/@corellium/client-api/dist/model/AgentAppsList.js +127 -0
  12. package/node_modules/@corellium/client-api/dist/model/AgentAppsStatusList.js +127 -0
  13. package/node_modules/@corellium/client-api/dist/model/AgentError.js +153 -0
  14. package/node_modules/@corellium/client-api/dist/model/AgentIcons.js +89 -0
  15. package/node_modules/@corellium/client-api/dist/model/AgentInstallBody.js +93 -0
  16. package/node_modules/@corellium/client-api/dist/model/AgentProfilesReturn.js +116 -0
  17. package/node_modules/@corellium/client-api/dist/model/AgentSystemAdbAuth.js +89 -0
  18. package/node_modules/@corellium/client-api/dist/model/AgentSystemGetPropBody.js +116 -0
  19. package/node_modules/@corellium/client-api/dist/model/AgentValueReturn.js +93 -0
  20. package/node_modules/@corellium/client-api/dist/model/AgreedAck.js +89 -0
  21. package/node_modules/@corellium/client-api/dist/model/ApiConflictError.js +61 -22
  22. package/node_modules/@corellium/client-api/dist/model/ApiError.js +64 -21
  23. package/node_modules/@corellium/client-api/dist/model/ApiInternalConsistencyError.js +144 -0
  24. package/node_modules/@corellium/client-api/dist/model/ApiNotFoundError.js +65 -23
  25. package/node_modules/@corellium/client-api/dist/model/ApiToken.js +55 -17
  26. package/node_modules/@corellium/client-api/dist/model/Bit.js +24 -14
  27. package/node_modules/@corellium/client-api/dist/model/BtraceEnableOptions.js +93 -0
  28. package/node_modules/@corellium/client-api/dist/model/Button.js +90 -0
  29. package/node_modules/@corellium/client-api/dist/model/CouponOptions.js +161 -0
  30. package/node_modules/@corellium/client-api/dist/model/CreateTeam.js +116 -0
  31. package/node_modules/@corellium/client-api/dist/model/CreatedBy.js +128 -0
  32. package/node_modules/@corellium/client-api/dist/model/Credentials.js +59 -19
  33. package/node_modules/@corellium/client-api/dist/model/DomainOptions.js +103 -0
  34. package/node_modules/@corellium/client-api/dist/model/Extension.js +167 -0
  35. package/node_modules/@corellium/client-api/dist/model/Features.js +260 -0
  36. package/node_modules/@corellium/client-api/dist/model/FileChanges.js +120 -0
  37. package/node_modules/@corellium/client-api/dist/model/Firmware.js +97 -46
  38. package/node_modules/@corellium/client-api/dist/model/GpioStateDefinition.js +55 -20
  39. package/node_modules/@corellium/client-api/dist/model/GpiosState.js +120 -0
  40. package/node_modules/@corellium/client-api/dist/model/GrantTrialRequestResponse.js +93 -0
  41. package/node_modules/@corellium/client-api/dist/model/Hook.js +211 -0
  42. package/node_modules/@corellium/client-api/dist/model/Image.js +99 -49
  43. package/node_modules/@corellium/client-api/dist/model/Instance.js +201 -71
  44. package/node_modules/@corellium/client-api/dist/model/InstanceAgentState.js +106 -0
  45. package/node_modules/@corellium/client-api/dist/model/InstanceBootOptions.js +72 -29
  46. package/node_modules/@corellium/client-api/dist/model/InstanceBootOptionsAdditionalTag.js +90 -0
  47. package/node_modules/@corellium/client-api/dist/model/InstanceConsoleEndpoint.js +34 -17
  48. package/node_modules/@corellium/client-api/dist/model/InstanceCreateOptions.js +126 -49
  49. package/node_modules/@corellium/client-api/dist/model/InstanceInput.js +181 -0
  50. package/node_modules/@corellium/client-api/dist/model/InstanceNetdumpState.js +115 -0
  51. package/node_modules/@corellium/client-api/dist/model/InstanceNetmonState.js +56 -16
  52. package/node_modules/@corellium/client-api/dist/model/InstanceReturn.js +55 -20
  53. package/node_modules/@corellium/client-api/dist/model/InstanceServices.js +35 -18
  54. package/node_modules/@corellium/client-api/dist/model/InstanceStartOptions.js +39 -17
  55. package/node_modules/@corellium/client-api/dist/model/InstanceState.js +52 -21
  56. package/node_modules/@corellium/client-api/dist/model/InstanceStopOptions.js +30 -17
  57. package/node_modules/@corellium/client-api/dist/model/InstanceUpgradeBody.js +129 -0
  58. package/node_modules/@corellium/client-api/dist/model/Invitation.js +115 -0
  59. package/node_modules/@corellium/client-api/dist/model/InviteRevokeParams.js +94 -0
  60. package/node_modules/@corellium/client-api/dist/model/InviteRevokeParamsIds.js +150 -0
  61. package/node_modules/@corellium/client-api/dist/model/Kcrange.js +106 -0
  62. package/node_modules/@corellium/client-api/dist/model/KernelTask.js +149 -0
  63. package/node_modules/@corellium/client-api/dist/model/KernelThread.js +115 -0
  64. package/node_modules/@corellium/client-api/dist/model/MediaPlayBody.js +106 -0
  65. package/node_modules/@corellium/client-api/dist/model/Model.js +97 -35
  66. package/node_modules/@corellium/client-api/dist/model/ModelSoftware.js +77 -28
  67. package/node_modules/@corellium/client-api/dist/model/NetdumpFilter.js +158 -0
  68. package/node_modules/@corellium/client-api/dist/model/PasswordChangeBody.js +146 -0
  69. package/node_modules/@corellium/client-api/dist/model/PasswordResetBody.js +146 -0
  70. package/node_modules/@corellium/client-api/dist/model/PatchInstanceOptions.js +182 -0
  71. package/node_modules/@corellium/client-api/dist/model/PeripheralsData.js +63 -33
  72. package/node_modules/@corellium/client-api/dist/model/Plan.js +106 -0
  73. package/node_modules/@corellium/client-api/dist/model/Project.js +77 -28
  74. package/node_modules/@corellium/client-api/dist/model/ProjectKey.js +206 -0
  75. package/node_modules/@corellium/client-api/dist/model/ProjectQuota.js +35 -21
  76. package/node_modules/@corellium/client-api/dist/model/ProjectSettings.js +35 -21
  77. package/node_modules/@corellium/client-api/dist/model/ProjectUsage.js +37 -23
  78. package/node_modules/@corellium/client-api/dist/model/ProxyConfig.js +116 -0
  79. package/node_modules/@corellium/client-api/dist/model/RateInfo.js +98 -0
  80. package/node_modules/@corellium/client-api/dist/model/ResetLinkBody.js +116 -0
  81. package/node_modules/@corellium/client-api/dist/model/Role.js +164 -0
  82. package/node_modules/@corellium/client-api/dist/model/RotateBody.js +140 -0
  83. package/node_modules/@corellium/client-api/dist/model/Snapshot.js +56 -32
  84. package/node_modules/@corellium/client-api/dist/model/SnapshotCreationOptions.js +54 -17
  85. package/node_modules/@corellium/client-api/dist/model/SnapshotStatus.js +37 -19
  86. package/node_modules/@corellium/client-api/dist/model/SubscriberInvite.js +277 -0
  87. package/node_modules/@corellium/client-api/dist/model/Team.js +162 -0
  88. package/node_modules/@corellium/client-api/dist/model/TeamCreate.js +93 -0
  89. package/node_modules/@corellium/client-api/dist/model/TextInput.js +93 -0
  90. package/node_modules/@corellium/client-api/dist/model/Token.js +56 -19
  91. package/node_modules/@corellium/client-api/dist/model/TouchCurveInput.js +98 -0
  92. package/node_modules/@corellium/client-api/dist/model/TouchInput.js +89 -0
  93. package/node_modules/@corellium/client-api/dist/model/Trial.js +112 -0
  94. package/node_modules/@corellium/client-api/dist/model/TrialExtension.js +124 -0
  95. package/node_modules/@corellium/client-api/dist/model/TrialRequestMetadata.js +146 -0
  96. package/node_modules/@corellium/client-api/dist/model/TrialRequestOptions.js +156 -0
  97. package/node_modules/@corellium/client-api/dist/model/UpdateExtension.js +89 -0
  98. package/node_modules/@corellium/client-api/dist/model/User.js +170 -0
  99. package/node_modules/@corellium/client-api/dist/model/UserError.js +65 -22
  100. package/node_modules/@corellium/client-api/dist/model/V1CreateHookParameters.js +179 -0
  101. package/node_modules/@corellium/client-api/dist/model/V1LoadExtensionParameters.js +116 -0
  102. package/node_modules/@corellium/client-api/dist/model/V1SetStateBody.js +50 -18
  103. package/node_modules/@corellium/client-api/dist/model/ValidationError.js +157 -0
  104. package/node_modules/@corellium/client-api/dist/model/VolumeOptions.js +42 -21
  105. package/node_modules/@corellium/client-api/dist/model/VpnDefinition.js +45 -23
  106. package/node_modules/@corellium/client-api/dist/model/WebPlayerCreateSessionRequest.js +171 -0
  107. package/node_modules/@corellium/client-api/dist/model/WebPlayerSession.js +142 -0
  108. package/node_modules/@corellium/client-api/package.json +1 -1
  109. package/package.json +2 -2
  110. package/renovate.json +96 -0
  111. package/src/commands/login.js +6 -4
  112. package/src/commands/mast/constants.js +1 -2
  113. package/src/commands/mast/create-assessment.js +2 -3
  114. package/src/commands/mast/delete-assessment.js +2 -3
  115. package/src/commands/mast/download-report.js +3 -4
  116. package/src/commands/mast/get-assessment.js +2 -3
  117. package/src/commands/mast/get-assessments.js +2 -3
  118. package/src/commands/mast/start-monitor.js +2 -3
  119. package/src/commands/mast/stop-monitor.js +2 -3
  120. package/src/commands/mast/test.js +2 -3
  121. package/src/commands/mast/api-base-path.js +0 -21
@@ -0,0 +1,146 @@
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(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
10
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
11
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
17
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
18
+ * Corellium API
19
+ * REST API to manage your virtual devices.
20
+ *
21
+ * The version of the OpenAPI document: 4.5.0-16775
22
+ *
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The PasswordChangeBody model module.
31
+ * @module model/PasswordChangeBody
32
+ * @version 0.3.2
33
+ */
34
+ var PasswordChangeBody = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PasswordChangeBody</code>.
37
+ *
38
+ * @alias module:model/PasswordChangeBody
39
+ * @param user {String} userId
40
+ * @param oldPassword {String} old password
41
+ * @param newPassword {String} new password
42
+ */
43
+ function PasswordChangeBody(user, oldPassword, newPassword) {
44
+ _classCallCheck(this, PasswordChangeBody);
45
+ PasswordChangeBody.initialize(this, user, oldPassword, newPassword);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ _createClass(PasswordChangeBody, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, user, oldPassword, newPassword) {
56
+ obj['user'] = user;
57
+ obj['old-password'] = oldPassword;
58
+ obj['new-password'] = newPassword;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>PasswordChangeBody</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @param {module:model/PasswordChangeBody} obj Optional instance to populate.
66
+ * @return {module:model/PasswordChangeBody} The populated <code>PasswordChangeBody</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new PasswordChangeBody();
73
+ if (data.hasOwnProperty('user')) {
74
+ obj['user'] = _ApiClient["default"].convertToType(data['user'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('old-password')) {
77
+ obj['old-password'] = _ApiClient["default"].convertToType(data['old-password'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('new-password')) {
80
+ obj['new-password'] = _ApiClient["default"].convertToType(data['new-password'], 'String');
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+
86
+ /**
87
+ * Validates the JSON data with respect to <code>PasswordChangeBody</code>.
88
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
89
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PasswordChangeBody</code>.
90
+ */
91
+ }, {
92
+ key: "validateJSON",
93
+ value: function validateJSON(data) {
94
+ // check to make sure all required properties are present in the JSON string
95
+ var _iterator = _createForOfIteratorHelper(PasswordChangeBody.RequiredProperties),
96
+ _step;
97
+ try {
98
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
99
+ var property = _step.value;
100
+ if (!data[property]) {
101
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
102
+ }
103
+ }
104
+ // ensure the json data is a string
105
+ } catch (err) {
106
+ _iterator.e(err);
107
+ } finally {
108
+ _iterator.f();
109
+ }
110
+ if (data['user'] && !(typeof data['user'] === 'string' || data['user'] instanceof String)) {
111
+ throw new Error("Expected the field `user` to be a primitive type in the JSON string but got " + data['user']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['old-password'] && !(typeof data['old-password'] === 'string' || data['old-password'] instanceof String)) {
115
+ throw new Error("Expected the field `old-password` to be a primitive type in the JSON string but got " + data['old-password']);
116
+ }
117
+ // ensure the json data is a string
118
+ if (data['new-password'] && !(typeof data['new-password'] === 'string' || data['new-password'] instanceof String)) {
119
+ throw new Error("Expected the field `new-password` to be a primitive type in the JSON string but got " + data['new-password']);
120
+ }
121
+ return true;
122
+ }
123
+ }]);
124
+ return PasswordChangeBody;
125
+ }();
126
+ PasswordChangeBody.RequiredProperties = ["user", "old-password", "new-password"];
127
+
128
+ /**
129
+ * userId
130
+ * @member {String} user
131
+ */
132
+ PasswordChangeBody.prototype['user'] = undefined;
133
+
134
+ /**
135
+ * old password
136
+ * @member {String} old-password
137
+ */
138
+ PasswordChangeBody.prototype['old-password'] = undefined;
139
+
140
+ /**
141
+ * new password
142
+ * @member {String} new-password
143
+ */
144
+ PasswordChangeBody.prototype['new-password'] = undefined;
145
+ var _default = PasswordChangeBody;
146
+ exports["default"] = _default;
@@ -0,0 +1,146 @@
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(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
10
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
11
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
17
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
18
+ * Corellium API
19
+ * REST API to manage your virtual devices.
20
+ *
21
+ * The version of the OpenAPI document: 4.5.0-16775
22
+ *
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The PasswordResetBody model module.
31
+ * @module model/PasswordResetBody
32
+ * @version 0.3.2
33
+ */
34
+ var PasswordResetBody = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PasswordResetBody</code>.
37
+ *
38
+ * @alias module:model/PasswordResetBody
39
+ * @param token {String} Password reset token
40
+ * @param totpToken {String} Password reset totpToken
41
+ * @param newPassword {String} new password
42
+ */
43
+ function PasswordResetBody(token, totpToken, newPassword) {
44
+ _classCallCheck(this, PasswordResetBody);
45
+ PasswordResetBody.initialize(this, token, totpToken, newPassword);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ _createClass(PasswordResetBody, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, token, totpToken, newPassword) {
56
+ obj['token'] = token;
57
+ obj['totpToken'] = totpToken;
58
+ obj['new-password'] = newPassword;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>PasswordResetBody</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @param {module:model/PasswordResetBody} obj Optional instance to populate.
66
+ * @return {module:model/PasswordResetBody} The populated <code>PasswordResetBody</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new PasswordResetBody();
73
+ if (data.hasOwnProperty('token')) {
74
+ obj['token'] = _ApiClient["default"].convertToType(data['token'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('totpToken')) {
77
+ obj['totpToken'] = _ApiClient["default"].convertToType(data['totpToken'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('new-password')) {
80
+ obj['new-password'] = _ApiClient["default"].convertToType(data['new-password'], 'String');
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+
86
+ /**
87
+ * Validates the JSON data with respect to <code>PasswordResetBody</code>.
88
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
89
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PasswordResetBody</code>.
90
+ */
91
+ }, {
92
+ key: "validateJSON",
93
+ value: function validateJSON(data) {
94
+ // check to make sure all required properties are present in the JSON string
95
+ var _iterator = _createForOfIteratorHelper(PasswordResetBody.RequiredProperties),
96
+ _step;
97
+ try {
98
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
99
+ var property = _step.value;
100
+ if (!data[property]) {
101
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
102
+ }
103
+ }
104
+ // ensure the json data is a string
105
+ } catch (err) {
106
+ _iterator.e(err);
107
+ } finally {
108
+ _iterator.f();
109
+ }
110
+ if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) {
111
+ throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['totpToken'] && !(typeof data['totpToken'] === 'string' || data['totpToken'] instanceof String)) {
115
+ throw new Error("Expected the field `totpToken` to be a primitive type in the JSON string but got " + data['totpToken']);
116
+ }
117
+ // ensure the json data is a string
118
+ if (data['new-password'] && !(typeof data['new-password'] === 'string' || data['new-password'] instanceof String)) {
119
+ throw new Error("Expected the field `new-password` to be a primitive type in the JSON string but got " + data['new-password']);
120
+ }
121
+ return true;
122
+ }
123
+ }]);
124
+ return PasswordResetBody;
125
+ }();
126
+ PasswordResetBody.RequiredProperties = ["token", "totpToken", "new-password"];
127
+
128
+ /**
129
+ * Password reset token
130
+ * @member {String} token
131
+ */
132
+ PasswordResetBody.prototype['token'] = undefined;
133
+
134
+ /**
135
+ * Password reset totpToken
136
+ * @member {String} totpToken
137
+ */
138
+ PasswordResetBody.prototype['totpToken'] = undefined;
139
+
140
+ /**
141
+ * new password
142
+ * @member {String} new-password
143
+ */
144
+ PasswordResetBody.prototype['new-password'] = undefined;
145
+ var _default = PasswordResetBody;
146
+ exports["default"] = _default;
@@ -0,0 +1,182 @@
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 _InstanceBootOptions = _interopRequireDefault(require("./InstanceBootOptions"));
9
+ var _ProxyConfig = _interopRequireDefault(require("./ProxyConfig"));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
15
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
17
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
20
+ * Corellium API
21
+ * REST API to manage your virtual devices.
22
+ *
23
+ * The version of the OpenAPI document: 4.5.0-16775
24
+ *
25
+ *
26
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
+ * https://openapi-generator.tech
28
+ * Do not edit the class manually.
29
+ *
30
+ */
31
+ /**
32
+ * The PatchInstanceOptions model module.
33
+ * @module model/PatchInstanceOptions
34
+ * @version 0.3.2
35
+ */
36
+ var PatchInstanceOptions = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>PatchInstanceOptions</code>.
39
+ *
40
+ * @alias module:model/PatchInstanceOptions
41
+ */
42
+ function PatchInstanceOptions() {
43
+ _classCallCheck(this, PatchInstanceOptions);
44
+ PatchInstanceOptions.initialize(this);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ _createClass(PatchInstanceOptions, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj) {}
55
+
56
+ /**
57
+ * Constructs a <code>PatchInstanceOptions</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/PatchInstanceOptions} obj Optional instance to populate.
61
+ * @return {module:model/PatchInstanceOptions} The populated <code>PatchInstanceOptions</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new PatchInstanceOptions();
68
+ if (data.hasOwnProperty('name')) {
69
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('state')) {
72
+ obj['state'] = _ApiClient["default"].convertToType(data['state'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('bootOptions')) {
75
+ obj['bootOptions'] = _InstanceBootOptions["default"].constructFromObject(data['bootOptions']);
76
+ }
77
+ if (data.hasOwnProperty('proxy')) {
78
+ obj['proxy'] = _ApiClient["default"].convertToType(data['proxy'], [_ProxyConfig["default"]]);
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>PatchInstanceOptions</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>PatchInstanceOptions</code>.
88
+ */
89
+ }, {
90
+ key: "validateJSON",
91
+ value: function validateJSON(data) {
92
+ // ensure the json data is a string
93
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
94
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
95
+ }
96
+ // ensure the json data is a string
97
+ if (data['state'] && !(typeof data['state'] === 'string' || data['state'] instanceof String)) {
98
+ throw new Error("Expected the field `state` to be a primitive type in the JSON string but got " + data['state']);
99
+ }
100
+ // validate the optional field `bootOptions`
101
+ if (data['bootOptions']) {
102
+ // data not null
103
+ _InstanceBootOptions["default"].validateJSON(data['bootOptions']);
104
+ }
105
+ if (data['proxy']) {
106
+ // data not null
107
+ // ensure the json data is an array
108
+ if (!Array.isArray(data['proxy'])) {
109
+ throw new Error("Expected the field `proxy` to be an array in the JSON data but got " + data['proxy']);
110
+ }
111
+ // validate the optional field `proxy` (array)
112
+ var _iterator = _createForOfIteratorHelper(data['proxy']),
113
+ _step;
114
+ try {
115
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
116
+ var item = _step.value;
117
+ _ProxyConfig["default"].validateJSON(item);
118
+ }
119
+ } catch (err) {
120
+ _iterator.e(err);
121
+ } finally {
122
+ _iterator.f();
123
+ }
124
+ ;
125
+ }
126
+ return true;
127
+ }
128
+ }]);
129
+ return PatchInstanceOptions;
130
+ }();
131
+ /**
132
+ * the name of the device
133
+ * @member {String} name
134
+ */
135
+ PatchInstanceOptions.prototype['name'] = undefined;
136
+
137
+ /**
138
+ * the desired state of the device
139
+ * @member {module:model/PatchInstanceOptions.StateEnum} state
140
+ */
141
+ PatchInstanceOptions.prototype['state'] = undefined;
142
+
143
+ /**
144
+ * @member {module:model/InstanceBootOptions} bootOptions
145
+ */
146
+ PatchInstanceOptions.prototype['bootOptions'] = undefined;
147
+
148
+ /**
149
+ *
150
+ * @member {Array.<module:model/ProxyConfig>} proxy
151
+ */
152
+ PatchInstanceOptions.prototype['proxy'] = undefined;
153
+
154
+ /**
155
+ * Allowed values for the <code>state</code> property.
156
+ * @enum {String}
157
+ * @readonly
158
+ */
159
+ PatchInstanceOptions['StateEnum'] = {
160
+ /**
161
+ * value: "on"
162
+ * @const
163
+ */
164
+ "on": "on",
165
+ /**
166
+ * value: "off"
167
+ * @const
168
+ */
169
+ "off": "off",
170
+ /**
171
+ * value: "paused"
172
+ * @const
173
+ */
174
+ "paused": "paused",
175
+ /**
176
+ * value: "deleting"
177
+ * @const
178
+ */
179
+ "deleting": "deleting"
180
+ };
181
+ var _default = PatchInstanceOptions;
182
+ exports["default"] = _default;