@blues-inc/notehub-js 2.3.0-beta.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +242 -251
- package/dist/ApiClient.js +154 -154
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +31 -31
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +478 -513
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +457 -457
- package/dist/api/RouteApi.js +77 -77
- package/dist/api/UsageApi.js +65 -44
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +14 -14
- package/dist/model/AddDeviceToFleetsRequest.js +8 -8
- package/dist/model/Alert.js +74 -76
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/AwsRoute.js +65 -65
- package/dist/model/AzureRoute.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/BlynkRoute.js +28 -28
- package/dist/model/Body.js +5 -5
- package/dist/model/CellularPlan.js +34 -34
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +17 -17
- package/dist/model/CreateMonitor.js +125 -126
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateUpdateRepository.js +17 -17
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +65 -65
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DataUsage.js +14 -14
- package/dist/model/DatacakeRoute.js +35 -35
- package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
- package/dist/model/DeleteNotefilesRequest.js +7 -7
- package/dist/model/Device.js +101 -102
- package/dist/model/DeviceDfuHistory.js +19 -20
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- package/dist/model/DeviceDfuHistoryPage.js +12 -13
- package/dist/model/DeviceDfuStateMachine.js +24 -25
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusPage.js +12 -13
- package/dist/model/DeviceSession.js +221 -221
- package/dist/model/DeviceTowerInfo.js +14 -14
- package/dist/model/DeviceUsage.js +32 -32
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvTreeJsonNode.js +67 -69
- package/dist/model/EnvVar.js +18 -18
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +248 -248
- package/dist/model/Filter.js +16 -16
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +35 -35
- package/dist/model/FleetConnectivityAssurance.js +6 -6
- package/dist/model/GetAlerts200Response.js +14 -15
- package/dist/model/GetBillingAccounts200Response.js +9 -10
- package/dist/model/GetDataUsage200Response.js +9 -10
- package/dist/model/GetDataUsage200ResponseDataInner.js +40 -41
- package/dist/model/GetDbNote200Response.js +13 -13
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatestEvents200Response.js +9 -10
- package/dist/model/GetDevicePlans200Response.js +9 -10
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDevicePublicKeys200Response.js +16 -17
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetDeviceSessions200Response.js +16 -17
- package/dist/model/GetDevices200Response.js +16 -17
- package/dist/model/GetEvents200Response.js +20 -21
- package/dist/model/GetEventsByCursor200Response.js +23 -24
- package/dist/model/GetNotefile200Response.js +11 -11
- package/dist/model/GetProducts200Response.js +9 -10
- package/dist/model/GetProjectMembers200Response.js +11 -12
- package/dist/model/GetProjects200Response.js +9 -10
- package/dist/model/GetSessionsUsage200Response.js +11 -12
- package/dist/model/GetWebhooks200Response.js +9 -10
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.js +35 -35
- package/dist/model/ListNotefiles200Response.js +106 -0
- package/dist/model/ListPendingNotefiles200Response.js +14 -14
- package/dist/model/Location.js +40 -40
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +99 -100
- package/dist/model/MonitorAlertRoutesInner.js +10 -9
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +15 -95
- package/dist/model/NotefileSchema.js +18 -19
- package/dist/model/NotehubRoute.js +112 -98
- package/dist/model/NotehubRouteSummary.js +23 -23
- package/dist/model/OAuth2Error.js +20 -20
- package/dist/model/OAuth2TokenResponse.js +23 -23
- package/dist/model/PersonalAccessToken.js +34 -34
- package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
- package/dist/model/PersonalAccessTokenInfo.js +18 -18
- package/dist/model/PersonalAccessTokenSecret.js +12 -12
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/ProvisionDeviceRequest.js +18 -18
- package/dist/model/ProxyRoute.js +29 -29
- package/dist/model/QubitroRoute.js +33 -33
- package/dist/model/RadRoute.js +31 -31
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/RouteTransformSettings.js +18 -18
- package/dist/model/S3ArchiveRoute.js +79 -79
- package/dist/model/SatellitePlan.js +26 -26
- package/dist/model/SchemaProperty.js +36 -38
- package/dist/model/SignalDevice200Response.js +5 -5
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackRoute.js +48 -48
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/SnowflakeRoute.js +45 -45
- package/dist/model/SnowpipeStreamingRoute.js +223 -0
- package/dist/model/ThingworxRoute.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/TwilioRoute.js +43 -43
- package/dist/model/UpdateFleetRequest.js +30 -30
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +18 -18
- package/dist/model/UsageEventsData.js +40 -29
- package/dist/model/UsageEventsResponse.js +11 -12
- package/dist/model/UsageRouteLogsData.js +27 -27
- package/dist/model/UsageSessionsData.js +27 -27
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +3 -3
- package/dist/model/Notefile.js +0 -147
- package/dist/model/NotefileTemplate.js +0 -128
|
@@ -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 DatacakeRoute model module.
|
|
30
30
|
* @module model/DatacakeRoute
|
|
31
|
-
* @version
|
|
31
|
+
* @version 3.0.0
|
|
32
32
|
*/
|
|
33
33
|
var DatacakeRoute = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -61,31 +61,31 @@ var DatacakeRoute = /*#__PURE__*/function () {
|
|
|
61
61
|
value: function constructFromObject(data, obj) {
|
|
62
62
|
if (data) {
|
|
63
63
|
obj = obj || new DatacakeRoute();
|
|
64
|
-
if (data.hasOwnProperty(
|
|
65
|
-
obj[
|
|
64
|
+
if (data.hasOwnProperty("disable_http_headers")) {
|
|
65
|
+
obj["disable_http_headers"] = _ApiClient["default"].convertToType(data["disable_http_headers"], "Boolean");
|
|
66
66
|
}
|
|
67
|
-
if (data.hasOwnProperty(
|
|
68
|
-
obj[
|
|
67
|
+
if (data.hasOwnProperty("filter")) {
|
|
68
|
+
obj["filter"] = _Filter["default"].constructFromObject(data["filter"]);
|
|
69
69
|
}
|
|
70
|
-
if (data.hasOwnProperty(
|
|
71
|
-
obj[
|
|
70
|
+
if (data.hasOwnProperty("fleets")) {
|
|
71
|
+
obj["fleets"] = _ApiClient["default"].convertToType(data["fleets"], ["String"]);
|
|
72
72
|
}
|
|
73
|
-
if (data.hasOwnProperty(
|
|
74
|
-
obj[
|
|
75
|
-
|
|
73
|
+
if (data.hasOwnProperty("http_headers")) {
|
|
74
|
+
obj["http_headers"] = _ApiClient["default"].convertToType(data["http_headers"], {
|
|
75
|
+
String: "String"
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
if (data.hasOwnProperty(
|
|
79
|
-
obj[
|
|
78
|
+
if (data.hasOwnProperty("throttle_ms")) {
|
|
79
|
+
obj["throttle_ms"] = _ApiClient["default"].convertToType(data["throttle_ms"], "Number");
|
|
80
80
|
}
|
|
81
|
-
if (data.hasOwnProperty(
|
|
82
|
-
obj[
|
|
81
|
+
if (data.hasOwnProperty("timeout")) {
|
|
82
|
+
obj["timeout"] = _ApiClient["default"].convertToType(data["timeout"], "Number");
|
|
83
83
|
}
|
|
84
|
-
if (data.hasOwnProperty(
|
|
85
|
-
obj[
|
|
84
|
+
if (data.hasOwnProperty("transform")) {
|
|
85
|
+
obj["transform"] = _RouteTransformSettings["default"].constructFromObject(data["transform"]);
|
|
86
86
|
}
|
|
87
|
-
if (data.hasOwnProperty(
|
|
88
|
-
obj[
|
|
87
|
+
if (data.hasOwnProperty("url")) {
|
|
88
|
+
obj["url"] = _ApiClient["default"].convertToType(data["url"], "String");
|
|
89
89
|
}
|
|
90
90
|
} else if (data === null) {
|
|
91
91
|
return null;
|
|
@@ -102,22 +102,22 @@ var DatacakeRoute = /*#__PURE__*/function () {
|
|
|
102
102
|
key: "validateJSON",
|
|
103
103
|
value: function validateJSON(data) {
|
|
104
104
|
// validate the optional field `filter`
|
|
105
|
-
if (data[
|
|
105
|
+
if (data["filter"]) {
|
|
106
106
|
// data not null
|
|
107
|
-
_Filter["default"].validateJSON(data[
|
|
107
|
+
_Filter["default"].validateJSON(data["filter"]);
|
|
108
108
|
}
|
|
109
109
|
// ensure the json data is an array
|
|
110
|
-
if (!Array.isArray(data[
|
|
111
|
-
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data[
|
|
110
|
+
if (!Array.isArray(data["fleets"])) {
|
|
111
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data["fleets"]);
|
|
112
112
|
}
|
|
113
113
|
// validate the optional field `transform`
|
|
114
|
-
if (data[
|
|
114
|
+
if (data["transform"]) {
|
|
115
115
|
// data not null
|
|
116
|
-
_RouteTransformSettings["default"].validateJSON(data[
|
|
116
|
+
_RouteTransformSettings["default"].validateJSON(data["transform"]);
|
|
117
117
|
}
|
|
118
118
|
// ensure the json data is a string
|
|
119
|
-
if (data[
|
|
120
|
-
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data[
|
|
119
|
+
if (data["url"] && !(typeof data["url"] === "string" || data["url"] instanceof String)) {
|
|
120
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data["url"]);
|
|
121
121
|
}
|
|
122
122
|
return true;
|
|
123
123
|
}
|
|
@@ -126,40 +126,40 @@ var DatacakeRoute = /*#__PURE__*/function () {
|
|
|
126
126
|
/**
|
|
127
127
|
* @member {Boolean} disable_http_headers
|
|
128
128
|
*/
|
|
129
|
-
DatacakeRoute.prototype[
|
|
129
|
+
DatacakeRoute.prototype["disable_http_headers"] = undefined;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* @member {module:model/Filter} filter
|
|
133
133
|
*/
|
|
134
|
-
DatacakeRoute.prototype[
|
|
134
|
+
DatacakeRoute.prototype["filter"] = undefined;
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* @member {Array.<String>} fleets
|
|
138
138
|
*/
|
|
139
|
-
DatacakeRoute.prototype[
|
|
139
|
+
DatacakeRoute.prototype["fleets"] = undefined;
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
142
|
* @member {Object.<String, String>} http_headers
|
|
143
143
|
*/
|
|
144
|
-
DatacakeRoute.prototype[
|
|
144
|
+
DatacakeRoute.prototype["http_headers"] = undefined;
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* @member {Number} throttle_ms
|
|
148
148
|
*/
|
|
149
|
-
DatacakeRoute.prototype[
|
|
149
|
+
DatacakeRoute.prototype["throttle_ms"] = undefined;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* @member {Number} timeout
|
|
153
153
|
*/
|
|
154
|
-
DatacakeRoute.prototype[
|
|
154
|
+
DatacakeRoute.prototype["timeout"] = undefined;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* @member {module:model/RouteTransformSettings} transform
|
|
158
158
|
*/
|
|
159
|
-
DatacakeRoute.prototype[
|
|
159
|
+
DatacakeRoute.prototype["transform"] = undefined;
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
162
|
* @member {String} url
|
|
163
163
|
*/
|
|
164
|
-
DatacakeRoute.prototype[
|
|
164
|
+
DatacakeRoute.prototype["url"] = undefined;
|
|
165
165
|
var _default = exports["default"] = DatacakeRoute;
|
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
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); } /**
|
|
18
18
|
* Notehub API
|
|
19
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The DeleteDeviceFromFleetsRequest model module.
|
|
31
31
|
* @module model/DeleteDeviceFromFleetsRequest
|
|
32
|
-
* @version
|
|
32
|
+
* @version 3.0.0
|
|
33
33
|
*/
|
|
34
34
|
var DeleteDeviceFromFleetsRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -50,7 +50,7 @@ var DeleteDeviceFromFleetsRequest = /*#__PURE__*/function () {
|
|
|
50
50
|
return _createClass(DeleteDeviceFromFleetsRequest, null, [{
|
|
51
51
|
key: "initialize",
|
|
52
52
|
value: function initialize(obj, fleetUids) {
|
|
53
|
-
obj[
|
|
53
|
+
obj["fleet_uids"] = fleetUids;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
|
@@ -65,8 +65,8 @@ var DeleteDeviceFromFleetsRequest = /*#__PURE__*/function () {
|
|
|
65
65
|
value: function constructFromObject(data, obj) {
|
|
66
66
|
if (data) {
|
|
67
67
|
obj = obj || new DeleteDeviceFromFleetsRequest();
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
68
|
+
if (data.hasOwnProperty("fleet_uids")) {
|
|
69
|
+
obj["fleet_uids"] = _ApiClient["default"].convertToType(data["fleet_uids"], ["String"]);
|
|
70
70
|
}
|
|
71
71
|
} else if (data === null) {
|
|
72
72
|
return null;
|
|
@@ -98,8 +98,8 @@ var DeleteDeviceFromFleetsRequest = /*#__PURE__*/function () {
|
|
|
98
98
|
} finally {
|
|
99
99
|
_iterator.f();
|
|
100
100
|
}
|
|
101
|
-
if (!Array.isArray(data[
|
|
102
|
-
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data[
|
|
101
|
+
if (!Array.isArray(data["fleet_uids"])) {
|
|
102
|
+
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data["fleet_uids"]);
|
|
103
103
|
}
|
|
104
104
|
return true;
|
|
105
105
|
}
|
|
@@ -111,5 +111,5 @@ DeleteDeviceFromFleetsRequest.RequiredProperties = ["fleet_uids"];
|
|
|
111
111
|
* The fleetUIDs to remove from the device.
|
|
112
112
|
* @member {Array.<String>} fleet_uids
|
|
113
113
|
*/
|
|
114
|
-
DeleteDeviceFromFleetsRequest.prototype[
|
|
114
|
+
DeleteDeviceFromFleetsRequest.prototype["fleet_uids"] = undefined;
|
|
115
115
|
var _default = exports["default"] = DeleteDeviceFromFleetsRequest;
|
|
@@ -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 DeleteNotefilesRequest model module.
|
|
28
28
|
* @module model/DeleteNotefilesRequest
|
|
29
|
-
* @version
|
|
29
|
+
* @version 3.0.0
|
|
30
30
|
*/
|
|
31
31
|
var DeleteNotefilesRequest = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,8 +59,8 @@ var DeleteNotefilesRequest = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new DeleteNotefilesRequest();
|
|
62
|
-
if (data.hasOwnProperty(
|
|
63
|
-
obj[
|
|
62
|
+
if (data.hasOwnProperty("files")) {
|
|
63
|
+
obj["files"] = _ApiClient["default"].convertToType(data["files"], ["String"]);
|
|
64
64
|
}
|
|
65
65
|
} else if (data === null) {
|
|
66
66
|
return null;
|
|
@@ -77,8 +77,8 @@ var DeleteNotefilesRequest = /*#__PURE__*/function () {
|
|
|
77
77
|
key: "validateJSON",
|
|
78
78
|
value: function validateJSON(data) {
|
|
79
79
|
// ensure the json data is an array
|
|
80
|
-
if (!Array.isArray(data[
|
|
81
|
-
throw new Error("Expected the field `files` to be an array in the JSON data but got " + data[
|
|
80
|
+
if (!Array.isArray(data["files"])) {
|
|
81
|
+
throw new Error("Expected the field `files` to be an array in the JSON data but got " + data["files"]);
|
|
82
82
|
}
|
|
83
83
|
return true;
|
|
84
84
|
}
|
|
@@ -88,5 +88,5 @@ var DeleteNotefilesRequest = /*#__PURE__*/function () {
|
|
|
88
88
|
* Name of notefiles to delete
|
|
89
89
|
* @member {Array.<String>} files
|
|
90
90
|
*/
|
|
91
|
-
DeleteNotefilesRequest.prototype[
|
|
91
|
+
DeleteNotefilesRequest.prototype["files"] = undefined;
|
|
92
92
|
var _default = exports["default"] = DeleteNotefilesRequest;
|
package/dist/model/Device.js
CHANGED
|
@@ -21,7 +21,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
21
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
22
|
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); } /**
|
|
23
23
|
* Notehub API
|
|
24
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
24
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
25
25
|
*
|
|
26
26
|
* The version of the OpenAPI document: 1.2.0
|
|
27
27
|
* Contact: engineering@blues.io
|
|
@@ -34,18 +34,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
34
34
|
/**
|
|
35
35
|
* The Device model module.
|
|
36
36
|
* @module model/Device
|
|
37
|
-
* @version
|
|
37
|
+
* @version 3.0.0
|
|
38
38
|
*/
|
|
39
39
|
var Device = /*#__PURE__*/function () {
|
|
40
40
|
/**
|
|
41
41
|
* Constructs a new <code>Device</code>.
|
|
42
42
|
* @alias module:model/Device
|
|
43
|
-
* @param fleetUids {Array.<String>}
|
|
44
|
-
* @param productUid {String}
|
|
45
|
-
* @param provisioned {Date}
|
|
46
|
-
* @param temperature {Number}
|
|
47
|
-
* @param uid {String}
|
|
48
|
-
* @param voltage {Number}
|
|
43
|
+
* @param fleetUids {Array.<String>}
|
|
44
|
+
* @param productUid {String}
|
|
45
|
+
* @param provisioned {Date}
|
|
46
|
+
* @param temperature {Number}
|
|
47
|
+
* @param uid {String}
|
|
48
|
+
* @param voltage {Number}
|
|
49
49
|
*/
|
|
50
50
|
function Device(fleetUids, productUid, provisioned, temperature, uid, voltage) {
|
|
51
51
|
_classCallCheck(this, Device);
|
|
@@ -60,12 +60,12 @@ var Device = /*#__PURE__*/function () {
|
|
|
60
60
|
return _createClass(Device, null, [{
|
|
61
61
|
key: "initialize",
|
|
62
62
|
value: function initialize(obj, fleetUids, productUid, provisioned, temperature, uid, voltage) {
|
|
63
|
-
obj[
|
|
64
|
-
obj[
|
|
65
|
-
obj[
|
|
66
|
-
obj[
|
|
67
|
-
obj[
|
|
68
|
-
obj[
|
|
63
|
+
obj["fleet_uids"] = fleetUids;
|
|
64
|
+
obj["product_uid"] = productUid;
|
|
65
|
+
obj["provisioned"] = provisioned;
|
|
66
|
+
obj["temperature"] = temperature;
|
|
67
|
+
obj["uid"] = uid;
|
|
68
|
+
obj["voltage"] = voltage;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
@@ -80,62 +80,62 @@ var Device = /*#__PURE__*/function () {
|
|
|
80
80
|
value: function constructFromObject(data, obj) {
|
|
81
81
|
if (data) {
|
|
82
82
|
obj = obj || new Device();
|
|
83
|
-
if (data.hasOwnProperty(
|
|
84
|
-
obj[
|
|
83
|
+
if (data.hasOwnProperty("cellular_usage")) {
|
|
84
|
+
obj["cellular_usage"] = _ApiClient["default"].convertToType(data["cellular_usage"], [_SimUsage["default"]]);
|
|
85
85
|
}
|
|
86
|
-
if (data.hasOwnProperty(
|
|
87
|
-
obj[
|
|
86
|
+
if (data.hasOwnProperty("contact")) {
|
|
87
|
+
obj["contact"] = _Contact["default"].constructFromObject(data["contact"]);
|
|
88
88
|
}
|
|
89
|
-
if (data.hasOwnProperty(
|
|
90
|
-
obj[
|
|
89
|
+
if (data.hasOwnProperty("dfu")) {
|
|
90
|
+
obj["dfu"] = _DFUEnv["default"].constructFromObject(data["dfu"]);
|
|
91
91
|
}
|
|
92
|
-
if (data.hasOwnProperty(
|
|
93
|
-
obj[
|
|
92
|
+
if (data.hasOwnProperty("disabled")) {
|
|
93
|
+
obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
|
|
94
94
|
}
|
|
95
|
-
if (data.hasOwnProperty(
|
|
96
|
-
obj[
|
|
95
|
+
if (data.hasOwnProperty("firmware_host")) {
|
|
96
|
+
obj["firmware_host"] = _ApiClient["default"].convertToType(data["firmware_host"], "String");
|
|
97
97
|
}
|
|
98
|
-
if (data.hasOwnProperty(
|
|
99
|
-
obj[
|
|
98
|
+
if (data.hasOwnProperty("firmware_notecard")) {
|
|
99
|
+
obj["firmware_notecard"] = _ApiClient["default"].convertToType(data["firmware_notecard"], "String");
|
|
100
100
|
}
|
|
101
|
-
if (data.hasOwnProperty(
|
|
102
|
-
obj[
|
|
101
|
+
if (data.hasOwnProperty("fleet_uids")) {
|
|
102
|
+
obj["fleet_uids"] = _ApiClient["default"].convertToType(data["fleet_uids"], ["String"]);
|
|
103
103
|
}
|
|
104
|
-
if (data.hasOwnProperty(
|
|
105
|
-
obj[
|
|
104
|
+
if (data.hasOwnProperty("gps_location")) {
|
|
105
|
+
obj["gps_location"] = _Location["default"].constructFromObject(data["gps_location"]);
|
|
106
106
|
}
|
|
107
|
-
if (data.hasOwnProperty(
|
|
108
|
-
obj[
|
|
107
|
+
if (data.hasOwnProperty("last_activity")) {
|
|
108
|
+
obj["last_activity"] = _ApiClient["default"].convertToType(data["last_activity"], "Date");
|
|
109
109
|
}
|
|
110
|
-
if (data.hasOwnProperty(
|
|
111
|
-
obj[
|
|
110
|
+
if (data.hasOwnProperty("product_uid")) {
|
|
111
|
+
obj["product_uid"] = _ApiClient["default"].convertToType(data["product_uid"], "String");
|
|
112
112
|
}
|
|
113
|
-
if (data.hasOwnProperty(
|
|
114
|
-
obj[
|
|
113
|
+
if (data.hasOwnProperty("provisioned")) {
|
|
114
|
+
obj["provisioned"] = _ApiClient["default"].convertToType(data["provisioned"], "Date");
|
|
115
115
|
}
|
|
116
|
-
if (data.hasOwnProperty(
|
|
117
|
-
obj[
|
|
116
|
+
if (data.hasOwnProperty("serial_number")) {
|
|
117
|
+
obj["serial_number"] = _ApiClient["default"].convertToType(data["serial_number"], "String");
|
|
118
118
|
}
|
|
119
|
-
if (data.hasOwnProperty(
|
|
120
|
-
obj[
|
|
119
|
+
if (data.hasOwnProperty("sku")) {
|
|
120
|
+
obj["sku"] = _ApiClient["default"].convertToType(data["sku"], "String");
|
|
121
121
|
}
|
|
122
|
-
if (data.hasOwnProperty(
|
|
123
|
-
obj[
|
|
122
|
+
if (data.hasOwnProperty("temperature")) {
|
|
123
|
+
obj["temperature"] = _ApiClient["default"].convertToType(data["temperature"], "Number");
|
|
124
124
|
}
|
|
125
|
-
if (data.hasOwnProperty(
|
|
126
|
-
obj[
|
|
125
|
+
if (data.hasOwnProperty("tower_info")) {
|
|
126
|
+
obj["tower_info"] = _DeviceTowerInfo["default"].constructFromObject(data["tower_info"]);
|
|
127
127
|
}
|
|
128
|
-
if (data.hasOwnProperty(
|
|
129
|
-
obj[
|
|
128
|
+
if (data.hasOwnProperty("tower_location")) {
|
|
129
|
+
obj["tower_location"] = _Location["default"].constructFromObject(data["tower_location"]);
|
|
130
130
|
}
|
|
131
|
-
if (data.hasOwnProperty(
|
|
132
|
-
obj[
|
|
131
|
+
if (data.hasOwnProperty("triangulated_location")) {
|
|
132
|
+
obj["triangulated_location"] = _Location["default"].constructFromObject(data["triangulated_location"]);
|
|
133
133
|
}
|
|
134
|
-
if (data.hasOwnProperty(
|
|
135
|
-
obj[
|
|
134
|
+
if (data.hasOwnProperty("uid")) {
|
|
135
|
+
obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
|
|
136
136
|
}
|
|
137
|
-
if (data.hasOwnProperty(
|
|
138
|
-
obj[
|
|
137
|
+
if (data.hasOwnProperty("voltage")) {
|
|
138
|
+
obj["voltage"] = _ApiClient["default"].convertToType(data["voltage"], "Number");
|
|
139
139
|
}
|
|
140
140
|
} else if (data === null) {
|
|
141
141
|
return null;
|
|
@@ -166,14 +166,14 @@ var Device = /*#__PURE__*/function () {
|
|
|
166
166
|
} finally {
|
|
167
167
|
_iterator.f();
|
|
168
168
|
}
|
|
169
|
-
if (data[
|
|
169
|
+
if (data["cellular_usage"]) {
|
|
170
170
|
// data not null
|
|
171
171
|
// ensure the json data is an array
|
|
172
|
-
if (!Array.isArray(data[
|
|
173
|
-
throw new Error("Expected the field `cellular_usage` to be an array in the JSON data but got " + data[
|
|
172
|
+
if (!Array.isArray(data["cellular_usage"])) {
|
|
173
|
+
throw new Error("Expected the field `cellular_usage` to be an array in the JSON data but got " + data["cellular_usage"]);
|
|
174
174
|
}
|
|
175
175
|
// validate the optional field `cellular_usage` (array)
|
|
176
|
-
var _iterator2 = _createForOfIteratorHelper(data[
|
|
176
|
+
var _iterator2 = _createForOfIteratorHelper(data["cellular_usage"]),
|
|
177
177
|
_step2;
|
|
178
178
|
try {
|
|
179
179
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -185,65 +185,64 @@ var Device = /*#__PURE__*/function () {
|
|
|
185
185
|
} finally {
|
|
186
186
|
_iterator2.f();
|
|
187
187
|
}
|
|
188
|
-
;
|
|
189
188
|
}
|
|
190
189
|
// validate the optional field `contact`
|
|
191
|
-
if (data[
|
|
190
|
+
if (data["contact"]) {
|
|
192
191
|
// data not null
|
|
193
|
-
_Contact["default"].validateJSON(data[
|
|
192
|
+
_Contact["default"].validateJSON(data["contact"]);
|
|
194
193
|
}
|
|
195
194
|
// validate the optional field `dfu`
|
|
196
|
-
if (data[
|
|
195
|
+
if (data["dfu"]) {
|
|
197
196
|
// data not null
|
|
198
|
-
_DFUEnv["default"].validateJSON(data[
|
|
197
|
+
_DFUEnv["default"].validateJSON(data["dfu"]);
|
|
199
198
|
}
|
|
200
199
|
// ensure the json data is a string
|
|
201
|
-
if (data[
|
|
202
|
-
throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data[
|
|
200
|
+
if (data["firmware_host"] && !(typeof data["firmware_host"] === "string" || data["firmware_host"] instanceof String)) {
|
|
201
|
+
throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data["firmware_host"]);
|
|
203
202
|
}
|
|
204
203
|
// ensure the json data is a string
|
|
205
|
-
if (data[
|
|
206
|
-
throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data[
|
|
204
|
+
if (data["firmware_notecard"] && !(typeof data["firmware_notecard"] === "string" || data["firmware_notecard"] instanceof String)) {
|
|
205
|
+
throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data["firmware_notecard"]);
|
|
207
206
|
}
|
|
208
207
|
// ensure the json data is an array
|
|
209
|
-
if (!Array.isArray(data[
|
|
210
|
-
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data[
|
|
208
|
+
if (!Array.isArray(data["fleet_uids"])) {
|
|
209
|
+
throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data["fleet_uids"]);
|
|
211
210
|
}
|
|
212
211
|
// validate the optional field `gps_location`
|
|
213
|
-
if (data[
|
|
212
|
+
if (data["gps_location"]) {
|
|
214
213
|
// data not null
|
|
215
|
-
_Location["default"].validateJSON(data[
|
|
214
|
+
_Location["default"].validateJSON(data["gps_location"]);
|
|
216
215
|
}
|
|
217
216
|
// ensure the json data is a string
|
|
218
|
-
if (data[
|
|
219
|
-
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data[
|
|
217
|
+
if (data["product_uid"] && !(typeof data["product_uid"] === "string" || data["product_uid"] instanceof String)) {
|
|
218
|
+
throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data["product_uid"]);
|
|
220
219
|
}
|
|
221
220
|
// ensure the json data is a string
|
|
222
|
-
if (data[
|
|
223
|
-
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data[
|
|
221
|
+
if (data["serial_number"] && !(typeof data["serial_number"] === "string" || data["serial_number"] instanceof String)) {
|
|
222
|
+
throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data["serial_number"]);
|
|
224
223
|
}
|
|
225
224
|
// ensure the json data is a string
|
|
226
|
-
if (data[
|
|
227
|
-
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data[
|
|
225
|
+
if (data["sku"] && !(typeof data["sku"] === "string" || data["sku"] instanceof String)) {
|
|
226
|
+
throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data["sku"]);
|
|
228
227
|
}
|
|
229
228
|
// validate the optional field `tower_info`
|
|
230
|
-
if (data[
|
|
229
|
+
if (data["tower_info"]) {
|
|
231
230
|
// data not null
|
|
232
|
-
_DeviceTowerInfo["default"].validateJSON(data[
|
|
231
|
+
_DeviceTowerInfo["default"].validateJSON(data["tower_info"]);
|
|
233
232
|
}
|
|
234
233
|
// validate the optional field `tower_location`
|
|
235
|
-
if (data[
|
|
234
|
+
if (data["tower_location"]) {
|
|
236
235
|
// data not null
|
|
237
|
-
_Location["default"].validateJSON(data[
|
|
236
|
+
_Location["default"].validateJSON(data["tower_location"]);
|
|
238
237
|
}
|
|
239
238
|
// validate the optional field `triangulated_location`
|
|
240
|
-
if (data[
|
|
239
|
+
if (data["triangulated_location"]) {
|
|
241
240
|
// data not null
|
|
242
|
-
_Location["default"].validateJSON(data[
|
|
241
|
+
_Location["default"].validateJSON(data["triangulated_location"]);
|
|
243
242
|
}
|
|
244
243
|
// ensure the json data is a string
|
|
245
|
-
if (data[
|
|
246
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
244
|
+
if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
|
|
245
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
|
|
247
246
|
}
|
|
248
247
|
return true;
|
|
249
248
|
}
|
|
@@ -254,95 +253,95 @@ Device.RequiredProperties = ["fleet_uids", "product_uid", "provisioned", "temper
|
|
|
254
253
|
/**
|
|
255
254
|
* @member {Array.<module:model/SimUsage>} cellular_usage
|
|
256
255
|
*/
|
|
257
|
-
Device.prototype[
|
|
256
|
+
Device.prototype["cellular_usage"] = undefined;
|
|
258
257
|
|
|
259
258
|
/**
|
|
260
259
|
* @member {module:model/Contact} contact
|
|
261
260
|
*/
|
|
262
|
-
Device.prototype[
|
|
261
|
+
Device.prototype["contact"] = undefined;
|
|
263
262
|
|
|
264
263
|
/**
|
|
265
264
|
* @member {module:model/DFUEnv} dfu
|
|
266
265
|
*/
|
|
267
|
-
Device.prototype[
|
|
266
|
+
Device.prototype["dfu"] = undefined;
|
|
268
267
|
|
|
269
268
|
/**
|
|
270
269
|
* @member {Boolean} disabled
|
|
271
270
|
*/
|
|
272
|
-
Device.prototype[
|
|
271
|
+
Device.prototype["disabled"] = undefined;
|
|
273
272
|
|
|
274
273
|
/**
|
|
275
274
|
* @member {String} firmware_host
|
|
276
275
|
*/
|
|
277
|
-
Device.prototype[
|
|
276
|
+
Device.prototype["firmware_host"] = undefined;
|
|
278
277
|
|
|
279
278
|
/**
|
|
280
279
|
* @member {String} firmware_notecard
|
|
281
280
|
*/
|
|
282
|
-
Device.prototype[
|
|
281
|
+
Device.prototype["firmware_notecard"] = undefined;
|
|
283
282
|
|
|
284
283
|
/**
|
|
285
284
|
* @member {Array.<String>} fleet_uids
|
|
286
285
|
*/
|
|
287
|
-
Device.prototype[
|
|
286
|
+
Device.prototype["fleet_uids"] = undefined;
|
|
288
287
|
|
|
289
288
|
/**
|
|
290
289
|
* @member {module:model/Location} gps_location
|
|
291
290
|
*/
|
|
292
|
-
Device.prototype[
|
|
291
|
+
Device.prototype["gps_location"] = undefined;
|
|
293
292
|
|
|
294
293
|
/**
|
|
295
294
|
* @member {Date} last_activity
|
|
296
295
|
*/
|
|
297
|
-
Device.prototype[
|
|
296
|
+
Device.prototype["last_activity"] = undefined;
|
|
298
297
|
|
|
299
298
|
/**
|
|
300
299
|
* @member {String} product_uid
|
|
301
300
|
*/
|
|
302
|
-
Device.prototype[
|
|
301
|
+
Device.prototype["product_uid"] = undefined;
|
|
303
302
|
|
|
304
303
|
/**
|
|
305
304
|
* @member {Date} provisioned
|
|
306
305
|
*/
|
|
307
|
-
Device.prototype[
|
|
306
|
+
Device.prototype["provisioned"] = undefined;
|
|
308
307
|
|
|
309
308
|
/**
|
|
310
309
|
* @member {String} serial_number
|
|
311
310
|
*/
|
|
312
|
-
Device.prototype[
|
|
311
|
+
Device.prototype["serial_number"] = undefined;
|
|
313
312
|
|
|
314
313
|
/**
|
|
315
314
|
* @member {String} sku
|
|
316
315
|
*/
|
|
317
|
-
Device.prototype[
|
|
316
|
+
Device.prototype["sku"] = undefined;
|
|
318
317
|
|
|
319
318
|
/**
|
|
320
319
|
* @member {Number} temperature
|
|
321
320
|
*/
|
|
322
|
-
Device.prototype[
|
|
321
|
+
Device.prototype["temperature"] = undefined;
|
|
323
322
|
|
|
324
323
|
/**
|
|
325
324
|
* @member {module:model/DeviceTowerInfo} tower_info
|
|
326
325
|
*/
|
|
327
|
-
Device.prototype[
|
|
326
|
+
Device.prototype["tower_info"] = undefined;
|
|
328
327
|
|
|
329
328
|
/**
|
|
330
329
|
* @member {module:model/Location} tower_location
|
|
331
330
|
*/
|
|
332
|
-
Device.prototype[
|
|
331
|
+
Device.prototype["tower_location"] = undefined;
|
|
333
332
|
|
|
334
333
|
/**
|
|
335
334
|
* @member {module:model/Location} triangulated_location
|
|
336
335
|
*/
|
|
337
|
-
Device.prototype[
|
|
336
|
+
Device.prototype["triangulated_location"] = undefined;
|
|
338
337
|
|
|
339
338
|
/**
|
|
340
339
|
* @member {String} uid
|
|
341
340
|
*/
|
|
342
|
-
Device.prototype[
|
|
341
|
+
Device.prototype["uid"] = undefined;
|
|
343
342
|
|
|
344
343
|
/**
|
|
345
344
|
* @member {Number} voltage
|
|
346
345
|
*/
|
|
347
|
-
Device.prototype[
|
|
346
|
+
Device.prototype["voltage"] = undefined;
|
|
348
347
|
var _default = exports["default"] = Device;
|