@blues-inc/notehub-js 1.0.29 → 1.0.31-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.
Files changed (119) hide show
  1. package/README.md +220 -207
  2. package/dist/ApiClient.js +156 -156
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +16 -16
  5. package/dist/api/BillingAccountApi.js +14 -14
  6. package/dist/api/DeviceApi.js +351 -351
  7. package/dist/api/EventApi.js +118 -118
  8. package/dist/api/MonitorApi.js +52 -52
  9. package/dist/api/ProjectApi.js +375 -335
  10. package/dist/api/RepositoryApi.js +103 -103
  11. package/dist/api/RouteApi.js +74 -74
  12. package/dist/index.js +21 -0
  13. package/dist/model/Alert.js +76 -74
  14. package/dist/model/AlertDataInner.js +35 -35
  15. package/dist/model/AlertNotificationsInner.js +18 -18
  16. package/dist/model/Aws.js +65 -65
  17. package/dist/model/Azure.js +43 -43
  18. package/dist/model/BillingAccount.js +21 -21
  19. package/dist/model/BillingAccountRole.js +9 -9
  20. package/dist/model/Body.js +5 -5
  21. package/dist/model/CloneProjectRequest.js +20 -20
  22. package/dist/model/Contact.js +22 -22
  23. package/dist/model/CreateFleetRequest.js +12 -12
  24. package/dist/model/CreateMonitor.js +126 -125
  25. package/dist/model/CreateProductRequest.js +22 -22
  26. package/dist/model/CreateProjectRequest.js +16 -16
  27. package/dist/model/CreateUpdateRepository.js +17 -17
  28. package/dist/model/CurrentFirmware.js +12 -12
  29. package/dist/model/DFUEnv.js +12 -12
  30. package/dist/model/DFUState.js +65 -65
  31. package/dist/model/DataField.js +7 -7
  32. package/dist/model/DataSet.js +30 -29
  33. package/dist/model/DataSetField.js +19 -19
  34. package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
  35. package/dist/model/Device.js +124 -94
  36. package/dist/model/DeviceDfuHistory.js +20 -19
  37. package/dist/model/DeviceDfuHistoryPage.js +13 -12
  38. package/dist/model/DeviceDfuStateMachine.js +25 -24
  39. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  40. package/dist/model/DeviceDfuStatus.js +20 -20
  41. package/dist/model/DeviceDfuStatusCurrent.js +32 -32
  42. package/dist/model/DeviceDfuStatusPage.js +13 -12
  43. package/dist/model/DeviceSession.js +182 -182
  44. package/dist/model/DeviceTowerInfo.js +14 -14
  45. package/dist/model/DeviceUsage.js +32 -32
  46. package/dist/model/DfuActionRequest.js +7 -7
  47. package/dist/model/EmailNotification.js +7 -7
  48. package/dist/model/EnvironmentVariables.js +8 -8
  49. package/dist/model/Error.js +31 -31
  50. package/dist/model/Event.js +243 -243
  51. package/dist/model/Firmware.js +49 -49
  52. package/dist/model/FirmwareInfo.js +60 -60
  53. package/dist/model/Fleet.js +34 -23
  54. package/dist/model/GetAlerts200Response.js +15 -14
  55. package/dist/model/GetBillingAccounts200Response.js +10 -9
  56. package/dist/model/GetDeviceEnvironmentVariables200Response.js +23 -12
  57. package/dist/model/GetDeviceHealthLog200Response.js +12 -11
  58. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  59. package/dist/model/GetDeviceLatest200Response.js +10 -9
  60. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  61. package/dist/model/GetDeviceSessions200Response.js +17 -16
  62. package/dist/model/GetProjectDevicePublicKeys200Response.js +17 -16
  63. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
  64. package/dist/model/GetProjectDevices200Response.js +17 -16
  65. package/dist/model/GetProjectEvents200Response.js +21 -20
  66. package/dist/model/GetProjectEventsByCursor200Response.js +24 -23
  67. package/dist/model/GetProjectFleets200Response.js +12 -11
  68. package/dist/model/GetProjectMembers200Response.js +12 -11
  69. package/dist/model/GetProjectProducts200Response.js +10 -9
  70. package/dist/model/GetProjects200Response.js +10 -9
  71. package/dist/model/GetRouteLogsByRoute200ResponseInner.js +35 -35
  72. package/dist/model/Google.js +33 -33
  73. package/dist/model/HandleNoteChanges200Response.js +11 -11
  74. package/dist/model/HandleNoteGet200Response.js +13 -13
  75. package/dist/model/HandleNoteSignal200Response.js +5 -5
  76. package/dist/model/HandleNotefileChanges200Response.js +11 -11
  77. package/dist/model/HandleNotefileChangesPending200Response.js +14 -14
  78. package/dist/model/HandleNotefileDeleteRequest.js +7 -7
  79. package/dist/model/Http.js +35 -35
  80. package/dist/model/HttpFilter.js +19 -19
  81. package/dist/model/HttpTransform.js +20 -20
  82. package/dist/model/Location.js +40 -40
  83. package/dist/model/Login200Response.js +7 -7
  84. package/dist/model/LoginRequest.js +12 -12
  85. package/dist/model/Monitor.js +100 -99
  86. package/dist/model/MonitorAlertRoutesInner.js +9 -10
  87. package/dist/model/Mqtt.js +66 -66
  88. package/dist/model/Note.js +10 -10
  89. package/dist/model/NotefileSchema.js +146 -0
  90. package/dist/model/NotehubRoute.js +36 -36
  91. package/dist/model/NotehubRouteSchema.js +45 -46
  92. package/dist/model/PostProvisionProjectDeviceRequest.js +18 -18
  93. package/dist/model/Product.js +26 -26
  94. package/dist/model/Project.js +34 -34
  95. package/dist/model/ProjectMember.js +22 -22
  96. package/dist/model/Proxy.js +24 -24
  97. package/dist/model/PutDeviceFleetsRequest.js +8 -8
  98. package/dist/model/QuestionDataResponseLineChart.js +39 -39
  99. package/dist/model/QuestionDataResponseMap.js +16 -16
  100. package/dist/model/Radresponder.js +25 -25
  101. package/dist/model/Repository.js +22 -22
  102. package/dist/model/Role.js +9 -9
  103. package/dist/model/SchemaProperty.js +230 -0
  104. package/dist/model/SimUsage.js +128 -0
  105. package/dist/model/Slack.js +53 -53
  106. package/dist/model/SlackBearerNotification.js +25 -25
  107. package/dist/model/SlackWebHookNotification.js +20 -20
  108. package/dist/model/Snowflake.js +45 -45
  109. package/dist/model/SnowflakeTransform.js +12 -12
  110. package/dist/model/Thingworx.js +33 -33
  111. package/dist/model/TowerLocation.js +52 -52
  112. package/dist/model/Twilio.js +43 -43
  113. package/dist/model/UpdateFleetRequest.js +22 -22
  114. package/dist/model/UploadMetadata.js +59 -59
  115. package/dist/model/UserDbRoute.js +25 -25
  116. package/dist/model/UserDfuStateMachine.js +20 -20
  117. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  118. package/dist/model/UserFirmwareInfo.js +12 -12
  119. package/package.json +3 -3
@@ -15,7 +15,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
16
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
17
17
  * Notehub API
18
- * The OpenAPI definition for the Notehub.io API.
18
+ * The OpenAPI definition for the Notehub.io API.
19
19
  *
20
20
  * The version of the OpenAPI document: 1.2.0
21
21
  * Contact: engineering@blues.io
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  /**
29
29
  * The Mqtt model module.
30
30
  * @module model/Mqtt
31
- * @version 1.0.29
31
+ * @version 1.0.31-beta.1
32
32
  */
33
33
  var Mqtt = /*#__PURE__*/function () {
34
34
  /**
@@ -62,47 +62,47 @@ var Mqtt = /*#__PURE__*/function () {
62
62
  value: function constructFromObject(data, obj) {
63
63
  if (data) {
64
64
  obj = obj || new Mqtt();
65
- if (data.hasOwnProperty("fleets")) {
66
- obj["fleets"] = _ApiClient["default"].convertToType(data["fleets"], ["String"]);
65
+ if (data.hasOwnProperty('fleets')) {
66
+ obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], ['String']);
67
67
  }
68
- if (data.hasOwnProperty("filter")) {
69
- obj["filter"] = _HttpFilter["default"].constructFromObject(data["filter"]);
68
+ if (data.hasOwnProperty('filter')) {
69
+ obj['filter'] = _HttpFilter["default"].constructFromObject(data['filter']);
70
70
  }
71
- if (data.hasOwnProperty("transform")) {
72
- obj["transform"] = _HttpTransform["default"].constructFromObject(data["transform"]);
71
+ if (data.hasOwnProperty('transform')) {
72
+ obj['transform'] = _HttpTransform["default"].constructFromObject(data['transform']);
73
73
  }
74
- if (data.hasOwnProperty("throttle_ms")) {
75
- obj["throttle_ms"] = _ApiClient["default"].convertToType(data["throttle_ms"], "Number");
74
+ if (data.hasOwnProperty('throttle_ms')) {
75
+ obj['throttle_ms'] = _ApiClient["default"].convertToType(data['throttle_ms'], 'Number');
76
76
  }
77
- if (data.hasOwnProperty("timeout")) {
78
- obj["timeout"] = _ApiClient["default"].convertToType(data["timeout"], "Number");
77
+ if (data.hasOwnProperty('timeout')) {
78
+ obj['timeout'] = _ApiClient["default"].convertToType(data['timeout'], 'Number');
79
79
  }
80
- if (data.hasOwnProperty("broker")) {
81
- obj["broker"] = _ApiClient["default"].convertToType(data["broker"], "String");
80
+ if (data.hasOwnProperty('broker')) {
81
+ obj['broker'] = _ApiClient["default"].convertToType(data['broker'], 'String');
82
82
  }
83
- if (data.hasOwnProperty("port")) {
84
- obj["port"] = _ApiClient["default"].convertToType(data["port"], "Number");
83
+ if (data.hasOwnProperty('port')) {
84
+ obj['port'] = _ApiClient["default"].convertToType(data['port'], 'Number');
85
85
  }
86
- if (data.hasOwnProperty("username")) {
87
- obj["username"] = _ApiClient["default"].convertToType(data["username"], "String");
86
+ if (data.hasOwnProperty('username')) {
87
+ obj['username'] = _ApiClient["default"].convertToType(data['username'], 'String');
88
88
  }
89
- if (data.hasOwnProperty("password")) {
90
- obj["password"] = _ApiClient["default"].convertToType(data["password"], "String");
89
+ if (data.hasOwnProperty('password')) {
90
+ obj['password'] = _ApiClient["default"].convertToType(data['password'], 'String');
91
91
  }
92
- if (data.hasOwnProperty("topic")) {
93
- obj["topic"] = _ApiClient["default"].convertToType(data["topic"], "String");
92
+ if (data.hasOwnProperty('topic')) {
93
+ obj['topic'] = _ApiClient["default"].convertToType(data['topic'], 'String');
94
94
  }
95
- if (data.hasOwnProperty("certificate")) {
96
- obj["certificate"] = _ApiClient["default"].convertToType(data["certificate"], "String");
95
+ if (data.hasOwnProperty('certificate')) {
96
+ obj['certificate'] = _ApiClient["default"].convertToType(data['certificate'], 'String');
97
97
  }
98
- if (data.hasOwnProperty("certificate_name")) {
99
- obj["certificate_name"] = _ApiClient["default"].convertToType(data["certificate_name"], "String");
98
+ if (data.hasOwnProperty('certificate_name')) {
99
+ obj['certificate_name'] = _ApiClient["default"].convertToType(data['certificate_name'], 'String');
100
100
  }
101
- if (data.hasOwnProperty("key")) {
102
- obj["key"] = _ApiClient["default"].convertToType(data["key"], "String");
101
+ if (data.hasOwnProperty('key')) {
102
+ obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
103
103
  }
104
- if (data.hasOwnProperty("private_key_name")) {
105
- obj["private_key_name"] = _ApiClient["default"].convertToType(data["private_key_name"], "String");
104
+ if (data.hasOwnProperty('private_key_name')) {
105
+ obj['private_key_name'] = _ApiClient["default"].convertToType(data['private_key_name'], 'String');
106
106
  }
107
107
  } else if (data === null) {
108
108
  return null;
@@ -119,50 +119,50 @@ var Mqtt = /*#__PURE__*/function () {
119
119
  key: "validateJSON",
120
120
  value: function validateJSON(data) {
121
121
  // ensure the json data is an array
122
- if (!Array.isArray(data["fleets"])) {
123
- throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data["fleets"]);
122
+ if (!Array.isArray(data['fleets'])) {
123
+ throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
124
124
  }
125
125
  // validate the optional field `filter`
126
- if (data["filter"]) {
126
+ if (data['filter']) {
127
127
  // data not null
128
- _HttpFilter["default"].validateJSON(data["filter"]);
128
+ _HttpFilter["default"].validateJSON(data['filter']);
129
129
  }
130
130
  // validate the optional field `transform`
131
- if (data["transform"]) {
131
+ if (data['transform']) {
132
132
  // data not null
133
- _HttpTransform["default"].validateJSON(data["transform"]);
133
+ _HttpTransform["default"].validateJSON(data['transform']);
134
134
  }
135
135
  // ensure the json data is a string
136
- if (data["broker"] && !(typeof data["broker"] === "string" || data["broker"] instanceof String)) {
137
- throw new Error("Expected the field `broker` to be a primitive type in the JSON string but got " + data["broker"]);
136
+ if (data['broker'] && !(typeof data['broker'] === 'string' || data['broker'] instanceof String)) {
137
+ throw new Error("Expected the field `broker` to be a primitive type in the JSON string but got " + data['broker']);
138
138
  }
139
139
  // ensure the json data is a string
140
- if (data["username"] && !(typeof data["username"] === "string" || data["username"] instanceof String)) {
141
- throw new Error("Expected the field `username` to be a primitive type in the JSON string but got " + data["username"]);
140
+ if (data['username'] && !(typeof data['username'] === 'string' || data['username'] instanceof String)) {
141
+ throw new Error("Expected the field `username` to be a primitive type in the JSON string but got " + data['username']);
142
142
  }
143
143
  // ensure the json data is a string
144
- if (data["password"] && !(typeof data["password"] === "string" || data["password"] instanceof String)) {
145
- throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data["password"]);
144
+ if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) {
145
+ throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']);
146
146
  }
147
147
  // ensure the json data is a string
148
- if (data["topic"] && !(typeof data["topic"] === "string" || data["topic"] instanceof String)) {
149
- throw new Error("Expected the field `topic` to be a primitive type in the JSON string but got " + data["topic"]);
148
+ if (data['topic'] && !(typeof data['topic'] === 'string' || data['topic'] instanceof String)) {
149
+ throw new Error("Expected the field `topic` to be a primitive type in the JSON string but got " + data['topic']);
150
150
  }
151
151
  // ensure the json data is a string
152
- if (data["certificate"] && !(typeof data["certificate"] === "string" || data["certificate"] instanceof String)) {
153
- throw new Error("Expected the field `certificate` to be a primitive type in the JSON string but got " + data["certificate"]);
152
+ if (data['certificate'] && !(typeof data['certificate'] === 'string' || data['certificate'] instanceof String)) {
153
+ throw new Error("Expected the field `certificate` to be a primitive type in the JSON string but got " + data['certificate']);
154
154
  }
155
155
  // ensure the json data is a string
156
- if (data["certificate_name"] && !(typeof data["certificate_name"] === "string" || data["certificate_name"] instanceof String)) {
157
- throw new Error("Expected the field `certificate_name` to be a primitive type in the JSON string but got " + data["certificate_name"]);
156
+ if (data['certificate_name'] && !(typeof data['certificate_name'] === 'string' || data['certificate_name'] instanceof String)) {
157
+ throw new Error("Expected the field `certificate_name` to be a primitive type in the JSON string but got " + data['certificate_name']);
158
158
  }
159
159
  // ensure the json data is a string
160
- if (data["key"] && !(typeof data["key"] === "string" || data["key"] instanceof String)) {
161
- throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data["key"]);
160
+ if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
161
+ throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
162
162
  }
163
163
  // ensure the json data is a string
164
- if (data["private_key_name"] && !(typeof data["private_key_name"] === "string" || data["private_key_name"] instanceof String)) {
165
- throw new Error("Expected the field `private_key_name` to be a primitive type in the JSON string but got " + data["private_key_name"]);
164
+ if (data['private_key_name'] && !(typeof data['private_key_name'] === 'string' || data['private_key_name'] instanceof String)) {
165
+ throw new Error("Expected the field `private_key_name` to be a primitive type in the JSON string but got " + data['private_key_name']);
166
166
  }
167
167
  return true;
168
168
  }
@@ -172,77 +172,77 @@ var Mqtt = /*#__PURE__*/function () {
172
172
  * list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
173
173
  * @member {Array.<String>} fleets
174
174
  */
175
- Mqtt.prototype["fleets"] = undefined;
175
+ Mqtt.prototype['fleets'] = undefined;
176
176
 
177
177
  /**
178
178
  * @member {module:model/HttpFilter} filter
179
179
  */
180
- Mqtt.prototype["filter"] = undefined;
180
+ Mqtt.prototype['filter'] = undefined;
181
181
 
182
182
  /**
183
183
  * @member {module:model/HttpTransform} transform
184
184
  */
185
- Mqtt.prototype["transform"] = undefined;
185
+ Mqtt.prototype['transform'] = undefined;
186
186
 
187
187
  /**
188
188
  * @member {Number} throttle_ms
189
189
  */
190
- Mqtt.prototype["throttle_ms"] = undefined;
190
+ Mqtt.prototype['throttle_ms'] = undefined;
191
191
 
192
192
  /**
193
193
  * Timeout in seconds for each request
194
194
  * @member {Number} timeout
195
195
  * @default 15
196
196
  */
197
- Mqtt.prototype["timeout"] = 15;
197
+ Mqtt.prototype['timeout'] = 15;
198
198
 
199
199
  /**
200
200
  * @member {String} broker
201
201
  */
202
- Mqtt.prototype["broker"] = undefined;
202
+ Mqtt.prototype['broker'] = undefined;
203
203
 
204
204
  /**
205
205
  * @member {Number} port
206
206
  */
207
- Mqtt.prototype["port"] = undefined;
207
+ Mqtt.prototype['port'] = undefined;
208
208
 
209
209
  /**
210
210
  * @member {String} username
211
211
  */
212
- Mqtt.prototype["username"] = undefined;
212
+ Mqtt.prototype['username'] = undefined;
213
213
 
214
214
  /**
215
215
  * This value is input-only and will be omitted from the response and replaced with a placeholder
216
216
  * @member {String} password
217
217
  */
218
- Mqtt.prototype["password"] = undefined;
218
+ Mqtt.prototype['password'] = undefined;
219
219
 
220
220
  /**
221
221
  * @member {String} topic
222
222
  */
223
- Mqtt.prototype["topic"] = undefined;
223
+ Mqtt.prototype['topic'] = undefined;
224
224
 
225
225
  /**
226
226
  * Certificate with \\n newlines. This value is input-only and will be omitted from the response and replaced with a placeholder
227
227
  * @member {String} certificate
228
228
  */
229
- Mqtt.prototype["certificate"] = undefined;
229
+ Mqtt.prototype['certificate'] = undefined;
230
230
 
231
231
  /**
232
232
  * Name of certificate.
233
233
  * @member {String} certificate_name
234
234
  */
235
- Mqtt.prototype["certificate_name"] = undefined;
235
+ Mqtt.prototype['certificate_name'] = undefined;
236
236
 
237
237
  /**
238
238
  * Key with \\n newlines. This value is input-only and will be omitted from the response and replaced with a placeholder
239
239
  * @member {String} key
240
240
  */
241
- Mqtt.prototype["key"] = undefined;
241
+ Mqtt.prototype['key'] = undefined;
242
242
 
243
243
  /**
244
244
  * Name of key
245
245
  * @member {String} private_key_name
246
246
  */
247
- Mqtt.prototype["private_key_name"] = undefined;
247
+ Mqtt.prototype['private_key_name'] = undefined;
248
248
  var _default = exports["default"] = Mqtt;
@@ -13,7 +13,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
15
  * Notehub API
16
- * The OpenAPI definition for the Notehub.io API.
16
+ * The OpenAPI definition for the Notehub.io API.
17
17
  *
18
18
  * The version of the OpenAPI document: 1.2.0
19
19
  * Contact: engineering@blues.io
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The Note model module.
28
28
  * @module model/Note
29
- * @version 1.0.29
29
+ * @version 1.0.31-beta.1
30
30
  */
31
31
  var Note = /*#__PURE__*/function () {
32
32
  /**
@@ -59,11 +59,11 @@ var Note = /*#__PURE__*/function () {
59
59
  value: function constructFromObject(data, obj) {
60
60
  if (data) {
61
61
  obj = obj || new Note();
62
- if (data.hasOwnProperty("body")) {
63
- obj["body"] = _ApiClient["default"].convertToType(data["body"], Object);
62
+ if (data.hasOwnProperty('body')) {
63
+ obj['body'] = _ApiClient["default"].convertToType(data['body'], Object);
64
64
  }
65
- if (data.hasOwnProperty("payload")) {
66
- obj["payload"] = _ApiClient["default"].convertToType(data["payload"], "String");
65
+ if (data.hasOwnProperty('payload')) {
66
+ obj['payload'] = _ApiClient["default"].convertToType(data['payload'], 'String');
67
67
  }
68
68
  } else if (data === null) {
69
69
  return null;
@@ -80,8 +80,8 @@ var Note = /*#__PURE__*/function () {
80
80
  key: "validateJSON",
81
81
  value: function validateJSON(data) {
82
82
  // ensure the json data is a string
83
- if (data["payload"] && !(typeof data["payload"] === "string" || data["payload"] instanceof String)) {
84
- throw new Error("Expected the field `payload` to be a primitive type in the JSON string but got " + data["payload"]);
83
+ if (data['payload'] && !(typeof data['payload'] === 'string' || data['payload'] instanceof String)) {
84
+ throw new Error("Expected the field `payload` to be a primitive type in the JSON string but got " + data['payload']);
85
85
  }
86
86
  return true;
87
87
  }
@@ -90,10 +90,10 @@ var Note = /*#__PURE__*/function () {
90
90
  /**
91
91
  * @member {Object} body
92
92
  */
93
- Note.prototype["body"] = undefined;
93
+ Note.prototype['body'] = undefined;
94
94
 
95
95
  /**
96
96
  * @member {String} payload
97
97
  */
98
- Note.prototype["payload"] = undefined;
98
+ Note.prototype['payload'] = undefined;
99
99
  var _default = exports["default"] = Note;
@@ -0,0 +1,146 @@
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 _SchemaProperty = _interopRequireDefault(require("./SchemaProperty"));
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 NotefileSchema model module.
32
+ * @module model/NotefileSchema
33
+ * @version 1.0.31-beta.1
34
+ */
35
+ var NotefileSchema = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>NotefileSchema</code>.
38
+ * @alias module:model/NotefileSchema
39
+ * @param notefile {String}
40
+ * @param properties {Array.<module:model/SchemaProperty>}
41
+ */
42
+ function NotefileSchema(notefile, properties) {
43
+ _classCallCheck(this, NotefileSchema);
44
+ NotefileSchema.initialize(this, notefile, properties);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(NotefileSchema, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, notefile, properties) {
55
+ obj['notefile'] = notefile;
56
+ obj['properties'] = properties;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>NotefileSchema</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/NotefileSchema} obj Optional instance to populate.
64
+ * @return {module:model/NotefileSchema} The populated <code>NotefileSchema</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new NotefileSchema();
71
+ if (data.hasOwnProperty('notefile')) {
72
+ obj['notefile'] = _ApiClient["default"].convertToType(data['notefile'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('properties')) {
75
+ obj['properties'] = _ApiClient["default"].convertToType(data['properties'], [_SchemaProperty["default"]]);
76
+ }
77
+ } else if (data === null) {
78
+ return null;
79
+ }
80
+ return obj;
81
+ }
82
+
83
+ /**
84
+ * Validates the JSON data with respect to <code>NotefileSchema</code>.
85
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
86
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>NotefileSchema</code>.
87
+ */
88
+ }, {
89
+ key: "validateJSON",
90
+ value: function validateJSON(data) {
91
+ // check to make sure all required properties are present in the JSON string
92
+ var _iterator = _createForOfIteratorHelper(NotefileSchema.RequiredProperties),
93
+ _step;
94
+ try {
95
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
96
+ var property = _step.value;
97
+ if (!data[property]) {
98
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
99
+ }
100
+ }
101
+ // ensure the json data is a string
102
+ } catch (err) {
103
+ _iterator.e(err);
104
+ } finally {
105
+ _iterator.f();
106
+ }
107
+ if (data['notefile'] && !(typeof data['notefile'] === 'string' || data['notefile'] instanceof String)) {
108
+ throw new Error("Expected the field `notefile` to be a primitive type in the JSON string but got " + data['notefile']);
109
+ }
110
+ if (data['properties']) {
111
+ // data not null
112
+ // ensure the json data is an array
113
+ if (!Array.isArray(data['properties'])) {
114
+ throw new Error("Expected the field `properties` to be an array in the JSON data but got " + data['properties']);
115
+ }
116
+ // validate the optional field `properties` (array)
117
+ var _iterator2 = _createForOfIteratorHelper(data['properties']),
118
+ _step2;
119
+ try {
120
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
121
+ var item = _step2.value;
122
+ _SchemaProperty["default"].validateJsonObject(item);
123
+ }
124
+ } catch (err) {
125
+ _iterator2.e(err);
126
+ } finally {
127
+ _iterator2.f();
128
+ }
129
+ ;
130
+ }
131
+ return true;
132
+ }
133
+ }]);
134
+ }();
135
+ NotefileSchema.RequiredProperties = ["notefile", "properties"];
136
+
137
+ /**
138
+ * @member {String} notefile
139
+ */
140
+ NotefileSchema.prototype['notefile'] = undefined;
141
+
142
+ /**
143
+ * @member {Array.<module:model/SchemaProperty>} properties
144
+ */
145
+ NotefileSchema.prototype['properties'] = undefined;
146
+ var _default = exports["default"] = NotefileSchema;