@blues-inc/notehub-js 1.0.35 → 1.0.36-beta.1
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 +236 -222
- 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 +455 -359
- 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 -0
- package/dist/model/Alert.js +76 -74
- 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 +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/DataSet.js +30 -29
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +102 -101
- package/dist/model/DeviceDfuHistory.js +20 -19
- 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/DeviceDfuStatusCurrent.js +32 -32
- 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 +269 -0
- package/dist/model/EnvVar.js +119 -0
- 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 +15 -14
- package/dist/model/GetBillingAccounts200Response.js +10 -9
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +16 -16
- package/dist/model/GetDeviceHealthLog200Response.js +12 -11
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatest200Response.js +10 -9
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDeviceSessions200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +17 -16
- package/dist/model/GetProjectEvents200Response.js +21 -20
- package/dist/model/GetProjectEventsByCursor200Response.js +24 -23
- package/dist/model/GetProjectFleets200Response.js +12 -11
- package/dist/model/GetProjectMembers200Response.js +12 -11
- package/dist/model/GetProjectProducts200Response.js +10 -9
- package/dist/model/GetProjects200Response.js +10 -9
- package/dist/model/GetWebhooks200Response.js +10 -9
- 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 +100 -99
- package/dist/model/MonitorAlertRoutesInner.js +9 -10
- package/dist/model/Mqtt.js +66 -66
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +19 -18
- package/dist/model/NotehubRoute.js +36 -36
- package/dist/model/NotehubRouteSchema.js +45 -46
- 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 +40 -38
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/Slack.js +53 -53
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/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
|
@@ -0,0 +1,119 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* Notehub API
|
|
16
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
+
*
|
|
18
|
+
* The version of the OpenAPI document: 1.2.0
|
|
19
|
+
* Contact: engineering@blues.io
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The EnvVar model module.
|
|
28
|
+
* @module model/EnvVar
|
|
29
|
+
* @version 1.0.36-beta.1
|
|
30
|
+
*/
|
|
31
|
+
var EnvVar = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>EnvVar</code>.
|
|
34
|
+
* @alias module:model/EnvVar
|
|
35
|
+
*/
|
|
36
|
+
function EnvVar() {
|
|
37
|
+
_classCallCheck(this, EnvVar);
|
|
38
|
+
EnvVar.initialize(this);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the fields of this object.
|
|
43
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
+
* Only for internal use.
|
|
45
|
+
*/
|
|
46
|
+
return _createClass(EnvVar, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>EnvVar</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
+
* @param {module:model/EnvVar} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/EnvVar} The populated <code>EnvVar</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new EnvVar();
|
|
62
|
+
if (data.hasOwnProperty('key')) {
|
|
63
|
+
obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('value')) {
|
|
66
|
+
obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('used')) {
|
|
69
|
+
obj['used'] = _ApiClient["default"].convertToType(data['used'], 'Boolean');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('precedence')) {
|
|
72
|
+
obj['precedence'] = _ApiClient["default"].convertToType(data['precedence'], 'Number');
|
|
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>EnvVar</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>EnvVar</code>.
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "validateJSON",
|
|
87
|
+
value: function validateJSON(data) {
|
|
88
|
+
// ensure the json data is a string
|
|
89
|
+
if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
|
|
90
|
+
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
|
|
91
|
+
}
|
|
92
|
+
// ensure the json data is a string
|
|
93
|
+
if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
}]);
|
|
99
|
+
}();
|
|
100
|
+
/**
|
|
101
|
+
* @member {String} key
|
|
102
|
+
*/
|
|
103
|
+
EnvVar.prototype['key'] = undefined;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @member {String} value
|
|
107
|
+
*/
|
|
108
|
+
EnvVar.prototype['value'] = undefined;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @member {Boolean} used
|
|
112
|
+
*/
|
|
113
|
+
EnvVar.prototype['used'] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @member {Number} precedence
|
|
117
|
+
*/
|
|
118
|
+
EnvVar.prototype['precedence'] = undefined;
|
|
119
|
+
var _default = exports["default"] = EnvVar;
|
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
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
18
|
* Notehub API
|
|
19
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
@@ -29,13 +29,13 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The EnvironmentVariables model module.
|
|
31
31
|
* @module model/EnvironmentVariables
|
|
32
|
-
* @version 1.0.
|
|
32
|
+
* @version 1.0.36-beta.1
|
|
33
33
|
*/
|
|
34
34
|
var EnvironmentVariables = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
36
36
|
* Constructs a new <code>EnvironmentVariables</code>.
|
|
37
37
|
* @alias module:model/EnvironmentVariables
|
|
38
|
-
* @param environmentVariables {Object.<String, String>}
|
|
38
|
+
* @param environmentVariables {Object.<String, String>}
|
|
39
39
|
*/
|
|
40
40
|
function EnvironmentVariables(environmentVariables) {
|
|
41
41
|
_classCallCheck(this, EnvironmentVariables);
|
|
@@ -50,7 +50,7 @@ var EnvironmentVariables = /*#__PURE__*/function () {
|
|
|
50
50
|
return _createClass(EnvironmentVariables, null, [{
|
|
51
51
|
key: "initialize",
|
|
52
52
|
value: function initialize(obj, environmentVariables) {
|
|
53
|
-
obj[
|
|
53
|
+
obj['environment_variables'] = environmentVariables;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
|
@@ -65,9 +65,9 @@ var EnvironmentVariables = /*#__PURE__*/function () {
|
|
|
65
65
|
value: function constructFromObject(data, obj) {
|
|
66
66
|
if (data) {
|
|
67
67
|
obj = obj || new EnvironmentVariables();
|
|
68
|
-
if (data.hasOwnProperty(
|
|
69
|
-
obj[
|
|
70
|
-
String:
|
|
68
|
+
if (data.hasOwnProperty('environment_variables')) {
|
|
69
|
+
obj['environment_variables'] = _ApiClient["default"].convertToType(data['environment_variables'], {
|
|
70
|
+
'String': 'String'
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
} else if (data === null) {
|
|
@@ -108,5 +108,5 @@ EnvironmentVariables.RequiredProperties = ["environment_variables"];
|
|
|
108
108
|
/**
|
|
109
109
|
* @member {Object.<String, String>} environment_variables
|
|
110
110
|
*/
|
|
111
|
-
EnvironmentVariables.prototype[
|
|
111
|
+
EnvironmentVariables.prototype['environment_variables'] = undefined;
|
|
112
112
|
var _default = exports["default"] = EnvironmentVariables;
|
package/dist/model/Error.js
CHANGED
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
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
18
|
* Notehub API
|
|
19
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
19
|
+
* The OpenAPI definition for the Notehub.io API.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: 1.2.0
|
|
22
22
|
* Contact: engineering@blues.io
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The Error model module.
|
|
31
31
|
* @module model/Error
|
|
32
|
-
* @version 1.0.
|
|
32
|
+
* @version 1.0.36-beta.1
|
|
33
33
|
*/
|
|
34
34
|
var Error = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -52,9 +52,9 @@ var Error = /*#__PURE__*/function () {
|
|
|
52
52
|
return _createClass(Error, null, [{
|
|
53
53
|
key: "initialize",
|
|
54
54
|
value: function initialize(obj, err, code, status) {
|
|
55
|
-
obj[
|
|
56
|
-
obj[
|
|
57
|
-
obj[
|
|
55
|
+
obj['err'] = err;
|
|
56
|
+
obj['code'] = code;
|
|
57
|
+
obj['status'] = status;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
@@ -69,23 +69,23 @@ var Error = /*#__PURE__*/function () {
|
|
|
69
69
|
value: function constructFromObject(data, obj) {
|
|
70
70
|
if (data) {
|
|
71
71
|
obj = obj || new Error();
|
|
72
|
-
if (data.hasOwnProperty(
|
|
73
|
-
obj[
|
|
72
|
+
if (data.hasOwnProperty('err')) {
|
|
73
|
+
obj['err'] = _ApiClient["default"].convertToType(data['err'], 'String');
|
|
74
74
|
}
|
|
75
|
-
if (data.hasOwnProperty(
|
|
76
|
-
obj[
|
|
75
|
+
if (data.hasOwnProperty('code')) {
|
|
76
|
+
obj['code'] = _ApiClient["default"].convertToType(data['code'], 'Number');
|
|
77
77
|
}
|
|
78
|
-
if (data.hasOwnProperty(
|
|
79
|
-
obj[
|
|
78
|
+
if (data.hasOwnProperty('status')) {
|
|
79
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
80
80
|
}
|
|
81
|
-
if (data.hasOwnProperty(
|
|
82
|
-
obj[
|
|
81
|
+
if (data.hasOwnProperty('request')) {
|
|
82
|
+
obj['request'] = _ApiClient["default"].convertToType(data['request'], 'String');
|
|
83
83
|
}
|
|
84
|
-
if (data.hasOwnProperty(
|
|
85
|
-
obj[
|
|
84
|
+
if (data.hasOwnProperty('details')) {
|
|
85
|
+
obj['details'] = _ApiClient["default"].convertToType(data['details'], Object);
|
|
86
86
|
}
|
|
87
|
-
if (data.hasOwnProperty(
|
|
88
|
-
obj[
|
|
87
|
+
if (data.hasOwnProperty('debug')) {
|
|
88
|
+
obj['debug'] = _ApiClient["default"].convertToType(data['debug'], 'String');
|
|
89
89
|
}
|
|
90
90
|
} else if (data === null) {
|
|
91
91
|
return null;
|
|
@@ -117,20 +117,20 @@ var Error = /*#__PURE__*/function () {
|
|
|
117
117
|
} finally {
|
|
118
118
|
_iterator.f();
|
|
119
119
|
}
|
|
120
|
-
if (data[
|
|
121
|
-
throw new Error("Expected the field `err` to be a primitive type in the JSON string but got " + data[
|
|
120
|
+
if (data['err'] && !(typeof data['err'] === 'string' || data['err'] instanceof String)) {
|
|
121
|
+
throw new Error("Expected the field `err` to be a primitive type in the JSON string but got " + data['err']);
|
|
122
122
|
}
|
|
123
123
|
// ensure the json data is a string
|
|
124
|
-
if (data[
|
|
125
|
-
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data[
|
|
124
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
125
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
126
126
|
}
|
|
127
127
|
// ensure the json data is a string
|
|
128
|
-
if (data[
|
|
129
|
-
throw new Error("Expected the field `request` to be a primitive type in the JSON string but got " + data[
|
|
128
|
+
if (data['request'] && !(typeof data['request'] === 'string' || data['request'] instanceof String)) {
|
|
129
|
+
throw new Error("Expected the field `request` to be a primitive type in the JSON string but got " + data['request']);
|
|
130
130
|
}
|
|
131
131
|
// ensure the json data is a string
|
|
132
|
-
if (data[
|
|
133
|
-
throw new Error("Expected the field `debug` to be a primitive type in the JSON string but got " + data[
|
|
132
|
+
if (data['debug'] && !(typeof data['debug'] === 'string' || data['debug'] instanceof String)) {
|
|
133
|
+
throw new Error("Expected the field `debug` to be a primitive type in the JSON string but got " + data['debug']);
|
|
134
134
|
}
|
|
135
135
|
return true;
|
|
136
136
|
}
|
|
@@ -142,32 +142,32 @@ Error.RequiredProperties = ["err", "code", "status"];
|
|
|
142
142
|
* Human readable error message.
|
|
143
143
|
* @member {String} err
|
|
144
144
|
*/
|
|
145
|
-
Error.prototype[
|
|
145
|
+
Error.prototype['err'] = undefined;
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
* The HTTP error code associated with the error.
|
|
149
149
|
* @member {Number} code
|
|
150
150
|
*/
|
|
151
|
-
Error.prototype[
|
|
151
|
+
Error.prototype['code'] = undefined;
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* Machine readable representation of the HTTP error code.
|
|
155
155
|
* @member {String} status
|
|
156
156
|
*/
|
|
157
|
-
Error.prototype[
|
|
157
|
+
Error.prototype['status'] = undefined;
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* @member {String} request
|
|
161
161
|
*/
|
|
162
|
-
Error.prototype[
|
|
162
|
+
Error.prototype['request'] = undefined;
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* @member {Object} details
|
|
166
166
|
*/
|
|
167
|
-
Error.prototype[
|
|
167
|
+
Error.prototype['details'] = undefined;
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
170
|
* @member {String} debug
|
|
171
171
|
*/
|
|
172
|
-
Error.prototype[
|
|
172
|
+
Error.prototype['debug'] = undefined;
|
|
173
173
|
var _default = exports["default"] = Error;
|