@blues-inc/notehub-js 2.1.0-beta.9 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +238 -246
- package/dist/ApiClient.js +154 -154
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +31 -31
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +374 -374
- package/dist/api/EventApi.js +118 -118
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +381 -381
- package/dist/api/RouteApi.js +77 -77
- package/dist/api/UsageApi.js +50 -41
- package/dist/api/WebhookApi.js +51 -51
- package/dist/model/Alert.js +74 -76
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/Aws.js +65 -65
- package/dist/model/AwsFilter.js +19 -19
- package/dist/model/AwsTransform.js +20 -20
- package/dist/model/Azure.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/Body.js +5 -5
- package/dist/model/CellularPlan.js +34 -34
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +12 -12
- package/dist/model/CreateMonitor.js +125 -126
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateUpdateRepository.js +17 -17
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +65 -65
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DataUsage.js +14 -14
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +101 -102
- package/dist/model/DeviceDfuHistory.js +19 -20
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- package/dist/model/DeviceDfuHistoryPage.js +12 -13
- package/dist/model/DeviceDfuStateMachine.js +24 -25
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusPage.js +12 -13
- package/dist/model/DeviceSession.js +221 -221
- package/dist/model/DeviceTowerInfo.js +14 -14
- package/dist/model/DeviceUsage.js +32 -32
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvTreeJsonNode.js +67 -69
- package/dist/model/EnvVar.js +18 -18
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +248 -248
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +30 -30
- package/dist/model/GetAlerts200Response.js +14 -15
- package/dist/model/GetBillingAccounts200Response.js +9 -10
- package/dist/model/GetDataUsage200Response.js +9 -10
- package/dist/model/GetDataUsage200ResponseDataInner.js +53 -43
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatest200Response.js +9 -10
- package/dist/model/GetDevicePlans200Response.js +9 -10
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDeviceSessions200Response.js +16 -17
- package/dist/model/GetProducts200Response.js +9 -10
- package/dist/model/GetProjectDevicePublicKeys200Response.js +16 -17
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +16 -17
- package/dist/model/GetProjectEvents200Response.js +20 -21
- package/dist/model/GetProjectEventsByCursor200Response.js +23 -24
- package/dist/model/GetProjectMembers200Response.js +11 -12
- package/dist/model/GetProjects200Response.js +9 -10
- package/dist/model/GetSessionsUsage200Response.js +11 -12
- package/dist/model/GetWebhooks200Response.js +9 -10
- package/dist/model/Google.js +33 -33
- package/dist/model/HandleNoteChanges200Response.js +11 -11
- package/dist/model/HandleNoteGet200Response.js +13 -13
- package/dist/model/HandleNoteSignal200Response.js +5 -5
- package/dist/model/HandleNotefileChanges200Response.js +11 -11
- package/dist/model/HandleNotefileChangesPending200Response.js +14 -14
- package/dist/model/HandleNotefileDeleteRequest.js +7 -7
- package/dist/model/Http.js +35 -35
- package/dist/model/Location.js +40 -40
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +99 -100
- package/dist/model/MonitorAlertRoutesInner.js +10 -9
- package/dist/model/Mqtt.js +66 -66
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +18 -19
- package/dist/model/NotehubRoute.js +36 -36
- package/dist/model/NotehubRouteSchema.js +46 -45
- package/dist/model/OAuth2Error.js +20 -20
- package/dist/model/OAuth2TokenResponse.js +23 -23
- package/dist/model/PersonalAccessToken.js +34 -34
- package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
- package/dist/model/PersonalAccessTokenInfo.js +18 -18
- package/dist/model/PersonalAccessTokenSecret.js +12 -12
- package/dist/model/PostProvisionProjectDeviceRequest.js +18 -18
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/Proxy.js +24 -24
- package/dist/model/PutDeviceFleetsRequest.js +8 -8
- package/dist/model/Radresponder.js +25 -25
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/SatellitePlan.js +26 -26
- package/dist/model/SchemaProperty.js +36 -38
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/Slack.js +53 -53
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackTransform.js +12 -12
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/Snowflake.js +45 -45
- package/dist/model/Thingworx.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/Twilio.js +43 -43
- package/dist/model/UpdateFleetRequest.js +25 -25
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +18 -18
- package/dist/model/UsageEventsData.js +38 -28
- package/dist/model/UsageEventsResponse.js +11 -12
- package/dist/model/UsageRouteLogsData.js +35 -36
- package/dist/model/UsageSessionsData.js +38 -28
- package/dist/model/UserDbRoute.js +25 -25
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/dist/model/WebhookSettings.js +15 -15
- package/package.json +3 -3
package/dist/model/Mqtt.js
CHANGED
|
@@ -15,7 +15,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
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); } /**
|
|
17
17
|
* Notehub API
|
|
18
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
18
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
19
19
|
*
|
|
20
20
|
* The version of the OpenAPI document: 1.2.0
|
|
21
21
|
* Contact: engineering@blues.io
|
|
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
/**
|
|
29
29
|
* The Mqtt model module.
|
|
30
30
|
* @module model/Mqtt
|
|
31
|
-
* @version 2.
|
|
31
|
+
* @version 2.2.0
|
|
32
32
|
*/
|
|
33
33
|
var Mqtt = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -62,47 +62,47 @@ var Mqtt = /*#__PURE__*/function () {
|
|
|
62
62
|
value: function constructFromObject(data, obj) {
|
|
63
63
|
if (data) {
|
|
64
64
|
obj = obj || new Mqtt();
|
|
65
|
-
if (data.hasOwnProperty(
|
|
66
|
-
obj[
|
|
65
|
+
if (data.hasOwnProperty("broker")) {
|
|
66
|
+
obj["broker"] = _ApiClient["default"].convertToType(data["broker"], "String");
|
|
67
67
|
}
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
68
|
+
if (data.hasOwnProperty("certificate")) {
|
|
69
|
+
obj["certificate"] = _ApiClient["default"].convertToType(data["certificate"], "String");
|
|
70
70
|
}
|
|
71
|
-
if (data.hasOwnProperty(
|
|
72
|
-
obj[
|
|
71
|
+
if (data.hasOwnProperty("certificate_name")) {
|
|
72
|
+
obj["certificate_name"] = _ApiClient["default"].convertToType(data["certificate_name"], "String");
|
|
73
73
|
}
|
|
74
|
-
if (data.hasOwnProperty(
|
|
75
|
-
obj[
|
|
74
|
+
if (data.hasOwnProperty("filter")) {
|
|
75
|
+
obj["filter"] = _AwsFilter["default"].constructFromObject(data["filter"]);
|
|
76
76
|
}
|
|
77
|
-
if (data.hasOwnProperty(
|
|
78
|
-
obj[
|
|
77
|
+
if (data.hasOwnProperty("fleets")) {
|
|
78
|
+
obj["fleets"] = _ApiClient["default"].convertToType(data["fleets"], ["String"]);
|
|
79
79
|
}
|
|
80
|
-
if (data.hasOwnProperty(
|
|
81
|
-
obj[
|
|
80
|
+
if (data.hasOwnProperty("key")) {
|
|
81
|
+
obj["key"] = _ApiClient["default"].convertToType(data["key"], "String");
|
|
82
82
|
}
|
|
83
|
-
if (data.hasOwnProperty(
|
|
84
|
-
obj[
|
|
83
|
+
if (data.hasOwnProperty("password")) {
|
|
84
|
+
obj["password"] = _ApiClient["default"].convertToType(data["password"], "String");
|
|
85
85
|
}
|
|
86
|
-
if (data.hasOwnProperty(
|
|
87
|
-
obj[
|
|
86
|
+
if (data.hasOwnProperty("port")) {
|
|
87
|
+
obj["port"] = _ApiClient["default"].convertToType(data["port"], "Number");
|
|
88
88
|
}
|
|
89
|
-
if (data.hasOwnProperty(
|
|
90
|
-
obj[
|
|
89
|
+
if (data.hasOwnProperty("private_key_name")) {
|
|
90
|
+
obj["private_key_name"] = _ApiClient["default"].convertToType(data["private_key_name"], "String");
|
|
91
91
|
}
|
|
92
|
-
if (data.hasOwnProperty(
|
|
93
|
-
obj[
|
|
92
|
+
if (data.hasOwnProperty("throttle_ms")) {
|
|
93
|
+
obj["throttle_ms"] = _ApiClient["default"].convertToType(data["throttle_ms"], "Number");
|
|
94
94
|
}
|
|
95
|
-
if (data.hasOwnProperty(
|
|
96
|
-
obj[
|
|
95
|
+
if (data.hasOwnProperty("timeout")) {
|
|
96
|
+
obj["timeout"] = _ApiClient["default"].convertToType(data["timeout"], "Number");
|
|
97
97
|
}
|
|
98
|
-
if (data.hasOwnProperty(
|
|
99
|
-
obj[
|
|
98
|
+
if (data.hasOwnProperty("topic")) {
|
|
99
|
+
obj["topic"] = _ApiClient["default"].convertToType(data["topic"], "String");
|
|
100
100
|
}
|
|
101
|
-
if (data.hasOwnProperty(
|
|
102
|
-
obj[
|
|
101
|
+
if (data.hasOwnProperty("transform")) {
|
|
102
|
+
obj["transform"] = _AwsTransform["default"].constructFromObject(data["transform"]);
|
|
103
103
|
}
|
|
104
|
-
if (data.hasOwnProperty(
|
|
105
|
-
obj[
|
|
104
|
+
if (data.hasOwnProperty("username")) {
|
|
105
|
+
obj["username"] = _ApiClient["default"].convertToType(data["username"], "String");
|
|
106
106
|
}
|
|
107
107
|
} else if (data === null) {
|
|
108
108
|
return null;
|
|
@@ -119,50 +119,50 @@ var Mqtt = /*#__PURE__*/function () {
|
|
|
119
119
|
key: "validateJSON",
|
|
120
120
|
value: function validateJSON(data) {
|
|
121
121
|
// ensure the json data is a string
|
|
122
|
-
if (data[
|
|
123
|
-
throw new Error("Expected the field `broker` to be a primitive type in the JSON string but got " + data[
|
|
122
|
+
if (data["broker"] && !(typeof data["broker"] === "string" || data["broker"] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `broker` to be a primitive type in the JSON string but got " + data["broker"]);
|
|
124
124
|
}
|
|
125
125
|
// ensure the json data is a string
|
|
126
|
-
if (data[
|
|
127
|
-
throw new Error("Expected the field `certificate` to be a primitive type in the JSON string but got " + data[
|
|
126
|
+
if (data["certificate"] && !(typeof data["certificate"] === "string" || data["certificate"] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `certificate` to be a primitive type in the JSON string but got " + data["certificate"]);
|
|
128
128
|
}
|
|
129
129
|
// ensure the json data is a string
|
|
130
|
-
if (data[
|
|
131
|
-
throw new Error("Expected the field `certificate_name` to be a primitive type in the JSON string but got " + data[
|
|
130
|
+
if (data["certificate_name"] && !(typeof data["certificate_name"] === "string" || data["certificate_name"] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `certificate_name` to be a primitive type in the JSON string but got " + data["certificate_name"]);
|
|
132
132
|
}
|
|
133
133
|
// validate the optional field `filter`
|
|
134
|
-
if (data[
|
|
134
|
+
if (data["filter"]) {
|
|
135
135
|
// data not null
|
|
136
|
-
_AwsFilter["default"].validateJSON(data[
|
|
136
|
+
_AwsFilter["default"].validateJSON(data["filter"]);
|
|
137
137
|
}
|
|
138
138
|
// ensure the json data is an array
|
|
139
|
-
if (!Array.isArray(data[
|
|
140
|
-
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data[
|
|
139
|
+
if (!Array.isArray(data["fleets"])) {
|
|
140
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data["fleets"]);
|
|
141
141
|
}
|
|
142
142
|
// ensure the json data is a string
|
|
143
|
-
if (data[
|
|
144
|
-
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data[
|
|
143
|
+
if (data["key"] && !(typeof data["key"] === "string" || data["key"] instanceof String)) {
|
|
144
|
+
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data["key"]);
|
|
145
145
|
}
|
|
146
146
|
// ensure the json data is a string
|
|
147
|
-
if (data[
|
|
148
|
-
throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data[
|
|
147
|
+
if (data["password"] && !(typeof data["password"] === "string" || data["password"] instanceof String)) {
|
|
148
|
+
throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data["password"]);
|
|
149
149
|
}
|
|
150
150
|
// ensure the json data is a string
|
|
151
|
-
if (data[
|
|
152
|
-
throw new Error("Expected the field `private_key_name` to be a primitive type in the JSON string but got " + data[
|
|
151
|
+
if (data["private_key_name"] && !(typeof data["private_key_name"] === "string" || data["private_key_name"] instanceof String)) {
|
|
152
|
+
throw new Error("Expected the field `private_key_name` to be a primitive type in the JSON string but got " + data["private_key_name"]);
|
|
153
153
|
}
|
|
154
154
|
// ensure the json data is a string
|
|
155
|
-
if (data[
|
|
156
|
-
throw new Error("Expected the field `topic` to be a primitive type in the JSON string but got " + data[
|
|
155
|
+
if (data["topic"] && !(typeof data["topic"] === "string" || data["topic"] instanceof String)) {
|
|
156
|
+
throw new Error("Expected the field `topic` to be a primitive type in the JSON string but got " + data["topic"]);
|
|
157
157
|
}
|
|
158
158
|
// validate the optional field `transform`
|
|
159
|
-
if (data[
|
|
159
|
+
if (data["transform"]) {
|
|
160
160
|
// data not null
|
|
161
|
-
_AwsTransform["default"].validateJSON(data[
|
|
161
|
+
_AwsTransform["default"].validateJSON(data["transform"]);
|
|
162
162
|
}
|
|
163
163
|
// ensure the json data is a string
|
|
164
|
-
if (data[
|
|
165
|
-
throw new Error("Expected the field `username` to be a primitive type in the JSON string but got " + data[
|
|
164
|
+
if (data["username"] && !(typeof data["username"] === "string" || data["username"] instanceof String)) {
|
|
165
|
+
throw new Error("Expected the field `username` to be a primitive type in the JSON string but got " + data["username"]);
|
|
166
166
|
}
|
|
167
167
|
return true;
|
|
168
168
|
}
|
|
@@ -171,78 +171,78 @@ var Mqtt = /*#__PURE__*/function () {
|
|
|
171
171
|
/**
|
|
172
172
|
* @member {String} broker
|
|
173
173
|
*/
|
|
174
|
-
Mqtt.prototype[
|
|
174
|
+
Mqtt.prototype["broker"] = undefined;
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
177
|
* Certificate with \\n newlines. This value is input-only and will be omitted from the response and replaced with a placeholder
|
|
178
178
|
* @member {String} certificate
|
|
179
179
|
*/
|
|
180
|
-
Mqtt.prototype[
|
|
180
|
+
Mqtt.prototype["certificate"] = undefined;
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* Name of certificate.
|
|
184
184
|
* @member {String} certificate_name
|
|
185
185
|
*/
|
|
186
|
-
Mqtt.prototype[
|
|
186
|
+
Mqtt.prototype["certificate_name"] = undefined;
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
189
|
* @member {module:model/AwsFilter} filter
|
|
190
190
|
*/
|
|
191
|
-
Mqtt.prototype[
|
|
191
|
+
Mqtt.prototype["filter"] = undefined;
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
|
|
195
195
|
* @member {Array.<String>} fleets
|
|
196
196
|
*/
|
|
197
|
-
Mqtt.prototype[
|
|
197
|
+
Mqtt.prototype["fleets"] = undefined;
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* Key with \\n newlines. This value is input-only and will be omitted from the response and replaced with a placeholder
|
|
201
201
|
* @member {String} key
|
|
202
202
|
*/
|
|
203
|
-
Mqtt.prototype[
|
|
203
|
+
Mqtt.prototype["key"] = undefined;
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
206
|
* This value is input-only and will be omitted from the response and replaced with a placeholder
|
|
207
207
|
* @member {String} password
|
|
208
208
|
*/
|
|
209
|
-
Mqtt.prototype[
|
|
209
|
+
Mqtt.prototype["password"] = undefined;
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
212
|
* @member {Number} port
|
|
213
213
|
*/
|
|
214
|
-
Mqtt.prototype[
|
|
214
|
+
Mqtt.prototype["port"] = undefined;
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
217
|
* Name of key
|
|
218
218
|
* @member {String} private_key_name
|
|
219
219
|
*/
|
|
220
|
-
Mqtt.prototype[
|
|
220
|
+
Mqtt.prototype["private_key_name"] = undefined;
|
|
221
221
|
|
|
222
222
|
/**
|
|
223
223
|
* @member {Number} throttle_ms
|
|
224
224
|
*/
|
|
225
|
-
Mqtt.prototype[
|
|
225
|
+
Mqtt.prototype["throttle_ms"] = undefined;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* Timeout in seconds for each request
|
|
229
229
|
* @member {Number} timeout
|
|
230
230
|
* @default 15
|
|
231
231
|
*/
|
|
232
|
-
Mqtt.prototype[
|
|
232
|
+
Mqtt.prototype["timeout"] = 15;
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* @member {String} topic
|
|
236
236
|
*/
|
|
237
|
-
Mqtt.prototype[
|
|
237
|
+
Mqtt.prototype["topic"] = undefined;
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
240
|
* @member {module:model/AwsTransform} transform
|
|
241
241
|
*/
|
|
242
|
-
Mqtt.prototype[
|
|
242
|
+
Mqtt.prototype["transform"] = undefined;
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
245
|
* @member {String} username
|
|
246
246
|
*/
|
|
247
|
-
Mqtt.prototype[
|
|
247
|
+
Mqtt.prototype["username"] = undefined;
|
|
248
248
|
var _default = exports["default"] = Mqtt;
|
package/dist/model/Note.js
CHANGED
|
@@ -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 Note model module.
|
|
28
28
|
* @module model/Note
|
|
29
|
-
* @version 2.
|
|
29
|
+
* @version 2.2.0
|
|
30
30
|
*/
|
|
31
31
|
var Note = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,11 +59,11 @@ var Note = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new Note();
|
|
62
|
-
if (data.hasOwnProperty(
|
|
63
|
-
obj[
|
|
62
|
+
if (data.hasOwnProperty("body")) {
|
|
63
|
+
obj["body"] = _ApiClient["default"].convertToType(data["body"], Object);
|
|
64
64
|
}
|
|
65
|
-
if (data.hasOwnProperty(
|
|
66
|
-
obj[
|
|
65
|
+
if (data.hasOwnProperty("payload")) {
|
|
66
|
+
obj["payload"] = _ApiClient["default"].convertToType(data["payload"], "String");
|
|
67
67
|
}
|
|
68
68
|
} else if (data === null) {
|
|
69
69
|
return null;
|
|
@@ -80,8 +80,8 @@ var Note = /*#__PURE__*/function () {
|
|
|
80
80
|
key: "validateJSON",
|
|
81
81
|
value: function validateJSON(data) {
|
|
82
82
|
// ensure the json data is a string
|
|
83
|
-
if (data[
|
|
84
|
-
throw new Error("Expected the field `payload` to be a primitive type in the JSON string but got " + data[
|
|
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"]);
|
|
85
85
|
}
|
|
86
86
|
return true;
|
|
87
87
|
}
|
|
@@ -90,10 +90,10 @@ var Note = /*#__PURE__*/function () {
|
|
|
90
90
|
/**
|
|
91
91
|
* @member {Object} body
|
|
92
92
|
*/
|
|
93
|
-
Note.prototype[
|
|
93
|
+
Note.prototype["body"] = undefined;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* @member {String} payload
|
|
97
97
|
*/
|
|
98
|
-
Note.prototype[
|
|
98
|
+
Note.prototype["payload"] = undefined;
|
|
99
99
|
var _default = exports["default"] = Note;
|
|
@@ -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,14 +30,14 @@ 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.
|
|
33
|
+
* @version 2.2.0
|
|
34
34
|
*/
|
|
35
35
|
var NotefileSchema = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
37
37
|
* Constructs a new <code>NotefileSchema</code>.
|
|
38
38
|
* @alias module:model/NotefileSchema
|
|
39
|
-
* @param notefile {String}
|
|
40
|
-
* @param properties {Array.<module:model/SchemaProperty>}
|
|
39
|
+
* @param notefile {String}
|
|
40
|
+
* @param properties {Array.<module:model/SchemaProperty>}
|
|
41
41
|
*/
|
|
42
42
|
function NotefileSchema(notefile, properties) {
|
|
43
43
|
_classCallCheck(this, NotefileSchema);
|
|
@@ -52,8 +52,8 @@ var NotefileSchema = /*#__PURE__*/function () {
|
|
|
52
52
|
return _createClass(NotefileSchema, null, [{
|
|
53
53
|
key: "initialize",
|
|
54
54
|
value: function initialize(obj, notefile, properties) {
|
|
55
|
-
obj[
|
|
56
|
-
obj[
|
|
55
|
+
obj["notefile"] = notefile;
|
|
56
|
+
obj["properties"] = properties;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -68,11 +68,11 @@ var NotefileSchema = /*#__PURE__*/function () {
|
|
|
68
68
|
value: function constructFromObject(data, obj) {
|
|
69
69
|
if (data) {
|
|
70
70
|
obj = obj || new NotefileSchema();
|
|
71
|
-
if (data.hasOwnProperty(
|
|
72
|
-
obj[
|
|
71
|
+
if (data.hasOwnProperty("notefile")) {
|
|
72
|
+
obj["notefile"] = _ApiClient["default"].convertToType(data["notefile"], "String");
|
|
73
73
|
}
|
|
74
|
-
if (data.hasOwnProperty(
|
|
75
|
-
obj[
|
|
74
|
+
if (data.hasOwnProperty("properties")) {
|
|
75
|
+
obj["properties"] = _ApiClient["default"].convertToType(data["properties"], [_SchemaProperty["default"]]);
|
|
76
76
|
}
|
|
77
77
|
} else if (data === null) {
|
|
78
78
|
return null;
|
|
@@ -104,17 +104,17 @@ var NotefileSchema = /*#__PURE__*/function () {
|
|
|
104
104
|
} finally {
|
|
105
105
|
_iterator.f();
|
|
106
106
|
}
|
|
107
|
-
if (data[
|
|
108
|
-
throw new Error("Expected the field `notefile` to be a primitive type in the JSON string but got " + data[
|
|
107
|
+
if (data["notefile"] && !(typeof data["notefile"] === "string" || data["notefile"] instanceof String)) {
|
|
108
|
+
throw new Error("Expected the field `notefile` to be a primitive type in the JSON string but got " + data["notefile"]);
|
|
109
109
|
}
|
|
110
|
-
if (data[
|
|
110
|
+
if (data["properties"]) {
|
|
111
111
|
// data not null
|
|
112
112
|
// ensure the json data is an array
|
|
113
|
-
if (!Array.isArray(data[
|
|
114
|
-
throw new Error("Expected the field `properties` to be an array in the JSON data but got " + data[
|
|
113
|
+
if (!Array.isArray(data["properties"])) {
|
|
114
|
+
throw new Error("Expected the field `properties` to be an array in the JSON data but got " + data["properties"]);
|
|
115
115
|
}
|
|
116
116
|
// validate the optional field `properties` (array)
|
|
117
|
-
var _iterator2 = _createForOfIteratorHelper(data[
|
|
117
|
+
var _iterator2 = _createForOfIteratorHelper(data["properties"]),
|
|
118
118
|
_step2;
|
|
119
119
|
try {
|
|
120
120
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -126,7 +126,6 @@ var NotefileSchema = /*#__PURE__*/function () {
|
|
|
126
126
|
} finally {
|
|
127
127
|
_iterator2.f();
|
|
128
128
|
}
|
|
129
|
-
;
|
|
130
129
|
}
|
|
131
130
|
return true;
|
|
132
131
|
}
|
|
@@ -137,10 +136,10 @@ NotefileSchema.RequiredProperties = ["notefile", "properties"];
|
|
|
137
136
|
/**
|
|
138
137
|
* @member {String} notefile
|
|
139
138
|
*/
|
|
140
|
-
NotefileSchema.prototype[
|
|
139
|
+
NotefileSchema.prototype["notefile"] = undefined;
|
|
141
140
|
|
|
142
141
|
/**
|
|
143
142
|
* @member {Array.<module:model/SchemaProperty>} properties
|
|
144
143
|
*/
|
|
145
|
-
NotefileSchema.prototype[
|
|
144
|
+
NotefileSchema.prototype["properties"] = undefined;
|
|
146
145
|
var _default = exports["default"] = NotefileSchema;
|
|
@@ -14,7 +14,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
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); } /**
|
|
16
16
|
* Notehub API
|
|
17
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
18
18
|
*
|
|
19
19
|
* The version of the OpenAPI document: 1.2.0
|
|
20
20
|
* Contact: engineering@blues.io
|
|
@@ -27,7 +27,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
27
27
|
/**
|
|
28
28
|
* The NotehubRoute model module.
|
|
29
29
|
* @module model/NotehubRoute
|
|
30
|
-
* @version 2.
|
|
30
|
+
* @version 2.2.0
|
|
31
31
|
*/
|
|
32
32
|
var NotehubRoute = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
|
@@ -60,23 +60,23 @@ var NotehubRoute = /*#__PURE__*/function () {
|
|
|
60
60
|
value: function constructFromObject(data, obj) {
|
|
61
61
|
if (data) {
|
|
62
62
|
obj = obj || new NotehubRoute();
|
|
63
|
-
if (data.hasOwnProperty(
|
|
64
|
-
obj[
|
|
63
|
+
if (data.hasOwnProperty("disabled")) {
|
|
64
|
+
obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
|
|
65
65
|
}
|
|
66
|
-
if (data.hasOwnProperty(
|
|
67
|
-
obj[
|
|
66
|
+
if (data.hasOwnProperty("label")) {
|
|
67
|
+
obj["label"] = _ApiClient["default"].convertToType(data["label"], "String");
|
|
68
68
|
}
|
|
69
|
-
if (data.hasOwnProperty(
|
|
70
|
-
obj[
|
|
69
|
+
if (data.hasOwnProperty("modified")) {
|
|
70
|
+
obj["modified"] = _ApiClient["default"].convertToType(data["modified"], "String");
|
|
71
71
|
}
|
|
72
|
-
if (data.hasOwnProperty(
|
|
73
|
-
obj[
|
|
72
|
+
if (data.hasOwnProperty("route_type")) {
|
|
73
|
+
obj["route_type"] = _ApiClient["default"].convertToType(data["route_type"], "String");
|
|
74
74
|
}
|
|
75
|
-
if (data.hasOwnProperty(
|
|
76
|
-
obj[
|
|
75
|
+
if (data.hasOwnProperty("schema")) {
|
|
76
|
+
obj["schema"] = _NotehubRouteSchema["default"].constructFromObject(data["schema"]);
|
|
77
77
|
}
|
|
78
|
-
if (data.hasOwnProperty(
|
|
79
|
-
obj[
|
|
78
|
+
if (data.hasOwnProperty("uid")) {
|
|
79
|
+
obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
|
|
80
80
|
}
|
|
81
81
|
} else if (data === null) {
|
|
82
82
|
return null;
|
|
@@ -93,25 +93,25 @@ var NotehubRoute = /*#__PURE__*/function () {
|
|
|
93
93
|
key: "validateJSON",
|
|
94
94
|
value: function validateJSON(data) {
|
|
95
95
|
// ensure the json data is a string
|
|
96
|
-
if (data[
|
|
97
|
-
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data[
|
|
96
|
+
if (data["label"] && !(typeof data["label"] === "string" || data["label"] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data["label"]);
|
|
98
98
|
}
|
|
99
99
|
// ensure the json data is a string
|
|
100
|
-
if (data[
|
|
101
|
-
throw new Error("Expected the field `modified` to be a primitive type in the JSON string but got " + data[
|
|
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"]);
|
|
102
102
|
}
|
|
103
103
|
// ensure the json data is a string
|
|
104
|
-
if (data[
|
|
105
|
-
throw new Error("Expected the field `route_type` to be a primitive type in the JSON string but got " + data[
|
|
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"]);
|
|
106
106
|
}
|
|
107
107
|
// validate the optional field `schema`
|
|
108
|
-
if (data[
|
|
108
|
+
if (data["schema"]) {
|
|
109
109
|
// data not null
|
|
110
|
-
_NotehubRouteSchema["default"].validateJSON(data[
|
|
110
|
+
_NotehubRouteSchema["default"].validateJSON(data["schema"]);
|
|
111
111
|
}
|
|
112
112
|
// ensure the json data is a string
|
|
113
|
-
if (data[
|
|
114
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
113
|
+
if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
|
|
115
115
|
}
|
|
116
116
|
return true;
|
|
117
117
|
}
|
|
@@ -122,54 +122,54 @@ var NotehubRoute = /*#__PURE__*/function () {
|
|
|
122
122
|
* @member {Boolean} disabled
|
|
123
123
|
* @default false
|
|
124
124
|
*/
|
|
125
|
-
NotehubRoute.prototype[
|
|
125
|
+
NotehubRoute.prototype["disabled"] = false;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Route Label
|
|
129
129
|
* @member {String} label
|
|
130
130
|
*/
|
|
131
|
-
NotehubRoute.prototype[
|
|
131
|
+
NotehubRoute.prototype["label"] = undefined;
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* Last Modified
|
|
135
135
|
* @member {String} modified
|
|
136
136
|
*/
|
|
137
|
-
NotehubRoute.prototype[
|
|
137
|
+
NotehubRoute.prototype["modified"] = undefined;
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* Type of route.
|
|
141
141
|
* @member {module:model/NotehubRoute.RouteTypeEnum} route_type
|
|
142
142
|
* @default 'http'
|
|
143
143
|
*/
|
|
144
|
-
NotehubRoute.prototype[
|
|
144
|
+
NotehubRoute.prototype["route_type"] = "http";
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* @member {module:model/NotehubRouteSchema} schema
|
|
148
148
|
*/
|
|
149
|
-
NotehubRoute.prototype[
|
|
149
|
+
NotehubRoute.prototype["schema"] = undefined;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Route UID
|
|
153
153
|
* @member {String} uid
|
|
154
154
|
*/
|
|
155
|
-
NotehubRoute.prototype[
|
|
155
|
+
NotehubRoute.prototype["uid"] = undefined;
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* Allowed values for the <code>route_type</code> property.
|
|
159
159
|
* @enum {String}
|
|
160
160
|
* @readonly
|
|
161
161
|
*/
|
|
162
|
-
NotehubRoute[
|
|
162
|
+
NotehubRoute["RouteTypeEnum"] = {
|
|
163
163
|
/**
|
|
164
164
|
* value: "http"
|
|
165
165
|
* @const
|
|
166
166
|
*/
|
|
167
|
-
|
|
167
|
+
http: "http",
|
|
168
168
|
/**
|
|
169
169
|
* value: "proxy"
|
|
170
170
|
* @const
|
|
171
171
|
*/
|
|
172
|
-
|
|
172
|
+
proxy: "proxy",
|
|
173
173
|
/**
|
|
174
174
|
* value: "google-function"
|
|
175
175
|
* @const
|
|
@@ -179,7 +179,7 @@ NotehubRoute['RouteTypeEnum'] = {
|
|
|
179
179
|
* value: "mqtt"
|
|
180
180
|
* @const
|
|
181
181
|
*/
|
|
182
|
-
|
|
182
|
+
mqtt: "mqtt",
|
|
183
183
|
/**
|
|
184
184
|
* value: "aws-lambda"
|
|
185
185
|
* @const
|
|
@@ -244,12 +244,12 @@ NotehubRoute['RouteTypeEnum'] = {
|
|
|
244
244
|
* value: "thingworx"
|
|
245
245
|
* @const
|
|
246
246
|
*/
|
|
247
|
-
|
|
247
|
+
thingworx: "thingworx",
|
|
248
248
|
/**
|
|
249
249
|
* value: "snowflake"
|
|
250
250
|
* @const
|
|
251
251
|
*/
|
|
252
|
-
|
|
252
|
+
snowflake: "snowflake",
|
|
253
253
|
/**
|
|
254
254
|
* value: "slack-bearer"
|
|
255
255
|
* @const
|