@blues-inc/notehub-js 1.0.37 → 1.0.38-beta.1
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 +245 -234
- package/dist/ApiClient.js +154 -156
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +79 -16
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +369 -369
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +61 -61
- package/dist/api/ProjectApi.js +383 -383
- package/dist/api/RouteApi.js +77 -77
- package/dist/api/UsageApi.js +285 -0
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +106 -99
- package/dist/model/Alert.js +114 -112
- package/dist/model/AlertDataInner.js +39 -39
- package/dist/model/AlertNotificationsInner.js +22 -22
- package/dist/model/Aws.js +95 -95
- package/dist/model/{HttpFilter.js → AwsFilter.js} +40 -40
- package/dist/model/{HttpTransform.js → AwsTransform.js} +37 -37
- package/dist/model/Azure.js +61 -61
- package/dist/model/BillingAccount.js +28 -28
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/Body.js +5 -5
- package/dist/model/CloneProjectRequest.js +31 -31
- package/dist/model/Contact.js +26 -26
- package/dist/model/CreateFleetRequest.js +12 -12
- package/dist/model/CreateMonitor.js +216 -215
- package/dist/model/CreateProductRequest.js +36 -36
- package/dist/model/CreateProjectRequest.js +23 -23
- package/dist/model/CreateUpdateRepository.js +22 -22
- package/dist/model/CurrentFirmware.js +16 -16
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +97 -97
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSetField.js +24 -24
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +153 -152
- package/dist/model/DeviceDfuHistory.js +26 -25
- package/dist/model/{DeviceDfuStatusCurrent.js → DeviceDfuHistoryCurrent.js} +58 -58
- package/dist/model/DeviceDfuHistoryPage.js +13 -12
- package/dist/model/DeviceDfuStateMachine.js +30 -29
- package/dist/model/DeviceDfuStateMachineNode.js +30 -30
- package/dist/model/DeviceDfuStatus.js +27 -27
- package/dist/model/DeviceDfuStatusPage.js +13 -12
- package/dist/model/DeviceSession.js +300 -300
- package/dist/model/DeviceTowerInfo.js +18 -18
- package/dist/model/DeviceUsage.js +44 -44
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvTreeJsonNode.js +100 -98
- package/dist/model/EnvVar.js +20 -20
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +45 -45
- package/dist/model/Event.js +365 -365
- package/dist/model/Firmware.js +59 -59
- package/dist/model/FirmwareInfo.js +83 -83
- package/dist/model/Fleet.js +47 -47
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/{GetDeviceEnvironmentVariables200Response.js → GetDeviceEnvironmentVariablesByPin200Response.js} +38 -38
- package/dist/model/{GetProjectFleets200Response.js → GetDeviceFleets200Response.js} +30 -29
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +26 -26
- package/dist/model/GetDeviceLatest200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +22 -22
- package/dist/model/GetDeviceSessions200Response.js +23 -22
- package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +14 -14
- package/dist/model/GetProjectDevices200Response.js +17 -16
- package/dist/model/GetProjectEvents200Response.js +21 -20
- package/dist/model/GetProjectEventsByCursor200Response.js +31 -30
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjectProducts200Response.js +10 -9
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/Google.js +50 -50
- package/dist/model/HandleNoteChanges200Response.js +16 -16
- package/dist/model/HandleNoteGet200Response.js +13 -13
- package/dist/model/HandleNoteSignal200Response.js +5 -5
- package/dist/model/HandleNotefileChanges200Response.js +16 -16
- package/dist/model/HandleNotefileChangesPending200Response.js +20 -20
- package/dist/model/HandleNotefileDeleteRequest.js +7 -7
- package/dist/model/Http.js +54 -54
- package/dist/model/Location.js +50 -50
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +14 -14
- package/dist/model/Monitor.js +159 -158
- package/dist/model/MonitorAlertRoutesInner.js +18 -19
- package/dist/model/Mqtt.js +98 -98
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotehubRoute.js +49 -49
- package/dist/model/NotehubRouteSchema.js +100 -101
- package/dist/model/{QuestionDataResponseMap.js → OAuth2Error.js} +66 -43
- package/dist/model/OAuth2TokenResponse.js +154 -0
- package/dist/model/PersonalAccessToken.js +49 -49
- package/dist/model/PersonalAccessTokenCreatedBy.js +20 -20
- package/dist/model/PersonalAccessTokenInfo.js +22 -22
- package/dist/model/PersonalAccessTokenSecret.js +16 -16
- package/dist/model/PostProvisionProjectDeviceRequest.js +25 -25
- package/dist/model/Product.js +36 -36
- package/dist/model/Project.js +47 -47
- package/dist/model/ProjectMember.js +28 -28
- package/dist/model/Proxy.js +34 -34
- package/dist/model/PutDeviceFleetsRequest.js +8 -8
- package/dist/model/Radresponder.js +34 -34
- package/dist/model/Repository.js +28 -28
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +48 -48
- package/dist/model/SchemaProperty.js +54 -54
- package/dist/model/SimUsage.js +27 -27
- package/dist/model/Slack.js +82 -82
- package/dist/model/SlackBearerNotification.js +30 -30
- package/dist/model/{SnowflakeTransform.js → SlackTransform.js} +28 -28
- package/dist/model/SlackWebHookNotification.js +25 -25
- package/dist/model/Snowflake.js +66 -66
- package/dist/model/Thingworx.js +48 -48
- package/dist/model/TowerLocation.js +75 -75
- package/dist/model/Twilio.js +65 -65
- package/dist/model/UpdateFleetRequest.js +31 -31
- package/dist/model/UploadMetadata.js +75 -75
- package/dist/model/{AnalyticsEventsData.js → UsageData.js} +45 -39
- package/dist/model/{AnalyticsRouteLogsData.js → UsageEventsData.js} +49 -45
- package/dist/model/{AnalyticsEventsResponse.js → UsageEventsResponse.js} +33 -32
- package/dist/model/UsageRouteLogsData.js +154 -0
- package/dist/model/{AnalyticsSessionsResponse.js → UsageRouteLogsResponse.js} +33 -32
- package/dist/model/{AnalyticsSessionsData.js → UsageSessionsData.js} +48 -44
- package/dist/model/{AnalyticsRouteLogsResponse.js → UsageSessionsResponse.js} +33 -32
- package/dist/model/UserDbRoute.js +33 -33
- package/dist/model/UserDfuStateMachine.js +27 -27
- package/dist/model/UserDfuStateMachineStatus.js +23 -23
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +28 -28
- package/dist/model/DataSet.js +0 -163
- package/dist/model/QuestionDataResponseLineChart.js +0 -204
package/dist/model/Monitor.js
CHANGED
|
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
19
|
* Notehub API
|
|
20
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
21
|
*
|
|
22
22
|
* The version of the OpenAPI document: 1.2.0
|
|
23
23
|
* Contact: engineering@blues.io
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
/**
|
|
31
31
|
* The Monitor model module.
|
|
32
32
|
* @module model/Monitor
|
|
33
|
-
* @version 1.0.
|
|
33
|
+
* @version 1.0.38-beta.1
|
|
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
71
|
}
|
|
72
|
-
if (data.hasOwnProperty(
|
|
73
|
-
obj[
|
|
72
|
+
if (data.hasOwnProperty('alert')) {
|
|
73
|
+
obj['alert'] = _ApiClient["default"].convertToType(data['alert'], 'Boolean');
|
|
74
74
|
}
|
|
75
|
-
if (data.hasOwnProperty(
|
|
76
|
-
obj[
|
|
75
|
+
if (data.hasOwnProperty('alert_routes')) {
|
|
76
|
+
obj['alert_routes'] = _ApiClient["default"].convertToType(data['alert_routes'], [_MonitorAlertRoutesInner["default"]]);
|
|
77
77
|
}
|
|
78
|
-
if (data.hasOwnProperty(
|
|
79
|
-
obj[
|
|
78
|
+
if (data.hasOwnProperty('condition_type')) {
|
|
79
|
+
obj['condition_type'] = _ApiClient["default"].convertToType(data['condition_type'], 'String');
|
|
80
80
|
}
|
|
81
|
-
if (data.hasOwnProperty(
|
|
82
|
-
obj[
|
|
81
|
+
if (data.hasOwnProperty('description')) {
|
|
82
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
83
83
|
}
|
|
84
|
-
if (data.hasOwnProperty(
|
|
85
|
-
obj[
|
|
84
|
+
if (data.hasOwnProperty('disabled')) {
|
|
85
|
+
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
86
86
|
}
|
|
87
|
-
if (data.hasOwnProperty(
|
|
88
|
-
obj[
|
|
87
|
+
if (data.hasOwnProperty('fleet_filter')) {
|
|
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
|
-
if (data.hasOwnProperty(
|
|
106
|
-
obj[
|
|
105
|
+
if (data.hasOwnProperty('silenced')) {
|
|
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,45 +132,21 @@ 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 `
|
|
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']);
|
|
137
137
|
}
|
|
138
138
|
// ensure the json data is a string
|
|
139
|
-
if (data[
|
|
140
|
-
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']);
|
|
141
141
|
}
|
|
142
|
-
|
|
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"]);
|
|
161
|
-
}
|
|
162
|
-
// ensure the json data is a string
|
|
163
|
-
if (data["condition_type"] && !(typeof data["condition_type"] === "string" || data["condition_type"] instanceof String)) {
|
|
164
|
-
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data["condition_type"]);
|
|
165
|
-
}
|
|
166
|
-
if (data["alert_routes"]) {
|
|
142
|
+
if (data['alert_routes']) {
|
|
167
143
|
// data not null
|
|
168
144
|
// ensure the json data is an array
|
|
169
|
-
if (!Array.isArray(data[
|
|
170
|
-
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data[
|
|
145
|
+
if (!Array.isArray(data['alert_routes'])) {
|
|
146
|
+
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data['alert_routes']);
|
|
171
147
|
}
|
|
172
148
|
// validate the optional field `alert_routes` (array)
|
|
173
|
-
var _iterator = _createForOfIteratorHelper(data[
|
|
149
|
+
var _iterator = _createForOfIteratorHelper(data['alert_routes']),
|
|
174
150
|
_step;
|
|
175
151
|
try {
|
|
176
152
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -182,140 +158,185 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
182
158
|
} finally {
|
|
183
159
|
_iterator.f();
|
|
184
160
|
}
|
|
161
|
+
;
|
|
162
|
+
}
|
|
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
|
|
176
|
+
if (data['last_routed_at'] && !(typeof data['last_routed_at'] === 'string' || data['last_routed_at'] instanceof String)) {
|
|
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']);
|
|
185
178
|
}
|
|
186
179
|
// ensure the json data is a string
|
|
187
|
-
if (data[
|
|
188
|
-
throw new Error("Expected the field `
|
|
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']);
|
|
189
186
|
}
|
|
190
187
|
// ensure the json data is a string
|
|
191
|
-
if (data[
|
|
192
|
-
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data[
|
|
188
|
+
if (data['routing_cooldown_period'] && !(typeof data['routing_cooldown_period'] === 'string' || data['routing_cooldown_period'] instanceof String)) {
|
|
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']);
|
|
193
190
|
}
|
|
194
191
|
// ensure the json data is a string
|
|
195
|
-
if (data[
|
|
196
|
-
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']);
|
|
197
194
|
}
|
|
198
195
|
// ensure the json data is a string
|
|
199
|
-
if (data[
|
|
200
|
-
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']);
|
|
201
202
|
}
|
|
202
203
|
return true;
|
|
203
204
|
}
|
|
204
205
|
}]);
|
|
205
206
|
}();
|
|
206
207
|
/**
|
|
207
|
-
*
|
|
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
|
|
208
210
|
*/
|
|
209
|
-
Monitor.prototype[
|
|
211
|
+
Monitor.prototype['aggregate_function'] = undefined;
|
|
210
212
|
|
|
211
213
|
/**
|
|
212
|
-
*
|
|
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
|
|
213
216
|
*/
|
|
214
|
-
Monitor.prototype[
|
|
217
|
+
Monitor.prototype['aggregate_window'] = undefined;
|
|
215
218
|
|
|
216
219
|
/**
|
|
217
|
-
*
|
|
220
|
+
* If true, the monitor is in alert state.
|
|
221
|
+
* @member {Boolean} alert
|
|
218
222
|
*/
|
|
219
|
-
Monitor.prototype[
|
|
223
|
+
Monitor.prototype['alert'] = undefined;
|
|
220
224
|
|
|
221
225
|
/**
|
|
222
|
-
*
|
|
223
|
-
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
226
|
+
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
224
227
|
*/
|
|
225
|
-
Monitor.prototype[
|
|
228
|
+
Monitor.prototype['alert_routes'] = undefined;
|
|
226
229
|
|
|
227
230
|
/**
|
|
228
|
-
*
|
|
229
|
-
* @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
|
|
230
233
|
*/
|
|
231
|
-
Monitor.prototype[
|
|
234
|
+
Monitor.prototype['condition_type'] = undefined;
|
|
232
235
|
|
|
233
236
|
/**
|
|
234
|
-
*
|
|
235
|
-
* @member {Boolean} alert
|
|
237
|
+
* @member {String} description
|
|
236
238
|
*/
|
|
237
|
-
Monitor.prototype[
|
|
239
|
+
Monitor.prototype['description'] = undefined;
|
|
238
240
|
|
|
239
241
|
/**
|
|
240
|
-
*
|
|
242
|
+
* If true, the monitor will not be evaluated.
|
|
243
|
+
* @member {Boolean} disabled
|
|
241
244
|
*/
|
|
242
|
-
Monitor.prototype[
|
|
245
|
+
Monitor.prototype['disabled'] = undefined;
|
|
243
246
|
|
|
244
247
|
/**
|
|
245
248
|
* @member {Array.<String>} fleet_filter
|
|
246
249
|
*/
|
|
247
|
-
Monitor.prototype[
|
|
250
|
+
Monitor.prototype['fleet_filter'] = undefined;
|
|
248
251
|
|
|
249
252
|
/**
|
|
250
|
-
*
|
|
251
|
-
* @member {String}
|
|
253
|
+
* The last time the monitor was evaluated and routed.
|
|
254
|
+
* @member {String} last_routed_at
|
|
252
255
|
*/
|
|
253
|
-
Monitor.prototype[
|
|
256
|
+
Monitor.prototype['last_routed_at'] = undefined;
|
|
254
257
|
|
|
255
258
|
/**
|
|
256
|
-
*
|
|
257
|
-
* @member {module:model/Monitor.ConditionTypeEnum} condition_type
|
|
259
|
+
* @member {String} name
|
|
258
260
|
*/
|
|
259
|
-
Monitor.prototype[
|
|
261
|
+
Monitor.prototype['name'] = undefined;
|
|
260
262
|
|
|
261
263
|
/**
|
|
262
|
-
*
|
|
263
|
-
* @member {Number} threshold
|
|
264
|
+
* @member {Array.<String>} notefile_filter
|
|
264
265
|
*/
|
|
265
|
-
Monitor.prototype[
|
|
266
|
+
Monitor.prototype['notefile_filter'] = undefined;
|
|
266
267
|
|
|
267
268
|
/**
|
|
268
|
-
*
|
|
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
|
|
269
271
|
*/
|
|
270
|
-
Monitor.prototype[
|
|
272
|
+
Monitor.prototype['per_device'] = undefined;
|
|
271
273
|
|
|
272
274
|
/**
|
|
273
|
-
* The
|
|
274
|
-
* @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
|
|
275
277
|
*/
|
|
276
|
-
Monitor.prototype[
|
|
278
|
+
Monitor.prototype['routing_cooldown_period'] = undefined;
|
|
277
279
|
|
|
278
280
|
/**
|
|
279
281
|
* If true, alerts will be created, but no notifications will be sent.
|
|
280
282
|
* @member {Boolean} silenced
|
|
281
283
|
*/
|
|
282
|
-
Monitor.prototype[
|
|
284
|
+
Monitor.prototype['silenced'] = undefined;
|
|
283
285
|
|
|
284
286
|
/**
|
|
285
|
-
*
|
|
286
|
-
* @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
|
|
287
289
|
*/
|
|
288
|
-
Monitor.prototype[
|
|
290
|
+
Monitor.prototype['source_selector'] = undefined;
|
|
289
291
|
|
|
290
292
|
/**
|
|
291
|
-
*
|
|
292
|
-
* @member {module:model/Monitor.
|
|
293
|
+
* The type of source to monitor. Currently only \"event\" is supported.
|
|
294
|
+
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
293
295
|
*/
|
|
294
|
-
Monitor.prototype[
|
|
296
|
+
Monitor.prototype['source_type'] = undefined;
|
|
295
297
|
|
|
296
298
|
/**
|
|
297
|
-
* The
|
|
298
|
-
* @member {
|
|
299
|
+
* The type of condition to apply to the value selected by the source_selector
|
|
300
|
+
* @member {Number} threshold
|
|
299
301
|
*/
|
|
300
|
-
Monitor.prototype[
|
|
302
|
+
Monitor.prototype['threshold'] = undefined;
|
|
301
303
|
|
|
302
304
|
/**
|
|
303
|
-
*
|
|
304
|
-
* @member {Boolean} per_device
|
|
305
|
+
* @member {String} uid
|
|
305
306
|
*/
|
|
306
|
-
Monitor.prototype[
|
|
307
|
+
Monitor.prototype['uid'] = undefined;
|
|
307
308
|
|
|
308
309
|
/**
|
|
309
|
-
* Allowed values for the <code>
|
|
310
|
+
* Allowed values for the <code>aggregate_function</code> property.
|
|
310
311
|
* @enum {String}
|
|
311
312
|
* @readonly
|
|
312
313
|
*/
|
|
313
|
-
Monitor[
|
|
314
|
+
Monitor['AggregateFunctionEnum'] = {
|
|
314
315
|
/**
|
|
315
|
-
* value: "
|
|
316
|
+
* value: "none"
|
|
316
317
|
* @const
|
|
317
318
|
*/
|
|
318
|
-
|
|
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"
|
|
319
340
|
};
|
|
320
341
|
|
|
321
342
|
/**
|
|
@@ -323,69 +344,49 @@ Monitor["SourceTypeEnum"] = {
|
|
|
323
344
|
* @enum {String}
|
|
324
345
|
* @readonly
|
|
325
346
|
*/
|
|
326
|
-
Monitor[
|
|
347
|
+
Monitor['ConditionTypeEnum'] = {
|
|
327
348
|
/**
|
|
328
349
|
* value: "greater_than"
|
|
329
350
|
* @const
|
|
330
351
|
*/
|
|
331
|
-
greater_than: "greater_than",
|
|
352
|
+
"greater_than": "greater_than",
|
|
332
353
|
/**
|
|
333
354
|
* value: "greater_than_or_equal_to"
|
|
334
355
|
* @const
|
|
335
356
|
*/
|
|
336
|
-
greater_than_or_equal_to: "greater_than_or_equal_to",
|
|
357
|
+
"greater_than_or_equal_to": "greater_than_or_equal_to",
|
|
337
358
|
/**
|
|
338
359
|
* value: "less_than"
|
|
339
360
|
* @const
|
|
340
361
|
*/
|
|
341
|
-
less_than: "less_than",
|
|
362
|
+
"less_than": "less_than",
|
|
342
363
|
/**
|
|
343
364
|
* value: "less_than_or_equal_to"
|
|
344
365
|
* @const
|
|
345
366
|
*/
|
|
346
|
-
less_than_or_equal_to: "less_than_or_equal_to",
|
|
367
|
+
"less_than_or_equal_to": "less_than_or_equal_to",
|
|
347
368
|
/**
|
|
348
369
|
* value: "equal_to"
|
|
349
370
|
* @const
|
|
350
371
|
*/
|
|
351
|
-
equal_to: "equal_to",
|
|
372
|
+
"equal_to": "equal_to",
|
|
352
373
|
/**
|
|
353
374
|
* value: "not_equal_to"
|
|
354
375
|
* @const
|
|
355
376
|
*/
|
|
356
|
-
not_equal_to: "not_equal_to"
|
|
377
|
+
"not_equal_to": "not_equal_to"
|
|
357
378
|
};
|
|
358
379
|
|
|
359
380
|
/**
|
|
360
|
-
* Allowed values for the <code>
|
|
381
|
+
* Allowed values for the <code>source_type</code> property.
|
|
361
382
|
* @enum {String}
|
|
362
383
|
* @readonly
|
|
363
384
|
*/
|
|
364
|
-
Monitor[
|
|
365
|
-
/**
|
|
366
|
-
* value: "none"
|
|
367
|
-
* @const
|
|
368
|
-
*/
|
|
369
|
-
none: "none",
|
|
385
|
+
Monitor['SourceTypeEnum'] = {
|
|
370
386
|
/**
|
|
371
|
-
* value: "
|
|
372
|
-
* @const
|
|
373
|
-
*/
|
|
374
|
-
sum: "sum",
|
|
375
|
-
/**
|
|
376
|
-
* value: "average"
|
|
377
|
-
* @const
|
|
378
|
-
*/
|
|
379
|
-
average: "average",
|
|
380
|
-
/**
|
|
381
|
-
* value: "max"
|
|
382
|
-
* @const
|
|
383
|
-
*/
|
|
384
|
-
max: "max",
|
|
385
|
-
/**
|
|
386
|
-
* value: "min"
|
|
387
|
+
* value: "event"
|
|
387
388
|
* @const
|
|
388
389
|
*/
|
|
389
|
-
|
|
390
|
+
"event": "event"
|
|
390
391
|
};
|
|
391
392
|
var _default = exports["default"] = Monitor;
|
|
@@ -18,7 +18,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
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 MonitorAlertRoutesInner model module.
|
|
33
33
|
* @module model/MonitorAlertRoutesInner
|
|
34
|
-
* @version 1.0.
|
|
34
|
+
* @version 1.0.38-beta.1
|
|
35
35
|
*/
|
|
36
36
|
var MonitorAlertRoutesInner = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -105,8 +105,7 @@ var MonitorAlertRoutesInner = /*#__PURE__*/function () {
|
|
|
105
105
|
} else if (match === 0) {
|
|
106
106
|
this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
107
107
|
throw new Error("No match found constructing `MonitorAlertRoutesInner` with oneOf schemas EmailNotification, SlackBearerNotification, SlackWebHookNotification. Details: " + errorMessages.join(", "));
|
|
108
|
-
} else {
|
|
109
|
-
// only 1 match
|
|
108
|
+
} else {// only 1 match
|
|
110
109
|
// the input is valid
|
|
111
110
|
}
|
|
112
111
|
}
|
|
@@ -146,8 +145,8 @@ var MonitorAlertRoutesInner = /*#__PURE__*/function () {
|
|
|
146
145
|
}]);
|
|
147
146
|
}();
|
|
148
147
|
/**
|
|
149
|
-
*
|
|
150
|
-
* @member {
|
|
148
|
+
* text or blocks
|
|
149
|
+
* @member {module:model/MonitorAlertRoutesInner.MessageTypeEnum} message_type
|
|
151
150
|
*/
|
|
152
151
|
_MonitorAlertRoutesInner = MonitorAlertRoutesInner;
|
|
153
152
|
/**
|
|
@@ -158,36 +157,36 @@ _MonitorAlertRoutesInner = MonitorAlertRoutesInner;
|
|
|
158
157
|
_defineProperty(MonitorAlertRoutesInner, "fromJSON", function (json_string) {
|
|
159
158
|
return _MonitorAlertRoutesInner.constructFromObject(JSON.parse(json_string));
|
|
160
159
|
});
|
|
161
|
-
MonitorAlertRoutesInner.prototype[
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* text or blocks
|
|
165
|
-
* @member {module:model/MonitorAlertRoutesInner.MessageTypeEnum} message_type
|
|
166
|
-
*/
|
|
167
|
-
MonitorAlertRoutesInner.prototype["message_type"] = undefined;
|
|
160
|
+
MonitorAlertRoutesInner.prototype['message_type'] = undefined;
|
|
168
161
|
|
|
169
162
|
/**
|
|
170
163
|
* The text of the message, or the blocks definition
|
|
171
164
|
* @member {String} text
|
|
172
165
|
*/
|
|
173
|
-
MonitorAlertRoutesInner.prototype[
|
|
166
|
+
MonitorAlertRoutesInner.prototype['text'] = undefined;
|
|
174
167
|
|
|
175
168
|
/**
|
|
176
|
-
* The
|
|
177
|
-
* @member {String}
|
|
169
|
+
* The URL of the Slack webhook.
|
|
170
|
+
* @member {String} url
|
|
178
171
|
*/
|
|
179
|
-
MonitorAlertRoutesInner.prototype[
|
|
172
|
+
MonitorAlertRoutesInner.prototype['url'] = undefined;
|
|
180
173
|
|
|
181
174
|
/**
|
|
182
175
|
* The channel to send the message to.
|
|
183
176
|
* @member {String} channel
|
|
184
177
|
*/
|
|
185
|
-
MonitorAlertRoutesInner.prototype[
|
|
178
|
+
MonitorAlertRoutesInner.prototype['channel'] = undefined;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The bearer token for the Slack app.
|
|
182
|
+
* @member {String} token
|
|
183
|
+
*/
|
|
184
|
+
MonitorAlertRoutesInner.prototype['token'] = undefined;
|
|
186
185
|
|
|
187
186
|
/**
|
|
188
187
|
* Email Address
|
|
189
188
|
* @member {String} email
|
|
190
189
|
*/
|
|
191
|
-
MonitorAlertRoutesInner.prototype[
|
|
190
|
+
MonitorAlertRoutesInner.prototype['email'] = undefined;
|
|
192
191
|
MonitorAlertRoutesInner.OneOf = ["EmailNotification", "SlackBearerNotification", "SlackWebHookNotification"];
|
|
193
192
|
var _default = exports["default"] = MonitorAlertRoutesInner;
|