@blues-inc/notehub-js 1.0.35-beta.9 → 1.0.36
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 +227 -244
- package/dist/ApiClient.js +156 -156
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +16 -16
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +404 -351
- package/dist/api/EventApi.js +130 -130
- package/dist/api/ExternalDevicesApi.js +41 -41
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +441 -355
- package/dist/api/RepositoryApi.js +103 -103
- package/dist/api/RouteApi.js +81 -81
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +14 -63
- 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/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/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/DataSet.js +29 -30
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +101 -102
- package/dist/model/DeviceDfuHistory.js +19 -20
- 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/DeviceDfuStatusCurrent.js +32 -32
- 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 +267 -0
- package/dist/model/{ApiKeySecret.js → EnvVar.js} +46 -32
- 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 +36 -27
- package/dist/model/GetAlerts200Response.js +14 -15
- package/dist/model/GetBillingAccounts200Response.js +9 -10
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +16 -16
- package/dist/model/GetDeviceHealthLog200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatest200Response.js +9 -10
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDeviceSessions200Response.js +16 -17
- 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/GetProjectFleets200Response.js +11 -12
- package/dist/model/GetProjectMembers200Response.js +11 -12
- package/dist/model/GetProjectProducts200Response.js +9 -10
- package/dist/model/GetProjects200Response.js +9 -10
- 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/HttpFilter.js +19 -19
- package/dist/model/HttpTransform.js +20 -20
- 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/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/QuestionDataResponseLineChart.js +39 -39
- package/dist/model/QuestionDataResponseMap.js +16 -16
- 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 +44 -35
- package/dist/model/SchemaProperty.js +38 -40
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/Slack.js +53 -53
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/Snowflake.js +45 -45
- package/dist/model/SnowflakeTransform.js +12 -12
- 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 +31 -22
- package/dist/model/UploadMetadata.js +59 -59
- 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/api/ApiAccessApi.js +0 -238
- package/dist/model/ApiKey.js +0 -186
- package/dist/model/ApiKeyCreatedBy.js +0 -116
- package/dist/model/ApiKeyPermissionEntry.js +0 -127
- package/dist/model/ApiKeyPermissions.js +0 -141
- package/dist/model/UpdateApiKeyRequest.js +0 -135
- package/dist/model/UpdateApiKeyRequestRoles.js +0 -141
- package/dist/model/UpdateApiKeyRole.js +0 -103
|
@@ -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 DeviceTowerInfo model module.
|
|
28
28
|
* @module model/DeviceTowerInfo
|
|
29
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.36
|
|
30
30
|
*/
|
|
31
31
|
var DeviceTowerInfo = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,17 +59,17 @@ var DeviceTowerInfo = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new DeviceTowerInfo();
|
|
62
|
-
if (data.hasOwnProperty(
|
|
63
|
-
obj[
|
|
62
|
+
if (data.hasOwnProperty("mcc")) {
|
|
63
|
+
obj["mcc"] = _ApiClient["default"].convertToType(data["mcc"], "Number");
|
|
64
64
|
}
|
|
65
|
-
if (data.hasOwnProperty(
|
|
66
|
-
obj[
|
|
65
|
+
if (data.hasOwnProperty("mnc")) {
|
|
66
|
+
obj["mnc"] = _ApiClient["default"].convertToType(data["mnc"], "Number");
|
|
67
67
|
}
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
68
|
+
if (data.hasOwnProperty("lac")) {
|
|
69
|
+
obj["lac"] = _ApiClient["default"].convertToType(data["lac"], "Number");
|
|
70
70
|
}
|
|
71
|
-
if (data.hasOwnProperty(
|
|
72
|
-
obj[
|
|
71
|
+
if (data.hasOwnProperty("cell_id")) {
|
|
72
|
+
obj["cell_id"] = _ApiClient["default"].convertToType(data["cell_id"], "Number");
|
|
73
73
|
}
|
|
74
74
|
} else if (data === null) {
|
|
75
75
|
return null;
|
|
@@ -92,20 +92,20 @@ var DeviceTowerInfo = /*#__PURE__*/function () {
|
|
|
92
92
|
/**
|
|
93
93
|
* @member {Number} mcc
|
|
94
94
|
*/
|
|
95
|
-
DeviceTowerInfo.prototype[
|
|
95
|
+
DeviceTowerInfo.prototype["mcc"] = undefined;
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* @member {Number} mnc
|
|
99
99
|
*/
|
|
100
|
-
DeviceTowerInfo.prototype[
|
|
100
|
+
DeviceTowerInfo.prototype["mnc"] = undefined;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* @member {Number} lac
|
|
104
104
|
*/
|
|
105
|
-
DeviceTowerInfo.prototype[
|
|
105
|
+
DeviceTowerInfo.prototype["lac"] = undefined;
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* @member {Number} cell_id
|
|
109
109
|
*/
|
|
110
|
-
DeviceTowerInfo.prototype[
|
|
110
|
+
DeviceTowerInfo.prototype["cell_id"] = undefined;
|
|
111
111
|
var _default = exports["default"] = DeviceTowerInfo;
|
|
@@ -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 DeviceUsage model module.
|
|
28
28
|
* @module model/DeviceUsage
|
|
29
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.36
|
|
30
30
|
*/
|
|
31
31
|
var DeviceUsage = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,35 +59,35 @@ var DeviceUsage = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new DeviceUsage();
|
|
62
|
-
if (data.hasOwnProperty(
|
|
63
|
-
obj[
|
|
62
|
+
if (data.hasOwnProperty("since")) {
|
|
63
|
+
obj["since"] = _ApiClient["default"].convertToType(data["since"], "Number");
|
|
64
64
|
}
|
|
65
|
-
if (data.hasOwnProperty(
|
|
66
|
-
obj[
|
|
65
|
+
if (data.hasOwnProperty("duration")) {
|
|
66
|
+
obj["duration"] = _ApiClient["default"].convertToType(data["duration"], "Number");
|
|
67
67
|
}
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
68
|
+
if (data.hasOwnProperty("bytes_rcvd")) {
|
|
69
|
+
obj["bytes_rcvd"] = _ApiClient["default"].convertToType(data["bytes_rcvd"], "Number");
|
|
70
70
|
}
|
|
71
|
-
if (data.hasOwnProperty(
|
|
72
|
-
obj[
|
|
71
|
+
if (data.hasOwnProperty("bytes_sent")) {
|
|
72
|
+
obj["bytes_sent"] = _ApiClient["default"].convertToType(data["bytes_sent"], "Number");
|
|
73
73
|
}
|
|
74
|
-
if (data.hasOwnProperty(
|
|
75
|
-
obj[
|
|
74
|
+
if (data.hasOwnProperty("bytes_rcvd_secondary")) {
|
|
75
|
+
obj["bytes_rcvd_secondary"] = _ApiClient["default"].convertToType(data["bytes_rcvd_secondary"], "Number");
|
|
76
76
|
}
|
|
77
|
-
if (data.hasOwnProperty(
|
|
78
|
-
obj[
|
|
77
|
+
if (data.hasOwnProperty("bytes_sent_secondary")) {
|
|
78
|
+
obj["bytes_sent_secondary"] = _ApiClient["default"].convertToType(data["bytes_sent_secondary"], "Number");
|
|
79
79
|
}
|
|
80
|
-
if (data.hasOwnProperty(
|
|
81
|
-
obj[
|
|
80
|
+
if (data.hasOwnProperty("sessions_tcp")) {
|
|
81
|
+
obj["sessions_tcp"] = _ApiClient["default"].convertToType(data["sessions_tcp"], "Number");
|
|
82
82
|
}
|
|
83
|
-
if (data.hasOwnProperty(
|
|
84
|
-
obj[
|
|
83
|
+
if (data.hasOwnProperty("sessions_tls")) {
|
|
84
|
+
obj["sessions_tls"] = _ApiClient["default"].convertToType(data["sessions_tls"], "Number");
|
|
85
85
|
}
|
|
86
|
-
if (data.hasOwnProperty(
|
|
87
|
-
obj[
|
|
86
|
+
if (data.hasOwnProperty("notes_rcvd")) {
|
|
87
|
+
obj["notes_rcvd"] = _ApiClient["default"].convertToType(data["notes_rcvd"], "Number");
|
|
88
88
|
}
|
|
89
|
-
if (data.hasOwnProperty(
|
|
90
|
-
obj[
|
|
89
|
+
if (data.hasOwnProperty("notes_sent")) {
|
|
90
|
+
obj["notes_sent"] = _ApiClient["default"].convertToType(data["notes_sent"], "Number");
|
|
91
91
|
}
|
|
92
92
|
} else if (data === null) {
|
|
93
93
|
return null;
|
|
@@ -111,51 +111,51 @@ var DeviceUsage = /*#__PURE__*/function () {
|
|
|
111
111
|
* Unix timestamp
|
|
112
112
|
* @member {Number} since
|
|
113
113
|
*/
|
|
114
|
-
DeviceUsage.prototype[
|
|
114
|
+
DeviceUsage.prototype["since"] = undefined;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Duration in seconds
|
|
118
118
|
* @member {Number} duration
|
|
119
119
|
*/
|
|
120
|
-
DeviceUsage.prototype[
|
|
120
|
+
DeviceUsage.prototype["duration"] = undefined;
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
123
|
* @member {Number} bytes_rcvd
|
|
124
124
|
*/
|
|
125
|
-
DeviceUsage.prototype[
|
|
125
|
+
DeviceUsage.prototype["bytes_rcvd"] = undefined;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* @member {Number} bytes_sent
|
|
129
129
|
*/
|
|
130
|
-
DeviceUsage.prototype[
|
|
130
|
+
DeviceUsage.prototype["bytes_sent"] = undefined;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* @member {Number} bytes_rcvd_secondary
|
|
134
134
|
*/
|
|
135
|
-
DeviceUsage.prototype[
|
|
135
|
+
DeviceUsage.prototype["bytes_rcvd_secondary"] = undefined;
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* @member {Number} bytes_sent_secondary
|
|
139
139
|
*/
|
|
140
|
-
DeviceUsage.prototype[
|
|
140
|
+
DeviceUsage.prototype["bytes_sent_secondary"] = undefined;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* @member {Number} sessions_tcp
|
|
144
144
|
*/
|
|
145
|
-
DeviceUsage.prototype[
|
|
145
|
+
DeviceUsage.prototype["sessions_tcp"] = undefined;
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
* @member {Number} sessions_tls
|
|
149
149
|
*/
|
|
150
|
-
DeviceUsage.prototype[
|
|
150
|
+
DeviceUsage.prototype["sessions_tls"] = undefined;
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* @member {Number} notes_rcvd
|
|
154
154
|
*/
|
|
155
|
-
DeviceUsage.prototype[
|
|
155
|
+
DeviceUsage.prototype["notes_rcvd"] = undefined;
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* @member {Number} notes_sent
|
|
159
159
|
*/
|
|
160
|
-
DeviceUsage.prototype[
|
|
160
|
+
DeviceUsage.prototype["notes_sent"] = undefined;
|
|
161
161
|
var _default = exports["default"] = DeviceUsage;
|
|
@@ -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 DfuActionRequest model module.
|
|
28
28
|
* @module model/DfuActionRequest
|
|
29
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.36
|
|
30
30
|
*/
|
|
31
31
|
var DfuActionRequest = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,8 +59,8 @@ var DfuActionRequest = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new DfuActionRequest();
|
|
62
|
-
if (data.hasOwnProperty(
|
|
63
|
-
obj[
|
|
62
|
+
if (data.hasOwnProperty("filename")) {
|
|
63
|
+
obj["filename"] = _ApiClient["default"].convertToType(data["filename"], "String");
|
|
64
64
|
}
|
|
65
65
|
} else if (data === null) {
|
|
66
66
|
return null;
|
|
@@ -77,8 +77,8 @@ var DfuActionRequest = /*#__PURE__*/function () {
|
|
|
77
77
|
key: "validateJSON",
|
|
78
78
|
value: function validateJSON(data) {
|
|
79
79
|
// ensure the json data is a string
|
|
80
|
-
if (data[
|
|
81
|
-
throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data[
|
|
80
|
+
if (data["filename"] && !(typeof data["filename"] === "string" || data["filename"] instanceof String)) {
|
|
81
|
+
throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data["filename"]);
|
|
82
82
|
}
|
|
83
83
|
return true;
|
|
84
84
|
}
|
|
@@ -88,5 +88,5 @@ var DfuActionRequest = /*#__PURE__*/function () {
|
|
|
88
88
|
* The name of the firmware file
|
|
89
89
|
* @member {String} filename
|
|
90
90
|
*/
|
|
91
|
-
DfuActionRequest.prototype[
|
|
91
|
+
DfuActionRequest.prototype["filename"] = undefined;
|
|
92
92
|
var _default = exports["default"] = DfuActionRequest;
|
|
@@ -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 EmailNotification model module.
|
|
28
28
|
* @module model/EmailNotification
|
|
29
|
-
* @version 1.0.
|
|
29
|
+
* @version 1.0.36
|
|
30
30
|
*/
|
|
31
31
|
var EmailNotification = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
@@ -59,8 +59,8 @@ var EmailNotification = /*#__PURE__*/function () {
|
|
|
59
59
|
value: function constructFromObject(data, obj) {
|
|
60
60
|
if (data) {
|
|
61
61
|
obj = obj || new EmailNotification();
|
|
62
|
-
if (data.hasOwnProperty(
|
|
63
|
-
obj[
|
|
62
|
+
if (data.hasOwnProperty("email")) {
|
|
63
|
+
obj["email"] = _ApiClient["default"].convertToType(data["email"], "String");
|
|
64
64
|
}
|
|
65
65
|
} else if (data === null) {
|
|
66
66
|
return null;
|
|
@@ -77,8 +77,8 @@ var EmailNotification = /*#__PURE__*/function () {
|
|
|
77
77
|
key: "validateJSON",
|
|
78
78
|
value: function validateJSON(data) {
|
|
79
79
|
// ensure the json data is a string
|
|
80
|
-
if (data[
|
|
81
|
-
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data[
|
|
80
|
+
if (data["email"] && !(typeof data["email"] === "string" || data["email"] instanceof String)) {
|
|
81
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data["email"]);
|
|
82
82
|
}
|
|
83
83
|
return true;
|
|
84
84
|
}
|
|
@@ -88,5 +88,5 @@ var EmailNotification = /*#__PURE__*/function () {
|
|
|
88
88
|
* Email Address
|
|
89
89
|
* @member {String} email
|
|
90
90
|
*/
|
|
91
|
-
EmailNotification.prototype[
|
|
91
|
+
EmailNotification.prototype["email"] = undefined;
|
|
92
92
|
var _default = exports["default"] = EmailNotification;
|
|
@@ -0,0 +1,267 @@
|
|
|
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
|
+
var _EnvVar = _interopRequireDefault(require("./EnvVar"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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); }
|
|
11
|
+
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* Notehub API
|
|
20
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
+
*
|
|
22
|
+
* The version of the OpenAPI document: 1.2.0
|
|
23
|
+
* Contact: engineering@blues.io
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The EnvTreeJsonNode model module.
|
|
32
|
+
* @module model/EnvTreeJsonNode
|
|
33
|
+
* @version 1.0.36
|
|
34
|
+
*/
|
|
35
|
+
var EnvTreeJsonNode = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>EnvTreeJsonNode</code>.
|
|
38
|
+
* @alias module:model/EnvTreeJsonNode
|
|
39
|
+
* @param varCount {Number}
|
|
40
|
+
* @param inheritedVarCount {Number}
|
|
41
|
+
* @param type {String}
|
|
42
|
+
* @param variables {Array.<module:model/EnvVar>}
|
|
43
|
+
* @param children {Array.<module:model/EnvTreeJsonNode>}
|
|
44
|
+
*/
|
|
45
|
+
function EnvTreeJsonNode(varCount, inheritedVarCount, type, variables, children) {
|
|
46
|
+
_classCallCheck(this, EnvTreeJsonNode);
|
|
47
|
+
EnvTreeJsonNode.initialize(this, varCount, inheritedVarCount, type, variables, children);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the fields of this object.
|
|
52
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
53
|
+
* Only for internal use.
|
|
54
|
+
*/
|
|
55
|
+
return _createClass(EnvTreeJsonNode, null, [{
|
|
56
|
+
key: "initialize",
|
|
57
|
+
value: function initialize(obj, varCount, inheritedVarCount, type, variables, children) {
|
|
58
|
+
obj["var_count"] = varCount;
|
|
59
|
+
obj["inherited_var_count"] = inheritedVarCount;
|
|
60
|
+
obj["type"] = type;
|
|
61
|
+
obj["variables"] = variables;
|
|
62
|
+
obj["children"] = children;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Constructs a <code>EnvTreeJsonNode</code> from a plain JavaScript object, optionally creating a new instance.
|
|
67
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @param {module:model/EnvTreeJsonNode} obj Optional instance to populate.
|
|
70
|
+
* @return {module:model/EnvTreeJsonNode} The populated <code>EnvTreeJsonNode</code> instance.
|
|
71
|
+
*/
|
|
72
|
+
}, {
|
|
73
|
+
key: "constructFromObject",
|
|
74
|
+
value: function constructFromObject(data, obj) {
|
|
75
|
+
if (data) {
|
|
76
|
+
obj = obj || new EnvTreeJsonNode();
|
|
77
|
+
if (data.hasOwnProperty("var_count")) {
|
|
78
|
+
obj["var_count"] = _ApiClient["default"].convertToType(data["var_count"], "Number");
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty("inherited_var_count")) {
|
|
81
|
+
obj["inherited_var_count"] = _ApiClient["default"].convertToType(data["inherited_var_count"], "Number");
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty("type")) {
|
|
84
|
+
obj["type"] = _ApiClient["default"].convertToType(data["type"], "String");
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty("variables")) {
|
|
87
|
+
obj["variables"] = _ApiClient["default"].convertToType(data["variables"], [_EnvVar["default"]]);
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty("children")) {
|
|
90
|
+
obj["children"] = _ApiClient["default"].convertToType(data["children"], [EnvTreeJsonNode]);
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty("device_uid")) {
|
|
93
|
+
obj["device_uid"] = _ApiClient["default"].convertToType(data["device_uid"], "String");
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty("fleet_label")) {
|
|
96
|
+
obj["fleet_label"] = _ApiClient["default"].convertToType(data["fleet_label"], "String");
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty("fleet_uid")) {
|
|
99
|
+
obj["fleet_uid"] = _ApiClient["default"].convertToType(data["fleet_uid"], "String");
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty("app_uid")) {
|
|
102
|
+
obj["app_uid"] = _ApiClient["default"].convertToType(data["app_uid"], "String");
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty("app_label")) {
|
|
105
|
+
obj["app_label"] = _ApiClient["default"].convertToType(data["app_label"], "String");
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty("url")) {
|
|
108
|
+
obj["url"] = _ApiClient["default"].convertToType(data["url"], "String");
|
|
109
|
+
}
|
|
110
|
+
} else if (data === null) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
return obj;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Validates the JSON data with respect to <code>EnvTreeJsonNode</code>.
|
|
118
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
119
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>EnvTreeJsonNode</code>.
|
|
120
|
+
*/
|
|
121
|
+
}, {
|
|
122
|
+
key: "validateJSON",
|
|
123
|
+
value: function validateJSON(data) {
|
|
124
|
+
// check to make sure all required properties are present in the JSON string
|
|
125
|
+
var _iterator = _createForOfIteratorHelper(EnvTreeJsonNode.RequiredProperties),
|
|
126
|
+
_step;
|
|
127
|
+
try {
|
|
128
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
129
|
+
var property = _step.value;
|
|
130
|
+
if (!data[property]) {
|
|
131
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// ensure the json data is a string
|
|
135
|
+
} catch (err) {
|
|
136
|
+
_iterator.e(err);
|
|
137
|
+
} finally {
|
|
138
|
+
_iterator.f();
|
|
139
|
+
}
|
|
140
|
+
if (data["type"] && !(typeof data["type"] === "string" || data["type"] instanceof String)) {
|
|
141
|
+
throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data["type"]);
|
|
142
|
+
}
|
|
143
|
+
if (data["variables"]) {
|
|
144
|
+
// data not null
|
|
145
|
+
// ensure the json data is an array
|
|
146
|
+
if (!Array.isArray(data["variables"])) {
|
|
147
|
+
throw new Error("Expected the field `variables` to be an array in the JSON data but got " + data["variables"]);
|
|
148
|
+
}
|
|
149
|
+
// validate the optional field `variables` (array)
|
|
150
|
+
var _iterator2 = _createForOfIteratorHelper(data["variables"]),
|
|
151
|
+
_step2;
|
|
152
|
+
try {
|
|
153
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
154
|
+
var item = _step2.value;
|
|
155
|
+
_EnvVar["default"].validateJsonObject(item);
|
|
156
|
+
}
|
|
157
|
+
} catch (err) {
|
|
158
|
+
_iterator2.e(err);
|
|
159
|
+
} finally {
|
|
160
|
+
_iterator2.f();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (data["children"]) {
|
|
164
|
+
// data not null
|
|
165
|
+
// ensure the json data is an array
|
|
166
|
+
if (!Array.isArray(data["children"])) {
|
|
167
|
+
throw new Error("Expected the field `children` to be an array in the JSON data but got " + data["children"]);
|
|
168
|
+
}
|
|
169
|
+
// validate the optional field `children` (array)
|
|
170
|
+
var _iterator3 = _createForOfIteratorHelper(data["children"]),
|
|
171
|
+
_step3;
|
|
172
|
+
try {
|
|
173
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
174
|
+
var _item = _step3.value;
|
|
175
|
+
EnvTreeJsonNode.validateJsonObject(_item);
|
|
176
|
+
}
|
|
177
|
+
} catch (err) {
|
|
178
|
+
_iterator3.e(err);
|
|
179
|
+
} finally {
|
|
180
|
+
_iterator3.f();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// ensure the json data is a string
|
|
184
|
+
if (data["device_uid"] && !(typeof data["device_uid"] === "string" || data["device_uid"] instanceof String)) {
|
|
185
|
+
throw new Error("Expected the field `device_uid` to be a primitive type in the JSON string but got " + data["device_uid"]);
|
|
186
|
+
}
|
|
187
|
+
// ensure the json data is a string
|
|
188
|
+
if (data["fleet_label"] && !(typeof data["fleet_label"] === "string" || data["fleet_label"] instanceof String)) {
|
|
189
|
+
throw new Error("Expected the field `fleet_label` to be a primitive type in the JSON string but got " + data["fleet_label"]);
|
|
190
|
+
}
|
|
191
|
+
// ensure the json data is a string
|
|
192
|
+
if (data["fleet_uid"] && !(typeof data["fleet_uid"] === "string" || data["fleet_uid"] instanceof String)) {
|
|
193
|
+
throw new Error("Expected the field `fleet_uid` to be a primitive type in the JSON string but got " + data["fleet_uid"]);
|
|
194
|
+
}
|
|
195
|
+
// ensure the json data is a string
|
|
196
|
+
if (data["app_uid"] && !(typeof data["app_uid"] === "string" || data["app_uid"] instanceof String)) {
|
|
197
|
+
throw new Error("Expected the field `app_uid` to be a primitive type in the JSON string but got " + data["app_uid"]);
|
|
198
|
+
}
|
|
199
|
+
// ensure the json data is a string
|
|
200
|
+
if (data["app_label"] && !(typeof data["app_label"] === "string" || data["app_label"] instanceof String)) {
|
|
201
|
+
throw new Error("Expected the field `app_label` to be a primitive type in the JSON string but got " + data["app_label"]);
|
|
202
|
+
}
|
|
203
|
+
// ensure the json data is a string
|
|
204
|
+
if (data["url"] && !(typeof data["url"] === "string" || data["url"] instanceof String)) {
|
|
205
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data["url"]);
|
|
206
|
+
}
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
}]);
|
|
210
|
+
}();
|
|
211
|
+
EnvTreeJsonNode.RequiredProperties = ["var_count", "inherited_var_count", "type", "variables", "children"];
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @member {Number} var_count
|
|
215
|
+
*/
|
|
216
|
+
EnvTreeJsonNode.prototype["var_count"] = undefined;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @member {Number} inherited_var_count
|
|
220
|
+
*/
|
|
221
|
+
EnvTreeJsonNode.prototype["inherited_var_count"] = undefined;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @member {String} type
|
|
225
|
+
*/
|
|
226
|
+
EnvTreeJsonNode.prototype["type"] = undefined;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @member {Array.<module:model/EnvVar>} variables
|
|
230
|
+
*/
|
|
231
|
+
EnvTreeJsonNode.prototype["variables"] = undefined;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @member {Array.<module:model/EnvTreeJsonNode>} children
|
|
235
|
+
*/
|
|
236
|
+
EnvTreeJsonNode.prototype["children"] = undefined;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @member {String} device_uid
|
|
240
|
+
*/
|
|
241
|
+
EnvTreeJsonNode.prototype["device_uid"] = undefined;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @member {String} fleet_label
|
|
245
|
+
*/
|
|
246
|
+
EnvTreeJsonNode.prototype["fleet_label"] = undefined;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @member {String} fleet_uid
|
|
250
|
+
*/
|
|
251
|
+
EnvTreeJsonNode.prototype["fleet_uid"] = undefined;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @member {String} app_uid
|
|
255
|
+
*/
|
|
256
|
+
EnvTreeJsonNode.prototype["app_uid"] = undefined;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* @member {String} app_label
|
|
260
|
+
*/
|
|
261
|
+
EnvTreeJsonNode.prototype["app_label"] = undefined;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @member {String} url
|
|
265
|
+
*/
|
|
266
|
+
EnvTreeJsonNode.prototype["url"] = undefined;
|
|
267
|
+
var _default = exports["default"] = EnvTreeJsonNode;
|