@blues-inc/notehub-js 3.0.0 → 4.0.0-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.
Files changed (146) hide show
  1. package/README.md +247 -247
  2. package/dist/ApiClient.js +150 -155
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +31 -31
  5. package/dist/api/BillingAccountApi.js +14 -14
  6. package/dist/api/DeviceApi.js +471 -511
  7. package/dist/api/EventApi.js +118 -118
  8. package/dist/api/ExternalDevicesApi.js +41 -41
  9. package/dist/api/MonitorApi.js +52 -52
  10. package/dist/api/ProjectApi.js +381 -381
  11. package/dist/api/RouteApi.js +77 -77
  12. package/dist/api/UsageApi.js +117 -51
  13. package/dist/api/WebhookApi.js +51 -51
  14. package/dist/index.js +21 -14
  15. package/dist/model/AddDeviceToFleetsRequest.js +8 -8
  16. package/dist/model/Alert.js +76 -74
  17. package/dist/model/AlertDataInner.js +35 -35
  18. package/dist/model/AlertNotificationsInner.js +18 -18
  19. package/dist/model/AwsRoute.js +65 -65
  20. package/dist/model/AzureRoute.js +43 -43
  21. package/dist/model/BillingAccount.js +21 -21
  22. package/dist/model/BillingAccountRole.js +9 -9
  23. package/dist/model/BlynkRoute.js +28 -28
  24. package/dist/model/Body.js +5 -5
  25. package/dist/model/CellularPlan.js +34 -34
  26. package/dist/model/CloneProjectRequest.js +20 -20
  27. package/dist/model/Contact.js +22 -22
  28. package/dist/model/CreateFleetRequest.js +25 -17
  29. package/dist/model/CreateMonitor.js +126 -125
  30. package/dist/model/CreateProductRequest.js +22 -22
  31. package/dist/model/CreateProjectRequest.js +16 -16
  32. package/dist/model/CreateUpdateRepository.js +17 -17
  33. package/dist/model/CurrentFirmware.js +12 -12
  34. package/dist/model/DFUEnv.js +12 -12
  35. package/dist/model/DFUState.js +65 -65
  36. package/dist/model/DataField.js +7 -7
  37. package/dist/model/DataSetField.js +19 -19
  38. package/dist/model/DataUsage.js +14 -14
  39. package/dist/model/DatacakeRoute.js +35 -35
  40. package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
  41. package/dist/model/DeleteNotefilesRequest.js +7 -7
  42. package/dist/model/Device.js +115 -101
  43. package/dist/model/DeviceDfuHistory.js +20 -19
  44. package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
  45. package/dist/model/DeviceDfuHistoryPage.js +13 -12
  46. package/dist/model/DeviceDfuStateMachine.js +25 -24
  47. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  48. package/dist/model/DeviceDfuStatus.js +20 -20
  49. package/dist/model/DeviceDfuStatusPage.js +13 -12
  50. package/dist/model/DeviceSession.js +221 -221
  51. package/dist/model/DeviceTowerInfo.js +14 -14
  52. package/dist/model/DeviceUsage.js +32 -32
  53. package/dist/model/DfuActionRequest.js +7 -7
  54. package/dist/model/EmailNotification.js +7 -7
  55. package/dist/model/EnvTreeJsonNode.js +69 -67
  56. package/dist/model/EnvVar.js +18 -18
  57. package/dist/model/EnvironmentVariables.js +8 -8
  58. package/dist/model/Error.js +31 -31
  59. package/dist/model/Event.js +248 -248
  60. package/dist/model/Filter.js +16 -16
  61. package/dist/model/Firmware.js +49 -49
  62. package/dist/model/FirmwareInfo.js +60 -60
  63. package/dist/model/Fleet.js +43 -35
  64. package/dist/model/FleetConnectivityAssurance.js +8 -31
  65. package/dist/model/GetAlerts200Response.js +15 -14
  66. package/dist/model/GetBillingAccounts200Response.js +10 -9
  67. package/dist/model/GetDataUsage200Response.js +10 -9
  68. package/dist/model/GetDataUsage200ResponseDataInner.js +41 -40
  69. package/dist/model/GetDbNote200Response.js +13 -13
  70. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
  71. package/dist/model/GetDeviceFleets200Response.js +12 -11
  72. package/dist/model/GetDeviceHealthLog200Response.js +12 -11
  73. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  74. package/dist/model/GetDeviceLatestEvents200Response.js +10 -9
  75. package/dist/model/GetDevicePlans200Response.js +10 -9
  76. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  77. package/dist/model/GetDevicePublicKeys200Response.js +17 -16
  78. package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
  79. package/dist/model/GetDeviceSessions200Response.js +17 -16
  80. package/dist/model/GetDevices200Response.js +17 -16
  81. package/dist/model/GetEvents200Response.js +21 -20
  82. package/dist/model/GetEventsByCursor200Response.js +24 -23
  83. package/dist/model/GetNotefile200Response.js +11 -11
  84. package/dist/model/GetProducts200Response.js +10 -9
  85. package/dist/model/GetProjectMembers200Response.js +12 -11
  86. package/dist/model/GetProjects200Response.js +10 -9
  87. package/dist/model/GetRouteLogsUsage200Response.js +132 -0
  88. package/dist/model/GetSessionsUsage200Response.js +12 -11
  89. package/dist/model/GetWebhooks200Response.js +10 -9
  90. package/dist/model/GoogleRoute.js +33 -33
  91. package/dist/model/HttpRoute.js +35 -35
  92. package/dist/model/Location.js +40 -40
  93. package/dist/model/Login200Response.js +7 -7
  94. package/dist/model/LoginRequest.js +12 -12
  95. package/dist/model/Monitor.js +100 -99
  96. package/dist/model/MonitorAlertRoutesInner.js +9 -10
  97. package/dist/model/MqttRoute.js +68 -68
  98. package/dist/model/Note.js +95 -15
  99. package/dist/model/{ListNotefiles200Response.js → NoteInput.js} +30 -37
  100. package/dist/model/Notefile.js +159 -0
  101. package/dist/model/NotefileSchema.js +19 -18
  102. package/dist/model/NotehubRoute.js +103 -103
  103. package/dist/model/NotehubRouteSummary.js +23 -23
  104. package/dist/model/OAuth2Error.js +20 -20
  105. package/dist/model/OAuth2TokenResponse.js +23 -23
  106. package/dist/model/PersonalAccessToken.js +34 -34
  107. package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
  108. package/dist/model/PersonalAccessTokenInfo.js +18 -18
  109. package/dist/model/PersonalAccessTokenSecret.js +12 -12
  110. package/dist/model/Product.js +26 -26
  111. package/dist/model/Project.js +34 -34
  112. package/dist/model/ProjectMember.js +22 -22
  113. package/dist/model/ProvisionDeviceRequest.js +18 -18
  114. package/dist/model/ProxyRoute.js +29 -29
  115. package/dist/model/QubitroRoute.js +33 -33
  116. package/dist/model/RadRoute.js +31 -31
  117. package/dist/model/Repository.js +22 -22
  118. package/dist/model/Role.js +9 -9
  119. package/dist/model/RouteLog.js +38 -38
  120. package/dist/model/RouteTransformSettings.js +18 -18
  121. package/dist/model/S3ArchiveRoute.js +79 -79
  122. package/dist/model/SatellitePlan.js +26 -26
  123. package/dist/model/SchemaProperty.js +38 -36
  124. package/dist/model/SignalDevice200Response.js +5 -5
  125. package/dist/model/SimUsage.js +19 -19
  126. package/dist/model/SlackBearerNotification.js +25 -25
  127. package/dist/model/SlackRoute.js +48 -48
  128. package/dist/model/SlackWebHookNotification.js +20 -20
  129. package/dist/model/SnowflakeRoute.js +45 -45
  130. package/dist/model/SnowpipeStreamingRoute.js +60 -60
  131. package/dist/model/ThingworxRoute.js +33 -33
  132. package/dist/model/TowerLocation.js +54 -54
  133. package/dist/model/TwilioRoute.js +43 -43
  134. package/dist/model/UpdateFleetRequest.js +38 -30
  135. package/dist/model/UploadMetadata.js +64 -64
  136. package/dist/model/UsageData.js +18 -18
  137. package/dist/model/UsageEventsData.js +48 -37
  138. package/dist/model/UsageEventsResponse.js +12 -11
  139. package/dist/model/UsageRouteLogsData.js +27 -27
  140. package/dist/model/UsageSessionsData.js +41 -31
  141. package/dist/model/UserDfuStateMachine.js +20 -20
  142. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  143. package/dist/model/UserFirmwareInfo.js +12 -12
  144. package/dist/model/WebhookSettings.js +15 -15
  145. package/package.json +3 -3
  146. package/dist/model/ListPendingNotefiles200Response.js +0 -115
@@ -13,7 +13,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
15
  * Notehub API
16
- * The OpenAPI definition for the Notehub.io API.
16
+ * The OpenAPI definition for the Notehub.io API.
17
17
  *
18
18
  * The version of the OpenAPI document: 1.2.0
19
19
  * Contact: engineering@blues.io
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The LoginRequest model module.
28
28
  * @module model/LoginRequest
29
- * @version 3.0.0
29
+ * @version 4.0.0-beta.1
30
30
  */
31
31
  var LoginRequest = /*#__PURE__*/function () {
32
32
  /**
@@ -59,11 +59,11 @@ 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("password")) {
63
- obj["password"] = _ApiClient["default"].convertToType(data["password"], "String");
62
+ if (data.hasOwnProperty('password')) {
63
+ obj['password'] = _ApiClient["default"].convertToType(data['password'], 'String');
64
64
  }
65
- if (data.hasOwnProperty("username")) {
66
- obj["username"] = _ApiClient["default"].convertToType(data["username"], "String");
65
+ if (data.hasOwnProperty('username')) {
66
+ obj['username'] = _ApiClient["default"].convertToType(data['username'], 'String');
67
67
  }
68
68
  } else if (data === null) {
69
69
  return null;
@@ -80,12 +80,12 @@ var LoginRequest = /*#__PURE__*/function () {
80
80
  key: "validateJSON",
81
81
  value: function validateJSON(data) {
82
82
  // ensure the json data is a string
83
- if (data["password"] && !(typeof data["password"] === "string" || data["password"] instanceof String)) {
84
- throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data["password"]);
83
+ if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) {
84
+ throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']);
85
85
  }
86
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"]);
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
89
  }
90
90
  return true;
91
91
  }
@@ -94,10 +94,10 @@ var LoginRequest = /*#__PURE__*/function () {
94
94
  /**
95
95
  * @member {String} password
96
96
  */
97
- LoginRequest.prototype["password"] = undefined;
97
+ LoginRequest.prototype['password'] = undefined;
98
98
 
99
99
  /**
100
100
  * @member {String} username
101
101
  */
102
- LoginRequest.prototype["username"] = undefined;
102
+ LoginRequest.prototype['username'] = undefined;
103
103
  var _default = exports["default"] = LoginRequest;
@@ -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 3.0.0
33
+ * @version 4.0.0-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("aggregate_function")) {
67
- obj["aggregate_function"] = _ApiClient["default"].convertToType(data["aggregate_function"], "String");
66
+ if (data.hasOwnProperty('aggregate_function')) {
67
+ obj['aggregate_function'] = _ApiClient["default"].convertToType(data['aggregate_function'], 'String');
68
68
  }
69
- if (data.hasOwnProperty("aggregate_window")) {
70
- obj["aggregate_window"] = _ApiClient["default"].convertToType(data["aggregate_window"], "String");
69
+ if (data.hasOwnProperty('aggregate_window')) {
70
+ obj['aggregate_window'] = _ApiClient["default"].convertToType(data['aggregate_window'], 'String');
71
71
  }
72
- if (data.hasOwnProperty("alert")) {
73
- obj["alert"] = _ApiClient["default"].convertToType(data["alert"], "Boolean");
72
+ if (data.hasOwnProperty('alert')) {
73
+ obj['alert'] = _ApiClient["default"].convertToType(data['alert'], 'Boolean');
74
74
  }
75
- if (data.hasOwnProperty("alert_routes")) {
76
- obj["alert_routes"] = _ApiClient["default"].convertToType(data["alert_routes"], [_MonitorAlertRoutesInner["default"]]);
75
+ if (data.hasOwnProperty('alert_routes')) {
76
+ obj['alert_routes'] = _ApiClient["default"].convertToType(data['alert_routes'], [_MonitorAlertRoutesInner["default"]]);
77
77
  }
78
- if (data.hasOwnProperty("condition_type")) {
79
- obj["condition_type"] = _ApiClient["default"].convertToType(data["condition_type"], "String");
78
+ if (data.hasOwnProperty('condition_type')) {
79
+ obj['condition_type'] = _ApiClient["default"].convertToType(data['condition_type'], 'String');
80
80
  }
81
- if (data.hasOwnProperty("description")) {
82
- obj["description"] = _ApiClient["default"].convertToType(data["description"], "String");
81
+ if (data.hasOwnProperty('description')) {
82
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
83
83
  }
84
- if (data.hasOwnProperty("disabled")) {
85
- obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
84
+ if (data.hasOwnProperty('disabled')) {
85
+ obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
86
86
  }
87
- if (data.hasOwnProperty("fleet_filter")) {
88
- obj["fleet_filter"] = _ApiClient["default"].convertToType(data["fleet_filter"], ["String"]);
87
+ if (data.hasOwnProperty('fleet_filter')) {
88
+ obj['fleet_filter'] = _ApiClient["default"].convertToType(data['fleet_filter'], ['String']);
89
89
  }
90
- if (data.hasOwnProperty("last_routed_at")) {
91
- obj["last_routed_at"] = _ApiClient["default"].convertToType(data["last_routed_at"], "String");
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("name")) {
94
- obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
93
+ if (data.hasOwnProperty('name')) {
94
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
95
95
  }
96
- if (data.hasOwnProperty("notefile_filter")) {
97
- obj["notefile_filter"] = _ApiClient["default"].convertToType(data["notefile_filter"], ["String"]);
96
+ if (data.hasOwnProperty('notefile_filter')) {
97
+ obj['notefile_filter'] = _ApiClient["default"].convertToType(data['notefile_filter'], ['String']);
98
98
  }
99
- if (data.hasOwnProperty("per_device")) {
100
- obj["per_device"] = _ApiClient["default"].convertToType(data["per_device"], "Boolean");
99
+ if (data.hasOwnProperty('per_device')) {
100
+ obj['per_device'] = _ApiClient["default"].convertToType(data['per_device'], 'Boolean');
101
101
  }
102
- if (data.hasOwnProperty("routing_cooldown_period")) {
103
- obj["routing_cooldown_period"] = _ApiClient["default"].convertToType(data["routing_cooldown_period"], "String");
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("silenced")) {
106
- obj["silenced"] = _ApiClient["default"].convertToType(data["silenced"], "Boolean");
105
+ if (data.hasOwnProperty('silenced')) {
106
+ obj['silenced'] = _ApiClient["default"].convertToType(data['silenced'], 'Boolean');
107
107
  }
108
- if (data.hasOwnProperty("source_selector")) {
109
- obj["source_selector"] = _ApiClient["default"].convertToType(data["source_selector"], "String");
108
+ if (data.hasOwnProperty('source_selector')) {
109
+ obj['source_selector'] = _ApiClient["default"].convertToType(data['source_selector'], 'String');
110
110
  }
111
- if (data.hasOwnProperty("source_type")) {
112
- obj["source_type"] = _ApiClient["default"].convertToType(data["source_type"], "String");
111
+ if (data.hasOwnProperty('source_type')) {
112
+ obj['source_type'] = _ApiClient["default"].convertToType(data['source_type'], 'String');
113
113
  }
114
- if (data.hasOwnProperty("threshold")) {
115
- obj["threshold"] = _ApiClient["default"].convertToType(data["threshold"], "Number");
114
+ if (data.hasOwnProperty('threshold')) {
115
+ obj['threshold'] = _ApiClient["default"].convertToType(data['threshold'], 'Number');
116
116
  }
117
- if (data.hasOwnProperty("uid")) {
118
- obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
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,21 +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["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"]);
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["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"]);
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
- if (data["alert_routes"]) {
142
+ if (data['alert_routes']) {
143
143
  // data not null
144
144
  // ensure the json data is an array
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"]);
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']);
147
147
  }
148
148
  // validate the optional field `alert_routes` (array)
149
- var _iterator = _createForOfIteratorHelper(data["alert_routes"]),
149
+ var _iterator = _createForOfIteratorHelper(data['alert_routes']),
150
150
  _step;
151
151
  try {
152
152
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -158,46 +158,47 @@ var Monitor = /*#__PURE__*/function () {
158
158
  } finally {
159
159
  _iterator.f();
160
160
  }
161
+ ;
161
162
  }
162
163
  // 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"]);
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']);
165
166
  }
166
167
  // ensure the json data is a string
167
- if (data["description"] && !(typeof data["description"] === "string" || data["description"] instanceof String)) {
168
- throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data["description"]);
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']);
169
170
  }
170
171
  // ensure the json data is an array
171
- if (!Array.isArray(data["fleet_filter"])) {
172
- throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data["fleet_filter"]);
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']);
173
174
  }
174
175
  // ensure the json data is a string
175
- if (data["last_routed_at"] && !(typeof data["last_routed_at"] === "string" || data["last_routed_at"] instanceof String)) {
176
- throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data["last_routed_at"]);
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']);
177
178
  }
178
179
  // ensure the json data is a string
179
- if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
180
- throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
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']);
181
182
  }
182
183
  // ensure the json data is an array
183
- if (!Array.isArray(data["notefile_filter"])) {
184
- throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data["notefile_filter"]);
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']);
185
186
  }
186
187
  // ensure the json data is a string
187
- if (data["routing_cooldown_period"] && !(typeof data["routing_cooldown_period"] === "string" || data["routing_cooldown_period"] instanceof String)) {
188
- throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data["routing_cooldown_period"]);
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']);
189
190
  }
190
191
  // ensure the json data is a string
191
- if (data["source_selector"] && !(typeof data["source_selector"] === "string" || data["source_selector"] instanceof String)) {
192
- throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data["source_selector"]);
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']);
193
194
  }
194
195
  // ensure the json data is a string
195
- if (data["source_type"] && !(typeof data["source_type"] === "string" || data["source_type"] instanceof String)) {
196
- throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data["source_type"]);
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']);
197
198
  }
198
199
  // ensure the json data is a string
199
- if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
200
- throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
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
  }
@@ -207,135 +208,135 @@ var Monitor = /*#__PURE__*/function () {
207
208
  * Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
208
209
  * @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
209
210
  */
210
- Monitor.prototype["aggregate_function"] = undefined;
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
214
215
  * @member {String} aggregate_window
215
216
  */
216
- Monitor.prototype["aggregate_window"] = undefined;
217
+ Monitor.prototype['aggregate_window'] = undefined;
217
218
 
218
219
  /**
219
220
  * If true, the monitor is in alert state.
220
221
  * @member {Boolean} alert
221
222
  */
222
- Monitor.prototype["alert"] = undefined;
223
+ Monitor.prototype['alert'] = undefined;
223
224
 
224
225
  /**
225
226
  * @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
226
227
  */
227
- Monitor.prototype["alert_routes"] = undefined;
228
+ Monitor.prototype['alert_routes'] = undefined;
228
229
 
229
230
  /**
230
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]
231
232
  * @member {module:model/Monitor.ConditionTypeEnum} condition_type
232
233
  */
233
- Monitor.prototype["condition_type"] = undefined;
234
+ Monitor.prototype['condition_type'] = undefined;
234
235
 
235
236
  /**
236
237
  * @member {String} description
237
238
  */
238
- Monitor.prototype["description"] = undefined;
239
+ Monitor.prototype['description'] = undefined;
239
240
 
240
241
  /**
241
242
  * If true, the monitor will not be evaluated.
242
243
  * @member {Boolean} disabled
243
244
  */
244
- Monitor.prototype["disabled"] = undefined;
245
+ Monitor.prototype['disabled'] = undefined;
245
246
 
246
247
  /**
247
248
  * @member {Array.<String>} fleet_filter
248
249
  */
249
- Monitor.prototype["fleet_filter"] = undefined;
250
+ Monitor.prototype['fleet_filter'] = undefined;
250
251
 
251
252
  /**
252
253
  * The last time the monitor was evaluated and routed.
253
254
  * @member {String} last_routed_at
254
255
  */
255
- Monitor.prototype["last_routed_at"] = undefined;
256
+ Monitor.prototype['last_routed_at'] = undefined;
256
257
 
257
258
  /**
258
259
  * @member {String} name
259
260
  */
260
- Monitor.prototype["name"] = undefined;
261
+ Monitor.prototype['name'] = undefined;
261
262
 
262
263
  /**
263
264
  * @member {Array.<String>} notefile_filter
264
265
  */
265
- Monitor.prototype["notefile_filter"] = undefined;
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.
269
270
  * @member {Boolean} per_device
270
271
  */
271
- Monitor.prototype["per_device"] = undefined;
272
+ Monitor.prototype['per_device'] = undefined;
272
273
 
273
274
  /**
274
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.
275
276
  * @member {String} routing_cooldown_period
276
277
  */
277
- Monitor.prototype["routing_cooldown_period"] = undefined;
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.
281
282
  * @member {Boolean} silenced
282
283
  */
283
- Monitor.prototype["silenced"] = undefined;
284
+ Monitor.prototype['silenced'] = undefined;
284
285
 
285
286
  /**
286
287
  * A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
287
288
  * @member {String} source_selector
288
289
  */
289
- Monitor.prototype["source_selector"] = undefined;
290
+ Monitor.prototype['source_selector'] = undefined;
290
291
 
291
292
  /**
292
293
  * The type of source to monitor. Currently only \"event\" is supported.
293
294
  * @member {module:model/Monitor.SourceTypeEnum} source_type
294
295
  */
295
- Monitor.prototype["source_type"] = undefined;
296
+ Monitor.prototype['source_type'] = undefined;
296
297
 
297
298
  /**
298
299
  * The type of condition to apply to the value selected by the source_selector
299
300
  * @member {Number} threshold
300
301
  */
301
- Monitor.prototype["threshold"] = undefined;
302
+ Monitor.prototype['threshold'] = undefined;
302
303
 
303
304
  /**
304
305
  * @member {String} uid
305
306
  */
306
- Monitor.prototype["uid"] = undefined;
307
+ Monitor.prototype['uid'] = undefined;
307
308
 
308
309
  /**
309
310
  * Allowed values for the <code>aggregate_function</code> property.
310
311
  * @enum {String}
311
312
  * @readonly
312
313
  */
313
- Monitor["AggregateFunctionEnum"] = {
314
+ Monitor['AggregateFunctionEnum'] = {
314
315
  /**
315
316
  * value: "none"
316
317
  * @const
317
318
  */
318
- none: "none",
319
+ "none": "none",
319
320
  /**
320
321
  * value: "sum"
321
322
  * @const
322
323
  */
323
- sum: "sum",
324
+ "sum": "sum",
324
325
  /**
325
326
  * value: "average"
326
327
  * @const
327
328
  */
328
- average: "average",
329
+ "average": "average",
329
330
  /**
330
331
  * value: "max"
331
332
  * @const
332
333
  */
333
- max: "max",
334
+ "max": "max",
334
335
  /**
335
336
  * value: "min"
336
337
  * @const
337
338
  */
338
- min: "min"
339
+ "min": "min"
339
340
  };
340
341
 
341
342
  /**
@@ -343,37 +344,37 @@ Monitor["AggregateFunctionEnum"] = {
343
344
  * @enum {String}
344
345
  * @readonly
345
346
  */
346
- Monitor["ConditionTypeEnum"] = {
347
+ Monitor['ConditionTypeEnum'] = {
347
348
  /**
348
349
  * value: "greater_than"
349
350
  * @const
350
351
  */
351
- greater_than: "greater_than",
352
+ "greater_than": "greater_than",
352
353
  /**
353
354
  * value: "greater_than_or_equal_to"
354
355
  * @const
355
356
  */
356
- greater_than_or_equal_to: "greater_than_or_equal_to",
357
+ "greater_than_or_equal_to": "greater_than_or_equal_to",
357
358
  /**
358
359
  * value: "less_than"
359
360
  * @const
360
361
  */
361
- less_than: "less_than",
362
+ "less_than": "less_than",
362
363
  /**
363
364
  * value: "less_than_or_equal_to"
364
365
  * @const
365
366
  */
366
- less_than_or_equal_to: "less_than_or_equal_to",
367
+ "less_than_or_equal_to": "less_than_or_equal_to",
367
368
  /**
368
369
  * value: "equal_to"
369
370
  * @const
370
371
  */
371
- equal_to: "equal_to",
372
+ "equal_to": "equal_to",
372
373
  /**
373
374
  * value: "not_equal_to"
374
375
  * @const
375
376
  */
376
- not_equal_to: "not_equal_to"
377
+ "not_equal_to": "not_equal_to"
377
378
  };
378
379
 
379
380
  /**
@@ -381,11 +382,11 @@ Monitor["ConditionTypeEnum"] = {
381
382
  * @enum {String}
382
383
  * @readonly
383
384
  */
384
- Monitor["SourceTypeEnum"] = {
385
+ Monitor['SourceTypeEnum'] = {
385
386
  /**
386
387
  * value: "event"
387
388
  * @const
388
389
  */
389
- event: "event"
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 3.0.0
34
+ * @version 4.0.0-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
  }
@@ -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["message_type"] = undefined;
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["text"] = undefined;
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["url"] = undefined;
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["channel"] = undefined;
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["token"] = undefined;
184
+ MonitorAlertRoutesInner.prototype['token'] = undefined;
186
185
 
187
186
  /**
188
187
  * Email Address
189
188
  * @member {String} email
190
189
  */
191
- MonitorAlertRoutesInner.prototype["email"] = undefined;
190
+ MonitorAlertRoutesInner.prototype['email'] = undefined;
192
191
  MonitorAlertRoutesInner.OneOf = ["EmailNotification", "SlackBearerNotification", "SlackWebHookNotification"];
193
192
  var _default = exports["default"] = MonitorAlertRoutesInner;