@blues-inc/notehub-js 1.0.37 → 1.0.38-beta.10
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 +250 -234
- package/dist/ApiClient.js +154 -156
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +79 -16
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +433 -373
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +61 -61
- package/dist/api/ProjectApi.js +397 -387
- package/dist/api/RouteApi.js +77 -77
- package/dist/api/UsageApi.js +285 -0
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +132 -97
- package/dist/model/Alert.js +114 -112
- package/dist/model/AlertDataInner.js +39 -39
- package/dist/model/AlertNotificationsInner.js +22 -22
- package/dist/model/Aws.js +95 -95
- package/dist/model/{HttpFilter.js → AwsFilter.js} +40 -40
- package/dist/model/{HttpTransform.js → AwsTransform.js} +37 -37
- package/dist/model/Azure.js +61 -61
- package/dist/model/BillingAccount.js +28 -28
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/Body.js +5 -5
- package/dist/model/CellularPlan.js +150 -0
- package/dist/model/CloneProjectRequest.js +31 -31
- package/dist/model/Contact.js +26 -26
- package/dist/model/CreateFleetRequest.js +12 -12
- package/dist/model/CreateMonitor.js +216 -215
- package/dist/model/CreateProductRequest.js +36 -36
- package/dist/model/CreateProjectRequest.js +23 -23
- package/dist/model/CreateUpdateRepository.js +22 -22
- package/dist/model/CurrentFirmware.js +16 -16
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +97 -97
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSetField.js +24 -24
- package/dist/model/DataUsage.js +133 -0
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +153 -152
- package/dist/model/DeviceDfuHistory.js +26 -25
- package/dist/model/{DeviceDfuStatusCurrent.js → DeviceDfuHistoryCurrent.js} +58 -58
- package/dist/model/DeviceDfuHistoryPage.js +13 -12
- package/dist/model/DeviceDfuStateMachine.js +30 -29
- package/dist/model/DeviceDfuStateMachineNode.js +30 -30
- package/dist/model/DeviceDfuStatus.js +27 -27
- package/dist/model/DeviceDfuStatusPage.js +13 -12
- package/dist/model/DeviceSession.js +300 -300
- package/dist/model/DeviceTowerInfo.js +18 -18
- package/dist/model/DeviceUsage.js +44 -44
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvTreeJsonNode.js +100 -98
- package/dist/model/EnvVar.js +20 -20
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +45 -45
- package/dist/model/Event.js +365 -365
- package/dist/model/Firmware.js +59 -59
- package/dist/model/FirmwareInfo.js +83 -83
- package/dist/model/Fleet.js +47 -47
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/{GetDeviceEnvironmentVariables200Response.js → GetDeviceEnvironmentVariablesByPin200Response.js} +38 -38
- package/dist/model/{GetProjectFleets200Response.js → GetDeviceFleets200Response.js} +30 -29
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +26 -26
- package/dist/model/GetDeviceLatest200Response.js +10 -9
- package/dist/model/GetDevicePlans200Response.js +112 -0
- package/dist/model/GetDevicePublicKey200Response.js +22 -22
- package/dist/model/GetDeviceSessions200Response.js +23 -22
- package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +14 -14
- package/dist/model/GetProjectDevices200Response.js +17 -16
- package/dist/model/GetProjectEvents200Response.js +21 -20
- package/dist/model/GetProjectEventsByCursor200Response.js +31 -30
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjectProducts200Response.js +10 -9
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/Google.js +50 -50
- package/dist/model/HandleNoteChanges200Response.js +16 -16
- package/dist/model/HandleNoteGet200Response.js +13 -13
- package/dist/model/HandleNoteSignal200Response.js +5 -5
- package/dist/model/HandleNotefileChanges200Response.js +16 -16
- package/dist/model/HandleNotefileChangesPending200Response.js +20 -20
- package/dist/model/HandleNotefileDeleteRequest.js +7 -7
- package/dist/model/Http.js +54 -54
- package/dist/model/Location.js +50 -50
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +14 -14
- package/dist/model/Monitor.js +159 -158
- package/dist/model/MonitorAlertRoutesInner.js +18 -19
- package/dist/model/Mqtt.js +98 -98
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotehubRoute.js +49 -49
- package/dist/model/NotehubRouteSchema.js +100 -101
- package/dist/model/{QuestionDataResponseMap.js → OAuth2Error.js} +66 -43
- package/dist/model/OAuth2TokenResponse.js +154 -0
- package/dist/model/PersonalAccessToken.js +49 -49
- package/dist/model/PersonalAccessTokenCreatedBy.js +20 -20
- package/dist/model/PersonalAccessTokenInfo.js +22 -22
- package/dist/model/PersonalAccessTokenSecret.js +16 -16
- package/dist/model/PostProvisionProjectDeviceRequest.js +25 -25
- package/dist/model/Product.js +36 -36
- package/dist/model/Project.js +47 -47
- package/dist/model/ProjectMember.js +28 -28
- package/dist/model/Proxy.js +34 -34
- package/dist/model/PutDeviceFleetsRequest.js +8 -8
- package/dist/model/Radresponder.js +34 -34
- package/dist/model/Repository.js +28 -28
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +48 -48
- package/dist/model/SatellitePlan.js +164 -0
- package/dist/model/SchemaProperty.js +54 -54
- package/dist/model/SimUsage.js +27 -27
- package/dist/model/Slack.js +82 -82
- package/dist/model/SlackBearerNotification.js +30 -30
- package/dist/model/{SnowflakeTransform.js → SlackTransform.js} +28 -28
- package/dist/model/SlackWebHookNotification.js +25 -25
- package/dist/model/Snowflake.js +66 -66
- package/dist/model/Thingworx.js +48 -48
- package/dist/model/TowerLocation.js +75 -75
- package/dist/model/Twilio.js +65 -65
- package/dist/model/UpdateFleetRequest.js +31 -31
- package/dist/model/UploadMetadata.js +86 -73
- package/dist/model/{AnalyticsEventsData.js → UsageData.js} +45 -39
- package/dist/model/{AnalyticsRouteLogsData.js → UsageEventsData.js} +49 -45
- package/dist/model/{AnalyticsEventsResponse.js → UsageEventsResponse.js} +33 -32
- package/dist/model/UsageRouteLogsData.js +154 -0
- package/dist/model/{AnalyticsSessionsResponse.js → UsageRouteLogsResponse.js} +33 -32
- package/dist/model/{AnalyticsSessionsData.js → UsageSessionsData.js} +48 -44
- package/dist/model/{AnalyticsRouteLogsResponse.js → UsageSessionsResponse.js} +33 -32
- package/dist/model/UserDbRoute.js +33 -33
- package/dist/model/UserDfuStateMachine.js +27 -27
- package/dist/model/UserDfuStateMachineStatus.js +23 -23
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +28 -28
- package/dist/model/DataSet.js +0 -163
- package/dist/model/QuestionDataResponseLineChart.js +0 -204
|
@@ -13,7 +13,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
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); } /**
|
|
15
15
|
* Notehub API
|
|
16
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
16
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
17
17
|
*
|
|
18
18
|
* The version of the OpenAPI document: 1.2.0
|
|
19
19
|
* Contact: engineering@blues.io
|
|
@@ -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.
|
|
27
|
+
* The DeviceDfuHistoryCurrent model module.
|
|
28
|
+
* @module model/DeviceDfuHistoryCurrent
|
|
29
|
+
* @version 1.0.38-beta.10
|
|
30
30
|
*/
|
|
31
|
-
var
|
|
31
|
+
var DeviceDfuHistoryCurrent = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
33
|
-
* Constructs a new <code>
|
|
33
|
+
* Constructs a new <code>DeviceDfuHistoryCurrent</code>.
|
|
34
34
|
* Description of the current firmware
|
|
35
|
-
* @alias module:model/
|
|
35
|
+
* @alias module:model/DeviceDfuHistoryCurrent
|
|
36
36
|
*/
|
|
37
|
-
function
|
|
38
|
-
_classCallCheck(this,
|
|
39
|
-
|
|
37
|
+
function DeviceDfuHistoryCurrent() {
|
|
38
|
+
_classCallCheck(this, DeviceDfuHistoryCurrent);
|
|
39
|
+
DeviceDfuHistoryCurrent.initialize(this);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -44,39 +44,39 @@ var DeviceDfuStatusCurrent = /*#__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(DeviceDfuHistoryCurrent, null, [{
|
|
48
48
|
key: "initialize",
|
|
49
49
|
value: function initialize(obj) {}
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* Constructs a <code>
|
|
52
|
+
* Constructs a <code>DeviceDfuHistoryCurrent</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/DeviceDfuHistoryCurrent} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/DeviceDfuHistoryCurrent} The populated <code>DeviceDfuHistoryCurrent</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 DeviceDfuHistoryCurrent();
|
|
63
|
+
if (data.hasOwnProperty('builder')) {
|
|
64
|
+
obj['builder'] = _ApiClient["default"].convertToType(data['builder'], 'String');
|
|
65
65
|
}
|
|
66
|
-
if (data.hasOwnProperty(
|
|
67
|
-
obj[
|
|
66
|
+
if (data.hasOwnProperty('built')) {
|
|
67
|
+
obj['built'] = _ApiClient["default"].convertToType(data['built'], 'String');
|
|
68
68
|
}
|
|
69
|
-
if (data.hasOwnProperty(
|
|
70
|
-
obj[
|
|
69
|
+
if (data.hasOwnProperty('description')) {
|
|
70
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
71
71
|
}
|
|
72
|
-
if (data.hasOwnProperty(
|
|
73
|
-
obj[
|
|
72
|
+
if (data.hasOwnProperty('organization')) {
|
|
73
|
+
obj['organization'] = _ApiClient["default"].convertToType(data['organization'], 'String');
|
|
74
74
|
}
|
|
75
|
-
if (data.hasOwnProperty(
|
|
76
|
-
obj[
|
|
75
|
+
if (data.hasOwnProperty('product')) {
|
|
76
|
+
obj['product'] = _ApiClient["default"].convertToType(data['product'], 'String');
|
|
77
77
|
}
|
|
78
|
-
if (data.hasOwnProperty(
|
|
79
|
-
obj[
|
|
78
|
+
if (data.hasOwnProperty('version')) {
|
|
79
|
+
obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
|
|
80
80
|
}
|
|
81
81
|
} else if (data === null) {
|
|
82
82
|
return null;
|
|
@@ -85,74 +85,74 @@ var DeviceDfuStatusCurrent = /*#__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>DeviceDfuHistoryCurrent</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>DeviceDfuHistoryCurrent</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['builder'] && !(typeof data['builder'] === 'string' || data['builder'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `builder` to be a primitive type in the JSON string but got " + data['builder']);
|
|
98
98
|
}
|
|
99
99
|
// ensure the json data is a string
|
|
100
|
-
if (data[
|
|
101
|
-
throw new Error("Expected the field `
|
|
100
|
+
if (data['built'] && !(typeof data['built'] === 'string' || data['built'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `built` to be a primitive type in the JSON string but got " + data['built']);
|
|
102
102
|
}
|
|
103
103
|
// ensure the json data is a string
|
|
104
|
-
if (data[
|
|
105
|
-
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data[
|
|
104
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
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[
|
|
109
|
-
throw new Error("Expected the field `
|
|
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
110
|
}
|
|
111
111
|
// ensure the json data is a string
|
|
112
|
-
if (data[
|
|
113
|
-
throw new Error("Expected the field `
|
|
112
|
+
if (data['product'] && !(typeof data['product'] === 'string' || data['product'] instanceof String)) {
|
|
113
|
+
throw new Error("Expected the field `product` to be a primitive type in the JSON string but got " + data['product']);
|
|
114
114
|
}
|
|
115
115
|
// ensure the json data is a string
|
|
116
|
-
if (data[
|
|
117
|
-
throw new Error("Expected the field `
|
|
116
|
+
if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
|
|
118
118
|
}
|
|
119
119
|
return true;
|
|
120
120
|
}
|
|
121
121
|
}]);
|
|
122
122
|
}();
|
|
123
123
|
/**
|
|
124
|
-
* Firmware
|
|
125
|
-
* @member {String}
|
|
124
|
+
* Firmware author
|
|
125
|
+
* @member {String} builder
|
|
126
126
|
*/
|
|
127
|
-
|
|
127
|
+
DeviceDfuHistoryCurrent.prototype['builder'] = undefined;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* Firmware
|
|
131
|
-
* @member {String}
|
|
130
|
+
* Firmware build date
|
|
131
|
+
* @member {String} built
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
DeviceDfuHistoryCurrent.prototype['built'] = undefined;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Firmware description
|
|
137
137
|
* @member {String} description
|
|
138
138
|
*/
|
|
139
|
-
|
|
139
|
+
DeviceDfuHistoryCurrent.prototype['description'] = undefined;
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
* Firmware
|
|
143
|
-
* @member {String}
|
|
142
|
+
* Firmware organization
|
|
143
|
+
* @member {String} organization
|
|
144
144
|
*/
|
|
145
|
-
|
|
145
|
+
DeviceDfuHistoryCurrent.prototype['organization'] = undefined;
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* Firmware
|
|
149
|
-
* @member {String}
|
|
148
|
+
* Firmware product
|
|
149
|
+
* @member {String} product
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
DeviceDfuHistoryCurrent.prototype['product'] = undefined;
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
* Firmware
|
|
155
|
-
* @member {String}
|
|
154
|
+
* Firmware version
|
|
155
|
+
* @member {String} version
|
|
156
156
|
*/
|
|
157
|
-
|
|
158
|
-
var _default = exports["default"] =
|
|
157
|
+
DeviceDfuHistoryCurrent.prototype['version'] = undefined;
|
|
158
|
+
var _default = exports["default"] = DeviceDfuHistoryCurrent;
|
|
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
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); } /**
|
|
19
19
|
* Notehub API
|
|
20
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
21
|
*
|
|
22
22
|
* The version of the OpenAPI document: 1.2.0
|
|
23
23
|
* Contact: engineering@blues.io
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The DeviceDfuHistoryPage model module.
|
|
32
32
|
* @module model/DeviceDfuHistoryPage
|
|
33
|
-
* @version 1.0.
|
|
33
|
+
* @version 1.0.38-beta.10
|
|
34
34
|
*/
|
|
35
35
|
var DeviceDfuHistoryPage = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -63,11 +63,11 @@ var DeviceDfuHistoryPage = /*#__PURE__*/function () {
|
|
|
63
63
|
value: function constructFromObject(data, obj) {
|
|
64
64
|
if (data) {
|
|
65
65
|
obj = obj || new DeviceDfuHistoryPage();
|
|
66
|
-
if (data.hasOwnProperty(
|
|
67
|
-
obj[
|
|
66
|
+
if (data.hasOwnProperty('devices')) {
|
|
67
|
+
obj['devices'] = _ApiClient["default"].convertToType(data['devices'], [_DeviceDfuHistory["default"]]);
|
|
68
68
|
}
|
|
69
|
-
if (data.hasOwnProperty(
|
|
70
|
-
obj[
|
|
69
|
+
if (data.hasOwnProperty('has_more')) {
|
|
70
|
+
obj['has_more'] = _ApiClient["default"].convertToType(data['has_more'], 'Boolean');
|
|
71
71
|
}
|
|
72
72
|
} else if (data === null) {
|
|
73
73
|
return null;
|
|
@@ -83,14 +83,14 @@ var DeviceDfuHistoryPage = /*#__PURE__*/function () {
|
|
|
83
83
|
}, {
|
|
84
84
|
key: "validateJSON",
|
|
85
85
|
value: function validateJSON(data) {
|
|
86
|
-
if (data[
|
|
86
|
+
if (data['devices']) {
|
|
87
87
|
// data not null
|
|
88
88
|
// ensure the json data is an array
|
|
89
|
-
if (!Array.isArray(data[
|
|
90
|
-
throw new Error("Expected the field `devices` to be an array in the JSON data but got " + data[
|
|
89
|
+
if (!Array.isArray(data['devices'])) {
|
|
90
|
+
throw new Error("Expected the field `devices` to be an array in the JSON data but got " + data['devices']);
|
|
91
91
|
}
|
|
92
92
|
// validate the optional field `devices` (array)
|
|
93
|
-
var _iterator = _createForOfIteratorHelper(data[
|
|
93
|
+
var _iterator = _createForOfIteratorHelper(data['devices']),
|
|
94
94
|
_step;
|
|
95
95
|
try {
|
|
96
96
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -102,6 +102,7 @@ var DeviceDfuHistoryPage = /*#__PURE__*/function () {
|
|
|
102
102
|
} finally {
|
|
103
103
|
_iterator.f();
|
|
104
104
|
}
|
|
105
|
+
;
|
|
105
106
|
}
|
|
106
107
|
return true;
|
|
107
108
|
}
|
|
@@ -110,11 +111,11 @@ var DeviceDfuHistoryPage = /*#__PURE__*/function () {
|
|
|
110
111
|
/**
|
|
111
112
|
* @member {Array.<module:model/DeviceDfuHistory>} devices
|
|
112
113
|
*/
|
|
113
|
-
DeviceDfuHistoryPage.prototype[
|
|
114
|
+
DeviceDfuHistoryPage.prototype['devices'] = undefined;
|
|
114
115
|
|
|
115
116
|
/**
|
|
116
117
|
* @member {Boolean} has_more
|
|
117
118
|
* @default false
|
|
118
119
|
*/
|
|
119
|
-
DeviceDfuHistoryPage.prototype[
|
|
120
|
+
DeviceDfuHistoryPage.prototype['has_more'] = false;
|
|
120
121
|
var _default = exports["default"] = DeviceDfuHistoryPage;
|
|
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
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); } /**
|
|
19
19
|
* Notehub API
|
|
20
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
21
|
*
|
|
22
22
|
* The version of the OpenAPI document: 1.2.0
|
|
23
23
|
* Contact: engineering@blues.io
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The DeviceDfuStateMachine model module.
|
|
32
32
|
* @module model/DeviceDfuStateMachine
|
|
33
|
-
* @version 1.0.
|
|
33
|
+
* @version 1.0.38-beta.10
|
|
34
34
|
*/
|
|
35
35
|
var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -64,17 +64,17 @@ var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
|
64
64
|
value: function constructFromObject(data, obj) {
|
|
65
65
|
if (data) {
|
|
66
66
|
obj = obj || new DeviceDfuStateMachine();
|
|
67
|
-
if (data.hasOwnProperty(
|
|
68
|
-
obj[
|
|
67
|
+
if (data.hasOwnProperty('current_version')) {
|
|
68
|
+
obj['current_version'] = _ApiClient["default"].convertToType(data['current_version'], 'String');
|
|
69
69
|
}
|
|
70
|
-
if (data.hasOwnProperty(
|
|
71
|
-
obj[
|
|
70
|
+
if (data.hasOwnProperty('initiated')) {
|
|
71
|
+
obj['initiated'] = _ApiClient["default"].convertToType(data['initiated'], 'String');
|
|
72
72
|
}
|
|
73
|
-
if (data.hasOwnProperty(
|
|
74
|
-
obj[
|
|
73
|
+
if (data.hasOwnProperty('requested_version')) {
|
|
74
|
+
obj['requested_version'] = _ApiClient["default"].convertToType(data['requested_version'], 'String');
|
|
75
75
|
}
|
|
76
|
-
if (data.hasOwnProperty(
|
|
77
|
-
obj[
|
|
76
|
+
if (data.hasOwnProperty('updates')) {
|
|
77
|
+
obj['updates'] = _ApiClient["default"].convertToType(data['updates'], [_DeviceDfuStateMachineNode["default"]]);
|
|
78
78
|
}
|
|
79
79
|
} else if (data === null) {
|
|
80
80
|
return null;
|
|
@@ -91,25 +91,25 @@ var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
|
91
91
|
key: "validateJSON",
|
|
92
92
|
value: function validateJSON(data) {
|
|
93
93
|
// ensure the json data is a string
|
|
94
|
-
if (data[
|
|
95
|
-
throw new Error("Expected the field `
|
|
94
|
+
if (data['current_version'] && !(typeof data['current_version'] === 'string' || data['current_version'] instanceof String)) {
|
|
95
|
+
throw new Error("Expected the field `current_version` to be a primitive type in the JSON string but got " + data['current_version']);
|
|
96
96
|
}
|
|
97
97
|
// ensure the json data is a string
|
|
98
|
-
if (data[
|
|
99
|
-
throw new Error("Expected the field `
|
|
98
|
+
if (data['initiated'] && !(typeof data['initiated'] === 'string' || data['initiated'] instanceof String)) {
|
|
99
|
+
throw new Error("Expected the field `initiated` to be a primitive type in the JSON string but got " + data['initiated']);
|
|
100
100
|
}
|
|
101
101
|
// ensure the json data is a string
|
|
102
|
-
if (data[
|
|
103
|
-
throw new Error("Expected the field `
|
|
102
|
+
if (data['requested_version'] && !(typeof data['requested_version'] === 'string' || data['requested_version'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `requested_version` to be a primitive type in the JSON string but got " + data['requested_version']);
|
|
104
104
|
}
|
|
105
|
-
if (data[
|
|
105
|
+
if (data['updates']) {
|
|
106
106
|
// data not null
|
|
107
107
|
// ensure the json data is an array
|
|
108
|
-
if (!Array.isArray(data[
|
|
109
|
-
throw new Error("Expected the field `updates` to be an array in the JSON data but got " + data[
|
|
108
|
+
if (!Array.isArray(data['updates'])) {
|
|
109
|
+
throw new Error("Expected the field `updates` to be an array in the JSON data but got " + data['updates']);
|
|
110
110
|
}
|
|
111
111
|
// validate the optional field `updates` (array)
|
|
112
|
-
var _iterator = _createForOfIteratorHelper(data[
|
|
112
|
+
var _iterator = _createForOfIteratorHelper(data['updates']),
|
|
113
113
|
_step;
|
|
114
114
|
try {
|
|
115
115
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -121,31 +121,32 @@ var DeviceDfuStateMachine = /*#__PURE__*/function () {
|
|
|
121
121
|
} finally {
|
|
122
122
|
_iterator.f();
|
|
123
123
|
}
|
|
124
|
+
;
|
|
124
125
|
}
|
|
125
126
|
return true;
|
|
126
127
|
}
|
|
127
128
|
}]);
|
|
128
129
|
}();
|
|
129
|
-
/**
|
|
130
|
-
* Version of the firmware that was requested to be installed
|
|
131
|
-
* @member {String} requested_version
|
|
132
|
-
*/
|
|
133
|
-
DeviceDfuStateMachine.prototype["requested_version"] = undefined;
|
|
134
|
-
|
|
135
130
|
/**
|
|
136
131
|
* Version of the firmware that was installed prior to this request
|
|
137
132
|
* @member {String} current_version
|
|
138
133
|
*/
|
|
139
|
-
DeviceDfuStateMachine.prototype[
|
|
134
|
+
DeviceDfuStateMachine.prototype['current_version'] = undefined;
|
|
140
135
|
|
|
141
136
|
/**
|
|
142
137
|
* RFC3339 datetime of when this update was requested
|
|
143
138
|
* @member {String} initiated
|
|
144
139
|
*/
|
|
145
|
-
DeviceDfuStateMachine.prototype[
|
|
140
|
+
DeviceDfuStateMachine.prototype['initiated'] = undefined;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Version of the firmware that was requested to be installed
|
|
144
|
+
* @member {String} requested_version
|
|
145
|
+
*/
|
|
146
|
+
DeviceDfuStateMachine.prototype['requested_version'] = undefined;
|
|
146
147
|
|
|
147
148
|
/**
|
|
148
149
|
* @member {Array.<module:model/DeviceDfuStateMachineNode>} updates
|
|
149
150
|
*/
|
|
150
|
-
DeviceDfuStateMachine.prototype[
|
|
151
|
+
DeviceDfuStateMachine.prototype['updates'] = undefined;
|
|
151
152
|
var _default = exports["default"] = DeviceDfuStateMachine;
|
|
@@ -13,7 +13,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
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); } /**
|
|
15
15
|
* Notehub API
|
|
16
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
16
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
17
17
|
*
|
|
18
18
|
* The version of the OpenAPI document: 1.2.0
|
|
19
19
|
* Contact: engineering@blues.io
|
|
@@ -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.
|
|
29
|
+
* @version 1.0.38-beta.10
|
|
30
30
|
*/
|
|
31
31
|
var DeviceDfuStateMachineNode = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -60,17 +60,17 @@ 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(
|
|
64
|
-
obj[
|
|
63
|
+
if (data.hasOwnProperty('datetime')) {
|
|
64
|
+
obj['datetime'] = _ApiClient["default"].convertToType(data['datetime'], 'String');
|
|
65
65
|
}
|
|
66
|
-
if (data.hasOwnProperty(
|
|
67
|
-
obj[
|
|
66
|
+
if (data.hasOwnProperty('description')) {
|
|
67
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
68
68
|
}
|
|
69
|
-
if (data.hasOwnProperty(
|
|
70
|
-
obj[
|
|
69
|
+
if (data.hasOwnProperty('phase')) {
|
|
70
|
+
obj['phase'] = _ApiClient["default"].convertToType(data['phase'], 'String');
|
|
71
71
|
}
|
|
72
|
-
if (data.hasOwnProperty(
|
|
73
|
-
obj[
|
|
72
|
+
if (data.hasOwnProperty('status')) {
|
|
73
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
74
74
|
}
|
|
75
75
|
} else if (data === null) {
|
|
76
76
|
return null;
|
|
@@ -87,46 +87,46 @@ 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 `
|
|
90
|
+
if (data['datetime'] && !(typeof data['datetime'] === 'string' || data['datetime'] instanceof String)) {
|
|
91
|
+
throw new Error("Expected the field `datetime` to be a primitive type in the JSON string but got " + data['datetime']);
|
|
92
92
|
}
|
|
93
93
|
// ensure the json data is a string
|
|
94
|
-
if (data[
|
|
95
|
-
throw new Error("Expected the field `
|
|
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']);
|
|
96
96
|
}
|
|
97
97
|
// ensure the json data is a string
|
|
98
|
-
if (data[
|
|
99
|
-
throw new Error("Expected the field `
|
|
98
|
+
if (data['phase'] && !(typeof data['phase'] === 'string' || data['phase'] instanceof String)) {
|
|
99
|
+
throw new Error("Expected the field `phase` to be a primitive type in the JSON string but got " + data['phase']);
|
|
100
100
|
}
|
|
101
101
|
// ensure the json data is a string
|
|
102
|
-
if (data[
|
|
103
|
-
throw new Error("Expected the field `
|
|
102
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
104
104
|
}
|
|
105
105
|
return true;
|
|
106
106
|
}
|
|
107
107
|
}]);
|
|
108
108
|
}();
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
111
|
-
* @member {String}
|
|
110
|
+
* RFC3339 compatible datetime of when this status update happened
|
|
111
|
+
* @member {String} datetime
|
|
112
112
|
*/
|
|
113
|
-
DeviceDfuStateMachineNode.prototype[
|
|
113
|
+
DeviceDfuStateMachineNode.prototype['datetime'] = undefined;
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
117
|
-
* @member {String}
|
|
116
|
+
* Additional information
|
|
117
|
+
* @member {String} description
|
|
118
118
|
*/
|
|
119
|
-
DeviceDfuStateMachineNode.prototype[
|
|
119
|
+
DeviceDfuStateMachineNode.prototype['description'] = undefined;
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
123
|
-
* @member {String}
|
|
122
|
+
* Phase for this step in the firmware update process
|
|
123
|
+
* @member {String} phase
|
|
124
124
|
*/
|
|
125
|
-
DeviceDfuStateMachineNode.prototype[
|
|
125
|
+
DeviceDfuStateMachineNode.prototype['phase'] = undefined;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
129
|
-
* @member {String}
|
|
128
|
+
* Status for this step in the firmware update process
|
|
129
|
+
* @member {String} status
|
|
130
130
|
*/
|
|
131
|
-
DeviceDfuStateMachineNode.prototype[
|
|
131
|
+
DeviceDfuStateMachineNode.prototype['status'] = 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"));
|
|
8
9
|
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"); }
|
|
@@ -15,7 +15,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
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); } /**
|
|
17
17
|
* Notehub API
|
|
18
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
18
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
19
19
|
*
|
|
20
20
|
* The version of the OpenAPI document: 1.2.0
|
|
21
21
|
* Contact: engineering@blues.io
|
|
@@ -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.
|
|
31
|
+
* @version 1.0.38-beta.10
|
|
32
32
|
*/
|
|
33
33
|
var DeviceDfuStatus = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -61,17 +61,17 @@ 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(
|
|
65
|
-
obj[
|
|
64
|
+
if (data.hasOwnProperty('current')) {
|
|
65
|
+
obj['current'] = _DeviceDfuHistoryCurrent["default"].constructFromObject(data['current']);
|
|
66
66
|
}
|
|
67
|
-
if (data.hasOwnProperty(
|
|
68
|
-
obj[
|
|
67
|
+
if (data.hasOwnProperty('device_uid')) {
|
|
68
|
+
obj['device_uid'] = _ApiClient["default"].convertToType(data['device_uid'], 'String');
|
|
69
69
|
}
|
|
70
|
-
if (data.hasOwnProperty(
|
|
71
|
-
obj[
|
|
70
|
+
if (data.hasOwnProperty('dfu_in_progress')) {
|
|
71
|
+
obj['dfu_in_progress'] = _ApiClient["default"].convertToType(data['dfu_in_progress'], 'Boolean');
|
|
72
72
|
}
|
|
73
|
-
if (data.hasOwnProperty(
|
|
74
|
-
obj[
|
|
73
|
+
if (data.hasOwnProperty('status')) {
|
|
74
|
+
obj['status'] = _DeviceDfuStateMachine["default"].constructFromObject(data['status']);
|
|
75
75
|
}
|
|
76
76
|
} else if (data === null) {
|
|
77
77
|
return null;
|
|
@@ -87,43 +87,43 @@ var DeviceDfuStatus = /*#__PURE__*/function () {
|
|
|
87
87
|
}, {
|
|
88
88
|
key: "validateJSON",
|
|
89
89
|
value: function validateJSON(data) {
|
|
90
|
-
// ensure the json data is a string
|
|
91
|
-
if (data["device_uid"] && !(typeof data["device_uid"] === "string" || data["device_uid"] instanceof String)) {
|
|
92
|
-
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data["device_uid"]);
|
|
93
|
-
}
|
|
94
90
|
// validate the optional field `current`
|
|
95
|
-
if (data[
|
|
91
|
+
if (data['current']) {
|
|
96
92
|
// data not null
|
|
97
|
-
|
|
93
|
+
_DeviceDfuHistoryCurrent["default"].validateJSON(data['current']);
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
if (data['device_uid'] && !(typeof data['device_uid'] === 'string' || data['device_uid'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data['device_uid']);
|
|
98
98
|
}
|
|
99
99
|
// validate the optional field `status`
|
|
100
|
-
if (data[
|
|
100
|
+
if (data['status']) {
|
|
101
101
|
// data not null
|
|
102
|
-
_DeviceDfuStateMachine["default"].validateJSON(data[
|
|
102
|
+
_DeviceDfuStateMachine["default"].validateJSON(data['status']);
|
|
103
103
|
}
|
|
104
104
|
return true;
|
|
105
105
|
}
|
|
106
106
|
}]);
|
|
107
107
|
}();
|
|
108
|
+
/**
|
|
109
|
+
* @member {module:model/DeviceDfuHistoryCurrent} current
|
|
110
|
+
*/
|
|
111
|
+
DeviceDfuStatus.prototype['current'] = undefined;
|
|
112
|
+
|
|
108
113
|
/**
|
|
109
114
|
* Device UID
|
|
110
115
|
* @member {String} device_uid
|
|
111
116
|
*/
|
|
112
|
-
DeviceDfuStatus.prototype[
|
|
117
|
+
DeviceDfuStatus.prototype['device_uid'] = undefined;
|
|
113
118
|
|
|
114
119
|
/**
|
|
115
120
|
* true if there is a DFU currently in progress
|
|
116
121
|
* @member {Boolean} dfu_in_progress
|
|
117
122
|
*/
|
|
118
|
-
DeviceDfuStatus.prototype[
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* @member {module:model/DeviceDfuStatusCurrent} current
|
|
122
|
-
*/
|
|
123
|
-
DeviceDfuStatus.prototype["current"] = undefined;
|
|
123
|
+
DeviceDfuStatus.prototype['dfu_in_progress'] = undefined;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* @member {module:model/DeviceDfuStateMachine} status
|
|
127
127
|
*/
|
|
128
|
-
DeviceDfuStatus.prototype[
|
|
128
|
+
DeviceDfuStatus.prototype['status'] = undefined;
|
|
129
129
|
var _default = exports["default"] = DeviceDfuStatus;
|