files.com 1.0.236 → 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 (69) hide show
  1. package/_VERSION +1 -1
  2. package/docs/models/BundleNotification.md +35 -0
  3. package/lib/Api.js +153 -159
  4. package/lib/isomorphic/File.node.js +24 -28
  5. package/lib/models/ActionNotificationExport.js +97 -101
  6. package/lib/models/ActionNotificationExportResult.js +44 -46
  7. package/lib/models/ActionWebhookFailure.js +42 -44
  8. package/lib/models/ApiKey.js +271 -287
  9. package/lib/models/App.js +26 -28
  10. package/lib/models/As2IncomingMessage.js +32 -34
  11. package/lib/models/As2OutgoingMessage.js +32 -34
  12. package/lib/models/As2Partner.js +231 -241
  13. package/lib/models/As2Station.js +219 -229
  14. package/lib/models/Automation.js +333 -343
  15. package/lib/models/AutomationRun.js +75 -79
  16. package/lib/models/BandwidthSnapshot.js +26 -28
  17. package/lib/models/Behavior.js +323 -337
  18. package/lib/models/Bundle.js +375 -387
  19. package/lib/models/BundleDownload.js +38 -40
  20. package/lib/models/BundleNotification.js +223 -173
  21. package/lib/models/BundleRecipient.js +104 -108
  22. package/lib/models/BundleRegistration.js +38 -40
  23. package/lib/models/Clickwrap.js +213 -223
  24. package/lib/models/DnsRecord.js +26 -28
  25. package/lib/models/ExternalEvent.js +93 -99
  26. package/lib/models/File.js +726 -766
  27. package/lib/models/FileComment.js +180 -188
  28. package/lib/models/FileCommentReaction.js +84 -88
  29. package/lib/models/FileMigration.js +31 -33
  30. package/lib/models/Folder.js +94 -98
  31. package/lib/models/FormFieldSet.js +189 -199
  32. package/lib/models/Group.js +207 -217
  33. package/lib/models/GroupUser.js +230 -238
  34. package/lib/models/History.js +266 -276
  35. package/lib/models/HistoryExport.js +175 -179
  36. package/lib/models/HistoryExportResult.js +44 -46
  37. package/lib/models/InboxRecipient.js +104 -108
  38. package/lib/models/InboxRegistration.js +32 -34
  39. package/lib/models/InboxUpload.js +38 -40
  40. package/lib/models/Invoice.js +57 -61
  41. package/lib/models/IpAddress.js +78 -84
  42. package/lib/models/Lock.js +148 -154
  43. package/lib/models/Message.js +267 -277
  44. package/lib/models/MessageComment.js +207 -217
  45. package/lib/models/MessageCommentReaction.js +147 -155
  46. package/lib/models/MessageReaction.js +147 -155
  47. package/lib/models/Notification.js +255 -265
  48. package/lib/models/Payment.js +57 -61
  49. package/lib/models/Permission.js +128 -134
  50. package/lib/models/Priority.js +45 -47
  51. package/lib/models/Project.js +183 -193
  52. package/lib/models/PublicKey.js +207 -217
  53. package/lib/models/RemoteBandwidthSnapshot.js +26 -28
  54. package/lib/models/RemoteServer.js +805 -819
  55. package/lib/models/Request.js +166 -174
  56. package/lib/models/Session.js +47 -51
  57. package/lib/models/SettingsChange.js +26 -28
  58. package/lib/models/SftpHostKey.js +177 -187
  59. package/lib/models/Site.js +412 -418
  60. package/lib/models/SsoStrategy.js +99 -105
  61. package/lib/models/Style.js +127 -133
  62. package/lib/models/UsageDailySnapshot.js +26 -28
  63. package/lib/models/UsageSnapshot.js +26 -28
  64. package/lib/models/User.js +587 -603
  65. package/lib/models/UserCipherUse.js +32 -34
  66. package/lib/models/UserRequest.js +147 -155
  67. package/lib/models/WebhookTest.js +54 -56
  68. package/package.json +1 -1
  69. package/src/models/BundleNotification.js +39 -1
@@ -108,52 +108,50 @@ var InboxRecipient = /*#__PURE__*/(0, _createClass2.default)(function InboxRecip
108
108
  response,
109
109
  _args = arguments;
110
110
  return _regenerator.default.wrap(function _callee$(_context) {
111
- while (1) {
112
- switch (_context.prev = _context.next) {
113
- case 0:
114
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
115
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
116
- if (params['inbox_id']) {
117
- _context.next = 4;
118
- break;
119
- }
120
- throw new errors.MissingParameterError('Parameter missing: inbox_id');
121
- case 4:
122
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
123
- _context.next = 6;
124
- break;
125
- }
126
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
127
- case 6:
128
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
129
- _context.next = 8;
130
- break;
131
- }
132
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
133
- case 8:
134
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
135
- _context.next = 10;
136
- break;
137
- }
138
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
139
- case 10:
140
- if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
141
- _context.next = 12;
142
- break;
143
- }
144
- throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
145
- case 12:
146
- _context.next = 14;
147
- return _Api.default.sendRequest("/inbox_recipients", 'GET', params, options);
148
- case 14:
149
- response = _context.sent;
150
- 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) {
151
- return new InboxRecipient(obj, options);
152
- })) || []);
153
- case 16:
154
- case "end":
155
- return _context.stop();
156
- }
111
+ while (1) switch (_context.prev = _context.next) {
112
+ case 0:
113
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
114
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
115
+ if (params['inbox_id']) {
116
+ _context.next = 4;
117
+ break;
118
+ }
119
+ throw new errors.MissingParameterError('Parameter missing: inbox_id');
120
+ case 4:
121
+ if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
122
+ _context.next = 6;
123
+ break;
124
+ }
125
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
126
+ case 6:
127
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
128
+ _context.next = 8;
129
+ break;
130
+ }
131
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
132
+ case 8:
133
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
134
+ _context.next = 10;
135
+ break;
136
+ }
137
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
138
+ case 10:
139
+ if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
140
+ _context.next = 12;
141
+ break;
142
+ }
143
+ throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
144
+ case 12:
145
+ _context.next = 14;
146
+ return _Api.default.sendRequest("/inbox_recipients", 'GET', params, options);
147
+ case 14:
148
+ response = _context.sent;
149
+ 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) {
150
+ return new InboxRecipient(obj, options);
151
+ })) || []);
152
+ case 16:
153
+ case "end":
154
+ return _context.stop();
157
155
  }
158
156
  }, _callee);
159
157
  })));
@@ -168,68 +166,66 @@ var InboxRecipient = /*#__PURE__*/(0, _createClass2.default)(function InboxRecip
168
166
  response,
169
167
  _args2 = arguments;
170
168
  return _regenerator.default.wrap(function _callee2$(_context2) {
171
- while (1) {
172
- switch (_context2.prev = _context2.next) {
173
- case 0:
174
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
175
- options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
176
- if (params['inbox_id']) {
177
- _context2.next = 4;
178
- break;
179
- }
180
- throw new errors.MissingParameterError('Parameter missing: inbox_id');
181
- case 4:
182
- if (params['recipient']) {
183
- _context2.next = 6;
184
- break;
185
- }
186
- throw new errors.MissingParameterError('Parameter missing: recipient');
187
- case 6:
188
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
189
- _context2.next = 8;
190
- break;
191
- }
192
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
193
- case 8:
194
- if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
195
- _context2.next = 10;
196
- break;
197
- }
198
- throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
199
- case 10:
200
- if (!(params['recipient'] && !(0, _utils.isString)(params['recipient']))) {
201
- _context2.next = 12;
202
- break;
203
- }
204
- throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params['recipient'])));
205
- case 12:
206
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
207
- _context2.next = 14;
208
- break;
209
- }
210
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
211
- case 14:
212
- if (!(params['company'] && !(0, _utils.isString)(params['company']))) {
213
- _context2.next = 16;
214
- break;
215
- }
216
- throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params['company'])));
217
- case 16:
218
- if (!(params['note'] && !(0, _utils.isString)(params['note']))) {
219
- _context2.next = 18;
220
- break;
221
- }
222
- throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params['note'])));
223
- case 18:
224
- _context2.next = 20;
225
- return _Api.default.sendRequest("/inbox_recipients", 'POST', params, options);
226
- case 20:
227
- response = _context2.sent;
228
- return _context2.abrupt("return", new InboxRecipient(response === null || response === void 0 ? void 0 : response.data, options));
229
- case 22:
230
- case "end":
231
- return _context2.stop();
232
- }
169
+ while (1) switch (_context2.prev = _context2.next) {
170
+ case 0:
171
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
172
+ options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
173
+ if (params['inbox_id']) {
174
+ _context2.next = 4;
175
+ break;
176
+ }
177
+ throw new errors.MissingParameterError('Parameter missing: inbox_id');
178
+ case 4:
179
+ if (params['recipient']) {
180
+ _context2.next = 6;
181
+ break;
182
+ }
183
+ throw new errors.MissingParameterError('Parameter missing: recipient');
184
+ case 6:
185
+ if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
186
+ _context2.next = 8;
187
+ break;
188
+ }
189
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
190
+ case 8:
191
+ if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
192
+ _context2.next = 10;
193
+ break;
194
+ }
195
+ throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
196
+ case 10:
197
+ if (!(params['recipient'] && !(0, _utils.isString)(params['recipient']))) {
198
+ _context2.next = 12;
199
+ break;
200
+ }
201
+ throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params['recipient'])));
202
+ case 12:
203
+ if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
204
+ _context2.next = 14;
205
+ break;
206
+ }
207
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
208
+ case 14:
209
+ if (!(params['company'] && !(0, _utils.isString)(params['company']))) {
210
+ _context2.next = 16;
211
+ break;
212
+ }
213
+ throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params['company'])));
214
+ case 16:
215
+ if (!(params['note'] && !(0, _utils.isString)(params['note']))) {
216
+ _context2.next = 18;
217
+ break;
218
+ }
219
+ throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params['note'])));
220
+ case 18:
221
+ _context2.next = 20;
222
+ return _Api.default.sendRequest("/inbox_recipients", 'POST', params, options);
223
+ case 20:
224
+ response = _context2.sent;
225
+ return _context2.abrupt("return", new InboxRecipient(response === null || response === void 0 ? void 0 : response.data, options));
226
+ case 22:
227
+ case "end":
228
+ return _context2.stop();
233
229
  }
234
230
  }, _callee2);
235
231
  })));
@@ -84,40 +84,38 @@ var InboxRegistration = /*#__PURE__*/(0, _createClass2.default)(function InboxRe
84
84
  response,
85
85
  _args = arguments;
86
86
  return _regenerator.default.wrap(function _callee$(_context) {
87
- while (1) {
88
- switch (_context.prev = _context.next) {
89
- case 0:
90
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
91
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
92
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
93
- _context.next = 4;
94
- break;
95
- }
96
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
97
- case 4:
98
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
99
- _context.next = 6;
100
- break;
101
- }
102
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
103
- case 6:
104
- if (!(params['folder_behavior_id'] && !(0, _utils.isInt)(params['folder_behavior_id']))) {
105
- _context.next = 8;
106
- break;
107
- }
108
- throw new errors.InvalidParameterError("Bad parameter: folder_behavior_id must be of type Int, received ".concat((0, _utils.getType)(params['folder_behavior_id'])));
109
- case 8:
110
- _context.next = 10;
111
- return _Api.default.sendRequest("/inbox_registrations", 'GET', params, options);
112
- case 10:
113
- response = _context.sent;
114
- 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) {
115
- return new InboxRegistration(obj, options);
116
- })) || []);
117
- case 12:
118
- case "end":
119
- return _context.stop();
120
- }
87
+ while (1) switch (_context.prev = _context.next) {
88
+ case 0:
89
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
90
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
91
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
92
+ _context.next = 4;
93
+ break;
94
+ }
95
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
96
+ case 4:
97
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
98
+ _context.next = 6;
99
+ break;
100
+ }
101
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
102
+ case 6:
103
+ if (!(params['folder_behavior_id'] && !(0, _utils.isInt)(params['folder_behavior_id']))) {
104
+ _context.next = 8;
105
+ break;
106
+ }
107
+ throw new errors.InvalidParameterError("Bad parameter: folder_behavior_id must be of type Int, received ".concat((0, _utils.getType)(params['folder_behavior_id'])));
108
+ case 8:
109
+ _context.next = 10;
110
+ return _Api.default.sendRequest("/inbox_registrations", 'GET', params, options);
111
+ case 10:
112
+ response = _context.sent;
113
+ 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) {
114
+ return new InboxRegistration(obj, options);
115
+ })) || []);
116
+ case 12:
117
+ case "end":
118
+ return _context.stop();
121
119
  }
122
120
  }, _callee);
123
121
  })));
@@ -60,46 +60,44 @@ var InboxUpload = /*#__PURE__*/(0, _createClass2.default)(function InboxUpload()
60
60
  response,
61
61
  _args = arguments;
62
62
  return _regenerator.default.wrap(function _callee$(_context) {
63
- while (1) {
64
- switch (_context.prev = _context.next) {
65
- case 0:
66
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
67
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
68
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
69
- _context.next = 4;
70
- break;
71
- }
72
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
73
- case 4:
74
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
75
- _context.next = 6;
76
- break;
77
- }
78
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
79
- case 6:
80
- if (!(params['inbox_registration_id'] && !(0, _utils.isInt)(params['inbox_registration_id']))) {
81
- _context.next = 8;
82
- break;
83
- }
84
- throw new errors.InvalidParameterError("Bad parameter: inbox_registration_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_registration_id'])));
85
- case 8:
86
- if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
87
- _context.next = 10;
88
- break;
89
- }
90
- throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
91
- case 10:
92
- _context.next = 12;
93
- return _Api.default.sendRequest("/inbox_uploads", 'GET', params, options);
94
- case 12:
95
- response = _context.sent;
96
- 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) {
97
- return new InboxUpload(obj, options);
98
- })) || []);
99
- case 14:
100
- case "end":
101
- return _context.stop();
102
- }
63
+ while (1) switch (_context.prev = _context.next) {
64
+ case 0:
65
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
66
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
67
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
68
+ _context.next = 4;
69
+ break;
70
+ }
71
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
72
+ case 4:
73
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
74
+ _context.next = 6;
75
+ break;
76
+ }
77
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
78
+ case 6:
79
+ if (!(params['inbox_registration_id'] && !(0, _utils.isInt)(params['inbox_registration_id']))) {
80
+ _context.next = 8;
81
+ break;
82
+ }
83
+ throw new errors.InvalidParameterError("Bad parameter: inbox_registration_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_registration_id'])));
84
+ case 8:
85
+ if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
86
+ _context.next = 10;
87
+ break;
88
+ }
89
+ throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
90
+ case 10:
91
+ _context.next = 12;
92
+ return _Api.default.sendRequest("/inbox_uploads", 'GET', params, options);
93
+ case 12:
94
+ response = _context.sent;
95
+ 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) {
96
+ return new InboxUpload(obj, options);
97
+ })) || []);
98
+ case 14:
99
+ case "end":
100
+ return _context.stop();
103
101
  }
104
102
  }, _callee);
105
103
  })));
@@ -93,34 +93,32 @@ var Invoice = /*#__PURE__*/(0, _createClass2.default)(function Invoice() {
93
93
  response,
94
94
  _args = arguments;
95
95
  return _regenerator.default.wrap(function _callee$(_context) {
96
- while (1) {
97
- switch (_context.prev = _context.next) {
98
- case 0:
99
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
100
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
101
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
102
- _context.next = 4;
103
- break;
104
- }
105
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
106
- case 4:
107
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
108
- _context.next = 6;
109
- break;
110
- }
111
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
112
- case 6:
113
- _context.next = 8;
114
- return _Api.default.sendRequest("/invoices", 'GET', params, options);
115
- case 8:
116
- response = _context.sent;
117
- 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) {
118
- return new AccountLineItem(obj, options);
119
- })) || []);
120
- case 10:
121
- case "end":
122
- return _context.stop();
123
- }
96
+ while (1) switch (_context.prev = _context.next) {
97
+ case 0:
98
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
99
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
100
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
101
+ _context.next = 4;
102
+ break;
103
+ }
104
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
105
+ case 4:
106
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
107
+ _context.next = 6;
108
+ break;
109
+ }
110
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
111
+ case 6:
112
+ _context.next = 8;
113
+ return _Api.default.sendRequest("/invoices", 'GET', params, options);
114
+ case 8:
115
+ response = _context.sent;
116
+ 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) {
117
+ return new AccountLineItem(obj, options);
118
+ })) || []);
119
+ case 10:
120
+ case "end":
121
+ return _context.stop();
124
122
  }
125
123
  }, _callee);
126
124
  })));
@@ -136,39 +134,37 @@ var Invoice = /*#__PURE__*/(0, _createClass2.default)(function Invoice() {
136
134
  response,
137
135
  _args2 = arguments;
138
136
  return _regenerator.default.wrap(function _callee2$(_context2) {
139
- while (1) {
140
- switch (_context2.prev = _context2.next) {
141
- case 0:
142
- params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
143
- options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
144
- if ((0, _utils.isObject)(params)) {
145
- _context2.next = 4;
146
- break;
147
- }
148
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
149
- case 4:
150
- params['id'] = id;
151
- if (params['id']) {
152
- _context2.next = 7;
153
- break;
154
- }
155
- throw new errors.MissingParameterError('Parameter missing: id');
156
- case 7:
157
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
158
- _context2.next = 9;
159
- break;
160
- }
161
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
162
- case 9:
163
- _context2.next = 11;
164
- return _Api.default.sendRequest("/invoices/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
165
- case 11:
166
- response = _context2.sent;
167
- return _context2.abrupt("return", new AccountLineItem(response === null || response === void 0 ? void 0 : response.data, options));
168
- case 13:
169
- case "end":
170
- return _context2.stop();
171
- }
137
+ while (1) switch (_context2.prev = _context2.next) {
138
+ case 0:
139
+ params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
140
+ options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
141
+ if ((0, _utils.isObject)(params)) {
142
+ _context2.next = 4;
143
+ break;
144
+ }
145
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
146
+ case 4:
147
+ params['id'] = id;
148
+ if (params['id']) {
149
+ _context2.next = 7;
150
+ break;
151
+ }
152
+ throw new errors.MissingParameterError('Parameter missing: id');
153
+ case 7:
154
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
155
+ _context2.next = 9;
156
+ break;
157
+ }
158
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
159
+ case 9:
160
+ _context2.next = 11;
161
+ return _Api.default.sendRequest("/invoices/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
162
+ case 11:
163
+ response = _context2.sent;
164
+ return _context2.abrupt("return", new AccountLineItem(response === null || response === void 0 ? void 0 : response.data, options));
165
+ case 13:
166
+ case "end":
167
+ return _context2.stop();
172
168
  }
173
169
  }, _callee2);
174
170
  }));