@blues-inc/notehub-js 2.2.0-beta.29 → 2.2.0-beta.30

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 (144) hide show
  1. package/README.md +62 -65
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AlertApi.js +1 -1
  4. package/dist/api/AuthorizationApi.js +1 -1
  5. package/dist/api/BillingAccountApi.js +1 -1
  6. package/dist/api/DeviceApi.js +773 -773
  7. package/dist/api/EventApi.js +83 -83
  8. package/dist/api/ExternalDevicesApi.js +1 -1
  9. package/dist/api/MonitorApi.js +1 -1
  10. package/dist/api/ProjectApi.js +282 -282
  11. package/dist/api/RouteApi.js +10 -10
  12. package/dist/api/UsageApi.js +8 -8
  13. package/dist/api/WebhookApi.js +1 -1
  14. package/dist/index.js +135 -156
  15. package/dist/model/Alert.js +1 -1
  16. package/dist/model/AlertDataInner.js +1 -1
  17. package/dist/model/AlertNotificationsInner.js +1 -1
  18. package/dist/model/{AwsRoute.js → Aws.js} +45 -39
  19. package/dist/model/{Filter.js → AwsFilter.js} +47 -25
  20. package/dist/model/AwsTransform.js +148 -0
  21. package/dist/model/{AzureRoute.js → Azure.js} +40 -34
  22. package/dist/model/BillingAccount.js +1 -1
  23. package/dist/model/Body.js +1 -1
  24. package/dist/model/CellularPlan.js +1 -1
  25. package/dist/model/CloneProjectRequest.js +1 -1
  26. package/dist/model/Contact.js +1 -1
  27. package/dist/model/CreateFleetRequest.js +1 -15
  28. package/dist/model/CreateMonitor.js +1 -1
  29. package/dist/model/CreateProductRequest.js +1 -1
  30. package/dist/model/CreateProjectRequest.js +1 -1
  31. package/dist/model/CreateUpdateRepository.js +1 -1
  32. package/dist/model/CurrentFirmware.js +1 -1
  33. package/dist/model/DFUEnv.js +1 -1
  34. package/dist/model/DFUState.js +1 -1
  35. package/dist/model/DataField.js +1 -1
  36. package/dist/model/DataSetField.js +1 -1
  37. package/dist/model/DataUsage.js +1 -1
  38. package/dist/model/{DeleteDeviceFromFleetsRequest.js → DeleteDeviceFleetsRequest.js} +20 -20
  39. package/dist/model/Device.js +1 -1
  40. package/dist/model/DeviceDfuHistory.js +1 -1
  41. package/dist/model/DeviceDfuHistoryCurrent.js +1 -1
  42. package/dist/model/DeviceDfuHistoryPage.js +1 -1
  43. package/dist/model/DeviceDfuStateMachine.js +1 -1
  44. package/dist/model/DeviceDfuStateMachineNode.js +1 -1
  45. package/dist/model/DeviceDfuStatus.js +1 -1
  46. package/dist/model/DeviceDfuStatusPage.js +1 -1
  47. package/dist/model/DeviceSession.js +1 -1
  48. package/dist/model/DeviceTowerInfo.js +1 -1
  49. package/dist/model/DeviceUsage.js +1 -1
  50. package/dist/model/DfuActionRequest.js +1 -1
  51. package/dist/model/EmailNotification.js +1 -1
  52. package/dist/model/EnvTreeJsonNode.js +1 -1
  53. package/dist/model/EnvVar.js +1 -1
  54. package/dist/model/EnvironmentVariables.js +1 -1
  55. package/dist/model/Error.js +1 -1
  56. package/dist/model/Event.js +1 -1
  57. package/dist/model/Firmware.js +1 -1
  58. package/dist/model/FirmwareInfo.js +1 -1
  59. package/dist/model/Fleet.js +2 -16
  60. package/dist/model/GetAlerts200Response.js +1 -1
  61. package/dist/model/GetBillingAccounts200Response.js +1 -1
  62. package/dist/model/GetDataUsage200Response.js +1 -1
  63. package/dist/model/GetDataUsage200ResponseDataInner.js +1 -1
  64. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +1 -1
  65. package/dist/model/GetDeviceFleets200Response.js +1 -1
  66. package/dist/model/GetDeviceHealthLog200Response.js +1 -1
  67. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
  68. package/dist/model/{GetDeviceLatestEvents200Response.js → GetDeviceLatest200Response.js} +18 -18
  69. package/dist/model/GetDevicePlans200Response.js +1 -1
  70. package/dist/model/GetDevicePublicKey200Response.js +1 -1
  71. package/dist/model/GetDeviceSessions200Response.js +1 -1
  72. package/dist/model/GetProducts200Response.js +1 -1
  73. package/dist/model/{GetDevicePublicKeys200Response.js → GetProjectDevicePublicKeys200Response.js} +26 -26
  74. package/dist/model/{GetDevicePublicKeys200ResponseDevicePublicKeysInner.js → GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js} +19 -19
  75. package/dist/model/{GetDevices200Response.js → GetProjectDevices200Response.js} +21 -21
  76. package/dist/model/{GetEvents200Response.js → GetProjectEvents200Response.js} +22 -22
  77. package/dist/model/{GetEventsByCursor200Response.js → GetProjectEventsByCursor200Response.js} +22 -22
  78. package/dist/model/GetProjectMembers200Response.js +1 -1
  79. package/dist/model/GetProjects200Response.js +1 -1
  80. package/dist/model/GetSessionsUsage200Response.js +1 -1
  81. package/dist/model/GetWebhooks200Response.js +1 -1
  82. package/dist/model/{GoogleRoute.js → Google.js} +37 -32
  83. package/dist/model/{GetNotefile200Response.js → HandleNoteChanges200Response.js} +20 -20
  84. package/dist/model/{GetDbNote200Response.js → HandleNoteGet200Response.js} +20 -20
  85. package/dist/model/{SignalDevice200Response.js → HandleNoteSignal200Response.js} +18 -18
  86. package/dist/model/HandleNotefileChanges200Response.js +106 -0
  87. package/dist/model/{ListPendingNotefiles200Response.js → HandleNotefileChangesPending200Response.js} +21 -21
  88. package/dist/model/{DeleteNotefilesRequest.js → HandleNotefileDeleteRequest.js} +19 -19
  89. package/dist/model/{HttpRoute.js → Http.js} +40 -34
  90. package/dist/model/Location.js +1 -1
  91. package/dist/model/Login200Response.js +1 -1
  92. package/dist/model/LoginRequest.js +1 -1
  93. package/dist/model/Monitor.js +1 -1
  94. package/dist/model/MonitorAlertRoutesInner.js +1 -1
  95. package/dist/model/{MqttRoute.js → Mqtt.js} +50 -45
  96. package/dist/model/Note.js +10 -90
  97. package/dist/model/NotefileSchema.js +1 -1
  98. package/dist/model/NotehubRoute.js +134 -214
  99. package/dist/model/NotehubRouteSchema.js +505 -0
  100. package/dist/model/OAuth2Error.js +1 -1
  101. package/dist/model/OAuth2TokenResponse.js +1 -1
  102. package/dist/model/PersonalAccessToken.js +1 -1
  103. package/dist/model/PersonalAccessTokenCreatedBy.js +1 -1
  104. package/dist/model/PersonalAccessTokenInfo.js +1 -1
  105. package/dist/model/PersonalAccessTokenSecret.js +1 -1
  106. package/dist/model/{ProvisionDeviceRequest.js → PostProvisionProjectDeviceRequest.js} +22 -22
  107. package/dist/model/Product.js +1 -1
  108. package/dist/model/Project.js +1 -1
  109. package/dist/model/ProjectMember.js +1 -1
  110. package/dist/model/{ProxyRoute.js → Proxy.js} +26 -22
  111. package/dist/model/{AddDeviceToFleetsRequest.js → PutDeviceFleetsRequest.js} +20 -20
  112. package/dist/model/{RadRoute.js → Radresponder.js} +26 -38
  113. package/dist/model/Repository.js +1 -1
  114. package/dist/model/RouteLog.js +1 -1
  115. package/dist/model/SatellitePlan.js +1 -1
  116. package/dist/model/SchemaProperty.js +1 -1
  117. package/dist/model/SimUsage.js +1 -1
  118. package/dist/model/{SlackRoute.js → Slack.js} +58 -35
  119. package/dist/model/SlackBearerNotification.js +1 -1
  120. package/dist/model/{RouteTransformSettings.js → SlackTransform.js} +22 -22
  121. package/dist/model/SlackWebHookNotification.js +1 -1
  122. package/dist/model/{SnowflakeRoute.js → Snowflake.js} +41 -34
  123. package/dist/model/{ThingworxRoute.js → Thingworx.js} +37 -32
  124. package/dist/model/TowerLocation.js +1 -1
  125. package/dist/model/{TwilioRoute.js → Twilio.js} +39 -30
  126. package/dist/model/UpdateFleetRequest.js +1 -15
  127. package/dist/model/UploadMetadata.js +1 -1
  128. package/dist/model/UsageData.js +1 -1
  129. package/dist/model/UsageEventsData.js +7 -20
  130. package/dist/model/UsageEventsResponse.js +1 -1
  131. package/dist/model/UsageRouteLogsData.js +2 -2
  132. package/dist/model/UsageSessionsData.js +1 -1
  133. package/dist/model/{NotehubRouteSummary.js → UserDbRoute.js} +29 -24
  134. package/dist/model/UserDfuStateMachine.js +1 -1
  135. package/dist/model/UserDfuStateMachineStatus.js +1 -1
  136. package/dist/model/UserFirmwareInfo.js +1 -1
  137. package/dist/model/WebhookSettings.js +1 -1
  138. package/package.json +1 -1
  139. package/dist/model/BlynkRoute.js +0 -147
  140. package/dist/model/DatacakeRoute.js +0 -165
  141. package/dist/model/FleetConnectivityAssurance.js +0 -111
  142. package/dist/model/Notefile.js +0 -147
  143. package/dist/model/QubitroRoute.js +0 -159
  144. package/dist/model/S3ArchiveRoute.js +0 -271
@@ -7,9 +7,6 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
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 _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
10
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
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); } }
15
12
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
@@ -29,19 +26,16 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
26
  /**
30
27
  * The Note model module.
31
28
  * @module model/Note
32
- * @version 2.2.0-beta.29
29
+ * @version 2.2.0-beta.30
33
30
  */
34
31
  var Note = /*#__PURE__*/function () {
35
32
  /**
36
33
  * Constructs a new <code>Note</code>.
37
34
  * @alias module:model/Note
38
- * @param body {Object.<String, Object>} Arbitrary user-defined JSON for the note.
39
- * @param id {String} Note name/identifier (e.g., \"1:435\", \"my_note\").
40
- * @param time {Number} Unix epoch seconds.
41
35
  */
42
- function Note(body, id, time) {
36
+ function Note() {
43
37
  _classCallCheck(this, Note);
44
- Note.initialize(this, body, id, time);
38
+ Note.initialize(this);
45
39
  }
46
40
 
47
41
  /**
@@ -51,11 +45,7 @@ var Note = /*#__PURE__*/function () {
51
45
  */
52
46
  return _createClass(Note, null, [{
53
47
  key: "initialize",
54
- value: function initialize(obj, body, id, time) {
55
- obj['body'] = body;
56
- obj['id'] = id;
57
- obj['time'] = time;
58
- }
48
+ value: function initialize(obj) {}
59
49
 
60
50
  /**
61
51
  * Constructs a <code>Note</code> from a plain JavaScript object, optionally creating a new instance.
@@ -70,27 +60,10 @@ var Note = /*#__PURE__*/function () {
70
60
  if (data) {
71
61
  obj = obj || new Note();
72
62
  if (data.hasOwnProperty('body')) {
73
- obj['body'] = _ApiClient["default"].convertToType(data['body'], {
74
- 'String': Object
75
- });
76
- }
77
- if (data.hasOwnProperty('edge')) {
78
- obj['edge'] = _ApiClient["default"].convertToType(data['edge'], 'Boolean');
79
- }
80
- if (data.hasOwnProperty('id')) {
81
- obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
63
+ obj['body'] = _ApiClient["default"].convertToType(data['body'], Object);
82
64
  }
83
65
  if (data.hasOwnProperty('payload')) {
84
- obj['payload'] = _ApiClient["default"].convertToType(data['payload'], 'Blob');
85
- }
86
- if (data.hasOwnProperty('pending')) {
87
- obj['pending'] = _ApiClient["default"].convertToType(data['pending'], 'Boolean');
88
- }
89
- if (data.hasOwnProperty('time')) {
90
- obj['time'] = _ApiClient["default"].convertToType(data['time'], 'Number');
91
- }
92
- if (data.hasOwnProperty('where')) {
93
- obj['where'] = _ApiClient["default"].convertToType(data['where'], 'String');
66
+ obj['payload'] = _ApiClient["default"].convertToType(data['payload'], 'String');
94
67
  }
95
68
  } else if (data === null) {
96
69
  return null;
@@ -106,74 +79,21 @@ var Note = /*#__PURE__*/function () {
106
79
  }, {
107
80
  key: "validateJSON",
108
81
  value: function validateJSON(data) {
109
- // check to make sure all required properties are present in the JSON string
110
- var _iterator = _createForOfIteratorHelper(Note.RequiredProperties),
111
- _step;
112
- try {
113
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
114
- var property = _step.value;
115
- if (!data[property]) {
116
- throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
117
- }
118
- }
119
- // ensure the json data is a string
120
- } catch (err) {
121
- _iterator.e(err);
122
- } finally {
123
- _iterator.f();
124
- }
125
- if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
126
- throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
127
- }
128
82
  // ensure the json data is a string
129
- if (data['where'] && !(typeof data['where'] === 'string' || data['where'] instanceof String)) {
130
- throw new Error("Expected the field `where` to be a primitive type in the JSON string but got " + data['where']);
83
+ if (data['payload'] && !(typeof data['payload'] === 'string' || data['payload'] instanceof String)) {
84
+ throw new Error("Expected the field `payload` to be a primitive type in the JSON string but got " + data['payload']);
131
85
  }
132
86
  return true;
133
87
  }
134
88
  }]);
135
89
  }();
136
- Note.RequiredProperties = ["body", "id", "time"];
137
-
138
90
  /**
139
- * Arbitrary user-defined JSON for the note.
140
- * @member {Object.<String, Object>} body
91
+ * @member {Object} body
141
92
  */
142
93
  Note.prototype['body'] = undefined;
143
94
 
144
95
  /**
145
- * True if originated from an edge source.
146
- * @member {Boolean} edge
147
- */
148
- Note.prototype['edge'] = undefined;
149
-
150
- /**
151
- * Note name/identifier (e.g., \"1:435\", \"my_note\").
152
- * @member {String} id
153
- */
154
- Note.prototype['id'] = undefined;
155
-
156
- /**
157
- * Optional base64-encoded payload.
158
- * @member {Blob} payload
96
+ * @member {String} payload
159
97
  */
160
98
  Note.prototype['payload'] = undefined;
161
-
162
- /**
163
- * True if the note is pending delivery or processing.
164
- * @member {Boolean} pending
165
- */
166
- Note.prototype['pending'] = undefined;
167
-
168
- /**
169
- * Unix epoch seconds.
170
- * @member {Number} time
171
- */
172
- Note.prototype['time'] = undefined;
173
-
174
- /**
175
- * Optional location/metadata string.
176
- * @member {String} where
177
- */
178
- Note.prototype['where'] = undefined;
179
99
  var _default = exports["default"] = Note;
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
30
  /**
31
31
  * The NotefileSchema model module.
32
32
  * @module model/NotefileSchema
33
- * @version 2.2.0-beta.29
33
+ * @version 2.2.0-beta.30
34
34
  */
35
35
  var NotefileSchema = /*#__PURE__*/function () {
36
36
  /**
@@ -5,21 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _AwsRoute = _interopRequireDefault(require("./AwsRoute"));
9
- var _AzureRoute = _interopRequireDefault(require("./AzureRoute"));
10
- var _BlynkRoute = _interopRequireDefault(require("./BlynkRoute"));
11
- var _DatacakeRoute = _interopRequireDefault(require("./DatacakeRoute"));
12
- var _GoogleRoute = _interopRequireDefault(require("./GoogleRoute"));
13
- var _HttpRoute = _interopRequireDefault(require("./HttpRoute"));
14
- var _MqttRoute = _interopRequireDefault(require("./MqttRoute"));
15
- var _ProxyRoute = _interopRequireDefault(require("./ProxyRoute"));
16
- var _QubitroRoute = _interopRequireDefault(require("./QubitroRoute"));
17
- var _RadRoute = _interopRequireDefault(require("./RadRoute"));
18
- var _S3ArchiveRoute = _interopRequireDefault(require("./S3ArchiveRoute"));
19
- var _SlackRoute = _interopRequireDefault(require("./SlackRoute"));
20
- var _SnowflakeRoute = _interopRequireDefault(require("./SnowflakeRoute"));
21
- var _ThingworxRoute = _interopRequireDefault(require("./ThingworxRoute"));
22
- var _TwilioRoute = _interopRequireDefault(require("./TwilioRoute"));
8
+ var _NotehubRouteSchema = _interopRequireDefault(require("./NotehubRouteSchema"));
23
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
24
10
  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); }
25
11
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -41,12 +27,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
41
27
  /**
42
28
  * The NotehubRoute model module.
43
29
  * @module model/NotehubRoute
44
- * @version 2.2.0-beta.29
30
+ * @version 2.2.0-beta.30
45
31
  */
46
32
  var NotehubRoute = /*#__PURE__*/function () {
47
33
  /**
48
34
  * Constructs a new <code>NotehubRoute</code>.
49
- * Route resource as stored/returned by the server.
50
35
  * @alias module:model/NotehubRoute
51
36
  */
52
37
  function NotehubRoute() {
@@ -75,62 +60,20 @@ var NotehubRoute = /*#__PURE__*/function () {
75
60
  value: function constructFromObject(data, obj) {
76
61
  if (data) {
77
62
  obj = obj || new NotehubRoute();
78
- if (data.hasOwnProperty('aws')) {
79
- obj['aws'] = _AwsRoute["default"].constructFromObject(data['aws']);
80
- }
81
- if (data.hasOwnProperty('azure')) {
82
- obj['azure'] = _AzureRoute["default"].constructFromObject(data['azure']);
83
- }
84
- if (data.hasOwnProperty('blynk')) {
85
- obj['blynk'] = _BlynkRoute["default"].constructFromObject(data['blynk']);
86
- }
87
- if (data.hasOwnProperty('datacake')) {
88
- obj['datacake'] = _DatacakeRoute["default"].constructFromObject(data['datacake']);
89
- }
90
63
  if (data.hasOwnProperty('disabled')) {
91
64
  obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
92
65
  }
93
- if (data.hasOwnProperty('google')) {
94
- obj['google'] = _GoogleRoute["default"].constructFromObject(data['google']);
95
- }
96
- if (data.hasOwnProperty('http')) {
97
- obj['http'] = _HttpRoute["default"].constructFromObject(data['http']);
98
- }
99
66
  if (data.hasOwnProperty('label')) {
100
67
  obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
101
68
  }
102
69
  if (data.hasOwnProperty('modified')) {
103
- obj['modified'] = _ApiClient["default"].convertToType(data['modified'], 'Date');
104
- }
105
- if (data.hasOwnProperty('mqtt')) {
106
- obj['mqtt'] = _MqttRoute["default"].constructFromObject(data['mqtt']);
107
- }
108
- if (data.hasOwnProperty('proxy')) {
109
- obj['proxy'] = _ProxyRoute["default"].constructFromObject(data['proxy']);
70
+ obj['modified'] = _ApiClient["default"].convertToType(data['modified'], 'String');
110
71
  }
111
- if (data.hasOwnProperty('qubitro')) {
112
- obj['qubitro'] = _QubitroRoute["default"].constructFromObject(data['qubitro']);
72
+ if (data.hasOwnProperty('route_type')) {
73
+ obj['route_type'] = _ApiClient["default"].convertToType(data['route_type'], 'String');
113
74
  }
114
- if (data.hasOwnProperty('radnote')) {
115
- obj['radnote'] = _RadRoute["default"].constructFromObject(data['radnote']);
116
- }
117
- if (data.hasOwnProperty('s3archive')) {
118
- obj['s3archive'] = _S3ArchiveRoute["default"].constructFromObject(data['s3archive']);
119
- }
120
- if (data.hasOwnProperty('slack')) {
121
- obj['slack'] = _SlackRoute["default"].constructFromObject(data['slack']);
122
- }
123
- if (data.hasOwnProperty('snowflake')) {
124
- obj['snowflake'] = _SnowflakeRoute["default"].constructFromObject(data['snowflake']);
125
- }
126
- if (data.hasOwnProperty('thingworx')) {
127
- obj['thingworx'] = _ThingworxRoute["default"].constructFromObject(data['thingworx']);
128
- }
129
- if (data.hasOwnProperty('twilio')) {
130
- obj['twilio'] = _TwilioRoute["default"].constructFromObject(data['twilio']);
131
- }
132
- if (data.hasOwnProperty('type')) {
133
- obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
75
+ if (data.hasOwnProperty('schema')) {
76
+ obj['schema'] = _NotehubRouteSchema["default"].constructFromObject(data['schema']);
134
77
  }
135
78
  if (data.hasOwnProperty('uid')) {
136
79
  obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
@@ -149,88 +92,22 @@ var NotehubRoute = /*#__PURE__*/function () {
149
92
  }, {
150
93
  key: "validateJSON",
151
94
  value: function validateJSON(data) {
152
- // validate the optional field `aws`
153
- if (data['aws']) {
154
- // data not null
155
- _AwsRoute["default"].validateJSON(data['aws']);
156
- }
157
- // validate the optional field `azure`
158
- if (data['azure']) {
159
- // data not null
160
- _AzureRoute["default"].validateJSON(data['azure']);
161
- }
162
- // validate the optional field `blynk`
163
- if (data['blynk']) {
164
- // data not null
165
- _BlynkRoute["default"].validateJSON(data['blynk']);
166
- }
167
- // validate the optional field `datacake`
168
- if (data['datacake']) {
169
- // data not null
170
- _DatacakeRoute["default"].validateJSON(data['datacake']);
171
- }
172
- // validate the optional field `google`
173
- if (data['google']) {
174
- // data not null
175
- _GoogleRoute["default"].validateJSON(data['google']);
176
- }
177
- // validate the optional field `http`
178
- if (data['http']) {
179
- // data not null
180
- _HttpRoute["default"].validateJSON(data['http']);
181
- }
182
95
  // ensure the json data is a string
183
96
  if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
184
97
  throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
185
98
  }
186
- // validate the optional field `mqtt`
187
- if (data['mqtt']) {
188
- // data not null
189
- _MqttRoute["default"].validateJSON(data['mqtt']);
190
- }
191
- // validate the optional field `proxy`
192
- if (data['proxy']) {
193
- // data not null
194
- _ProxyRoute["default"].validateJSON(data['proxy']);
195
- }
196
- // validate the optional field `qubitro`
197
- if (data['qubitro']) {
198
- // data not null
199
- _QubitroRoute["default"].validateJSON(data['qubitro']);
200
- }
201
- // validate the optional field `radnote`
202
- if (data['radnote']) {
203
- // data not null
204
- _RadRoute["default"].validateJSON(data['radnote']);
205
- }
206
- // validate the optional field `s3archive`
207
- if (data['s3archive']) {
208
- // data not null
209
- _S3ArchiveRoute["default"].validateJSON(data['s3archive']);
210
- }
211
- // validate the optional field `slack`
212
- if (data['slack']) {
213
- // data not null
214
- _SlackRoute["default"].validateJSON(data['slack']);
215
- }
216
- // validate the optional field `snowflake`
217
- if (data['snowflake']) {
218
- // data not null
219
- _SnowflakeRoute["default"].validateJSON(data['snowflake']);
99
+ // ensure the json data is a string
100
+ if (data['modified'] && !(typeof data['modified'] === 'string' || data['modified'] instanceof String)) {
101
+ throw new Error("Expected the field `modified` to be a primitive type in the JSON string but got " + data['modified']);
220
102
  }
221
- // validate the optional field `thingworx`
222
- if (data['thingworx']) {
223
- // data not null
224
- _ThingworxRoute["default"].validateJSON(data['thingworx']);
103
+ // ensure the json data is a string
104
+ if (data['route_type'] && !(typeof data['route_type'] === 'string' || data['route_type'] instanceof String)) {
105
+ throw new Error("Expected the field `route_type` to be a primitive type in the JSON string but got " + data['route_type']);
225
106
  }
226
- // validate the optional field `twilio`
227
- if (data['twilio']) {
107
+ // validate the optional field `schema`
108
+ if (data['schema']) {
228
109
  // data not null
229
- _TwilioRoute["default"].validateJSON(data['twilio']);
230
- }
231
- // ensure the json data is a string
232
- if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
233
- throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
110
+ _NotehubRouteSchema["default"].validateJSON(data['schema']);
234
111
  }
235
112
  // ensure the json data is a string
236
113
  if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
@@ -241,104 +118,147 @@ var NotehubRoute = /*#__PURE__*/function () {
241
118
  }]);
242
119
  }();
243
120
  /**
244
- * @member {module:model/AwsRoute} aws
245
- */
246
- NotehubRoute.prototype['aws'] = undefined;
247
-
248
- /**
249
- * @member {module:model/AzureRoute} azure
250
- */
251
- NotehubRoute.prototype['azure'] = undefined;
252
-
253
- /**
254
- * @member {module:model/BlynkRoute} blynk
255
- */
256
- NotehubRoute.prototype['blynk'] = undefined;
257
-
258
- /**
259
- * @member {module:model/DatacakeRoute} datacake
260
- */
261
- NotehubRoute.prototype['datacake'] = undefined;
262
-
263
- /**
121
+ * Is route disabled?
264
122
  * @member {Boolean} disabled
265
123
  * @default false
266
124
  */
267
125
  NotehubRoute.prototype['disabled'] = false;
268
126
 
269
127
  /**
270
- * @member {module:model/GoogleRoute} google
271
- */
272
- NotehubRoute.prototype['google'] = undefined;
273
-
274
- /**
275
- * @member {module:model/HttpRoute} http
276
- */
277
- NotehubRoute.prototype['http'] = undefined;
278
-
279
- /**
128
+ * Route Label
280
129
  * @member {String} label
281
130
  */
282
131
  NotehubRoute.prototype['label'] = undefined;
283
132
 
284
133
  /**
285
- * @member {Date} modified
134
+ * Last Modified
135
+ * @member {String} modified
286
136
  */
287
137
  NotehubRoute.prototype['modified'] = undefined;
288
138
 
289
139
  /**
290
- * @member {module:model/MqttRoute} mqtt
140
+ * Type of route.
141
+ * @member {module:model/NotehubRoute.RouteTypeEnum} route_type
142
+ * @default 'http'
291
143
  */
292
- NotehubRoute.prototype['mqtt'] = undefined;
144
+ NotehubRoute.prototype['route_type'] = 'http';
293
145
 
294
146
  /**
295
- * @member {module:model/ProxyRoute} proxy
147
+ * @member {module:model/NotehubRouteSchema} schema
296
148
  */
297
- NotehubRoute.prototype['proxy'] = undefined;
149
+ NotehubRoute.prototype['schema'] = undefined;
298
150
 
299
151
  /**
300
- * @member {module:model/QubitroRoute} qubitro
301
- */
302
- NotehubRoute.prototype['qubitro'] = undefined;
303
-
304
- /**
305
- * @member {module:model/RadRoute} radnote
306
- */
307
- NotehubRoute.prototype['radnote'] = undefined;
308
-
309
- /**
310
- * @member {module:model/S3ArchiveRoute} s3archive
311
- */
312
- NotehubRoute.prototype['s3archive'] = undefined;
313
-
314
- /**
315
- * @member {module:model/SlackRoute} slack
316
- */
317
- NotehubRoute.prototype['slack'] = undefined;
318
-
319
- /**
320
- * @member {module:model/SnowflakeRoute} snowflake
321
- */
322
- NotehubRoute.prototype['snowflake'] = undefined;
323
-
324
- /**
325
- * @member {module:model/ThingworxRoute} thingworx
326
- */
327
- NotehubRoute.prototype['thingworx'] = undefined;
328
-
329
- /**
330
- * @member {module:model/TwilioRoute} twilio
331
- */
332
- NotehubRoute.prototype['twilio'] = undefined;
333
-
334
- /**
335
- * Mirrors hublib.RouteType.
336
- * @member {String} type
152
+ * Route UID
153
+ * @member {String} uid
337
154
  */
338
- NotehubRoute.prototype['type'] = undefined;
155
+ NotehubRoute.prototype['uid'] = undefined;
339
156
 
340
157
  /**
341
- * @member {String} uid
158
+ * Allowed values for the <code>route_type</code> property.
159
+ * @enum {String}
160
+ * @readonly
342
161
  */
343
- NotehubRoute.prototype['uid'] = undefined;
162
+ NotehubRoute['RouteTypeEnum'] = {
163
+ /**
164
+ * value: "http"
165
+ * @const
166
+ */
167
+ "http": "http",
168
+ /**
169
+ * value: "proxy"
170
+ * @const
171
+ */
172
+ "proxy": "proxy",
173
+ /**
174
+ * value: "google-function"
175
+ * @const
176
+ */
177
+ "google-function": "google-function",
178
+ /**
179
+ * value: "mqtt"
180
+ * @const
181
+ */
182
+ "mqtt": "mqtt",
183
+ /**
184
+ * value: "aws-lambda"
185
+ * @const
186
+ */
187
+ "aws-lambda": "aws-lambda",
188
+ /**
189
+ * value: "aws-lambda-with-access-key"
190
+ * @const
191
+ */
192
+ "aws-lambda-with-access-key": "aws-lambda-with-access-key",
193
+ /**
194
+ * value: "aws-sqs"
195
+ * @const
196
+ */
197
+ "aws-sqs": "aws-sqs",
198
+ /**
199
+ * value: "aws-sqs-with-access-key"
200
+ * @const
201
+ */
202
+ "aws-sqs-with-access-key": "aws-sqs-with-access-key",
203
+ /**
204
+ * value: "aws-sqs-fifo"
205
+ * @const
206
+ */
207
+ "aws-sqs-fifo": "aws-sqs-fifo",
208
+ /**
209
+ * value: "aws-sqs-fifo-with-access-key"
210
+ * @const
211
+ */
212
+ "aws-sqs-fifo-with-access-key": "aws-sqs-fifo-with-access-key",
213
+ /**
214
+ * value: "aws-iot-analytics"
215
+ * @const
216
+ */
217
+ "aws-iot-analytics": "aws-iot-analytics",
218
+ /**
219
+ * value: "radnote-radresp-fixed-survey"
220
+ * @const
221
+ */
222
+ "radnote-radresp-fixed-survey": "radnote-radresp-fixed-survey",
223
+ /**
224
+ * value: "radnote-radresp-mobile-survey"
225
+ * @const
226
+ */
227
+ "radnote-radresp-mobile-survey": "radnote-radresp-mobile-survey",
228
+ /**
229
+ * value: "azure-function"
230
+ * @const
231
+ */
232
+ "azure-function": "azure-function",
233
+ /**
234
+ * value: "azure-function-with-key"
235
+ * @const
236
+ */
237
+ "azure-function-with-key": "azure-function-with-key",
238
+ /**
239
+ * value: "azure-service-bus-with-sas-token"
240
+ * @const
241
+ */
242
+ "azure-service-bus-with-sas-token": "azure-service-bus-with-sas-token",
243
+ /**
244
+ * value: "thingworx"
245
+ * @const
246
+ */
247
+ "thingworx": "thingworx",
248
+ /**
249
+ * value: "snowflake"
250
+ * @const
251
+ */
252
+ "snowflake": "snowflake",
253
+ /**
254
+ * value: "slack-bearer"
255
+ * @const
256
+ */
257
+ "slack-bearer": "slack-bearer",
258
+ /**
259
+ * value: "slack-webhook"
260
+ * @const
261
+ */
262
+ "slack-webhook": "slack-webhook"
263
+ };
344
264
  var _default = exports["default"] = NotehubRoute;