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.
- package/_VERSION +1 -1
- package/docs/models/Bundle.md +9 -2
- package/docs/models/BundleNotification.md +35 -0
- package/docs/models/BundleRegistration.md +3 -1
- package/docs/models/InboxRegistration.md +3 -1
- package/docs/models/Site.md +2 -0
- package/lib/Api.js +153 -159
- package/lib/isomorphic/File.node.js +24 -28
- package/lib/models/ActionNotificationExport.js +97 -101
- package/lib/models/ActionNotificationExportResult.js +44 -46
- package/lib/models/ActionWebhookFailure.js +42 -44
- package/lib/models/ApiKey.js +271 -287
- package/lib/models/App.js +26 -28
- package/lib/models/As2IncomingMessage.js +32 -34
- package/lib/models/As2OutgoingMessage.js +32 -34
- package/lib/models/As2Partner.js +231 -241
- package/lib/models/As2Station.js +219 -229
- package/lib/models/Automation.js +333 -343
- package/lib/models/AutomationRun.js +75 -79
- package/lib/models/BandwidthSnapshot.js +26 -28
- package/lib/models/Behavior.js +323 -337
- package/lib/models/Bundle.js +381 -387
- package/lib/models/BundleDownload.js +38 -40
- package/lib/models/BundleNotification.js +223 -173
- package/lib/models/BundleRecipient.js +104 -108
- package/lib/models/BundleRegistration.js +41 -40
- package/lib/models/Clickwrap.js +213 -223
- package/lib/models/DnsRecord.js +26 -28
- package/lib/models/ExternalEvent.js +93 -99
- package/lib/models/File.js +726 -766
- package/lib/models/FileComment.js +180 -188
- package/lib/models/FileCommentReaction.js +84 -88
- package/lib/models/FileMigration.js +31 -33
- package/lib/models/Folder.js +94 -98
- package/lib/models/FormFieldSet.js +189 -199
- package/lib/models/Group.js +207 -217
- package/lib/models/GroupUser.js +230 -238
- package/lib/models/History.js +266 -276
- package/lib/models/HistoryExport.js +175 -179
- package/lib/models/HistoryExportResult.js +44 -46
- package/lib/models/InboxRecipient.js +104 -108
- package/lib/models/InboxRegistration.js +35 -34
- package/lib/models/InboxUpload.js +38 -40
- package/lib/models/Invoice.js +57 -61
- package/lib/models/IpAddress.js +78 -84
- package/lib/models/Lock.js +148 -154
- package/lib/models/Message.js +267 -277
- package/lib/models/MessageComment.js +207 -217
- package/lib/models/MessageCommentReaction.js +147 -155
- package/lib/models/MessageReaction.js +147 -155
- package/lib/models/Notification.js +255 -265
- package/lib/models/Payment.js +57 -61
- package/lib/models/Permission.js +128 -134
- package/lib/models/Priority.js +45 -47
- package/lib/models/Project.js +183 -193
- package/lib/models/PublicKey.js +207 -217
- package/lib/models/RemoteBandwidthSnapshot.js +26 -28
- package/lib/models/RemoteServer.js +805 -819
- package/lib/models/Request.js +166 -174
- package/lib/models/Session.js +47 -51
- package/lib/models/SettingsChange.js +26 -28
- package/lib/models/SftpHostKey.js +177 -187
- package/lib/models/Site.js +415 -418
- package/lib/models/SsoStrategy.js +99 -105
- package/lib/models/Style.js +127 -133
- package/lib/models/UsageDailySnapshot.js +26 -28
- package/lib/models/UsageSnapshot.js +26 -28
- package/lib/models/User.js +587 -603
- package/lib/models/UserCipherUse.js +32 -34
- package/lib/models/UserRequest.js +147 -155
- package/lib/models/WebhookTest.js +54 -56
- package/package.json +1 -1
- package/src/models/Bundle.js +10 -1
- package/src/models/BundleNotification.js +39 -1
- package/src/models/BundleRegistration.js +3 -0
- package/src/models/InboxRegistration.js +3 -0
- package/src/models/Site.js +3 -0
@@ -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
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
return
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
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
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
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
|
})));
|
@@ -61,6 +61,9 @@ var InboxRegistration = /*#__PURE__*/(0, _createClass2.default)(function InboxRe
|
|
61
61
|
(0, _defineProperty2.default)(this, "getInboxTitle", function () {
|
62
62
|
return _this.attributes.inbox_title;
|
63
63
|
});
|
64
|
+
(0, _defineProperty2.default)(this, "getCreatedAt", function () {
|
65
|
+
return _this.attributes.created_at;
|
66
|
+
});
|
64
67
|
Object.entries(attributes).forEach(function (_ref) {
|
65
68
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
66
69
|
key = _ref2[0],
|
@@ -81,40 +84,38 @@ var InboxRegistration = /*#__PURE__*/(0, _createClass2.default)(function InboxRe
|
|
81
84
|
response,
|
82
85
|
_args = arguments;
|
83
86
|
return _regenerator.default.wrap(function _callee$(_context) {
|
84
|
-
while (1) {
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
return
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
return _context.stop();
|
117
|
-
}
|
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();
|
118
119
|
}
|
119
120
|
}, _callee);
|
120
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
return
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
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
|
})));
|
package/lib/models/Invoice.js
CHANGED
@@ -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
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
return
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
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
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
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
|
}));
|