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
package/lib/Files.js CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
11
11
  var apiKey;
12
12
  var baseUrl = 'https://app.files.com';
13
13
  var sessionId = null;
14
- var version = '1.1.18';
14
+ var version = '1.2.0';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -136,7 +136,7 @@ var ActionNotificationExport = /*#__PURE__*/(0, _createClass2.default)(function
136
136
  return _regenerator.default.wrap(function _callee$(_context) {
137
137
  while (1) switch (_context.prev = _context.next) {
138
138
  case 0:
139
- if (!_this.attributes['id']) {
139
+ if (!_this.attributes.id) {
140
140
  _context.next = 4;
141
141
  break;
142
142
  }
@@ -187,21 +187,21 @@ _class = ActionNotificationExport;
187
187
  }
188
188
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
189
189
  case 4:
190
- params['id'] = id;
191
- if (params['id']) {
190
+ params.id = id;
191
+ if (params.id) {
192
192
  _context2.next = 7;
193
193
  break;
194
194
  }
195
195
  throw new errors.MissingParameterError('Parameter missing: id');
196
196
  case 7:
197
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
197
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
198
198
  _context2.next = 9;
199
199
  break;
200
200
  }
201
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
201
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
202
202
  case 9:
203
203
  _context2.next = 11;
204
- return _Api.default.sendRequest("/action_notification_exports/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
204
+ return _Api.default.sendRequest("/action_notification_exports/".concat(encodeURIComponent(params.id)), 'GET', params, options);
205
205
  case 11:
206
206
  response = _context2.sent;
207
207
  return _context2.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -241,62 +241,62 @@ _class = ActionNotificationExport;
241
241
  case 0:
242
242
  params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
243
243
  options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
244
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
244
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
245
245
  _context3.next = 4;
246
246
  break;
247
247
  }
248
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
248
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
249
249
  case 4:
250
- if (!(params['start_at'] && !(0, _utils.isString)(params['start_at']))) {
250
+ if (!(params.start_at && !(0, _utils.isString)(params.start_at))) {
251
251
  _context3.next = 6;
252
252
  break;
253
253
  }
254
- throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params['start_at'])));
254
+ throw new errors.InvalidParameterError("Bad parameter: start_at must be of type String, received ".concat((0, _utils.getType)(params.start_at)));
255
255
  case 6:
256
- if (!(params['end_at'] && !(0, _utils.isString)(params['end_at']))) {
256
+ if (!(params.end_at && !(0, _utils.isString)(params.end_at))) {
257
257
  _context3.next = 8;
258
258
  break;
259
259
  }
260
- throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params['end_at'])));
260
+ throw new errors.InvalidParameterError("Bad parameter: end_at must be of type String, received ".concat((0, _utils.getType)(params.end_at)));
261
261
  case 8:
262
- if (!(params['query_message'] && !(0, _utils.isString)(params['query_message']))) {
262
+ if (!(params.query_message && !(0, _utils.isString)(params.query_message))) {
263
263
  _context3.next = 10;
264
264
  break;
265
265
  }
266
- throw new errors.InvalidParameterError("Bad parameter: query_message must be of type String, received ".concat((0, _utils.getType)(params['query_message'])));
266
+ throw new errors.InvalidParameterError("Bad parameter: query_message must be of type String, received ".concat((0, _utils.getType)(params.query_message)));
267
267
  case 10:
268
- if (!(params['query_request_method'] && !(0, _utils.isString)(params['query_request_method']))) {
268
+ if (!(params.query_request_method && !(0, _utils.isString)(params.query_request_method))) {
269
269
  _context3.next = 12;
270
270
  break;
271
271
  }
272
- throw new errors.InvalidParameterError("Bad parameter: query_request_method must be of type String, received ".concat((0, _utils.getType)(params['query_request_method'])));
272
+ throw new errors.InvalidParameterError("Bad parameter: query_request_method must be of type String, received ".concat((0, _utils.getType)(params.query_request_method)));
273
273
  case 12:
274
- if (!(params['query_request_url'] && !(0, _utils.isString)(params['query_request_url']))) {
274
+ if (!(params.query_request_url && !(0, _utils.isString)(params.query_request_url))) {
275
275
  _context3.next = 14;
276
276
  break;
277
277
  }
278
- throw new errors.InvalidParameterError("Bad parameter: query_request_url must be of type String, received ".concat((0, _utils.getType)(params['query_request_url'])));
278
+ throw new errors.InvalidParameterError("Bad parameter: query_request_url must be of type String, received ".concat((0, _utils.getType)(params.query_request_url)));
279
279
  case 14:
280
- if (!(params['query_status'] && !(0, _utils.isString)(params['query_status']))) {
280
+ if (!(params.query_status && !(0, _utils.isString)(params.query_status))) {
281
281
  _context3.next = 16;
282
282
  break;
283
283
  }
284
- throw new errors.InvalidParameterError("Bad parameter: query_status must be of type String, received ".concat((0, _utils.getType)(params['query_status'])));
284
+ throw new errors.InvalidParameterError("Bad parameter: query_status must be of type String, received ".concat((0, _utils.getType)(params.query_status)));
285
285
  case 16:
286
- if (!(params['query_path'] && !(0, _utils.isString)(params['query_path']))) {
286
+ if (!(params.query_path && !(0, _utils.isString)(params.query_path))) {
287
287
  _context3.next = 18;
288
288
  break;
289
289
  }
290
- throw new errors.InvalidParameterError("Bad parameter: query_path must be of type String, received ".concat((0, _utils.getType)(params['query_path'])));
290
+ throw new errors.InvalidParameterError("Bad parameter: query_path must be of type String, received ".concat((0, _utils.getType)(params.query_path)));
291
291
  case 18:
292
- if (!(params['query_folder'] && !(0, _utils.isString)(params['query_folder']))) {
292
+ if (!(params.query_folder && !(0, _utils.isString)(params.query_folder))) {
293
293
  _context3.next = 20;
294
294
  break;
295
295
  }
296
- throw new errors.InvalidParameterError("Bad parameter: query_folder must be of type String, received ".concat((0, _utils.getType)(params['query_folder'])));
296
+ throw new errors.InvalidParameterError("Bad parameter: query_folder must be of type String, received ".concat((0, _utils.getType)(params.query_folder)));
297
297
  case 20:
298
298
  _context3.next = 22;
299
- return _Api.default.sendRequest("/action_notification_exports", 'POST', params, options);
299
+ return _Api.default.sendRequest('/action_notification_exports', 'POST', params, options);
300
300
  case 22:
301
301
  response = _context3.sent;
302
302
  return _context3.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -103,38 +103,38 @@ _class = ActionNotificationExportResult;
103
103
  case 0:
104
104
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
105
105
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
106
- if (params['action_notification_export_id']) {
106
+ if (params.action_notification_export_id) {
107
107
  _context.next = 4;
108
108
  break;
109
109
  }
110
110
  throw new errors.MissingParameterError('Parameter missing: action_notification_export_id');
111
111
  case 4:
112
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
112
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
113
113
  _context.next = 6;
114
114
  break;
115
115
  }
116
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
116
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
117
117
  case 6:
118
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
118
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
119
119
  _context.next = 8;
120
120
  break;
121
121
  }
122
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
122
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
123
123
  case 8:
124
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
124
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
125
125
  _context.next = 10;
126
126
  break;
127
127
  }
128
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
128
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
129
129
  case 10:
130
- if (!(params['action_notification_export_id'] && !(0, _utils.isInt)(params['action_notification_export_id']))) {
130
+ if (!(params.action_notification_export_id && !(0, _utils.isInt)(params.action_notification_export_id))) {
131
131
  _context.next = 12;
132
132
  break;
133
133
  }
134
- throw new errors.InvalidParameterError("Bad parameter: action_notification_export_id must be of type Int, received ".concat((0, _utils.getType)(params['action_notification_export_id'])));
134
+ throw new errors.InvalidParameterError("Bad parameter: action_notification_export_id must be of type Int, received ".concat((0, _utils.getType)(params.action_notification_export_id)));
135
135
  case 12:
136
136
  _context.next = 14;
137
- return _Api.default.sendRequest("/action_notification_export_results", 'GET', params, options);
137
+ return _Api.default.sendRequest('/action_notification_export_results', 'GET', params, options);
138
138
  case 14:
139
139
  response = _context.sent;
140
140
  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) {
@@ -34,7 +34,6 @@ var ActionWebhookFailure = /*#__PURE__*/(0, _createClass2.default)(function Acti
34
34
  // retry Action Webhook Failure
35
35
  (0, _defineProperty2.default)(this, "retry", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
36
36
  var params,
37
- response,
38
37
  _args = arguments;
39
38
  return _regenerator.default.wrap(function _callee$(_context) {
40
39
  while (1) switch (_context.prev = _context.next) {
@@ -53,13 +52,13 @@ var ActionWebhookFailure = /*#__PURE__*/(0, _createClass2.default)(function Acti
53
52
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
54
53
  case 5:
55
54
  params.id = _this.attributes.id;
56
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
55
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
57
56
  _context.next = 8;
58
57
  break;
59
58
  }
60
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
59
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
61
60
  case 8:
62
- if (params['id']) {
61
+ if (params.id) {
63
62
  _context.next = 14;
64
63
  break;
65
64
  }
@@ -67,18 +66,15 @@ var ActionWebhookFailure = /*#__PURE__*/(0, _createClass2.default)(function Acti
67
66
  _context.next = 13;
68
67
  break;
69
68
  }
70
- params['id'] = _this.id;
69
+ params.id = _this.id;
71
70
  _context.next = 14;
72
71
  break;
73
72
  case 13:
74
73
  throw new errors.MissingParameterError('Parameter missing: id');
75
74
  case 14:
76
75
  _context.next = 16;
77
- return _Api.default.sendRequest("/action_webhook_failures/".concat(encodeURIComponent(params['id']), "/retry"), 'POST', params, _this.options);
76
+ return _Api.default.sendRequest("/action_webhook_failures/".concat(encodeURIComponent(params.id), "/retry"), 'POST', params, _this.options);
78
77
  case 16:
79
- response = _context.sent;
80
- return _context.abrupt("return");
81
- case 18:
82
78
  case "end":
83
79
  return _context.stop();
84
80
  }
@@ -140,37 +140,37 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
140
140
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
141
141
  case 5:
142
142
  params.id = _this.attributes.id;
143
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
143
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
144
144
  _context.next = 8;
145
145
  break;
146
146
  }
147
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
147
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
148
148
  case 8:
149
- if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
149
+ if (!(params.description && !(0, _utils.isString)(params.description))) {
150
150
  _context.next = 10;
151
151
  break;
152
152
  }
153
- throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params['description'])));
153
+ throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
154
154
  case 10:
155
- if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
155
+ if (!(params.expires_at && !(0, _utils.isString)(params.expires_at))) {
156
156
  _context.next = 12;
157
157
  break;
158
158
  }
159
- throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
159
+ throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params.expires_at)));
160
160
  case 12:
161
- if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
161
+ if (!(params.permission_set && !(0, _utils.isString)(params.permission_set))) {
162
162
  _context.next = 14;
163
163
  break;
164
164
  }
165
- throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params['permission_set'])));
165
+ throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params.permission_set)));
166
166
  case 14:
167
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
167
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
168
168
  _context.next = 16;
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 16:
173
- if (params['id']) {
173
+ if (params.id) {
174
174
  _context.next = 22;
175
175
  break;
176
176
  }
@@ -178,14 +178,14 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
178
178
  _context.next = 21;
179
179
  break;
180
180
  }
181
- params['id'] = _this.id;
181
+ params.id = _this.id;
182
182
  _context.next = 22;
183
183
  break;
184
184
  case 21:
185
185
  throw new errors.MissingParameterError('Parameter missing: id');
186
186
  case 22:
187
187
  _context.next = 24;
188
- return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
188
+ return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
189
189
  case 24:
190
190
  response = _context.sent;
191
191
  return _context.abrupt("return", new ApiKey(response === null || response === void 0 ? void 0 : response.data, _this.options));
@@ -197,7 +197,6 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
197
197
  })));
198
198
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
199
199
  var params,
200
- response,
201
200
  _args2 = arguments;
202
201
  return _regenerator.default.wrap(function _callee2$(_context2) {
203
202
  while (1) switch (_context2.prev = _context2.next) {
@@ -216,13 +215,13 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
216
215
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
217
216
  case 5:
218
217
  params.id = _this.attributes.id;
219
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
218
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
220
219
  _context2.next = 8;
221
220
  break;
222
221
  }
223
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
222
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
224
223
  case 8:
225
- if (params['id']) {
224
+ if (params.id) {
226
225
  _context2.next = 14;
227
226
  break;
228
227
  }
@@ -230,18 +229,15 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
230
229
  _context2.next = 13;
231
230
  break;
232
231
  }
233
- params['id'] = _this.id;
232
+ params.id = _this.id;
234
233
  _context2.next = 14;
235
234
  break;
236
235
  case 13:
237
236
  throw new errors.MissingParameterError('Parameter missing: id');
238
237
  case 14:
239
238
  _context2.next = 16;
240
- return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
239
+ return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
241
240
  case 16:
242
- response = _context2.sent;
243
- return _context2.abrupt("return");
244
- case 18:
245
241
  case "end":
246
242
  return _context2.stop();
247
243
  }
@@ -252,28 +248,28 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
252
248
  return _this.delete(params);
253
249
  });
254
250
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
255
- var newObject, _newObject;
251
+ var _newObject, newObject;
256
252
  return _regenerator.default.wrap(function _callee3$(_context3) {
257
253
  while (1) switch (_context3.prev = _context3.next) {
258
254
  case 0:
259
- if (!_this.attributes['id']) {
260
- _context3.next = 8;
255
+ if (!_this.attributes.id) {
256
+ _context3.next = 6;
261
257
  break;
262
258
  }
263
259
  _context3.next = 3;
264
260
  return _this.update(_this.attributes);
265
261
  case 3:
266
- newObject = _context3.sent;
267
- _this.attributes = _objectSpread({}, newObject.attributes);
268
- return _context3.abrupt("return", true);
269
- case 8:
270
- _context3.next = 10;
271
- return ApiKey.create(_this.attributes, _this.options);
272
- case 10:
273
262
  _newObject = _context3.sent;
274
263
  _this.attributes = _objectSpread({}, _newObject.attributes);
275
264
  return _context3.abrupt("return", true);
276
- case 13:
265
+ case 6:
266
+ _context3.next = 8;
267
+ return ApiKey.create(_this.attributes, _this.options);
268
+ case 8:
269
+ newObject = _context3.sent;
270
+ _this.attributes = _objectSpread({}, newObject.attributes);
271
+ return _context3.abrupt("return", true);
272
+ case 11:
277
273
  case "end":
278
274
  return _context3.stop();
279
275
  }
@@ -314,26 +310,26 @@ _class = ApiKey;
314
310
  case 0:
315
311
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
316
312
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
317
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
313
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
318
314
  _context4.next = 4;
319
315
  break;
320
316
  }
321
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
317
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
322
318
  case 4:
323
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
319
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
324
320
  _context4.next = 6;
325
321
  break;
326
322
  }
327
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
323
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
328
324
  case 6:
329
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
325
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
330
326
  _context4.next = 8;
331
327
  break;
332
328
  }
333
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
329
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
334
330
  case 8:
335
331
  _context4.next = 10;
336
- return _Api.default.sendRequest("/api_keys", 'GET', params, options);
332
+ return _Api.default.sendRequest('/api_keys', 'GET', params, options);
337
333
  case 10:
338
334
  response = _context4.sent;
339
335
  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) {
@@ -359,7 +355,7 @@ _class = ApiKey;
359
355
  case 0:
360
356
  options = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
361
357
  _context5.next = 3;
362
- return _Api.default.sendRequest("/api_key", 'GET', {}, options);
358
+ return _Api.default.sendRequest('/api_key', 'GET', {}, options);
363
359
  case 3:
364
360
  response = _context5.sent;
365
361
  return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -388,21 +384,21 @@ _class = ApiKey;
388
384
  }
389
385
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
390
386
  case 4:
391
- params['id'] = id;
392
- if (params['id']) {
387
+ params.id = id;
388
+ if (params.id) {
393
389
  _context6.next = 7;
394
390
  break;
395
391
  }
396
392
  throw new errors.MissingParameterError('Parameter missing: id');
397
393
  case 7:
398
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
394
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
399
395
  _context6.next = 9;
400
396
  break;
401
397
  }
402
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
398
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
403
399
  case 9:
404
400
  _context6.next = 11;
405
- return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
401
+ return _Api.default.sendRequest("/api_keys/".concat(encodeURIComponent(params.id)), 'GET', params, options);
406
402
  case 11:
407
403
  response = _context6.sent;
408
404
  return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -437,44 +433,44 @@ _class = ApiKey;
437
433
  case 0:
438
434
  params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
439
435
  options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
440
- if (params['name']) {
436
+ if (params.name) {
441
437
  _context7.next = 4;
442
438
  break;
443
439
  }
444
440
  throw new errors.MissingParameterError('Parameter missing: name');
445
441
  case 4:
446
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
442
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
447
443
  _context7.next = 6;
448
444
  break;
449
445
  }
450
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
446
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
451
447
  case 6:
452
- if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
448
+ if (!(params.description && !(0, _utils.isString)(params.description))) {
453
449
  _context7.next = 8;
454
450
  break;
455
451
  }
456
- throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params['description'])));
452
+ throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
457
453
  case 8:
458
- if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
454
+ if (!(params.expires_at && !(0, _utils.isString)(params.expires_at))) {
459
455
  _context7.next = 10;
460
456
  break;
461
457
  }
462
- throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
458
+ throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params.expires_at)));
463
459
  case 10:
464
- if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
460
+ if (!(params.permission_set && !(0, _utils.isString)(params.permission_set))) {
465
461
  _context7.next = 12;
466
462
  break;
467
463
  }
468
- throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params['permission_set'])));
464
+ throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params.permission_set)));
469
465
  case 12:
470
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
466
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
471
467
  _context7.next = 14;
472
468
  break;
473
469
  }
474
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
470
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
475
471
  case 14:
476
472
  _context7.next = 16;
477
- return _Api.default.sendRequest("/api_keys", 'POST', params, options);
473
+ return _Api.default.sendRequest('/api_keys', 'POST', params, options);
478
474
  case 16:
479
475
  response = _context7.sent;
480
476
  return _context7.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -498,26 +494,26 @@ _class = ApiKey;
498
494
  case 0:
499
495
  params = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
500
496
  options = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};
501
- if (!(params['expires_at'] && !(0, _utils.isString)(params['expires_at']))) {
497
+ if (!(params.expires_at && !(0, _utils.isString)(params.expires_at))) {
502
498
  _context8.next = 4;
503
499
  break;
504
500
  }
505
- throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params['expires_at'])));
501
+ throw new errors.InvalidParameterError("Bad parameter: expires_at must be of type String, received ".concat((0, _utils.getType)(params.expires_at)));
506
502
  case 4:
507
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
503
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
508
504
  _context8.next = 6;
509
505
  break;
510
506
  }
511
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
507
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
512
508
  case 6:
513
- if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
509
+ if (!(params.permission_set && !(0, _utils.isString)(params.permission_set))) {
514
510
  _context8.next = 8;
515
511
  break;
516
512
  }
517
- throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params['permission_set'])));
513
+ throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params.permission_set)));
518
514
  case 8:
519
515
  _context8.next = 10;
520
- return _Api.default.sendRequest("/api_key", 'PATCH', params, options);
516
+ return _Api.default.sendRequest('/api_key', 'PATCH', params, options);
521
517
  case 10:
522
518
  response = _context8.sent;
523
519
  return _context8.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -529,18 +525,14 @@ _class = ApiKey;
529
525
  })));
530
526
  (0, _defineProperty2.default)(ApiKey, "deleteCurrent", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
531
527
  var options,
532
- response,
533
528
  _args9 = arguments;
534
529
  return _regenerator.default.wrap(function _callee9$(_context9) {
535
530
  while (1) switch (_context9.prev = _context9.next) {
536
531
  case 0:
537
532
  options = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
538
533
  _context9.next = 3;
539
- return _Api.default.sendRequest("/api_key", 'DELETE', {}, options);
534
+ return _Api.default.sendRequest('/api_key', 'DELETE', {}, options);
540
535
  case 3:
541
- response = _context9.sent;
542
- return _context9.abrupt("return");
543
- case 5:
544
536
  case "end":
545
537
  return _context9.stop();
546
538
  }
package/lib/models/App.js CHANGED
@@ -144,20 +144,20 @@ _class = App;
144
144
  case 0:
145
145
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
146
146
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
147
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
147
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
148
148
  _context.next = 4;
149
149
  break;
150
150
  }
151
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
151
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
152
152
  case 4:
153
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
153
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
154
154
  _context.next = 6;
155
155
  break;
156
156
  }
157
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
157
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
158
158
  case 6:
159
159
  _context.next = 8;
160
- return _Api.default.sendRequest("/apps", 'GET', params, options);
160
+ return _Api.default.sendRequest('/apps', 'GET', params, options);
161
161
  case 8:
162
162
  response = _context.sent;
163
163
  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) {
@@ -208,26 +208,26 @@ _class = As2IncomingMessage;
208
208
  case 0:
209
209
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
210
210
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
211
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
211
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
212
212
  _context.next = 4;
213
213
  break;
214
214
  }
215
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
215
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
216
216
  case 4:
217
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
217
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
218
218
  _context.next = 6;
219
219
  break;
220
220
  }
221
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
221
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
222
222
  case 6:
223
- if (!(params['as2_partner_id'] && !(0, _utils.isInt)(params['as2_partner_id']))) {
223
+ if (!(params.as2_partner_id && !(0, _utils.isInt)(params.as2_partner_id))) {
224
224
  _context.next = 8;
225
225
  break;
226
226
  }
227
- throw new errors.InvalidParameterError("Bad parameter: as2_partner_id must be of type Int, received ".concat((0, _utils.getType)(params['as2_partner_id'])));
227
+ throw new errors.InvalidParameterError("Bad parameter: as2_partner_id must be of type Int, received ".concat((0, _utils.getType)(params.as2_partner_id)));
228
228
  case 8:
229
229
  _context.next = 10;
230
- return _Api.default.sendRequest("/as2_incoming_messages", 'GET', params, options);
230
+ return _Api.default.sendRequest('/as2_incoming_messages', 'GET', params, options);
231
231
  case 10:
232
232
  response = _context.sent;
233
233
  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) {