@blues-inc/notehub-js 1.0.23 → 1.0.24-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 (111) hide show
  1. package/README.md +199 -178
  2. package/dist/ApiClient.js +156 -156
  3. package/dist/api/AlertApi.js +23 -23
  4. package/dist/api/AuthorizationApi.js +17 -17
  5. package/dist/api/BillingAccountApi.js +15 -15
  6. package/dist/api/DeviceApi.js +352 -352
  7. package/dist/api/EventApi.js +134 -124
  8. package/dist/api/MonitorApi.js +53 -53
  9. package/dist/api/ProjectApi.js +599 -330
  10. package/dist/api/RouteApi.js +103 -103
  11. package/dist/index.js +102 -39
  12. package/dist/model/Alert.js +108 -62
  13. package/dist/model/AlertDataInner.js +36 -36
  14. package/dist/model/AlertNotificationsInner.js +19 -19
  15. package/dist/model/Aws.js +66 -66
  16. package/dist/model/Azure.js +44 -44
  17. package/dist/model/BillingAccount.js +22 -22
  18. package/dist/model/BillingAccountRole.js +10 -10
  19. package/dist/model/Body.js +6 -6
  20. package/dist/model/CloneProjectRequest.js +21 -21
  21. package/dist/model/Contact.js +23 -23
  22. package/dist/model/CreateFleetRequest.js +8 -8
  23. package/dist/model/CreateMonitor.js +127 -126
  24. package/dist/model/CreateProductRequest.js +23 -23
  25. package/dist/model/CreateProjectRequest.js +17 -17
  26. package/dist/model/{OTAUpdateStatus.js → CurrentFirmware.js} +34 -47
  27. package/dist/model/DFUEnv.js +13 -13
  28. package/dist/model/DFUState.js +66 -66
  29. package/dist/model/DeleteDeviceFleetsRequest.js +9 -9
  30. package/dist/model/Device.js +85 -85
  31. package/dist/model/DeviceDfuHistory.js +139 -0
  32. package/dist/model/DeviceDfuHistoryPage.js +121 -0
  33. package/dist/model/DeviceDfuStateMachine.js +152 -0
  34. package/dist/model/DeviceDfuStateMachineNode.js +132 -0
  35. package/dist/model/DeviceDfuStatus.js +129 -0
  36. package/dist/model/DeviceDfuStatusCurrent.js +158 -0
  37. package/dist/model/{OTAStatusList.js → DeviceDfuStatusPage.js} +34 -33
  38. package/dist/model/DeviceSession.js +183 -183
  39. package/dist/model/DeviceTowerInfo.js +15 -15
  40. package/dist/model/DeviceUsage.js +33 -33
  41. package/dist/model/DfuActionRequest.js +92 -0
  42. package/dist/model/EmailNotification.js +8 -8
  43. package/dist/model/EnvironmentVariables.js +9 -9
  44. package/dist/model/Error.js +32 -32
  45. package/dist/model/Event.js +224 -224
  46. package/dist/model/Firmware.js +195 -0
  47. package/dist/model/FirmwareInfo.js +61 -61
  48. package/dist/model/Fleet.js +22 -22
  49. package/dist/model/GetAlerts200Response.js +16 -15
  50. package/dist/model/GetBillingAccounts200Response.js +11 -10
  51. package/dist/model/GetDeviceEnvironmentVariables200Response.js +13 -13
  52. package/dist/model/GetDeviceHealthLog200Response.js +13 -12
  53. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +20 -20
  54. package/dist/model/GetDeviceLatest200Response.js +11 -10
  55. package/dist/model/GetDevicePublicKey200Response.js +17 -17
  56. package/dist/model/GetDeviceSessions200Response.js +18 -17
  57. package/dist/model/GetProjectDevicePublicKeys200Response.js +18 -17
  58. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +13 -13
  59. package/dist/model/GetProjectDevices200Response.js +18 -17
  60. package/dist/model/GetProjectEvents200Response.js +22 -21
  61. package/dist/model/GetProjectEventsByCursor200Response.js +25 -24
  62. package/dist/model/GetProjectFleets200Response.js +13 -12
  63. package/dist/model/GetProjectMembers200Response.js +13 -12
  64. package/dist/model/GetProjectProducts200Response.js +11 -10
  65. package/dist/model/GetProjects200Response.js +11 -10
  66. package/dist/model/GetRouteLogsByRoute200ResponseInner.js +36 -36
  67. package/dist/model/Google.js +34 -34
  68. package/dist/model/HandleNoteChanges200Response.js +12 -12
  69. package/dist/model/HandleNoteGet200Response.js +14 -14
  70. package/dist/model/HandleNoteSignal200Response.js +6 -6
  71. package/dist/model/HandleNotefileChanges200Response.js +12 -12
  72. package/dist/model/HandleNotefileChangesPending200Response.js +15 -15
  73. package/dist/model/HandleNotefileDeleteRequest.js +8 -8
  74. package/dist/model/Http.js +36 -36
  75. package/dist/model/HttpFilter.js +20 -20
  76. package/dist/model/HttpTransform.js +21 -21
  77. package/dist/model/Location.js +41 -41
  78. package/dist/model/Login200Response.js +8 -8
  79. package/dist/model/LoginRequest.js +13 -13
  80. package/dist/model/Monitor.js +101 -100
  81. package/dist/model/MonitorAlertRoutesInner.js +10 -11
  82. package/dist/model/Mqtt.js +67 -67
  83. package/dist/model/Note.js +11 -11
  84. package/dist/model/{Route.js → NotehubRoute.js} +56 -56
  85. package/dist/model/{RouteSchema.js → NotehubRouteSchema.js} +70 -71
  86. package/dist/model/PostProvisionProjectDeviceRequest.js +14 -14
  87. package/dist/model/Product.js +27 -27
  88. package/dist/model/Project.js +35 -35
  89. package/dist/model/ProjectMember.js +23 -23
  90. package/dist/model/Proxy.js +25 -25
  91. package/dist/model/PutDeviceFleetsRequest.js +9 -9
  92. package/dist/model/Radresponder.js +26 -26
  93. package/dist/model/Role.js +10 -10
  94. package/dist/model/Slack.js +54 -54
  95. package/dist/model/SlackBearerNotification.js +26 -26
  96. package/dist/model/SlackWebHookNotification.js +21 -21
  97. package/dist/model/Snowflake.js +46 -46
  98. package/dist/model/SnowflakeTransform.js +13 -13
  99. package/dist/model/Thingworx.js +34 -34
  100. package/dist/model/TowerLocation.js +53 -53
  101. package/dist/model/Twilio.js +44 -44
  102. package/dist/model/UpdateFleetRequest.js +18 -18
  103. package/dist/model/UploadMetadata.js +221 -0
  104. package/dist/model/UserDbRoute.js +26 -26
  105. package/dist/model/UserDfuStateMachine.js +127 -0
  106. package/dist/model/UserDfuStateMachineStatus.js +123 -0
  107. package/dist/model/UserFirmwareInfo.js +107 -0
  108. package/package.json +3 -3
  109. package/dist/model/FirmwareStatus.js +0 -144
  110. package/dist/model/OTAStatus.js +0 -306
  111. package/dist/model/OTAUpdateRequest.js +0 -214
package/dist/ApiClient.js CHANGED
@@ -14,9 +14,9 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
14
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
15
  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); } /**
16
16
  * Notehub API
17
- * The OpenAPI definition for the Notehub.io API.
17
+ * The OpenAPI definition for the Notehub.io API.
18
18
  *
19
- * The version of the OpenAPI document: 1.1.0
19
+ * The version of the OpenAPI document: 1.2.0
20
20
  * Contact: engineering@blues.io
21
21
  *
22
22
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -25,16 +25,16 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
25
25
  *
26
26
  */
27
27
  /**
28
- * @module ApiClient
29
- * @version 1.0.23
30
- */
28
+ * @module ApiClient
29
+ * @version 1.0.24-beta.1
30
+ */
31
31
  /**
32
- * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
33
- * application to use this class directly - the *Api and model classes provide the public API for the service. The
34
- * contents of this file should be regarded as internal but are documented for completeness.
35
- * @alias module:ApiClient
36
- * @class
37
- */
32
+ * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
33
+ * application to use this class directly - the *Api and model classes provide the public API for the service. The
34
+ * contents of this file should be regarded as internal but are documented for completeness.
35
+ * @alias module:ApiClient
36
+ * @class
37
+ */
38
38
  var ApiClient = /*#__PURE__*/function () {
39
39
  /**
40
40
  * The base URL against which to resolve every API call's (relative) path.
@@ -42,29 +42,29 @@ var ApiClient = /*#__PURE__*/function () {
42
42
  * @param {String} basePath
43
43
  */
44
44
  function ApiClient() {
45
- var basePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "https://api.notefile.net";
45
+ var basePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'https://api.notefile.net';
46
46
  _classCallCheck(this, ApiClient);
47
47
  /**
48
48
  * The base URL against which to resolve every API call's (relative) path.
49
49
  * @type {String}
50
50
  * @default https://api.notefile.net
51
51
  */
52
- this.basePath = basePath.replace(/\/+$/, "");
52
+ this.basePath = basePath.replace(/\/+$/, '');
53
53
 
54
54
  /**
55
55
  * The authentication methods to be included for all API calls.
56
56
  * @type {Array.<String>}
57
57
  */
58
58
  this.authentications = {
59
- api_key: {
60
- type: "apiKey",
61
- "in": "header",
62
- name: "X-Session-Token"
59
+ 'api_key': {
60
+ type: 'apiKey',
61
+ 'in': 'header',
62
+ name: 'X-Session-Token'
63
63
  },
64
- pin: {
65
- type: "apiKey",
66
- "in": "header",
67
- name: "X-Auth-Token"
64
+ 'pin': {
65
+ type: 'apiKey',
66
+ 'in': 'header',
67
+ name: 'X-Auth-Token'
68
68
  }
69
69
  };
70
70
 
@@ -74,7 +74,7 @@ var ApiClient = /*#__PURE__*/function () {
74
74
  * @default {}
75
75
  */
76
76
  this.defaultHeaders = {
77
- "User-Agent": "OpenAPI-Generator/1.0.23/Javascript"
77
+ 'User-Agent': 'OpenAPI-Generator/1.0.24-beta.1/Javascript'
78
78
  };
79
79
 
80
80
  /**
@@ -103,7 +103,7 @@ var ApiClient = /*#__PURE__*/function () {
103
103
  * Used to save and return cookies in a node.js (non-browser) setting,
104
104
  * if this.enableCookies is set to true.
105
105
  */
106
- if (typeof window === "undefined") {
106
+ if (typeof window === 'undefined') {
107
107
  this.agent = new _superagent["default"].agent();
108
108
  }
109
109
 
@@ -119,15 +119,15 @@ var ApiClient = /*#__PURE__*/function () {
119
119
  }
120
120
 
121
121
  /**
122
- * Returns a string representation for an actual parameter.
123
- * @param param The actual parameter.
124
- * @returns {String} The string representation of <code>param</code>.
125
- */
122
+ * Returns a string representation for an actual parameter.
123
+ * @param param The actual parameter.
124
+ * @returns {String} The string representation of <code>param</code>.
125
+ */
126
126
  return _createClass(ApiClient, [{
127
127
  key: "paramToString",
128
128
  value: function paramToString(param) {
129
129
  if (param == undefined || param == null) {
130
- return "";
130
+ return '';
131
131
  }
132
132
  if (param instanceof Date) {
133
133
  return param.toJSON();
@@ -139,10 +139,10 @@ var ApiClient = /*#__PURE__*/function () {
139
139
  }
140
140
 
141
141
  /**
142
- * Returns a boolean indicating if the parameter could be JSON.stringified
143
- * @param param The actual parameter
144
- * @returns {Boolean} Flag indicating if <code>param</code> can be JSON.stringified
145
- */
142
+ * Returns a boolean indicating if the parameter could be JSON.stringified
143
+ * @param param The actual parameter
144
+ * @returns {Boolean} Flag indicating if <code>param</code> can be JSON.stringified
145
+ */
146
146
  }, {
147
147
  key: "buildUrl",
148
148
  value:
@@ -157,7 +157,7 @@ var ApiClient = /*#__PURE__*/function () {
157
157
  function buildUrl(path, pathParams, apiBasePath) {
158
158
  var _this = this;
159
159
  if (!path.match(/^\//)) {
160
- path = "/" + path;
160
+ path = '/' + path;
161
161
  }
162
162
  var url = this.basePath + path;
163
163
 
@@ -178,16 +178,16 @@ var ApiClient = /*#__PURE__*/function () {
178
178
  }
179
179
 
180
180
  /**
181
- * Checks whether the given content type represents JSON.<br>
182
- * JSON content type examples:<br>
183
- * <ul>
184
- * <li>application/json</li>
185
- * <li>application/json; charset=UTF8</li>
186
- * <li>APPLICATION/JSON</li>
187
- * </ul>
188
- * @param {String} contentType The MIME content type to check.
189
- * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
190
- */
181
+ * Checks whether the given content type represents JSON.<br>
182
+ * JSON content type examples:<br>
183
+ * <ul>
184
+ * <li>application/json</li>
185
+ * <li>application/json; charset=UTF8</li>
186
+ * <li>APPLICATION/JSON</li>
187
+ * </ul>
188
+ * @param {String} contentType The MIME content type to check.
189
+ * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
190
+ */
191
191
  }, {
192
192
  key: "isJsonMime",
193
193
  value: function isJsonMime(contentType) {
@@ -195,10 +195,10 @@ var ApiClient = /*#__PURE__*/function () {
195
195
  }
196
196
 
197
197
  /**
198
- * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
199
- * @param {Array.<String>} contentTypes
200
- * @returns {String} The chosen content type, preferring JSON.
201
- */
198
+ * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
199
+ * @param {Array.<String>} contentTypes
200
+ * @returns {String} The chosen content type, preferring JSON.
201
+ */
202
202
  }, {
203
203
  key: "jsonPreferredMime",
204
204
  value: function jsonPreferredMime(contentTypes) {
@@ -211,18 +211,18 @@ var ApiClient = /*#__PURE__*/function () {
211
211
  }
212
212
 
213
213
  /**
214
- * Checks whether the given parameter value represents file-like content.
215
- * @param param The parameter to check.
216
- * @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
217
- */
214
+ * Checks whether the given parameter value represents file-like content.
215
+ * @param param The parameter to check.
216
+ * @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
217
+ */
218
218
  }, {
219
219
  key: "isFileParam",
220
220
  value: function isFileParam(param) {
221
221
  // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
222
- if (typeof require === "function") {
222
+ if (typeof require === 'function') {
223
223
  var fs;
224
224
  try {
225
- fs = require("fs");
225
+ fs = require('fs');
226
226
  } catch (err) {}
227
227
  if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
228
228
  return true;
@@ -230,32 +230,32 @@ var ApiClient = /*#__PURE__*/function () {
230
230
  }
231
231
 
232
232
  // Buffer in Node.js
233
- if (typeof Buffer === "function" && param instanceof Buffer) {
233
+ if (typeof Buffer === 'function' && param instanceof Buffer) {
234
234
  return true;
235
235
  }
236
236
 
237
237
  // Blob in browser
238
- if (typeof Blob === "function" && param instanceof Blob) {
238
+ if (typeof Blob === 'function' && param instanceof Blob) {
239
239
  return true;
240
240
  }
241
241
 
242
242
  // File in browser (it seems File object is also instance of Blob, but keep this for safe)
243
- if (typeof File === "function" && param instanceof File) {
243
+ if (typeof File === 'function' && param instanceof File) {
244
244
  return true;
245
245
  }
246
246
  return false;
247
247
  }
248
248
 
249
249
  /**
250
- * Normalizes parameter values:
251
- * <ul>
252
- * <li>remove nils</li>
253
- * <li>keep files and arrays</li>
254
- * <li>format to string with `paramToString` for other cases</li>
255
- * </ul>
256
- * @param {Object.<String, Object>} params The parameters as object properties.
257
- * @returns {Object.<String, Object>} normalized parameters.
258
- */
250
+ * Normalizes parameter values:
251
+ * <ul>
252
+ * <li>remove nils</li>
253
+ * <li>keep files and arrays</li>
254
+ * <li>format to string with `paramToString` for other cases</li>
255
+ * </ul>
256
+ * @param {Object.<String, Object>} params The parameters as object properties.
257
+ * @returns {Object.<String, Object>} normalized parameters.
258
+ */
259
259
  }, {
260
260
  key: "normalizeParams",
261
261
  value: function normalizeParams(params) {
@@ -274,12 +274,12 @@ var ApiClient = /*#__PURE__*/function () {
274
274
  }
275
275
 
276
276
  /**
277
- * Builds a string representation of an array-type actual parameter, according to the given collection format.
278
- * @param {Array} param An array parameter.
279
- * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
280
- * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
281
- * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
282
- */
277
+ * Builds a string representation of an array-type actual parameter, according to the given collection format.
278
+ * @param {Array} param An array parameter.
279
+ * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
280
+ * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
281
+ * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
282
+ */
283
283
  }, {
284
284
  key: "buildCollectionParam",
285
285
  value: function buildCollectionParam(param, collectionFormat) {
@@ -287,29 +287,29 @@ var ApiClient = /*#__PURE__*/function () {
287
287
  return null;
288
288
  }
289
289
  switch (collectionFormat) {
290
- case "csv":
291
- return param.map(this.paramToString, this).join(",");
292
- case "ssv":
293
- return param.map(this.paramToString, this).join(" ");
294
- case "tsv":
295
- return param.map(this.paramToString, this).join("\t");
296
- case "pipes":
297
- return param.map(this.paramToString, this).join("|");
298
- case "multi":
290
+ case 'csv':
291
+ return param.map(this.paramToString, this).join(',');
292
+ case 'ssv':
293
+ return param.map(this.paramToString, this).join(' ');
294
+ case 'tsv':
295
+ return param.map(this.paramToString, this).join('\t');
296
+ case 'pipes':
297
+ return param.map(this.paramToString, this).join('|');
298
+ case 'multi':
299
299
  //return the array directly as SuperAgent will handle it as expected
300
300
  return param.map(this.paramToString, this);
301
- case "passthrough":
301
+ case 'passthrough':
302
302
  return param;
303
303
  default:
304
- throw new Error("Unknown collection format: " + collectionFormat);
304
+ throw new Error('Unknown collection format: ' + collectionFormat);
305
305
  }
306
306
  }
307
307
 
308
308
  /**
309
- * Applies authentication headers to the request.
310
- * @param {Object} request The request object created by a <code>superagent()</code> call.
311
- * @param {Array.<String>} authNames An array of authentication method names.
312
- */
309
+ * Applies authentication headers to the request.
310
+ * @param {Object} request The request object created by a <code>superagent()</code> call.
311
+ * @param {Array.<String>} authNames An array of authentication method names.
312
+ */
313
313
  }, {
314
314
  key: "applyAuthToRequest",
315
315
  value: function applyAuthToRequest(request, authNames) {
@@ -317,39 +317,39 @@ var ApiClient = /*#__PURE__*/function () {
317
317
  authNames.forEach(function (authName) {
318
318
  var auth = _this2.authentications[authName];
319
319
  switch (auth.type) {
320
- case "basic":
320
+ case 'basic':
321
321
  if (auth.username || auth.password) {
322
- request.auth(auth.username || "", auth.password || "");
322
+ request.auth(auth.username || '', auth.password || '');
323
323
  }
324
324
  break;
325
- case "bearer":
325
+ case 'bearer':
326
326
  if (auth.accessToken) {
327
- var localVarBearerToken = typeof auth.accessToken === "function" ? auth.accessToken() : auth.accessToken;
327
+ var localVarBearerToken = typeof auth.accessToken === 'function' ? auth.accessToken() : auth.accessToken;
328
328
  request.set({
329
- Authorization: "Bearer " + localVarBearerToken
329
+ 'Authorization': 'Bearer ' + localVarBearerToken
330
330
  });
331
331
  }
332
332
  break;
333
- case "apiKey":
333
+ case 'apiKey':
334
334
  if (auth.apiKey) {
335
335
  var data = {};
336
336
  data[auth.name] = auth.apiKey;
337
- if (auth["in"] === "header") {
337
+ if (auth['in'] === 'header') {
338
338
  request.set(data);
339
339
  } else {
340
340
  request.query(data);
341
341
  }
342
342
  }
343
343
  break;
344
- case "oauth2":
344
+ case 'oauth2':
345
345
  if (auth.accessToken) {
346
346
  request.set({
347
- Authorization: "Bearer " + auth.accessToken
347
+ 'Authorization': 'Bearer ' + auth.accessToken
348
348
  });
349
349
  }
350
350
  break;
351
351
  default:
352
- throw new Error("Unknown authentication type: " + auth.type);
352
+ throw new Error('Unknown authentication type: ' + auth.type);
353
353
  }
354
354
  });
355
355
  }
@@ -373,7 +373,7 @@ var ApiClient = /*#__PURE__*/function () {
373
373
  // Rely on SuperAgent for parsing response body.
374
374
  // See http://visionmedia.github.io/superagent/#parsing-response-bodies
375
375
  var data = response.body;
376
- if (data == null || _typeof(data) === "object" && typeof data.length === "undefined" && !Object.keys(data).length) {
376
+ if (data == null || _typeof(data) === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length) {
377
377
  // SuperAgent does not always produce a body; use the unparsed response as a fallback
378
378
  data = response.text;
379
379
  }
@@ -415,8 +415,8 @@ var ApiClient = /*#__PURE__*/function () {
415
415
  this.applyAuthToRequest(request, authNames);
416
416
 
417
417
  // set query parameters
418
- if (httpMethod.toUpperCase() === "GET" && this.cache === false) {
419
- queryParams["_"] = new Date().getTime();
418
+ if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
419
+ queryParams['_'] = new Date().getTime();
420
420
  }
421
421
  request.query(this.normalizeParams(queryParams));
422
422
 
@@ -433,13 +433,13 @@ var ApiClient = /*#__PURE__*/function () {
433
433
  var contentType = this.jsonPreferredMime(contentTypes);
434
434
  if (contentType) {
435
435
  // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
436
- if (contentType != "multipart/form-data") {
436
+ if (contentType != 'multipart/form-data') {
437
437
  request.type(contentType);
438
438
  }
439
439
  }
440
- if (contentType === "application/x-www-form-urlencoded") {
440
+ if (contentType === 'application/x-www-form-urlencoded') {
441
441
  request.send(_querystring["default"].stringify(this.normalizeParams(formParams)));
442
- } else if (contentType == "multipart/form-data") {
442
+ } else if (contentType == 'multipart/form-data') {
443
443
  var _formParams = this.normalizeParams(formParams);
444
444
  for (var key in _formParams) {
445
445
  if (_formParams.hasOwnProperty(key)) {
@@ -458,8 +458,8 @@ var ApiClient = /*#__PURE__*/function () {
458
458
  }
459
459
  }
460
460
  } else if (bodyParam !== null && bodyParam !== undefined) {
461
- if (!request.header["Content-Type"]) {
462
- request.type("application/json");
461
+ if (!request.header['Content-Type']) {
462
+ request.type('application/json');
463
463
  }
464
464
  request.send(bodyParam);
465
465
  }
@@ -467,15 +467,15 @@ var ApiClient = /*#__PURE__*/function () {
467
467
  if (accept) {
468
468
  request.accept(accept);
469
469
  }
470
- if (returnType === "Blob") {
471
- request.responseType("blob");
472
- } else if (returnType === "String") {
473
- request.responseType("text");
470
+ if (returnType === 'Blob') {
471
+ request.responseType('blob');
472
+ } else if (returnType === 'String') {
473
+ request.responseType('text');
474
474
  }
475
475
 
476
476
  // Attach previously saved cookies, if enabled
477
477
  if (this.enableCookies) {
478
- if (typeof window === "undefined") {
478
+ if (typeof window === 'undefined') {
479
479
  this.agent._attachCookies(request);
480
480
  } else {
481
481
  request.withCredentials();
@@ -496,7 +496,7 @@ var ApiClient = /*#__PURE__*/function () {
496
496
  } else {
497
497
  try {
498
498
  var data = _this3.deserialize(response, returnType);
499
- if (_this3.enableCookies && typeof window === "undefined") {
499
+ if (_this3.enableCookies && typeof window === 'undefined') {
500
500
  _this3.agent._saveCookies(response);
501
501
  }
502
502
  resolve({
@@ -512,21 +512,21 @@ var ApiClient = /*#__PURE__*/function () {
512
512
  }
513
513
 
514
514
  /**
515
- * Parses an ISO-8601 string representation or epoch representation of a date value.
516
- * @param {String} str The date value as a string.
517
- * @returns {Date} The parsed date object.
518
- */
515
+ * Parses an ISO-8601 string representation or epoch representation of a date value.
516
+ * @param {String} str The date value as a string.
517
+ * @returns {Date} The parsed date object.
518
+ */
519
519
  }, {
520
520
  key: "hostSettings",
521
521
  value:
522
522
  /**
523
- * Gets an array of host settings
524
- * @returns An array of host settings
525
- */
523
+ * Gets an array of host settings
524
+ * @returns An array of host settings
525
+ */
526
526
  function hostSettings() {
527
527
  return [{
528
- url: "https://api.notefile.net",
529
- description: "Production server"
528
+ 'url': "https://api.notefile.net",
529
+ 'description': "Production server"
530
530
  }];
531
531
  }
532
532
  }, {
@@ -540,37 +540,37 @@ var ApiClient = /*#__PURE__*/function () {
540
540
  throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length);
541
541
  }
542
542
  var server = servers[index];
543
- var url = server["url"];
543
+ var url = server['url'];
544
544
 
545
545
  // go through variable and assign a value
546
- for (var variable_name in server["variables"]) {
546
+ for (var variable_name in server['variables']) {
547
547
  if (variable_name in variables) {
548
- var variable = server["variables"][variable_name];
549
- if (!("enum_values" in variable) || variable["enum_values"].includes(variables[variable_name])) {
548
+ var variable = server['variables'][variable_name];
549
+ if (!('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name])) {
550
550
  url = url.replace("{" + variable_name + "}", variables[variable_name]);
551
551
  } else {
552
- throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server["variables"][variable_name]["enum_values"] + ".");
552
+ throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + ".");
553
553
  }
554
554
  } else {
555
555
  // use default value
556
- url = url.replace("{" + variable_name + "}", server["variables"][variable_name]["default_value"]);
556
+ url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']);
557
557
  }
558
558
  }
559
559
  return url;
560
560
  }
561
561
 
562
562
  /**
563
- * Constructs a new map or array model from REST data.
564
- * @param data {Object|Array} The REST data.
565
- * @param obj {Object|Array} The target object or array.
566
- */
563
+ * Constructs a new map or array model from REST data.
564
+ * @param data {Object|Array} The REST data.
565
+ * @param obj {Object|Array} The target object or array.
566
+ */
567
567
  }], [{
568
568
  key: "canBeJsonified",
569
569
  value: function canBeJsonified(str) {
570
- if (typeof str !== "string" && _typeof(str) !== "object") return false;
570
+ if (typeof str !== 'string' && _typeof(str) !== 'object') return false;
571
571
  try {
572
572
  var type = str.toString();
573
- return type === "[object Object]" || type === "[object Array]";
573
+ return type === '[object Object]' || type === '[object Array]';
574
574
  } catch (err) {
575
575
  return false;
576
576
  }
@@ -579,42 +579,42 @@ var ApiClient = /*#__PURE__*/function () {
579
579
  key: "parseDate",
580
580
  value: function parseDate(str) {
581
581
  if (isNaN(str)) {
582
- return new Date(str.replace(/(\d)(T)(\d)/i, "$1 $3"));
582
+ return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3'));
583
583
  }
584
584
  return new Date(+str);
585
585
  }
586
586
 
587
587
  /**
588
- * Converts a value to the specified type.
589
- * @param {(String|Object)} data The data to convert, as a string or object.
590
- * @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
591
- * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
592
- * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
593
- * all properties on <code>data<code> will be converted to this type.
594
- * @returns An instance of the specified type or null or undefined if data is null or undefined.
595
- */
588
+ * Converts a value to the specified type.
589
+ * @param {(String|Object)} data The data to convert, as a string or object.
590
+ * @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
591
+ * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
592
+ * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
593
+ * all properties on <code>data<code> will be converted to this type.
594
+ * @returns An instance of the specified type or null or undefined if data is null or undefined.
595
+ */
596
596
  }, {
597
597
  key: "convertToType",
598
598
  value: function convertToType(data, type) {
599
599
  if (data === null || data === undefined) return data;
600
600
  switch (type) {
601
- case "Boolean":
601
+ case 'Boolean':
602
602
  return Boolean(data);
603
- case "Integer":
603
+ case 'Integer':
604
604
  return parseInt(data, 10);
605
- case "Number":
605
+ case 'Number':
606
606
  return parseFloat(data);
607
- case "String":
607
+ case 'String':
608
608
  return String(data);
609
- case "Date":
609
+ case 'Date':
610
610
  return String(data);
611
- case "Blob":
611
+ case 'Blob':
612
612
  return data;
613
613
  default:
614
614
  if (type === Object) {
615
615
  // generic object, return directly
616
616
  return data;
617
- } else if (typeof type.constructFromObject === "function") {
617
+ } else if (typeof type.constructFromObject === 'function') {
618
618
  // for model type like User and enum class
619
619
  return type.constructFromObject(data);
620
620
  } else if (Array.isArray(type)) {
@@ -623,7 +623,7 @@ var ApiClient = /*#__PURE__*/function () {
623
623
  return data.map(function (item) {
624
624
  return ApiClient.convertToType(item, itemType);
625
625
  });
626
- } else if (_typeof(type) === "object") {
626
+ } else if (_typeof(type) === 'object') {
627
627
  // for plain object type like: {'String': 'Integer'}
628
628
  var keyType, valueType;
629
629
  for (var k in type) {
@@ -673,32 +673,32 @@ ApiClient.CollectionFormatEnum = {
673
673
  * Comma-separated values. Value: <code>csv</code>
674
674
  * @const
675
675
  */
676
- CSV: ",",
676
+ CSV: ',',
677
677
  /**
678
678
  * Space-separated values. Value: <code>ssv</code>
679
679
  * @const
680
680
  */
681
- SSV: " ",
681
+ SSV: ' ',
682
682
  /**
683
683
  * Tab-separated values. Value: <code>tsv</code>
684
684
  * @const
685
685
  */
686
- TSV: "\t",
686
+ TSV: '\t',
687
687
  /**
688
688
  * Pipe(|)-separated values. Value: <code>pipes</code>
689
689
  * @const
690
690
  */
691
- PIPES: "|",
691
+ PIPES: '|',
692
692
  /**
693
693
  * Native array. Value: <code>multi</code>
694
694
  * @const
695
695
  */
696
- MULTI: "multi"
696
+ MULTI: 'multi'
697
697
  };
698
698
 
699
699
  /**
700
- * The default API client implementation.
701
- * @type {module:ApiClient}
702
- */
700
+ * The default API client implementation.
701
+ * @type {module:ApiClient}
702
+ */
703
703
  ApiClient.instance = new ApiClient();
704
704
  var _default = exports["default"] = ApiClient;