@blues-inc/notehub-js 2.3.0 → 3.0.0-beta.2
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 -241
- 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 +843 -831
- package/dist/api/EventApi.js +178 -178
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +562 -562
- 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 +80 -73
- package/dist/model/{PutDeviceFleetsRequest.js → AddDeviceToFleetsRequest.js} +26 -26
- package/dist/model/Alert.js +76 -74
- 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 +126 -125
- 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/{DeleteDeviceFleetsRequest.js → DeleteDeviceFromFleetsRequest.js} +26 -26
- package/dist/model/{HandleNotefileDeleteRequest.js → DeleteNotefilesRequest.js} +24 -24
- package/dist/model/Device.js +115 -101
- package/dist/model/DeviceDfuHistory.js +20 -19
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- package/dist/model/DeviceDfuHistoryPage.js +13 -12
- package/dist/model/DeviceDfuStateMachine.js +25 -24
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusPage.js +13 -12
- 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 +69 -67
- 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 +8 -31
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/GetDataUsage200Response.js +10 -9
- package/dist/model/GetDataUsage200ResponseDataInner.js +41 -40
- package/dist/model/{HandleNoteGet200Response.js → GetDbNote200Response.js} +29 -29
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/{GetDeviceLatest200Response.js → GetDeviceLatestEvents200Response.js} +26 -25
- package/dist/model/GetDevicePlans200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/{GetProjectDevicePublicKeys200Response.js → GetDevicePublicKeys200Response.js} +38 -37
- package/dist/model/{GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js → GetDevicePublicKeys200ResponseDevicePublicKeysInner.js} +28 -28
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/{GetProjectDevices200Response.js → GetDevices200Response.js} +35 -34
- package/dist/model/{GetProjectEvents200Response.js → GetEvents200Response.js} +39 -38
- package/dist/model/{GetProjectEventsByCursor200Response.js → GetEventsByCursor200Response.js} +42 -41
- package/dist/model/{HandleNoteChanges200Response.js → GetNotefile200Response.js} +27 -27
- package/dist/model/GetProducts200Response.js +10 -9
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetSessionsUsage200Response.js +12 -11
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.js +35 -35
- package/dist/model/{HandleNotefileChanges200Response.js → ListNotefiles200Response.js} +27 -27
- package/dist/model/{HandleNotefileChangesPending200Response.js → ListPendingNotefiles200Response.js} +30 -30
- 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 +100 -99
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +19 -18
- 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/{PostProvisionProjectDeviceRequest.js → ProvisionDeviceRequest.js} +36 -36
- 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 +38 -36
- package/dist/model/{HandleNoteSignal200Response.js → SignalDevice200Response.js} +21 -21
- 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 +12 -11
- 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
|
@@ -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
|
|
@@ -27,19 +27,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
|
-
* The
|
|
31
|
-
* @module model/
|
|
32
|
-
* @version
|
|
30
|
+
* The AddDeviceToFleetsRequest model module.
|
|
31
|
+
* @module model/AddDeviceToFleetsRequest
|
|
32
|
+
* @version 3.0.0-beta.2
|
|
33
33
|
*/
|
|
34
|
-
var
|
|
34
|
+
var AddDeviceToFleetsRequest = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
36
|
-
* Constructs a new <code>
|
|
37
|
-
* @alias module:model/
|
|
36
|
+
* Constructs a new <code>AddDeviceToFleetsRequest</code>.
|
|
37
|
+
* @alias module:model/AddDeviceToFleetsRequest
|
|
38
38
|
* @param fleetUids {Array.<String>} The fleetUIDs to add to the device.
|
|
39
39
|
*/
|
|
40
|
-
function
|
|
41
|
-
_classCallCheck(this,
|
|
42
|
-
|
|
40
|
+
function AddDeviceToFleetsRequest(fleetUids) {
|
|
41
|
+
_classCallCheck(this, AddDeviceToFleetsRequest);
|
|
42
|
+
AddDeviceToFleetsRequest.initialize(this, fleetUids);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -47,26 +47,26 @@ var PutDeviceFleetsRequest = /*#__PURE__*/function () {
|
|
|
47
47
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
48
|
* Only for internal use.
|
|
49
49
|
*/
|
|
50
|
-
return _createClass(
|
|
50
|
+
return _createClass(AddDeviceToFleetsRequest, 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
|
/**
|
|
57
|
-
* Constructs a <code>
|
|
57
|
+
* Constructs a <code>AddDeviceToFleetsRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
58
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
59
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
-
* @param {module:model/
|
|
61
|
-
* @return {module:model/
|
|
60
|
+
* @param {module:model/AddDeviceToFleetsRequest} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/AddDeviceToFleetsRequest} The populated <code>AddDeviceToFleetsRequest</code> instance.
|
|
62
62
|
*/
|
|
63
63
|
}, {
|
|
64
64
|
key: "constructFromObject",
|
|
65
65
|
value: function constructFromObject(data, obj) {
|
|
66
66
|
if (data) {
|
|
67
|
-
obj = obj || new
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
67
|
+
obj = obj || new AddDeviceToFleetsRequest();
|
|
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;
|
|
@@ -75,15 +75,15 @@ var PutDeviceFleetsRequest = /*#__PURE__*/function () {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
* Validates the JSON data with respect to <code>
|
|
78
|
+
* Validates the JSON data with respect to <code>AddDeviceToFleetsRequest</code>.
|
|
79
79
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AddDeviceToFleetsRequest</code>.
|
|
81
81
|
*/
|
|
82
82
|
}, {
|
|
83
83
|
key: "validateJSON",
|
|
84
84
|
value: function validateJSON(data) {
|
|
85
85
|
// check to make sure all required properties are present in the JSON string
|
|
86
|
-
var _iterator = _createForOfIteratorHelper(
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(AddDeviceToFleetsRequest.RequiredProperties),
|
|
87
87
|
_step;
|
|
88
88
|
try {
|
|
89
89
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -98,18 +98,18 @@ var PutDeviceFleetsRequest = /*#__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
|
}
|
|
106
106
|
}]);
|
|
107
107
|
}();
|
|
108
|
-
|
|
108
|
+
AddDeviceToFleetsRequest.RequiredProperties = ["fleet_uids"];
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* The fleetUIDs to add to the device.
|
|
112
112
|
* @member {Array.<String>} fleet_uids
|
|
113
113
|
*/
|
|
114
|
-
|
|
115
|
-
var _default = exports["default"] =
|
|
114
|
+
AddDeviceToFleetsRequest.prototype['fleet_uids'] = undefined;
|
|
115
|
+
var _default = exports["default"] = AddDeviceToFleetsRequest;
|
package/dist/model/Alert.js
CHANGED
|
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
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
20
|
* Notehub API
|
|
21
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
22
22
|
*
|
|
23
23
|
* The version of the OpenAPI document: 1.2.0
|
|
24
24
|
* Contact: engineering@blues.io
|
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
31
31
|
/**
|
|
32
32
|
* The Alert model module.
|
|
33
33
|
* @module model/Alert
|
|
34
|
-
* @version
|
|
34
|
+
* @version 3.0.0-beta.2
|
|
35
35
|
*/
|
|
36
36
|
var Alert = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -64,47 +64,47 @@ var Alert = /*#__PURE__*/function () {
|
|
|
64
64
|
value: function constructFromObject(data, obj) {
|
|
65
65
|
if (data) {
|
|
66
66
|
obj = obj || new Alert();
|
|
67
|
-
if (data.hasOwnProperty(
|
|
68
|
-
obj[
|
|
67
|
+
if (data.hasOwnProperty('alert_source')) {
|
|
68
|
+
obj['alert_source'] = _ApiClient["default"].convertToType(data['alert_source'], 'String');
|
|
69
69
|
}
|
|
70
|
-
if (data.hasOwnProperty(
|
|
71
|
-
obj[
|
|
70
|
+
if (data.hasOwnProperty('created_at')) {
|
|
71
|
+
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Number');
|
|
72
72
|
}
|
|
73
|
-
if (data.hasOwnProperty(
|
|
74
|
-
obj[
|
|
73
|
+
if (data.hasOwnProperty('data')) {
|
|
74
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AlertDataInner["default"]]);
|
|
75
75
|
}
|
|
76
|
-
if (data.hasOwnProperty(
|
|
77
|
-
obj[
|
|
76
|
+
if (data.hasOwnProperty('device_uid')) {
|
|
77
|
+
obj['device_uid'] = _ApiClient["default"].convertToType(data['device_uid'], 'String');
|
|
78
78
|
}
|
|
79
|
-
if (data.hasOwnProperty(
|
|
80
|
-
obj[
|
|
79
|
+
if (data.hasOwnProperty('field_name')) {
|
|
80
|
+
obj['field_name'] = _ApiClient["default"].convertToType(data['field_name'], 'String');
|
|
81
81
|
}
|
|
82
|
-
if (data.hasOwnProperty(
|
|
83
|
-
obj[
|
|
82
|
+
if (data.hasOwnProperty('monitor_name')) {
|
|
83
|
+
obj['monitor_name'] = _ApiClient["default"].convertToType(data['monitor_name'], 'String');
|
|
84
84
|
}
|
|
85
|
-
if (data.hasOwnProperty(
|
|
86
|
-
obj[
|
|
85
|
+
if (data.hasOwnProperty('monitor_type')) {
|
|
86
|
+
obj['monitor_type'] = _ApiClient["default"].convertToType(data['monitor_type'], 'String');
|
|
87
87
|
}
|
|
88
|
-
if (data.hasOwnProperty(
|
|
89
|
-
obj[
|
|
88
|
+
if (data.hasOwnProperty('monitor_uid')) {
|
|
89
|
+
obj['monitor_uid'] = _ApiClient["default"].convertToType(data['monitor_uid'], 'String');
|
|
90
90
|
}
|
|
91
|
-
if (data.hasOwnProperty(
|
|
92
|
-
obj[
|
|
91
|
+
if (data.hasOwnProperty('notifications')) {
|
|
92
|
+
obj['notifications'] = _ApiClient["default"].convertToType(data['notifications'], [_AlertNotificationsInner["default"]]);
|
|
93
93
|
}
|
|
94
|
-
if (data.hasOwnProperty(
|
|
95
|
-
obj[
|
|
94
|
+
if (data.hasOwnProperty('resolved')) {
|
|
95
|
+
obj['resolved'] = _ApiClient["default"].convertToType(data['resolved'], 'Boolean');
|
|
96
96
|
}
|
|
97
|
-
if (data.hasOwnProperty(
|
|
98
|
-
obj[
|
|
97
|
+
if (data.hasOwnProperty('source')) {
|
|
98
|
+
obj['source'] = _ApiClient["default"].convertToType(data['source'], 'String');
|
|
99
99
|
}
|
|
100
|
-
if (data.hasOwnProperty(
|
|
101
|
-
obj[
|
|
100
|
+
if (data.hasOwnProperty('uid')) {
|
|
101
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
102
102
|
}
|
|
103
|
-
if (data.hasOwnProperty(
|
|
104
|
-
obj[
|
|
103
|
+
if (data.hasOwnProperty('value')) {
|
|
104
|
+
obj['value'] = _ApiClient["default"].convertToType(data['value'], 'Number');
|
|
105
105
|
}
|
|
106
|
-
if (data.hasOwnProperty(
|
|
107
|
-
obj[
|
|
106
|
+
if (data.hasOwnProperty('version')) {
|
|
107
|
+
obj['version'] = _ApiClient["default"].convertToType(data['version'], 'Number');
|
|
108
108
|
}
|
|
109
109
|
} else if (data === null) {
|
|
110
110
|
return null;
|
|
@@ -121,17 +121,17 @@ var Alert = /*#__PURE__*/function () {
|
|
|
121
121
|
key: "validateJSON",
|
|
122
122
|
value: function validateJSON(data) {
|
|
123
123
|
// ensure the json data is a string
|
|
124
|
-
if (data[
|
|
125
|
-
throw new Error("Expected the field `alert_source` to be a primitive type in the JSON string but got " + data[
|
|
124
|
+
if (data['alert_source'] && !(typeof data['alert_source'] === 'string' || data['alert_source'] instanceof String)) {
|
|
125
|
+
throw new Error("Expected the field `alert_source` to be a primitive type in the JSON string but got " + data['alert_source']);
|
|
126
126
|
}
|
|
127
|
-
if (data[
|
|
127
|
+
if (data['data']) {
|
|
128
128
|
// data not null
|
|
129
129
|
// ensure the json data is an array
|
|
130
|
-
if (!Array.isArray(data[
|
|
131
|
-
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data[
|
|
130
|
+
if (!Array.isArray(data['data'])) {
|
|
131
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
132
132
|
}
|
|
133
133
|
// validate the optional field `data` (array)
|
|
134
|
-
var _iterator = _createForOfIteratorHelper(data[
|
|
134
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
135
135
|
_step;
|
|
136
136
|
try {
|
|
137
137
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -143,35 +143,36 @@ var Alert = /*#__PURE__*/function () {
|
|
|
143
143
|
} finally {
|
|
144
144
|
_iterator.f();
|
|
145
145
|
}
|
|
146
|
+
;
|
|
146
147
|
}
|
|
147
148
|
// ensure the json data is a string
|
|
148
|
-
if (data[
|
|
149
|
-
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data[
|
|
149
|
+
if (data['device_uid'] && !(typeof data['device_uid'] === 'string' || data['device_uid'] instanceof String)) {
|
|
150
|
+
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data['device_uid']);
|
|
150
151
|
}
|
|
151
152
|
// ensure the json data is a string
|
|
152
|
-
if (data[
|
|
153
|
-
throw new Error("Expected the field `field_name` to be a primitive type in the JSON string but got " + data[
|
|
153
|
+
if (data['field_name'] && !(typeof data['field_name'] === 'string' || data['field_name'] instanceof String)) {
|
|
154
|
+
throw new Error("Expected the field `field_name` to be a primitive type in the JSON string but got " + data['field_name']);
|
|
154
155
|
}
|
|
155
156
|
// ensure the json data is a string
|
|
156
|
-
if (data[
|
|
157
|
-
throw new Error("Expected the field `monitor_name` to be a primitive type in the JSON string but got " + data[
|
|
157
|
+
if (data['monitor_name'] && !(typeof data['monitor_name'] === 'string' || data['monitor_name'] instanceof String)) {
|
|
158
|
+
throw new Error("Expected the field `monitor_name` to be a primitive type in the JSON string but got " + data['monitor_name']);
|
|
158
159
|
}
|
|
159
160
|
// ensure the json data is a string
|
|
160
|
-
if (data[
|
|
161
|
-
throw new Error("Expected the field `monitor_type` to be a primitive type in the JSON string but got " + data[
|
|
161
|
+
if (data['monitor_type'] && !(typeof data['monitor_type'] === 'string' || data['monitor_type'] instanceof String)) {
|
|
162
|
+
throw new Error("Expected the field `monitor_type` to be a primitive type in the JSON string but got " + data['monitor_type']);
|
|
162
163
|
}
|
|
163
164
|
// ensure the json data is a string
|
|
164
|
-
if (data[
|
|
165
|
-
throw new Error("Expected the field `monitor_uid` to be a primitive type in the JSON string but got " + data[
|
|
165
|
+
if (data['monitor_uid'] && !(typeof data['monitor_uid'] === 'string' || data['monitor_uid'] instanceof String)) {
|
|
166
|
+
throw new Error("Expected the field `monitor_uid` to be a primitive type in the JSON string but got " + data['monitor_uid']);
|
|
166
167
|
}
|
|
167
|
-
if (data[
|
|
168
|
+
if (data['notifications']) {
|
|
168
169
|
// data not null
|
|
169
170
|
// ensure the json data is an array
|
|
170
|
-
if (!Array.isArray(data[
|
|
171
|
-
throw new Error("Expected the field `notifications` to be an array in the JSON data but got " + data[
|
|
171
|
+
if (!Array.isArray(data['notifications'])) {
|
|
172
|
+
throw new Error("Expected the field `notifications` to be an array in the JSON data but got " + data['notifications']);
|
|
172
173
|
}
|
|
173
174
|
// validate the optional field `notifications` (array)
|
|
174
|
-
var _iterator2 = _createForOfIteratorHelper(data[
|
|
175
|
+
var _iterator2 = _createForOfIteratorHelper(data['notifications']),
|
|
175
176
|
_step2;
|
|
176
177
|
try {
|
|
177
178
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -183,14 +184,15 @@ var Alert = /*#__PURE__*/function () {
|
|
|
183
184
|
} finally {
|
|
184
185
|
_iterator2.f();
|
|
185
186
|
}
|
|
187
|
+
;
|
|
186
188
|
}
|
|
187
189
|
// ensure the json data is a string
|
|
188
|
-
if (data[
|
|
189
|
-
throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data[
|
|
190
|
+
if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
|
|
191
|
+
throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
|
|
190
192
|
}
|
|
191
193
|
// ensure the json data is a string
|
|
192
|
-
if (data[
|
|
193
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
194
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
195
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
194
196
|
}
|
|
195
197
|
return true;
|
|
196
198
|
}
|
|
@@ -200,100 +202,100 @@ var Alert = /*#__PURE__*/function () {
|
|
|
200
202
|
* The source of the alert
|
|
201
203
|
* @member {module:model/Alert.AlertSourceEnum} alert_source
|
|
202
204
|
*/
|
|
203
|
-
Alert.prototype[
|
|
205
|
+
Alert.prototype['alert_source'] = undefined;
|
|
204
206
|
|
|
205
207
|
/**
|
|
206
208
|
* The time the alert was created
|
|
207
209
|
* @member {Number} created_at
|
|
208
210
|
*/
|
|
209
|
-
Alert.prototype[
|
|
211
|
+
Alert.prototype['created_at'] = undefined;
|
|
210
212
|
|
|
211
213
|
/**
|
|
212
214
|
* @member {Array.<module:model/AlertDataInner>} data
|
|
213
215
|
*/
|
|
214
|
-
Alert.prototype[
|
|
216
|
+
Alert.prototype['data'] = undefined;
|
|
215
217
|
|
|
216
218
|
/**
|
|
217
219
|
* Device UID
|
|
218
220
|
* @member {String} device_uid
|
|
219
221
|
*/
|
|
220
|
-
Alert.prototype[
|
|
222
|
+
Alert.prototype['device_uid'] = undefined;
|
|
221
223
|
|
|
222
224
|
/**
|
|
223
225
|
* The field name that triggered the alert
|
|
224
226
|
* @member {String} field_name
|
|
225
227
|
*/
|
|
226
|
-
Alert.prototype[
|
|
228
|
+
Alert.prototype['field_name'] = undefined;
|
|
227
229
|
|
|
228
230
|
/**
|
|
229
231
|
* Monitor Name
|
|
230
232
|
* @member {String} monitor_name
|
|
231
233
|
*/
|
|
232
|
-
Alert.prototype[
|
|
234
|
+
Alert.prototype['monitor_name'] = undefined;
|
|
233
235
|
|
|
234
236
|
/**
|
|
235
237
|
* The type of monitor that triggered the alert
|
|
236
238
|
* @member {module:model/Alert.MonitorTypeEnum} monitor_type
|
|
237
239
|
*/
|
|
238
|
-
Alert.prototype[
|
|
240
|
+
Alert.prototype['monitor_type'] = undefined;
|
|
239
241
|
|
|
240
242
|
/**
|
|
241
243
|
* Monitor UID
|
|
242
244
|
* @member {String} monitor_uid
|
|
243
245
|
*/
|
|
244
|
-
Alert.prototype[
|
|
246
|
+
Alert.prototype['monitor_uid'] = undefined;
|
|
245
247
|
|
|
246
248
|
/**
|
|
247
249
|
* @member {Array.<module:model/AlertNotificationsInner>} notifications
|
|
248
250
|
*/
|
|
249
|
-
Alert.prototype[
|
|
251
|
+
Alert.prototype['notifications'] = undefined;
|
|
250
252
|
|
|
251
253
|
/**
|
|
252
254
|
* If true, the alert has been resolved
|
|
253
255
|
* @member {Boolean} resolved
|
|
254
256
|
*/
|
|
255
|
-
Alert.prototype[
|
|
257
|
+
Alert.prototype['resolved'] = undefined;
|
|
256
258
|
|
|
257
259
|
/**
|
|
258
260
|
* The UID of the source of the alert
|
|
259
261
|
* @member {String} source
|
|
260
262
|
*/
|
|
261
|
-
Alert.prototype[
|
|
263
|
+
Alert.prototype['source'] = undefined;
|
|
262
264
|
|
|
263
265
|
/**
|
|
264
266
|
* Alert UID
|
|
265
267
|
* @member {String} uid
|
|
266
268
|
*/
|
|
267
|
-
Alert.prototype[
|
|
269
|
+
Alert.prototype['uid'] = undefined;
|
|
268
270
|
|
|
269
271
|
/**
|
|
270
272
|
* The value that triggered the alert
|
|
271
273
|
* @member {Number} value
|
|
272
274
|
*/
|
|
273
|
-
Alert.prototype[
|
|
275
|
+
Alert.prototype['value'] = undefined;
|
|
274
276
|
|
|
275
277
|
/**
|
|
276
278
|
* The version of the alert
|
|
277
279
|
* @member {Number} version
|
|
278
280
|
*/
|
|
279
|
-
Alert.prototype[
|
|
281
|
+
Alert.prototype['version'] = undefined;
|
|
280
282
|
|
|
281
283
|
/**
|
|
282
284
|
* Allowed values for the <code>alert_source</code> property.
|
|
283
285
|
* @enum {String}
|
|
284
286
|
* @readonly
|
|
285
287
|
*/
|
|
286
|
-
Alert[
|
|
288
|
+
Alert['AlertSourceEnum'] = {
|
|
287
289
|
/**
|
|
288
290
|
* value: "app"
|
|
289
291
|
* @const
|
|
290
292
|
*/
|
|
291
|
-
app: "app",
|
|
293
|
+
"app": "app",
|
|
292
294
|
/**
|
|
293
295
|
* value: "device"
|
|
294
296
|
* @const
|
|
295
297
|
*/
|
|
296
|
-
device: "device"
|
|
298
|
+
"device": "device"
|
|
297
299
|
};
|
|
298
300
|
|
|
299
301
|
/**
|
|
@@ -301,16 +303,16 @@ Alert["AlertSourceEnum"] = {
|
|
|
301
303
|
* @enum {String}
|
|
302
304
|
* @readonly
|
|
303
305
|
*/
|
|
304
|
-
Alert[
|
|
306
|
+
Alert['MonitorTypeEnum'] = {
|
|
305
307
|
/**
|
|
306
308
|
* value: "event"
|
|
307
309
|
* @const
|
|
308
310
|
*/
|
|
309
|
-
event: "event",
|
|
311
|
+
"event": "event",
|
|
310
312
|
/**
|
|
311
313
|
* value: "device"
|
|
312
314
|
* @const
|
|
313
315
|
*/
|
|
314
|
-
device: "device"
|
|
316
|
+
"device": "device"
|
|
315
317
|
};
|
|
316
318
|
var _default = exports["default"] = Alert;
|
|
@@ -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 AlertDataInner model module.
|
|
28
28
|
* @module model/AlertDataInner
|
|
29
|
-
* @version
|
|
29
|
+
* @version 3.0.0-beta.2
|
|
30
30
|
*/
|
|
31
31
|
var AlertDataInner = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,23 +59,23 @@ var AlertDataInner = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new AlertDataInner();
|
|
62
|
-
if (data.hasOwnProperty(
|
|
63
|
-
obj[
|
|
62
|
+
if (data.hasOwnProperty('alert_source')) {
|
|
63
|
+
obj['alert_source'] = _ApiClient["default"].convertToType(data['alert_source'], 'String');
|
|
64
64
|
}
|
|
65
|
-
if (data.hasOwnProperty(
|
|
66
|
-
obj[
|
|
65
|
+
if (data.hasOwnProperty('source')) {
|
|
66
|
+
obj['source'] = _ApiClient["default"].convertToType(data['source'], 'String');
|
|
67
67
|
}
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
68
|
+
if (data.hasOwnProperty('source_type')) {
|
|
69
|
+
obj['source_type'] = _ApiClient["default"].convertToType(data['source_type'], 'String');
|
|
70
70
|
}
|
|
71
|
-
if (data.hasOwnProperty(
|
|
72
|
-
obj[
|
|
71
|
+
if (data.hasOwnProperty('source_uid')) {
|
|
72
|
+
obj['source_uid'] = _ApiClient["default"].convertToType(data['source_uid'], 'String');
|
|
73
73
|
}
|
|
74
|
-
if (data.hasOwnProperty(
|
|
75
|
-
obj[
|
|
74
|
+
if (data.hasOwnProperty('value')) {
|
|
75
|
+
obj['value'] = _ApiClient["default"].convertToType(data['value'], 'Number');
|
|
76
76
|
}
|
|
77
|
-
if (data.hasOwnProperty(
|
|
78
|
-
obj[
|
|
77
|
+
if (data.hasOwnProperty('when')) {
|
|
78
|
+
obj['when'] = _ApiClient["default"].convertToType(data['when'], 'String');
|
|
79
79
|
}
|
|
80
80
|
} else if (data === null) {
|
|
81
81
|
return null;
|
|
@@ -92,24 +92,24 @@ var AlertDataInner = /*#__PURE__*/function () {
|
|
|
92
92
|
key: "validateJSON",
|
|
93
93
|
value: function validateJSON(data) {
|
|
94
94
|
// ensure the json data is a string
|
|
95
|
-
if (data[
|
|
96
|
-
throw new Error("Expected the field `alert_source` to be a primitive type in the JSON string but got " + data[
|
|
95
|
+
if (data['alert_source'] && !(typeof data['alert_source'] === 'string' || data['alert_source'] instanceof String)) {
|
|
96
|
+
throw new Error("Expected the field `alert_source` to be a primitive type in the JSON string but got " + data['alert_source']);
|
|
97
97
|
}
|
|
98
98
|
// ensure the json data is a string
|
|
99
|
-
if (data[
|
|
100
|
-
throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data[
|
|
99
|
+
if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
|
|
100
|
+
throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
|
|
101
101
|
}
|
|
102
102
|
// ensure the json data is a string
|
|
103
|
-
if (data[
|
|
104
|
-
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data[
|
|
103
|
+
if (data['source_type'] && !(typeof data['source_type'] === 'string' || data['source_type'] instanceof String)) {
|
|
104
|
+
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data['source_type']);
|
|
105
105
|
}
|
|
106
106
|
// ensure the json data is a string
|
|
107
|
-
if (data[
|
|
108
|
-
throw new Error("Expected the field `source_uid` to be a primitive type in the JSON string but got " + data[
|
|
107
|
+
if (data['source_uid'] && !(typeof data['source_uid'] === 'string' || data['source_uid'] instanceof String)) {
|
|
108
|
+
throw new Error("Expected the field `source_uid` to be a primitive type in the JSON string but got " + data['source_uid']);
|
|
109
109
|
}
|
|
110
110
|
// ensure the json data is a string
|
|
111
|
-
if (data[
|
|
112
|
-
throw new Error("Expected the field `when` to be a primitive type in the JSON string but got " + data[
|
|
111
|
+
if (data['when'] && !(typeof data['when'] === 'string' || data['when'] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `when` to be a primitive type in the JSON string but got " + data['when']);
|
|
113
113
|
}
|
|
114
114
|
return true;
|
|
115
115
|
}
|
|
@@ -119,54 +119,54 @@ var AlertDataInner = /*#__PURE__*/function () {
|
|
|
119
119
|
* The source of the alert
|
|
120
120
|
* @member {module:model/AlertDataInner.AlertSourceEnum} alert_source
|
|
121
121
|
*/
|
|
122
|
-
AlertDataInner.prototype[
|
|
122
|
+
AlertDataInner.prototype['alert_source'] = undefined;
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* The UID of the source of the alert
|
|
126
126
|
* @member {String} source
|
|
127
127
|
*/
|
|
128
|
-
AlertDataInner.prototype[
|
|
128
|
+
AlertDataInner.prototype['source'] = undefined;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* The type of source.
|
|
132
132
|
* @member {module:model/AlertDataInner.SourceTypeEnum} source_type
|
|
133
133
|
*/
|
|
134
|
-
AlertDataInner.prototype[
|
|
134
|
+
AlertDataInner.prototype['source_type'] = undefined;
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* The UID of the source of the alert
|
|
138
138
|
* @member {String} source_uid
|
|
139
139
|
*/
|
|
140
|
-
AlertDataInner.prototype[
|
|
140
|
+
AlertDataInner.prototype['source_uid'] = undefined;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* The value that triggered the alert
|
|
144
144
|
* @member {Number} value
|
|
145
145
|
*/
|
|
146
|
-
AlertDataInner.prototype[
|
|
146
|
+
AlertDataInner.prototype['value'] = undefined;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* The time the alert was created
|
|
150
150
|
* @member {String} when
|
|
151
151
|
*/
|
|
152
|
-
AlertDataInner.prototype[
|
|
152
|
+
AlertDataInner.prototype['when'] = undefined;
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
* Allowed values for the <code>alert_source</code> property.
|
|
156
156
|
* @enum {String}
|
|
157
157
|
* @readonly
|
|
158
158
|
*/
|
|
159
|
-
AlertDataInner[
|
|
159
|
+
AlertDataInner['AlertSourceEnum'] = {
|
|
160
160
|
/**
|
|
161
161
|
* value: "app"
|
|
162
162
|
* @const
|
|
163
163
|
*/
|
|
164
|
-
app: "app",
|
|
164
|
+
"app": "app",
|
|
165
165
|
/**
|
|
166
166
|
* value: "device"
|
|
167
167
|
* @const
|
|
168
168
|
*/
|
|
169
|
-
device: "device"
|
|
169
|
+
"device": "device"
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
/**
|
|
@@ -174,11 +174,11 @@ AlertDataInner["AlertSourceEnum"] = {
|
|
|
174
174
|
* @enum {String}
|
|
175
175
|
* @readonly
|
|
176
176
|
*/
|
|
177
|
-
AlertDataInner[
|
|
177
|
+
AlertDataInner['SourceTypeEnum'] = {
|
|
178
178
|
/**
|
|
179
179
|
* value: "event"
|
|
180
180
|
* @const
|
|
181
181
|
*/
|
|
182
|
-
event: "event"
|
|
182
|
+
"event": "event"
|
|
183
183
|
};
|
|
184
184
|
var _default = exports["default"] = AlertDataInner;
|