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.
- package/.eslintrc.js +0 -3
- package/_VERSION +1 -1
- package/docs/Errors.md +1 -0
- package/lib/Api.js +1 -1
- package/lib/Errors.js +957 -933
- package/lib/Files.js +1 -1
- package/lib/models/ActionNotificationExport.js +25 -25
- package/lib/models/ActionNotificationExportResult.js +10 -10
- package/lib/models/ActionWebhookFailure.js +5 -9
- package/lib/models/ApiKey.js +62 -70
- package/lib/models/App.js +5 -5
- package/lib/models/As2IncomingMessage.js +7 -7
- package/lib/models/As2OutgoingMessage.js +7 -7
- package/lib/models/As2Partner.js +54 -58
- package/lib/models/As2Station.js +51 -55
- package/lib/models/Automation.js +102 -110
- package/lib/models/AutomationRun.js +13 -13
- package/lib/models/BandwidthSnapshot.js +5 -5
- package/lib/models/Behavior.js +77 -85
- package/lib/models/Bundle.js +102 -110
- package/lib/models/BundleDownload.js +9 -9
- package/lib/models/BundleNotification.js +37 -41
- package/lib/models/BundleRecipient.js +22 -22
- package/lib/models/BundleRegistration.js +7 -7
- package/lib/models/Clickwrap.js +52 -56
- package/lib/models/DnsRecord.js +5 -5
- package/lib/models/EmailIncomingMessage.js +5 -5
- package/lib/models/ExternalEvent.js +18 -18
- package/lib/models/File.js +89 -93
- package/lib/models/FileComment.js +41 -45
- package/lib/models/FileCommentReaction.js +15 -19
- package/lib/models/FileMigration.js +5 -5
- package/lib/models/Folder.js +24 -24
- package/lib/models/FormFieldSet.js +44 -48
- package/lib/models/GpgKey.js +53 -57
- package/lib/models/Group.js +51 -55
- package/lib/models/GroupUser.js +53 -57
- package/lib/models/History.js +72 -72
- package/lib/models/HistoryExport.js +51 -51
- package/lib/models/HistoryExportResult.js +10 -10
- package/lib/models/InboxRecipient.js +22 -22
- package/lib/models/InboxRegistration.js +7 -7
- package/lib/models/InboxUpload.js +9 -9
- package/lib/models/Invoice.js +12 -12
- package/lib/models/IpAddress.js +17 -17
- package/lib/models/Lock.js +27 -31
- package/lib/models/Message.js +60 -64
- package/lib/models/MessageComment.js +46 -50
- package/lib/models/MessageCommentReaction.js +27 -31
- package/lib/models/MessageReaction.js +27 -31
- package/lib/models/Notification.js +66 -70
- package/lib/models/Payment.js +12 -12
- package/lib/models/Permission.js +28 -32
- package/lib/models/Priority.js +9 -9
- package/lib/models/Project.js +39 -43
- package/lib/models/PublicKey.js +46 -50
- package/lib/models/RemoteBandwidthSnapshot.js +5 -5
- package/lib/models/RemoteServer.js +306 -310
- package/lib/models/Request.js +33 -37
- package/lib/models/Session.js +11 -15
- package/lib/models/SettingsChange.js +5 -5
- package/lib/models/SftpHostKey.js +40 -44
- package/lib/models/ShareGroup.js +50 -54
- package/lib/models/Site.js +138 -138
- package/lib/models/Snapshot.js +44 -48
- package/lib/models/SsoStrategy.js +15 -19
- package/lib/models/Style.js +17 -21
- package/lib/models/UsageDailySnapshot.js +5 -5
- package/lib/models/UsageSnapshot.js +5 -5
- package/lib/models/User.js +156 -172
- package/lib/models/UserCipherUse.js +7 -7
- package/lib/models/UserRequest.js +26 -30
- package/lib/models/WebhookTest.js +15 -15
- package/package.json +6 -2
- package/src/Api.js +2 -1
- package/src/Errors.js +189 -177
- package/src/Files.js +1 -1
- package/src/models/AccountLineItem.js +5 -2
- package/src/models/Action.js +5 -2
- package/src/models/ActionNotificationExport.js +36 -35
- package/src/models/ActionNotificationExportResult.js +15 -13
- package/src/models/ActionWebhookFailure.js +9 -8
- package/src/models/ApiKey.js +69 -72
- package/src/models/App.js +10 -8
- package/src/models/As2IncomingMessage.js +12 -10
- package/src/models/As2OutgoingMessage.js +12 -10
- package/src/models/As2Partner.js +61 -60
- package/src/models/As2Station.js +58 -57
- package/src/models/Auto.js +5 -2
- package/src/models/Automation.js +121 -110
- package/src/models/AutomationRun.js +18 -17
- package/src/models/BandwidthSnapshot.js +10 -8
- package/src/models/Behavior.js +85 -86
- package/src/models/Bundle.js +121 -110
- package/src/models/BundleDownload.js +14 -12
- package/src/models/BundleNotification.js +40 -43
- package/src/models/BundleRecipient.js +33 -32
- package/src/models/BundleRegistration.js +12 -10
- package/src/models/Clickwrap.js +60 -58
- package/src/models/DnsRecord.js +10 -8
- package/src/models/EmailIncomingMessage.js +10 -8
- package/src/models/Errors.js +5 -2
- package/src/models/ExternalEvent.js +29 -29
- package/src/models/File.js +116 -108
- package/src/models/FileAction.js +5 -2
- package/src/models/FileComment.js +45 -46
- package/src/models/FileCommentReaction.js +26 -26
- package/src/models/FileMigration.js +10 -8
- package/src/models/FileUploadPart.js +5 -2
- package/src/models/Folder.js +32 -29
- package/src/models/FormField.js +5 -2
- package/src/models/FormFieldSet.js +49 -50
- package/src/models/GpgKey.js +60 -59
- package/src/models/Group.js +58 -57
- package/src/models/GroupUser.js +60 -58
- package/src/models/History.js +77 -74
- package/src/models/HistoryExport.js +62 -61
- package/src/models/HistoryExportResult.js +15 -13
- package/src/models/Image.js +5 -2
- package/src/models/InboxRecipient.js +33 -32
- package/src/models/InboxRegistration.js +12 -10
- package/src/models/InboxUpload.js +14 -12
- package/src/models/Invoice.js +17 -14
- package/src/models/InvoiceLineItem.js +5 -2
- package/src/models/IpAddress.js +22 -20
- package/src/models/Lock.js +36 -36
- package/src/models/Message.js +66 -66
- package/src/models/MessageComment.js +50 -52
- package/src/models/MessageCommentReaction.js +38 -40
- package/src/models/MessageReaction.js +38 -40
- package/src/models/Notification.js +74 -72
- package/src/models/Payment.js +17 -14
- package/src/models/PaymentLineItem.js +5 -2
- package/src/models/Permission.js +39 -40
- package/src/models/Preview.js +5 -2
- package/src/models/Priority.js +14 -12
- package/src/models/Project.js +43 -45
- package/src/models/PublicIpAddress.js +5 -2
- package/src/models/PublicKey.js +50 -52
- package/src/models/RemoteBandwidthSnapshot.js +10 -8
- package/src/models/RemoteServer.js +380 -312
- package/src/models/RemoteServerConfigurationFile.js +5 -2
- package/src/models/Request.js +44 -46
- package/src/models/Session.js +22 -22
- package/src/models/SettingsChange.js +10 -8
- package/src/models/SftpHostKey.js +45 -46
- package/src/models/ShareGroup.js +56 -56
- package/src/models/ShareGroupMember.js +5 -2
- package/src/models/Site.js +143 -142
- package/src/models/Snapshot.js +50 -50
- package/src/models/SsoStrategy.js +20 -21
- package/src/models/Status.js +5 -2
- package/src/models/Style.js +22 -23
- package/src/models/UsageDailySnapshot.js +10 -8
- package/src/models/UsageSnapshot.js +10 -8
- package/src/models/User.js +185 -168
- package/src/models/UserCipherUse.js +12 -10
- package/src/models/UserRequest.js +37 -39
- package/src/models/WebhookTest.js +26 -24
- package/test/Api.test.js +163 -0
- package/test/{package.json → integration/package.json} +1 -1
- package/test/{src → integration/src}/index.js +1 -1
- package/test.sh +2 -1
- /package/test/{.babelrc → integration/.babelrc} +0 -0
- /package/test/{index.js → integration/index.js} +0 -0
|
@@ -56,7 +56,6 @@ var MessageCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function Me
|
|
|
56
56
|
});
|
|
57
57
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
58
58
|
var params,
|
|
59
|
-
response,
|
|
60
59
|
_args = arguments;
|
|
61
60
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
62
61
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -75,13 +74,13 @@ var MessageCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function Me
|
|
|
75
74
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
76
75
|
case 5:
|
|
77
76
|
params.id = _this.attributes.id;
|
|
78
|
-
if (!(params
|
|
77
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
79
78
|
_context.next = 8;
|
|
80
79
|
break;
|
|
81
80
|
}
|
|
82
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
81
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
83
82
|
case 8:
|
|
84
|
-
if (params
|
|
83
|
+
if (params.id) {
|
|
85
84
|
_context.next = 14;
|
|
86
85
|
break;
|
|
87
86
|
}
|
|
@@ -89,18 +88,15 @@ var MessageCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function Me
|
|
|
89
88
|
_context.next = 13;
|
|
90
89
|
break;
|
|
91
90
|
}
|
|
92
|
-
params
|
|
91
|
+
params.id = _this.id;
|
|
93
92
|
_context.next = 14;
|
|
94
93
|
break;
|
|
95
94
|
case 13:
|
|
96
95
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
97
96
|
case 14:
|
|
98
97
|
_context.next = 16;
|
|
99
|
-
return _Api.default.sendRequest("/message_comment_reactions/".concat(encodeURIComponent(params
|
|
98
|
+
return _Api.default.sendRequest("/message_comment_reactions/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
|
100
99
|
case 16:
|
|
101
|
-
response = _context.sent;
|
|
102
|
-
return _context.abrupt("return");
|
|
103
|
-
case 18:
|
|
104
100
|
case "end":
|
|
105
101
|
return _context.stop();
|
|
106
102
|
}
|
|
@@ -115,7 +111,7 @@ var MessageCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function Me
|
|
|
115
111
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
116
112
|
while (1) switch (_context2.prev = _context2.next) {
|
|
117
113
|
case 0:
|
|
118
|
-
if (!_this.attributes
|
|
114
|
+
if (!_this.attributes.id) {
|
|
119
115
|
_context2.next = 4;
|
|
120
116
|
break;
|
|
121
117
|
}
|
|
@@ -163,38 +159,38 @@ _class = MessageCommentReaction;
|
|
|
163
159
|
case 0:
|
|
164
160
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
165
161
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
166
|
-
if (params
|
|
162
|
+
if (params.message_comment_id) {
|
|
167
163
|
_context3.next = 4;
|
|
168
164
|
break;
|
|
169
165
|
}
|
|
170
166
|
throw new errors.MissingParameterError('Parameter missing: message_comment_id');
|
|
171
167
|
case 4:
|
|
172
|
-
if (!(params
|
|
168
|
+
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
173
169
|
_context3.next = 6;
|
|
174
170
|
break;
|
|
175
171
|
}
|
|
176
|
-
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
172
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
177
173
|
case 6:
|
|
178
|
-
if (!(params
|
|
174
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
179
175
|
_context3.next = 8;
|
|
180
176
|
break;
|
|
181
177
|
}
|
|
182
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
178
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
183
179
|
case 8:
|
|
184
|
-
if (!(params
|
|
180
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
185
181
|
_context3.next = 10;
|
|
186
182
|
break;
|
|
187
183
|
}
|
|
188
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
184
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
189
185
|
case 10:
|
|
190
|
-
if (!(params
|
|
186
|
+
if (!(params.message_comment_id && !(0, _utils.isInt)(params.message_comment_id))) {
|
|
191
187
|
_context3.next = 12;
|
|
192
188
|
break;
|
|
193
189
|
}
|
|
194
|
-
throw new errors.InvalidParameterError("Bad parameter: message_comment_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
190
|
+
throw new errors.InvalidParameterError("Bad parameter: message_comment_id must be of type Int, received ".concat((0, _utils.getType)(params.message_comment_id)));
|
|
195
191
|
case 12:
|
|
196
192
|
_context3.next = 14;
|
|
197
|
-
return _Api.default.sendRequest(
|
|
193
|
+
return _Api.default.sendRequest('/message_comment_reactions', 'GET', params, options);
|
|
198
194
|
case 14:
|
|
199
195
|
response = _context3.sent;
|
|
200
196
|
return _context3.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
@@ -230,21 +226,21 @@ _class = MessageCommentReaction;
|
|
|
230
226
|
}
|
|
231
227
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
232
228
|
case 4:
|
|
233
|
-
params
|
|
234
|
-
if (params
|
|
229
|
+
params.id = id;
|
|
230
|
+
if (params.id) {
|
|
235
231
|
_context4.next = 7;
|
|
236
232
|
break;
|
|
237
233
|
}
|
|
238
234
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
239
235
|
case 7:
|
|
240
|
-
if (!(params
|
|
236
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
241
237
|
_context4.next = 9;
|
|
242
238
|
break;
|
|
243
239
|
}
|
|
244
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
240
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
245
241
|
case 9:
|
|
246
242
|
_context4.next = 11;
|
|
247
|
-
return _Api.default.sendRequest("/message_comment_reactions/".concat(encodeURIComponent(params
|
|
243
|
+
return _Api.default.sendRequest("/message_comment_reactions/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
248
244
|
case 11:
|
|
249
245
|
response = _context4.sent;
|
|
250
246
|
return _context4.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
|
@@ -276,26 +272,26 @@ _class = MessageCommentReaction;
|
|
|
276
272
|
case 0:
|
|
277
273
|
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
278
274
|
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
|
279
|
-
if (params
|
|
275
|
+
if (params.emoji) {
|
|
280
276
|
_context5.next = 4;
|
|
281
277
|
break;
|
|
282
278
|
}
|
|
283
279
|
throw new errors.MissingParameterError('Parameter missing: emoji');
|
|
284
280
|
case 4:
|
|
285
|
-
if (!(params
|
|
281
|
+
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
286
282
|
_context5.next = 6;
|
|
287
283
|
break;
|
|
288
284
|
}
|
|
289
|
-
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
285
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
290
286
|
case 6:
|
|
291
|
-
if (!(params
|
|
287
|
+
if (!(params.emoji && !(0, _utils.isString)(params.emoji))) {
|
|
292
288
|
_context5.next = 8;
|
|
293
289
|
break;
|
|
294
290
|
}
|
|
295
|
-
throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params
|
|
291
|
+
throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params.emoji)));
|
|
296
292
|
case 8:
|
|
297
293
|
_context5.next = 10;
|
|
298
|
-
return _Api.default.sendRequest(
|
|
294
|
+
return _Api.default.sendRequest('/message_comment_reactions', 'POST', params, options);
|
|
299
295
|
case 10:
|
|
300
296
|
response = _context5.sent;
|
|
301
297
|
return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
|
@@ -56,7 +56,6 @@ var MessageReaction = /*#__PURE__*/(0, _createClass2.default)(function MessageRe
|
|
|
56
56
|
});
|
|
57
57
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
58
58
|
var params,
|
|
59
|
-
response,
|
|
60
59
|
_args = arguments;
|
|
61
60
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
62
61
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -75,13 +74,13 @@ var MessageReaction = /*#__PURE__*/(0, _createClass2.default)(function MessageRe
|
|
|
75
74
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
76
75
|
case 5:
|
|
77
76
|
params.id = _this.attributes.id;
|
|
78
|
-
if (!(params
|
|
77
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
79
78
|
_context.next = 8;
|
|
80
79
|
break;
|
|
81
80
|
}
|
|
82
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
81
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
83
82
|
case 8:
|
|
84
|
-
if (params
|
|
83
|
+
if (params.id) {
|
|
85
84
|
_context.next = 14;
|
|
86
85
|
break;
|
|
87
86
|
}
|
|
@@ -89,18 +88,15 @@ var MessageReaction = /*#__PURE__*/(0, _createClass2.default)(function MessageRe
|
|
|
89
88
|
_context.next = 13;
|
|
90
89
|
break;
|
|
91
90
|
}
|
|
92
|
-
params
|
|
91
|
+
params.id = _this.id;
|
|
93
92
|
_context.next = 14;
|
|
94
93
|
break;
|
|
95
94
|
case 13:
|
|
96
95
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
97
96
|
case 14:
|
|
98
97
|
_context.next = 16;
|
|
99
|
-
return _Api.default.sendRequest("/message_reactions/".concat(encodeURIComponent(params
|
|
98
|
+
return _Api.default.sendRequest("/message_reactions/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
|
100
99
|
case 16:
|
|
101
|
-
response = _context.sent;
|
|
102
|
-
return _context.abrupt("return");
|
|
103
|
-
case 18:
|
|
104
100
|
case "end":
|
|
105
101
|
return _context.stop();
|
|
106
102
|
}
|
|
@@ -115,7 +111,7 @@ var MessageReaction = /*#__PURE__*/(0, _createClass2.default)(function MessageRe
|
|
|
115
111
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
116
112
|
while (1) switch (_context2.prev = _context2.next) {
|
|
117
113
|
case 0:
|
|
118
|
-
if (!_this.attributes
|
|
114
|
+
if (!_this.attributes.id) {
|
|
119
115
|
_context2.next = 4;
|
|
120
116
|
break;
|
|
121
117
|
}
|
|
@@ -163,38 +159,38 @@ _class = MessageReaction;
|
|
|
163
159
|
case 0:
|
|
164
160
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
165
161
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
166
|
-
if (params
|
|
162
|
+
if (params.message_id) {
|
|
167
163
|
_context3.next = 4;
|
|
168
164
|
break;
|
|
169
165
|
}
|
|
170
166
|
throw new errors.MissingParameterError('Parameter missing: message_id');
|
|
171
167
|
case 4:
|
|
172
|
-
if (!(params
|
|
168
|
+
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
173
169
|
_context3.next = 6;
|
|
174
170
|
break;
|
|
175
171
|
}
|
|
176
|
-
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
172
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
177
173
|
case 6:
|
|
178
|
-
if (!(params
|
|
174
|
+
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
179
175
|
_context3.next = 8;
|
|
180
176
|
break;
|
|
181
177
|
}
|
|
182
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params
|
|
178
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
183
179
|
case 8:
|
|
184
|
-
if (!(params
|
|
180
|
+
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
185
181
|
_context3.next = 10;
|
|
186
182
|
break;
|
|
187
183
|
}
|
|
188
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params
|
|
184
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
189
185
|
case 10:
|
|
190
|
-
if (!(params
|
|
186
|
+
if (!(params.message_id && !(0, _utils.isInt)(params.message_id))) {
|
|
191
187
|
_context3.next = 12;
|
|
192
188
|
break;
|
|
193
189
|
}
|
|
194
|
-
throw new errors.InvalidParameterError("Bad parameter: message_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
190
|
+
throw new errors.InvalidParameterError("Bad parameter: message_id must be of type Int, received ".concat((0, _utils.getType)(params.message_id)));
|
|
195
191
|
case 12:
|
|
196
192
|
_context3.next = 14;
|
|
197
|
-
return _Api.default.sendRequest(
|
|
193
|
+
return _Api.default.sendRequest('/message_reactions', 'GET', params, options);
|
|
198
194
|
case 14:
|
|
199
195
|
response = _context3.sent;
|
|
200
196
|
return _context3.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
@@ -230,21 +226,21 @@ _class = MessageReaction;
|
|
|
230
226
|
}
|
|
231
227
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
232
228
|
case 4:
|
|
233
|
-
params
|
|
234
|
-
if (params
|
|
229
|
+
params.id = id;
|
|
230
|
+
if (params.id) {
|
|
235
231
|
_context4.next = 7;
|
|
236
232
|
break;
|
|
237
233
|
}
|
|
238
234
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
239
235
|
case 7:
|
|
240
|
-
if (!(params
|
|
236
|
+
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
241
237
|
_context4.next = 9;
|
|
242
238
|
break;
|
|
243
239
|
}
|
|
244
|
-
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
240
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
245
241
|
case 9:
|
|
246
242
|
_context4.next = 11;
|
|
247
|
-
return _Api.default.sendRequest("/message_reactions/".concat(encodeURIComponent(params
|
|
243
|
+
return _Api.default.sendRequest("/message_reactions/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
248
244
|
case 11:
|
|
249
245
|
response = _context4.sent;
|
|
250
246
|
return _context4.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|
|
@@ -276,26 +272,26 @@ _class = MessageReaction;
|
|
|
276
272
|
case 0:
|
|
277
273
|
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
278
274
|
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
|
279
|
-
if (params
|
|
275
|
+
if (params.emoji) {
|
|
280
276
|
_context5.next = 4;
|
|
281
277
|
break;
|
|
282
278
|
}
|
|
283
279
|
throw new errors.MissingParameterError('Parameter missing: emoji');
|
|
284
280
|
case 4:
|
|
285
|
-
if (!(params
|
|
281
|
+
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
286
282
|
_context5.next = 6;
|
|
287
283
|
break;
|
|
288
284
|
}
|
|
289
|
-
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params
|
|
285
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
290
286
|
case 6:
|
|
291
|
-
if (!(params
|
|
287
|
+
if (!(params.emoji && !(0, _utils.isString)(params.emoji))) {
|
|
292
288
|
_context5.next = 8;
|
|
293
289
|
break;
|
|
294
290
|
}
|
|
295
|
-
throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params
|
|
291
|
+
throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params.emoji)));
|
|
296
292
|
case 8:
|
|
297
293
|
_context5.next = 10;
|
|
298
|
-
return _Api.default.sendRequest(
|
|
294
|
+
return _Api.default.sendRequest('/message_reactions', 'POST', params, options);
|
|
299
295
|
case 10:
|
|
300
296
|
response = _context5.sent;
|
|
301
297
|
return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
|