@blues-inc/notehub-js 1.0.37-beta.7 → 1.0.37-beta.9
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 +10 -10
- package/dist/ApiClient.js +2 -2
- package/dist/api/AlertApi.js +1 -1
- package/dist/api/AuthorizationApi.js +64 -1
- package/dist/api/BillingAccountApi.js +1 -1
- package/dist/api/DeviceApi.js +8 -8
- package/dist/api/EventApi.js +1 -1
- package/dist/api/ExternalDevicesApi.js +1 -1
- package/dist/api/MonitorApi.js +10 -10
- package/dist/api/ProjectApi.js +14 -14
- package/dist/api/RouteApi.js +1 -1
- package/dist/api/WebhookApi.js +1 -1
- package/dist/index.js +52 -59
- package/dist/model/Alert.js +91 -91
- package/dist/model/AlertDataInner.js +10 -10
- package/dist/model/AlertNotificationsInner.js +10 -10
- package/dist/model/AnalyticsEventsData.js +14 -14
- package/dist/model/AnalyticsEventsResponse.js +1 -1
- package/dist/model/AnalyticsRouteLogsData.js +15 -15
- package/dist/model/AnalyticsRouteLogsResponse.js +1 -1
- package/dist/model/AnalyticsSessionsData.js +14 -14
- package/dist/model/AnalyticsSessionsResponse.js +1 -1
- package/dist/model/Aws.js +86 -86
- package/dist/model/{HttpFilter.js → AwsFilter.js} +32 -32
- package/dist/model/{HttpTransform.js → AwsTransform.js} +21 -21
- package/dist/model/Azure.js +51 -51
- package/dist/model/BillingAccount.js +19 -19
- package/dist/model/Body.js +1 -1
- package/dist/model/CloneProjectRequest.js +25 -25
- package/dist/model/Contact.js +19 -19
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateMonitor.js +186 -186
- package/dist/model/CreateProductRequest.js +30 -30
- package/dist/model/CreateProjectRequest.js +20 -20
- package/dist/model/CreateUpdateRepository.js +18 -18
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +60 -60
- package/dist/model/DataField.js +1 -1
- package/dist/model/DataSetField.js +14 -14
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +134 -134
- package/dist/model/DeviceDfuHistory.js +15 -15
- package/dist/model/{DeviceDfuStatusCurrent.js → DeviceDfuHistoryCurrent.js} +52 -52
- package/dist/model/DeviceDfuHistoryPage.js +1 -1
- package/dist/model/DeviceDfuStateMachine.js +14 -14
- package/dist/model/DeviceDfuStateMachineNode.js +27 -27
- package/dist/model/DeviceDfuStatus.js +15 -15
- package/dist/model/DeviceDfuStatusPage.js +1 -1
- package/dist/model/DeviceSession.js +278 -278
- package/dist/model/DeviceTowerInfo.js +15 -15
- package/dist/model/DeviceUsage.js +36 -36
- package/dist/model/DfuActionRequest.js +1 -1
- package/dist/model/EmailNotification.js +1 -1
- package/dist/model/EnvTreeJsonNode.js +76 -76
- package/dist/model/EnvVar.js +9 -9
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +38 -38
- package/dist/model/Event.js +340 -340
- package/dist/model/Firmware.js +45 -45
- package/dist/model/FirmwareInfo.js +71 -71
- package/dist/model/Fleet.js +31 -31
- package/dist/model/GetAlerts200Response.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/{GetDeviceEnvironmentVariables200Response.js → GetDeviceEnvironmentVariablesByPin200Response.js} +30 -30
- package/dist/model/{GetProjectFleets200Response.js → GetDeviceFleets200Response.js} +20 -20
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +15 -15
- package/dist/model/GetDeviceLatest200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +18 -18
- package/dist/model/GetDeviceSessions200Response.js +14 -14
- package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +1 -1
- package/dist/model/GetProjectEvents200Response.js +1 -1
- package/dist/model/GetProjectEventsByCursor200Response.js +16 -16
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectProducts200Response.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetWebhooks200Response.js +1 -1
- package/dist/model/Google.js +35 -35
- package/dist/model/HandleNoteChanges200Response.js +10 -10
- package/dist/model/HandleNoteGet200Response.js +1 -1
- package/dist/model/HandleNoteSignal200Response.js +1 -1
- package/dist/model/HandleNotefileChanges200Response.js +10 -10
- package/dist/model/HandleNotefileChangesPending200Response.js +15 -15
- package/dist/model/HandleNotefileDeleteRequest.js +1 -1
- package/dist/model/Http.js +43 -43
- package/dist/model/Location.js +38 -38
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +135 -135
- package/dist/model/MonitorAlertRoutesInner.js +12 -12
- package/dist/model/Mqtt.js +91 -91
- package/dist/model/Note.js +1 -1
- package/dist/model/NotefileSchema.js +1 -1
- package/dist/model/NotehubRoute.js +30 -30
- package/dist/model/NotehubRouteSchema.js +80 -80
- package/dist/model/{QuestionDataResponseMap.js → OAuth2Error.js} +65 -42
- package/dist/model/{DataSet.js → OAuth2TokenResponse.js} +67 -77
- package/dist/model/PersonalAccessToken.js +37 -37
- package/dist/model/PersonalAccessTokenCreatedBy.js +13 -13
- package/dist/model/PersonalAccessTokenInfo.js +13 -13
- package/dist/model/PersonalAccessTokenSecret.js +14 -14
- package/dist/model/PostProvisionProjectDeviceRequest.js +14 -14
- package/dist/model/Product.js +29 -29
- package/dist/model/Project.js +35 -35
- package/dist/model/ProjectMember.js +19 -19
- package/dist/model/Proxy.js +21 -21
- package/dist/model/PutDeviceFleetsRequest.js +1 -1
- package/dist/model/Radresponder.js +28 -28
- package/dist/model/Repository.js +22 -22
- package/dist/model/RouteLog.js +28 -28
- package/dist/model/SchemaProperty.js +34 -36
- package/dist/model/SimUsage.js +16 -69
- package/dist/model/Slack.js +71 -71
- package/dist/model/SlackBearerNotification.js +14 -14
- package/dist/model/{SnowflakeTransform.js → SlackTransform.js} +19 -19
- package/dist/model/SlackWebHookNotification.js +14 -14
- package/dist/model/Snowflake.js +57 -57
- package/dist/model/Thingworx.js +36 -36
- package/dist/model/TowerLocation.js +58 -58
- package/dist/model/Twilio.js +46 -46
- package/dist/model/UpdateFleetRequest.js +14 -14
- package/dist/model/UploadMetadata.js +68 -68
- package/dist/model/UserDbRoute.js +26 -26
- package/dist/model/UserDfuStateMachine.js +14 -14
- package/dist/model/UserDfuStateMachineStatus.js +9 -9
- package/dist/model/UserFirmwareInfo.js +1 -1
- package/dist/model/WebhookSettings.js +1 -1
- package/package.json +1 -1
- package/dist/model/QuestionDataResponseLineChart.js +0 -204
package/dist/model/Location.js
CHANGED
|
@@ -29,22 +29,22 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The Location model module.
|
|
31
31
|
* @module model/Location
|
|
32
|
-
* @version 1.0.37-beta.
|
|
32
|
+
* @version 1.0.37-beta.9
|
|
33
33
|
*/
|
|
34
34
|
var Location = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
36
36
|
* Constructs a new <code>Location</code>.
|
|
37
37
|
* @alias module:model/Location
|
|
38
|
-
* @param when {String}
|
|
39
|
-
* @param name {String}
|
|
40
38
|
* @param country {String}
|
|
41
|
-
* @param timezone {String}
|
|
42
39
|
* @param latitude {Number}
|
|
43
40
|
* @param longitude {Number}
|
|
41
|
+
* @param name {String}
|
|
42
|
+
* @param timezone {String}
|
|
43
|
+
* @param when {String}
|
|
44
44
|
*/
|
|
45
|
-
function Location(
|
|
45
|
+
function Location(country, latitude, longitude, name, timezone, when) {
|
|
46
46
|
_classCallCheck(this, Location);
|
|
47
|
-
Location.initialize(this,
|
|
47
|
+
Location.initialize(this, country, latitude, longitude, name, timezone, when);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -54,13 +54,13 @@ var Location = /*#__PURE__*/function () {
|
|
|
54
54
|
*/
|
|
55
55
|
return _createClass(Location, null, [{
|
|
56
56
|
key: "initialize",
|
|
57
|
-
value: function initialize(obj,
|
|
58
|
-
obj['when'] = when;
|
|
59
|
-
obj['name'] = name;
|
|
57
|
+
value: function initialize(obj, country, latitude, longitude, name, timezone, when) {
|
|
60
58
|
obj['country'] = country;
|
|
61
|
-
obj['timezone'] = timezone;
|
|
62
59
|
obj['latitude'] = latitude;
|
|
63
60
|
obj['longitude'] = longitude;
|
|
61
|
+
obj['name'] = name;
|
|
62
|
+
obj['timezone'] = timezone;
|
|
63
|
+
obj['when'] = when;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
@@ -75,24 +75,24 @@ var Location = /*#__PURE__*/function () {
|
|
|
75
75
|
value: function constructFromObject(data, obj) {
|
|
76
76
|
if (data) {
|
|
77
77
|
obj = obj || new Location();
|
|
78
|
-
if (data.hasOwnProperty('when')) {
|
|
79
|
-
obj['when'] = _ApiClient["default"].convertToType(data['when'], 'String');
|
|
80
|
-
}
|
|
81
|
-
if (data.hasOwnProperty('name')) {
|
|
82
|
-
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
83
|
-
}
|
|
84
78
|
if (data.hasOwnProperty('country')) {
|
|
85
79
|
obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
|
|
86
80
|
}
|
|
87
|
-
if (data.hasOwnProperty('timezone')) {
|
|
88
|
-
obj['timezone'] = _ApiClient["default"].convertToType(data['timezone'], 'String');
|
|
89
|
-
}
|
|
90
81
|
if (data.hasOwnProperty('latitude')) {
|
|
91
82
|
obj['latitude'] = _ApiClient["default"].convertToType(data['latitude'], 'Number');
|
|
92
83
|
}
|
|
93
84
|
if (data.hasOwnProperty('longitude')) {
|
|
94
85
|
obj['longitude'] = _ApiClient["default"].convertToType(data['longitude'], 'Number');
|
|
95
86
|
}
|
|
87
|
+
if (data.hasOwnProperty('name')) {
|
|
88
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('timezone')) {
|
|
91
|
+
obj['timezone'] = _ApiClient["default"].convertToType(data['timezone'], 'String');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('when')) {
|
|
94
|
+
obj['when'] = _ApiClient["default"].convertToType(data['when'], 'String');
|
|
95
|
+
}
|
|
96
96
|
} else if (data === null) {
|
|
97
97
|
return null;
|
|
98
98
|
}
|
|
@@ -123,54 +123,54 @@ var Location = /*#__PURE__*/function () {
|
|
|
123
123
|
} finally {
|
|
124
124
|
_iterator.f();
|
|
125
125
|
}
|
|
126
|
-
if (data['
|
|
127
|
-
throw new Error("Expected the field `
|
|
126
|
+
if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
|
|
128
128
|
}
|
|
129
129
|
// ensure the json data is a string
|
|
130
130
|
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
131
131
|
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
132
132
|
}
|
|
133
133
|
// ensure the json data is a string
|
|
134
|
-
if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
|
|
135
|
-
throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
|
|
136
|
-
}
|
|
137
|
-
// ensure the json data is a string
|
|
138
134
|
if (data['timezone'] && !(typeof data['timezone'] === 'string' || data['timezone'] instanceof String)) {
|
|
139
135
|
throw new Error("Expected the field `timezone` to be a primitive type in the JSON string but got " + data['timezone']);
|
|
140
136
|
}
|
|
137
|
+
// ensure the json data is a string
|
|
138
|
+
if (data['when'] && !(typeof data['when'] === 'string' || data['when'] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `when` to be a primitive type in the JSON string but got " + data['when']);
|
|
140
|
+
}
|
|
141
141
|
return true;
|
|
142
142
|
}
|
|
143
143
|
}]);
|
|
144
144
|
}();
|
|
145
|
-
Location.RequiredProperties = ["
|
|
145
|
+
Location.RequiredProperties = ["country", "latitude", "longitude", "name", "timezone", "when"];
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* @member {String}
|
|
148
|
+
* @member {String} country
|
|
149
149
|
*/
|
|
150
|
-
Location.prototype['
|
|
150
|
+
Location.prototype['country'] = undefined;
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* @member {
|
|
153
|
+
* @member {Number} latitude
|
|
154
154
|
*/
|
|
155
|
-
Location.prototype['
|
|
155
|
+
Location.prototype['latitude'] = undefined;
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
|
-
* @member {
|
|
158
|
+
* @member {Number} longitude
|
|
159
159
|
*/
|
|
160
|
-
Location.prototype['
|
|
160
|
+
Location.prototype['longitude'] = undefined;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
|
-
* @member {String}
|
|
163
|
+
* @member {String} name
|
|
164
164
|
*/
|
|
165
|
-
Location.prototype['
|
|
165
|
+
Location.prototype['name'] = undefined;
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
|
-
* @member {
|
|
168
|
+
* @member {String} timezone
|
|
169
169
|
*/
|
|
170
|
-
Location.prototype['
|
|
170
|
+
Location.prototype['timezone'] = undefined;
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
|
-
* @member {
|
|
173
|
+
* @member {String} when
|
|
174
174
|
*/
|
|
175
|
-
Location.prototype['
|
|
175
|
+
Location.prototype['when'] = undefined;
|
|
176
176
|
var _default = exports["default"] = Location;
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The Login200Response model module.
|
|
28
28
|
* @module model/Login200Response
|
|
29
|
-
* @version 1.0.37-beta.
|
|
29
|
+
* @version 1.0.37-beta.9
|
|
30
30
|
*/
|
|
31
31
|
var Login200Response = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The LoginRequest model module.
|
|
28
28
|
* @module model/LoginRequest
|
|
29
|
-
* @version 1.0.37-beta.
|
|
29
|
+
* @version 1.0.37-beta.9
|
|
30
30
|
*/
|
|
31
31
|
var LoginRequest = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,12 +59,12 @@ var LoginRequest = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new LoginRequest();
|
|
62
|
-
if (data.hasOwnProperty('username')) {
|
|
63
|
-
obj['username'] = _ApiClient["default"].convertToType(data['username'], 'String');
|
|
64
|
-
}
|
|
65
62
|
if (data.hasOwnProperty('password')) {
|
|
66
63
|
obj['password'] = _ApiClient["default"].convertToType(data['password'], 'String');
|
|
67
64
|
}
|
|
65
|
+
if (data.hasOwnProperty('username')) {
|
|
66
|
+
obj['username'] = _ApiClient["default"].convertToType(data['username'], 'String');
|
|
67
|
+
}
|
|
68
68
|
} else if (data === null) {
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
@@ -79,25 +79,25 @@ var LoginRequest = /*#__PURE__*/function () {
|
|
|
79
79
|
}, {
|
|
80
80
|
key: "validateJSON",
|
|
81
81
|
value: function validateJSON(data) {
|
|
82
|
-
// ensure the json data is a string
|
|
83
|
-
if (data['username'] && !(typeof data['username'] === 'string' || data['username'] instanceof String)) {
|
|
84
|
-
throw new Error("Expected the field `username` to be a primitive type in the JSON string but got " + data['username']);
|
|
85
|
-
}
|
|
86
82
|
// ensure the json data is a string
|
|
87
83
|
if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) {
|
|
88
84
|
throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']);
|
|
89
85
|
}
|
|
86
|
+
// ensure the json data is a string
|
|
87
|
+
if (data['username'] && !(typeof data['username'] === 'string' || data['username'] instanceof String)) {
|
|
88
|
+
throw new Error("Expected the field `username` to be a primitive type in the JSON string but got " + data['username']);
|
|
89
|
+
}
|
|
90
90
|
return true;
|
|
91
91
|
}
|
|
92
92
|
}]);
|
|
93
93
|
}();
|
|
94
94
|
/**
|
|
95
|
-
* @member {String}
|
|
95
|
+
* @member {String} password
|
|
96
96
|
*/
|
|
97
|
-
LoginRequest.prototype['
|
|
97
|
+
LoginRequest.prototype['password'] = undefined;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* @member {String}
|
|
100
|
+
* @member {String} username
|
|
101
101
|
*/
|
|
102
|
-
LoginRequest.prototype['
|
|
102
|
+
LoginRequest.prototype['username'] = undefined;
|
|
103
103
|
var _default = exports["default"] = LoginRequest;
|
package/dist/model/Monitor.js
CHANGED
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The Monitor model module.
|
|
32
32
|
* @module model/Monitor
|
|
33
|
-
* @version 1.0.37-beta.
|
|
33
|
+
* @version 1.0.37-beta.9
|
|
34
34
|
*/
|
|
35
35
|
var Monitor = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -63,59 +63,59 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
63
63
|
value: function constructFromObject(data, obj) {
|
|
64
64
|
if (data) {
|
|
65
65
|
obj = obj || new Monitor();
|
|
66
|
-
if (data.hasOwnProperty('
|
|
67
|
-
obj['
|
|
66
|
+
if (data.hasOwnProperty('aggregate_function')) {
|
|
67
|
+
obj['aggregate_function'] = _ApiClient["default"].convertToType(data['aggregate_function'], 'String');
|
|
68
68
|
}
|
|
69
|
-
if (data.hasOwnProperty('
|
|
70
|
-
obj['
|
|
69
|
+
if (data.hasOwnProperty('aggregate_window')) {
|
|
70
|
+
obj['aggregate_window'] = _ApiClient["default"].convertToType(data['aggregate_window'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('alert')) {
|
|
73
|
+
obj['alert'] = _ApiClient["default"].convertToType(data['alert'], 'Boolean');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('alert_routes')) {
|
|
76
|
+
obj['alert_routes'] = _ApiClient["default"].convertToType(data['alert_routes'], [_MonitorAlertRoutesInner["default"]]);
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('condition_type')) {
|
|
79
|
+
obj['condition_type'] = _ApiClient["default"].convertToType(data['condition_type'], 'String');
|
|
71
80
|
}
|
|
72
81
|
if (data.hasOwnProperty('description')) {
|
|
73
82
|
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
74
83
|
}
|
|
75
|
-
if (data.hasOwnProperty('source_type')) {
|
|
76
|
-
obj['source_type'] = _ApiClient["default"].convertToType(data['source_type'], 'String');
|
|
77
|
-
}
|
|
78
84
|
if (data.hasOwnProperty('disabled')) {
|
|
79
85
|
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
80
86
|
}
|
|
81
|
-
if (data.hasOwnProperty('alert')) {
|
|
82
|
-
obj['alert'] = _ApiClient["default"].convertToType(data['alert'], 'Boolean');
|
|
83
|
-
}
|
|
84
|
-
if (data.hasOwnProperty('notefile_filter')) {
|
|
85
|
-
obj['notefile_filter'] = _ApiClient["default"].convertToType(data['notefile_filter'], ['String']);
|
|
86
|
-
}
|
|
87
87
|
if (data.hasOwnProperty('fleet_filter')) {
|
|
88
88
|
obj['fleet_filter'] = _ApiClient["default"].convertToType(data['fleet_filter'], ['String']);
|
|
89
89
|
}
|
|
90
|
-
if (data.hasOwnProperty('
|
|
91
|
-
obj['
|
|
90
|
+
if (data.hasOwnProperty('last_routed_at')) {
|
|
91
|
+
obj['last_routed_at'] = _ApiClient["default"].convertToType(data['last_routed_at'], 'String');
|
|
92
92
|
}
|
|
93
|
-
if (data.hasOwnProperty('
|
|
94
|
-
obj['
|
|
93
|
+
if (data.hasOwnProperty('name')) {
|
|
94
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
95
95
|
}
|
|
96
|
-
if (data.hasOwnProperty('
|
|
97
|
-
obj['
|
|
96
|
+
if (data.hasOwnProperty('notefile_filter')) {
|
|
97
|
+
obj['notefile_filter'] = _ApiClient["default"].convertToType(data['notefile_filter'], ['String']);
|
|
98
98
|
}
|
|
99
|
-
if (data.hasOwnProperty('
|
|
100
|
-
obj['
|
|
99
|
+
if (data.hasOwnProperty('per_device')) {
|
|
100
|
+
obj['per_device'] = _ApiClient["default"].convertToType(data['per_device'], 'Boolean');
|
|
101
101
|
}
|
|
102
|
-
if (data.hasOwnProperty('
|
|
103
|
-
obj['
|
|
102
|
+
if (data.hasOwnProperty('routing_cooldown_period')) {
|
|
103
|
+
obj['routing_cooldown_period'] = _ApiClient["default"].convertToType(data['routing_cooldown_period'], 'String');
|
|
104
104
|
}
|
|
105
105
|
if (data.hasOwnProperty('silenced')) {
|
|
106
106
|
obj['silenced'] = _ApiClient["default"].convertToType(data['silenced'], 'Boolean');
|
|
107
107
|
}
|
|
108
|
-
if (data.hasOwnProperty('
|
|
109
|
-
obj['
|
|
108
|
+
if (data.hasOwnProperty('source_selector')) {
|
|
109
|
+
obj['source_selector'] = _ApiClient["default"].convertToType(data['source_selector'], 'String');
|
|
110
110
|
}
|
|
111
|
-
if (data.hasOwnProperty('
|
|
112
|
-
obj['
|
|
111
|
+
if (data.hasOwnProperty('source_type')) {
|
|
112
|
+
obj['source_type'] = _ApiClient["default"].convertToType(data['source_type'], 'String');
|
|
113
113
|
}
|
|
114
|
-
if (data.hasOwnProperty('
|
|
115
|
-
obj['
|
|
114
|
+
if (data.hasOwnProperty('threshold')) {
|
|
115
|
+
obj['threshold'] = _ApiClient["default"].convertToType(data['threshold'], 'Number');
|
|
116
116
|
}
|
|
117
|
-
if (data.hasOwnProperty('
|
|
118
|
-
obj['
|
|
117
|
+
if (data.hasOwnProperty('uid')) {
|
|
118
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
119
119
|
}
|
|
120
120
|
} else if (data === null) {
|
|
121
121
|
return null;
|
|
@@ -132,36 +132,12 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
132
132
|
key: "validateJSON",
|
|
133
133
|
value: function validateJSON(data) {
|
|
134
134
|
// ensure the json data is a string
|
|
135
|
-
if (data['
|
|
136
|
-
throw new Error("Expected the field `
|
|
137
|
-
}
|
|
138
|
-
// ensure the json data is a string
|
|
139
|
-
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
140
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
141
|
-
}
|
|
142
|
-
// ensure the json data is a string
|
|
143
|
-
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
144
|
-
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
145
|
-
}
|
|
146
|
-
// ensure the json data is a string
|
|
147
|
-
if (data['source_type'] && !(typeof data['source_type'] === 'string' || data['source_type'] instanceof String)) {
|
|
148
|
-
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data['source_type']);
|
|
149
|
-
}
|
|
150
|
-
// ensure the json data is an array
|
|
151
|
-
if (!Array.isArray(data['notefile_filter'])) {
|
|
152
|
-
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data['notefile_filter']);
|
|
153
|
-
}
|
|
154
|
-
// ensure the json data is an array
|
|
155
|
-
if (!Array.isArray(data['fleet_filter'])) {
|
|
156
|
-
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data['fleet_filter']);
|
|
157
|
-
}
|
|
158
|
-
// ensure the json data is a string
|
|
159
|
-
if (data['source_selector'] && !(typeof data['source_selector'] === 'string' || data['source_selector'] instanceof String)) {
|
|
160
|
-
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data['source_selector']);
|
|
135
|
+
if (data['aggregate_function'] && !(typeof data['aggregate_function'] === 'string' || data['aggregate_function'] instanceof String)) {
|
|
136
|
+
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data['aggregate_function']);
|
|
161
137
|
}
|
|
162
138
|
// ensure the json data is a string
|
|
163
|
-
if (data['
|
|
164
|
-
throw new Error("Expected the field `
|
|
139
|
+
if (data['aggregate_window'] && !(typeof data['aggregate_window'] === 'string' || data['aggregate_window'] instanceof String)) {
|
|
140
|
+
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data['aggregate_window']);
|
|
165
141
|
}
|
|
166
142
|
if (data['alert_routes']) {
|
|
167
143
|
// data not null
|
|
@@ -185,62 +161,88 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
185
161
|
;
|
|
186
162
|
}
|
|
187
163
|
// ensure the json data is a string
|
|
164
|
+
if (data['condition_type'] && !(typeof data['condition_type'] === 'string' || data['condition_type'] instanceof String)) {
|
|
165
|
+
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data['condition_type']);
|
|
166
|
+
}
|
|
167
|
+
// ensure the json data is a string
|
|
168
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
169
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
170
|
+
}
|
|
171
|
+
// ensure the json data is an array
|
|
172
|
+
if (!Array.isArray(data['fleet_filter'])) {
|
|
173
|
+
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data['fleet_filter']);
|
|
174
|
+
}
|
|
175
|
+
// ensure the json data is a string
|
|
188
176
|
if (data['last_routed_at'] && !(typeof data['last_routed_at'] === 'string' || data['last_routed_at'] instanceof String)) {
|
|
189
177
|
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data['last_routed_at']);
|
|
190
178
|
}
|
|
191
179
|
// ensure the json data is a string
|
|
180
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
181
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
182
|
+
}
|
|
183
|
+
// ensure the json data is an array
|
|
184
|
+
if (!Array.isArray(data['notefile_filter'])) {
|
|
185
|
+
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data['notefile_filter']);
|
|
186
|
+
}
|
|
187
|
+
// ensure the json data is a string
|
|
192
188
|
if (data['routing_cooldown_period'] && !(typeof data['routing_cooldown_period'] === 'string' || data['routing_cooldown_period'] instanceof String)) {
|
|
193
189
|
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data['routing_cooldown_period']);
|
|
194
190
|
}
|
|
195
191
|
// ensure the json data is a string
|
|
196
|
-
if (data['
|
|
197
|
-
throw new Error("Expected the field `
|
|
192
|
+
if (data['source_selector'] && !(typeof data['source_selector'] === 'string' || data['source_selector'] instanceof String)) {
|
|
193
|
+
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data['source_selector']);
|
|
198
194
|
}
|
|
199
195
|
// ensure the json data is a string
|
|
200
|
-
if (data['
|
|
201
|
-
throw new Error("Expected the field `
|
|
196
|
+
if (data['source_type'] && !(typeof data['source_type'] === 'string' || data['source_type'] instanceof String)) {
|
|
197
|
+
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data['source_type']);
|
|
198
|
+
}
|
|
199
|
+
// ensure the json data is a string
|
|
200
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
201
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
202
202
|
}
|
|
203
203
|
return true;
|
|
204
204
|
}
|
|
205
205
|
}]);
|
|
206
206
|
}();
|
|
207
207
|
/**
|
|
208
|
-
*
|
|
208
|
+
* Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
|
|
209
|
+
* @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
|
|
209
210
|
*/
|
|
210
|
-
Monitor.prototype['
|
|
211
|
+
Monitor.prototype['aggregate_function'] = undefined;
|
|
211
212
|
|
|
212
213
|
/**
|
|
213
|
-
*
|
|
214
|
+
* The time window to aggregate the selected values. It follows the format of a number followed by a time unit
|
|
215
|
+
* @member {String} aggregate_window
|
|
214
216
|
*/
|
|
215
|
-
Monitor.prototype['
|
|
217
|
+
Monitor.prototype['aggregate_window'] = undefined;
|
|
216
218
|
|
|
217
219
|
/**
|
|
218
|
-
*
|
|
220
|
+
* If true, the monitor is in alert state.
|
|
221
|
+
* @member {Boolean} alert
|
|
219
222
|
*/
|
|
220
|
-
Monitor.prototype['
|
|
223
|
+
Monitor.prototype['alert'] = undefined;
|
|
221
224
|
|
|
222
225
|
/**
|
|
223
|
-
*
|
|
224
|
-
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
226
|
+
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
225
227
|
*/
|
|
226
|
-
Monitor.prototype['
|
|
228
|
+
Monitor.prototype['alert_routes'] = undefined;
|
|
227
229
|
|
|
228
230
|
/**
|
|
229
|
-
*
|
|
230
|
-
* @member {
|
|
231
|
+
* A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]
|
|
232
|
+
* @member {module:model/Monitor.ConditionTypeEnum} condition_type
|
|
231
233
|
*/
|
|
232
|
-
Monitor.prototype['
|
|
234
|
+
Monitor.prototype['condition_type'] = undefined;
|
|
233
235
|
|
|
234
236
|
/**
|
|
235
|
-
*
|
|
236
|
-
* @member {Boolean} alert
|
|
237
|
+
* @member {String} description
|
|
237
238
|
*/
|
|
238
|
-
Monitor.prototype['
|
|
239
|
+
Monitor.prototype['description'] = undefined;
|
|
239
240
|
|
|
240
241
|
/**
|
|
241
|
-
*
|
|
242
|
+
* If true, the monitor will not be evaluated.
|
|
243
|
+
* @member {Boolean} disabled
|
|
242
244
|
*/
|
|
243
|
-
Monitor.prototype['
|
|
245
|
+
Monitor.prototype['disabled'] = undefined;
|
|
244
246
|
|
|
245
247
|
/**
|
|
246
248
|
* @member {Array.<String>} fleet_filter
|
|
@@ -248,33 +250,32 @@ Monitor.prototype['notefile_filter'] = undefined;
|
|
|
248
250
|
Monitor.prototype['fleet_filter'] = undefined;
|
|
249
251
|
|
|
250
252
|
/**
|
|
251
|
-
*
|
|
252
|
-
* @member {String}
|
|
253
|
+
* The last time the monitor was evaluated and routed.
|
|
254
|
+
* @member {String} last_routed_at
|
|
253
255
|
*/
|
|
254
|
-
Monitor.prototype['
|
|
256
|
+
Monitor.prototype['last_routed_at'] = undefined;
|
|
255
257
|
|
|
256
258
|
/**
|
|
257
|
-
*
|
|
258
|
-
* @member {module:model/Monitor.ConditionTypeEnum} condition_type
|
|
259
|
+
* @member {String} name
|
|
259
260
|
*/
|
|
260
|
-
Monitor.prototype['
|
|
261
|
+
Monitor.prototype['name'] = undefined;
|
|
261
262
|
|
|
262
263
|
/**
|
|
263
|
-
*
|
|
264
|
-
* @member {Number} threshold
|
|
264
|
+
* @member {Array.<String>} notefile_filter
|
|
265
265
|
*/
|
|
266
|
-
Monitor.prototype['
|
|
266
|
+
Monitor.prototype['notefile_filter'] = undefined;
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
|
-
*
|
|
269
|
+
* Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.
|
|
270
|
+
* @member {Boolean} per_device
|
|
270
271
|
*/
|
|
271
|
-
Monitor.prototype['
|
|
272
|
+
Monitor.prototype['per_device'] = undefined;
|
|
272
273
|
|
|
273
274
|
/**
|
|
274
|
-
* The
|
|
275
|
-
* @member {String}
|
|
275
|
+
* The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit.
|
|
276
|
+
* @member {String} routing_cooldown_period
|
|
276
277
|
*/
|
|
277
|
-
Monitor.prototype['
|
|
278
|
+
Monitor.prototype['routing_cooldown_period'] = undefined;
|
|
278
279
|
|
|
279
280
|
/**
|
|
280
281
|
* If true, alerts will be created, but no notifications will be sent.
|
|
@@ -283,40 +284,59 @@ Monitor.prototype['last_routed_at'] = undefined;
|
|
|
283
284
|
Monitor.prototype['silenced'] = undefined;
|
|
284
285
|
|
|
285
286
|
/**
|
|
286
|
-
*
|
|
287
|
-
* @member {String}
|
|
287
|
+
* A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
|
|
288
|
+
* @member {String} source_selector
|
|
288
289
|
*/
|
|
289
|
-
Monitor.prototype['
|
|
290
|
+
Monitor.prototype['source_selector'] = undefined;
|
|
290
291
|
|
|
291
292
|
/**
|
|
292
|
-
*
|
|
293
|
-
* @member {module:model/Monitor.
|
|
293
|
+
* The type of source to monitor. Currently only \"event\" is supported.
|
|
294
|
+
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
294
295
|
*/
|
|
295
|
-
Monitor.prototype['
|
|
296
|
+
Monitor.prototype['source_type'] = undefined;
|
|
296
297
|
|
|
297
298
|
/**
|
|
298
|
-
* The
|
|
299
|
-
* @member {
|
|
299
|
+
* The type of condition to apply to the value selected by the source_selector
|
|
300
|
+
* @member {Number} threshold
|
|
300
301
|
*/
|
|
301
|
-
Monitor.prototype['
|
|
302
|
+
Monitor.prototype['threshold'] = undefined;
|
|
302
303
|
|
|
303
304
|
/**
|
|
304
|
-
*
|
|
305
|
-
* @member {Boolean} per_device
|
|
305
|
+
* @member {String} uid
|
|
306
306
|
*/
|
|
307
|
-
Monitor.prototype['
|
|
307
|
+
Monitor.prototype['uid'] = undefined;
|
|
308
308
|
|
|
309
309
|
/**
|
|
310
|
-
* Allowed values for the <code>
|
|
310
|
+
* Allowed values for the <code>aggregate_function</code> property.
|
|
311
311
|
* @enum {String}
|
|
312
312
|
* @readonly
|
|
313
313
|
*/
|
|
314
|
-
Monitor['
|
|
314
|
+
Monitor['AggregateFunctionEnum'] = {
|
|
315
315
|
/**
|
|
316
|
-
* value: "
|
|
316
|
+
* value: "none"
|
|
317
317
|
* @const
|
|
318
318
|
*/
|
|
319
|
-
"
|
|
319
|
+
"none": "none",
|
|
320
|
+
/**
|
|
321
|
+
* value: "sum"
|
|
322
|
+
* @const
|
|
323
|
+
*/
|
|
324
|
+
"sum": "sum",
|
|
325
|
+
/**
|
|
326
|
+
* value: "average"
|
|
327
|
+
* @const
|
|
328
|
+
*/
|
|
329
|
+
"average": "average",
|
|
330
|
+
/**
|
|
331
|
+
* value: "max"
|
|
332
|
+
* @const
|
|
333
|
+
*/
|
|
334
|
+
"max": "max",
|
|
335
|
+
/**
|
|
336
|
+
* value: "min"
|
|
337
|
+
* @const
|
|
338
|
+
*/
|
|
339
|
+
"min": "min"
|
|
320
340
|
};
|
|
321
341
|
|
|
322
342
|
/**
|
|
@@ -358,35 +378,15 @@ Monitor['ConditionTypeEnum'] = {
|
|
|
358
378
|
};
|
|
359
379
|
|
|
360
380
|
/**
|
|
361
|
-
* Allowed values for the <code>
|
|
381
|
+
* Allowed values for the <code>source_type</code> property.
|
|
362
382
|
* @enum {String}
|
|
363
383
|
* @readonly
|
|
364
384
|
*/
|
|
365
|
-
Monitor['
|
|
366
|
-
/**
|
|
367
|
-
* value: "none"
|
|
368
|
-
* @const
|
|
369
|
-
*/
|
|
370
|
-
"none": "none",
|
|
371
|
-
/**
|
|
372
|
-
* value: "sum"
|
|
373
|
-
* @const
|
|
374
|
-
*/
|
|
375
|
-
"sum": "sum",
|
|
376
|
-
/**
|
|
377
|
-
* value: "average"
|
|
378
|
-
* @const
|
|
379
|
-
*/
|
|
380
|
-
"average": "average",
|
|
381
|
-
/**
|
|
382
|
-
* value: "max"
|
|
383
|
-
* @const
|
|
384
|
-
*/
|
|
385
|
-
"max": "max",
|
|
385
|
+
Monitor['SourceTypeEnum'] = {
|
|
386
386
|
/**
|
|
387
|
-
* value: "
|
|
387
|
+
* value: "event"
|
|
388
388
|
* @const
|
|
389
389
|
*/
|
|
390
|
-
"
|
|
390
|
+
"event": "event"
|
|
391
391
|
};
|
|
392
392
|
var _default = exports["default"] = Monitor;
|