@blues-inc/notehub-js 1.0.28 → 1.0.29-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +217 -190
  2. package/dist/ApiClient.js +156 -156
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +16 -16
  5. package/dist/api/BillingAccountApi.js +14 -14
  6. package/dist/api/DeviceApi.js +351 -351
  7. package/dist/api/EventApi.js +118 -118
  8. package/dist/api/MonitorApi.js +52 -52
  9. package/dist/api/ProjectApi.js +384 -339
  10. package/dist/api/RepositoryApi.js +605 -0
  11. package/dist/api/RouteApi.js +74 -74
  12. package/dist/index.js +56 -0
  13. package/dist/model/Alert.js +76 -74
  14. package/dist/model/AlertDataInner.js +35 -35
  15. package/dist/model/AlertNotificationsInner.js +18 -18
  16. package/dist/model/Aws.js +65 -65
  17. package/dist/model/Azure.js +43 -43
  18. package/dist/model/BillingAccount.js +21 -21
  19. package/dist/model/BillingAccountRole.js +9 -9
  20. package/dist/model/Body.js +5 -5
  21. package/dist/model/CloneProjectRequest.js +20 -20
  22. package/dist/model/Contact.js +22 -22
  23. package/dist/model/CreateFleetRequest.js +12 -12
  24. package/dist/model/CreateMonitor.js +126 -125
  25. package/dist/model/CreateProductRequest.js +22 -22
  26. package/dist/model/CreateProjectRequest.js +16 -16
  27. package/dist/model/CreateUpdateRepository.js +115 -0
  28. package/dist/model/CurrentFirmware.js +12 -12
  29. package/dist/model/DFUEnv.js +12 -12
  30. package/dist/model/DFUState.js +65 -65
  31. package/dist/model/DataField.js +92 -0
  32. package/dist/model/DataSet.js +164 -0
  33. package/dist/model/DataSetField.js +137 -0
  34. package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
  35. package/dist/model/Device.js +94 -94
  36. package/dist/model/DeviceDfuHistory.js +20 -19
  37. package/dist/model/DeviceDfuHistoryPage.js +13 -12
  38. package/dist/model/DeviceDfuStateMachine.js +25 -24
  39. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  40. package/dist/model/DeviceDfuStatus.js +20 -20
  41. package/dist/model/DeviceDfuStatusCurrent.js +32 -32
  42. package/dist/model/DeviceDfuStatusPage.js +13 -12
  43. package/dist/model/DeviceSession.js +182 -182
  44. package/dist/model/DeviceTowerInfo.js +14 -14
  45. package/dist/model/DeviceUsage.js +32 -32
  46. package/dist/model/DfuActionRequest.js +7 -7
  47. package/dist/model/EmailNotification.js +7 -7
  48. package/dist/model/EnvironmentVariables.js +8 -8
  49. package/dist/model/Error.js +31 -31
  50. package/dist/model/Event.js +243 -243
  51. package/dist/model/Firmware.js +49 -49
  52. package/dist/model/FirmwareInfo.js +60 -60
  53. package/dist/model/Fleet.js +23 -23
  54. package/dist/model/GetAlerts200Response.js +15 -14
  55. package/dist/model/GetBillingAccounts200Response.js +10 -9
  56. package/dist/model/GetDeviceEnvironmentVariables200Response.js +12 -12
  57. package/dist/model/GetDeviceHealthLog200Response.js +12 -11
  58. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  59. package/dist/model/GetDeviceLatest200Response.js +10 -9
  60. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  61. package/dist/model/GetDeviceSessions200Response.js +17 -16
  62. package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
  63. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
  64. package/dist/model/GetProjectDevices200Response.js +17 -16
  65. package/dist/model/GetProjectEvents200Response.js +21 -20
  66. package/dist/model/GetProjectEventsByCursor200Response.js +24 -23
  67. package/dist/model/GetProjectFleets200Response.js +12 -11
  68. package/dist/model/GetProjectMembers200Response.js +12 -11
  69. package/dist/model/GetProjectProducts200Response.js +10 -9
  70. package/dist/model/GetProjects200Response.js +10 -9
  71. package/dist/model/GetRouteLogsByRoute200ResponseInner.js +35 -35
  72. package/dist/model/Google.js +33 -33
  73. package/dist/model/HandleNoteChanges200Response.js +11 -11
  74. package/dist/model/HandleNoteGet200Response.js +13 -13
  75. package/dist/model/HandleNoteSignal200Response.js +5 -5
  76. package/dist/model/HandleNotefileChanges200Response.js +11 -11
  77. package/dist/model/HandleNotefileChangesPending200Response.js +14 -14
  78. package/dist/model/HandleNotefileDeleteRequest.js +7 -7
  79. package/dist/model/Http.js +35 -35
  80. package/dist/model/HttpFilter.js +19 -19
  81. package/dist/model/HttpTransform.js +20 -20
  82. package/dist/model/Location.js +40 -40
  83. package/dist/model/Login200Response.js +7 -7
  84. package/dist/model/LoginRequest.js +12 -12
  85. package/dist/model/Monitor.js +100 -99
  86. package/dist/model/MonitorAlertRoutesInner.js +9 -10
  87. package/dist/model/Mqtt.js +66 -66
  88. package/dist/model/Note.js +10 -10
  89. package/dist/model/NotehubRoute.js +36 -36
  90. package/dist/model/NotehubRouteSchema.js +45 -46
  91. package/dist/model/PostProvisionProjectDeviceRequest.js +18 -18
  92. package/dist/model/Product.js +26 -26
  93. package/dist/model/Project.js +34 -34
  94. package/dist/model/ProjectMember.js +22 -22
  95. package/dist/model/Proxy.js +24 -24
  96. package/dist/model/PutDeviceFleetsRequest.js +8 -8
  97. package/dist/model/QuestionDataResponseLineChart.js +204 -0
  98. package/dist/model/QuestionDataResponseMap.js +143 -0
  99. package/dist/model/Radresponder.js +25 -25
  100. package/dist/model/Repository.js +129 -0
  101. package/dist/model/Role.js +9 -9
  102. package/dist/model/Slack.js +53 -53
  103. package/dist/model/SlackBearerNotification.js +25 -25
  104. package/dist/model/SlackWebHookNotification.js +20 -20
  105. package/dist/model/Snowflake.js +45 -45
  106. package/dist/model/SnowflakeTransform.js +12 -12
  107. package/dist/model/Thingworx.js +33 -33
  108. package/dist/model/TowerLocation.js +52 -52
  109. package/dist/model/Twilio.js +43 -43
  110. package/dist/model/UpdateFleetRequest.js +22 -22
  111. package/dist/model/UploadMetadata.js +59 -59
  112. package/dist/model/UserDbRoute.js +25 -25
  113. package/dist/model/UserDfuStateMachine.js +20 -20
  114. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  115. package/dist/model/UserFirmwareInfo.js +12 -12
  116. package/package.json +3 -3
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
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
+ * Notehub API
16
+ * The OpenAPI definition for the Notehub.io API.
17
+ *
18
+ * The version of the OpenAPI document: 1.2.0
19
+ * Contact: engineering@blues.io
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The DataSetField model module.
28
+ * @module model/DataSetField
29
+ * @version 1.0.29-beta.2
30
+ */
31
+ var DataSetField = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>DataSetField</code>.
34
+ * @alias module:model/DataSetField
35
+ */
36
+ function DataSetField() {
37
+ _classCallCheck(this, DataSetField);
38
+ DataSetField.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(DataSetField, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>DataSetField</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/DataSetField} obj Optional instance to populate.
55
+ * @return {module:model/DataSetField} The populated <code>DataSetField</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new DataSetField();
62
+ if (data.hasOwnProperty('name')) {
63
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('datatype')) {
66
+ obj['datatype'] = _ApiClient["default"].convertToType(data['datatype'], 'Number');
67
+ }
68
+ if (data.hasOwnProperty('jsonata')) {
69
+ obj['jsonata'] = _ApiClient["default"].convertToType(data['jsonata'], 'String');
70
+ }
71
+ } else if (data === null) {
72
+ return null;
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>DataSetField</code>.
79
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
80
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>DataSetField</code>.
81
+ */
82
+ }, {
83
+ key: "validateJSON",
84
+ value: function validateJSON(data) {
85
+ // ensure the json data is a string
86
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
87
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
88
+ }
89
+ // ensure the json data is a string
90
+ if (data['jsonata'] && !(typeof data['jsonata'] === 'string' || data['jsonata'] instanceof String)) {
91
+ throw new Error("Expected the field `jsonata` to be a primitive type in the JSON string but got " + data['jsonata']);
92
+ }
93
+ return true;
94
+ }
95
+ }]);
96
+ }();
97
+ /**
98
+ * The name of the field
99
+ * @member {String} name
100
+ */
101
+ DataSetField.prototype['name'] = undefined;
102
+
103
+ /**
104
+ * The datatype of the field
105
+ * @member {module:model/DataSetField.DatatypeEnum} datatype
106
+ */
107
+ DataSetField.prototype['datatype'] = undefined;
108
+
109
+ /**
110
+ * the JSONata expression used to populate this field
111
+ * @member {String} jsonata
112
+ */
113
+ DataSetField.prototype['jsonata'] = undefined;
114
+
115
+ /**
116
+ * Allowed values for the <code>datatype</code> property.
117
+ * @enum {Number}
118
+ * @readonly
119
+ */
120
+ DataSetField['DatatypeEnum'] = {
121
+ /**
122
+ * value: 0
123
+ * @const
124
+ */
125
+ "0": 0,
126
+ /**
127
+ * value: 1
128
+ * @const
129
+ */
130
+ "1": 1,
131
+ /**
132
+ * value: 2
133
+ * @const
134
+ */
135
+ "2": 2
136
+ };
137
+ var _default = exports["default"] = DataSetField;
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
18
  * Notehub API
19
- * The OpenAPI definition for the Notehub.io API.
19
+ * The OpenAPI definition for the Notehub.io API.
20
20
  *
21
21
  * The version of the OpenAPI document: 1.2.0
22
22
  * Contact: engineering@blues.io
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The DeleteDeviceFleetsRequest model module.
31
31
  * @module model/DeleteDeviceFleetsRequest
32
- * @version 1.0.28
32
+ * @version 1.0.29-beta.2
33
33
  */
34
34
  var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
35
35
  /**
@@ -50,7 +50,7 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
50
50
  return _createClass(DeleteDeviceFleetsRequest, null, [{
51
51
  key: "initialize",
52
52
  value: function initialize(obj, fleetUids) {
53
- obj["fleet_uids"] = fleetUids;
53
+ obj['fleet_uids'] = fleetUids;
54
54
  }
55
55
 
56
56
  /**
@@ -65,8 +65,8 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
65
65
  value: function constructFromObject(data, obj) {
66
66
  if (data) {
67
67
  obj = obj || new DeleteDeviceFleetsRequest();
68
- if (data.hasOwnProperty("fleet_uids")) {
69
- obj["fleet_uids"] = _ApiClient["default"].convertToType(data["fleet_uids"], ["String"]);
68
+ if (data.hasOwnProperty('fleet_uids')) {
69
+ obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
70
70
  }
71
71
  } else if (data === null) {
72
72
  return null;
@@ -98,8 +98,8 @@ var DeleteDeviceFleetsRequest = /*#__PURE__*/function () {
98
98
  } finally {
99
99
  _iterator.f();
100
100
  }
101
- if (!Array.isArray(data["fleet_uids"])) {
102
- throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data["fleet_uids"]);
101
+ if (!Array.isArray(data['fleet_uids'])) {
102
+ throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
103
103
  }
104
104
  return true;
105
105
  }
@@ -111,5 +111,5 @@ DeleteDeviceFleetsRequest.RequiredProperties = ["fleet_uids"];
111
111
  * The fleetUIDs to remove from the device.
112
112
  * @member {Array.<String>} fleet_uids
113
113
  */
114
- DeleteDeviceFleetsRequest.prototype["fleet_uids"] = undefined;
114
+ DeleteDeviceFleetsRequest.prototype['fleet_uids'] = undefined;
115
115
  var _default = exports["default"] = DeleteDeviceFleetsRequest;
@@ -20,7 +20,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
20
20
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
21
21
  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); } /**
22
22
  * Notehub API
23
- * The OpenAPI definition for the Notehub.io API.
23
+ * The OpenAPI definition for the Notehub.io API.
24
24
  *
25
25
  * The version of the OpenAPI document: 1.2.0
26
26
  * Contact: engineering@blues.io
@@ -33,18 +33,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
33
33
  /**
34
34
  * The Device model module.
35
35
  * @module model/Device
36
- * @version 1.0.28
36
+ * @version 1.0.29-beta.2
37
37
  */
38
38
  var Device = /*#__PURE__*/function () {
39
39
  /**
40
40
  * Constructs a new <code>Device</code>.
41
41
  * @alias module:model/Device
42
- * @param uid {String}
43
- * @param provisioned {Date}
44
- * @param productUid {String}
45
- * @param fleetUids {Array.<String>}
46
- * @param voltage {Number}
47
- * @param temperature {Number}
42
+ * @param uid {String}
43
+ * @param provisioned {Date}
44
+ * @param productUid {String}
45
+ * @param fleetUids {Array.<String>}
46
+ * @param voltage {Number}
47
+ * @param temperature {Number}
48
48
  */
49
49
  function Device(uid, provisioned, productUid, fleetUids, voltage, temperature) {
50
50
  _classCallCheck(this, Device);
@@ -59,12 +59,12 @@ var Device = /*#__PURE__*/function () {
59
59
  return _createClass(Device, null, [{
60
60
  key: "initialize",
61
61
  value: function initialize(obj, uid, provisioned, productUid, fleetUids, voltage, temperature) {
62
- obj["uid"] = uid;
63
- obj["provisioned"] = provisioned;
64
- obj["product_uid"] = productUid;
65
- obj["fleet_uids"] = fleetUids;
66
- obj["voltage"] = voltage;
67
- obj["temperature"] = temperature;
62
+ obj['uid'] = uid;
63
+ obj['provisioned'] = provisioned;
64
+ obj['product_uid'] = productUid;
65
+ obj['fleet_uids'] = fleetUids;
66
+ obj['voltage'] = voltage;
67
+ obj['temperature'] = temperature;
68
68
  }
69
69
 
70
70
  /**
@@ -79,59 +79,59 @@ var Device = /*#__PURE__*/function () {
79
79
  value: function constructFromObject(data, obj) {
80
80
  if (data) {
81
81
  obj = obj || new Device();
82
- if (data.hasOwnProperty("uid")) {
83
- obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
82
+ if (data.hasOwnProperty('uid')) {
83
+ obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
84
84
  }
85
- if (data.hasOwnProperty("serial_number")) {
86
- obj["serial_number"] = _ApiClient["default"].convertToType(data["serial_number"], "String");
85
+ if (data.hasOwnProperty('serial_number')) {
86
+ obj['serial_number'] = _ApiClient["default"].convertToType(data['serial_number'], 'String');
87
87
  }
88
- if (data.hasOwnProperty("provisioned")) {
89
- obj["provisioned"] = _ApiClient["default"].convertToType(data["provisioned"], "Date");
88
+ if (data.hasOwnProperty('provisioned')) {
89
+ obj['provisioned'] = _ApiClient["default"].convertToType(data['provisioned'], 'Date');
90
90
  }
91
- if (data.hasOwnProperty("last_activity")) {
92
- obj["last_activity"] = _ApiClient["default"].convertToType(data["last_activity"], "Date");
91
+ if (data.hasOwnProperty('last_activity')) {
92
+ obj['last_activity'] = _ApiClient["default"].convertToType(data['last_activity'], 'Date');
93
93
  }
94
- if (data.hasOwnProperty("contact")) {
95
- obj["contact"] = _Contact["default"].constructFromObject(data["contact"]);
94
+ if (data.hasOwnProperty('contact')) {
95
+ obj['contact'] = _Contact["default"].constructFromObject(data['contact']);
96
96
  }
97
- if (data.hasOwnProperty("product_uid")) {
98
- obj["product_uid"] = _ApiClient["default"].convertToType(data["product_uid"], "String");
97
+ if (data.hasOwnProperty('product_uid')) {
98
+ obj['product_uid'] = _ApiClient["default"].convertToType(data['product_uid'], 'String');
99
99
  }
100
- if (data.hasOwnProperty("fleet_uids")) {
101
- obj["fleet_uids"] = _ApiClient["default"].convertToType(data["fleet_uids"], ["String"]);
100
+ if (data.hasOwnProperty('fleet_uids')) {
101
+ obj['fleet_uids'] = _ApiClient["default"].convertToType(data['fleet_uids'], ['String']);
102
102
  }
103
- if (data.hasOwnProperty("tower_info")) {
104
- obj["tower_info"] = _DeviceTowerInfo["default"].constructFromObject(data["tower_info"]);
103
+ if (data.hasOwnProperty('tower_info')) {
104
+ obj['tower_info'] = _DeviceTowerInfo["default"].constructFromObject(data['tower_info']);
105
105
  }
106
- if (data.hasOwnProperty("tower_location")) {
107
- obj["tower_location"] = _Location["default"].constructFromObject(data["tower_location"]);
106
+ if (data.hasOwnProperty('tower_location')) {
107
+ obj['tower_location'] = _Location["default"].constructFromObject(data['tower_location']);
108
108
  }
109
- if (data.hasOwnProperty("gps_location")) {
110
- obj["gps_location"] = _Location["default"].constructFromObject(data["gps_location"]);
109
+ if (data.hasOwnProperty('gps_location')) {
110
+ obj['gps_location'] = _Location["default"].constructFromObject(data['gps_location']);
111
111
  }
112
- if (data.hasOwnProperty("triangulated_location")) {
113
- obj["triangulated_location"] = _Location["default"].constructFromObject(data["triangulated_location"]);
112
+ if (data.hasOwnProperty('triangulated_location')) {
113
+ obj['triangulated_location'] = _Location["default"].constructFromObject(data['triangulated_location']);
114
114
  }
115
- if (data.hasOwnProperty("voltage")) {
116
- obj["voltage"] = _ApiClient["default"].convertToType(data["voltage"], "Number");
115
+ if (data.hasOwnProperty('voltage')) {
116
+ obj['voltage'] = _ApiClient["default"].convertToType(data['voltage'], 'Number');
117
117
  }
118
- if (data.hasOwnProperty("temperature")) {
119
- obj["temperature"] = _ApiClient["default"].convertToType(data["temperature"], "Number");
118
+ if (data.hasOwnProperty('temperature')) {
119
+ obj['temperature'] = _ApiClient["default"].convertToType(data['temperature'], 'Number');
120
120
  }
121
- if (data.hasOwnProperty("dfu")) {
122
- obj["dfu"] = _DFUEnv["default"].constructFromObject(data["dfu"]);
121
+ if (data.hasOwnProperty('dfu')) {
122
+ obj['dfu'] = _DFUEnv["default"].constructFromObject(data['dfu']);
123
123
  }
124
- if (data.hasOwnProperty("firmware_host")) {
125
- obj["firmware_host"] = _ApiClient["default"].convertToType(data["firmware_host"], "String");
124
+ if (data.hasOwnProperty('firmware_host')) {
125
+ obj['firmware_host'] = _ApiClient["default"].convertToType(data['firmware_host'], 'String');
126
126
  }
127
- if (data.hasOwnProperty("firmware_notecard")) {
128
- obj["firmware_notecard"] = _ApiClient["default"].convertToType(data["firmware_notecard"], "String");
127
+ if (data.hasOwnProperty('firmware_notecard')) {
128
+ obj['firmware_notecard'] = _ApiClient["default"].convertToType(data['firmware_notecard'], 'String');
129
129
  }
130
- if (data.hasOwnProperty("sku")) {
131
- obj["sku"] = _ApiClient["default"].convertToType(data["sku"], "String");
130
+ if (data.hasOwnProperty('sku')) {
131
+ obj['sku'] = _ApiClient["default"].convertToType(data['sku'], 'String');
132
132
  }
133
- if (data.hasOwnProperty("disabled")) {
134
- obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
133
+ if (data.hasOwnProperty('disabled')) {
134
+ obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
135
135
  }
136
136
  } else if (data === null) {
137
137
  return null;
@@ -163,62 +163,62 @@ var Device = /*#__PURE__*/function () {
163
163
  } finally {
164
164
  _iterator.f();
165
165
  }
166
- if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
167
- throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
166
+ if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
167
+ throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
168
168
  }
169
169
  // ensure the json data is a string
170
- if (data["serial_number"] && !(typeof data["serial_number"] === "string" || data["serial_number"] instanceof String)) {
171
- throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data["serial_number"]);
170
+ if (data['serial_number'] && !(typeof data['serial_number'] === 'string' || data['serial_number'] instanceof String)) {
171
+ throw new Error("Expected the field `serial_number` to be a primitive type in the JSON string but got " + data['serial_number']);
172
172
  }
173
173
  // validate the optional field `contact`
174
- if (data["contact"]) {
174
+ if (data['contact']) {
175
175
  // data not null
176
- _Contact["default"].validateJSON(data["contact"]);
176
+ _Contact["default"].validateJSON(data['contact']);
177
177
  }
178
178
  // ensure the json data is a string
179
- if (data["product_uid"] && !(typeof data["product_uid"] === "string" || data["product_uid"] instanceof String)) {
180
- throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data["product_uid"]);
179
+ if (data['product_uid'] && !(typeof data['product_uid'] === 'string' || data['product_uid'] instanceof String)) {
180
+ throw new Error("Expected the field `product_uid` to be a primitive type in the JSON string but got " + data['product_uid']);
181
181
  }
182
182
  // ensure the json data is an array
183
- if (!Array.isArray(data["fleet_uids"])) {
184
- throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data["fleet_uids"]);
183
+ if (!Array.isArray(data['fleet_uids'])) {
184
+ throw new Error("Expected the field `fleet_uids` to be an array in the JSON data but got " + data['fleet_uids']);
185
185
  }
186
186
  // validate the optional field `tower_info`
187
- if (data["tower_info"]) {
187
+ if (data['tower_info']) {
188
188
  // data not null
189
- _DeviceTowerInfo["default"].validateJSON(data["tower_info"]);
189
+ _DeviceTowerInfo["default"].validateJSON(data['tower_info']);
190
190
  }
191
191
  // validate the optional field `tower_location`
192
- if (data["tower_location"]) {
192
+ if (data['tower_location']) {
193
193
  // data not null
194
- _Location["default"].validateJSON(data["tower_location"]);
194
+ _Location["default"].validateJSON(data['tower_location']);
195
195
  }
196
196
  // validate the optional field `gps_location`
197
- if (data["gps_location"]) {
197
+ if (data['gps_location']) {
198
198
  // data not null
199
- _Location["default"].validateJSON(data["gps_location"]);
199
+ _Location["default"].validateJSON(data['gps_location']);
200
200
  }
201
201
  // validate the optional field `triangulated_location`
202
- if (data["triangulated_location"]) {
202
+ if (data['triangulated_location']) {
203
203
  // data not null
204
- _Location["default"].validateJSON(data["triangulated_location"]);
204
+ _Location["default"].validateJSON(data['triangulated_location']);
205
205
  }
206
206
  // validate the optional field `dfu`
207
- if (data["dfu"]) {
207
+ if (data['dfu']) {
208
208
  // data not null
209
- _DFUEnv["default"].validateJSON(data["dfu"]);
209
+ _DFUEnv["default"].validateJSON(data['dfu']);
210
210
  }
211
211
  // ensure the json data is a string
212
- if (data["firmware_host"] && !(typeof data["firmware_host"] === "string" || data["firmware_host"] instanceof String)) {
213
- throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data["firmware_host"]);
212
+ if (data['firmware_host'] && !(typeof data['firmware_host'] === 'string' || data['firmware_host'] instanceof String)) {
213
+ throw new Error("Expected the field `firmware_host` to be a primitive type in the JSON string but got " + data['firmware_host']);
214
214
  }
215
215
  // ensure the json data is a string
216
- if (data["firmware_notecard"] && !(typeof data["firmware_notecard"] === "string" || data["firmware_notecard"] instanceof String)) {
217
- throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data["firmware_notecard"]);
216
+ if (data['firmware_notecard'] && !(typeof data['firmware_notecard'] === 'string' || data['firmware_notecard'] instanceof String)) {
217
+ throw new Error("Expected the field `firmware_notecard` to be a primitive type in the JSON string but got " + data['firmware_notecard']);
218
218
  }
219
219
  // ensure the json data is a string
220
- if (data["sku"] && !(typeof data["sku"] === "string" || data["sku"] instanceof String)) {
221
- throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data["sku"]);
220
+ if (data['sku'] && !(typeof data['sku'] === 'string' || data['sku'] instanceof String)) {
221
+ throw new Error("Expected the field `sku` to be a primitive type in the JSON string but got " + data['sku']);
222
222
  }
223
223
  return true;
224
224
  }
@@ -229,90 +229,90 @@ Device.RequiredProperties = ["uid", "provisioned", "product_uid", "fleet_uids",
229
229
  /**
230
230
  * @member {String} uid
231
231
  */
232
- Device.prototype["uid"] = undefined;
232
+ Device.prototype['uid'] = undefined;
233
233
 
234
234
  /**
235
235
  * @member {String} serial_number
236
236
  */
237
- Device.prototype["serial_number"] = undefined;
237
+ Device.prototype['serial_number'] = undefined;
238
238
 
239
239
  /**
240
240
  * @member {Date} provisioned
241
241
  */
242
- Device.prototype["provisioned"] = undefined;
242
+ Device.prototype['provisioned'] = undefined;
243
243
 
244
244
  /**
245
245
  * @member {Date} last_activity
246
246
  */
247
- Device.prototype["last_activity"] = undefined;
247
+ Device.prototype['last_activity'] = undefined;
248
248
 
249
249
  /**
250
250
  * @member {module:model/Contact} contact
251
251
  */
252
- Device.prototype["contact"] = undefined;
252
+ Device.prototype['contact'] = undefined;
253
253
 
254
254
  /**
255
255
  * @member {String} product_uid
256
256
  */
257
- Device.prototype["product_uid"] = undefined;
257
+ Device.prototype['product_uid'] = undefined;
258
258
 
259
259
  /**
260
260
  * @member {Array.<String>} fleet_uids
261
261
  */
262
- Device.prototype["fleet_uids"] = undefined;
262
+ Device.prototype['fleet_uids'] = undefined;
263
263
 
264
264
  /**
265
265
  * @member {module:model/DeviceTowerInfo} tower_info
266
266
  */
267
- Device.prototype["tower_info"] = undefined;
267
+ Device.prototype['tower_info'] = undefined;
268
268
 
269
269
  /**
270
270
  * @member {module:model/Location} tower_location
271
271
  */
272
- Device.prototype["tower_location"] = undefined;
272
+ Device.prototype['tower_location'] = undefined;
273
273
 
274
274
  /**
275
275
  * @member {module:model/Location} gps_location
276
276
  */
277
- Device.prototype["gps_location"] = undefined;
277
+ Device.prototype['gps_location'] = undefined;
278
278
 
279
279
  /**
280
280
  * @member {module:model/Location} triangulated_location
281
281
  */
282
- Device.prototype["triangulated_location"] = undefined;
282
+ Device.prototype['triangulated_location'] = undefined;
283
283
 
284
284
  /**
285
285
  * @member {Number} voltage
286
286
  */
287
- Device.prototype["voltage"] = undefined;
287
+ Device.prototype['voltage'] = undefined;
288
288
 
289
289
  /**
290
290
  * @member {Number} temperature
291
291
  */
292
- Device.prototype["temperature"] = undefined;
292
+ Device.prototype['temperature'] = undefined;
293
293
 
294
294
  /**
295
295
  * @member {module:model/DFUEnv} dfu
296
296
  */
297
- Device.prototype["dfu"] = undefined;
297
+ Device.prototype['dfu'] = undefined;
298
298
 
299
299
  /**
300
300
  * @member {String} firmware_host
301
301
  */
302
- Device.prototype["firmware_host"] = undefined;
302
+ Device.prototype['firmware_host'] = undefined;
303
303
 
304
304
  /**
305
305
  * @member {String} firmware_notecard
306
306
  */
307
- Device.prototype["firmware_notecard"] = undefined;
307
+ Device.prototype['firmware_notecard'] = undefined;
308
308
 
309
309
  /**
310
310
  * @member {String} sku
311
311
  */
312
- Device.prototype["sku"] = undefined;
312
+ Device.prototype['sku'] = undefined;
313
313
 
314
314
  /**
315
315
  * @member {Boolean} disabled
316
316
  */
317
- Device.prototype["disabled"] = undefined;
317
+ Device.prototype['disabled'] = undefined;
318
318
  var _default = exports["default"] = Device;
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
20
  * Notehub API
21
- * The OpenAPI definition for the Notehub.io API.
21
+ * The OpenAPI definition for the Notehub.io API.
22
22
  *
23
23
  * The version of the OpenAPI document: 1.2.0
24
24
  * Contact: engineering@blues.io
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
31
31
  /**
32
32
  * The DeviceDfuHistory model module.
33
33
  * @module model/DeviceDfuHistory
34
- * @version 1.0.28
34
+ * @version 1.0.29-beta.2
35
35
  */
36
36
  var DeviceDfuHistory = /*#__PURE__*/function () {
37
37
  /**
@@ -64,14 +64,14 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
64
64
  value: function constructFromObject(data, obj) {
65
65
  if (data) {
66
66
  obj = obj || new DeviceDfuHistory();
67
- if (data.hasOwnProperty("device_uid")) {
68
- obj["device_uid"] = _ApiClient["default"].convertToType(data["device_uid"], "String");
67
+ if (data.hasOwnProperty('device_uid')) {
68
+ obj['device_uid'] = _ApiClient["default"].convertToType(data['device_uid'], 'String');
69
69
  }
70
- if (data.hasOwnProperty("current")) {
71
- obj["current"] = _DeviceDfuStatusCurrent["default"].constructFromObject(data["current"]);
70
+ if (data.hasOwnProperty('current')) {
71
+ obj['current'] = _DeviceDfuStatusCurrent["default"].constructFromObject(data['current']);
72
72
  }
73
- if (data.hasOwnProperty("history")) {
74
- obj["history"] = _ApiClient["default"].convertToType(data["history"], [_DeviceDfuStateMachine["default"]]);
73
+ if (data.hasOwnProperty('history')) {
74
+ obj['history'] = _ApiClient["default"].convertToType(data['history'], [_DeviceDfuStateMachine["default"]]);
75
75
  }
76
76
  } else if (data === null) {
77
77
  return null;
@@ -88,22 +88,22 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
88
88
  key: "validateJSON",
89
89
  value: function validateJSON(data) {
90
90
  // ensure the json data is a string
91
- if (data["device_uid"] && !(typeof data["device_uid"] === "string" || data["device_uid"] instanceof String)) {
92
- throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data["device_uid"]);
91
+ if (data['device_uid'] && !(typeof data['device_uid'] === 'string' || data['device_uid'] instanceof String)) {
92
+ throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data['device_uid']);
93
93
  }
94
94
  // validate the optional field `current`
95
- if (data["current"]) {
95
+ if (data['current']) {
96
96
  // data not null
97
- _DeviceDfuStatusCurrent["default"].validateJSON(data["current"]);
97
+ _DeviceDfuStatusCurrent["default"].validateJSON(data['current']);
98
98
  }
99
- if (data["history"]) {
99
+ if (data['history']) {
100
100
  // data not null
101
101
  // ensure the json data is an array
102
- if (!Array.isArray(data["history"])) {
103
- throw new Error("Expected the field `history` to be an array in the JSON data but got " + data["history"]);
102
+ if (!Array.isArray(data['history'])) {
103
+ throw new Error("Expected the field `history` to be an array in the JSON data but got " + data['history']);
104
104
  }
105
105
  // validate the optional field `history` (array)
106
- var _iterator = _createForOfIteratorHelper(data["history"]),
106
+ var _iterator = _createForOfIteratorHelper(data['history']),
107
107
  _step;
108
108
  try {
109
109
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -115,6 +115,7 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
115
115
  } finally {
116
116
  _iterator.f();
117
117
  }
118
+ ;
118
119
  }
119
120
  return true;
120
121
  }
@@ -124,15 +125,15 @@ var DeviceDfuHistory = /*#__PURE__*/function () {
124
125
  * Device UID
125
126
  * @member {String} device_uid
126
127
  */
127
- DeviceDfuHistory.prototype["device_uid"] = undefined;
128
+ DeviceDfuHistory.prototype['device_uid'] = undefined;
128
129
 
129
130
  /**
130
131
  * @member {module:model/DeviceDfuStatusCurrent} current
131
132
  */
132
- DeviceDfuHistory.prototype["current"] = undefined;
133
+ DeviceDfuHistory.prototype['current'] = undefined;
133
134
 
134
135
  /**
135
136
  * @member {Array.<module:model/DeviceDfuStateMachine>} history
136
137
  */
137
- DeviceDfuHistory.prototype["history"] = undefined;
138
+ DeviceDfuHistory.prototype['history'] = undefined;
138
139
  var _default = exports["default"] = DeviceDfuHistory;