@blues-inc/notehub-js 2.2.1 → 2.3.0-beta.10
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 +252 -241
- 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 +996 -949
- package/dist/api/EventApi.js +178 -178
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +601 -601
- package/dist/api/RouteApi.js +77 -77
- package/dist/api/UsageApi.js +53 -44
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +91 -77
- package/dist/model/{PutDeviceFleetsRequest.js → AddDeviceToFleetsRequest.js} +26 -26
- package/dist/model/Alert.js +76 -74
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/AwsRoute.js +65 -65
- package/dist/model/AzureRoute.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/BlynkRoute.js +28 -28
- package/dist/model/Body.js +5 -5
- package/dist/model/CellularPlan.js +34 -34
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +17 -17
- package/dist/model/CreateMonitor.js +126 -125
- 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/DatacakeRoute.js +35 -35
- package/dist/model/{DeleteDeviceFleetsRequest.js → DeleteDeviceFromFleetsRequest.js} +26 -26
- package/dist/model/{HandleNotefileDeleteRequest.js → DeleteNotefilesRequest.js} +24 -24
- package/dist/model/Device.js +102 -101
- package/dist/model/DeviceDfuHistory.js +20 -19
- package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
- package/dist/model/DeviceDfuHistoryPage.js +13 -12
- package/dist/model/DeviceDfuStateMachine.js +25 -24
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusPage.js +13 -12
- package/dist/model/DeviceSession.js +221 -221
- package/dist/model/DeviceTowerInfo.js +14 -14
- package/dist/model/DeviceUsage.js +32 -32
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvTreeJsonNode.js +69 -67
- package/dist/model/EnvVar.js +18 -18
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +248 -248
- package/dist/model/Filter.js +16 -16
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +35 -35
- package/dist/model/FleetConnectivityAssurance.js +6 -6
- package/dist/model/GetAlerts200Response.js +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/GetDataUsage200Response.js +10 -9
- package/dist/model/GetDataUsage200ResponseDataInner.js +41 -40
- package/dist/model/{HandleNoteGet200Response.js → GetDbNote200Response.js} +29 -29
- package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
- package/dist/model/GetDeviceFleets200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/{GetDeviceLatest200Response.js → GetDeviceLatestEvents200Response.js} +26 -25
- package/dist/model/GetDevicePlans200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/{GetProjectDevicePublicKeys200Response.js → GetDevicePublicKeys200Response.js} +38 -37
- package/dist/model/{GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js → GetDevicePublicKeys200ResponseDevicePublicKeysInner.js} +28 -28
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/{GetProjectDevices200Response.js → GetDevices200Response.js} +35 -34
- package/dist/model/{GetProjectEvents200Response.js → GetEvents200Response.js} +39 -38
- package/dist/model/{GetProjectEventsByCursor200Response.js → GetEventsByCursor200Response.js} +42 -41
- package/dist/model/{HandleNoteChanges200Response.js → GetNotefile200Response.js} +27 -27
- package/dist/model/GetProducts200Response.js +10 -9
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetSessionsUsage200Response.js +12 -11
- package/dist/model/GetWebhooks200Response.js +10 -9
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.js +35 -35
- package/dist/model/{HandleNotefileChanges200Response.js → ListPendingNotefiles200Response.js} +36 -27
- 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 +100 -99
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +95 -15
- package/dist/model/Notefile.js +147 -0
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotefileTemplate.js +128 -0
- package/dist/model/NotehubRoute.js +112 -98
- package/dist/model/NotehubRouteSummary.js +23 -23
- package/dist/model/OAuth2Error.js +20 -20
- package/dist/model/OAuth2TokenResponse.js +23 -23
- package/dist/model/PersonalAccessToken.js +34 -34
- package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
- package/dist/model/PersonalAccessTokenInfo.js +18 -18
- package/dist/model/PersonalAccessTokenSecret.js +12 -12
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/{PostProvisionProjectDeviceRequest.js → ProvisionDeviceRequest.js} +36 -36
- package/dist/model/ProxyRoute.js +38 -24
- package/dist/model/QubitroRoute.js +33 -33
- package/dist/model/RadRoute.js +31 -31
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/RouteLog.js +38 -38
- package/dist/model/RouteTransformSettings.js +27 -14
- package/dist/model/S3ArchiveRoute.js +79 -79
- package/dist/model/SatellitePlan.js +26 -26
- package/dist/model/SchemaProperty.js +38 -36
- package/dist/model/{HandleNoteSignal200Response.js → SignalDevice200Response.js} +21 -21
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackRoute.js +48 -48
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/SnowflakeRoute.js +45 -45
- package/dist/model/SnowpipeStreamingRoute.js +223 -0
- package/dist/model/ThingworxRoute.js +33 -33
- package/dist/model/TowerLocation.js +54 -54
- package/dist/model/TwilioRoute.js +43 -43
- package/dist/model/UpdateFleetRequest.js +30 -30
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +18 -18
- package/dist/model/UsageEventsData.js +29 -29
- package/dist/model/UsageEventsResponse.js +12 -11
- package/dist/model/UsageRouteLogsData.js +27 -27
- package/dist/model/UsageSessionsData.js +27 -27
- 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/HandleNotefileChangesPending200Response.js +0 -115
|
@@ -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.3.0-beta.10
|
|
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,6 +126,7 @@ var NotefileSchema = /*#__PURE__*/function () {
|
|
|
126
126
|
} finally {
|
|
127
127
|
_iterator2.f();
|
|
128
128
|
}
|
|
129
|
+
;
|
|
129
130
|
}
|
|
130
131
|
return true;
|
|
131
132
|
}
|
|
@@ -136,10 +137,10 @@ NotefileSchema.RequiredProperties = ["notefile", "properties"];
|
|
|
136
137
|
/**
|
|
137
138
|
* @member {String} notefile
|
|
138
139
|
*/
|
|
139
|
-
NotefileSchema.prototype[
|
|
140
|
+
NotefileSchema.prototype['notefile'] = undefined;
|
|
140
141
|
|
|
141
142
|
/**
|
|
142
143
|
* @member {Array.<module:model/SchemaProperty>} properties
|
|
143
144
|
*/
|
|
144
|
-
NotefileSchema.prototype[
|
|
145
|
+
NotefileSchema.prototype['properties'] = undefined;
|
|
145
146
|
var _default = exports["default"] = NotefileSchema;
|
|
@@ -0,0 +1,128 @@
|
|
|
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 _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
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
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
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* Notehub API
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document: 1.2.0
|
|
22
|
+
* Contact: engineering@blues.io
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The NotefileTemplate model module.
|
|
31
|
+
* @module model/NotefileTemplate
|
|
32
|
+
* @version 2.3.0-beta.10
|
|
33
|
+
*/
|
|
34
|
+
var NotefileTemplate = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>NotefileTemplate</code>.
|
|
37
|
+
* @alias module:model/NotefileTemplate
|
|
38
|
+
* @param file {String} The notefile name (e.g. \"_env.dbs\", \"_health.qo\", \"_track.qo\", \"test.db\", \"test.qi\").
|
|
39
|
+
*/
|
|
40
|
+
function NotefileTemplate(file) {
|
|
41
|
+
_classCallCheck(this, NotefileTemplate);
|
|
42
|
+
NotefileTemplate.initialize(this, file);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(NotefileTemplate, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, file) {
|
|
53
|
+
obj['file'] = file;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>NotefileTemplate</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/NotefileTemplate} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/NotefileTemplate} The populated <code>NotefileTemplate</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new NotefileTemplate();
|
|
68
|
+
if (data.hasOwnProperty('body_template')) {
|
|
69
|
+
obj['body_template'] = _ApiClient["default"].convertToType(data['body_template'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('file')) {
|
|
72
|
+
obj['file'] = _ApiClient["default"].convertToType(data['file'], 'String');
|
|
73
|
+
}
|
|
74
|
+
} else if (data === null) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Validates the JSON data with respect to <code>NotefileTemplate</code>.
|
|
82
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
83
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>NotefileTemplate</code>.
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "validateJSON",
|
|
87
|
+
value: function validateJSON(data) {
|
|
88
|
+
// check to make sure all required properties are present in the JSON string
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(NotefileTemplate.RequiredProperties),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var property = _step.value;
|
|
94
|
+
if (!data[property]) {
|
|
95
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// ensure the json data is a string
|
|
99
|
+
} catch (err) {
|
|
100
|
+
_iterator.e(err);
|
|
101
|
+
} finally {
|
|
102
|
+
_iterator.f();
|
|
103
|
+
}
|
|
104
|
+
if (data['body_template'] && !(typeof data['body_template'] === 'string' || data['body_template'] instanceof String)) {
|
|
105
|
+
throw new Error("Expected the field `body_template` to be a primitive type in the JSON string but got " + data['body_template']);
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
if (data['file'] && !(typeof data['file'] === 'string' || data['file'] instanceof String)) {
|
|
109
|
+
throw new Error("Expected the field `file` to be a primitive type in the JSON string but got " + data['file']);
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
}]);
|
|
114
|
+
}();
|
|
115
|
+
NotefileTemplate.RequiredProperties = ["file"];
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A JSON-encoded string template for the body of a note. The value itself is a string containing serialized JSON.
|
|
119
|
+
* @member {String} body_template
|
|
120
|
+
*/
|
|
121
|
+
NotefileTemplate.prototype['body_template'] = undefined;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The notefile name (e.g. \"_env.dbs\", \"_health.qo\", \"_track.qo\", \"test.db\", \"test.qi\").
|
|
125
|
+
* @member {String} file
|
|
126
|
+
*/
|
|
127
|
+
NotefileTemplate.prototype['file'] = undefined;
|
|
128
|
+
var _default = exports["default"] = NotefileTemplate;
|
|
@@ -18,6 +18,7 @@ var _RadRoute = _interopRequireDefault(require("./RadRoute"));
|
|
|
18
18
|
var _S3ArchiveRoute = _interopRequireDefault(require("./S3ArchiveRoute"));
|
|
19
19
|
var _SlackRoute = _interopRequireDefault(require("./SlackRoute"));
|
|
20
20
|
var _SnowflakeRoute = _interopRequireDefault(require("./SnowflakeRoute"));
|
|
21
|
+
var _SnowpipeStreamingRoute = _interopRequireDefault(require("./SnowpipeStreamingRoute"));
|
|
21
22
|
var _ThingworxRoute = _interopRequireDefault(require("./ThingworxRoute"));
|
|
22
23
|
var _TwilioRoute = _interopRequireDefault(require("./TwilioRoute"));
|
|
23
24
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -28,7 +29,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
28
29
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
29
30
|
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); } /**
|
|
30
31
|
* Notehub API
|
|
31
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
32
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
32
33
|
*
|
|
33
34
|
* The version of the OpenAPI document: 1.2.0
|
|
34
35
|
* Contact: engineering@blues.io
|
|
@@ -41,7 +42,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
41
42
|
/**
|
|
42
43
|
* The NotehubRoute model module.
|
|
43
44
|
* @module model/NotehubRoute
|
|
44
|
-
* @version 2.
|
|
45
|
+
* @version 2.3.0-beta.10
|
|
45
46
|
*/
|
|
46
47
|
var NotehubRoute = /*#__PURE__*/function () {
|
|
47
48
|
/**
|
|
@@ -75,65 +76,68 @@ var NotehubRoute = /*#__PURE__*/function () {
|
|
|
75
76
|
value: function constructFromObject(data, obj) {
|
|
76
77
|
if (data) {
|
|
77
78
|
obj = obj || new NotehubRoute();
|
|
78
|
-
if (data.hasOwnProperty(
|
|
79
|
-
obj[
|
|
79
|
+
if (data.hasOwnProperty('aws')) {
|
|
80
|
+
obj['aws'] = _AwsRoute["default"].constructFromObject(data['aws']);
|
|
80
81
|
}
|
|
81
|
-
if (data.hasOwnProperty(
|
|
82
|
-
obj[
|
|
82
|
+
if (data.hasOwnProperty('azure')) {
|
|
83
|
+
obj['azure'] = _AzureRoute["default"].constructFromObject(data['azure']);
|
|
83
84
|
}
|
|
84
|
-
if (data.hasOwnProperty(
|
|
85
|
-
obj[
|
|
85
|
+
if (data.hasOwnProperty('blynk')) {
|
|
86
|
+
obj['blynk'] = _BlynkRoute["default"].constructFromObject(data['blynk']);
|
|
86
87
|
}
|
|
87
|
-
if (data.hasOwnProperty(
|
|
88
|
-
obj[
|
|
88
|
+
if (data.hasOwnProperty('datacake')) {
|
|
89
|
+
obj['datacake'] = _DatacakeRoute["default"].constructFromObject(data['datacake']);
|
|
89
90
|
}
|
|
90
|
-
if (data.hasOwnProperty(
|
|
91
|
-
obj[
|
|
91
|
+
if (data.hasOwnProperty('disabled')) {
|
|
92
|
+
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
92
93
|
}
|
|
93
|
-
if (data.hasOwnProperty(
|
|
94
|
-
obj[
|
|
94
|
+
if (data.hasOwnProperty('google')) {
|
|
95
|
+
obj['google'] = _GoogleRoute["default"].constructFromObject(data['google']);
|
|
95
96
|
}
|
|
96
|
-
if (data.hasOwnProperty(
|
|
97
|
-
obj[
|
|
97
|
+
if (data.hasOwnProperty('http')) {
|
|
98
|
+
obj['http'] = _HttpRoute["default"].constructFromObject(data['http']);
|
|
98
99
|
}
|
|
99
|
-
if (data.hasOwnProperty(
|
|
100
|
-
obj[
|
|
100
|
+
if (data.hasOwnProperty('label')) {
|
|
101
|
+
obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
|
|
101
102
|
}
|
|
102
|
-
if (data.hasOwnProperty(
|
|
103
|
-
obj[
|
|
103
|
+
if (data.hasOwnProperty('modified')) {
|
|
104
|
+
obj['modified'] = _ApiClient["default"].convertToType(data['modified'], 'Date');
|
|
104
105
|
}
|
|
105
|
-
if (data.hasOwnProperty(
|
|
106
|
-
obj[
|
|
106
|
+
if (data.hasOwnProperty('mqtt')) {
|
|
107
|
+
obj['mqtt'] = _MqttRoute["default"].constructFromObject(data['mqtt']);
|
|
107
108
|
}
|
|
108
|
-
if (data.hasOwnProperty(
|
|
109
|
-
obj[
|
|
109
|
+
if (data.hasOwnProperty('proxy')) {
|
|
110
|
+
obj['proxy'] = _ProxyRoute["default"].constructFromObject(data['proxy']);
|
|
110
111
|
}
|
|
111
|
-
if (data.hasOwnProperty(
|
|
112
|
-
obj[
|
|
112
|
+
if (data.hasOwnProperty('qubitro')) {
|
|
113
|
+
obj['qubitro'] = _QubitroRoute["default"].constructFromObject(data['qubitro']);
|
|
113
114
|
}
|
|
114
|
-
if (data.hasOwnProperty(
|
|
115
|
-
obj[
|
|
115
|
+
if (data.hasOwnProperty('radnote')) {
|
|
116
|
+
obj['radnote'] = _RadRoute["default"].constructFromObject(data['radnote']);
|
|
116
117
|
}
|
|
117
|
-
if (data.hasOwnProperty(
|
|
118
|
-
obj[
|
|
118
|
+
if (data.hasOwnProperty('s3archive')) {
|
|
119
|
+
obj['s3archive'] = _S3ArchiveRoute["default"].constructFromObject(data['s3archive']);
|
|
119
120
|
}
|
|
120
|
-
if (data.hasOwnProperty(
|
|
121
|
-
obj[
|
|
121
|
+
if (data.hasOwnProperty('slack')) {
|
|
122
|
+
obj['slack'] = _SlackRoute["default"].constructFromObject(data['slack']);
|
|
122
123
|
}
|
|
123
|
-
if (data.hasOwnProperty(
|
|
124
|
-
obj[
|
|
124
|
+
if (data.hasOwnProperty('snowflake')) {
|
|
125
|
+
obj['snowflake'] = _SnowflakeRoute["default"].constructFromObject(data['snowflake']);
|
|
125
126
|
}
|
|
126
|
-
if (data.hasOwnProperty(
|
|
127
|
-
obj[
|
|
127
|
+
if (data.hasOwnProperty('snowpipe_streaming')) {
|
|
128
|
+
obj['snowpipe_streaming'] = _SnowpipeStreamingRoute["default"].constructFromObject(data['snowpipe_streaming']);
|
|
128
129
|
}
|
|
129
|
-
if (data.hasOwnProperty(
|
|
130
|
-
obj[
|
|
130
|
+
if (data.hasOwnProperty('thingworx')) {
|
|
131
|
+
obj['thingworx'] = _ThingworxRoute["default"].constructFromObject(data['thingworx']);
|
|
131
132
|
}
|
|
132
|
-
if (data.hasOwnProperty(
|
|
133
|
-
obj[
|
|
133
|
+
if (data.hasOwnProperty('twilio')) {
|
|
134
|
+
obj['twilio'] = _TwilioRoute["default"].constructFromObject(data['twilio']);
|
|
134
135
|
}
|
|
135
|
-
if (data.hasOwnProperty(
|
|
136
|
-
obj[
|
|
136
|
+
if (data.hasOwnProperty('type')) {
|
|
137
|
+
obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
|
|
138
|
+
}
|
|
139
|
+
if (data.hasOwnProperty('uid')) {
|
|
140
|
+
obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
|
|
137
141
|
}
|
|
138
142
|
} else if (data === null) {
|
|
139
143
|
return null;
|
|
@@ -150,91 +154,96 @@ var NotehubRoute = /*#__PURE__*/function () {
|
|
|
150
154
|
key: "validateJSON",
|
|
151
155
|
value: function validateJSON(data) {
|
|
152
156
|
// validate the optional field `aws`
|
|
153
|
-
if (data[
|
|
157
|
+
if (data['aws']) {
|
|
154
158
|
// data not null
|
|
155
|
-
_AwsRoute["default"].validateJSON(data[
|
|
159
|
+
_AwsRoute["default"].validateJSON(data['aws']);
|
|
156
160
|
}
|
|
157
161
|
// validate the optional field `azure`
|
|
158
|
-
if (data[
|
|
162
|
+
if (data['azure']) {
|
|
159
163
|
// data not null
|
|
160
|
-
_AzureRoute["default"].validateJSON(data[
|
|
164
|
+
_AzureRoute["default"].validateJSON(data['azure']);
|
|
161
165
|
}
|
|
162
166
|
// validate the optional field `blynk`
|
|
163
|
-
if (data[
|
|
167
|
+
if (data['blynk']) {
|
|
164
168
|
// data not null
|
|
165
|
-
_BlynkRoute["default"].validateJSON(data[
|
|
169
|
+
_BlynkRoute["default"].validateJSON(data['blynk']);
|
|
166
170
|
}
|
|
167
171
|
// validate the optional field `datacake`
|
|
168
|
-
if (data[
|
|
172
|
+
if (data['datacake']) {
|
|
169
173
|
// data not null
|
|
170
|
-
_DatacakeRoute["default"].validateJSON(data[
|
|
174
|
+
_DatacakeRoute["default"].validateJSON(data['datacake']);
|
|
171
175
|
}
|
|
172
176
|
// validate the optional field `google`
|
|
173
|
-
if (data[
|
|
177
|
+
if (data['google']) {
|
|
174
178
|
// data not null
|
|
175
|
-
_GoogleRoute["default"].validateJSON(data[
|
|
179
|
+
_GoogleRoute["default"].validateJSON(data['google']);
|
|
176
180
|
}
|
|
177
181
|
// validate the optional field `http`
|
|
178
|
-
if (data[
|
|
182
|
+
if (data['http']) {
|
|
179
183
|
// data not null
|
|
180
|
-
_HttpRoute["default"].validateJSON(data[
|
|
184
|
+
_HttpRoute["default"].validateJSON(data['http']);
|
|
181
185
|
}
|
|
182
186
|
// ensure the json data is a string
|
|
183
|
-
if (data[
|
|
184
|
-
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data[
|
|
187
|
+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
|
|
188
|
+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
|
|
185
189
|
}
|
|
186
190
|
// validate the optional field `mqtt`
|
|
187
|
-
if (data[
|
|
191
|
+
if (data['mqtt']) {
|
|
188
192
|
// data not null
|
|
189
|
-
_MqttRoute["default"].validateJSON(data[
|
|
193
|
+
_MqttRoute["default"].validateJSON(data['mqtt']);
|
|
190
194
|
}
|
|
191
195
|
// validate the optional field `proxy`
|
|
192
|
-
if (data[
|
|
196
|
+
if (data['proxy']) {
|
|
193
197
|
// data not null
|
|
194
|
-
_ProxyRoute["default"].validateJSON(data[
|
|
198
|
+
_ProxyRoute["default"].validateJSON(data['proxy']);
|
|
195
199
|
}
|
|
196
200
|
// validate the optional field `qubitro`
|
|
197
|
-
if (data[
|
|
201
|
+
if (data['qubitro']) {
|
|
198
202
|
// data not null
|
|
199
|
-
_QubitroRoute["default"].validateJSON(data[
|
|
203
|
+
_QubitroRoute["default"].validateJSON(data['qubitro']);
|
|
200
204
|
}
|
|
201
205
|
// validate the optional field `radnote`
|
|
202
|
-
if (data[
|
|
206
|
+
if (data['radnote']) {
|
|
203
207
|
// data not null
|
|
204
|
-
_RadRoute["default"].validateJSON(data[
|
|
208
|
+
_RadRoute["default"].validateJSON(data['radnote']);
|
|
205
209
|
}
|
|
206
210
|
// validate the optional field `s3archive`
|
|
207
|
-
if (data[
|
|
211
|
+
if (data['s3archive']) {
|
|
208
212
|
// data not null
|
|
209
|
-
_S3ArchiveRoute["default"].validateJSON(data[
|
|
213
|
+
_S3ArchiveRoute["default"].validateJSON(data['s3archive']);
|
|
210
214
|
}
|
|
211
215
|
// validate the optional field `slack`
|
|
212
|
-
if (data[
|
|
216
|
+
if (data['slack']) {
|
|
213
217
|
// data not null
|
|
214
|
-
_SlackRoute["default"].validateJSON(data[
|
|
218
|
+
_SlackRoute["default"].validateJSON(data['slack']);
|
|
215
219
|
}
|
|
216
220
|
// validate the optional field `snowflake`
|
|
217
|
-
if (data[
|
|
221
|
+
if (data['snowflake']) {
|
|
222
|
+
// data not null
|
|
223
|
+
_SnowflakeRoute["default"].validateJSON(data['snowflake']);
|
|
224
|
+
}
|
|
225
|
+
// validate the optional field `snowpipe_streaming`
|
|
226
|
+
if (data['snowpipe_streaming']) {
|
|
218
227
|
// data not null
|
|
219
|
-
|
|
228
|
+
_SnowpipeStreamingRoute["default"].validateJSON(data['snowpipe_streaming']);
|
|
220
229
|
}
|
|
221
230
|
// validate the optional field `thingworx`
|
|
222
|
-
if (data[
|
|
231
|
+
if (data['thingworx']) {
|
|
223
232
|
// data not null
|
|
224
|
-
_ThingworxRoute["default"].validateJSON(data[
|
|
233
|
+
_ThingworxRoute["default"].validateJSON(data['thingworx']);
|
|
225
234
|
}
|
|
226
235
|
// validate the optional field `twilio`
|
|
227
|
-
if (data[
|
|
236
|
+
if (data['twilio']) {
|
|
228
237
|
// data not null
|
|
229
|
-
_TwilioRoute["default"].validateJSON(data[
|
|
238
|
+
_TwilioRoute["default"].validateJSON(data['twilio']);
|
|
230
239
|
}
|
|
231
240
|
// ensure the json data is a string
|
|
232
|
-
if (data[
|
|
233
|
-
throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data[
|
|
241
|
+
if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
|
|
242
|
+
throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
|
|
234
243
|
}
|
|
235
244
|
// ensure the json data is a string
|
|
236
|
-
if (data[
|
|
237
|
-
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data[
|
|
245
|
+
if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
|
|
246
|
+
throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
|
|
238
247
|
}
|
|
239
248
|
return true;
|
|
240
249
|
}
|
|
@@ -243,102 +252,107 @@ var NotehubRoute = /*#__PURE__*/function () {
|
|
|
243
252
|
/**
|
|
244
253
|
* @member {module:model/AwsRoute} aws
|
|
245
254
|
*/
|
|
246
|
-
NotehubRoute.prototype[
|
|
255
|
+
NotehubRoute.prototype['aws'] = undefined;
|
|
247
256
|
|
|
248
257
|
/**
|
|
249
258
|
* @member {module:model/AzureRoute} azure
|
|
250
259
|
*/
|
|
251
|
-
NotehubRoute.prototype[
|
|
260
|
+
NotehubRoute.prototype['azure'] = undefined;
|
|
252
261
|
|
|
253
262
|
/**
|
|
254
263
|
* @member {module:model/BlynkRoute} blynk
|
|
255
264
|
*/
|
|
256
|
-
NotehubRoute.prototype[
|
|
265
|
+
NotehubRoute.prototype['blynk'] = undefined;
|
|
257
266
|
|
|
258
267
|
/**
|
|
259
268
|
* @member {module:model/DatacakeRoute} datacake
|
|
260
269
|
*/
|
|
261
|
-
NotehubRoute.prototype[
|
|
270
|
+
NotehubRoute.prototype['datacake'] = undefined;
|
|
262
271
|
|
|
263
272
|
/**
|
|
264
273
|
* @member {Boolean} disabled
|
|
265
274
|
* @default false
|
|
266
275
|
*/
|
|
267
|
-
NotehubRoute.prototype[
|
|
276
|
+
NotehubRoute.prototype['disabled'] = false;
|
|
268
277
|
|
|
269
278
|
/**
|
|
270
279
|
* @member {module:model/GoogleRoute} google
|
|
271
280
|
*/
|
|
272
|
-
NotehubRoute.prototype[
|
|
281
|
+
NotehubRoute.prototype['google'] = undefined;
|
|
273
282
|
|
|
274
283
|
/**
|
|
275
284
|
* @member {module:model/HttpRoute} http
|
|
276
285
|
*/
|
|
277
|
-
NotehubRoute.prototype[
|
|
286
|
+
NotehubRoute.prototype['http'] = undefined;
|
|
278
287
|
|
|
279
288
|
/**
|
|
280
289
|
* @member {String} label
|
|
281
290
|
*/
|
|
282
|
-
NotehubRoute.prototype[
|
|
291
|
+
NotehubRoute.prototype['label'] = undefined;
|
|
283
292
|
|
|
284
293
|
/**
|
|
285
294
|
* @member {Date} modified
|
|
286
295
|
*/
|
|
287
|
-
NotehubRoute.prototype[
|
|
296
|
+
NotehubRoute.prototype['modified'] = undefined;
|
|
288
297
|
|
|
289
298
|
/**
|
|
290
299
|
* @member {module:model/MqttRoute} mqtt
|
|
291
300
|
*/
|
|
292
|
-
NotehubRoute.prototype[
|
|
301
|
+
NotehubRoute.prototype['mqtt'] = undefined;
|
|
293
302
|
|
|
294
303
|
/**
|
|
295
304
|
* @member {module:model/ProxyRoute} proxy
|
|
296
305
|
*/
|
|
297
|
-
NotehubRoute.prototype[
|
|
306
|
+
NotehubRoute.prototype['proxy'] = undefined;
|
|
298
307
|
|
|
299
308
|
/**
|
|
300
309
|
* @member {module:model/QubitroRoute} qubitro
|
|
301
310
|
*/
|
|
302
|
-
NotehubRoute.prototype[
|
|
311
|
+
NotehubRoute.prototype['qubitro'] = undefined;
|
|
303
312
|
|
|
304
313
|
/**
|
|
305
314
|
* @member {module:model/RadRoute} radnote
|
|
306
315
|
*/
|
|
307
|
-
NotehubRoute.prototype[
|
|
316
|
+
NotehubRoute.prototype['radnote'] = undefined;
|
|
308
317
|
|
|
309
318
|
/**
|
|
310
319
|
* @member {module:model/S3ArchiveRoute} s3archive
|
|
311
320
|
*/
|
|
312
|
-
NotehubRoute.prototype[
|
|
321
|
+
NotehubRoute.prototype['s3archive'] = undefined;
|
|
313
322
|
|
|
314
323
|
/**
|
|
315
324
|
* @member {module:model/SlackRoute} slack
|
|
316
325
|
*/
|
|
317
|
-
NotehubRoute.prototype[
|
|
326
|
+
NotehubRoute.prototype['slack'] = undefined;
|
|
318
327
|
|
|
319
328
|
/**
|
|
320
329
|
* @member {module:model/SnowflakeRoute} snowflake
|
|
321
330
|
*/
|
|
322
|
-
NotehubRoute.prototype[
|
|
331
|
+
NotehubRoute.prototype['snowflake'] = undefined;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* @member {module:model/SnowpipeStreamingRoute} snowpipe_streaming
|
|
335
|
+
*/
|
|
336
|
+
NotehubRoute.prototype['snowpipe_streaming'] = undefined;
|
|
323
337
|
|
|
324
338
|
/**
|
|
325
339
|
* @member {module:model/ThingworxRoute} thingworx
|
|
326
340
|
*/
|
|
327
|
-
NotehubRoute.prototype[
|
|
341
|
+
NotehubRoute.prototype['thingworx'] = undefined;
|
|
328
342
|
|
|
329
343
|
/**
|
|
330
344
|
* @member {module:model/TwilioRoute} twilio
|
|
331
345
|
*/
|
|
332
|
-
NotehubRoute.prototype[
|
|
346
|
+
NotehubRoute.prototype['twilio'] = undefined;
|
|
333
347
|
|
|
334
348
|
/**
|
|
335
349
|
* Mirrors hublib.RouteType.
|
|
336
350
|
* @member {String} type
|
|
337
351
|
*/
|
|
338
|
-
NotehubRoute.prototype[
|
|
352
|
+
NotehubRoute.prototype['type'] = undefined;
|
|
339
353
|
|
|
340
354
|
/**
|
|
341
355
|
* @member {String} uid
|
|
342
356
|
*/
|
|
343
|
-
NotehubRoute.prototype[
|
|
357
|
+
NotehubRoute.prototype['uid'] = undefined;
|
|
344
358
|
var _default = exports["default"] = NotehubRoute;
|