files.com 1.1.18 → 1.2.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.
Files changed (165) hide show
  1. package/.eslintrc.js +0 -3
  2. package/_VERSION +1 -1
  3. package/docs/Errors.md +1 -0
  4. package/lib/Api.js +1 -1
  5. package/lib/Errors.js +957 -933
  6. package/lib/Files.js +1 -1
  7. package/lib/models/ActionNotificationExport.js +25 -25
  8. package/lib/models/ActionNotificationExportResult.js +10 -10
  9. package/lib/models/ActionWebhookFailure.js +5 -9
  10. package/lib/models/ApiKey.js +62 -70
  11. package/lib/models/App.js +5 -5
  12. package/lib/models/As2IncomingMessage.js +7 -7
  13. package/lib/models/As2OutgoingMessage.js +7 -7
  14. package/lib/models/As2Partner.js +54 -58
  15. package/lib/models/As2Station.js +51 -55
  16. package/lib/models/Automation.js +102 -110
  17. package/lib/models/AutomationRun.js +13 -13
  18. package/lib/models/BandwidthSnapshot.js +5 -5
  19. package/lib/models/Behavior.js +77 -85
  20. package/lib/models/Bundle.js +102 -110
  21. package/lib/models/BundleDownload.js +9 -9
  22. package/lib/models/BundleNotification.js +37 -41
  23. package/lib/models/BundleRecipient.js +22 -22
  24. package/lib/models/BundleRegistration.js +7 -7
  25. package/lib/models/Clickwrap.js +52 -56
  26. package/lib/models/DnsRecord.js +5 -5
  27. package/lib/models/EmailIncomingMessage.js +5 -5
  28. package/lib/models/ExternalEvent.js +18 -18
  29. package/lib/models/File.js +89 -93
  30. package/lib/models/FileComment.js +41 -45
  31. package/lib/models/FileCommentReaction.js +15 -19
  32. package/lib/models/FileMigration.js +5 -5
  33. package/lib/models/Folder.js +24 -24
  34. package/lib/models/FormFieldSet.js +44 -48
  35. package/lib/models/GpgKey.js +53 -57
  36. package/lib/models/Group.js +51 -55
  37. package/lib/models/GroupUser.js +53 -57
  38. package/lib/models/History.js +72 -72
  39. package/lib/models/HistoryExport.js +51 -51
  40. package/lib/models/HistoryExportResult.js +10 -10
  41. package/lib/models/InboxRecipient.js +22 -22
  42. package/lib/models/InboxRegistration.js +7 -7
  43. package/lib/models/InboxUpload.js +9 -9
  44. package/lib/models/Invoice.js +12 -12
  45. package/lib/models/IpAddress.js +17 -17
  46. package/lib/models/Lock.js +27 -31
  47. package/lib/models/Message.js +60 -64
  48. package/lib/models/MessageComment.js +46 -50
  49. package/lib/models/MessageCommentReaction.js +27 -31
  50. package/lib/models/MessageReaction.js +27 -31
  51. package/lib/models/Notification.js +66 -70
  52. package/lib/models/Payment.js +12 -12
  53. package/lib/models/Permission.js +28 -32
  54. package/lib/models/Priority.js +9 -9
  55. package/lib/models/Project.js +39 -43
  56. package/lib/models/PublicKey.js +46 -50
  57. package/lib/models/RemoteBandwidthSnapshot.js +5 -5
  58. package/lib/models/RemoteServer.js +306 -310
  59. package/lib/models/Request.js +33 -37
  60. package/lib/models/Session.js +11 -15
  61. package/lib/models/SettingsChange.js +5 -5
  62. package/lib/models/SftpHostKey.js +40 -44
  63. package/lib/models/ShareGroup.js +50 -54
  64. package/lib/models/Site.js +138 -138
  65. package/lib/models/Snapshot.js +44 -48
  66. package/lib/models/SsoStrategy.js +15 -19
  67. package/lib/models/Style.js +17 -21
  68. package/lib/models/UsageDailySnapshot.js +5 -5
  69. package/lib/models/UsageSnapshot.js +5 -5
  70. package/lib/models/User.js +156 -172
  71. package/lib/models/UserCipherUse.js +7 -7
  72. package/lib/models/UserRequest.js +26 -30
  73. package/lib/models/WebhookTest.js +15 -15
  74. package/package.json +6 -2
  75. package/src/Api.js +2 -1
  76. package/src/Errors.js +189 -177
  77. package/src/Files.js +1 -1
  78. package/src/models/AccountLineItem.js +5 -2
  79. package/src/models/Action.js +5 -2
  80. package/src/models/ActionNotificationExport.js +36 -35
  81. package/src/models/ActionNotificationExportResult.js +15 -13
  82. package/src/models/ActionWebhookFailure.js +9 -8
  83. package/src/models/ApiKey.js +69 -72
  84. package/src/models/App.js +10 -8
  85. package/src/models/As2IncomingMessage.js +12 -10
  86. package/src/models/As2OutgoingMessage.js +12 -10
  87. package/src/models/As2Partner.js +61 -60
  88. package/src/models/As2Station.js +58 -57
  89. package/src/models/Auto.js +5 -2
  90. package/src/models/Automation.js +121 -110
  91. package/src/models/AutomationRun.js +18 -17
  92. package/src/models/BandwidthSnapshot.js +10 -8
  93. package/src/models/Behavior.js +85 -86
  94. package/src/models/Bundle.js +121 -110
  95. package/src/models/BundleDownload.js +14 -12
  96. package/src/models/BundleNotification.js +40 -43
  97. package/src/models/BundleRecipient.js +33 -32
  98. package/src/models/BundleRegistration.js +12 -10
  99. package/src/models/Clickwrap.js +60 -58
  100. package/src/models/DnsRecord.js +10 -8
  101. package/src/models/EmailIncomingMessage.js +10 -8
  102. package/src/models/Errors.js +5 -2
  103. package/src/models/ExternalEvent.js +29 -29
  104. package/src/models/File.js +116 -108
  105. package/src/models/FileAction.js +5 -2
  106. package/src/models/FileComment.js +45 -46
  107. package/src/models/FileCommentReaction.js +26 -26
  108. package/src/models/FileMigration.js +10 -8
  109. package/src/models/FileUploadPart.js +5 -2
  110. package/src/models/Folder.js +32 -29
  111. package/src/models/FormField.js +5 -2
  112. package/src/models/FormFieldSet.js +49 -50
  113. package/src/models/GpgKey.js +60 -59
  114. package/src/models/Group.js +58 -57
  115. package/src/models/GroupUser.js +60 -58
  116. package/src/models/History.js +77 -74
  117. package/src/models/HistoryExport.js +62 -61
  118. package/src/models/HistoryExportResult.js +15 -13
  119. package/src/models/Image.js +5 -2
  120. package/src/models/InboxRecipient.js +33 -32
  121. package/src/models/InboxRegistration.js +12 -10
  122. package/src/models/InboxUpload.js +14 -12
  123. package/src/models/Invoice.js +17 -14
  124. package/src/models/InvoiceLineItem.js +5 -2
  125. package/src/models/IpAddress.js +22 -20
  126. package/src/models/Lock.js +36 -36
  127. package/src/models/Message.js +66 -66
  128. package/src/models/MessageComment.js +50 -52
  129. package/src/models/MessageCommentReaction.js +38 -40
  130. package/src/models/MessageReaction.js +38 -40
  131. package/src/models/Notification.js +74 -72
  132. package/src/models/Payment.js +17 -14
  133. package/src/models/PaymentLineItem.js +5 -2
  134. package/src/models/Permission.js +39 -40
  135. package/src/models/Preview.js +5 -2
  136. package/src/models/Priority.js +14 -12
  137. package/src/models/Project.js +43 -45
  138. package/src/models/PublicIpAddress.js +5 -2
  139. package/src/models/PublicKey.js +50 -52
  140. package/src/models/RemoteBandwidthSnapshot.js +10 -8
  141. package/src/models/RemoteServer.js +380 -312
  142. package/src/models/RemoteServerConfigurationFile.js +5 -2
  143. package/src/models/Request.js +44 -46
  144. package/src/models/Session.js +22 -22
  145. package/src/models/SettingsChange.js +10 -8
  146. package/src/models/SftpHostKey.js +45 -46
  147. package/src/models/ShareGroup.js +56 -56
  148. package/src/models/ShareGroupMember.js +5 -2
  149. package/src/models/Site.js +143 -142
  150. package/src/models/Snapshot.js +50 -50
  151. package/src/models/SsoStrategy.js +20 -21
  152. package/src/models/Status.js +5 -2
  153. package/src/models/Style.js +22 -23
  154. package/src/models/UsageDailySnapshot.js +10 -8
  155. package/src/models/UsageSnapshot.js +10 -8
  156. package/src/models/User.js +185 -168
  157. package/src/models/UserCipherUse.js +12 -10
  158. package/src/models/UserRequest.js +37 -39
  159. package/src/models/WebhookTest.js +26 -24
  160. package/test/Api.test.js +163 -0
  161. package/test/{package.json → integration/package.json} +1 -1
  162. package/test/{src → integration/src}/index.js +1 -1
  163. package/test.sh +2 -1
  164. /package/test/{.babelrc → integration/.babelrc} +0 -0
  165. /package/test/{index.js → integration/index.js} +0 -0
@@ -192,26 +192,26 @@ _class = As2OutgoingMessage;
192
192
  case 0:
193
193
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
194
194
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
195
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
195
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
196
196
  _context.next = 4;
197
197
  break;
198
198
  }
199
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
199
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
200
200
  case 4:
201
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
201
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
202
202
  _context.next = 6;
203
203
  break;
204
204
  }
205
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
205
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
206
206
  case 6:
207
- if (!(params['as2_partner_id'] && !(0, _utils.isInt)(params['as2_partner_id']))) {
207
+ if (!(params.as2_partner_id && !(0, _utils.isInt)(params.as2_partner_id))) {
208
208
  _context.next = 8;
209
209
  break;
210
210
  }
211
- throw new errors.InvalidParameterError("Bad parameter: as2_partner_id must be of type Int, received ".concat((0, _utils.getType)(params['as2_partner_id'])));
211
+ throw new errors.InvalidParameterError("Bad parameter: as2_partner_id must be of type Int, received ".concat((0, _utils.getType)(params.as2_partner_id)));
212
212
  case 8:
213
213
  _context.next = 10;
214
- return _Api.default.sendRequest("/as2_outgoing_messages", 'GET', params, options);
214
+ return _Api.default.sendRequest('/as2_outgoing_messages', 'GET', params, options);
215
215
  case 10:
216
216
  response = _context.sent;
217
217
  return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
@@ -158,37 +158,37 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
158
158
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
159
159
  case 5:
160
160
  params.id = _this.attributes.id;
161
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
161
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
162
162
  _context.next = 8;
163
163
  break;
164
164
  }
165
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
165
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
166
166
  case 8:
167
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
167
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
168
168
  _context.next = 10;
169
169
  break;
170
170
  }
171
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
171
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
172
172
  case 10:
173
- if (!(params['uri'] && !(0, _utils.isString)(params['uri']))) {
173
+ if (!(params.uri && !(0, _utils.isString)(params.uri))) {
174
174
  _context.next = 12;
175
175
  break;
176
176
  }
177
- throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params['uri'])));
177
+ throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params.uri)));
178
178
  case 12:
179
- if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
179
+ if (!(params.server_certificate && !(0, _utils.isString)(params.server_certificate))) {
180
180
  _context.next = 14;
181
181
  break;
182
182
  }
183
- throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params['server_certificate'])));
183
+ throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
184
184
  case 14:
185
- if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
185
+ if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
186
186
  _context.next = 16;
187
187
  break;
188
188
  }
189
- throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params['public_certificate'])));
189
+ throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
190
190
  case 16:
191
- if (params['id']) {
191
+ if (params.id) {
192
192
  _context.next = 22;
193
193
  break;
194
194
  }
@@ -196,14 +196,14 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
196
196
  _context.next = 21;
197
197
  break;
198
198
  }
199
- params['id'] = _this.id;
199
+ params.id = _this.id;
200
200
  _context.next = 22;
201
201
  break;
202
202
  case 21:
203
203
  throw new errors.MissingParameterError('Parameter missing: id');
204
204
  case 22:
205
205
  _context.next = 24;
206
- return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
206
+ return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
207
207
  case 24:
208
208
  response = _context.sent;
209
209
  return _context.abrupt("return", new As2Partner(response === null || response === void 0 ? void 0 : response.data, _this.options));
@@ -215,7 +215,6 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
215
215
  })));
216
216
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
217
217
  var params,
218
- response,
219
218
  _args2 = arguments;
220
219
  return _regenerator.default.wrap(function _callee2$(_context2) {
221
220
  while (1) switch (_context2.prev = _context2.next) {
@@ -234,13 +233,13 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
234
233
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
235
234
  case 5:
236
235
  params.id = _this.attributes.id;
237
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
236
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
238
237
  _context2.next = 8;
239
238
  break;
240
239
  }
241
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
240
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
242
241
  case 8:
243
- if (params['id']) {
242
+ if (params.id) {
244
243
  _context2.next = 14;
245
244
  break;
246
245
  }
@@ -248,18 +247,15 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
248
247
  _context2.next = 13;
249
248
  break;
250
249
  }
251
- params['id'] = _this.id;
250
+ params.id = _this.id;
252
251
  _context2.next = 14;
253
252
  break;
254
253
  case 13:
255
254
  throw new errors.MissingParameterError('Parameter missing: id');
256
255
  case 14:
257
256
  _context2.next = 16;
258
- return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
257
+ return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
259
258
  case 16:
260
- response = _context2.sent;
261
- return _context2.abrupt("return");
262
- case 18:
263
259
  case "end":
264
260
  return _context2.stop();
265
261
  }
@@ -270,28 +266,28 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
270
266
  return _this.delete(params);
271
267
  });
272
268
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
273
- var newObject, _newObject;
269
+ var _newObject, newObject;
274
270
  return _regenerator.default.wrap(function _callee3$(_context3) {
275
271
  while (1) switch (_context3.prev = _context3.next) {
276
272
  case 0:
277
- if (!_this.attributes['id']) {
278
- _context3.next = 8;
273
+ if (!_this.attributes.id) {
274
+ _context3.next = 6;
279
275
  break;
280
276
  }
281
277
  _context3.next = 3;
282
278
  return _this.update(_this.attributes);
283
279
  case 3:
284
- newObject = _context3.sent;
285
- _this.attributes = _objectSpread({}, newObject.attributes);
286
- return _context3.abrupt("return", true);
287
- case 8:
288
- _context3.next = 10;
289
- return As2Partner.create(_this.attributes, _this.options);
290
- case 10:
291
280
  _newObject = _context3.sent;
292
281
  _this.attributes = _objectSpread({}, _newObject.attributes);
293
282
  return _context3.abrupt("return", true);
294
- case 13:
283
+ case 6:
284
+ _context3.next = 8;
285
+ return As2Partner.create(_this.attributes, _this.options);
286
+ case 8:
287
+ newObject = _context3.sent;
288
+ _this.attributes = _objectSpread({}, newObject.attributes);
289
+ return _context3.abrupt("return", true);
290
+ case 11:
295
291
  case "end":
296
292
  return _context3.stop();
297
293
  }
@@ -325,20 +321,20 @@ _class = As2Partner;
325
321
  case 0:
326
322
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
327
323
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
328
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
324
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
329
325
  _context4.next = 4;
330
326
  break;
331
327
  }
332
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
328
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
333
329
  case 4:
334
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
330
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
335
331
  _context4.next = 6;
336
332
  break;
337
333
  }
338
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
334
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
339
335
  case 6:
340
336
  _context4.next = 8;
341
- return _Api.default.sendRequest("/as2_partners", 'GET', params, options);
337
+ return _Api.default.sendRequest('/as2_partners', 'GET', params, options);
342
338
  case 8:
343
339
  response = _context4.sent;
344
340
  return _context4.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
@@ -374,21 +370,21 @@ _class = As2Partner;
374
370
  }
375
371
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
376
372
  case 4:
377
- params['id'] = id;
378
- if (params['id']) {
373
+ params.id = id;
374
+ if (params.id) {
379
375
  _context5.next = 7;
380
376
  break;
381
377
  }
382
378
  throw new errors.MissingParameterError('Parameter missing: id');
383
379
  case 7:
384
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
380
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
385
381
  _context5.next = 9;
386
382
  break;
387
383
  }
388
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
384
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
389
385
  case 9:
390
386
  _context5.next = 11;
391
- return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
387
+ return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'GET', params, options);
392
388
  case 11:
393
389
  response = _context5.sent;
394
390
  return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -424,62 +420,62 @@ _class = As2Partner;
424
420
  case 0:
425
421
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
426
422
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
427
- if (params['name']) {
423
+ if (params.name) {
428
424
  _context6.next = 4;
429
425
  break;
430
426
  }
431
427
  throw new errors.MissingParameterError('Parameter missing: name');
432
428
  case 4:
433
- if (params['uri']) {
429
+ if (params.uri) {
434
430
  _context6.next = 6;
435
431
  break;
436
432
  }
437
433
  throw new errors.MissingParameterError('Parameter missing: uri');
438
434
  case 6:
439
- if (params['public_certificate']) {
435
+ if (params.public_certificate) {
440
436
  _context6.next = 8;
441
437
  break;
442
438
  }
443
439
  throw new errors.MissingParameterError('Parameter missing: public_certificate');
444
440
  case 8:
445
- if (params['as2_station_id']) {
441
+ if (params.as2_station_id) {
446
442
  _context6.next = 10;
447
443
  break;
448
444
  }
449
445
  throw new errors.MissingParameterError('Parameter missing: as2_station_id');
450
446
  case 10:
451
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
447
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
452
448
  _context6.next = 12;
453
449
  break;
454
450
  }
455
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
451
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
456
452
  case 12:
457
- if (!(params['uri'] && !(0, _utils.isString)(params['uri']))) {
453
+ if (!(params.uri && !(0, _utils.isString)(params.uri))) {
458
454
  _context6.next = 14;
459
455
  break;
460
456
  }
461
- throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params['uri'])));
457
+ throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params.uri)));
462
458
  case 14:
463
- if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
459
+ if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
464
460
  _context6.next = 16;
465
461
  break;
466
462
  }
467
- throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params['public_certificate'])));
463
+ throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
468
464
  case 16:
469
- if (!(params['as2_station_id'] && !(0, _utils.isInt)(params['as2_station_id']))) {
465
+ if (!(params.as2_station_id && !(0, _utils.isInt)(params.as2_station_id))) {
470
466
  _context6.next = 18;
471
467
  break;
472
468
  }
473
- throw new errors.InvalidParameterError("Bad parameter: as2_station_id must be of type Int, received ".concat((0, _utils.getType)(params['as2_station_id'])));
469
+ throw new errors.InvalidParameterError("Bad parameter: as2_station_id must be of type Int, received ".concat((0, _utils.getType)(params.as2_station_id)));
474
470
  case 18:
475
- if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
471
+ if (!(params.server_certificate && !(0, _utils.isString)(params.server_certificate))) {
476
472
  _context6.next = 20;
477
473
  break;
478
474
  }
479
- throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params['server_certificate'])));
475
+ throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
480
476
  case 20:
481
477
  _context6.next = 22;
482
- return _Api.default.sendRequest("/as2_partners", 'POST', params, options);
478
+ return _Api.default.sendRequest('/as2_partners', 'POST', params, options);
483
479
  case 22:
484
480
  response = _context6.sent;
485
481
  return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -171,37 +171,37 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
171
171
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
172
172
  case 5:
173
173
  params.id = _this.attributes.id;
174
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
174
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
175
175
  _context.next = 8;
176
176
  break;
177
177
  }
178
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
178
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
179
179
  case 8:
180
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
180
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
181
181
  _context.next = 10;
182
182
  break;
183
183
  }
184
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
184
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
185
185
  case 10:
186
- if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
186
+ if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
187
187
  _context.next = 12;
188
188
  break;
189
189
  }
190
- throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params['public_certificate'])));
190
+ throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
191
191
  case 12:
192
- if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
192
+ if (!(params.private_key && !(0, _utils.isString)(params.private_key))) {
193
193
  _context.next = 14;
194
194
  break;
195
195
  }
196
- throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params['private_key'])));
196
+ throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params.private_key)));
197
197
  case 14:
198
- if (!(params['private_key_password'] && !(0, _utils.isString)(params['private_key_password']))) {
198
+ if (!(params.private_key_password && !(0, _utils.isString)(params.private_key_password))) {
199
199
  _context.next = 16;
200
200
  break;
201
201
  }
202
- throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params['private_key_password'])));
202
+ throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params.private_key_password)));
203
203
  case 16:
204
- if (params['id']) {
204
+ if (params.id) {
205
205
  _context.next = 22;
206
206
  break;
207
207
  }
@@ -209,14 +209,14 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
209
209
  _context.next = 21;
210
210
  break;
211
211
  }
212
- params['id'] = _this.id;
212
+ params.id = _this.id;
213
213
  _context.next = 22;
214
214
  break;
215
215
  case 21:
216
216
  throw new errors.MissingParameterError('Parameter missing: id');
217
217
  case 22:
218
218
  _context.next = 24;
219
- return _Api.default.sendRequest("/as2_stations/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
219
+ return _Api.default.sendRequest("/as2_stations/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
220
220
  case 24:
221
221
  response = _context.sent;
222
222
  return _context.abrupt("return", new As2Station(response === null || response === void 0 ? void 0 : response.data, _this.options));
@@ -228,7 +228,6 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
228
228
  })));
229
229
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
230
230
  var params,
231
- response,
232
231
  _args2 = arguments;
233
232
  return _regenerator.default.wrap(function _callee2$(_context2) {
234
233
  while (1) switch (_context2.prev = _context2.next) {
@@ -247,13 +246,13 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
247
246
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
248
247
  case 5:
249
248
  params.id = _this.attributes.id;
250
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
249
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
251
250
  _context2.next = 8;
252
251
  break;
253
252
  }
254
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
253
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
255
254
  case 8:
256
- if (params['id']) {
255
+ if (params.id) {
257
256
  _context2.next = 14;
258
257
  break;
259
258
  }
@@ -261,18 +260,15 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
261
260
  _context2.next = 13;
262
261
  break;
263
262
  }
264
- params['id'] = _this.id;
263
+ params.id = _this.id;
265
264
  _context2.next = 14;
266
265
  break;
267
266
  case 13:
268
267
  throw new errors.MissingParameterError('Parameter missing: id');
269
268
  case 14:
270
269
  _context2.next = 16;
271
- return _Api.default.sendRequest("/as2_stations/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
270
+ return _Api.default.sendRequest("/as2_stations/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
272
271
  case 16:
273
- response = _context2.sent;
274
- return _context2.abrupt("return");
275
- case 18:
276
272
  case "end":
277
273
  return _context2.stop();
278
274
  }
@@ -283,28 +279,28 @@ var As2Station = /*#__PURE__*/(0, _createClass2.default)(function As2Station() {
283
279
  return _this.delete(params);
284
280
  });
285
281
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
286
- var newObject, _newObject;
282
+ var _newObject, newObject;
287
283
  return _regenerator.default.wrap(function _callee3$(_context3) {
288
284
  while (1) switch (_context3.prev = _context3.next) {
289
285
  case 0:
290
- if (!_this.attributes['id']) {
291
- _context3.next = 8;
286
+ if (!_this.attributes.id) {
287
+ _context3.next = 6;
292
288
  break;
293
289
  }
294
290
  _context3.next = 3;
295
291
  return _this.update(_this.attributes);
296
292
  case 3:
297
- newObject = _context3.sent;
298
- _this.attributes = _objectSpread({}, newObject.attributes);
299
- return _context3.abrupt("return", true);
300
- case 8:
301
- _context3.next = 10;
302
- return As2Station.create(_this.attributes, _this.options);
303
- case 10:
304
293
  _newObject = _context3.sent;
305
294
  _this.attributes = _objectSpread({}, _newObject.attributes);
306
295
  return _context3.abrupt("return", true);
307
- case 13:
296
+ case 6:
297
+ _context3.next = 8;
298
+ return As2Station.create(_this.attributes, _this.options);
299
+ case 8:
300
+ newObject = _context3.sent;
301
+ _this.attributes = _objectSpread({}, newObject.attributes);
302
+ return _context3.abrupt("return", true);
303
+ case 11:
308
304
  case "end":
309
305
  return _context3.stop();
310
306
  }
@@ -338,20 +334,20 @@ _class = As2Station;
338
334
  case 0:
339
335
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
340
336
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
341
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
337
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
342
338
  _context4.next = 4;
343
339
  break;
344
340
  }
345
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
341
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
346
342
  case 4:
347
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
343
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
348
344
  _context4.next = 6;
349
345
  break;
350
346
  }
351
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
347
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
352
348
  case 6:
353
349
  _context4.next = 8;
354
- return _Api.default.sendRequest("/as2_stations", 'GET', params, options);
350
+ return _Api.default.sendRequest('/as2_stations', 'GET', params, options);
355
351
  case 8:
356
352
  response = _context4.sent;
357
353
  return _context4.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
@@ -387,21 +383,21 @@ _class = As2Station;
387
383
  }
388
384
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
389
385
  case 4:
390
- params['id'] = id;
391
- if (params['id']) {
386
+ params.id = id;
387
+ if (params.id) {
392
388
  _context5.next = 7;
393
389
  break;
394
390
  }
395
391
  throw new errors.MissingParameterError('Parameter missing: id');
396
392
  case 7:
397
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
393
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
398
394
  _context5.next = 9;
399
395
  break;
400
396
  }
401
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
397
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
402
398
  case 9:
403
399
  _context5.next = 11;
404
- return _Api.default.sendRequest("/as2_stations/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
400
+ return _Api.default.sendRequest("/as2_stations/".concat(encodeURIComponent(params.id)), 'GET', params, options);
405
401
  case 11:
406
402
  response = _context5.sent;
407
403
  return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -435,50 +431,50 @@ _class = As2Station;
435
431
  case 0:
436
432
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
437
433
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
438
- if (params['name']) {
434
+ if (params.name) {
439
435
  _context6.next = 4;
440
436
  break;
441
437
  }
442
438
  throw new errors.MissingParameterError('Parameter missing: name');
443
439
  case 4:
444
- if (params['public_certificate']) {
440
+ if (params.public_certificate) {
445
441
  _context6.next = 6;
446
442
  break;
447
443
  }
448
444
  throw new errors.MissingParameterError('Parameter missing: public_certificate');
449
445
  case 6:
450
- if (params['private_key']) {
446
+ if (params.private_key) {
451
447
  _context6.next = 8;
452
448
  break;
453
449
  }
454
450
  throw new errors.MissingParameterError('Parameter missing: private_key');
455
451
  case 8:
456
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
452
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
457
453
  _context6.next = 10;
458
454
  break;
459
455
  }
460
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
456
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
461
457
  case 10:
462
- if (!(params['public_certificate'] && !(0, _utils.isString)(params['public_certificate']))) {
458
+ if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
463
459
  _context6.next = 12;
464
460
  break;
465
461
  }
466
- throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params['public_certificate'])));
462
+ throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
467
463
  case 12:
468
- if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
464
+ if (!(params.private_key && !(0, _utils.isString)(params.private_key))) {
469
465
  _context6.next = 14;
470
466
  break;
471
467
  }
472
- throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params['private_key'])));
468
+ throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params.private_key)));
473
469
  case 14:
474
- if (!(params['private_key_password'] && !(0, _utils.isString)(params['private_key_password']))) {
470
+ if (!(params.private_key_password && !(0, _utils.isString)(params.private_key_password))) {
475
471
  _context6.next = 16;
476
472
  break;
477
473
  }
478
- throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params['private_key_password'])));
474
+ throw new errors.InvalidParameterError("Bad parameter: private_key_password must be of type String, received ".concat((0, _utils.getType)(params.private_key_password)));
479
475
  case 16:
480
476
  _context6.next = 18;
481
- return _Api.default.sendRequest("/as2_stations", 'POST', params, options);
477
+ return _Api.default.sendRequest('/as2_stations', 'POST', params, options);
482
478
  case 18:
483
479
  response = _context6.sent;
484
480
  return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));