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
@@ -231,7 +231,7 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
231
231
  return _Api.default.sendRequest("/behaviors/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
232
232
  case 16:
233
233
  response = _context2.sent;
234
- return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
234
+ return _context2.abrupt("return");
235
235
  case 18:
236
236
  case "end":
237
237
  return _context2.stop();
@@ -242,19 +242,38 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
242
242
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
243
243
  return _this.delete(params);
244
244
  });
245
- (0, _defineProperty2.default)(this, "save", function () {
246
- if (_this.attributes['id']) {
247
- return _this.update(_this.attributes);
248
- } else {
249
- var newObject = Behavior.create(_this.attributes, _this.options);
250
- _this.attributes = _objectSpread({}, newObject.attributes);
251
- return true;
252
- }
253
- });
254
- Object.entries(attributes).forEach(function (_ref3) {
255
- var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
256
- key = _ref4[0],
257
- value = _ref4[1];
245
+ (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
246
+ var newObject, _newObject;
247
+ return _regenerator.default.wrap(function _callee3$(_context3) {
248
+ while (1) switch (_context3.prev = _context3.next) {
249
+ case 0:
250
+ if (!_this.attributes['id']) {
251
+ _context3.next = 8;
252
+ break;
253
+ }
254
+ _context3.next = 3;
255
+ return _this.update(_this.attributes);
256
+ case 3:
257
+ newObject = _context3.sent;
258
+ _this.attributes = _objectSpread({}, newObject.attributes);
259
+ return _context3.abrupt("return", true);
260
+ case 8:
261
+ _context3.next = 10;
262
+ return Behavior.create(_this.attributes, _this.options);
263
+ case 10:
264
+ _newObject = _context3.sent;
265
+ _this.attributes = _objectSpread({}, _newObject.attributes);
266
+ return _context3.abrupt("return", true);
267
+ case 13:
268
+ case "end":
269
+ return _context3.stop();
270
+ }
271
+ }, _callee3);
272
+ })));
273
+ Object.entries(attributes).forEach(function (_ref4) {
274
+ var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
275
+ key = _ref5[0],
276
+ value = _ref5[1];
258
277
  var normalizedKey = key.replace('?', '');
259
278
  _this.attributes[normalizedKey] = value;
260
279
  Object.defineProperty(_this, normalizedKey, {
@@ -271,41 +290,41 @@ _class = Behavior;
271
290
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[behavior]=desc`). Valid fields are `behavior`.
272
291
  // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `behavior`.
273
292
  // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `behavior`.
274
- (0, _defineProperty2.default)(Behavior, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
293
+ (0, _defineProperty2.default)(Behavior, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
275
294
  var _response$data;
276
295
  var params,
277
296
  options,
278
297
  response,
279
- _args3 = arguments;
280
- return _regenerator.default.wrap(function _callee3$(_context3) {
281
- while (1) switch (_context3.prev = _context3.next) {
298
+ _args4 = arguments;
299
+ return _regenerator.default.wrap(function _callee4$(_context4) {
300
+ while (1) switch (_context4.prev = _context4.next) {
282
301
  case 0:
283
- params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
284
- options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
302
+ params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
303
+ options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
285
304
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
286
- _context3.next = 4;
305
+ _context4.next = 4;
287
306
  break;
288
307
  }
289
308
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
290
309
  case 4:
291
310
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
292
- _context3.next = 6;
311
+ _context4.next = 6;
293
312
  break;
294
313
  }
295
314
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
296
315
  case 6:
297
- _context3.next = 8;
316
+ _context4.next = 8;
298
317
  return _Api.default.sendRequest("/behaviors", 'GET', params, options);
299
318
  case 8:
300
- response = _context3.sent;
301
- 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) {
319
+ response = _context4.sent;
320
+ 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) {
302
321
  return new _class(obj, options);
303
322
  })) || []);
304
323
  case 10:
305
324
  case "end":
306
- return _context3.stop();
325
+ return _context4.stop();
307
326
  }
308
- }, _callee3);
327
+ }, _callee4);
309
328
  })));
310
329
  (0, _defineProperty2.default)(Behavior, "all", function () {
311
330
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -315,48 +334,48 @@ _class = Behavior;
315
334
  // Parameters:
316
335
  // id (required) - int64 - Behavior ID.
317
336
  (0, _defineProperty2.default)(Behavior, "find", /*#__PURE__*/function () {
318
- var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(id) {
337
+ var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(id) {
319
338
  var params,
320
339
  options,
321
340
  response,
322
- _args4 = arguments;
323
- return _regenerator.default.wrap(function _callee4$(_context4) {
324
- while (1) switch (_context4.prev = _context4.next) {
341
+ _args5 = arguments;
342
+ return _regenerator.default.wrap(function _callee5$(_context5) {
343
+ while (1) switch (_context5.prev = _context5.next) {
325
344
  case 0:
326
- params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
327
- options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
345
+ params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
346
+ options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
328
347
  if ((0, _utils.isObject)(params)) {
329
- _context4.next = 4;
348
+ _context5.next = 4;
330
349
  break;
331
350
  }
332
351
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
333
352
  case 4:
334
353
  params['id'] = id;
335
354
  if (params['id']) {
336
- _context4.next = 7;
355
+ _context5.next = 7;
337
356
  break;
338
357
  }
339
358
  throw new errors.MissingParameterError('Parameter missing: id');
340
359
  case 7:
341
360
  if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
342
- _context4.next = 9;
361
+ _context5.next = 9;
343
362
  break;
344
363
  }
345
364
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
346
365
  case 9:
347
- _context4.next = 11;
366
+ _context5.next = 11;
348
367
  return _Api.default.sendRequest("/behaviors/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
349
368
  case 11:
350
- response = _context4.sent;
351
- return _context4.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
369
+ response = _context5.sent;
370
+ return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
352
371
  case 13:
353
372
  case "end":
354
- return _context4.stop();
373
+ return _context5.stop();
355
374
  }
356
- }, _callee4);
375
+ }, _callee5);
357
376
  }));
358
377
  return function (_x) {
359
- return _ref6.apply(this, arguments);
378
+ return _ref7.apply(this, arguments);
360
379
  };
361
380
  }());
362
381
  (0, _defineProperty2.default)(Behavior, "get", function (id) {
@@ -374,75 +393,75 @@ _class = Behavior;
374
393
  // recursive - string - Show behaviors above this path?
375
394
  // behavior - string - DEPRECATED: If set only shows folder behaviors matching this behavior type. Use `filter[behavior]` instead.
376
395
  (0, _defineProperty2.default)(Behavior, "listFor", /*#__PURE__*/function () {
377
- var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(path) {
396
+ var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(path) {
378
397
  var _response$data2;
379
398
  var params,
380
399
  options,
381
400
  response,
382
- _args5 = arguments;
383
- return _regenerator.default.wrap(function _callee5$(_context5) {
384
- while (1) switch (_context5.prev = _context5.next) {
401
+ _args6 = arguments;
402
+ return _regenerator.default.wrap(function _callee6$(_context6) {
403
+ while (1) switch (_context6.prev = _context6.next) {
385
404
  case 0:
386
- params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
387
- options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
405
+ params = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
406
+ options = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
388
407
  if ((0, _utils.isObject)(params)) {
389
- _context5.next = 4;
408
+ _context6.next = 4;
390
409
  break;
391
410
  }
392
411
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
393
412
  case 4:
394
413
  params['path'] = path;
395
414
  if (params['path']) {
396
- _context5.next = 7;
415
+ _context6.next = 7;
397
416
  break;
398
417
  }
399
418
  throw new errors.MissingParameterError('Parameter missing: path');
400
419
  case 7:
401
420
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
402
- _context5.next = 9;
421
+ _context6.next = 9;
403
422
  break;
404
423
  }
405
424
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
406
425
  case 9:
407
426
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
408
- _context5.next = 11;
427
+ _context6.next = 11;
409
428
  break;
410
429
  }
411
430
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
412
431
  case 11:
413
432
  if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
414
- _context5.next = 13;
433
+ _context6.next = 13;
415
434
  break;
416
435
  }
417
436
  throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
418
437
  case 13:
419
438
  if (!(params['recursive'] && !(0, _utils.isString)(params['recursive']))) {
420
- _context5.next = 15;
439
+ _context6.next = 15;
421
440
  break;
422
441
  }
423
442
  throw new errors.InvalidParameterError("Bad parameter: recursive must be of type String, received ".concat((0, _utils.getType)(params['recursive'])));
424
443
  case 15:
425
444
  if (!(params['behavior'] && !(0, _utils.isString)(params['behavior']))) {
426
- _context5.next = 17;
445
+ _context6.next = 17;
427
446
  break;
428
447
  }
429
448
  throw new errors.InvalidParameterError("Bad parameter: behavior must be of type String, received ".concat((0, _utils.getType)(params['behavior'])));
430
449
  case 17:
431
- _context5.next = 19;
450
+ _context6.next = 19;
432
451
  return _Api.default.sendRequest("/behaviors/folders/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
433
452
  case 19:
434
- response = _context5.sent;
435
- return _context5.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
453
+ response = _context6.sent;
454
+ return _context6.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
436
455
  return new _class(obj, options);
437
456
  })) || []);
438
457
  case 21:
439
458
  case "end":
440
- return _context5.stop();
459
+ return _context6.stop();
441
460
  }
442
- }, _callee5);
461
+ }, _callee6);
443
462
  }));
444
463
  return function (_x2) {
445
- return _ref7.apply(this, arguments);
464
+ return _ref8.apply(this, arguments);
446
465
  };
447
466
  }());
448
467
  // Parameters:
@@ -452,68 +471,68 @@ _class = Behavior;
452
471
  // description - string - Description for this behavior.
453
472
  // path (required) - string - Folder behaviors path.
454
473
  // behavior (required) - string - Behavior type.
455
- (0, _defineProperty2.default)(Behavior, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
474
+ (0, _defineProperty2.default)(Behavior, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
456
475
  var params,
457
476
  options,
458
477
  response,
459
- _args6 = arguments;
460
- return _regenerator.default.wrap(function _callee6$(_context6) {
461
- while (1) switch (_context6.prev = _context6.next) {
478
+ _args7 = arguments;
479
+ return _regenerator.default.wrap(function _callee7$(_context7) {
480
+ while (1) switch (_context7.prev = _context7.next) {
462
481
  case 0:
463
- params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
464
- options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
482
+ params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
483
+ options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
465
484
  if (params['path']) {
466
- _context6.next = 4;
485
+ _context7.next = 4;
467
486
  break;
468
487
  }
469
488
  throw new errors.MissingParameterError('Parameter missing: path');
470
489
  case 4:
471
490
  if (params['behavior']) {
472
- _context6.next = 6;
491
+ _context7.next = 6;
473
492
  break;
474
493
  }
475
494
  throw new errors.MissingParameterError('Parameter missing: behavior');
476
495
  case 6:
477
496
  if (!(params['value'] && !(0, _utils.isString)(params['value']))) {
478
- _context6.next = 8;
497
+ _context7.next = 8;
479
498
  break;
480
499
  }
481
500
  throw new errors.InvalidParameterError("Bad parameter: value must be of type String, received ".concat((0, _utils.getType)(params['value'])));
482
501
  case 8:
483
502
  if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
484
- _context6.next = 10;
503
+ _context7.next = 10;
485
504
  break;
486
505
  }
487
506
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
488
507
  case 10:
489
508
  if (!(params['description'] && !(0, _utils.isString)(params['description']))) {
490
- _context6.next = 12;
509
+ _context7.next = 12;
491
510
  break;
492
511
  }
493
512
  throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params['description'])));
494
513
  case 12:
495
514
  if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
496
- _context6.next = 14;
515
+ _context7.next = 14;
497
516
  break;
498
517
  }
499
518
  throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
500
519
  case 14:
501
520
  if (!(params['behavior'] && !(0, _utils.isString)(params['behavior']))) {
502
- _context6.next = 16;
521
+ _context7.next = 16;
503
522
  break;
504
523
  }
505
524
  throw new errors.InvalidParameterError("Bad parameter: behavior must be of type String, received ".concat((0, _utils.getType)(params['behavior'])));
506
525
  case 16:
507
- _context6.next = 18;
526
+ _context7.next = 18;
508
527
  return _Api.default.sendRequest("/behaviors", 'POST', params, options);
509
528
  case 18:
510
- response = _context6.sent;
511
- return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
529
+ response = _context7.sent;
530
+ return _context7.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
512
531
  case 20:
513
532
  case "end":
514
- return _context6.stop();
533
+ return _context7.stop();
515
534
  }
516
- }, _callee6);
535
+ }, _callee7);
517
536
  })));
518
537
  // Parameters:
519
538
  // url (required) - string - URL for testing the webhook.
@@ -522,56 +541,56 @@ _class = Behavior;
522
541
  // headers - object - Additional request headers.
523
542
  // body - object - Additional body parameters.
524
543
  // action - string - action for test body
525
- (0, _defineProperty2.default)(Behavior, "webhookTest", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
544
+ (0, _defineProperty2.default)(Behavior, "webhookTest", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
526
545
  var params,
527
546
  options,
528
547
  response,
529
- _args7 = arguments;
530
- return _regenerator.default.wrap(function _callee7$(_context7) {
531
- while (1) switch (_context7.prev = _context7.next) {
548
+ _args8 = arguments;
549
+ return _regenerator.default.wrap(function _callee8$(_context8) {
550
+ while (1) switch (_context8.prev = _context8.next) {
532
551
  case 0:
533
- params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
534
- options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
552
+ params = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
553
+ options = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};
535
554
  if (params['url']) {
536
- _context7.next = 4;
555
+ _context8.next = 4;
537
556
  break;
538
557
  }
539
558
  throw new errors.MissingParameterError('Parameter missing: url');
540
559
  case 4:
541
560
  if (!(params['url'] && !(0, _utils.isString)(params['url']))) {
542
- _context7.next = 6;
561
+ _context8.next = 6;
543
562
  break;
544
563
  }
545
564
  throw new errors.InvalidParameterError("Bad parameter: url must be of type String, received ".concat((0, _utils.getType)(params['url'])));
546
565
  case 6:
547
566
  if (!(params['method'] && !(0, _utils.isString)(params['method']))) {
548
- _context7.next = 8;
567
+ _context8.next = 8;
549
568
  break;
550
569
  }
551
570
  throw new errors.InvalidParameterError("Bad parameter: method must be of type String, received ".concat((0, _utils.getType)(params['method'])));
552
571
  case 8:
553
572
  if (!(params['encoding'] && !(0, _utils.isString)(params['encoding']))) {
554
- _context7.next = 10;
573
+ _context8.next = 10;
555
574
  break;
556
575
  }
557
576
  throw new errors.InvalidParameterError("Bad parameter: encoding must be of type String, received ".concat((0, _utils.getType)(params['encoding'])));
558
577
  case 10:
559
578
  if (!(params['action'] && !(0, _utils.isString)(params['action']))) {
560
- _context7.next = 12;
579
+ _context8.next = 12;
561
580
  break;
562
581
  }
563
582
  throw new errors.InvalidParameterError("Bad parameter: action must be of type String, received ".concat((0, _utils.getType)(params['action'])));
564
583
  case 12:
565
- _context7.next = 14;
584
+ _context8.next = 14;
566
585
  return _Api.default.sendRequest("/behaviors/webhook/test", 'POST', params, options);
567
586
  case 14:
568
- response = _context7.sent;
569
- return _context7.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
587
+ response = _context8.sent;
588
+ return _context8.abrupt("return");
570
589
  case 16:
571
590
  case "end":
572
- return _context7.stop();
591
+ return _context8.stop();
573
592
  }
574
- }, _callee7);
593
+ }, _callee8);
575
594
  })));
576
595
  var _default = exports.default = Behavior;
577
596
  module.exports = Behavior;