@blues-inc/notehub-js 6.2.0-beta.55 → 6.2.0-beta.56
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 +318 -308
- package/dist/ApiClient.js +150 -150
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +31 -31
- package/dist/api/BillingAccountApi.js +28 -28
- package/dist/api/DeviceApi.js +385 -385
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/JobsApi.js +78 -78
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +619 -433
- package/dist/api/RouteApi.js +83 -83
- package/dist/api/UsageApi.js +67 -67
- package/dist/api/WebhookApi.js +108 -108
- package/dist/index.js +28 -0
- package/dist/model/AWSRoleConfig.js +14 -14
- package/dist/model/AddDeviceToFleetsRequest.js +8 -8
- package/dist/model/Alert.js +76 -74
- package/dist/model/AlertDataInner.js +36 -36
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/AwsRoute.js +70 -70
- package/dist/model/AzureRoute.js +43 -43
- package/dist/model/BatchJobRequests.js +57 -57
- 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/CancelJobRun200Response.js +6 -6
- 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 +20 -20
- package/dist/model/CreateJob201Response.js +8 -8
- package/dist/model/CreateLegacyWebhookEventRequest.js +17 -17
- package/dist/model/CreateMonitor.js +144 -143
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateProjectSecretRequest.js +130 -0
- package/dist/model/CreateUpdateRepository.js +17 -17
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +65 -65
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DataUsage.js +14 -14
- package/dist/model/DatacakeRoute.js +35 -35
- package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
- package/dist/model/DeleteJob200Response.js +6 -6
- package/dist/model/DeleteNotefilesRequest.js +7 -7
- package/dist/model/Device.js +107 -106
- 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 +68 -68
- package/dist/model/Fleet.js +38 -38
- package/dist/model/FleetConnectivityAssurance.js +5 -5
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccount200Response.js +25 -25
- package/dist/model/GetBillingAccount200ResponsePlan.js +22 -22
- package/dist/model/GetBillingAccountBalanceHistory200Response.js +10 -9
- package/dist/model/GetBillingAccountBalanceHistory200ResponseDataInner.js +17 -17
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/GetDataUsage200Response.js +13 -12
- package/dist/model/GetDataUsage200ResponseDataInner.js +44 -43
- package/dist/model/GetDbNote200Response.js +13 -13
- 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/GetDeviceJourney200Response.js +21 -21
- package/dist/model/GetDeviceJourney200ResponseJourney.js +17 -16
- package/dist/model/GetDeviceJourneys200Response.js +17 -16
- package/dist/model/GetDeviceJourneys200ResponseJourneysInner.js +20 -20
- package/dist/model/GetDeviceLatestEvents200Response.js +10 -9
- package/dist/model/GetDevicePlans200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/GetDevices200Response.js +17 -16
- package/dist/model/GetEvents200Response.js +21 -20
- package/dist/model/GetEventsByCursor200Response.js +24 -23
- package/dist/model/GetJobRuns200Response.js +12 -11
- package/dist/model/GetJobs200Response.js +12 -11
- package/dist/model/GetNotefile200Response.js +11 -11
- package/dist/model/GetProducts200Response.js +10 -9
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjectSecretsResponse.js +132 -0
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetRouteLogsUsage200Response.js +15 -14
- package/dist/model/GetSessionsUsage200Response.js +16 -15
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.js +35 -35
- package/dist/model/Job.js +35 -35
- package/dist/model/JobDefinition.js +26 -26
- package/dist/model/JobDefinitionReportOptions.js +28 -28
- package/dist/model/JobDefinitionSelect.js +25 -25
- package/dist/model/JobDetail.js +48 -48
- package/dist/model/JobDetailAllOf.js +7 -7
- package/dist/model/JobRun.js +57 -57
- 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 +115 -114
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +31 -31
- package/dist/model/NoteInput.js +9 -9
- package/dist/model/Notefile.js +23 -22
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotehubRoute.js +103 -103
- 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/ProjectSecret.js +164 -0
- package/dist/model/ProvisionDeviceRequest.js +18 -18
- package/dist/model/ProxyRoute.js +29 -29
- package/dist/model/QubitroRoute.js +33 -33
- package/dist/model/RadRoute.js +31 -31
- package/dist/model/Repository.js +22 -22
- package/dist/model/RepositoryListResponse.js +12 -11
- package/dist/model/RepositoryTokenRequest.js +14 -14
- package/dist/model/RepositoryTokenResponse.js +38 -38
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/RouteTransformSettings.js +18 -18
- package/dist/model/RunJob200Response.js +8 -8
- package/dist/model/S3ArchiveRoute.js +79 -79
- package/dist/model/SatelliteDataUsage.js +18 -18
- package/dist/model/SatellitePlan.js +29 -29
- package/dist/model/SchemaProperty.js +38 -36
- package/dist/model/SignalDevice200Response.js +5 -5
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackRoute.js +48 -48
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/SnowflakeRoute.js +45 -45
- package/dist/model/SnowpipeStreamingRoute.js +60 -60
- 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 +33 -33
- package/dist/model/UpdateHostFirmwareRequest.js +17 -17
- package/dist/model/UpdateProjectSecretRequest.js +115 -0
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +33 -33
- package/dist/model/UsageEventsData.js +49 -49
- package/dist/model/UsageEventsResponse.js +15 -14
- package/dist/model/UsageRouteLogsData.js +30 -30
- package/dist/model/UsageSessionsData.js +43 -43
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +3 -3
package/dist/model/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 6.2.0-beta.
|
|
33
|
+
* @version 6.2.0-beta.56
|
|
34
34
|
*/
|
|
35
35
|
var Monitor = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
@@ -63,68 +63,68 @@ 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
|
-
if (data.hasOwnProperty(
|
|
121
|
-
obj[
|
|
120
|
+
if (data.hasOwnProperty('usage_scope')) {
|
|
121
|
+
obj['usage_scope'] = _ApiClient["default"].convertToType(data['usage_scope'], 'String');
|
|
122
122
|
}
|
|
123
|
-
if (data.hasOwnProperty(
|
|
124
|
-
obj[
|
|
123
|
+
if (data.hasOwnProperty('usage_type')) {
|
|
124
|
+
obj['usage_type'] = _ApiClient["default"].convertToType(data['usage_type'], 'String');
|
|
125
125
|
}
|
|
126
|
-
if (data.hasOwnProperty(
|
|
127
|
-
obj[
|
|
126
|
+
if (data.hasOwnProperty('usage_window')) {
|
|
127
|
+
obj['usage_window'] = _ApiClient["default"].convertToType(data['usage_window'], 'Number');
|
|
128
128
|
}
|
|
129
129
|
} else if (data === null) {
|
|
130
130
|
return null;
|
|
@@ -141,21 +141,21 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
141
141
|
key: "validateJSON",
|
|
142
142
|
value: function validateJSON(data) {
|
|
143
143
|
// ensure the json data is a string
|
|
144
|
-
if (data[
|
|
145
|
-
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data[
|
|
144
|
+
if (data['aggregate_function'] && !(typeof data['aggregate_function'] === 'string' || data['aggregate_function'] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data['aggregate_function']);
|
|
146
146
|
}
|
|
147
147
|
// ensure the json data is a string
|
|
148
|
-
if (data[
|
|
149
|
-
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data[
|
|
148
|
+
if (data['aggregate_window'] && !(typeof data['aggregate_window'] === 'string' || data['aggregate_window'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data['aggregate_window']);
|
|
150
150
|
}
|
|
151
|
-
if (data[
|
|
151
|
+
if (data['alert_routes']) {
|
|
152
152
|
// data not null
|
|
153
153
|
// ensure the json data is an array
|
|
154
|
-
if (!Array.isArray(data[
|
|
155
|
-
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data[
|
|
154
|
+
if (!Array.isArray(data['alert_routes'])) {
|
|
155
|
+
throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data['alert_routes']);
|
|
156
156
|
}
|
|
157
157
|
// validate the optional field `alert_routes` (array)
|
|
158
|
-
var _iterator = _createForOfIteratorHelper(data[
|
|
158
|
+
var _iterator = _createForOfIteratorHelper(data['alert_routes']),
|
|
159
159
|
_step;
|
|
160
160
|
try {
|
|
161
161
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -167,54 +167,55 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
167
167
|
} finally {
|
|
168
168
|
_iterator.f();
|
|
169
169
|
}
|
|
170
|
+
;
|
|
170
171
|
}
|
|
171
172
|
// ensure the json data is a string
|
|
172
|
-
if (data[
|
|
173
|
-
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data[
|
|
173
|
+
if (data['condition_type'] && !(typeof data['condition_type'] === 'string' || data['condition_type'] instanceof String)) {
|
|
174
|
+
throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data['condition_type']);
|
|
174
175
|
}
|
|
175
176
|
// ensure the json data is a string
|
|
176
|
-
if (data[
|
|
177
|
-
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data[
|
|
177
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
178
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
178
179
|
}
|
|
179
180
|
// ensure the json data is an array
|
|
180
|
-
if (!Array.isArray(data[
|
|
181
|
-
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data[
|
|
181
|
+
if (!Array.isArray(data['fleet_filter'])) {
|
|
182
|
+
throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data['fleet_filter']);
|
|
182
183
|
}
|
|
183
184
|
// ensure the json data is a string
|
|
184
|
-
if (data[
|
|
185
|
-
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data[
|
|
185
|
+
if (data['last_routed_at'] && !(typeof data['last_routed_at'] === 'string' || data['last_routed_at'] instanceof String)) {
|
|
186
|
+
throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data['last_routed_at']);
|
|
186
187
|
}
|
|
187
188
|
// ensure the json data is a string
|
|
188
|
-
if (data[
|
|
189
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data[
|
|
189
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
190
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
190
191
|
}
|
|
191
192
|
// ensure the json data is an array
|
|
192
|
-
if (!Array.isArray(data[
|
|
193
|
-
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data[
|
|
193
|
+
if (!Array.isArray(data['notefile_filter'])) {
|
|
194
|
+
throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data['notefile_filter']);
|
|
194
195
|
}
|
|
195
196
|
// ensure the json data is a string
|
|
196
|
-
if (data[
|
|
197
|
-
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data[
|
|
197
|
+
if (data['routing_cooldown_period'] && !(typeof data['routing_cooldown_period'] === 'string' || data['routing_cooldown_period'] instanceof String)) {
|
|
198
|
+
throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data['routing_cooldown_period']);
|
|
198
199
|
}
|
|
199
200
|
// ensure the json data is a string
|
|
200
|
-
if (data[
|
|
201
|
-
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data[
|
|
201
|
+
if (data['source_selector'] && !(typeof data['source_selector'] === 'string' || data['source_selector'] instanceof String)) {
|
|
202
|
+
throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data['source_selector']);
|
|
202
203
|
}
|
|
203
204
|
// ensure the json data is a string
|
|
204
|
-
if (data[
|
|
205
|
-
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data[
|
|
205
|
+
if (data['source_type'] && !(typeof data['source_type'] === 'string' || data['source_type'] instanceof String)) {
|
|
206
|
+
throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data['source_type']);
|
|
206
207
|
}
|
|
207
208
|
// ensure the json data is a string
|
|
208
|
-
if (data[
|
|
209
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
209
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
210
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
210
211
|
}
|
|
211
212
|
// ensure the json data is a string
|
|
212
|
-
if (data[
|
|
213
|
-
throw new Error("Expected the field `usage_scope` to be a primitive type in the JSON string but got " + data[
|
|
213
|
+
if (data['usage_scope'] && !(typeof data['usage_scope'] === 'string' || data['usage_scope'] instanceof String)) {
|
|
214
|
+
throw new Error("Expected the field `usage_scope` to be a primitive type in the JSON string but got " + data['usage_scope']);
|
|
214
215
|
}
|
|
215
216
|
// ensure the json data is a string
|
|
216
|
-
if (data[
|
|
217
|
-
throw new Error("Expected the field `usage_type` to be a primitive type in the JSON string but got " + data[
|
|
217
|
+
if (data['usage_type'] && !(typeof data['usage_type'] === 'string' || data['usage_type'] instanceof String)) {
|
|
218
|
+
throw new Error("Expected the field `usage_type` to be a primitive type in the JSON string but got " + data['usage_type']);
|
|
218
219
|
}
|
|
219
220
|
return true;
|
|
220
221
|
}
|
|
@@ -224,153 +225,153 @@ var Monitor = /*#__PURE__*/function () {
|
|
|
224
225
|
* Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
|
|
225
226
|
* @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
|
|
226
227
|
*/
|
|
227
|
-
Monitor.prototype[
|
|
228
|
+
Monitor.prototype['aggregate_function'] = undefined;
|
|
228
229
|
|
|
229
230
|
/**
|
|
230
231
|
* The time window to aggregate the selected values. It follows the format of a number followed by a time unit
|
|
231
232
|
* @member {String} aggregate_window
|
|
232
233
|
*/
|
|
233
|
-
Monitor.prototype[
|
|
234
|
+
Monitor.prototype['aggregate_window'] = undefined;
|
|
234
235
|
|
|
235
236
|
/**
|
|
236
237
|
* If true, the monitor is in alert state.
|
|
237
238
|
* @member {Boolean} alert
|
|
238
239
|
*/
|
|
239
|
-
Monitor.prototype[
|
|
240
|
+
Monitor.prototype['alert'] = undefined;
|
|
240
241
|
|
|
241
242
|
/**
|
|
242
243
|
* @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
|
|
243
244
|
*/
|
|
244
|
-
Monitor.prototype[
|
|
245
|
+
Monitor.prototype['alert_routes'] = undefined;
|
|
245
246
|
|
|
246
247
|
/**
|
|
247
248
|
* 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]
|
|
248
249
|
* @member {module:model/Monitor.ConditionTypeEnum} condition_type
|
|
249
250
|
*/
|
|
250
|
-
Monitor.prototype[
|
|
251
|
+
Monitor.prototype['condition_type'] = undefined;
|
|
251
252
|
|
|
252
253
|
/**
|
|
253
254
|
* @member {String} description
|
|
254
255
|
*/
|
|
255
|
-
Monitor.prototype[
|
|
256
|
+
Monitor.prototype['description'] = undefined;
|
|
256
257
|
|
|
257
258
|
/**
|
|
258
259
|
* If true, the monitor will not be evaluated.
|
|
259
260
|
* @member {Boolean} disabled
|
|
260
261
|
*/
|
|
261
|
-
Monitor.prototype[
|
|
262
|
+
Monitor.prototype['disabled'] = undefined;
|
|
262
263
|
|
|
263
264
|
/**
|
|
264
265
|
* @member {Array.<String>} fleet_filter
|
|
265
266
|
*/
|
|
266
|
-
Monitor.prototype[
|
|
267
|
+
Monitor.prototype['fleet_filter'] = undefined;
|
|
267
268
|
|
|
268
269
|
/**
|
|
269
270
|
* The last time the monitor was evaluated and routed.
|
|
270
271
|
* @member {String} last_routed_at
|
|
271
272
|
*/
|
|
272
|
-
Monitor.prototype[
|
|
273
|
+
Monitor.prototype['last_routed_at'] = undefined;
|
|
273
274
|
|
|
274
275
|
/**
|
|
275
276
|
* @member {String} name
|
|
276
277
|
*/
|
|
277
|
-
Monitor.prototype[
|
|
278
|
+
Monitor.prototype['name'] = undefined;
|
|
278
279
|
|
|
279
280
|
/**
|
|
280
281
|
* @member {Array.<String>} notefile_filter
|
|
281
282
|
*/
|
|
282
|
-
Monitor.prototype[
|
|
283
|
+
Monitor.prototype['notefile_filter'] = undefined;
|
|
283
284
|
|
|
284
285
|
/**
|
|
285
286
|
* 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.
|
|
286
287
|
* @member {Boolean} per_device
|
|
287
288
|
*/
|
|
288
|
-
Monitor.prototype[
|
|
289
|
+
Monitor.prototype['per_device'] = undefined;
|
|
289
290
|
|
|
290
291
|
/**
|
|
291
292
|
* 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.
|
|
292
293
|
* @member {String} routing_cooldown_period
|
|
293
294
|
*/
|
|
294
|
-
Monitor.prototype[
|
|
295
|
+
Monitor.prototype['routing_cooldown_period'] = undefined;
|
|
295
296
|
|
|
296
297
|
/**
|
|
297
298
|
* If true, alerts will be created, but no notifications will be sent.
|
|
298
299
|
* @member {Boolean} silenced
|
|
299
300
|
*/
|
|
300
|
-
Monitor.prototype[
|
|
301
|
+
Monitor.prototype['silenced'] = undefined;
|
|
301
302
|
|
|
302
303
|
/**
|
|
303
304
|
* A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
|
|
304
305
|
* @member {String} source_selector
|
|
305
306
|
*/
|
|
306
|
-
Monitor.prototype[
|
|
307
|
+
Monitor.prototype['source_selector'] = undefined;
|
|
307
308
|
|
|
308
309
|
/**
|
|
309
310
|
* The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
|
|
310
311
|
* @member {module:model/Monitor.SourceTypeEnum} source_type
|
|
311
312
|
*/
|
|
312
|
-
Monitor.prototype[
|
|
313
|
+
Monitor.prototype['source_type'] = undefined;
|
|
313
314
|
|
|
314
315
|
/**
|
|
315
316
|
* The type of condition to apply to the value selected by the source_selector
|
|
316
317
|
* @member {Number} threshold
|
|
317
318
|
*/
|
|
318
|
-
Monitor.prototype[
|
|
319
|
+
Monitor.prototype['threshold'] = undefined;
|
|
319
320
|
|
|
320
321
|
/**
|
|
321
322
|
* @member {String} uid
|
|
322
323
|
*/
|
|
323
|
-
Monitor.prototype[
|
|
324
|
+
Monitor.prototype['uid'] = undefined;
|
|
324
325
|
|
|
325
326
|
/**
|
|
326
327
|
* For usage monitors: the scope of aggregation. Supported values are \"device\" and \"fleet\".
|
|
327
328
|
* @member {String} usage_scope
|
|
328
329
|
*/
|
|
329
|
-
Monitor.prototype[
|
|
330
|
+
Monitor.prototype['usage_scope'] = undefined;
|
|
330
331
|
|
|
331
332
|
/**
|
|
332
333
|
* For usage monitors: the type of data usage to monitor. Supported values are \"cellular\" and \"satellite\".
|
|
333
334
|
* @member {String} usage_type
|
|
334
335
|
*/
|
|
335
|
-
Monitor.prototype[
|
|
336
|
+
Monitor.prototype['usage_type'] = undefined;
|
|
336
337
|
|
|
337
338
|
/**
|
|
338
339
|
* For usage monitors: the rolling time window in days to sum usage over (e.g. 30 for 30 days).
|
|
339
340
|
* @member {Number} usage_window
|
|
340
341
|
*/
|
|
341
|
-
Monitor.prototype[
|
|
342
|
+
Monitor.prototype['usage_window'] = undefined;
|
|
342
343
|
|
|
343
344
|
/**
|
|
344
345
|
* Allowed values for the <code>aggregate_function</code> property.
|
|
345
346
|
* @enum {String}
|
|
346
347
|
* @readonly
|
|
347
348
|
*/
|
|
348
|
-
Monitor[
|
|
349
|
+
Monitor['AggregateFunctionEnum'] = {
|
|
349
350
|
/**
|
|
350
351
|
* value: "none"
|
|
351
352
|
* @const
|
|
352
353
|
*/
|
|
353
|
-
none: "none",
|
|
354
|
+
"none": "none",
|
|
354
355
|
/**
|
|
355
356
|
* value: "sum"
|
|
356
357
|
* @const
|
|
357
358
|
*/
|
|
358
|
-
sum: "sum",
|
|
359
|
+
"sum": "sum",
|
|
359
360
|
/**
|
|
360
361
|
* value: "average"
|
|
361
362
|
* @const
|
|
362
363
|
*/
|
|
363
|
-
average: "average",
|
|
364
|
+
"average": "average",
|
|
364
365
|
/**
|
|
365
366
|
* value: "max"
|
|
366
367
|
* @const
|
|
367
368
|
*/
|
|
368
|
-
max: "max",
|
|
369
|
+
"max": "max",
|
|
369
370
|
/**
|
|
370
371
|
* value: "min"
|
|
371
372
|
* @const
|
|
372
373
|
*/
|
|
373
|
-
min: "min"
|
|
374
|
+
"min": "min"
|
|
374
375
|
};
|
|
375
376
|
|
|
376
377
|
/**
|
|
@@ -378,42 +379,42 @@ Monitor["AggregateFunctionEnum"] = {
|
|
|
378
379
|
* @enum {String}
|
|
379
380
|
* @readonly
|
|
380
381
|
*/
|
|
381
|
-
Monitor[
|
|
382
|
+
Monitor['ConditionTypeEnum'] = {
|
|
382
383
|
/**
|
|
383
384
|
* value: "greater_than"
|
|
384
385
|
* @const
|
|
385
386
|
*/
|
|
386
|
-
greater_than: "greater_than",
|
|
387
|
+
"greater_than": "greater_than",
|
|
387
388
|
/**
|
|
388
389
|
* value: "greater_than_or_equal_to"
|
|
389
390
|
* @const
|
|
390
391
|
*/
|
|
391
|
-
greater_than_or_equal_to: "greater_than_or_equal_to",
|
|
392
|
+
"greater_than_or_equal_to": "greater_than_or_equal_to",
|
|
392
393
|
/**
|
|
393
394
|
* value: "less_than"
|
|
394
395
|
* @const
|
|
395
396
|
*/
|
|
396
|
-
less_than: "less_than",
|
|
397
|
+
"less_than": "less_than",
|
|
397
398
|
/**
|
|
398
399
|
* value: "less_than_or_equal_to"
|
|
399
400
|
* @const
|
|
400
401
|
*/
|
|
401
|
-
less_than_or_equal_to: "less_than_or_equal_to",
|
|
402
|
+
"less_than_or_equal_to": "less_than_or_equal_to",
|
|
402
403
|
/**
|
|
403
404
|
* value: "equal_to"
|
|
404
405
|
* @const
|
|
405
406
|
*/
|
|
406
|
-
equal_to: "equal_to",
|
|
407
|
+
"equal_to": "equal_to",
|
|
407
408
|
/**
|
|
408
409
|
* value: "not_equal_to"
|
|
409
410
|
* @const
|
|
410
411
|
*/
|
|
411
|
-
not_equal_to: "not_equal_to",
|
|
412
|
+
"not_equal_to": "not_equal_to",
|
|
412
413
|
/**
|
|
413
414
|
* value: "count"
|
|
414
415
|
* @const
|
|
415
416
|
*/
|
|
416
|
-
count: "count"
|
|
417
|
+
"count": "count"
|
|
417
418
|
};
|
|
418
419
|
|
|
419
420
|
/**
|
|
@@ -421,16 +422,16 @@ Monitor["ConditionTypeEnum"] = {
|
|
|
421
422
|
* @enum {String}
|
|
422
423
|
* @readonly
|
|
423
424
|
*/
|
|
424
|
-
Monitor[
|
|
425
|
+
Monitor['SourceTypeEnum'] = {
|
|
425
426
|
/**
|
|
426
427
|
* value: "event"
|
|
427
428
|
* @const
|
|
428
429
|
*/
|
|
429
|
-
event: "event",
|
|
430
|
+
"event": "event",
|
|
430
431
|
/**
|
|
431
432
|
* value: "heartbeat"
|
|
432
433
|
* @const
|
|
433
434
|
*/
|
|
434
|
-
heartbeat: "heartbeat"
|
|
435
|
+
"heartbeat": "heartbeat"
|
|
435
436
|
};
|
|
436
437
|
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 6.2.0-beta.
|
|
34
|
+
* @version 6.2.0-beta.56
|
|
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
|
}
|
|
@@ -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[
|
|
160
|
+
MonitorAlertRoutesInner.prototype['message_type'] = undefined;
|
|
162
161
|
|
|
163
162
|
/**
|
|
164
163
|
* The text of the message, or the blocks definition
|
|
165
164
|
* @member {String} text
|
|
166
165
|
*/
|
|
167
|
-
MonitorAlertRoutesInner.prototype[
|
|
166
|
+
MonitorAlertRoutesInner.prototype['text'] = undefined;
|
|
168
167
|
|
|
169
168
|
/**
|
|
170
169
|
* The URL of the Slack webhook.
|
|
171
170
|
* @member {String} url
|
|
172
171
|
*/
|
|
173
|
-
MonitorAlertRoutesInner.prototype[
|
|
172
|
+
MonitorAlertRoutesInner.prototype['url'] = undefined;
|
|
174
173
|
|
|
175
174
|
/**
|
|
176
175
|
* The channel to send the message to.
|
|
177
176
|
* @member {String} channel
|
|
178
177
|
*/
|
|
179
|
-
MonitorAlertRoutesInner.prototype[
|
|
178
|
+
MonitorAlertRoutesInner.prototype['channel'] = undefined;
|
|
180
179
|
|
|
181
180
|
/**
|
|
182
181
|
* The bearer token for the Slack app.
|
|
183
182
|
* @member {String} token
|
|
184
183
|
*/
|
|
185
|
-
MonitorAlertRoutesInner.prototype[
|
|
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;
|