files.com 1.0.474 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/_VERSION +1 -1
  2. package/lib/Files.js +1 -1
  3. package/lib/models/ActionNotificationExport.js +63 -49
  4. package/lib/models/ActionWebhookFailure.js +1 -1
  5. package/lib/models/ApiKey.js +113 -94
  6. package/lib/models/As2Partner.js +81 -62
  7. package/lib/models/As2Station.js +79 -60
  8. package/lib/models/Automation.js +90 -71
  9. package/lib/models/Behavior.js +114 -95
  10. package/lib/models/Bundle.js +90 -71
  11. package/lib/models/BundleNotification.js +75 -56
  12. package/lib/models/BundleRecipient.js +61 -47
  13. package/lib/models/Clickwrap.js +77 -58
  14. package/lib/models/ExternalEvent.js +71 -57
  15. package/lib/models/File.js +166 -154
  16. package/lib/models/FileComment.js +65 -46
  17. package/lib/models/FileCommentReaction.js +44 -30
  18. package/lib/models/Folder.js +58 -46
  19. package/lib/models/FormFieldSet.js +76 -57
  20. package/lib/models/GpgKey.js +79 -60
  21. package/lib/models/Group.js +78 -59
  22. package/lib/models/GroupUser.js +63 -44
  23. package/lib/models/HistoryExport.js +76 -62
  24. package/lib/models/InboxRecipient.js +61 -47
  25. package/lib/models/Lock.js +56 -44
  26. package/lib/models/Message.js +82 -63
  27. package/lib/models/MessageComment.js +78 -59
  28. package/lib/models/MessageCommentReaction.js +73 -59
  29. package/lib/models/MessageReaction.js +73 -59
  30. package/lib/models/Notification.js +84 -65
  31. package/lib/models/Permission.js +60 -46
  32. package/lib/models/Project.js +74 -55
  33. package/lib/models/PublicKey.js +78 -59
  34. package/lib/models/RemoteServer.js +147 -128
  35. package/lib/models/Request.js +76 -62
  36. package/lib/models/Session.js +53 -39
  37. package/lib/models/SftpHostKey.js +74 -55
  38. package/lib/models/ShareGroup.js +79 -60
  39. package/lib/models/Snapshot.js +75 -56
  40. package/lib/models/SsoStrategy.js +1 -1
  41. package/lib/models/Style.js +37 -23
  42. package/lib/models/User.js +104 -85
  43. package/lib/models/UserRequest.js +73 -59
  44. package/lib/models/WebhookTest.js +46 -32
  45. package/package.json +1 -1
  46. package/src/Files.js +1 -1
  47. package/src/models/ActionNotificationExport.js +2 -2
  48. package/src/models/ActionWebhookFailure.js +1 -1
  49. package/src/models/ApiKey.js +7 -5
  50. package/src/models/As2Partner.js +6 -4
  51. package/src/models/As2Station.js +6 -4
  52. package/src/models/Automation.js +7 -5
  53. package/src/models/Behavior.js +7 -5
  54. package/src/models/Bundle.js +7 -5
  55. package/src/models/BundleNotification.js +6 -4
  56. package/src/models/BundleRecipient.js +2 -2
  57. package/src/models/Clickwrap.js +6 -4
  58. package/src/models/ExternalEvent.js +2 -2
  59. package/src/models/File.js +3 -3
  60. package/src/models/FileComment.js +6 -4
  61. package/src/models/FileCommentReaction.js +3 -3
  62. package/src/models/Folder.js +2 -2
  63. package/src/models/FormFieldSet.js +6 -4
  64. package/src/models/GpgKey.js +6 -4
  65. package/src/models/Group.js +6 -4
  66. package/src/models/GroupUser.js +6 -4
  67. package/src/models/HistoryExport.js +2 -2
  68. package/src/models/InboxRecipient.js +2 -2
  69. package/src/models/Lock.js +3 -3
  70. package/src/models/Message.js +6 -4
  71. package/src/models/MessageComment.js +6 -4
  72. package/src/models/MessageCommentReaction.js +3 -3
  73. package/src/models/MessageReaction.js +3 -3
  74. package/src/models/Notification.js +6 -4
  75. package/src/models/Permission.js +3 -3
  76. package/src/models/Project.js +6 -4
  77. package/src/models/PublicKey.js +6 -4
  78. package/src/models/RemoteServer.js +6 -4
  79. package/src/models/Request.js +3 -3
  80. package/src/models/Session.js +3 -3
  81. package/src/models/SftpHostKey.js +6 -4
  82. package/src/models/ShareGroup.js +6 -4
  83. package/src/models/Snapshot.js +6 -4
  84. package/src/models/SsoStrategy.js +1 -1
  85. package/src/models/Style.js +6 -3
  86. package/src/models/User.js +9 -7
  87. package/src/models/UserRequest.js +3 -3
  88. package/src/models/WebhookTest.js +2 -2
@@ -180,7 +180,7 @@ var SftpHostKey = /*#__PURE__*/(0, _createClass2.default)(function SftpHostKey()
180
180
  return _Api.default.sendRequest("/sftp_host_keys/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
181
181
  case 16:
182
182
  response = _context2.sent;
183
- return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
183
+ return _context2.abrupt("return");
184
184
  case 18:
185
185
  case "end":
186
186
  return _context2.stop();
@@ -191,19 +191,38 @@ var SftpHostKey = /*#__PURE__*/(0, _createClass2.default)(function SftpHostKey()
191
191
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
192
192
  return _this.delete(params);
193
193
  });
194
- (0, _defineProperty2.default)(this, "save", function () {
195
- if (_this.attributes['id']) {
196
- return _this.update(_this.attributes);
197
- } else {
198
- var newObject = SftpHostKey.create(_this.attributes, _this.options);
199
- _this.attributes = _objectSpread({}, newObject.attributes);
200
- return true;
201
- }
202
- });
203
- Object.entries(attributes).forEach(function (_ref3) {
204
- var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
205
- key = _ref4[0],
206
- value = _ref4[1];
194
+ (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
195
+ var newObject, _newObject;
196
+ return _regenerator.default.wrap(function _callee3$(_context3) {
197
+ while (1) switch (_context3.prev = _context3.next) {
198
+ case 0:
199
+ if (!_this.attributes['id']) {
200
+ _context3.next = 8;
201
+ break;
202
+ }
203
+ _context3.next = 3;
204
+ return _this.update(_this.attributes);
205
+ case 3:
206
+ newObject = _context3.sent;
207
+ _this.attributes = _objectSpread({}, newObject.attributes);
208
+ return _context3.abrupt("return", true);
209
+ case 8:
210
+ _context3.next = 10;
211
+ return SftpHostKey.create(_this.attributes, _this.options);
212
+ case 10:
213
+ _newObject = _context3.sent;
214
+ _this.attributes = _objectSpread({}, _newObject.attributes);
215
+ return _context3.abrupt("return", true);
216
+ case 13:
217
+ case "end":
218
+ return _context3.stop();
219
+ }
220
+ }, _callee3);
221
+ })));
222
+ Object.entries(attributes).forEach(function (_ref4) {
223
+ var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
224
+ key = _ref5[0],
225
+ value = _ref5[1];
207
226
  var normalizedKey = key.replace('?', '');
208
227
  _this.attributes[normalizedKey] = value;
209
228
  Object.defineProperty(_this, normalizedKey, {
@@ -217,41 +236,41 @@ _class = SftpHostKey;
217
236
  // Parameters:
218
237
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
219
238
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
220
- (0, _defineProperty2.default)(SftpHostKey, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
239
+ (0, _defineProperty2.default)(SftpHostKey, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
221
240
  var _response$data;
222
241
  var params,
223
242
  options,
224
243
  response,
225
- _args3 = arguments;
226
- return _regenerator.default.wrap(function _callee3$(_context3) {
227
- while (1) switch (_context3.prev = _context3.next) {
244
+ _args4 = arguments;
245
+ return _regenerator.default.wrap(function _callee4$(_context4) {
246
+ while (1) switch (_context4.prev = _context4.next) {
228
247
  case 0:
229
- params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
230
- options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
248
+ params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
249
+ options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
231
250
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
232
- _context3.next = 4;
251
+ _context4.next = 4;
233
252
  break;
234
253
  }
235
254
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
236
255
  case 4:
237
256
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
238
- _context3.next = 6;
257
+ _context4.next = 6;
239
258
  break;
240
259
  }
241
260
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
242
261
  case 6:
243
- _context3.next = 8;
262
+ _context4.next = 8;
244
263
  return _Api.default.sendRequest("/sftp_host_keys", 'GET', params, options);
245
264
  case 8:
246
- response = _context3.sent;
247
- return _context3.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
265
+ response = _context4.sent;
266
+ 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) {
248
267
  return new _class(obj, options);
249
268
  })) || []);
250
269
  case 10:
251
270
  case "end":
252
- return _context3.stop();
271
+ return _context4.stop();
253
272
  }
254
- }, _callee3);
273
+ }, _callee4);
255
274
  })));
256
275
  (0, _defineProperty2.default)(SftpHostKey, "all", function () {
257
276
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -261,48 +280,48 @@ _class = SftpHostKey;
261
280
  // Parameters:
262
281
  // id (required) - int64 - Sftp Host Key ID.
263
282
  (0, _defineProperty2.default)(SftpHostKey, "find", /*#__PURE__*/function () {
264
- var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(id) {
283
+ var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(id) {
265
284
  var params,
266
285
  options,
267
286
  response,
268
- _args4 = arguments;
269
- return _regenerator.default.wrap(function _callee4$(_context4) {
270
- while (1) switch (_context4.prev = _context4.next) {
287
+ _args5 = arguments;
288
+ return _regenerator.default.wrap(function _callee5$(_context5) {
289
+ while (1) switch (_context5.prev = _context5.next) {
271
290
  case 0:
272
- params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
273
- options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
291
+ params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
292
+ options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
274
293
  if ((0, _utils.isObject)(params)) {
275
- _context4.next = 4;
294
+ _context5.next = 4;
276
295
  break;
277
296
  }
278
297
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
279
298
  case 4:
280
299
  params['id'] = id;
281
300
  if (params['id']) {
282
- _context4.next = 7;
301
+ _context5.next = 7;
283
302
  break;
284
303
  }
285
304
  throw new errors.MissingParameterError('Parameter missing: id');
286
305
  case 7:
287
306
  if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
288
- _context4.next = 9;
307
+ _context5.next = 9;
289
308
  break;
290
309
  }
291
310
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
292
311
  case 9:
293
- _context4.next = 11;
312
+ _context5.next = 11;
294
313
  return _Api.default.sendRequest("/sftp_host_keys/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
295
314
  case 11:
296
- response = _context4.sent;
297
- return _context4.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
315
+ response = _context5.sent;
316
+ return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
298
317
  case 13:
299
318
  case "end":
300
- return _context4.stop();
319
+ return _context5.stop();
301
320
  }
302
- }, _callee4);
321
+ }, _callee5);
303
322
  }));
304
323
  return function (_x) {
305
- return _ref6.apply(this, arguments);
324
+ return _ref7.apply(this, arguments);
306
325
  };
307
326
  }());
308
327
  (0, _defineProperty2.default)(SftpHostKey, "get", function (id) {
@@ -313,38 +332,38 @@ _class = SftpHostKey;
313
332
  // Parameters:
314
333
  // name - string - The friendly name of this SFTP Host Key.
315
334
  // private_key - string - The private key data.
316
- (0, _defineProperty2.default)(SftpHostKey, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
335
+ (0, _defineProperty2.default)(SftpHostKey, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
317
336
  var params,
318
337
  options,
319
338
  response,
320
- _args5 = arguments;
321
- return _regenerator.default.wrap(function _callee5$(_context5) {
322
- while (1) switch (_context5.prev = _context5.next) {
339
+ _args6 = arguments;
340
+ return _regenerator.default.wrap(function _callee6$(_context6) {
341
+ while (1) switch (_context6.prev = _context6.next) {
323
342
  case 0:
324
- params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
325
- options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
343
+ params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
344
+ options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
326
345
  if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
327
- _context5.next = 4;
346
+ _context6.next = 4;
328
347
  break;
329
348
  }
330
349
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
331
350
  case 4:
332
351
  if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
333
- _context5.next = 6;
352
+ _context6.next = 6;
334
353
  break;
335
354
  }
336
355
  throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params['private_key'])));
337
356
  case 6:
338
- _context5.next = 8;
357
+ _context6.next = 8;
339
358
  return _Api.default.sendRequest("/sftp_host_keys", 'POST', params, options);
340
359
  case 8:
341
- response = _context5.sent;
342
- return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
360
+ response = _context6.sent;
361
+ return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
343
362
  case 10:
344
363
  case "end":
345
- return _context5.stop();
364
+ return _context6.stop();
346
365
  }
347
- }, _callee5);
366
+ }, _callee6);
348
367
  })));
349
368
  var _default = exports.default = SftpHostKey;
350
369
  module.exports = SftpHostKey;
@@ -187,7 +187,7 @@ var ShareGroup = /*#__PURE__*/(0, _createClass2.default)(function ShareGroup() {
187
187
  return _Api.default.sendRequest("/share_groups/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
188
188
  case 16:
189
189
  response = _context2.sent;
190
- return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
190
+ return _context2.abrupt("return");
191
191
  case 18:
192
192
  case "end":
193
193
  return _context2.stop();
@@ -198,19 +198,38 @@ var ShareGroup = /*#__PURE__*/(0, _createClass2.default)(function ShareGroup() {
198
198
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
199
199
  return _this.delete(params);
200
200
  });
201
- (0, _defineProperty2.default)(this, "save", function () {
202
- if (_this.attributes['id']) {
203
- return _this.update(_this.attributes);
204
- } else {
205
- var newObject = ShareGroup.create(_this.attributes, _this.options);
206
- _this.attributes = _objectSpread({}, newObject.attributes);
207
- return true;
208
- }
209
- });
210
- Object.entries(attributes).forEach(function (_ref3) {
211
- var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
212
- key = _ref4[0],
213
- value = _ref4[1];
201
+ (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
202
+ var newObject, _newObject;
203
+ return _regenerator.default.wrap(function _callee3$(_context3) {
204
+ while (1) switch (_context3.prev = _context3.next) {
205
+ case 0:
206
+ if (!_this.attributes['id']) {
207
+ _context3.next = 8;
208
+ break;
209
+ }
210
+ _context3.next = 3;
211
+ return _this.update(_this.attributes);
212
+ case 3:
213
+ newObject = _context3.sent;
214
+ _this.attributes = _objectSpread({}, newObject.attributes);
215
+ return _context3.abrupt("return", true);
216
+ case 8:
217
+ _context3.next = 10;
218
+ return ShareGroup.create(_this.attributes, _this.options);
219
+ case 10:
220
+ _newObject = _context3.sent;
221
+ _this.attributes = _objectSpread({}, _newObject.attributes);
222
+ return _context3.abrupt("return", true);
223
+ case 13:
224
+ case "end":
225
+ return _context3.stop();
226
+ }
227
+ }, _callee3);
228
+ })));
229
+ Object.entries(attributes).forEach(function (_ref4) {
230
+ var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
231
+ key = _ref5[0],
232
+ value = _ref5[1];
214
233
  var normalizedKey = key.replace('?', '');
215
234
  _this.attributes[normalizedKey] = value;
216
235
  Object.defineProperty(_this, normalizedKey, {
@@ -225,47 +244,47 @@ _class = ShareGroup;
225
244
  // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
226
245
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
227
246
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
228
- (0, _defineProperty2.default)(ShareGroup, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
247
+ (0, _defineProperty2.default)(ShareGroup, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
229
248
  var _response$data;
230
249
  var params,
231
250
  options,
232
251
  response,
233
- _args3 = arguments;
234
- return _regenerator.default.wrap(function _callee3$(_context3) {
235
- while (1) switch (_context3.prev = _context3.next) {
252
+ _args4 = arguments;
253
+ return _regenerator.default.wrap(function _callee4$(_context4) {
254
+ while (1) switch (_context4.prev = _context4.next) {
236
255
  case 0:
237
- params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
238
- options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
256
+ params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
257
+ options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
239
258
  if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
240
- _context3.next = 4;
259
+ _context4.next = 4;
241
260
  break;
242
261
  }
243
262
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
244
263
  case 4:
245
264
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
246
- _context3.next = 6;
265
+ _context4.next = 6;
247
266
  break;
248
267
  }
249
268
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
250
269
  case 6:
251
270
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
252
- _context3.next = 8;
271
+ _context4.next = 8;
253
272
  break;
254
273
  }
255
274
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
256
275
  case 8:
257
- _context3.next = 10;
276
+ _context4.next = 10;
258
277
  return _Api.default.sendRequest("/share_groups", 'GET', params, options);
259
278
  case 10:
260
- response = _context3.sent;
261
- return _context3.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
279
+ response = _context4.sent;
280
+ 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) {
262
281
  return new _class(obj, options);
263
282
  })) || []);
264
283
  case 12:
265
284
  case "end":
266
- return _context3.stop();
285
+ return _context4.stop();
267
286
  }
268
- }, _callee3);
287
+ }, _callee4);
269
288
  })));
270
289
  (0, _defineProperty2.default)(ShareGroup, "all", function () {
271
290
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -275,48 +294,48 @@ _class = ShareGroup;
275
294
  // Parameters:
276
295
  // id (required) - int64 - Share Group ID.
277
296
  (0, _defineProperty2.default)(ShareGroup, "find", /*#__PURE__*/function () {
278
- var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(id) {
297
+ var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(id) {
279
298
  var params,
280
299
  options,
281
300
  response,
282
- _args4 = arguments;
283
- return _regenerator.default.wrap(function _callee4$(_context4) {
284
- while (1) switch (_context4.prev = _context4.next) {
301
+ _args5 = arguments;
302
+ return _regenerator.default.wrap(function _callee5$(_context5) {
303
+ while (1) switch (_context5.prev = _context5.next) {
285
304
  case 0:
286
- params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
287
- options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
305
+ params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
306
+ options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
288
307
  if ((0, _utils.isObject)(params)) {
289
- _context4.next = 4;
308
+ _context5.next = 4;
290
309
  break;
291
310
  }
292
311
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
293
312
  case 4:
294
313
  params['id'] = id;
295
314
  if (params['id']) {
296
- _context4.next = 7;
315
+ _context5.next = 7;
297
316
  break;
298
317
  }
299
318
  throw new errors.MissingParameterError('Parameter missing: id');
300
319
  case 7:
301
320
  if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
302
- _context4.next = 9;
321
+ _context5.next = 9;
303
322
  break;
304
323
  }
305
324
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
306
325
  case 9:
307
- _context4.next = 11;
326
+ _context5.next = 11;
308
327
  return _Api.default.sendRequest("/share_groups/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
309
328
  case 11:
310
- response = _context4.sent;
311
- return _context4.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
329
+ response = _context5.sent;
330
+ return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
312
331
  case 13:
313
332
  case "end":
314
- return _context4.stop();
333
+ return _context5.stop();
315
334
  }
316
- }, _callee4);
335
+ }, _callee5);
317
336
  }));
318
337
  return function (_x) {
319
- return _ref6.apply(this, arguments);
338
+ return _ref7.apply(this, arguments);
320
339
  };
321
340
  }());
322
341
  (0, _defineProperty2.default)(ShareGroup, "get", function (id) {
@@ -329,62 +348,62 @@ _class = ShareGroup;
329
348
  // notes - string - Additional notes of the share group
330
349
  // name (required) - string - Name of the share group
331
350
  // members (required) - array(object) - A list of share group members.
332
- (0, _defineProperty2.default)(ShareGroup, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
351
+ (0, _defineProperty2.default)(ShareGroup, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
333
352
  var params,
334
353
  options,
335
354
  response,
336
- _args5 = arguments;
337
- return _regenerator.default.wrap(function _callee5$(_context5) {
338
- while (1) switch (_context5.prev = _context5.next) {
355
+ _args6 = arguments;
356
+ return _regenerator.default.wrap(function _callee6$(_context6) {
357
+ while (1) switch (_context6.prev = _context6.next) {
339
358
  case 0:
340
- params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
341
- options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
359
+ params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
360
+ options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
342
361
  if (params['name']) {
343
- _context5.next = 4;
362
+ _context6.next = 4;
344
363
  break;
345
364
  }
346
365
  throw new errors.MissingParameterError('Parameter missing: name');
347
366
  case 4:
348
367
  if (params['members']) {
349
- _context5.next = 6;
368
+ _context6.next = 6;
350
369
  break;
351
370
  }
352
371
  throw new errors.MissingParameterError('Parameter missing: members');
353
372
  case 6:
354
373
  if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
355
- _context5.next = 8;
374
+ _context6.next = 8;
356
375
  break;
357
376
  }
358
377
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
359
378
  case 8:
360
379
  if (!(params['notes'] && !(0, _utils.isString)(params['notes']))) {
361
- _context5.next = 10;
380
+ _context6.next = 10;
362
381
  break;
363
382
  }
364
383
  throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params['notes'])));
365
384
  case 10:
366
385
  if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
367
- _context5.next = 12;
386
+ _context6.next = 12;
368
387
  break;
369
388
  }
370
389
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
371
390
  case 12:
372
391
  if (!(params['members'] && !(0, _utils.isArray)(params['members']))) {
373
- _context5.next = 14;
392
+ _context6.next = 14;
374
393
  break;
375
394
  }
376
395
  throw new errors.InvalidParameterError("Bad parameter: members must be of type Array, received ".concat((0, _utils.getType)(params['members'])));
377
396
  case 14:
378
- _context5.next = 16;
397
+ _context6.next = 16;
379
398
  return _Api.default.sendRequest("/share_groups", 'POST', params, options);
380
399
  case 16:
381
- response = _context5.sent;
382
- return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
400
+ response = _context6.sent;
401
+ return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
383
402
  case 18:
384
403
  case "end":
385
- return _context5.stop();
404
+ return _context6.stop();
386
405
  }
387
- }, _callee5);
406
+ }, _callee6);
388
407
  })));
389
408
  var _default = exports.default = ShareGroup;
390
409
  module.exports = ShareGroup;