files.com 1.1.18 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/.eslintrc.js +0 -3
  2. package/_VERSION +1 -1
  3. package/docs/Errors.md +1 -0
  4. package/lib/Api.js +1 -1
  5. package/lib/Errors.js +957 -933
  6. package/lib/Files.js +1 -1
  7. package/lib/models/ActionNotificationExport.js +25 -25
  8. package/lib/models/ActionNotificationExportResult.js +10 -10
  9. package/lib/models/ActionWebhookFailure.js +5 -9
  10. package/lib/models/ApiKey.js +62 -70
  11. package/lib/models/App.js +5 -5
  12. package/lib/models/As2IncomingMessage.js +7 -7
  13. package/lib/models/As2OutgoingMessage.js +7 -7
  14. package/lib/models/As2Partner.js +54 -58
  15. package/lib/models/As2Station.js +51 -55
  16. package/lib/models/Automation.js +102 -110
  17. package/lib/models/AutomationRun.js +13 -13
  18. package/lib/models/BandwidthSnapshot.js +5 -5
  19. package/lib/models/Behavior.js +77 -85
  20. package/lib/models/Bundle.js +102 -110
  21. package/lib/models/BundleDownload.js +9 -9
  22. package/lib/models/BundleNotification.js +37 -41
  23. package/lib/models/BundleRecipient.js +22 -22
  24. package/lib/models/BundleRegistration.js +7 -7
  25. package/lib/models/Clickwrap.js +52 -56
  26. package/lib/models/DnsRecord.js +5 -5
  27. package/lib/models/EmailIncomingMessage.js +5 -5
  28. package/lib/models/ExternalEvent.js +18 -18
  29. package/lib/models/File.js +89 -93
  30. package/lib/models/FileComment.js +41 -45
  31. package/lib/models/FileCommentReaction.js +15 -19
  32. package/lib/models/FileMigration.js +5 -5
  33. package/lib/models/Folder.js +24 -24
  34. package/lib/models/FormFieldSet.js +44 -48
  35. package/lib/models/GpgKey.js +53 -57
  36. package/lib/models/Group.js +51 -55
  37. package/lib/models/GroupUser.js +53 -57
  38. package/lib/models/History.js +72 -72
  39. package/lib/models/HistoryExport.js +51 -51
  40. package/lib/models/HistoryExportResult.js +10 -10
  41. package/lib/models/InboxRecipient.js +22 -22
  42. package/lib/models/InboxRegistration.js +7 -7
  43. package/lib/models/InboxUpload.js +9 -9
  44. package/lib/models/Invoice.js +12 -12
  45. package/lib/models/IpAddress.js +17 -17
  46. package/lib/models/Lock.js +27 -31
  47. package/lib/models/Message.js +60 -64
  48. package/lib/models/MessageComment.js +46 -50
  49. package/lib/models/MessageCommentReaction.js +27 -31
  50. package/lib/models/MessageReaction.js +27 -31
  51. package/lib/models/Notification.js +66 -70
  52. package/lib/models/Payment.js +12 -12
  53. package/lib/models/Permission.js +28 -32
  54. package/lib/models/Priority.js +9 -9
  55. package/lib/models/Project.js +39 -43
  56. package/lib/models/PublicKey.js +46 -50
  57. package/lib/models/RemoteBandwidthSnapshot.js +5 -5
  58. package/lib/models/RemoteServer.js +306 -310
  59. package/lib/models/Request.js +33 -37
  60. package/lib/models/Session.js +11 -15
  61. package/lib/models/SettingsChange.js +5 -5
  62. package/lib/models/SftpHostKey.js +40 -44
  63. package/lib/models/ShareGroup.js +50 -54
  64. package/lib/models/Site.js +138 -138
  65. package/lib/models/Snapshot.js +44 -48
  66. package/lib/models/SsoStrategy.js +15 -19
  67. package/lib/models/Style.js +17 -21
  68. package/lib/models/UsageDailySnapshot.js +5 -5
  69. package/lib/models/UsageSnapshot.js +5 -5
  70. package/lib/models/User.js +156 -172
  71. package/lib/models/UserCipherUse.js +7 -7
  72. package/lib/models/UserRequest.js +26 -30
  73. package/lib/models/WebhookTest.js +15 -15
  74. package/package.json +6 -2
  75. package/src/Api.js +2 -1
  76. package/src/Errors.js +189 -177
  77. package/src/Files.js +1 -1
  78. package/src/models/AccountLineItem.js +5 -2
  79. package/src/models/Action.js +5 -2
  80. package/src/models/ActionNotificationExport.js +36 -35
  81. package/src/models/ActionNotificationExportResult.js +15 -13
  82. package/src/models/ActionWebhookFailure.js +9 -8
  83. package/src/models/ApiKey.js +69 -72
  84. package/src/models/App.js +10 -8
  85. package/src/models/As2IncomingMessage.js +12 -10
  86. package/src/models/As2OutgoingMessage.js +12 -10
  87. package/src/models/As2Partner.js +61 -60
  88. package/src/models/As2Station.js +58 -57
  89. package/src/models/Auto.js +5 -2
  90. package/src/models/Automation.js +121 -110
  91. package/src/models/AutomationRun.js +18 -17
  92. package/src/models/BandwidthSnapshot.js +10 -8
  93. package/src/models/Behavior.js +85 -86
  94. package/src/models/Bundle.js +121 -110
  95. package/src/models/BundleDownload.js +14 -12
  96. package/src/models/BundleNotification.js +40 -43
  97. package/src/models/BundleRecipient.js +33 -32
  98. package/src/models/BundleRegistration.js +12 -10
  99. package/src/models/Clickwrap.js +60 -58
  100. package/src/models/DnsRecord.js +10 -8
  101. package/src/models/EmailIncomingMessage.js +10 -8
  102. package/src/models/Errors.js +5 -2
  103. package/src/models/ExternalEvent.js +29 -29
  104. package/src/models/File.js +116 -108
  105. package/src/models/FileAction.js +5 -2
  106. package/src/models/FileComment.js +45 -46
  107. package/src/models/FileCommentReaction.js +26 -26
  108. package/src/models/FileMigration.js +10 -8
  109. package/src/models/FileUploadPart.js +5 -2
  110. package/src/models/Folder.js +32 -29
  111. package/src/models/FormField.js +5 -2
  112. package/src/models/FormFieldSet.js +49 -50
  113. package/src/models/GpgKey.js +60 -59
  114. package/src/models/Group.js +58 -57
  115. package/src/models/GroupUser.js +60 -58
  116. package/src/models/History.js +77 -74
  117. package/src/models/HistoryExport.js +62 -61
  118. package/src/models/HistoryExportResult.js +15 -13
  119. package/src/models/Image.js +5 -2
  120. package/src/models/InboxRecipient.js +33 -32
  121. package/src/models/InboxRegistration.js +12 -10
  122. package/src/models/InboxUpload.js +14 -12
  123. package/src/models/Invoice.js +17 -14
  124. package/src/models/InvoiceLineItem.js +5 -2
  125. package/src/models/IpAddress.js +22 -20
  126. package/src/models/Lock.js +36 -36
  127. package/src/models/Message.js +66 -66
  128. package/src/models/MessageComment.js +50 -52
  129. package/src/models/MessageCommentReaction.js +38 -40
  130. package/src/models/MessageReaction.js +38 -40
  131. package/src/models/Notification.js +74 -72
  132. package/src/models/Payment.js +17 -14
  133. package/src/models/PaymentLineItem.js +5 -2
  134. package/src/models/Permission.js +39 -40
  135. package/src/models/Preview.js +5 -2
  136. package/src/models/Priority.js +14 -12
  137. package/src/models/Project.js +43 -45
  138. package/src/models/PublicIpAddress.js +5 -2
  139. package/src/models/PublicKey.js +50 -52
  140. package/src/models/RemoteBandwidthSnapshot.js +10 -8
  141. package/src/models/RemoteServer.js +380 -312
  142. package/src/models/RemoteServerConfigurationFile.js +5 -2
  143. package/src/models/Request.js +44 -46
  144. package/src/models/Session.js +22 -22
  145. package/src/models/SettingsChange.js +10 -8
  146. package/src/models/SftpHostKey.js +45 -46
  147. package/src/models/ShareGroup.js +56 -56
  148. package/src/models/ShareGroupMember.js +5 -2
  149. package/src/models/Site.js +143 -142
  150. package/src/models/Snapshot.js +50 -50
  151. package/src/models/SsoStrategy.js +20 -21
  152. package/src/models/Status.js +5 -2
  153. package/src/models/Style.js +22 -23
  154. package/src/models/UsageDailySnapshot.js +10 -8
  155. package/src/models/UsageSnapshot.js +10 -8
  156. package/src/models/User.js +185 -168
  157. package/src/models/UserCipherUse.js +12 -10
  158. package/src/models/UserRequest.js +37 -39
  159. package/src/models/WebhookTest.js +26 -24
  160. package/test/Api.test.js +163 -0
  161. package/test/{package.json → integration/package.json} +1 -1
  162. package/test/{src → integration/src}/index.js +1 -1
  163. package/test.sh +2 -1
  164. /package/test/{.babelrc → integration/.babelrc} +0 -0
  165. /package/test/{index.js → integration/index.js} +0 -0
@@ -92,13 +92,13 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
92
92
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
93
93
  case 5:
94
94
  params.id = _this.attributes.id;
95
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
95
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
96
96
  _context.next = 8;
97
97
  break;
98
98
  }
99
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
99
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
100
100
  case 8:
101
- if (params['id']) {
101
+ if (params.id) {
102
102
  _context.next = 14;
103
103
  break;
104
104
  }
@@ -106,14 +106,14 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
106
106
  _context.next = 13;
107
107
  break;
108
108
  }
109
- params['id'] = _this.id;
109
+ params.id = _this.id;
110
110
  _context.next = 14;
111
111
  break;
112
112
  case 13:
113
113
  throw new errors.MissingParameterError('Parameter missing: id');
114
114
  case 14:
115
115
  _context.next = 16;
116
- return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
116
+ return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
117
117
  case 16:
118
118
  response = _context.sent;
119
119
  return _context.abrupt("return", new BundleNotification(response === null || response === void 0 ? void 0 : response.data, _this.options));
@@ -125,7 +125,6 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
125
125
  })));
126
126
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
127
127
  var params,
128
- response,
129
128
  _args2 = arguments;
130
129
  return _regenerator.default.wrap(function _callee2$(_context2) {
131
130
  while (1) switch (_context2.prev = _context2.next) {
@@ -144,13 +143,13 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
144
143
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
145
144
  case 5:
146
145
  params.id = _this.attributes.id;
147
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
146
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
148
147
  _context2.next = 8;
149
148
  break;
150
149
  }
151
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
150
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
152
151
  case 8:
153
- if (params['id']) {
152
+ if (params.id) {
154
153
  _context2.next = 14;
155
154
  break;
156
155
  }
@@ -158,18 +157,15 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
158
157
  _context2.next = 13;
159
158
  break;
160
159
  }
161
- params['id'] = _this.id;
160
+ params.id = _this.id;
162
161
  _context2.next = 14;
163
162
  break;
164
163
  case 13:
165
164
  throw new errors.MissingParameterError('Parameter missing: id');
166
165
  case 14:
167
166
  _context2.next = 16;
168
- return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
167
+ return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
169
168
  case 16:
170
- response = _context2.sent;
171
- return _context2.abrupt("return");
172
- case 18:
173
169
  case "end":
174
170
  return _context2.stop();
175
171
  }
@@ -180,28 +176,28 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
180
176
  return _this.delete(params);
181
177
  });
182
178
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
183
- var newObject, _newObject;
179
+ var _newObject, newObject;
184
180
  return _regenerator.default.wrap(function _callee3$(_context3) {
185
181
  while (1) switch (_context3.prev = _context3.next) {
186
182
  case 0:
187
- if (!_this.attributes['id']) {
188
- _context3.next = 8;
183
+ if (!_this.attributes.id) {
184
+ _context3.next = 6;
189
185
  break;
190
186
  }
191
187
  _context3.next = 3;
192
188
  return _this.update(_this.attributes);
193
189
  case 3:
194
- newObject = _context3.sent;
195
- _this.attributes = _objectSpread({}, newObject.attributes);
196
- return _context3.abrupt("return", true);
197
- case 8:
198
- _context3.next = 10;
199
- return BundleNotification.create(_this.attributes, _this.options);
200
- case 10:
201
190
  _newObject = _context3.sent;
202
191
  _this.attributes = _objectSpread({}, _newObject.attributes);
203
192
  return _context3.abrupt("return", true);
204
- case 13:
193
+ case 6:
194
+ _context3.next = 8;
195
+ return BundleNotification.create(_this.attributes, _this.options);
196
+ case 8:
197
+ newObject = _context3.sent;
198
+ _this.attributes = _objectSpread({}, newObject.attributes);
199
+ return _context3.abrupt("return", true);
200
+ case 11:
205
201
  case "end":
206
202
  return _context3.stop();
207
203
  }
@@ -237,20 +233,20 @@ _class = BundleNotification;
237
233
  case 0:
238
234
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
239
235
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
240
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
236
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
241
237
  _context4.next = 4;
242
238
  break;
243
239
  }
244
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
240
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
245
241
  case 4:
246
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
242
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
247
243
  _context4.next = 6;
248
244
  break;
249
245
  }
250
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
246
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
251
247
  case 6:
252
248
  _context4.next = 8;
253
- return _Api.default.sendRequest("/bundle_notifications", 'GET', params, options);
249
+ return _Api.default.sendRequest('/bundle_notifications', 'GET', params, options);
254
250
  case 8:
255
251
  response = _context4.sent;
256
252
  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) {
@@ -286,21 +282,21 @@ _class = BundleNotification;
286
282
  }
287
283
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
288
284
  case 4:
289
- params['id'] = id;
290
- if (params['id']) {
285
+ params.id = id;
286
+ if (params.id) {
291
287
  _context5.next = 7;
292
288
  break;
293
289
  }
294
290
  throw new errors.MissingParameterError('Parameter missing: id');
295
291
  case 7:
296
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
292
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
297
293
  _context5.next = 9;
298
294
  break;
299
295
  }
300
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
296
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
301
297
  case 9:
302
298
  _context5.next = 11;
303
- return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
299
+ return _Api.default.sendRequest("/bundle_notifications/".concat(encodeURIComponent(params.id)), 'GET', params, options);
304
300
  case 11:
305
301
  response = _context5.sent;
306
302
  return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -334,26 +330,26 @@ _class = BundleNotification;
334
330
  case 0:
335
331
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
336
332
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
337
- if (params['bundle_id']) {
333
+ if (params.bundle_id) {
338
334
  _context6.next = 4;
339
335
  break;
340
336
  }
341
337
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
342
338
  case 4:
343
- if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
339
+ if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
344
340
  _context6.next = 6;
345
341
  break;
346
342
  }
347
- throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
343
+ throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
348
344
  case 6:
349
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
345
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
350
346
  _context6.next = 8;
351
347
  break;
352
348
  }
353
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
349
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
354
350
  case 8:
355
351
  _context6.next = 10;
356
- return _Api.default.sendRequest("/bundle_notifications", 'POST', params, options);
352
+ return _Api.default.sendRequest('/bundle_notifications', 'POST', params, options);
357
353
  case 10:
358
354
  response = _context6.sent;
359
355
  return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -87,7 +87,7 @@ var BundleRecipient = /*#__PURE__*/(0, _createClass2.default)(function BundleRec
87
87
  return _regenerator.default.wrap(function _callee$(_context) {
88
88
  while (1) switch (_context.prev = _context.next) {
89
89
  case 0:
90
- if (!_this.attributes['id']) {
90
+ if (!_this.attributes.id) {
91
91
  _context.next = 4;
92
92
  break;
93
93
  }
@@ -136,32 +136,32 @@ _class = BundleRecipient;
136
136
  case 0:
137
137
  params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
138
138
  options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
139
- if (params['bundle_id']) {
139
+ if (params.bundle_id) {
140
140
  _context2.next = 4;
141
141
  break;
142
142
  }
143
143
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
144
144
  case 4:
145
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
145
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
146
146
  _context2.next = 6;
147
147
  break;
148
148
  }
149
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
149
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
150
150
  case 6:
151
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
151
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
152
152
  _context2.next = 8;
153
153
  break;
154
154
  }
155
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
155
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
156
156
  case 8:
157
- if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
157
+ if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
158
158
  _context2.next = 10;
159
159
  break;
160
160
  }
161
- throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
161
+ throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
162
162
  case 10:
163
163
  _context2.next = 12;
164
- return _Api.default.sendRequest("/bundle_recipients", 'GET', params, options);
164
+ return _Api.default.sendRequest('/bundle_recipients', 'GET', params, options);
165
165
  case 12:
166
166
  response = _context2.sent;
167
167
  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) {
@@ -195,50 +195,50 @@ _class = BundleRecipient;
195
195
  case 0:
196
196
  params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
197
197
  options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
198
- if (params['bundle_id']) {
198
+ if (params.bundle_id) {
199
199
  _context3.next = 4;
200
200
  break;
201
201
  }
202
202
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
203
203
  case 4:
204
- if (params['recipient']) {
204
+ if (params.recipient) {
205
205
  _context3.next = 6;
206
206
  break;
207
207
  }
208
208
  throw new errors.MissingParameterError('Parameter missing: recipient');
209
209
  case 6:
210
- if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
210
+ if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
211
211
  _context3.next = 8;
212
212
  break;
213
213
  }
214
- throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
214
+ throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
215
215
  case 8:
216
- if (!(params['recipient'] && !(0, _utils.isString)(params['recipient']))) {
216
+ if (!(params.recipient && !(0, _utils.isString)(params.recipient))) {
217
217
  _context3.next = 10;
218
218
  break;
219
219
  }
220
- throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params['recipient'])));
220
+ throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params.recipient)));
221
221
  case 10:
222
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
222
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
223
223
  _context3.next = 12;
224
224
  break;
225
225
  }
226
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
226
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
227
227
  case 12:
228
- if (!(params['company'] && !(0, _utils.isString)(params['company']))) {
228
+ if (!(params.company && !(0, _utils.isString)(params.company))) {
229
229
  _context3.next = 14;
230
230
  break;
231
231
  }
232
- throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params['company'])));
232
+ throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
233
233
  case 14:
234
- if (!(params['note'] && !(0, _utils.isString)(params['note']))) {
234
+ if (!(params.note && !(0, _utils.isString)(params.note))) {
235
235
  _context3.next = 16;
236
236
  break;
237
237
  }
238
- throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params['note'])));
238
+ throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params.note)));
239
239
  case 16:
240
240
  _context3.next = 18;
241
- return _Api.default.sendRequest("/bundle_recipients", 'POST', params, options);
241
+ return _Api.default.sendRequest('/bundle_recipients', 'POST', params, options);
242
242
  case 18:
243
243
  response = _context3.sent;
244
244
  return _context3.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -114,26 +114,26 @@ _class = BundleRegistration;
114
114
  case 0:
115
115
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
116
116
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
117
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
117
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
118
118
  _context.next = 4;
119
119
  break;
120
120
  }
121
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
121
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
122
122
  case 4:
123
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
123
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
124
124
  _context.next = 6;
125
125
  break;
126
126
  }
127
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
127
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
128
128
  case 6:
129
- if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
129
+ if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
130
130
  _context.next = 8;
131
131
  break;
132
132
  }
133
- throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
133
+ throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
134
134
  case 8:
135
135
  _context.next = 10;
136
- return _Api.default.sendRequest("/bundle_registrations", 'GET', params, options);
136
+ return _Api.default.sendRequest('/bundle_registrations', 'GET', params, options);
137
137
  case 10:
138
138
  response = _context.sent;
139
139
  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) {
@@ -102,43 +102,43 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
102
102
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
103
103
  case 5:
104
104
  params.id = _this.attributes.id;
105
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
105
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
106
106
  _context.next = 8;
107
107
  break;
108
108
  }
109
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
109
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
110
110
  case 8:
111
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
111
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
112
112
  _context.next = 10;
113
113
  break;
114
114
  }
115
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
115
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
116
116
  case 10:
117
- if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
117
+ if (!(params.body && !(0, _utils.isString)(params.body))) {
118
118
  _context.next = 12;
119
119
  break;
120
120
  }
121
- throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params['body'])));
121
+ throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
122
122
  case 12:
123
- if (!(params['use_with_bundles'] && !(0, _utils.isString)(params['use_with_bundles']))) {
123
+ if (!(params.use_with_bundles && !(0, _utils.isString)(params.use_with_bundles))) {
124
124
  _context.next = 14;
125
125
  break;
126
126
  }
127
- throw new errors.InvalidParameterError("Bad parameter: use_with_bundles must be of type String, received ".concat((0, _utils.getType)(params['use_with_bundles'])));
127
+ throw new errors.InvalidParameterError("Bad parameter: use_with_bundles must be of type String, received ".concat((0, _utils.getType)(params.use_with_bundles)));
128
128
  case 14:
129
- if (!(params['use_with_inboxes'] && !(0, _utils.isString)(params['use_with_inboxes']))) {
129
+ if (!(params.use_with_inboxes && !(0, _utils.isString)(params.use_with_inboxes))) {
130
130
  _context.next = 16;
131
131
  break;
132
132
  }
133
- throw new errors.InvalidParameterError("Bad parameter: use_with_inboxes must be of type String, received ".concat((0, _utils.getType)(params['use_with_inboxes'])));
133
+ throw new errors.InvalidParameterError("Bad parameter: use_with_inboxes must be of type String, received ".concat((0, _utils.getType)(params.use_with_inboxes)));
134
134
  case 16:
135
- if (!(params['use_with_users'] && !(0, _utils.isString)(params['use_with_users']))) {
135
+ if (!(params.use_with_users && !(0, _utils.isString)(params.use_with_users))) {
136
136
  _context.next = 18;
137
137
  break;
138
138
  }
139
- throw new errors.InvalidParameterError("Bad parameter: use_with_users must be of type String, received ".concat((0, _utils.getType)(params['use_with_users'])));
139
+ throw new errors.InvalidParameterError("Bad parameter: use_with_users must be of type String, received ".concat((0, _utils.getType)(params.use_with_users)));
140
140
  case 18:
141
- if (params['id']) {
141
+ if (params.id) {
142
142
  _context.next = 24;
143
143
  break;
144
144
  }
@@ -146,14 +146,14 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
146
146
  _context.next = 23;
147
147
  break;
148
148
  }
149
- params['id'] = _this.id;
149
+ params.id = _this.id;
150
150
  _context.next = 24;
151
151
  break;
152
152
  case 23:
153
153
  throw new errors.MissingParameterError('Parameter missing: id');
154
154
  case 24:
155
155
  _context.next = 26;
156
- return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
156
+ return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
157
157
  case 26:
158
158
  response = _context.sent;
159
159
  return _context.abrupt("return", new Clickwrap(response === null || response === void 0 ? void 0 : response.data, _this.options));
@@ -165,7 +165,6 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
165
165
  })));
166
166
  (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
167
167
  var params,
168
- response,
169
168
  _args2 = arguments;
170
169
  return _regenerator.default.wrap(function _callee2$(_context2) {
171
170
  while (1) switch (_context2.prev = _context2.next) {
@@ -184,13 +183,13 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
184
183
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
185
184
  case 5:
186
185
  params.id = _this.attributes.id;
187
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
186
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
188
187
  _context2.next = 8;
189
188
  break;
190
189
  }
191
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
190
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
192
191
  case 8:
193
- if (params['id']) {
192
+ if (params.id) {
194
193
  _context2.next = 14;
195
194
  break;
196
195
  }
@@ -198,18 +197,15 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
198
197
  _context2.next = 13;
199
198
  break;
200
199
  }
201
- params['id'] = _this.id;
200
+ params.id = _this.id;
202
201
  _context2.next = 14;
203
202
  break;
204
203
  case 13:
205
204
  throw new errors.MissingParameterError('Parameter missing: id');
206
205
  case 14:
207
206
  _context2.next = 16;
208
- return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
207
+ return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
209
208
  case 16:
210
- response = _context2.sent;
211
- return _context2.abrupt("return");
212
- case 18:
213
209
  case "end":
214
210
  return _context2.stop();
215
211
  }
@@ -220,28 +216,28 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
220
216
  return _this.delete(params);
221
217
  });
222
218
  (0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
223
- var newObject, _newObject;
219
+ var _newObject, newObject;
224
220
  return _regenerator.default.wrap(function _callee3$(_context3) {
225
221
  while (1) switch (_context3.prev = _context3.next) {
226
222
  case 0:
227
- if (!_this.attributes['id']) {
228
- _context3.next = 8;
223
+ if (!_this.attributes.id) {
224
+ _context3.next = 6;
229
225
  break;
230
226
  }
231
227
  _context3.next = 3;
232
228
  return _this.update(_this.attributes);
233
229
  case 3:
234
- newObject = _context3.sent;
235
- _this.attributes = _objectSpread({}, newObject.attributes);
236
- return _context3.abrupt("return", true);
237
- case 8:
238
- _context3.next = 10;
239
- return Clickwrap.create(_this.attributes, _this.options);
240
- case 10:
241
230
  _newObject = _context3.sent;
242
231
  _this.attributes = _objectSpread({}, _newObject.attributes);
243
232
  return _context3.abrupt("return", true);
244
- case 13:
233
+ case 6:
234
+ _context3.next = 8;
235
+ return Clickwrap.create(_this.attributes, _this.options);
236
+ case 8:
237
+ newObject = _context3.sent;
238
+ _this.attributes = _objectSpread({}, newObject.attributes);
239
+ return _context3.abrupt("return", true);
240
+ case 11:
245
241
  case "end":
246
242
  return _context3.stop();
247
243
  }
@@ -275,20 +271,20 @@ _class = Clickwrap;
275
271
  case 0:
276
272
  params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
277
273
  options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
278
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
274
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
279
275
  _context4.next = 4;
280
276
  break;
281
277
  }
282
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
278
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
283
279
  case 4:
284
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
280
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
285
281
  _context4.next = 6;
286
282
  break;
287
283
  }
288
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
284
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
289
285
  case 6:
290
286
  _context4.next = 8;
291
- return _Api.default.sendRequest("/clickwraps", 'GET', params, options);
287
+ return _Api.default.sendRequest('/clickwraps', 'GET', params, options);
292
288
  case 8:
293
289
  response = _context4.sent;
294
290
  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) {
@@ -324,21 +320,21 @@ _class = Clickwrap;
324
320
  }
325
321
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
326
322
  case 4:
327
- params['id'] = id;
328
- if (params['id']) {
323
+ params.id = id;
324
+ if (params.id) {
329
325
  _context5.next = 7;
330
326
  break;
331
327
  }
332
328
  throw new errors.MissingParameterError('Parameter missing: id');
333
329
  case 7:
334
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
330
+ if (!(params.id && !(0, _utils.isInt)(params.id))) {
335
331
  _context5.next = 9;
336
332
  break;
337
333
  }
338
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
334
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
339
335
  case 9:
340
336
  _context5.next = 11;
341
- return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
337
+ return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params.id)), 'GET', params, options);
342
338
  case 11:
343
339
  response = _context5.sent;
344
340
  return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
@@ -373,38 +369,38 @@ _class = Clickwrap;
373
369
  case 0:
374
370
  params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
375
371
  options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
376
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
372
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
377
373
  _context6.next = 4;
378
374
  break;
379
375
  }
380
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
376
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
381
377
  case 4:
382
- if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
378
+ if (!(params.body && !(0, _utils.isString)(params.body))) {
383
379
  _context6.next = 6;
384
380
  break;
385
381
  }
386
- throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params['body'])));
382
+ throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
387
383
  case 6:
388
- if (!(params['use_with_bundles'] && !(0, _utils.isString)(params['use_with_bundles']))) {
384
+ if (!(params.use_with_bundles && !(0, _utils.isString)(params.use_with_bundles))) {
389
385
  _context6.next = 8;
390
386
  break;
391
387
  }
392
- throw new errors.InvalidParameterError("Bad parameter: use_with_bundles must be of type String, received ".concat((0, _utils.getType)(params['use_with_bundles'])));
388
+ throw new errors.InvalidParameterError("Bad parameter: use_with_bundles must be of type String, received ".concat((0, _utils.getType)(params.use_with_bundles)));
393
389
  case 8:
394
- if (!(params['use_with_inboxes'] && !(0, _utils.isString)(params['use_with_inboxes']))) {
390
+ if (!(params.use_with_inboxes && !(0, _utils.isString)(params.use_with_inboxes))) {
395
391
  _context6.next = 10;
396
392
  break;
397
393
  }
398
- throw new errors.InvalidParameterError("Bad parameter: use_with_inboxes must be of type String, received ".concat((0, _utils.getType)(params['use_with_inboxes'])));
394
+ throw new errors.InvalidParameterError("Bad parameter: use_with_inboxes must be of type String, received ".concat((0, _utils.getType)(params.use_with_inboxes)));
399
395
  case 10:
400
- if (!(params['use_with_users'] && !(0, _utils.isString)(params['use_with_users']))) {
396
+ if (!(params.use_with_users && !(0, _utils.isString)(params.use_with_users))) {
401
397
  _context6.next = 12;
402
398
  break;
403
399
  }
404
- throw new errors.InvalidParameterError("Bad parameter: use_with_users must be of type String, received ".concat((0, _utils.getType)(params['use_with_users'])));
400
+ throw new errors.InvalidParameterError("Bad parameter: use_with_users must be of type String, received ".concat((0, _utils.getType)(params.use_with_users)));
405
401
  case 12:
406
402
  _context6.next = 14;
407
- return _Api.default.sendRequest("/clickwraps", 'POST', params, options);
403
+ return _Api.default.sendRequest('/clickwraps', 'POST', params, options);
408
404
  case 14:
409
405
  response = _context6.sent;
410
406
  return _context6.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));