files.com 1.2.249 → 1.2.251

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 (90) hide show
  1. package/_VERSION +1 -1
  2. package/docs/models/User.md +4 -1
  3. package/lib/Api.js +72 -71
  4. package/lib/Files.js +1 -1
  5. package/lib/isomorphic/File.node.js +5 -5
  6. package/lib/models/ActionNotificationExport.js +38 -38
  7. package/lib/models/ActionNotificationExportResult.js +14 -14
  8. package/lib/models/ApiKey.js +100 -100
  9. package/lib/models/ApiRequestLog.js +8 -8
  10. package/lib/models/App.js +8 -8
  11. package/lib/models/As2IncomingMessage.js +10 -10
  12. package/lib/models/As2OutgoingMessage.js +10 -10
  13. package/lib/models/As2Partner.js +101 -101
  14. package/lib/models/As2Station.js +81 -81
  15. package/lib/models/Automation.js +167 -167
  16. package/lib/models/AutomationLog.js +8 -8
  17. package/lib/models/AutomationRun.js +24 -24
  18. package/lib/models/BandwidthSnapshot.js +8 -8
  19. package/lib/models/Behavior.js +106 -106
  20. package/lib/models/Bundle.js +143 -143
  21. package/lib/models/BundleAction.js +10 -10
  22. package/lib/models/BundleDownload.js +12 -12
  23. package/lib/models/BundleNotification.js +69 -69
  24. package/lib/models/BundleRecipient.js +40 -40
  25. package/lib/models/BundleRegistration.js +12 -12
  26. package/lib/models/Clickwrap.js +79 -79
  27. package/lib/models/DnsRecord.js +8 -8
  28. package/lib/models/EmailIncomingMessage.js +8 -8
  29. package/lib/models/EmailLog.js +8 -8
  30. package/lib/models/ExavaultApiRequestLog.js +8 -8
  31. package/lib/models/ExternalEvent.js +36 -36
  32. package/lib/models/File.js +269 -269
  33. package/lib/models/FileComment.js +70 -70
  34. package/lib/models/FileCommentReaction.js +34 -34
  35. package/lib/models/FileMigration.js +10 -10
  36. package/lib/models/FileMigrationLog.js +8 -8
  37. package/lib/models/Folder.js +36 -36
  38. package/lib/models/FormFieldSet.js +71 -71
  39. package/lib/models/FtpActionLog.js +8 -8
  40. package/lib/models/GpgKey.js +81 -81
  41. package/lib/models/Group.js +83 -83
  42. package/lib/models/GroupUser.js +89 -89
  43. package/lib/models/History.js +88 -88
  44. package/lib/models/HistoryExport.js +64 -64
  45. package/lib/models/HistoryExportResult.js +14 -14
  46. package/lib/models/InboxRecipient.js +36 -36
  47. package/lib/models/InboxRegistration.js +10 -10
  48. package/lib/models/InboxUpload.js +8 -8
  49. package/lib/models/Invoice.js +18 -18
  50. package/lib/models/IpAddress.js +32 -32
  51. package/lib/models/Lock.js +51 -51
  52. package/lib/models/Message.js +100 -100
  53. package/lib/models/MessageComment.js +78 -78
  54. package/lib/models/MessageCommentReaction.js +54 -54
  55. package/lib/models/MessageReaction.js +54 -54
  56. package/lib/models/Notification.js +91 -91
  57. package/lib/models/OutboundConnectionLog.js +8 -8
  58. package/lib/models/Payment.js +18 -18
  59. package/lib/models/Permission.js +54 -54
  60. package/lib/models/Priority.js +14 -14
  61. package/lib/models/Project.js +70 -70
  62. package/lib/models/PublicHostingRequestLog.js +8 -8
  63. package/lib/models/PublicKey.js +78 -78
  64. package/lib/models/RemoteBandwidthSnapshot.js +8 -8
  65. package/lib/models/RemoteServer.js +362 -362
  66. package/lib/models/Request.js +60 -60
  67. package/lib/models/Restore.js +24 -24
  68. package/lib/models/Session.js +21 -21
  69. package/lib/models/SettingsChange.js +8 -8
  70. package/lib/models/SftpActionLog.js +8 -8
  71. package/lib/models/SftpHostKey.js +67 -67
  72. package/lib/models/ShareGroup.js +79 -79
  73. package/lib/models/SiemHttpDestination.js +158 -158
  74. package/lib/models/Site.js +150 -150
  75. package/lib/models/Snapshot.js +85 -85
  76. package/lib/models/SsoStrategy.js +32 -32
  77. package/lib/models/Style.js +48 -48
  78. package/lib/models/SyncLog.js +8 -8
  79. package/lib/models/UsageDailySnapshot.js +8 -8
  80. package/lib/models/UsageSnapshot.js +8 -8
  81. package/lib/models/User.js +223 -215
  82. package/lib/models/UserCipherUse.js +10 -10
  83. package/lib/models/UserLifecycleRule.js +92 -92
  84. package/lib/models/UserRequest.js +56 -56
  85. package/lib/models/UserSftpClientUse.js +10 -10
  86. package/lib/models/WebDavActionLog.js +8 -8
  87. package/lib/models/WebhookTest.js +24 -24
  88. package/package.json +1 -1
  89. package/src/Files.js +1 -1
  90. package/src/models/User.js +6 -0
@@ -66,69 +66,69 @@ var FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
66
66
  var params,
67
67
  response,
68
68
  _args = arguments;
69
- return _regenerator.default.wrap(function _callee$(_context) {
69
+ return _regenerator.default.wrap(function (_context) {
70
70
  while (1) switch (_context.prev = _context.next) {
71
71
  case 0:
72
72
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
73
73
  if (_this.attributes.id) {
74
- _context.next = 3;
74
+ _context.next = 1;
75
75
  break;
76
76
  }
77
77
  throw new errors.EmptyPropertyError('Current object has no id');
78
- case 3:
78
+ case 1:
79
79
  if ((0, _utils.isObject)(params)) {
80
- _context.next = 5;
80
+ _context.next = 2;
81
81
  break;
82
82
  }
83
83
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
84
- case 5:
84
+ case 2:
85
85
  params.id = _this.attributes.id;
86
86
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
87
- _context.next = 8;
87
+ _context.next = 3;
88
88
  break;
89
89
  }
90
90
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
91
- case 8:
91
+ case 3:
92
92
  if (!(params.body && !(0, _utils.isString)(params.body))) {
93
- _context.next = 10;
93
+ _context.next = 4;
94
94
  break;
95
95
  }
96
96
  throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
97
- case 10:
97
+ case 4:
98
98
  if (params.id) {
99
- _context.next = 16;
99
+ _context.next = 6;
100
100
  break;
101
101
  }
102
102
  if (!_this.attributes.id) {
103
- _context.next = 15;
103
+ _context.next = 5;
104
104
  break;
105
105
  }
106
106
  params.id = _this.id;
107
- _context.next = 16;
107
+ _context.next = 6;
108
108
  break;
109
- case 15:
109
+ case 5:
110
110
  throw new errors.MissingParameterError('Parameter missing: id');
111
- case 16:
111
+ case 6:
112
112
  if (params.body) {
113
- _context.next = 22;
113
+ _context.next = 8;
114
114
  break;
115
115
  }
116
116
  if (!_this.attributes.body) {
117
- _context.next = 21;
117
+ _context.next = 7;
118
118
  break;
119
119
  }
120
120
  params.body = _this.body;
121
- _context.next = 22;
121
+ _context.next = 8;
122
122
  break;
123
- case 21:
123
+ case 7:
124
124
  throw new errors.MissingParameterError('Parameter missing: body');
125
- case 22:
126
- _context.next = 24;
125
+ case 8:
126
+ _context.next = 9;
127
127
  return _Api.default.sendRequest("/file_comments/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
128
- case 24:
128
+ case 9:
129
129
  response = _context.sent;
130
130
  return _context.abrupt("return", new FileComment(response === null || response === void 0 ? void 0 : response.data, _this.options));
131
- case 26:
131
+ case 10:
132
132
  case "end":
133
133
  return _context.stop();
134
134
  }
@@ -137,46 +137,46 @@ var FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
137
137
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
138
138
  var params,
139
139
  _args2 = arguments;
140
- return _regenerator.default.wrap(function _callee2$(_context2) {
140
+ return _regenerator.default.wrap(function (_context2) {
141
141
  while (1) switch (_context2.prev = _context2.next) {
142
142
  case 0:
143
143
  params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
144
144
  if (_this.attributes.id) {
145
- _context2.next = 3;
145
+ _context2.next = 1;
146
146
  break;
147
147
  }
148
148
  throw new errors.EmptyPropertyError('Current object has no id');
149
- case 3:
149
+ case 1:
150
150
  if ((0, _utils.isObject)(params)) {
151
- _context2.next = 5;
151
+ _context2.next = 2;
152
152
  break;
153
153
  }
154
154
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
155
- case 5:
155
+ case 2:
156
156
  params.id = _this.attributes.id;
157
157
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
158
- _context2.next = 8;
158
+ _context2.next = 3;
159
159
  break;
160
160
  }
161
161
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
162
- case 8:
162
+ case 3:
163
163
  if (params.id) {
164
- _context2.next = 14;
164
+ _context2.next = 5;
165
165
  break;
166
166
  }
167
167
  if (!_this.attributes.id) {
168
- _context2.next = 13;
168
+ _context2.next = 4;
169
169
  break;
170
170
  }
171
171
  params.id = _this.id;
172
- _context2.next = 14;
172
+ _context2.next = 5;
173
173
  break;
174
- case 13:
174
+ case 4:
175
175
  throw new errors.MissingParameterError('Parameter missing: id');
176
- case 14:
177
- _context2.next = 16;
176
+ case 5:
177
+ _context2.next = 6;
178
178
  return _Api.default.sendRequest("/file_comments/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
179
- case 16:
179
+ case 6:
180
180
  case "end":
181
181
  return _context2.stop();
182
182
  }
@@ -188,27 +188,27 @@ var FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
188
188
  });
189
189
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
190
190
  var _newObject, newObject;
191
- return _regenerator.default.wrap(function _callee3$(_context3) {
191
+ return _regenerator.default.wrap(function (_context3) {
192
192
  while (1) switch (_context3.prev = _context3.next) {
193
193
  case 0:
194
194
  if (!_this.attributes.id) {
195
- _context3.next = 6;
195
+ _context3.next = 2;
196
196
  break;
197
197
  }
198
- _context3.next = 3;
198
+ _context3.next = 1;
199
199
  return _this.update(_this.attributes);
200
- case 3:
200
+ case 1:
201
201
  _newObject = _context3.sent;
202
202
  _this.attributes = _objectSpread({}, _newObject.attributes);
203
203
  return _context3.abrupt("return", true);
204
- case 6:
205
- _context3.next = 8;
204
+ case 2:
205
+ _context3.next = 3;
206
206
  return FileComment.create(_this.attributes, _this.options);
207
- case 8:
207
+ case 3:
208
208
  newObject = _context3.sent;
209
209
  _this.attributes = _objectSpread({}, newObject.attributes);
210
210
  return _context3.abrupt("return", true);
211
- case 11:
211
+ case 4:
212
212
  case "end":
213
213
  return _context3.stop();
214
214
  }
@@ -239,50 +239,50 @@ _FileComment = FileComment;
239
239
  options,
240
240
  response,
241
241
  _args4 = arguments;
242
- return _regenerator.default.wrap(function _callee4$(_context4) {
242
+ return _regenerator.default.wrap(function (_context4) {
243
243
  while (1) switch (_context4.prev = _context4.next) {
244
244
  case 0:
245
245
  params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
246
246
  options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
247
247
  if ((0, _utils.isObject)(params)) {
248
- _context4.next = 4;
248
+ _context4.next = 1;
249
249
  break;
250
250
  }
251
251
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
252
- case 4:
252
+ case 1:
253
253
  params.path = path;
254
254
  if (params.path) {
255
- _context4.next = 7;
255
+ _context4.next = 2;
256
256
  break;
257
257
  }
258
258
  throw new errors.MissingParameterError('Parameter missing: path');
259
- case 7:
259
+ case 2:
260
260
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
261
- _context4.next = 9;
261
+ _context4.next = 3;
262
262
  break;
263
263
  }
264
264
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
265
- case 9:
265
+ case 3:
266
266
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
267
- _context4.next = 11;
267
+ _context4.next = 4;
268
268
  break;
269
269
  }
270
270
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
271
- case 11:
271
+ case 4:
272
272
  if (!(params.path && !(0, _utils.isString)(params.path))) {
273
- _context4.next = 13;
273
+ _context4.next = 5;
274
274
  break;
275
275
  }
276
276
  throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
277
- case 13:
278
- _context4.next = 15;
277
+ case 5:
278
+ _context4.next = 6;
279
279
  return _Api.default.sendRequest("/file_comments/files/".concat(encodeURIComponent(params.path)), 'GET', params, options);
280
- case 15:
280
+ case 6:
281
281
  response = _context4.sent;
282
282
  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) {
283
283
  return new _FileComment(obj, options);
284
284
  })) || []);
285
- case 17:
285
+ case 7:
286
286
  case "end":
287
287
  return _context4.stop();
288
288
  }
@@ -300,41 +300,41 @@ _FileComment = FileComment;
300
300
  options,
301
301
  response,
302
302
  _args5 = arguments;
303
- return _regenerator.default.wrap(function _callee5$(_context5) {
303
+ return _regenerator.default.wrap(function (_context5) {
304
304
  while (1) switch (_context5.prev = _context5.next) {
305
305
  case 0:
306
306
  params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
307
307
  options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
308
308
  if (params.body) {
309
- _context5.next = 4;
309
+ _context5.next = 1;
310
310
  break;
311
311
  }
312
312
  throw new errors.MissingParameterError('Parameter missing: body');
313
- case 4:
313
+ case 1:
314
314
  if (params.path) {
315
- _context5.next = 6;
315
+ _context5.next = 2;
316
316
  break;
317
317
  }
318
318
  throw new errors.MissingParameterError('Parameter missing: path');
319
- case 6:
319
+ case 2:
320
320
  if (!(params.body && !(0, _utils.isString)(params.body))) {
321
- _context5.next = 8;
321
+ _context5.next = 3;
322
322
  break;
323
323
  }
324
324
  throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
325
- case 8:
325
+ case 3:
326
326
  if (!(params.path && !(0, _utils.isString)(params.path))) {
327
- _context5.next = 10;
327
+ _context5.next = 4;
328
328
  break;
329
329
  }
330
330
  throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
331
- case 10:
332
- _context5.next = 12;
331
+ case 4:
332
+ _context5.next = 5;
333
333
  return _Api.default.sendRequest('/file_comments', 'POST', params, options);
334
- case 12:
334
+ case 5:
335
335
  response = _context5.sent;
336
336
  return _context5.abrupt("return", new _FileComment(response === null || response === void 0 ? void 0 : response.data, options));
337
- case 14:
337
+ case 6:
338
338
  case "end":
339
339
  return _context5.stop();
340
340
  }
@@ -63,46 +63,46 @@ var FileCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function FileC
63
63
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
64
64
  var params,
65
65
  _args = arguments;
66
- return _regenerator.default.wrap(function _callee$(_context) {
66
+ return _regenerator.default.wrap(function (_context) {
67
67
  while (1) switch (_context.prev = _context.next) {
68
68
  case 0:
69
69
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
70
70
  if (_this.attributes.id) {
71
- _context.next = 3;
71
+ _context.next = 1;
72
72
  break;
73
73
  }
74
74
  throw new errors.EmptyPropertyError('Current object has no id');
75
- case 3:
75
+ case 1:
76
76
  if ((0, _utils.isObject)(params)) {
77
- _context.next = 5;
77
+ _context.next = 2;
78
78
  break;
79
79
  }
80
80
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
81
- case 5:
81
+ case 2:
82
82
  params.id = _this.attributes.id;
83
83
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
84
- _context.next = 8;
84
+ _context.next = 3;
85
85
  break;
86
86
  }
87
87
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
88
- case 8:
88
+ case 3:
89
89
  if (params.id) {
90
- _context.next = 14;
90
+ _context.next = 5;
91
91
  break;
92
92
  }
93
93
  if (!_this.attributes.id) {
94
- _context.next = 13;
94
+ _context.next = 4;
95
95
  break;
96
96
  }
97
97
  params.id = _this.id;
98
- _context.next = 14;
98
+ _context.next = 5;
99
99
  break;
100
- case 13:
100
+ case 4:
101
101
  throw new errors.MissingParameterError('Parameter missing: id');
102
- case 14:
103
- _context.next = 16;
102
+ case 5:
103
+ _context.next = 6;
104
104
  return _Api.default.sendRequest("/file_comment_reactions/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
105
- case 16:
105
+ case 6:
106
106
  case "end":
107
107
  return _context.stop();
108
108
  }
@@ -114,22 +114,22 @@ var FileCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function FileC
114
114
  });
115
115
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
116
116
  var newObject;
117
- return _regenerator.default.wrap(function _callee2$(_context2) {
117
+ return _regenerator.default.wrap(function (_context2) {
118
118
  while (1) switch (_context2.prev = _context2.next) {
119
119
  case 0:
120
120
  if (!_this.attributes.id) {
121
- _context2.next = 4;
121
+ _context2.next = 1;
122
122
  break;
123
123
  }
124
124
  throw new errors.NotImplementedError('The FileCommentReaction object doesn\'t support updates.');
125
- case 4:
126
- _context2.next = 6;
125
+ case 1:
126
+ _context2.next = 2;
127
127
  return FileCommentReaction.create(_this.attributes, _this.options);
128
- case 6:
128
+ case 2:
129
129
  newObject = _context2.sent;
130
130
  _this.attributes = _objectSpread({}, newObject.attributes);
131
131
  return _context2.abrupt("return", true);
132
- case 9:
132
+ case 3:
133
133
  case "end":
134
134
  return _context2.stop();
135
135
  }
@@ -158,47 +158,47 @@ _FileCommentReaction = FileCommentReaction;
158
158
  options,
159
159
  response,
160
160
  _args3 = arguments;
161
- return _regenerator.default.wrap(function _callee3$(_context3) {
161
+ return _regenerator.default.wrap(function (_context3) {
162
162
  while (1) switch (_context3.prev = _context3.next) {
163
163
  case 0:
164
164
  params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
165
165
  options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
166
166
  if (params.file_comment_id) {
167
- _context3.next = 4;
167
+ _context3.next = 1;
168
168
  break;
169
169
  }
170
170
  throw new errors.MissingParameterError('Parameter missing: file_comment_id');
171
- case 4:
171
+ case 1:
172
172
  if (params.emoji) {
173
- _context3.next = 6;
173
+ _context3.next = 2;
174
174
  break;
175
175
  }
176
176
  throw new errors.MissingParameterError('Parameter missing: emoji');
177
- case 6:
177
+ case 2:
178
178
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
179
- _context3.next = 8;
179
+ _context3.next = 3;
180
180
  break;
181
181
  }
182
182
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
183
- case 8:
183
+ case 3:
184
184
  if (!(params.file_comment_id && !(0, _utils.isInt)(params.file_comment_id))) {
185
- _context3.next = 10;
185
+ _context3.next = 4;
186
186
  break;
187
187
  }
188
188
  throw new errors.InvalidParameterError("Bad parameter: file_comment_id must be of type Int, received ".concat((0, _utils.getType)(params.file_comment_id)));
189
- case 10:
189
+ case 4:
190
190
  if (!(params.emoji && !(0, _utils.isString)(params.emoji))) {
191
- _context3.next = 12;
191
+ _context3.next = 5;
192
192
  break;
193
193
  }
194
194
  throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params.emoji)));
195
- case 12:
196
- _context3.next = 14;
195
+ case 5:
196
+ _context3.next = 6;
197
197
  return _Api.default.sendRequest('/file_comment_reactions', 'POST', params, options);
198
- case 14:
198
+ case 6:
199
199
  response = _context3.sent;
200
200
  return _context3.abrupt("return", new _FileCommentReaction(response === null || response === void 0 ? void 0 : response.data, options));
201
- case 16:
201
+ case 7:
202
202
  case "end":
203
203
  return _context3.stop();
204
204
  }
@@ -90,36 +90,36 @@ _FileMigration = FileMigration;
90
90
  options,
91
91
  response,
92
92
  _args = arguments;
93
- return _regenerator.default.wrap(function _callee$(_context) {
93
+ return _regenerator.default.wrap(function (_context) {
94
94
  while (1) switch (_context.prev = _context.next) {
95
95
  case 0:
96
96
  params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
97
97
  options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
98
98
  if ((0, _utils.isObject)(params)) {
99
- _context.next = 4;
99
+ _context.next = 1;
100
100
  break;
101
101
  }
102
102
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
103
- case 4:
103
+ case 1:
104
104
  params.id = id;
105
105
  if (params.id) {
106
- _context.next = 7;
106
+ _context.next = 2;
107
107
  break;
108
108
  }
109
109
  throw new errors.MissingParameterError('Parameter missing: id');
110
- case 7:
110
+ case 2:
111
111
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
112
- _context.next = 9;
112
+ _context.next = 3;
113
113
  break;
114
114
  }
115
115
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
116
- case 9:
117
- _context.next = 11;
116
+ case 3:
117
+ _context.next = 4;
118
118
  return _Api.default.sendRequest("/file_migrations/".concat(encodeURIComponent(params.id)), 'GET', params, options);
119
- case 11:
119
+ case 4:
120
120
  response = _context.sent;
121
121
  return _context.abrupt("return", new _FileMigration(response === null || response === void 0 ? void 0 : response.data, options));
122
- case 13:
122
+ case 5:
123
123
  case "end":
124
124
  return _context.stop();
125
125
  }
@@ -89,31 +89,31 @@ _FileMigrationLog = FileMigrationLog;
89
89
  options,
90
90
  response,
91
91
  _args = arguments;
92
- return _regenerator.default.wrap(function _callee$(_context) {
92
+ return _regenerator.default.wrap(function (_context) {
93
93
  while (1) switch (_context.prev = _context.next) {
94
94
  case 0:
95
95
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
96
96
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
97
97
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
98
- _context.next = 4;
98
+ _context.next = 1;
99
99
  break;
100
100
  }
101
101
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
102
- case 4:
102
+ case 1:
103
103
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
104
- _context.next = 6;
104
+ _context.next = 2;
105
105
  break;
106
106
  }
107
107
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
108
- case 6:
109
- _context.next = 8;
108
+ case 2:
109
+ _context.next = 3;
110
110
  return _Api.default.sendRequest('/file_migration_logs', 'GET', params, options);
111
- case 8:
111
+ case 3:
112
112
  response = _context.sent;
113
113
  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) {
114
114
  return new _FileMigrationLog(obj, options);
115
115
  })) || []);
116
- case 10:
116
+ case 4:
117
117
  case "end":
118
118
  return _context.stop();
119
119
  }