@blues-inc/notehub-js 4.0.0-beta.9 → 5.0.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 +244 -248
- package/dist/ApiClient.js +150 -150
- 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 +359 -359
- 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 +387 -381
- package/dist/api/RouteApi.js +83 -77
- package/dist/api/UsageApi.js +63 -63
- package/dist/api/WebhookApi.js +51 -51
- package/dist/index.js +7 -0
- package/dist/model/AddDeviceToFleetsRequest.js +8 -8
- package/dist/model/Alert.js +74 -76
- package/dist/model/AlertDataInner.js +36 -36
- 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 +20 -20
- package/dist/model/CreateMonitor.js +126 -127
- 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/DeleteDeviceFromFleetsRequest.js +8 -8
- package/dist/model/DeleteNotefilesRequest.js +7 -7
- package/dist/model/Device.js +106 -107
- 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/Filter.js +16 -16
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +38 -38
- package/dist/model/FleetConnectivityAssurance.js +5 -5
- 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 +43 -57
- package/dist/model/GetDbNote200Response.js +13 -13
- 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/GetDeviceLatestEvents200Response.js +9 -10
- package/dist/model/GetDevicePlans200Response.js +9 -40
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDevicePublicKeys200Response.js +16 -17
- package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetDeviceSessions200Response.js +16 -17
- package/dist/model/GetDevices200Response.js +16 -17
- package/dist/model/GetEvents200Response.js +20 -21
- package/dist/model/GetEventsByCursor200Response.js +23 -24
- package/dist/model/GetNotefile200Response.js +11 -11
- package/dist/model/GetProducts200Response.js +9 -10
- package/dist/model/GetProjectMembers200Response.js +11 -12
- package/dist/model/GetProjects200Response.js +9 -10
- package/dist/model/GetRouteLogsUsage200Response.js +11 -12
- package/dist/model/GetSessionsUsage200Response.js +11 -12
- package/dist/model/GetWebhooks200Response.js +9 -10
- package/dist/model/GoogleRoute.js +33 -33
- package/dist/model/HttpRoute.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 +100 -101
- package/dist/model/MonitorAlertRoutesInner.js +10 -9
- package/dist/model/MqttRoute.js +68 -68
- package/dist/model/Note.js +31 -31
- package/dist/model/NoteInput.js +9 -9
- package/dist/model/Notefile.js +22 -23
- package/dist/model/NotefileSchema.js +18 -19
- package/dist/model/NotehubRoute.js +103 -103
- 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/ProvisionDeviceRequest.js +18 -18
- package/dist/model/ProxyRoute.js +29 -29
- 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 +18 -18
- package/dist/model/S3ArchiveRoute.js +79 -79
- package/dist/model/SatelliteDataUsage.js +144 -0
- package/dist/model/SatellitePlan.js +39 -39
- package/dist/model/SchemaProperty.js +36 -38
- package/dist/model/SignalDevice200Response.js +5 -5
- 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 +60 -60
- 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 +33 -33
- package/dist/model/UploadMetadata.js +64 -64
- package/dist/model/UsageData.js +33 -33
- package/dist/model/UsageEventsData.js +37 -37
- package/dist/model/UsageEventsResponse.js +11 -12
- package/dist/model/UsageRouteLogsData.js +27 -27
- package/dist/model/UsageSessionsData.js +32 -32
- 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
|
@@ -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,12 +26,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
/**
|
|
27
27
|
* The RouteTransformSettings model module.
|
|
28
28
|
* @module model/RouteTransformSettings
|
|
29
|
-
* @version
|
|
29
|
+
* @version 5.0.0
|
|
30
30
|
*/
|
|
31
31
|
var RouteTransformSettings = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>RouteTransformSettings</code>.
|
|
34
|
-
* Settings for transforming route payloads before delivery. Supports format selection and JSONata-based transformations.
|
|
34
|
+
* Settings for transforming route payloads before delivery. Supports format selection and JSONata-based transformations.
|
|
35
35
|
* @alias module:model/RouteTransformSettings
|
|
36
36
|
*/
|
|
37
37
|
function RouteTransformSettings() {
|
|
@@ -60,14 +60,14 @@ var RouteTransformSettings = /*#__PURE__*/function () {
|
|
|
60
60
|
value: function constructFromObject(data, obj) {
|
|
61
61
|
if (data) {
|
|
62
62
|
obj = obj || new RouteTransformSettings();
|
|
63
|
-
if (data.hasOwnProperty(
|
|
64
|
-
obj[
|
|
63
|
+
if (data.hasOwnProperty("format")) {
|
|
64
|
+
obj["format"] = _ApiClient["default"].convertToType(data["format"], "String");
|
|
65
65
|
}
|
|
66
|
-
if (data.hasOwnProperty(
|
|
67
|
-
obj[
|
|
66
|
+
if (data.hasOwnProperty("jsonata")) {
|
|
67
|
+
obj["jsonata"] = _ApiClient["default"].convertToType(data["jsonata"], "String");
|
|
68
68
|
}
|
|
69
|
-
if (data.hasOwnProperty(
|
|
70
|
-
obj[
|
|
69
|
+
if (data.hasOwnProperty("jsonata_in")) {
|
|
70
|
+
obj["jsonata_in"] = _ApiClient["default"].convertToType(data["jsonata_in"], "String");
|
|
71
71
|
}
|
|
72
72
|
} else if (data === null) {
|
|
73
73
|
return null;
|
|
@@ -84,16 +84,16 @@ var RouteTransformSettings = /*#__PURE__*/function () {
|
|
|
84
84
|
key: "validateJSON",
|
|
85
85
|
value: function validateJSON(data) {
|
|
86
86
|
// ensure the json data is a string
|
|
87
|
-
if (data[
|
|
88
|
-
throw new Error("Expected the field `format` to be a primitive type in the JSON string but got " + data[
|
|
87
|
+
if (data["format"] && !(typeof data["format"] === "string" || data["format"] instanceof String)) {
|
|
88
|
+
throw new Error("Expected the field `format` to be a primitive type in the JSON string but got " + data["format"]);
|
|
89
89
|
}
|
|
90
90
|
// ensure the json data is a string
|
|
91
|
-
if (data[
|
|
92
|
-
throw new Error("Expected the field `jsonata` to be a primitive type in the JSON string but got " + data[
|
|
91
|
+
if (data["jsonata"] && !(typeof data["jsonata"] === "string" || data["jsonata"] instanceof String)) {
|
|
92
|
+
throw new Error("Expected the field `jsonata` to be a primitive type in the JSON string but got " + data["jsonata"]);
|
|
93
93
|
}
|
|
94
94
|
// ensure the json data is a string
|
|
95
|
-
if (data[
|
|
96
|
-
throw new Error("Expected the field `jsonata_in` to be a primitive type in the JSON string but got " + data[
|
|
95
|
+
if (data["jsonata_in"] && !(typeof data["jsonata_in"] === "string" || data["jsonata_in"] instanceof String)) {
|
|
96
|
+
throw new Error("Expected the field `jsonata_in` to be a primitive type in the JSON string but got " + data["jsonata_in"]);
|
|
97
97
|
}
|
|
98
98
|
return true;
|
|
99
99
|
}
|
|
@@ -103,17 +103,17 @@ var RouteTransformSettings = /*#__PURE__*/function () {
|
|
|
103
103
|
* Output format for transformed data (e.g., \"json\", \"xml\", \"text\").
|
|
104
104
|
* @member {String} format
|
|
105
105
|
*/
|
|
106
|
-
RouteTransformSettings.prototype[
|
|
106
|
+
RouteTransformSettings.prototype["format"] = undefined;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* JSONata expression used to transform the data payload (outgoing).
|
|
110
110
|
* @member {String} jsonata
|
|
111
111
|
*/
|
|
112
|
-
RouteTransformSettings.prototype[
|
|
112
|
+
RouteTransformSettings.prototype["jsonata"] = undefined;
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* JSONata expression used to transform the data payload (incoming).
|
|
116
116
|
* @member {String} jsonata_in
|
|
117
117
|
*/
|
|
118
|
-
RouteTransformSettings.prototype[
|
|
118
|
+
RouteTransformSettings.prototype["jsonata_in"] = undefined;
|
|
119
119
|
var _default = exports["default"] = RouteTransformSettings;
|
|
@@ -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 S3ArchiveRoute model module.
|
|
30
30
|
* @module model/S3ArchiveRoute
|
|
31
|
-
* @version
|
|
31
|
+
* @version 5.0.0
|
|
32
32
|
*/
|
|
33
33
|
var S3ArchiveRoute = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
@@ -61,56 +61,56 @@ var S3ArchiveRoute = /*#__PURE__*/function () {
|
|
|
61
61
|
value: function constructFromObject(data, obj) {
|
|
62
62
|
if (data) {
|
|
63
63
|
obj = obj || new S3ArchiveRoute();
|
|
64
|
-
if (data.hasOwnProperty(
|
|
65
|
-
obj[
|
|
64
|
+
if (data.hasOwnProperty("archive_count_exceeds")) {
|
|
65
|
+
obj["archive_count_exceeds"] = _ApiClient["default"].convertToType(data["archive_count_exceeds"], "Number");
|
|
66
66
|
}
|
|
67
|
-
if (data.hasOwnProperty(
|
|
68
|
-
obj[
|
|
67
|
+
if (data.hasOwnProperty("archive_every_mins")) {
|
|
68
|
+
obj["archive_every_mins"] = _ApiClient["default"].convertToType(data["archive_every_mins"], "Number");
|
|
69
69
|
}
|
|
70
|
-
if (data.hasOwnProperty(
|
|
71
|
-
obj[
|
|
70
|
+
if (data.hasOwnProperty("archive_id")) {
|
|
71
|
+
obj["archive_id"] = _ApiClient["default"].convertToType(data["archive_id"], "String");
|
|
72
72
|
}
|
|
73
|
-
if (data.hasOwnProperty(
|
|
74
|
-
obj[
|
|
73
|
+
if (data.hasOwnProperty("bucket_endpoint")) {
|
|
74
|
+
obj["bucket_endpoint"] = _ApiClient["default"].convertToType(data["bucket_endpoint"], "String");
|
|
75
75
|
}
|
|
76
|
-
if (data.hasOwnProperty(
|
|
77
|
-
obj[
|
|
76
|
+
if (data.hasOwnProperty("bucket_name")) {
|
|
77
|
+
obj["bucket_name"] = _ApiClient["default"].convertToType(data["bucket_name"], "String");
|
|
78
78
|
}
|
|
79
|
-
if (data.hasOwnProperty(
|
|
80
|
-
obj[
|
|
79
|
+
if (data.hasOwnProperty("bucket_region")) {
|
|
80
|
+
obj["bucket_region"] = _ApiClient["default"].convertToType(data["bucket_region"], "String");
|
|
81
81
|
}
|
|
82
|
-
if (data.hasOwnProperty(
|
|
83
|
-
obj[
|
|
82
|
+
if (data.hasOwnProperty("file_access")) {
|
|
83
|
+
obj["file_access"] = _ApiClient["default"].convertToType(data["file_access"], "String");
|
|
84
84
|
}
|
|
85
|
-
if (data.hasOwnProperty(
|
|
86
|
-
obj[
|
|
85
|
+
if (data.hasOwnProperty("file_folder")) {
|
|
86
|
+
obj["file_folder"] = _ApiClient["default"].convertToType(data["file_folder"], "String");
|
|
87
87
|
}
|
|
88
|
-
if (data.hasOwnProperty(
|
|
89
|
-
obj[
|
|
88
|
+
if (data.hasOwnProperty("file_format")) {
|
|
89
|
+
obj["file_format"] = _ApiClient["default"].convertToType(data["file_format"], "String");
|
|
90
90
|
}
|
|
91
|
-
if (data.hasOwnProperty(
|
|
92
|
-
obj[
|
|
91
|
+
if (data.hasOwnProperty("filter")) {
|
|
92
|
+
obj["filter"] = _Filter["default"].constructFromObject(data["filter"]);
|
|
93
93
|
}
|
|
94
|
-
if (data.hasOwnProperty(
|
|
95
|
-
obj[
|
|
94
|
+
if (data.hasOwnProperty("fleets")) {
|
|
95
|
+
obj["fleets"] = _ApiClient["default"].convertToType(data["fleets"], ["String"]);
|
|
96
96
|
}
|
|
97
|
-
if (data.hasOwnProperty(
|
|
98
|
-
obj[
|
|
97
|
+
if (data.hasOwnProperty("key_id")) {
|
|
98
|
+
obj["key_id"] = _ApiClient["default"].convertToType(data["key_id"], "String");
|
|
99
99
|
}
|
|
100
|
-
if (data.hasOwnProperty(
|
|
101
|
-
obj[
|
|
100
|
+
if (data.hasOwnProperty("key_secret")) {
|
|
101
|
+
obj["key_secret"] = _ApiClient["default"].convertToType(data["key_secret"], "String");
|
|
102
102
|
}
|
|
103
|
-
if (data.hasOwnProperty(
|
|
104
|
-
obj[
|
|
103
|
+
if (data.hasOwnProperty("throttle_ms")) {
|
|
104
|
+
obj["throttle_ms"] = _ApiClient["default"].convertToType(data["throttle_ms"], "Number");
|
|
105
105
|
}
|
|
106
|
-
if (data.hasOwnProperty(
|
|
107
|
-
obj[
|
|
106
|
+
if (data.hasOwnProperty("timeout")) {
|
|
107
|
+
obj["timeout"] = _ApiClient["default"].convertToType(data["timeout"], "Number");
|
|
108
108
|
}
|
|
109
|
-
if (data.hasOwnProperty(
|
|
110
|
-
obj[
|
|
109
|
+
if (data.hasOwnProperty("transform")) {
|
|
110
|
+
obj["transform"] = _RouteTransformSettings["default"].constructFromObject(data["transform"]);
|
|
111
111
|
}
|
|
112
|
-
if (data.hasOwnProperty(
|
|
113
|
-
obj[
|
|
112
|
+
if (data.hasOwnProperty("url")) {
|
|
113
|
+
obj["url"] = _ApiClient["default"].convertToType(data["url"], "String");
|
|
114
114
|
}
|
|
115
115
|
} else if (data === null) {
|
|
116
116
|
return null;
|
|
@@ -127,58 +127,58 @@ var S3ArchiveRoute = /*#__PURE__*/function () {
|
|
|
127
127
|
key: "validateJSON",
|
|
128
128
|
value: function validateJSON(data) {
|
|
129
129
|
// ensure the json data is a string
|
|
130
|
-
if (data[
|
|
131
|
-
throw new Error("Expected the field `archive_id` to be a primitive type in the JSON string but got " + data[
|
|
130
|
+
if (data["archive_id"] && !(typeof data["archive_id"] === "string" || data["archive_id"] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `archive_id` to be a primitive type in the JSON string but got " + data["archive_id"]);
|
|
132
132
|
}
|
|
133
133
|
// ensure the json data is a string
|
|
134
|
-
if (data[
|
|
135
|
-
throw new Error("Expected the field `bucket_endpoint` to be a primitive type in the JSON string but got " + data[
|
|
134
|
+
if (data["bucket_endpoint"] && !(typeof data["bucket_endpoint"] === "string" || data["bucket_endpoint"] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `bucket_endpoint` to be a primitive type in the JSON string but got " + data["bucket_endpoint"]);
|
|
136
136
|
}
|
|
137
137
|
// ensure the json data is a string
|
|
138
|
-
if (data[
|
|
139
|
-
throw new Error("Expected the field `bucket_name` to be a primitive type in the JSON string but got " + data[
|
|
138
|
+
if (data["bucket_name"] && !(typeof data["bucket_name"] === "string" || data["bucket_name"] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `bucket_name` to be a primitive type in the JSON string but got " + data["bucket_name"]);
|
|
140
140
|
}
|
|
141
141
|
// ensure the json data is a string
|
|
142
|
-
if (data[
|
|
143
|
-
throw new Error("Expected the field `bucket_region` to be a primitive type in the JSON string but got " + data[
|
|
142
|
+
if (data["bucket_region"] && !(typeof data["bucket_region"] === "string" || data["bucket_region"] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `bucket_region` to be a primitive type in the JSON string but got " + data["bucket_region"]);
|
|
144
144
|
}
|
|
145
145
|
// ensure the json data is a string
|
|
146
|
-
if (data[
|
|
147
|
-
throw new Error("Expected the field `file_access` to be a primitive type in the JSON string but got " + data[
|
|
146
|
+
if (data["file_access"] && !(typeof data["file_access"] === "string" || data["file_access"] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `file_access` to be a primitive type in the JSON string but got " + data["file_access"]);
|
|
148
148
|
}
|
|
149
149
|
// ensure the json data is a string
|
|
150
|
-
if (data[
|
|
151
|
-
throw new Error("Expected the field `file_folder` to be a primitive type in the JSON string but got " + data[
|
|
150
|
+
if (data["file_folder"] && !(typeof data["file_folder"] === "string" || data["file_folder"] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `file_folder` to be a primitive type in the JSON string but got " + data["file_folder"]);
|
|
152
152
|
}
|
|
153
153
|
// ensure the json data is a string
|
|
154
|
-
if (data[
|
|
155
|
-
throw new Error("Expected the field `file_format` to be a primitive type in the JSON string but got " + data[
|
|
154
|
+
if (data["file_format"] && !(typeof data["file_format"] === "string" || data["file_format"] instanceof String)) {
|
|
155
|
+
throw new Error("Expected the field `file_format` to be a primitive type in the JSON string but got " + data["file_format"]);
|
|
156
156
|
}
|
|
157
157
|
// validate the optional field `filter`
|
|
158
|
-
if (data[
|
|
158
|
+
if (data["filter"]) {
|
|
159
159
|
// data not null
|
|
160
|
-
_Filter["default"].validateJSON(data[
|
|
160
|
+
_Filter["default"].validateJSON(data["filter"]);
|
|
161
161
|
}
|
|
162
162
|
// ensure the json data is an array
|
|
163
|
-
if (!Array.isArray(data[
|
|
164
|
-
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data[
|
|
163
|
+
if (!Array.isArray(data["fleets"])) {
|
|
164
|
+
throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data["fleets"]);
|
|
165
165
|
}
|
|
166
166
|
// ensure the json data is a string
|
|
167
|
-
if (data[
|
|
168
|
-
throw new Error("Expected the field `key_id` to be a primitive type in the JSON string but got " + data[
|
|
167
|
+
if (data["key_id"] && !(typeof data["key_id"] === "string" || data["key_id"] instanceof String)) {
|
|
168
|
+
throw new Error("Expected the field `key_id` to be a primitive type in the JSON string but got " + data["key_id"]);
|
|
169
169
|
}
|
|
170
170
|
// ensure the json data is a string
|
|
171
|
-
if (data[
|
|
172
|
-
throw new Error("Expected the field `key_secret` to be a primitive type in the JSON string but got " + data[
|
|
171
|
+
if (data["key_secret"] && !(typeof data["key_secret"] === "string" || data["key_secret"] instanceof String)) {
|
|
172
|
+
throw new Error("Expected the field `key_secret` to be a primitive type in the JSON string but got " + data["key_secret"]);
|
|
173
173
|
}
|
|
174
174
|
// validate the optional field `transform`
|
|
175
|
-
if (data[
|
|
175
|
+
if (data["transform"]) {
|
|
176
176
|
// data not null
|
|
177
|
-
_RouteTransformSettings["default"].validateJSON(data[
|
|
177
|
+
_RouteTransformSettings["default"].validateJSON(data["transform"]);
|
|
178
178
|
}
|
|
179
179
|
// ensure the json data is a string
|
|
180
|
-
if (data[
|
|
181
|
-
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data[
|
|
180
|
+
if (data["url"] && !(typeof data["url"] === "string" || data["url"] instanceof String)) {
|
|
181
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data["url"]);
|
|
182
182
|
}
|
|
183
183
|
return true;
|
|
184
184
|
}
|
|
@@ -187,85 +187,85 @@ var S3ArchiveRoute = /*#__PURE__*/function () {
|
|
|
187
187
|
/**
|
|
188
188
|
* @member {Number} archive_count_exceeds
|
|
189
189
|
*/
|
|
190
|
-
S3ArchiveRoute.prototype[
|
|
190
|
+
S3ArchiveRoute.prototype["archive_count_exceeds"] = undefined;
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
193
|
* @member {Number} archive_every_mins
|
|
194
194
|
*/
|
|
195
|
-
S3ArchiveRoute.prototype[
|
|
195
|
+
S3ArchiveRoute.prototype["archive_every_mins"] = undefined;
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
198
|
* @member {String} archive_id
|
|
199
199
|
*/
|
|
200
|
-
S3ArchiveRoute.prototype[
|
|
200
|
+
S3ArchiveRoute.prototype["archive_id"] = undefined;
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
203
|
* @member {String} bucket_endpoint
|
|
204
204
|
*/
|
|
205
|
-
S3ArchiveRoute.prototype[
|
|
205
|
+
S3ArchiveRoute.prototype["bucket_endpoint"] = undefined;
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
208
|
* @member {String} bucket_name
|
|
209
209
|
*/
|
|
210
|
-
S3ArchiveRoute.prototype[
|
|
210
|
+
S3ArchiveRoute.prototype["bucket_name"] = undefined;
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
213
|
* @member {String} bucket_region
|
|
214
214
|
*/
|
|
215
|
-
S3ArchiveRoute.prototype[
|
|
215
|
+
S3ArchiveRoute.prototype["bucket_region"] = undefined;
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* @member {String} file_access
|
|
219
219
|
*/
|
|
220
|
-
S3ArchiveRoute.prototype[
|
|
220
|
+
S3ArchiveRoute.prototype["file_access"] = undefined;
|
|
221
221
|
|
|
222
222
|
/**
|
|
223
223
|
* @member {String} file_folder
|
|
224
224
|
*/
|
|
225
|
-
S3ArchiveRoute.prototype[
|
|
225
|
+
S3ArchiveRoute.prototype["file_folder"] = undefined;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* @member {String} file_format
|
|
229
229
|
*/
|
|
230
|
-
S3ArchiveRoute.prototype[
|
|
230
|
+
S3ArchiveRoute.prototype["file_format"] = undefined;
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
233
|
* @member {module:model/Filter} filter
|
|
234
234
|
*/
|
|
235
|
-
S3ArchiveRoute.prototype[
|
|
235
|
+
S3ArchiveRoute.prototype["filter"] = undefined;
|
|
236
236
|
|
|
237
237
|
/**
|
|
238
238
|
* @member {Array.<String>} fleets
|
|
239
239
|
*/
|
|
240
|
-
S3ArchiveRoute.prototype[
|
|
240
|
+
S3ArchiveRoute.prototype["fleets"] = undefined;
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
243
|
* @member {String} key_id
|
|
244
244
|
*/
|
|
245
|
-
S3ArchiveRoute.prototype[
|
|
245
|
+
S3ArchiveRoute.prototype["key_id"] = undefined;
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* @member {String} key_secret
|
|
249
249
|
*/
|
|
250
|
-
S3ArchiveRoute.prototype[
|
|
250
|
+
S3ArchiveRoute.prototype["key_secret"] = undefined;
|
|
251
251
|
|
|
252
252
|
/**
|
|
253
253
|
* @member {Number} throttle_ms
|
|
254
254
|
*/
|
|
255
|
-
S3ArchiveRoute.prototype[
|
|
255
|
+
S3ArchiveRoute.prototype["throttle_ms"] = undefined;
|
|
256
256
|
|
|
257
257
|
/**
|
|
258
258
|
* @member {Number} timeout
|
|
259
259
|
*/
|
|
260
|
-
S3ArchiveRoute.prototype[
|
|
260
|
+
S3ArchiveRoute.prototype["timeout"] = undefined;
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
263
|
* @member {module:model/RouteTransformSettings} transform
|
|
264
264
|
*/
|
|
265
|
-
S3ArchiveRoute.prototype[
|
|
265
|
+
S3ArchiveRoute.prototype["transform"] = undefined;
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
268
|
* @member {String} url
|
|
269
269
|
*/
|
|
270
|
-
S3ArchiveRoute.prototype[
|
|
270
|
+
S3ArchiveRoute.prototype["url"] = undefined;
|
|
271
271
|
var _default = exports["default"] = S3ArchiveRoute;
|
|
@@ -0,0 +1,144 @@
|
|
|
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 SatelliteDataUsage model module.
|
|
31
|
+
* @module model/SatelliteDataUsage
|
|
32
|
+
* @version 5.0.0
|
|
33
|
+
*/
|
|
34
|
+
var SatelliteDataUsage = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>SatelliteDataUsage</code>.
|
|
37
|
+
* @alias module:model/SatelliteDataUsage
|
|
38
|
+
* @param bytesRemaining {Number} Bytes remaining in the plan
|
|
39
|
+
* @param bytesTotal {Number} Total bytes included in the plan
|
|
40
|
+
* @param bytesUsed {Number} Bytes used to date
|
|
41
|
+
* @param bytesUsedBillable {Number} Billable bytes used to date
|
|
42
|
+
*/
|
|
43
|
+
function SatelliteDataUsage(bytesRemaining, bytesTotal, bytesUsed, bytesUsedBillable) {
|
|
44
|
+
_classCallCheck(this, SatelliteDataUsage);
|
|
45
|
+
SatelliteDataUsage.initialize(this, bytesRemaining, bytesTotal, bytesUsed, bytesUsedBillable);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(SatelliteDataUsage, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, bytesRemaining, bytesTotal, bytesUsed, bytesUsedBillable) {
|
|
56
|
+
obj["bytes_remaining"] = bytesRemaining;
|
|
57
|
+
obj["bytes_total"] = bytesTotal;
|
|
58
|
+
obj["bytes_used"] = bytesUsed;
|
|
59
|
+
obj["bytes_used_billable"] = bytesUsedBillable;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructs a <code>SatelliteDataUsage</code> from a plain JavaScript object, optionally creating a new instance.
|
|
64
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @param {module:model/SatelliteDataUsage} obj Optional instance to populate.
|
|
67
|
+
* @return {module:model/SatelliteDataUsage} The populated <code>SatelliteDataUsage</code> instance.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "constructFromObject",
|
|
71
|
+
value: function constructFromObject(data, obj) {
|
|
72
|
+
if (data) {
|
|
73
|
+
obj = obj || new SatelliteDataUsage();
|
|
74
|
+
if (data.hasOwnProperty("bytes_remaining")) {
|
|
75
|
+
obj["bytes_remaining"] = _ApiClient["default"].convertToType(data["bytes_remaining"], "Number");
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty("bytes_total")) {
|
|
78
|
+
obj["bytes_total"] = _ApiClient["default"].convertToType(data["bytes_total"], "Number");
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty("bytes_used")) {
|
|
81
|
+
obj["bytes_used"] = _ApiClient["default"].convertToType(data["bytes_used"], "Number");
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty("bytes_used_billable")) {
|
|
84
|
+
obj["bytes_used_billable"] = _ApiClient["default"].convertToType(data["bytes_used_billable"], "Number");
|
|
85
|
+
}
|
|
86
|
+
} else if (data === null) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
return obj;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Validates the JSON data with respect to <code>SatelliteDataUsage</code>.
|
|
94
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
95
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SatelliteDataUsage</code>.
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "validateJSON",
|
|
99
|
+
value: function validateJSON(data) {
|
|
100
|
+
// check to make sure all required properties are present in the JSON string
|
|
101
|
+
var _iterator = _createForOfIteratorHelper(SatelliteDataUsage.RequiredProperties),
|
|
102
|
+
_step;
|
|
103
|
+
try {
|
|
104
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
105
|
+
var property = _step.value;
|
|
106
|
+
if (!data[property]) {
|
|
107
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
} catch (err) {
|
|
111
|
+
_iterator.e(err);
|
|
112
|
+
} finally {
|
|
113
|
+
_iterator.f();
|
|
114
|
+
}
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
}]);
|
|
118
|
+
}();
|
|
119
|
+
SatelliteDataUsage.RequiredProperties = ["bytes_remaining", "bytes_total", "bytes_used", "bytes_used_billable"];
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Bytes remaining in the plan
|
|
123
|
+
* @member {Number} bytes_remaining
|
|
124
|
+
*/
|
|
125
|
+
SatelliteDataUsage.prototype["bytes_remaining"] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Total bytes included in the plan
|
|
129
|
+
* @member {Number} bytes_total
|
|
130
|
+
*/
|
|
131
|
+
SatelliteDataUsage.prototype["bytes_total"] = undefined;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Bytes used to date
|
|
135
|
+
* @member {Number} bytes_used
|
|
136
|
+
*/
|
|
137
|
+
SatelliteDataUsage.prototype["bytes_used"] = undefined;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Billable bytes used to date
|
|
141
|
+
* @member {Number} bytes_used_billable
|
|
142
|
+
*/
|
|
143
|
+
SatelliteDataUsage.prototype["bytes_used_billable"] = undefined;
|
|
144
|
+
var _default = exports["default"] = SatelliteDataUsage;
|