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
@@ -79,43 +79,43 @@ _BundleDownload = BundleDownload;
79
79
  options,
80
80
  response,
81
81
  _args = arguments;
82
- return _regenerator.default.wrap(function _callee$(_context) {
82
+ return _regenerator.default.wrap(function (_context) {
83
83
  while (1) switch (_context.prev = _context.next) {
84
84
  case 0:
85
85
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
86
86
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
87
87
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
88
- _context.next = 4;
88
+ _context.next = 1;
89
89
  break;
90
90
  }
91
91
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
92
- case 4:
92
+ case 1:
93
93
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
94
- _context.next = 6;
94
+ _context.next = 2;
95
95
  break;
96
96
  }
97
97
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
98
- case 6:
98
+ case 2:
99
99
  if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
100
- _context.next = 8;
100
+ _context.next = 3;
101
101
  break;
102
102
  }
103
103
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
104
- case 8:
104
+ case 3:
105
105
  if (!(params.bundle_registration_id && !(0, _utils.isInt)(params.bundle_registration_id))) {
106
- _context.next = 10;
106
+ _context.next = 4;
107
107
  break;
108
108
  }
109
109
  throw new errors.InvalidParameterError("Bad parameter: bundle_registration_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_registration_id)));
110
- case 10:
111
- _context.next = 12;
110
+ case 4:
111
+ _context.next = 5;
112
112
  return _Api.default.sendRequest('/bundle_downloads', 'GET', params, options);
113
- case 12:
113
+ case 5:
114
114
  response = _context.sent;
115
115
  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) {
116
116
  return new _BundleDownload(obj, options);
117
117
  })) || []);
118
- case 14:
118
+ case 6:
119
119
  case "end":
120
120
  return _context.stop();
121
121
  }
@@ -81,49 +81,49 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
81
81
  var params,
82
82
  response,
83
83
  _args = arguments;
84
- return _regenerator.default.wrap(function _callee$(_context) {
84
+ return _regenerator.default.wrap(function (_context) {
85
85
  while (1) switch (_context.prev = _context.next) {
86
86
  case 0:
87
87
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
88
88
  if (_this.attributes.id) {
89
- _context.next = 3;
89
+ _context.next = 1;
90
90
  break;
91
91
  }
92
92
  throw new errors.EmptyPropertyError('Current object has no id');
93
- case 3:
93
+ case 1:
94
94
  if ((0, _utils.isObject)(params)) {
95
- _context.next = 5;
95
+ _context.next = 2;
96
96
  break;
97
97
  }
98
98
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
99
- case 5:
99
+ case 2:
100
100
  params.id = _this.attributes.id;
101
101
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
102
- _context.next = 8;
102
+ _context.next = 3;
103
103
  break;
104
104
  }
105
105
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
106
- case 8:
106
+ case 3:
107
107
  if (params.id) {
108
- _context.next = 14;
108
+ _context.next = 5;
109
109
  break;
110
110
  }
111
111
  if (!_this.attributes.id) {
112
- _context.next = 13;
112
+ _context.next = 4;
113
113
  break;
114
114
  }
115
115
  params.id = _this.id;
116
- _context.next = 14;
116
+ _context.next = 5;
117
117
  break;
118
- case 13:
118
+ case 4:
119
119
  throw new errors.MissingParameterError('Parameter missing: id');
120
- case 14:
121
- _context.next = 16;
120
+ case 5:
121
+ _context.next = 6;
122
122
  return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
123
- case 16:
123
+ case 6:
124
124
  response = _context.sent;
125
125
  return _context.abrupt("return", new BundleNotification(response === null || response === void 0 ? void 0 : response.data, _this.options));
126
- case 18:
126
+ case 7:
127
127
  case "end":
128
128
  return _context.stop();
129
129
  }
@@ -132,46 +132,46 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
132
132
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
133
133
  var params,
134
134
  _args2 = arguments;
135
- return _regenerator.default.wrap(function _callee2$(_context2) {
135
+ return _regenerator.default.wrap(function (_context2) {
136
136
  while (1) switch (_context2.prev = _context2.next) {
137
137
  case 0:
138
138
  params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
139
139
  if (_this.attributes.id) {
140
- _context2.next = 3;
140
+ _context2.next = 1;
141
141
  break;
142
142
  }
143
143
  throw new errors.EmptyPropertyError('Current object has no id');
144
- case 3:
144
+ case 1:
145
145
  if ((0, _utils.isObject)(params)) {
146
- _context2.next = 5;
146
+ _context2.next = 2;
147
147
  break;
148
148
  }
149
149
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
150
- case 5:
150
+ case 2:
151
151
  params.id = _this.attributes.id;
152
152
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
153
- _context2.next = 8;
153
+ _context2.next = 3;
154
154
  break;
155
155
  }
156
156
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
157
- case 8:
157
+ case 3:
158
158
  if (params.id) {
159
- _context2.next = 14;
159
+ _context2.next = 5;
160
160
  break;
161
161
  }
162
162
  if (!_this.attributes.id) {
163
- _context2.next = 13;
163
+ _context2.next = 4;
164
164
  break;
165
165
  }
166
166
  params.id = _this.id;
167
- _context2.next = 14;
167
+ _context2.next = 5;
168
168
  break;
169
- case 13:
169
+ case 4:
170
170
  throw new errors.MissingParameterError('Parameter missing: id');
171
- case 14:
172
- _context2.next = 16;
171
+ case 5:
172
+ _context2.next = 6;
173
173
  return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
174
- case 16:
174
+ case 6:
175
175
  case "end":
176
176
  return _context2.stop();
177
177
  }
@@ -183,27 +183,27 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
183
183
  });
184
184
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
185
185
  var _newObject, newObject;
186
- return _regenerator.default.wrap(function _callee3$(_context3) {
186
+ return _regenerator.default.wrap(function (_context3) {
187
187
  while (1) switch (_context3.prev = _context3.next) {
188
188
  case 0:
189
189
  if (!_this.attributes.id) {
190
- _context3.next = 6;
190
+ _context3.next = 2;
191
191
  break;
192
192
  }
193
- _context3.next = 3;
193
+ _context3.next = 1;
194
194
  return _this.update(_this.attributes);
195
- case 3:
195
+ case 1:
196
196
  _newObject = _context3.sent;
197
197
  _this.attributes = _objectSpread({}, _newObject.attributes);
198
198
  return _context3.abrupt("return", true);
199
- case 6:
200
- _context3.next = 8;
199
+ case 2:
200
+ _context3.next = 3;
201
201
  return BundleNotification.create(_this.attributes, _this.options);
202
- case 8:
202
+ case 3:
203
203
  newObject = _context3.sent;
204
204
  _this.attributes = _objectSpread({}, newObject.attributes);
205
205
  return _context3.abrupt("return", true);
206
- case 11:
206
+ case 4:
207
207
  case "end":
208
208
  return _context3.stop();
209
209
  }
@@ -235,37 +235,37 @@ _BundleNotification = BundleNotification;
235
235
  options,
236
236
  response,
237
237
  _args4 = arguments;
238
- return _regenerator.default.wrap(function _callee4$(_context4) {
238
+ return _regenerator.default.wrap(function (_context4) {
239
239
  while (1) switch (_context4.prev = _context4.next) {
240
240
  case 0:
241
241
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
242
242
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
243
243
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
244
- _context4.next = 4;
244
+ _context4.next = 1;
245
245
  break;
246
246
  }
247
247
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
248
- case 4:
248
+ case 1:
249
249
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
250
- _context4.next = 6;
250
+ _context4.next = 2;
251
251
  break;
252
252
  }
253
253
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
254
- case 6:
254
+ case 2:
255
255
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
256
- _context4.next = 8;
256
+ _context4.next = 3;
257
257
  break;
258
258
  }
259
259
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
260
- case 8:
261
- _context4.next = 10;
260
+ case 3:
261
+ _context4.next = 4;
262
262
  return _Api.default.sendRequest('/bundle_notifications', 'GET', params, options);
263
- case 10:
263
+ case 4:
264
264
  response = _context4.sent;
265
265
  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) {
266
266
  return new _BundleNotification(obj, options);
267
267
  })) || []);
268
- case 12:
268
+ case 5:
269
269
  case "end":
270
270
  return _context4.stop();
271
271
  }
@@ -284,36 +284,36 @@ _BundleNotification = BundleNotification;
284
284
  options,
285
285
  response,
286
286
  _args5 = arguments;
287
- return _regenerator.default.wrap(function _callee5$(_context5) {
287
+ return _regenerator.default.wrap(function (_context5) {
288
288
  while (1) switch (_context5.prev = _context5.next) {
289
289
  case 0:
290
290
  params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
291
291
  options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
292
292
  if ((0, _utils.isObject)(params)) {
293
- _context5.next = 4;
293
+ _context5.next = 1;
294
294
  break;
295
295
  }
296
296
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
297
- case 4:
297
+ case 1:
298
298
  params.id = id;
299
299
  if (params.id) {
300
- _context5.next = 7;
300
+ _context5.next = 2;
301
301
  break;
302
302
  }
303
303
  throw new errors.MissingParameterError('Parameter missing: id');
304
- case 7:
304
+ case 2:
305
305
  if (!(params.id && !(0, _utils.isInt)(params.id))) {
306
- _context5.next = 9;
306
+ _context5.next = 3;
307
307
  break;
308
308
  }
309
309
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
310
- case 9:
311
- _context5.next = 11;
310
+ case 3:
311
+ _context5.next = 4;
312
312
  return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params.id)), 'GET', params, options);
313
- case 11:
313
+ case 4:
314
314
  response = _context5.sent;
315
315
  return _context5.abrupt("return", new _BundleNotification(response === null || response === void 0 ? void 0 : response.data, options));
316
- case 13:
316
+ case 5:
317
317
  case "end":
318
318
  return _context5.stop();
319
319
  }
@@ -339,41 +339,41 @@ _BundleNotification = BundleNotification;
339
339
  options,
340
340
  response,
341
341
  _args6 = arguments;
342
- return _regenerator.default.wrap(function _callee6$(_context6) {
342
+ return _regenerator.default.wrap(function (_context6) {
343
343
  while (1) switch (_context6.prev = _context6.next) {
344
344
  case 0:
345
345
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
346
346
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
347
347
  if (params.bundle_id) {
348
- _context6.next = 4;
348
+ _context6.next = 1;
349
349
  break;
350
350
  }
351
351
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
352
- case 4:
352
+ case 1:
353
353
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
354
- _context6.next = 6;
354
+ _context6.next = 2;
355
355
  break;
356
356
  }
357
357
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
358
- case 6:
358
+ case 2:
359
359
  if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
360
- _context6.next = 8;
360
+ _context6.next = 3;
361
361
  break;
362
362
  }
363
363
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
364
- case 8:
364
+ case 3:
365
365
  if (!(params.notify_user_id && !(0, _utils.isInt)(params.notify_user_id))) {
366
- _context6.next = 10;
366
+ _context6.next = 4;
367
367
  break;
368
368
  }
369
369
  throw new errors.InvalidParameterError("Bad parameter: notify_user_id must be of type Int, received ".concat((0, _utils.getType)(params.notify_user_id)));
370
- case 10:
371
- _context6.next = 12;
370
+ case 4:
371
+ _context6.next = 5;
372
372
  return _Api.default.sendRequest('/bundle_notifications', 'POST', params, options);
373
- case 12:
373
+ case 5:
374
374
  response = _context6.sent;
375
375
  return _context6.abrupt("return", new _BundleNotification(response === null || response === void 0 ? void 0 : response.data, options));
376
- case 14:
376
+ case 6:
377
377
  case "end":
378
378
  return _context6.stop();
379
379
  }
@@ -90,22 +90,22 @@ var BundleRecipient = /*#__PURE__*/(0, _createClass2.default)(function BundleRec
90
90
  });
91
91
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
92
92
  var newObject;
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
  if (!_this.attributes.id) {
97
- _context.next = 4;
97
+ _context.next = 1;
98
98
  break;
99
99
  }
100
100
  throw new errors.NotImplementedError('The BundleRecipient object doesn\'t support updates.');
101
- case 4:
102
- _context.next = 6;
101
+ case 1:
102
+ _context.next = 2;
103
103
  return BundleRecipient.create(_this.attributes, _this.options);
104
- case 6:
104
+ case 2:
105
105
  newObject = _context.sent;
106
106
  _this.attributes = _objectSpread({}, newObject.attributes);
107
107
  return _context.abrupt("return", true);
108
- case 9:
108
+ case 3:
109
109
  case "end":
110
110
  return _context.stop();
111
111
  }
@@ -138,49 +138,49 @@ _BundleRecipient = BundleRecipient;
138
138
  options,
139
139
  response,
140
140
  _args2 = arguments;
141
- return _regenerator.default.wrap(function _callee2$(_context2) {
141
+ return _regenerator.default.wrap(function (_context2) {
142
142
  while (1) switch (_context2.prev = _context2.next) {
143
143
  case 0:
144
144
  params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
145
145
  options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
146
146
  if (params.bundle_id) {
147
- _context2.next = 4;
147
+ _context2.next = 1;
148
148
  break;
149
149
  }
150
150
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
151
- case 4:
151
+ case 1:
152
152
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
153
- _context2.next = 6;
153
+ _context2.next = 2;
154
154
  break;
155
155
  }
156
156
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
157
- case 6:
157
+ case 2:
158
158
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
159
- _context2.next = 8;
159
+ _context2.next = 3;
160
160
  break;
161
161
  }
162
162
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
163
- case 8:
163
+ case 3:
164
164
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
165
- _context2.next = 10;
165
+ _context2.next = 4;
166
166
  break;
167
167
  }
168
168
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
169
- case 10:
169
+ case 4:
170
170
  if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
171
- _context2.next = 12;
171
+ _context2.next = 5;
172
172
  break;
173
173
  }
174
174
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
175
- case 12:
176
- _context2.next = 14;
175
+ case 5:
176
+ _context2.next = 6;
177
177
  return _Api.default.sendRequest('/bundle_recipients', 'GET', params, options);
178
- case 14:
178
+ case 6:
179
179
  response = _context2.sent;
180
180
  return _context2.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
181
181
  return new _BundleRecipient(obj, options);
182
182
  })) || []);
183
- case 16:
183
+ case 7:
184
184
  case "end":
185
185
  return _context2.stop();
186
186
  }
@@ -204,65 +204,65 @@ _BundleRecipient = BundleRecipient;
204
204
  options,
205
205
  response,
206
206
  _args3 = arguments;
207
- return _regenerator.default.wrap(function _callee3$(_context3) {
207
+ return _regenerator.default.wrap(function (_context3) {
208
208
  while (1) switch (_context3.prev = _context3.next) {
209
209
  case 0:
210
210
  params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
211
211
  options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
212
212
  if (params.bundle_id) {
213
- _context3.next = 4;
213
+ _context3.next = 1;
214
214
  break;
215
215
  }
216
216
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
217
- case 4:
217
+ case 1:
218
218
  if (params.recipient) {
219
- _context3.next = 6;
219
+ _context3.next = 2;
220
220
  break;
221
221
  }
222
222
  throw new errors.MissingParameterError('Parameter missing: recipient');
223
- case 6:
223
+ case 2:
224
224
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
225
- _context3.next = 8;
225
+ _context3.next = 3;
226
226
  break;
227
227
  }
228
228
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
229
- case 8:
229
+ case 3:
230
230
  if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
231
- _context3.next = 10;
231
+ _context3.next = 4;
232
232
  break;
233
233
  }
234
234
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
235
- case 10:
235
+ case 4:
236
236
  if (!(params.recipient && !(0, _utils.isString)(params.recipient))) {
237
- _context3.next = 12;
237
+ _context3.next = 5;
238
238
  break;
239
239
  }
240
240
  throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params.recipient)));
241
- case 12:
241
+ case 5:
242
242
  if (!(params.name && !(0, _utils.isString)(params.name))) {
243
- _context3.next = 14;
243
+ _context3.next = 6;
244
244
  break;
245
245
  }
246
246
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
247
- case 14:
247
+ case 6:
248
248
  if (!(params.company && !(0, _utils.isString)(params.company))) {
249
- _context3.next = 16;
249
+ _context3.next = 7;
250
250
  break;
251
251
  }
252
252
  throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
253
- case 16:
253
+ case 7:
254
254
  if (!(params.note && !(0, _utils.isString)(params.note))) {
255
- _context3.next = 18;
255
+ _context3.next = 8;
256
256
  break;
257
257
  }
258
258
  throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params.note)));
259
- case 18:
260
- _context3.next = 20;
259
+ case 8:
260
+ _context3.next = 9;
261
261
  return _Api.default.sendRequest('/bundle_recipients', 'POST', params, options);
262
- case 20:
262
+ case 9:
263
263
  response = _context3.sent;
264
264
  return _context3.abrupt("return", new _BundleRecipient(response === null || response === void 0 ? void 0 : response.data, options));
265
- case 22:
265
+ case 10:
266
266
  case "end":
267
267
  return _context3.stop();
268
268
  }
@@ -110,43 +110,43 @@ _BundleRegistration = BundleRegistration;
110
110
  options,
111
111
  response,
112
112
  _args = arguments;
113
- return _regenerator.default.wrap(function _callee$(_context) {
113
+ return _regenerator.default.wrap(function (_context) {
114
114
  while (1) switch (_context.prev = _context.next) {
115
115
  case 0:
116
116
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
117
117
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
118
118
  if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
119
- _context.next = 4;
119
+ _context.next = 1;
120
120
  break;
121
121
  }
122
122
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
123
- case 4:
123
+ case 1:
124
124
  if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
125
- _context.next = 6;
125
+ _context.next = 2;
126
126
  break;
127
127
  }
128
128
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
129
- case 6:
129
+ case 2:
130
130
  if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
131
- _context.next = 8;
131
+ _context.next = 3;
132
132
  break;
133
133
  }
134
134
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
135
- case 8:
135
+ case 3:
136
136
  if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
137
- _context.next = 10;
137
+ _context.next = 4;
138
138
  break;
139
139
  }
140
140
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
141
- case 10:
142
- _context.next = 12;
141
+ case 4:
142
+ _context.next = 5;
143
143
  return _Api.default.sendRequest('/bundle_registrations', 'GET', params, options);
144
- case 12:
144
+ case 5:
145
145
  response = _context.sent;
146
146
  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) {
147
147
  return new _BundleRegistration(obj, options);
148
148
  })) || []);
149
- case 14:
149
+ case 6:
150
150
  case "end":
151
151
  return _context.stop();
152
152
  }