@blues-inc/notehub-js 1.0.37-beta.16 → 1.0.37-beta.18
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.
- package/README.md +20 -19
- package/dist/ApiClient.js +2 -2
- package/dist/api/AlertApi.js +1 -1
- package/dist/api/AuthorizationApi.js +1 -64
- package/dist/api/BillingAccountApi.js +1 -1
- package/dist/api/DeviceApi.js +8 -8
- package/dist/api/EventApi.js +1 -1
- package/dist/api/ExternalDevicesApi.js +1 -1
- package/dist/api/MonitorApi.js +10 -10
- package/dist/api/ProjectApi.js +14 -14
- package/dist/api/RouteApi.js +1 -1
- package/dist/api/WebhookApi.js +1 -1
- package/dist/index.js +127 -99
- package/dist/model/Alert.js +91 -91
- package/dist/model/AlertDataInner.js +10 -10
- package/dist/model/AlertNotificationsInner.js +10 -10
- package/dist/model/{UsageEventsData.js → AnalyticsEventsData.js} +30 -44
- package/dist/model/{UsageSessionsResponse.js → AnalyticsEventsResponse.js} +25 -25
- package/dist/model/{UsageRouteLogsData.js → AnalyticsRouteLogsData.js} +32 -46
- package/dist/model/{UsageRouteLogsResponse.js → AnalyticsRouteLogsResponse.js} +25 -25
- package/dist/model/{UsageSessionsData.js → AnalyticsSessionsData.js} +32 -36
- package/dist/model/{UsageEventsResponse.js → AnalyticsSessionsResponse.js} +25 -25
- package/dist/model/Aws.js +86 -86
- package/dist/model/Azure.js +51 -51
- package/dist/model/BillingAccount.js +19 -19
- package/dist/model/Body.js +1 -1
- package/dist/model/CellularPlan.js +168 -0
- package/dist/model/CloneProjectRequest.js +25 -25
- package/dist/model/Contact.js +19 -19
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateMonitor.js +186 -186
- package/dist/model/CreateProductRequest.js +30 -30
- package/dist/model/CreateProjectRequest.js +20 -20
- package/dist/model/CreateUpdateRepository.js +18 -18
- package/dist/model/CumulativeDataUsage.js +133 -0
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +60 -60
- package/dist/model/DataField.js +1 -1
- package/dist/model/DataSet.js +164 -0
- package/dist/model/DataSetField.js +14 -14
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +173 -129
- package/dist/model/DeviceDfuHistory.js +15 -15
- package/dist/model/DeviceDfuHistoryPage.js +1 -1
- package/dist/model/DeviceDfuStateMachine.js +14 -14
- package/dist/model/DeviceDfuStateMachineNode.js +27 -27
- package/dist/model/DeviceDfuStatus.js +15 -15
- package/dist/model/{DeviceDfuHistoryCurrent.js → DeviceDfuStatusCurrent.js} +52 -52
- package/dist/model/DeviceDfuStatusPage.js +1 -1
- package/dist/model/DeviceSatellitePlan.js +196 -0
- package/dist/model/DeviceSession.js +278 -278
- package/dist/model/DeviceTowerInfo.js +15 -15
- package/dist/model/DeviceUsage.js +36 -36
- package/dist/model/DfuActionRequest.js +1 -1
- package/dist/model/EmailNotification.js +1 -1
- package/dist/model/EnvTreeJsonNode.js +76 -76
- package/dist/model/EnvVar.js +9 -9
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +38 -38
- package/dist/model/Event.js +340 -340
- package/dist/model/Firmware.js +45 -45
- package/dist/model/FirmwareInfo.js +71 -71
- package/dist/model/Fleet.js +31 -31
- package/dist/model/GetAlerts200Response.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/{GetDeviceEnvironmentVariablesByPin200Response.js → GetDeviceEnvironmentVariables200Response.js} +30 -30
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +15 -15
- package/dist/model/GetDeviceLatest200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +18 -18
- package/dist/model/GetDeviceSessions200Response.js +14 -14
- package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +1 -1
- package/dist/model/GetProjectEvents200Response.js +1 -1
- package/dist/model/GetProjectEventsByCursor200Response.js +16 -16
- package/dist/model/{GetDeviceFleets200Response.js → GetProjectFleets200Response.js} +20 -20
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectProducts200Response.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetWebhooks200Response.js +1 -1
- package/dist/model/Google.js +35 -35
- package/dist/model/HandleNoteChanges200Response.js +10 -10
- package/dist/model/HandleNoteGet200Response.js +1 -1
- package/dist/model/HandleNoteSignal200Response.js +1 -1
- package/dist/model/HandleNotefileChanges200Response.js +10 -10
- package/dist/model/HandleNotefileChangesPending200Response.js +15 -15
- package/dist/model/HandleNotefileDeleteRequest.js +1 -1
- package/dist/model/Http.js +43 -43
- package/dist/model/{AwsFilter.js → HttpFilter.js} +32 -32
- package/dist/model/{AwsTransform.js → HttpTransform.js} +21 -21
- package/dist/model/Location.js +38 -38
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +135 -135
- package/dist/model/MonitorAlertRoutesInner.js +12 -12
- package/dist/model/Mqtt.js +91 -91
- package/dist/model/Note.js +1 -1
- package/dist/model/NotefileSchema.js +1 -1
- package/dist/model/NotehubRoute.js +30 -30
- package/dist/model/NotehubRouteSchema.js +80 -80
- package/dist/model/PersonalAccessToken.js +37 -37
- package/dist/model/PersonalAccessTokenCreatedBy.js +13 -13
- package/dist/model/PersonalAccessTokenInfo.js +13 -13
- package/dist/model/PersonalAccessTokenSecret.js +14 -14
- package/dist/model/PostProvisionProjectDeviceRequest.js +14 -14
- package/dist/model/Product.js +29 -29
- package/dist/model/Project.js +35 -35
- package/dist/model/ProjectMember.js +19 -19
- package/dist/model/Proxy.js +21 -21
- package/dist/model/PutDeviceFleetsRequest.js +1 -1
- package/dist/model/QuestionDataResponseLineChart.js +204 -0
- package/dist/model/{OAuth2Error.js → QuestionDataResponseMap.js} +42 -65
- package/dist/model/Radresponder.js +28 -28
- package/dist/model/Repository.js +22 -22
- package/dist/model/RouteLog.js +28 -28
- package/dist/model/{OAuth2TokenResponse.js → SatellitePlan.js} +65 -53
- package/dist/model/SchemaProperty.js +36 -34
- package/dist/model/SimUsage.js +20 -20
- package/dist/model/Slack.js +71 -71
- package/dist/model/SlackBearerNotification.js +14 -14
- package/dist/model/SlackWebHookNotification.js +14 -14
- package/dist/model/Snowflake.js +57 -57
- package/dist/model/{SlackTransform.js → SnowflakeTransform.js} +19 -19
- package/dist/model/Thingworx.js +36 -36
- package/dist/model/TowerLocation.js +58 -58
- package/dist/model/Twilio.js +46 -46
- package/dist/model/UpdateFleetRequest.js +14 -14
- package/dist/model/UploadMetadata.js +68 -68
- package/dist/model/UserDbRoute.js +26 -26
- package/dist/model/UserDfuStateMachine.js +14 -14
- package/dist/model/UserDfuStateMachineStatus.js +9 -9
- package/dist/model/UserFirmwareInfo.js +1 -1
- package/dist/model/WebhookSettings.js +1 -1
- package/package.json +1 -1
- package/dist/api/UsageApi.js +0 -225
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The DeviceDfuStateMachineNode model module.
|
|
28
28
|
* @module model/DeviceDfuStateMachineNode
|
|
29
|
-
* @version 1.0.37-beta.
|
|
29
|
+
* @version 1.0.37-beta.18
|
|
30
30
|
*/
|
|
31
31
|
var DeviceDfuStateMachineNode = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -60,18 +60,18 @@ var DeviceDfuStateMachineNode = /*#__PURE__*/function () {
|
|
|
60
60
|
value: function constructFromObject(data, obj) {
|
|
61
61
|
if (data) {
|
|
62
62
|
obj = obj || new DeviceDfuStateMachineNode();
|
|
63
|
+
if (data.hasOwnProperty('status')) {
|
|
64
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('phase')) {
|
|
67
|
+
obj['phase'] = _ApiClient["default"].convertToType(data['phase'], 'String');
|
|
68
|
+
}
|
|
63
69
|
if (data.hasOwnProperty('datetime')) {
|
|
64
70
|
obj['datetime'] = _ApiClient["default"].convertToType(data['datetime'], 'String');
|
|
65
71
|
}
|
|
66
72
|
if (data.hasOwnProperty('description')) {
|
|
67
73
|
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
68
74
|
}
|
|
69
|
-
if (data.hasOwnProperty('phase')) {
|
|
70
|
-
obj['phase'] = _ApiClient["default"].convertToType(data['phase'], 'String');
|
|
71
|
-
}
|
|
72
|
-
if (data.hasOwnProperty('status')) {
|
|
73
|
-
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
74
|
-
}
|
|
75
75
|
} else if (data === null) {
|
|
76
76
|
return null;
|
|
77
77
|
}
|
|
@@ -87,36 +87,30 @@ var DeviceDfuStateMachineNode = /*#__PURE__*/function () {
|
|
|
87
87
|
key: "validateJSON",
|
|
88
88
|
value: function validateJSON(data) {
|
|
89
89
|
// ensure the json data is a string
|
|
90
|
-
if (data['
|
|
91
|
-
throw new Error("Expected the field `
|
|
92
|
-
}
|
|
93
|
-
// ensure the json data is a string
|
|
94
|
-
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
95
|
-
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
90
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
91
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
96
92
|
}
|
|
97
93
|
// ensure the json data is a string
|
|
98
94
|
if (data['phase'] && !(typeof data['phase'] === 'string' || data['phase'] instanceof String)) {
|
|
99
95
|
throw new Error("Expected the field `phase` to be a primitive type in the JSON string but got " + data['phase']);
|
|
100
96
|
}
|
|
101
97
|
// ensure the json data is a string
|
|
102
|
-
if (data['
|
|
103
|
-
throw new Error("Expected the field `
|
|
98
|
+
if (data['datetime'] && !(typeof data['datetime'] === 'string' || data['datetime'] instanceof String)) {
|
|
99
|
+
throw new Error("Expected the field `datetime` to be a primitive type in the JSON string but got " + data['datetime']);
|
|
100
|
+
}
|
|
101
|
+
// ensure the json data is a string
|
|
102
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
104
104
|
}
|
|
105
105
|
return true;
|
|
106
106
|
}
|
|
107
107
|
}]);
|
|
108
108
|
}();
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
111
|
-
* @member {String}
|
|
112
|
-
*/
|
|
113
|
-
DeviceDfuStateMachineNode.prototype['datetime'] = undefined;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Additional information
|
|
117
|
-
* @member {String} description
|
|
110
|
+
* Status for this step in the firmware update process
|
|
111
|
+
* @member {String} status
|
|
118
112
|
*/
|
|
119
|
-
DeviceDfuStateMachineNode.prototype['
|
|
113
|
+
DeviceDfuStateMachineNode.prototype['status'] = undefined;
|
|
120
114
|
|
|
121
115
|
/**
|
|
122
116
|
* Phase for this step in the firmware update process
|
|
@@ -125,8 +119,14 @@ DeviceDfuStateMachineNode.prototype['description'] = undefined;
|
|
|
125
119
|
DeviceDfuStateMachineNode.prototype['phase'] = undefined;
|
|
126
120
|
|
|
127
121
|
/**
|
|
128
|
-
*
|
|
129
|
-
* @member {String}
|
|
122
|
+
* RFC3339 compatible datetime of when this status update happened
|
|
123
|
+
* @member {String} datetime
|
|
130
124
|
*/
|
|
131
|
-
DeviceDfuStateMachineNode.prototype['
|
|
125
|
+
DeviceDfuStateMachineNode.prototype['datetime'] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Additional information
|
|
129
|
+
* @member {String} description
|
|
130
|
+
*/
|
|
131
|
+
DeviceDfuStateMachineNode.prototype['description'] = undefined;
|
|
132
132
|
var _default = exports["default"] = DeviceDfuStateMachineNode;
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _DeviceDfuHistoryCurrent = _interopRequireDefault(require("./DeviceDfuHistoryCurrent"));
|
|
9
8
|
var _DeviceDfuStateMachine = _interopRequireDefault(require("./DeviceDfuStateMachine"));
|
|
9
|
+
var _DeviceDfuStatusCurrent = _interopRequireDefault(require("./DeviceDfuStatusCurrent"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
11
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
12
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
/**
|
|
29
29
|
* The DeviceDfuStatus model module.
|
|
30
30
|
* @module model/DeviceDfuStatus
|
|
31
|
-
* @version 1.0.37-beta.
|
|
31
|
+
* @version 1.0.37-beta.18
|
|
32
32
|
*/
|
|
33
33
|
var DeviceDfuStatus = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -61,15 +61,15 @@ var DeviceDfuStatus = /*#__PURE__*/function () {
|
|
|
61
61
|
value: function constructFromObject(data, obj) {
|
|
62
62
|
if (data) {
|
|
63
63
|
obj = obj || new DeviceDfuStatus();
|
|
64
|
-
if (data.hasOwnProperty('current')) {
|
|
65
|
-
obj['current'] = _DeviceDfuHistoryCurrent["default"].constructFromObject(data['current']);
|
|
66
|
-
}
|
|
67
64
|
if (data.hasOwnProperty('device_uid')) {
|
|
68
65
|
obj['device_uid'] = _ApiClient["default"].convertToType(data['device_uid'], 'String');
|
|
69
66
|
}
|
|
70
67
|
if (data.hasOwnProperty('dfu_in_progress')) {
|
|
71
68
|
obj['dfu_in_progress'] = _ApiClient["default"].convertToType(data['dfu_in_progress'], 'Boolean');
|
|
72
69
|
}
|
|
70
|
+
if (data.hasOwnProperty('current')) {
|
|
71
|
+
obj['current'] = _DeviceDfuStatusCurrent["default"].constructFromObject(data['current']);
|
|
72
|
+
}
|
|
73
73
|
if (data.hasOwnProperty('status')) {
|
|
74
74
|
obj['status'] = _DeviceDfuStateMachine["default"].constructFromObject(data['status']);
|
|
75
75
|
}
|
|
@@ -87,15 +87,15 @@ var DeviceDfuStatus = /*#__PURE__*/function () {
|
|
|
87
87
|
}, {
|
|
88
88
|
key: "validateJSON",
|
|
89
89
|
value: function validateJSON(data) {
|
|
90
|
-
// validate the optional field `current`
|
|
91
|
-
if (data['current']) {
|
|
92
|
-
// data not null
|
|
93
|
-
_DeviceDfuHistoryCurrent["default"].validateJSON(data['current']);
|
|
94
|
-
}
|
|
95
90
|
// ensure the json data is a string
|
|
96
91
|
if (data['device_uid'] && !(typeof data['device_uid'] === 'string' || data['device_uid'] instanceof String)) {
|
|
97
92
|
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data['device_uid']);
|
|
98
93
|
}
|
|
94
|
+
// validate the optional field `current`
|
|
95
|
+
if (data['current']) {
|
|
96
|
+
// data not null
|
|
97
|
+
_DeviceDfuStatusCurrent["default"].validateJSON(data['current']);
|
|
98
|
+
}
|
|
99
99
|
// validate the optional field `status`
|
|
100
100
|
if (data['status']) {
|
|
101
101
|
// data not null
|
|
@@ -105,11 +105,6 @@ var DeviceDfuStatus = /*#__PURE__*/function () {
|
|
|
105
105
|
}
|
|
106
106
|
}]);
|
|
107
107
|
}();
|
|
108
|
-
/**
|
|
109
|
-
* @member {module:model/DeviceDfuHistoryCurrent} current
|
|
110
|
-
*/
|
|
111
|
-
DeviceDfuStatus.prototype['current'] = undefined;
|
|
112
|
-
|
|
113
108
|
/**
|
|
114
109
|
* Device UID
|
|
115
110
|
* @member {String} device_uid
|
|
@@ -122,6 +117,11 @@ DeviceDfuStatus.prototype['device_uid'] = undefined;
|
|
|
122
117
|
*/
|
|
123
118
|
DeviceDfuStatus.prototype['dfu_in_progress'] = undefined;
|
|
124
119
|
|
|
120
|
+
/**
|
|
121
|
+
* @member {module:model/DeviceDfuStatusCurrent} current
|
|
122
|
+
*/
|
|
123
|
+
DeviceDfuStatus.prototype['current'] = undefined;
|
|
124
|
+
|
|
125
125
|
/**
|
|
126
126
|
* @member {module:model/DeviceDfuStateMachine} status
|
|
127
127
|
*/
|
|
@@ -24,19 +24,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
/**
|
|
27
|
-
* The
|
|
28
|
-
* @module model/
|
|
29
|
-
* @version 1.0.37-beta.
|
|
27
|
+
* The DeviceDfuStatusCurrent model module.
|
|
28
|
+
* @module model/DeviceDfuStatusCurrent
|
|
29
|
+
* @version 1.0.37-beta.18
|
|
30
30
|
*/
|
|
31
|
-
var
|
|
31
|
+
var DeviceDfuStatusCurrent = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
33
|
-
* Constructs a new <code>
|
|
33
|
+
* Constructs a new <code>DeviceDfuStatusCurrent</code>.
|
|
34
34
|
* Description of the current firmware
|
|
35
|
-
* @alias module:model/
|
|
35
|
+
* @alias module:model/DeviceDfuStatusCurrent
|
|
36
36
|
*/
|
|
37
|
-
function
|
|
38
|
-
_classCallCheck(this,
|
|
39
|
-
|
|
37
|
+
function DeviceDfuStatusCurrent() {
|
|
38
|
+
_classCallCheck(this, DeviceDfuStatusCurrent);
|
|
39
|
+
DeviceDfuStatusCurrent.initialize(this);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -44,39 +44,39 @@ var DeviceDfuHistoryCurrent = /*#__PURE__*/function () {
|
|
|
44
44
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
45
|
* Only for internal use.
|
|
46
46
|
*/
|
|
47
|
-
return _createClass(
|
|
47
|
+
return _createClass(DeviceDfuStatusCurrent, null, [{
|
|
48
48
|
key: "initialize",
|
|
49
49
|
value: function initialize(obj) {}
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* Constructs a <code>
|
|
52
|
+
* Constructs a <code>DeviceDfuStatusCurrent</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
53
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
54
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
-
* @param {module:model/
|
|
56
|
-
* @return {module:model/
|
|
55
|
+
* @param {module:model/DeviceDfuStatusCurrent} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/DeviceDfuStatusCurrent} The populated <code>DeviceDfuStatusCurrent</code> instance.
|
|
57
57
|
*/
|
|
58
58
|
}, {
|
|
59
59
|
key: "constructFromObject",
|
|
60
60
|
value: function constructFromObject(data, obj) {
|
|
61
61
|
if (data) {
|
|
62
|
-
obj = obj || new
|
|
63
|
-
if (data.hasOwnProperty('
|
|
64
|
-
obj['
|
|
62
|
+
obj = obj || new DeviceDfuStatusCurrent();
|
|
63
|
+
if (data.hasOwnProperty('version')) {
|
|
64
|
+
obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
|
|
65
65
|
}
|
|
66
|
-
if (data.hasOwnProperty('
|
|
67
|
-
obj['
|
|
66
|
+
if (data.hasOwnProperty('organization')) {
|
|
67
|
+
obj['organization'] = _ApiClient["default"].convertToType(data['organization'], 'String');
|
|
68
68
|
}
|
|
69
69
|
if (data.hasOwnProperty('description')) {
|
|
70
70
|
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
71
71
|
}
|
|
72
|
-
if (data.hasOwnProperty('organization')) {
|
|
73
|
-
obj['organization'] = _ApiClient["default"].convertToType(data['organization'], 'String');
|
|
74
|
-
}
|
|
75
72
|
if (data.hasOwnProperty('product')) {
|
|
76
73
|
obj['product'] = _ApiClient["default"].convertToType(data['product'], 'String');
|
|
77
74
|
}
|
|
78
|
-
if (data.hasOwnProperty('
|
|
79
|
-
obj['
|
|
75
|
+
if (data.hasOwnProperty('built')) {
|
|
76
|
+
obj['built'] = _ApiClient["default"].convertToType(data['built'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('builder')) {
|
|
79
|
+
obj['builder'] = _ApiClient["default"].convertToType(data['builder'], 'String');
|
|
80
80
|
}
|
|
81
81
|
} else if (data === null) {
|
|
82
82
|
return null;
|
|
@@ -85,74 +85,74 @@ var DeviceDfuHistoryCurrent = /*#__PURE__*/function () {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* Validates the JSON data with respect to <code>
|
|
88
|
+
* Validates the JSON data with respect to <code>DeviceDfuStatusCurrent</code>.
|
|
89
89
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
90
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
90
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeviceDfuStatusCurrent</code>.
|
|
91
91
|
*/
|
|
92
92
|
}, {
|
|
93
93
|
key: "validateJSON",
|
|
94
94
|
value: function validateJSON(data) {
|
|
95
95
|
// ensure the json data is a string
|
|
96
|
-
if (data['
|
|
97
|
-
throw new Error("Expected the field `
|
|
96
|
+
if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
|
|
98
98
|
}
|
|
99
99
|
// ensure the json data is a string
|
|
100
|
-
if (data['
|
|
101
|
-
throw new Error("Expected the field `
|
|
100
|
+
if (data['organization'] && !(typeof data['organization'] === 'string' || data['organization'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `organization` to be a primitive type in the JSON string but got " + data['organization']);
|
|
102
102
|
}
|
|
103
103
|
// ensure the json data is a string
|
|
104
104
|
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
105
105
|
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
106
106
|
}
|
|
107
107
|
// ensure the json data is a string
|
|
108
|
-
if (data['organization'] && !(typeof data['organization'] === 'string' || data['organization'] instanceof String)) {
|
|
109
|
-
throw new Error("Expected the field `organization` to be a primitive type in the JSON string but got " + data['organization']);
|
|
110
|
-
}
|
|
111
|
-
// ensure the json data is a string
|
|
112
108
|
if (data['product'] && !(typeof data['product'] === 'string' || data['product'] instanceof String)) {
|
|
113
109
|
throw new Error("Expected the field `product` to be a primitive type in the JSON string but got " + data['product']);
|
|
114
110
|
}
|
|
115
111
|
// ensure the json data is a string
|
|
116
|
-
if (data['
|
|
117
|
-
throw new Error("Expected the field `
|
|
112
|
+
if (data['built'] && !(typeof data['built'] === 'string' || data['built'] instanceof String)) {
|
|
113
|
+
throw new Error("Expected the field `built` to be a primitive type in the JSON string but got " + data['built']);
|
|
114
|
+
}
|
|
115
|
+
// ensure the json data is a string
|
|
116
|
+
if (data['builder'] && !(typeof data['builder'] === 'string' || data['builder'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `builder` to be a primitive type in the JSON string but got " + data['builder']);
|
|
118
118
|
}
|
|
119
119
|
return true;
|
|
120
120
|
}
|
|
121
121
|
}]);
|
|
122
122
|
}();
|
|
123
123
|
/**
|
|
124
|
-
* Firmware
|
|
125
|
-
* @member {String}
|
|
124
|
+
* Firmware version
|
|
125
|
+
* @member {String} version
|
|
126
126
|
*/
|
|
127
|
-
|
|
127
|
+
DeviceDfuStatusCurrent.prototype['version'] = undefined;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* Firmware
|
|
131
|
-
* @member {String}
|
|
130
|
+
* Firmware organization
|
|
131
|
+
* @member {String} organization
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
DeviceDfuStatusCurrent.prototype['organization'] = undefined;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Firmware description
|
|
137
137
|
* @member {String} description
|
|
138
138
|
*/
|
|
139
|
-
|
|
139
|
+
DeviceDfuStatusCurrent.prototype['description'] = undefined;
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
* Firmware
|
|
143
|
-
* @member {String}
|
|
142
|
+
* Firmware product
|
|
143
|
+
* @member {String} product
|
|
144
144
|
*/
|
|
145
|
-
|
|
145
|
+
DeviceDfuStatusCurrent.prototype['product'] = undefined;
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* Firmware
|
|
149
|
-
* @member {String}
|
|
148
|
+
* Firmware build date
|
|
149
|
+
* @member {String} built
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
DeviceDfuStatusCurrent.prototype['built'] = undefined;
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
* Firmware
|
|
155
|
-
* @member {String}
|
|
154
|
+
* Firmware author
|
|
155
|
+
* @member {String} builder
|
|
156
156
|
*/
|
|
157
|
-
|
|
158
|
-
var _default = exports["default"] =
|
|
157
|
+
DeviceDfuStatusCurrent.prototype['builder'] = undefined;
|
|
158
|
+
var _default = exports["default"] = DeviceDfuStatusCurrent;
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The DeviceDfuStatusPage model module.
|
|
32
32
|
* @module model/DeviceDfuStatusPage
|
|
33
|
-
* @version 1.0.37-beta.
|
|
33
|
+
* @version 1.0.37-beta.18
|
|
34
34
|
*/
|
|
35
35
|
var DeviceDfuStatusPage = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -0,0 +1,196 @@
|
|
|
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 _CumulativeDataUsage = _interopRequireDefault(require("./CumulativeDataUsage"));
|
|
9
|
+
var _SatellitePlan = _interopRequireDefault(require("./SatellitePlan"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Notehub API
|
|
21
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document: 1.2.0
|
|
24
|
+
* Contact: engineering@blues.io
|
|
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 DeviceSatellitePlan model module.
|
|
33
|
+
* @module model/DeviceSatellitePlan
|
|
34
|
+
* @version 1.0.37-beta.18
|
|
35
|
+
*/
|
|
36
|
+
var DeviceSatellitePlan = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>DeviceSatellitePlan</code>.
|
|
39
|
+
* @alias module:model/DeviceSatellitePlan
|
|
40
|
+
* @implements module:model/SatellitePlan
|
|
41
|
+
* @param ntnProvider {String} Non-Terrestrial Network provider name
|
|
42
|
+
* @param psid {String} Provider-specific identifier for the satellite subscription
|
|
43
|
+
* @param activated {Number} Activation date of the satellite plan as Unix timestamp
|
|
44
|
+
* @param cumulativeBillableBytes {module:model/CumulativeDataUsage}
|
|
45
|
+
*/
|
|
46
|
+
function DeviceSatellitePlan(ntnProvider, psid, activated, cumulativeBillableBytes) {
|
|
47
|
+
_classCallCheck(this, DeviceSatellitePlan);
|
|
48
|
+
_SatellitePlan["default"].initialize(this, ntnProvider, psid, activated, cumulativeBillableBytes);
|
|
49
|
+
DeviceSatellitePlan.initialize(this, ntnProvider, psid, activated, cumulativeBillableBytes);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Initializes the fields of this object.
|
|
54
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
55
|
+
* Only for internal use.
|
|
56
|
+
*/
|
|
57
|
+
return _createClass(DeviceSatellitePlan, null, [{
|
|
58
|
+
key: "initialize",
|
|
59
|
+
value: function initialize(obj, ntnProvider, psid, activated, cumulativeBillableBytes) {
|
|
60
|
+
obj['ntn_provider'] = ntnProvider;
|
|
61
|
+
obj['psid'] = psid;
|
|
62
|
+
obj['activated'] = activated;
|
|
63
|
+
obj['cumulative_billable_bytes'] = cumulativeBillableBytes;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Constructs a <code>DeviceSatellitePlan</code> from a plain JavaScript object, optionally creating a new instance.
|
|
68
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
69
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
70
|
+
* @param {module:model/DeviceSatellitePlan} obj Optional instance to populate.
|
|
71
|
+
* @return {module:model/DeviceSatellitePlan} The populated <code>DeviceSatellitePlan</code> instance.
|
|
72
|
+
*/
|
|
73
|
+
}, {
|
|
74
|
+
key: "constructFromObject",
|
|
75
|
+
value: function constructFromObject(data, obj) {
|
|
76
|
+
if (data) {
|
|
77
|
+
obj = obj || new DeviceSatellitePlan();
|
|
78
|
+
_SatellitePlan["default"].constructFromObject(data, obj);
|
|
79
|
+
if (data.hasOwnProperty('ntn_provider')) {
|
|
80
|
+
obj['ntn_provider'] = _ApiClient["default"].convertToType(data['ntn_provider'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('psid')) {
|
|
83
|
+
obj['psid'] = _ApiClient["default"].convertToType(data['psid'], 'String');
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('activated')) {
|
|
86
|
+
obj['activated'] = _ApiClient["default"].convertToType(data['activated'], 'Number');
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('cumulative_billable_bytes')) {
|
|
89
|
+
obj['cumulative_billable_bytes'] = _CumulativeDataUsage["default"].constructFromObject(data['cumulative_billable_bytes']);
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('last_updated')) {
|
|
92
|
+
obj['last_updated'] = _ApiClient["default"].convertToType(data['last_updated'], 'Number');
|
|
93
|
+
}
|
|
94
|
+
} else if (data === null) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
return obj;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Validates the JSON data with respect to <code>DeviceSatellitePlan</code>.
|
|
102
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
103
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeviceSatellitePlan</code>.
|
|
104
|
+
*/
|
|
105
|
+
}, {
|
|
106
|
+
key: "validateJSON",
|
|
107
|
+
value: function validateJSON(data) {
|
|
108
|
+
// check to make sure all required properties are present in the JSON string
|
|
109
|
+
var _iterator = _createForOfIteratorHelper(DeviceSatellitePlan.RequiredProperties),
|
|
110
|
+
_step;
|
|
111
|
+
try {
|
|
112
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
113
|
+
var property = _step.value;
|
|
114
|
+
if (!data[property]) {
|
|
115
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// ensure the json data is a string
|
|
119
|
+
} catch (err) {
|
|
120
|
+
_iterator.e(err);
|
|
121
|
+
} finally {
|
|
122
|
+
_iterator.f();
|
|
123
|
+
}
|
|
124
|
+
if (data['ntn_provider'] && !(typeof data['ntn_provider'] === 'string' || data['ntn_provider'] instanceof String)) {
|
|
125
|
+
throw new Error("Expected the field `ntn_provider` to be a primitive type in the JSON string but got " + data['ntn_provider']);
|
|
126
|
+
}
|
|
127
|
+
// ensure the json data is a string
|
|
128
|
+
if (data['psid'] && !(typeof data['psid'] === 'string' || data['psid'] instanceof String)) {
|
|
129
|
+
throw new Error("Expected the field `psid` to be a primitive type in the JSON string but got " + data['psid']);
|
|
130
|
+
}
|
|
131
|
+
// validate the optional field `cumulative_billable_bytes`
|
|
132
|
+
if (data['cumulative_billable_bytes']) {
|
|
133
|
+
// data not null
|
|
134
|
+
_CumulativeDataUsage["default"].validateJSON(data['cumulative_billable_bytes']);
|
|
135
|
+
}
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
}]);
|
|
139
|
+
}();
|
|
140
|
+
DeviceSatellitePlan.RequiredProperties = ["ntn_provider", "psid", "activated", "cumulative_billable_bytes"];
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Non-Terrestrial Network provider name
|
|
144
|
+
* @member {String} ntn_provider
|
|
145
|
+
*/
|
|
146
|
+
DeviceSatellitePlan.prototype['ntn_provider'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Provider-specific identifier for the satellite subscription
|
|
150
|
+
* @member {String} psid
|
|
151
|
+
*/
|
|
152
|
+
DeviceSatellitePlan.prototype['psid'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Activation date of the satellite plan as Unix timestamp
|
|
156
|
+
* @member {Number} activated
|
|
157
|
+
*/
|
|
158
|
+
DeviceSatellitePlan.prototype['activated'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @member {module:model/CumulativeDataUsage} cumulative_billable_bytes
|
|
162
|
+
*/
|
|
163
|
+
DeviceSatellitePlan.prototype['cumulative_billable_bytes'] = undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Time this plan information was last updated
|
|
167
|
+
* @member {Number} last_updated
|
|
168
|
+
*/
|
|
169
|
+
DeviceSatellitePlan.prototype['last_updated'] = undefined;
|
|
170
|
+
|
|
171
|
+
// Implement SatellitePlan interface:
|
|
172
|
+
/**
|
|
173
|
+
* Non-Terrestrial Network provider name
|
|
174
|
+
* @member {String} ntn_provider
|
|
175
|
+
*/
|
|
176
|
+
_SatellitePlan["default"].prototype['ntn_provider'] = undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Provider-specific identifier for the satellite subscription
|
|
179
|
+
* @member {String} psid
|
|
180
|
+
*/
|
|
181
|
+
_SatellitePlan["default"].prototype['psid'] = undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Activation date of the satellite plan as Unix timestamp
|
|
184
|
+
* @member {Number} activated
|
|
185
|
+
*/
|
|
186
|
+
_SatellitePlan["default"].prototype['activated'] = undefined;
|
|
187
|
+
/**
|
|
188
|
+
* @member {module:model/CumulativeDataUsage} cumulative_billable_bytes
|
|
189
|
+
*/
|
|
190
|
+
_SatellitePlan["default"].prototype['cumulative_billable_bytes'] = undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Time this plan information was last updated
|
|
193
|
+
* @member {Number} last_updated
|
|
194
|
+
*/
|
|
195
|
+
_SatellitePlan["default"].prototype['last_updated'] = undefined;
|
|
196
|
+
var _default = exports["default"] = DeviceSatellitePlan;
|