files.com 1.2.248 → 1.2.250
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 +4 -2
- package/docs/models/FormFieldSet.md +5 -2
- package/lib/Api.js +72 -71
- package/lib/Files.js +1 -1
- package/lib/isomorphic/File.node.js +5 -5
- package/lib/models/ActionNotificationExport.js +38 -38
- package/lib/models/ActionNotificationExportResult.js +14 -14
- package/lib/models/ApiKey.js +100 -100
- package/lib/models/ApiRequestLog.js +8 -8
- package/lib/models/App.js +8 -8
- package/lib/models/As2IncomingMessage.js +10 -10
- package/lib/models/As2OutgoingMessage.js +10 -10
- package/lib/models/As2Partner.js +101 -101
- package/lib/models/As2Station.js +81 -81
- package/lib/models/Automation.js +167 -167
- package/lib/models/AutomationLog.js +8 -8
- package/lib/models/AutomationRun.js +24 -24
- package/lib/models/BandwidthSnapshot.js +8 -8
- package/lib/models/Behavior.js +106 -106
- package/lib/models/Bundle.js +143 -143
- package/lib/models/BundleAction.js +10 -10
- package/lib/models/BundleDownload.js +12 -12
- package/lib/models/BundleNotification.js +69 -69
- package/lib/models/BundleRecipient.js +40 -40
- package/lib/models/BundleRegistration.js +12 -12
- package/lib/models/Clickwrap.js +79 -79
- package/lib/models/DnsRecord.js +8 -8
- package/lib/models/EmailIncomingMessage.js +8 -8
- package/lib/models/EmailLog.js +8 -8
- package/lib/models/ExavaultApiRequestLog.js +8 -8
- package/lib/models/ExternalEvent.js +36 -36
- package/lib/models/File.js +269 -269
- package/lib/models/FileComment.js +70 -70
- package/lib/models/FileCommentReaction.js +34 -34
- package/lib/models/FileMigration.js +10 -10
- package/lib/models/FileMigrationLog.js +8 -8
- package/lib/models/Folder.js +36 -36
- package/lib/models/FormFieldSet.js +78 -71
- package/lib/models/FtpActionLog.js +8 -8
- package/lib/models/GpgKey.js +81 -81
- package/lib/models/Group.js +83 -83
- package/lib/models/GroupUser.js +89 -89
- package/lib/models/History.js +88 -88
- package/lib/models/HistoryExport.js +64 -64
- package/lib/models/HistoryExportResult.js +14 -14
- package/lib/models/InboxRecipient.js +36 -36
- package/lib/models/InboxRegistration.js +10 -10
- package/lib/models/InboxUpload.js +8 -8
- package/lib/models/Invoice.js +18 -18
- package/lib/models/IpAddress.js +32 -32
- package/lib/models/Lock.js +51 -51
- package/lib/models/Message.js +100 -100
- package/lib/models/MessageComment.js +78 -78
- package/lib/models/MessageCommentReaction.js +54 -54
- package/lib/models/MessageReaction.js +54 -54
- package/lib/models/Notification.js +91 -91
- package/lib/models/OutboundConnectionLog.js +8 -8
- package/lib/models/Payment.js +18 -18
- package/lib/models/Permission.js +54 -54
- package/lib/models/Priority.js +14 -14
- package/lib/models/Project.js +70 -70
- package/lib/models/PublicHostingRequestLog.js +8 -8
- package/lib/models/PublicKey.js +78 -78
- package/lib/models/RemoteBandwidthSnapshot.js +8 -8
- package/lib/models/RemoteServer.js +362 -362
- package/lib/models/Request.js +60 -60
- package/lib/models/Restore.js +24 -24
- package/lib/models/Session.js +21 -21
- package/lib/models/SettingsChange.js +8 -8
- package/lib/models/SftpActionLog.js +8 -8
- package/lib/models/SftpHostKey.js +67 -67
- package/lib/models/ShareGroup.js +79 -79
- package/lib/models/SiemHttpDestination.js +158 -158
- package/lib/models/Site.js +150 -150
- package/lib/models/Snapshot.js +85 -85
- package/lib/models/SsoStrategy.js +32 -32
- package/lib/models/Style.js +48 -48
- package/lib/models/SyncLog.js +8 -8
- package/lib/models/UsageDailySnapshot.js +8 -8
- package/lib/models/UsageSnapshot.js +8 -8
- package/lib/models/User.js +215 -215
- package/lib/models/UserCipherUse.js +10 -10
- package/lib/models/UserLifecycleRule.js +92 -92
- package/lib/models/UserRequest.js +56 -56
- package/lib/models/UserSftpClientUse.js +10 -10
- package/lib/models/WebDavActionLog.js +8 -8
- package/lib/models/WebhookTest.js +24 -24
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/FormFieldSet.js +7 -0
|
@@ -66,69 +66,69 @@ var MessageComment = /*#__PURE__*/(0, _createClass2.default)(function MessageCom
|
|
|
66
66
|
var params,
|
|
67
67
|
response,
|
|
68
68
|
_args = arguments;
|
|
69
|
-
return _regenerator.default.wrap(function
|
|
69
|
+
return _regenerator.default.wrap(function (_context) {
|
|
70
70
|
while (1) switch (_context.prev = _context.next) {
|
|
71
71
|
case 0:
|
|
72
72
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
73
73
|
if (_this.attributes.id) {
|
|
74
|
-
_context.next =
|
|
74
|
+
_context.next = 1;
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
77
77
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
78
|
-
case
|
|
78
|
+
case 1:
|
|
79
79
|
if ((0, _utils.isObject)(params)) {
|
|
80
|
-
_context.next =
|
|
80
|
+
_context.next = 2;
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
83
83
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
84
|
-
case
|
|
84
|
+
case 2:
|
|
85
85
|
params.id = _this.attributes.id;
|
|
86
86
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
87
|
-
_context.next =
|
|
87
|
+
_context.next = 3;
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
90
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
91
|
-
case
|
|
91
|
+
case 3:
|
|
92
92
|
if (!(params.body && !(0, _utils.isString)(params.body))) {
|
|
93
|
-
_context.next =
|
|
93
|
+
_context.next = 4;
|
|
94
94
|
break;
|
|
95
95
|
}
|
|
96
96
|
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
|
|
97
|
-
case
|
|
97
|
+
case 4:
|
|
98
98
|
if (params.id) {
|
|
99
|
-
_context.next =
|
|
99
|
+
_context.next = 6;
|
|
100
100
|
break;
|
|
101
101
|
}
|
|
102
102
|
if (!_this.attributes.id) {
|
|
103
|
-
_context.next =
|
|
103
|
+
_context.next = 5;
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
params.id = _this.id;
|
|
107
|
-
_context.next =
|
|
107
|
+
_context.next = 6;
|
|
108
108
|
break;
|
|
109
|
-
case
|
|
109
|
+
case 5:
|
|
110
110
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
111
|
-
case
|
|
111
|
+
case 6:
|
|
112
112
|
if (params.body) {
|
|
113
|
-
_context.next =
|
|
113
|
+
_context.next = 8;
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
116
|
if (!_this.attributes.body) {
|
|
117
|
-
_context.next =
|
|
117
|
+
_context.next = 7;
|
|
118
118
|
break;
|
|
119
119
|
}
|
|
120
120
|
params.body = _this.body;
|
|
121
|
-
_context.next =
|
|
121
|
+
_context.next = 8;
|
|
122
122
|
break;
|
|
123
|
-
case
|
|
123
|
+
case 7:
|
|
124
124
|
throw new errors.MissingParameterError('Parameter missing: body');
|
|
125
|
-
case
|
|
126
|
-
_context.next =
|
|
125
|
+
case 8:
|
|
126
|
+
_context.next = 9;
|
|
127
127
|
return _Api.default.sendRequest("/message_comments/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
128
|
-
case
|
|
128
|
+
case 9:
|
|
129
129
|
response = _context.sent;
|
|
130
130
|
return _context.abrupt("return", new MessageComment(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
131
|
-
case
|
|
131
|
+
case 10:
|
|
132
132
|
case "end":
|
|
133
133
|
return _context.stop();
|
|
134
134
|
}
|
|
@@ -137,46 +137,46 @@ var MessageComment = /*#__PURE__*/(0, _createClass2.default)(function MessageCom
|
|
|
137
137
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
138
138
|
var params,
|
|
139
139
|
_args2 = arguments;
|
|
140
|
-
return _regenerator.default.wrap(function
|
|
140
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
141
141
|
while (1) switch (_context2.prev = _context2.next) {
|
|
142
142
|
case 0:
|
|
143
143
|
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
144
144
|
if (_this.attributes.id) {
|
|
145
|
-
_context2.next =
|
|
145
|
+
_context2.next = 1;
|
|
146
146
|
break;
|
|
147
147
|
}
|
|
148
148
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
149
|
-
case
|
|
149
|
+
case 1:
|
|
150
150
|
if ((0, _utils.isObject)(params)) {
|
|
151
|
-
_context2.next =
|
|
151
|
+
_context2.next = 2;
|
|
152
152
|
break;
|
|
153
153
|
}
|
|
154
154
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
155
|
-
case
|
|
155
|
+
case 2:
|
|
156
156
|
params.id = _this.attributes.id;
|
|
157
157
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
158
|
-
_context2.next =
|
|
158
|
+
_context2.next = 3;
|
|
159
159
|
break;
|
|
160
160
|
}
|
|
161
161
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
162
|
-
case
|
|
162
|
+
case 3:
|
|
163
163
|
if (params.id) {
|
|
164
|
-
_context2.next =
|
|
164
|
+
_context2.next = 5;
|
|
165
165
|
break;
|
|
166
166
|
}
|
|
167
167
|
if (!_this.attributes.id) {
|
|
168
|
-
_context2.next =
|
|
168
|
+
_context2.next = 4;
|
|
169
169
|
break;
|
|
170
170
|
}
|
|
171
171
|
params.id = _this.id;
|
|
172
|
-
_context2.next =
|
|
172
|
+
_context2.next = 5;
|
|
173
173
|
break;
|
|
174
|
-
case
|
|
174
|
+
case 4:
|
|
175
175
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
176
|
-
case
|
|
177
|
-
_context2.next =
|
|
176
|
+
case 5:
|
|
177
|
+
_context2.next = 6;
|
|
178
178
|
return _Api.default.sendRequest("/message_comments/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
|
179
|
-
case
|
|
179
|
+
case 6:
|
|
180
180
|
case "end":
|
|
181
181
|
return _context2.stop();
|
|
182
182
|
}
|
|
@@ -188,27 +188,27 @@ var MessageComment = /*#__PURE__*/(0, _createClass2.default)(function MessageCom
|
|
|
188
188
|
});
|
|
189
189
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
190
190
|
var _newObject, newObject;
|
|
191
|
-
return _regenerator.default.wrap(function
|
|
191
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
192
192
|
while (1) switch (_context3.prev = _context3.next) {
|
|
193
193
|
case 0:
|
|
194
194
|
if (!_this.attributes.id) {
|
|
195
|
-
_context3.next =
|
|
195
|
+
_context3.next = 2;
|
|
196
196
|
break;
|
|
197
197
|
}
|
|
198
|
-
_context3.next =
|
|
198
|
+
_context3.next = 1;
|
|
199
199
|
return _this.update(_this.attributes);
|
|
200
|
-
case
|
|
200
|
+
case 1:
|
|
201
201
|
_newObject = _context3.sent;
|
|
202
202
|
_this.attributes = _objectSpread({}, _newObject.attributes);
|
|
203
203
|
return _context3.abrupt("return", true);
|
|
204
|
-
case
|
|
205
|
-
_context3.next =
|
|
204
|
+
case 2:
|
|
205
|
+
_context3.next = 3;
|
|
206
206
|
return MessageComment.create(_this.attributes, _this.options);
|
|
207
|
-
case
|
|
207
|
+
case 3:
|
|
208
208
|
newObject = _context3.sent;
|
|
209
209
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
210
210
|
return _context3.abrupt("return", true);
|
|
211
|
-
case
|
|
211
|
+
case 4:
|
|
212
212
|
case "end":
|
|
213
213
|
return _context3.stop();
|
|
214
214
|
}
|
|
@@ -240,49 +240,49 @@ _MessageComment = MessageComment;
|
|
|
240
240
|
options,
|
|
241
241
|
response,
|
|
242
242
|
_args4 = arguments;
|
|
243
|
-
return _regenerator.default.wrap(function
|
|
243
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
244
244
|
while (1) switch (_context4.prev = _context4.next) {
|
|
245
245
|
case 0:
|
|
246
246
|
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
247
247
|
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
248
248
|
if (params.message_id) {
|
|
249
|
-
_context4.next =
|
|
249
|
+
_context4.next = 1;
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
throw new errors.MissingParameterError('Parameter missing: message_id');
|
|
253
|
-
case
|
|
253
|
+
case 1:
|
|
254
254
|
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
255
|
-
_context4.next =
|
|
255
|
+
_context4.next = 2;
|
|
256
256
|
break;
|
|
257
257
|
}
|
|
258
258
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
259
|
-
case
|
|
259
|
+
case 2:
|
|
260
260
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
261
|
-
_context4.next =
|
|
261
|
+
_context4.next = 3;
|
|
262
262
|
break;
|
|
263
263
|
}
|
|
264
264
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
265
|
-
case
|
|
265
|
+
case 3:
|
|
266
266
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
267
|
-
_context4.next =
|
|
267
|
+
_context4.next = 4;
|
|
268
268
|
break;
|
|
269
269
|
}
|
|
270
270
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
271
|
-
case
|
|
271
|
+
case 4:
|
|
272
272
|
if (!(params.message_id && !(0, _utils.isInt)(params.message_id))) {
|
|
273
|
-
_context4.next =
|
|
273
|
+
_context4.next = 5;
|
|
274
274
|
break;
|
|
275
275
|
}
|
|
276
276
|
throw new errors.InvalidParameterError("Bad parameter: message_id must be of type Int, received ".concat((0, _utils.getType)(params.message_id)));
|
|
277
|
-
case
|
|
278
|
-
_context4.next =
|
|
277
|
+
case 5:
|
|
278
|
+
_context4.next = 6;
|
|
279
279
|
return _Api.default.sendRequest('/message_comments', 'GET', params, options);
|
|
280
|
-
case
|
|
280
|
+
case 6:
|
|
281
281
|
response = _context4.sent;
|
|
282
282
|
return _context4.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
283
283
|
return new _MessageComment(obj, options);
|
|
284
284
|
})) || []);
|
|
285
|
-
case
|
|
285
|
+
case 7:
|
|
286
286
|
case "end":
|
|
287
287
|
return _context4.stop();
|
|
288
288
|
}
|
|
@@ -301,36 +301,36 @@ _MessageComment = MessageComment;
|
|
|
301
301
|
options,
|
|
302
302
|
response,
|
|
303
303
|
_args5 = arguments;
|
|
304
|
-
return _regenerator.default.wrap(function
|
|
304
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
305
305
|
while (1) switch (_context5.prev = _context5.next) {
|
|
306
306
|
case 0:
|
|
307
307
|
params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
|
308
308
|
options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
|
|
309
309
|
if ((0, _utils.isObject)(params)) {
|
|
310
|
-
_context5.next =
|
|
310
|
+
_context5.next = 1;
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
314
|
-
case
|
|
314
|
+
case 1:
|
|
315
315
|
params.id = id;
|
|
316
316
|
if (params.id) {
|
|
317
|
-
_context5.next =
|
|
317
|
+
_context5.next = 2;
|
|
318
318
|
break;
|
|
319
319
|
}
|
|
320
320
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
321
|
-
case
|
|
321
|
+
case 2:
|
|
322
322
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
323
|
-
_context5.next =
|
|
323
|
+
_context5.next = 3;
|
|
324
324
|
break;
|
|
325
325
|
}
|
|
326
326
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
327
|
-
case
|
|
328
|
-
_context5.next =
|
|
327
|
+
case 3:
|
|
328
|
+
_context5.next = 4;
|
|
329
329
|
return _Api.default.sendRequest("/message_comments/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
330
|
-
case
|
|
330
|
+
case 4:
|
|
331
331
|
response = _context5.sent;
|
|
332
332
|
return _context5.abrupt("return", new _MessageComment(response === null || response === void 0 ? void 0 : response.data, options));
|
|
333
|
-
case
|
|
333
|
+
case 5:
|
|
334
334
|
case "end":
|
|
335
335
|
return _context5.stop();
|
|
336
336
|
}
|
|
@@ -353,35 +353,35 @@ _MessageComment = MessageComment;
|
|
|
353
353
|
options,
|
|
354
354
|
response,
|
|
355
355
|
_args6 = arguments;
|
|
356
|
-
return _regenerator.default.wrap(function
|
|
356
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
357
357
|
while (1) switch (_context6.prev = _context6.next) {
|
|
358
358
|
case 0:
|
|
359
359
|
params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
360
360
|
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
|
361
361
|
if (params.body) {
|
|
362
|
-
_context6.next =
|
|
362
|
+
_context6.next = 1;
|
|
363
363
|
break;
|
|
364
364
|
}
|
|
365
365
|
throw new errors.MissingParameterError('Parameter missing: body');
|
|
366
|
-
case
|
|
366
|
+
case 1:
|
|
367
367
|
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
368
|
-
_context6.next =
|
|
368
|
+
_context6.next = 2;
|
|
369
369
|
break;
|
|
370
370
|
}
|
|
371
371
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
372
|
-
case
|
|
372
|
+
case 2:
|
|
373
373
|
if (!(params.body && !(0, _utils.isString)(params.body))) {
|
|
374
|
-
_context6.next =
|
|
374
|
+
_context6.next = 3;
|
|
375
375
|
break;
|
|
376
376
|
}
|
|
377
377
|
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
|
|
378
|
-
case
|
|
379
|
-
_context6.next =
|
|
378
|
+
case 3:
|
|
379
|
+
_context6.next = 4;
|
|
380
380
|
return _Api.default.sendRequest('/message_comments', 'POST', params, options);
|
|
381
|
-
case
|
|
381
|
+
case 4:
|
|
382
382
|
response = _context6.sent;
|
|
383
383
|
return _context6.abrupt("return", new _MessageComment(response === null || response === void 0 ? void 0 : response.data, options));
|
|
384
|
-
case
|
|
384
|
+
case 5:
|
|
385
385
|
case "end":
|
|
386
386
|
return _context6.stop();
|
|
387
387
|
}
|
|
@@ -56,46 +56,46 @@ var MessageCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function Me
|
|
|
56
56
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
57
57
|
var params,
|
|
58
58
|
_args = arguments;
|
|
59
|
-
return _regenerator.default.wrap(function
|
|
59
|
+
return _regenerator.default.wrap(function (_context) {
|
|
60
60
|
while (1) switch (_context.prev = _context.next) {
|
|
61
61
|
case 0:
|
|
62
62
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
63
63
|
if (_this.attributes.id) {
|
|
64
|
-
_context.next =
|
|
64
|
+
_context.next = 1;
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
68
|
-
case
|
|
68
|
+
case 1:
|
|
69
69
|
if ((0, _utils.isObject)(params)) {
|
|
70
|
-
_context.next =
|
|
70
|
+
_context.next = 2;
|
|
71
71
|
break;
|
|
72
72
|
}
|
|
73
73
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
74
|
-
case
|
|
74
|
+
case 2:
|
|
75
75
|
params.id = _this.attributes.id;
|
|
76
76
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
77
|
-
_context.next =
|
|
77
|
+
_context.next = 3;
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
80
80
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
81
|
-
case
|
|
81
|
+
case 3:
|
|
82
82
|
if (params.id) {
|
|
83
|
-
_context.next =
|
|
83
|
+
_context.next = 5;
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
86
|
if (!_this.attributes.id) {
|
|
87
|
-
_context.next =
|
|
87
|
+
_context.next = 4;
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
90
|
params.id = _this.id;
|
|
91
|
-
_context.next =
|
|
91
|
+
_context.next = 5;
|
|
92
92
|
break;
|
|
93
|
-
case
|
|
93
|
+
case 4:
|
|
94
94
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
95
|
-
case
|
|
96
|
-
_context.next =
|
|
95
|
+
case 5:
|
|
96
|
+
_context.next = 6;
|
|
97
97
|
return _Api.default.sendRequest("/message_comment_reactions/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
|
98
|
-
case
|
|
98
|
+
case 6:
|
|
99
99
|
case "end":
|
|
100
100
|
return _context.stop();
|
|
101
101
|
}
|
|
@@ -107,22 +107,22 @@ var MessageCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function Me
|
|
|
107
107
|
});
|
|
108
108
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
109
109
|
var newObject;
|
|
110
|
-
return _regenerator.default.wrap(function
|
|
110
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
111
111
|
while (1) switch (_context2.prev = _context2.next) {
|
|
112
112
|
case 0:
|
|
113
113
|
if (!_this.attributes.id) {
|
|
114
|
-
_context2.next =
|
|
114
|
+
_context2.next = 1;
|
|
115
115
|
break;
|
|
116
116
|
}
|
|
117
117
|
throw new errors.NotImplementedError('The MessageCommentReaction object doesn\'t support updates.');
|
|
118
|
-
case
|
|
119
|
-
_context2.next =
|
|
118
|
+
case 1:
|
|
119
|
+
_context2.next = 2;
|
|
120
120
|
return MessageCommentReaction.create(_this.attributes, _this.options);
|
|
121
|
-
case
|
|
121
|
+
case 2:
|
|
122
122
|
newObject = _context2.sent;
|
|
123
123
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
124
124
|
return _context2.abrupt("return", true);
|
|
125
|
-
case
|
|
125
|
+
case 3:
|
|
126
126
|
case "end":
|
|
127
127
|
return _context2.stop();
|
|
128
128
|
}
|
|
@@ -154,49 +154,49 @@ _MessageCommentReaction = MessageCommentReaction;
|
|
|
154
154
|
options,
|
|
155
155
|
response,
|
|
156
156
|
_args3 = arguments;
|
|
157
|
-
return _regenerator.default.wrap(function
|
|
157
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
158
158
|
while (1) switch (_context3.prev = _context3.next) {
|
|
159
159
|
case 0:
|
|
160
160
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
161
161
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
162
162
|
if (params.message_comment_id) {
|
|
163
|
-
_context3.next =
|
|
163
|
+
_context3.next = 1;
|
|
164
164
|
break;
|
|
165
165
|
}
|
|
166
166
|
throw new errors.MissingParameterError('Parameter missing: message_comment_id');
|
|
167
|
-
case
|
|
167
|
+
case 1:
|
|
168
168
|
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
169
|
-
_context3.next =
|
|
169
|
+
_context3.next = 2;
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
173
|
-
case
|
|
173
|
+
case 2:
|
|
174
174
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
175
|
-
_context3.next =
|
|
175
|
+
_context3.next = 3;
|
|
176
176
|
break;
|
|
177
177
|
}
|
|
178
178
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
179
|
-
case
|
|
179
|
+
case 3:
|
|
180
180
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
181
|
-
_context3.next =
|
|
181
|
+
_context3.next = 4;
|
|
182
182
|
break;
|
|
183
183
|
}
|
|
184
184
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
185
|
-
case
|
|
185
|
+
case 4:
|
|
186
186
|
if (!(params.message_comment_id && !(0, _utils.isInt)(params.message_comment_id))) {
|
|
187
|
-
_context3.next =
|
|
187
|
+
_context3.next = 5;
|
|
188
188
|
break;
|
|
189
189
|
}
|
|
190
190
|
throw new errors.InvalidParameterError("Bad parameter: message_comment_id must be of type Int, received ".concat((0, _utils.getType)(params.message_comment_id)));
|
|
191
|
-
case
|
|
192
|
-
_context3.next =
|
|
191
|
+
case 5:
|
|
192
|
+
_context3.next = 6;
|
|
193
193
|
return _Api.default.sendRequest('/message_comment_reactions', 'GET', params, options);
|
|
194
|
-
case
|
|
194
|
+
case 6:
|
|
195
195
|
response = _context3.sent;
|
|
196
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) {
|
|
197
197
|
return new _MessageCommentReaction(obj, options);
|
|
198
198
|
})) || []);
|
|
199
|
-
case
|
|
199
|
+
case 7:
|
|
200
200
|
case "end":
|
|
201
201
|
return _context3.stop();
|
|
202
202
|
}
|
|
@@ -215,36 +215,36 @@ _MessageCommentReaction = MessageCommentReaction;
|
|
|
215
215
|
options,
|
|
216
216
|
response,
|
|
217
217
|
_args4 = arguments;
|
|
218
|
-
return _regenerator.default.wrap(function
|
|
218
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
219
219
|
while (1) switch (_context4.prev = _context4.next) {
|
|
220
220
|
case 0:
|
|
221
221
|
params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
222
222
|
options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
|
|
223
223
|
if ((0, _utils.isObject)(params)) {
|
|
224
|
-
_context4.next =
|
|
224
|
+
_context4.next = 1;
|
|
225
225
|
break;
|
|
226
226
|
}
|
|
227
227
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
228
|
-
case
|
|
228
|
+
case 1:
|
|
229
229
|
params.id = id;
|
|
230
230
|
if (params.id) {
|
|
231
|
-
_context4.next =
|
|
231
|
+
_context4.next = 2;
|
|
232
232
|
break;
|
|
233
233
|
}
|
|
234
234
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
235
|
-
case
|
|
235
|
+
case 2:
|
|
236
236
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
237
|
-
_context4.next =
|
|
237
|
+
_context4.next = 3;
|
|
238
238
|
break;
|
|
239
239
|
}
|
|
240
240
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
241
|
-
case
|
|
242
|
-
_context4.next =
|
|
241
|
+
case 3:
|
|
242
|
+
_context4.next = 4;
|
|
243
243
|
return _Api.default.sendRequest("/message_comment_reactions/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
244
|
-
case
|
|
244
|
+
case 4:
|
|
245
245
|
response = _context4.sent;
|
|
246
246
|
return _context4.abrupt("return", new _MessageCommentReaction(response === null || response === void 0 ? void 0 : response.data, options));
|
|
247
|
-
case
|
|
247
|
+
case 5:
|
|
248
248
|
case "end":
|
|
249
249
|
return _context4.stop();
|
|
250
250
|
}
|
|
@@ -267,35 +267,35 @@ _MessageCommentReaction = MessageCommentReaction;
|
|
|
267
267
|
options,
|
|
268
268
|
response,
|
|
269
269
|
_args5 = arguments;
|
|
270
|
-
return _regenerator.default.wrap(function
|
|
270
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
271
271
|
while (1) switch (_context5.prev = _context5.next) {
|
|
272
272
|
case 0:
|
|
273
273
|
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
274
274
|
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
|
275
275
|
if (params.emoji) {
|
|
276
|
-
_context5.next =
|
|
276
|
+
_context5.next = 1;
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
throw new errors.MissingParameterError('Parameter missing: emoji');
|
|
280
|
-
case
|
|
280
|
+
case 1:
|
|
281
281
|
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
282
|
-
_context5.next =
|
|
282
|
+
_context5.next = 2;
|
|
283
283
|
break;
|
|
284
284
|
}
|
|
285
285
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
286
|
-
case
|
|
286
|
+
case 2:
|
|
287
287
|
if (!(params.emoji && !(0, _utils.isString)(params.emoji))) {
|
|
288
|
-
_context5.next =
|
|
288
|
+
_context5.next = 3;
|
|
289
289
|
break;
|
|
290
290
|
}
|
|
291
291
|
throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params.emoji)));
|
|
292
|
-
case
|
|
293
|
-
_context5.next =
|
|
292
|
+
case 3:
|
|
293
|
+
_context5.next = 4;
|
|
294
294
|
return _Api.default.sendRequest('/message_comment_reactions', 'POST', params, options);
|
|
295
|
-
case
|
|
295
|
+
case 4:
|
|
296
296
|
response = _context5.sent;
|
|
297
297
|
return _context5.abrupt("return", new _MessageCommentReaction(response === null || response === void 0 ? void 0 : response.data, options));
|
|
298
|
-
case
|
|
298
|
+
case 5:
|
|
299
299
|
case "end":
|
|
300
300
|
return _context5.stop();
|
|
301
301
|
}
|