files.com 1.0.235 → 1.0.237

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 (77) hide show
  1. package/_VERSION +1 -1
  2. package/docs/models/Bundle.md +9 -2
  3. package/docs/models/BundleNotification.md +35 -0
  4. package/docs/models/BundleRegistration.md +3 -1
  5. package/docs/models/InboxRegistration.md +3 -1
  6. package/docs/models/Site.md +2 -0
  7. package/lib/Api.js +153 -159
  8. package/lib/isomorphic/File.node.js +24 -28
  9. package/lib/models/ActionNotificationExport.js +97 -101
  10. package/lib/models/ActionNotificationExportResult.js +44 -46
  11. package/lib/models/ActionWebhookFailure.js +42 -44
  12. package/lib/models/ApiKey.js +271 -287
  13. package/lib/models/App.js +26 -28
  14. package/lib/models/As2IncomingMessage.js +32 -34
  15. package/lib/models/As2OutgoingMessage.js +32 -34
  16. package/lib/models/As2Partner.js +231 -241
  17. package/lib/models/As2Station.js +219 -229
  18. package/lib/models/Automation.js +333 -343
  19. package/lib/models/AutomationRun.js +75 -79
  20. package/lib/models/BandwidthSnapshot.js +26 -28
  21. package/lib/models/Behavior.js +323 -337
  22. package/lib/models/Bundle.js +381 -387
  23. package/lib/models/BundleDownload.js +38 -40
  24. package/lib/models/BundleNotification.js +223 -173
  25. package/lib/models/BundleRecipient.js +104 -108
  26. package/lib/models/BundleRegistration.js +41 -40
  27. package/lib/models/Clickwrap.js +213 -223
  28. package/lib/models/DnsRecord.js +26 -28
  29. package/lib/models/ExternalEvent.js +93 -99
  30. package/lib/models/File.js +726 -766
  31. package/lib/models/FileComment.js +180 -188
  32. package/lib/models/FileCommentReaction.js +84 -88
  33. package/lib/models/FileMigration.js +31 -33
  34. package/lib/models/Folder.js +94 -98
  35. package/lib/models/FormFieldSet.js +189 -199
  36. package/lib/models/Group.js +207 -217
  37. package/lib/models/GroupUser.js +230 -238
  38. package/lib/models/History.js +266 -276
  39. package/lib/models/HistoryExport.js +175 -179
  40. package/lib/models/HistoryExportResult.js +44 -46
  41. package/lib/models/InboxRecipient.js +104 -108
  42. package/lib/models/InboxRegistration.js +35 -34
  43. package/lib/models/InboxUpload.js +38 -40
  44. package/lib/models/Invoice.js +57 -61
  45. package/lib/models/IpAddress.js +78 -84
  46. package/lib/models/Lock.js +148 -154
  47. package/lib/models/Message.js +267 -277
  48. package/lib/models/MessageComment.js +207 -217
  49. package/lib/models/MessageCommentReaction.js +147 -155
  50. package/lib/models/MessageReaction.js +147 -155
  51. package/lib/models/Notification.js +255 -265
  52. package/lib/models/Payment.js +57 -61
  53. package/lib/models/Permission.js +128 -134
  54. package/lib/models/Priority.js +45 -47
  55. package/lib/models/Project.js +183 -193
  56. package/lib/models/PublicKey.js +207 -217
  57. package/lib/models/RemoteBandwidthSnapshot.js +26 -28
  58. package/lib/models/RemoteServer.js +805 -819
  59. package/lib/models/Request.js +166 -174
  60. package/lib/models/Session.js +47 -51
  61. package/lib/models/SettingsChange.js +26 -28
  62. package/lib/models/SftpHostKey.js +177 -187
  63. package/lib/models/Site.js +415 -418
  64. package/lib/models/SsoStrategy.js +99 -105
  65. package/lib/models/Style.js +127 -133
  66. package/lib/models/UsageDailySnapshot.js +26 -28
  67. package/lib/models/UsageSnapshot.js +26 -28
  68. package/lib/models/User.js +587 -603
  69. package/lib/models/UserCipherUse.js +32 -34
  70. package/lib/models/UserRequest.js +147 -155
  71. package/lib/models/WebhookTest.js +54 -56
  72. package/package.json +1 -1
  73. package/src/models/Bundle.js +10 -1
  74. package/src/models/BundleNotification.js +39 -1
  75. package/src/models/BundleRegistration.js +3 -0
  76. package/src/models/InboxRegistration.js +3 -0
  77. package/src/models/Site.js +3 -0
@@ -72,82 +72,80 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
72
72
  response,
73
73
  _args = arguments;
74
74
  return _regenerator.default.wrap(function _callee$(_context) {
75
- while (1) {
76
- switch (_context.prev = _context.next) {
77
- case 0:
78
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
79
- if (_this.attributes.id) {
80
- _context.next = 3;
81
- break;
82
- }
83
- throw new errors.EmptyPropertyError('Current object has no id');
84
- case 3:
85
- if ((0, _utils.isObject)(params)) {
86
- _context.next = 5;
87
- break;
88
- }
89
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
90
- case 5:
91
- params.id = _this.attributes.id;
92
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
93
- _context.next = 8;
94
- break;
95
- }
96
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
97
- case 8:
98
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
99
- _context.next = 10;
100
- break;
101
- }
102
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
103
- case 10:
104
- if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
105
- _context.next = 12;
106
- break;
107
- }
108
- throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(body)));
109
- case 12:
110
- if (!(params['use_with_bundles'] && !(0, _utils.isString)(params['use_with_bundles']))) {
111
- _context.next = 14;
112
- break;
113
- }
114
- throw new errors.InvalidParameterError("Bad parameter: use_with_bundles must be of type String, received ".concat((0, _utils.getType)(use_with_bundles)));
115
- case 14:
116
- if (!(params['use_with_inboxes'] && !(0, _utils.isString)(params['use_with_inboxes']))) {
117
- _context.next = 16;
118
- break;
119
- }
120
- throw new errors.InvalidParameterError("Bad parameter: use_with_inboxes must be of type String, received ".concat((0, _utils.getType)(use_with_inboxes)));
121
- case 16:
122
- if (!(params['use_with_users'] && !(0, _utils.isString)(params['use_with_users']))) {
123
- _context.next = 18;
124
- break;
125
- }
126
- throw new errors.InvalidParameterError("Bad parameter: use_with_users must be of type String, received ".concat((0, _utils.getType)(use_with_users)));
127
- case 18:
128
- if (params['id']) {
129
- _context.next = 24;
130
- break;
131
- }
132
- if (!_this.attributes.id) {
133
- _context.next = 23;
134
- break;
135
- }
136
- params['id'] = _this.id;
75
+ while (1) switch (_context.prev = _context.next) {
76
+ case 0:
77
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
78
+ if (_this.attributes.id) {
79
+ _context.next = 3;
80
+ break;
81
+ }
82
+ throw new errors.EmptyPropertyError('Current object has no id');
83
+ case 3:
84
+ if ((0, _utils.isObject)(params)) {
85
+ _context.next = 5;
86
+ break;
87
+ }
88
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
89
+ case 5:
90
+ params.id = _this.attributes.id;
91
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
92
+ _context.next = 8;
93
+ break;
94
+ }
95
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
96
+ case 8:
97
+ if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
98
+ _context.next = 10;
99
+ break;
100
+ }
101
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
102
+ case 10:
103
+ if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
104
+ _context.next = 12;
105
+ break;
106
+ }
107
+ throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(body)));
108
+ case 12:
109
+ if (!(params['use_with_bundles'] && !(0, _utils.isString)(params['use_with_bundles']))) {
110
+ _context.next = 14;
111
+ break;
112
+ }
113
+ throw new errors.InvalidParameterError("Bad parameter: use_with_bundles must be of type String, received ".concat((0, _utils.getType)(use_with_bundles)));
114
+ case 14:
115
+ if (!(params['use_with_inboxes'] && !(0, _utils.isString)(params['use_with_inboxes']))) {
116
+ _context.next = 16;
117
+ break;
118
+ }
119
+ throw new errors.InvalidParameterError("Bad parameter: use_with_inboxes must be of type String, received ".concat((0, _utils.getType)(use_with_inboxes)));
120
+ case 16:
121
+ if (!(params['use_with_users'] && !(0, _utils.isString)(params['use_with_users']))) {
122
+ _context.next = 18;
123
+ break;
124
+ }
125
+ throw new errors.InvalidParameterError("Bad parameter: use_with_users must be of type String, received ".concat((0, _utils.getType)(use_with_users)));
126
+ case 18:
127
+ if (params['id']) {
137
128
  _context.next = 24;
138
129
  break;
139
- case 23:
140
- throw new errors.MissingParameterError('Parameter missing: id');
141
- case 24:
142
- _context.next = 26;
143
- return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
144
- case 26:
145
- response = _context.sent;
146
- return _context.abrupt("return", new Clickwrap(response === null || response === void 0 ? void 0 : response.data, _this.options));
147
- case 28:
148
- case "end":
149
- return _context.stop();
150
- }
130
+ }
131
+ if (!_this.attributes.id) {
132
+ _context.next = 23;
133
+ break;
134
+ }
135
+ params['id'] = _this.id;
136
+ _context.next = 24;
137
+ break;
138
+ case 23:
139
+ throw new errors.MissingParameterError('Parameter missing: id');
140
+ case 24:
141
+ _context.next = 26;
142
+ return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
143
+ case 26:
144
+ response = _context.sent;
145
+ return _context.abrupt("return", new Clickwrap(response === null || response === void 0 ? void 0 : response.data, _this.options));
146
+ case 28:
147
+ case "end":
148
+ return _context.stop();
151
149
  }
152
150
  }, _callee);
153
151
  })));
@@ -156,52 +154,50 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
156
154
  response,
157
155
  _args2 = arguments;
158
156
  return _regenerator.default.wrap(function _callee2$(_context2) {
159
- while (1) {
160
- switch (_context2.prev = _context2.next) {
161
- case 0:
162
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
163
- if (_this.attributes.id) {
164
- _context2.next = 3;
165
- break;
166
- }
167
- throw new errors.EmptyPropertyError('Current object has no id');
168
- case 3:
169
- if ((0, _utils.isObject)(params)) {
170
- _context2.next = 5;
171
- break;
172
- }
173
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
174
- case 5:
175
- params.id = _this.attributes.id;
176
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
177
- _context2.next = 8;
178
- break;
179
- }
180
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
181
- case 8:
182
- if (params['id']) {
183
- _context2.next = 14;
184
- break;
185
- }
186
- if (!_this.attributes.id) {
187
- _context2.next = 13;
188
- break;
189
- }
190
- params['id'] = _this.id;
157
+ while (1) switch (_context2.prev = _context2.next) {
158
+ case 0:
159
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
160
+ if (_this.attributes.id) {
161
+ _context2.next = 3;
162
+ break;
163
+ }
164
+ throw new errors.EmptyPropertyError('Current object has no id');
165
+ case 3:
166
+ if ((0, _utils.isObject)(params)) {
167
+ _context2.next = 5;
168
+ break;
169
+ }
170
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
171
+ case 5:
172
+ params.id = _this.attributes.id;
173
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
174
+ _context2.next = 8;
175
+ break;
176
+ }
177
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
178
+ case 8:
179
+ if (params['id']) {
191
180
  _context2.next = 14;
192
181
  break;
193
- case 13:
194
- throw new errors.MissingParameterError('Parameter missing: id');
195
- case 14:
196
- _context2.next = 16;
197
- return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
198
- case 16:
199
- response = _context2.sent;
200
- return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
201
- case 18:
202
- case "end":
203
- return _context2.stop();
204
- }
182
+ }
183
+ if (!_this.attributes.id) {
184
+ _context2.next = 13;
185
+ break;
186
+ }
187
+ params['id'] = _this.id;
188
+ _context2.next = 14;
189
+ break;
190
+ case 13:
191
+ throw new errors.MissingParameterError('Parameter missing: id');
192
+ case 14:
193
+ _context2.next = 16;
194
+ return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
195
+ case 16:
196
+ response = _context2.sent;
197
+ return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
198
+ case 18:
199
+ case "end":
200
+ return _context2.stop();
205
201
  }
206
202
  }, _callee2);
207
203
  })));
@@ -238,34 +234,32 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
238
234
  response,
239
235
  _args3 = arguments;
240
236
  return _regenerator.default.wrap(function _callee3$(_context3) {
241
- while (1) {
242
- switch (_context3.prev = _context3.next) {
243
- case 0:
244
- params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
245
- options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
246
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
247
- _context3.next = 4;
248
- break;
249
- }
250
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
251
- case 4:
252
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
253
- _context3.next = 6;
254
- break;
255
- }
256
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
257
- case 6:
258
- _context3.next = 8;
259
- return _Api.default.sendRequest("/clickwraps", 'GET', params, options);
260
- case 8:
261
- response = _context3.sent;
262
- return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
263
- return new Clickwrap(obj, options);
264
- })) || []);
265
- case 10:
266
- case "end":
267
- return _context3.stop();
268
- }
237
+ while (1) switch (_context3.prev = _context3.next) {
238
+ case 0:
239
+ params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
240
+ options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
241
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
242
+ _context3.next = 4;
243
+ break;
244
+ }
245
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
246
+ case 4:
247
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
248
+ _context3.next = 6;
249
+ break;
250
+ }
251
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
252
+ case 6:
253
+ _context3.next = 8;
254
+ return _Api.default.sendRequest("/clickwraps", 'GET', params, options);
255
+ case 8:
256
+ response = _context3.sent;
257
+ return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
258
+ return new Clickwrap(obj, options);
259
+ })) || []);
260
+ case 10:
261
+ case "end":
262
+ return _context3.stop();
269
263
  }
270
264
  }, _callee3);
271
265
  })));
@@ -281,39 +275,37 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
281
275
  response,
282
276
  _args4 = arguments;
283
277
  return _regenerator.default.wrap(function _callee4$(_context4) {
284
- while (1) {
285
- switch (_context4.prev = _context4.next) {
286
- case 0:
287
- params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
288
- options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
289
- if ((0, _utils.isObject)(params)) {
290
- _context4.next = 4;
291
- break;
292
- }
293
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
294
- case 4:
295
- params['id'] = id;
296
- if (params['id']) {
297
- _context4.next = 7;
298
- break;
299
- }
300
- throw new errors.MissingParameterError('Parameter missing: id');
301
- case 7:
302
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
303
- _context4.next = 9;
304
- break;
305
- }
306
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
307
- case 9:
308
- _context4.next = 11;
309
- return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
310
- case 11:
311
- response = _context4.sent;
312
- return _context4.abrupt("return", new Clickwrap(response === null || response === void 0 ? void 0 : response.data, options));
313
- case 13:
314
- case "end":
315
- return _context4.stop();
316
- }
278
+ while (1) switch (_context4.prev = _context4.next) {
279
+ case 0:
280
+ params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
281
+ options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
282
+ if ((0, _utils.isObject)(params)) {
283
+ _context4.next = 4;
284
+ break;
285
+ }
286
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
287
+ case 4:
288
+ params['id'] = id;
289
+ if (params['id']) {
290
+ _context4.next = 7;
291
+ break;
292
+ }
293
+ throw new errors.MissingParameterError('Parameter missing: id');
294
+ case 7:
295
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
296
+ _context4.next = 9;
297
+ break;
298
+ }
299
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
300
+ case 9:
301
+ _context4.next = 11;
302
+ return _Api.default.sendRequest("/clickwraps/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
303
+ case 11:
304
+ response = _context4.sent;
305
+ return _context4.abrupt("return", new Clickwrap(response === null || response === void 0 ? void 0 : response.data, options));
306
+ case 13:
307
+ case "end":
308
+ return _context4.stop();
317
309
  }
318
310
  }, _callee4);
319
311
  }));
@@ -332,50 +324,48 @@ var Clickwrap = /*#__PURE__*/(0, _createClass2.default)(function Clickwrap() {
332
324
  response,
333
325
  _args5 = arguments;
334
326
  return _regenerator.default.wrap(function _callee5$(_context5) {
335
- while (1) {
336
- switch (_context5.prev = _context5.next) {
337
- case 0:
338
- params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
339
- options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
340
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
341
- _context5.next = 4;
342
- break;
343
- }
344
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
345
- case 4:
346
- if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
347
- _context5.next = 6;
348
- break;
349
- }
350
- throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params['body'])));
351
- case 6:
352
- if (!(params['use_with_bundles'] && !(0, _utils.isString)(params['use_with_bundles']))) {
353
- _context5.next = 8;
354
- break;
355
- }
356
- throw new errors.InvalidParameterError("Bad parameter: use_with_bundles must be of type String, received ".concat((0, _utils.getType)(params['use_with_bundles'])));
357
- case 8:
358
- if (!(params['use_with_inboxes'] && !(0, _utils.isString)(params['use_with_inboxes']))) {
359
- _context5.next = 10;
360
- break;
361
- }
362
- throw new errors.InvalidParameterError("Bad parameter: use_with_inboxes must be of type String, received ".concat((0, _utils.getType)(params['use_with_inboxes'])));
363
- case 10:
364
- if (!(params['use_with_users'] && !(0, _utils.isString)(params['use_with_users']))) {
365
- _context5.next = 12;
366
- break;
367
- }
368
- throw new errors.InvalidParameterError("Bad parameter: use_with_users must be of type String, received ".concat((0, _utils.getType)(params['use_with_users'])));
369
- case 12:
370
- _context5.next = 14;
371
- return _Api.default.sendRequest("/clickwraps", 'POST', params, options);
372
- case 14:
373
- response = _context5.sent;
374
- return _context5.abrupt("return", new Clickwrap(response === null || response === void 0 ? void 0 : response.data, options));
375
- case 16:
376
- case "end":
377
- return _context5.stop();
378
- }
327
+ while (1) switch (_context5.prev = _context5.next) {
328
+ case 0:
329
+ params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
330
+ options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
331
+ if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
332
+ _context5.next = 4;
333
+ break;
334
+ }
335
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
336
+ case 4:
337
+ if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
338
+ _context5.next = 6;
339
+ break;
340
+ }
341
+ throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params['body'])));
342
+ case 6:
343
+ if (!(params['use_with_bundles'] && !(0, _utils.isString)(params['use_with_bundles']))) {
344
+ _context5.next = 8;
345
+ break;
346
+ }
347
+ throw new errors.InvalidParameterError("Bad parameter: use_with_bundles must be of type String, received ".concat((0, _utils.getType)(params['use_with_bundles'])));
348
+ case 8:
349
+ if (!(params['use_with_inboxes'] && !(0, _utils.isString)(params['use_with_inboxes']))) {
350
+ _context5.next = 10;
351
+ break;
352
+ }
353
+ throw new errors.InvalidParameterError("Bad parameter: use_with_inboxes must be of type String, received ".concat((0, _utils.getType)(params['use_with_inboxes'])));
354
+ case 10:
355
+ if (!(params['use_with_users'] && !(0, _utils.isString)(params['use_with_users']))) {
356
+ _context5.next = 12;
357
+ break;
358
+ }
359
+ throw new errors.InvalidParameterError("Bad parameter: use_with_users must be of type String, received ".concat((0, _utils.getType)(params['use_with_users'])));
360
+ case 12:
361
+ _context5.next = 14;
362
+ return _Api.default.sendRequest("/clickwraps", 'POST', params, options);
363
+ case 14:
364
+ response = _context5.sent;
365
+ return _context5.abrupt("return", new Clickwrap(response === null || response === void 0 ? void 0 : response.data, options));
366
+ case 16:
367
+ case "end":
368
+ return _context5.stop();
379
369
  }
380
370
  }, _callee5);
381
371
  })));
@@ -63,34 +63,32 @@ var DnsRecord = /*#__PURE__*/(0, _createClass2.default)(function DnsRecord() {
63
63
  response,
64
64
  _args = arguments;
65
65
  return _regenerator.default.wrap(function _callee$(_context) {
66
- while (1) {
67
- switch (_context.prev = _context.next) {
68
- case 0:
69
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
70
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
71
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
72
- _context.next = 4;
73
- break;
74
- }
75
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
76
- case 4:
77
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
78
- _context.next = 6;
79
- break;
80
- }
81
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
82
- case 6:
83
- _context.next = 8;
84
- return _Api.default.sendRequest("/dns_records", 'GET', params, options);
85
- case 8:
86
- response = _context.sent;
87
- return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
88
- return new DnsRecord(obj, options);
89
- })) || []);
90
- case 10:
91
- case "end":
92
- return _context.stop();
93
- }
66
+ while (1) switch (_context.prev = _context.next) {
67
+ case 0:
68
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
69
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
70
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
71
+ _context.next = 4;
72
+ break;
73
+ }
74
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
75
+ case 4:
76
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
77
+ _context.next = 6;
78
+ break;
79
+ }
80
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
81
+ case 6:
82
+ _context.next = 8;
83
+ return _Api.default.sendRequest("/dns_records", 'GET', params, options);
84
+ case 8:
85
+ response = _context.sent;
86
+ return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
87
+ return new DnsRecord(obj, options);
88
+ })) || []);
89
+ case 10:
90
+ case "end":
91
+ return _context.stop();
94
92
  }
95
93
  }, _callee);
96
94
  })));