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
@@ -60,72 +60,70 @@ var FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
|
|
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
|
-
if (params['id']) {
|
93
|
-
_context.next = 16;
|
94
|
-
break;
|
95
|
-
}
|
96
|
-
if (!_this.attributes.id) {
|
97
|
-
_context.next = 15;
|
98
|
-
break;
|
99
|
-
}
|
100
|
-
params['id'] = _this.id;
|
63
|
+
while (1) switch (_context.prev = _context.next) {
|
64
|
+
case 0:
|
65
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
66
|
+
if (_this.attributes.id) {
|
67
|
+
_context.next = 3;
|
68
|
+
break;
|
69
|
+
}
|
70
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
71
|
+
case 3:
|
72
|
+
if ((0, _utils.isObject)(params)) {
|
73
|
+
_context.next = 5;
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
77
|
+
case 5:
|
78
|
+
params.id = _this.attributes.id;
|
79
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
80
|
+
_context.next = 8;
|
81
|
+
break;
|
82
|
+
}
|
83
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
84
|
+
case 8:
|
85
|
+
if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
|
86
|
+
_context.next = 10;
|
87
|
+
break;
|
88
|
+
}
|
89
|
+
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(body)));
|
90
|
+
case 10:
|
91
|
+
if (params['id']) {
|
101
92
|
_context.next = 16;
|
102
93
|
break;
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
94
|
+
}
|
95
|
+
if (!_this.attributes.id) {
|
96
|
+
_context.next = 15;
|
97
|
+
break;
|
98
|
+
}
|
99
|
+
params['id'] = _this.id;
|
100
|
+
_context.next = 16;
|
101
|
+
break;
|
102
|
+
case 15:
|
103
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
104
|
+
case 16:
|
105
|
+
if (params['body']) {
|
115
106
|
_context.next = 22;
|
116
107
|
break;
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
108
|
+
}
|
109
|
+
if (!_this.attributes.body) {
|
110
|
+
_context.next = 21;
|
111
|
+
break;
|
112
|
+
}
|
113
|
+
params['body'] = _this.body;
|
114
|
+
_context.next = 22;
|
115
|
+
break;
|
116
|
+
case 21:
|
117
|
+
throw new errors.MissingParameterError('Parameter missing: body');
|
118
|
+
case 22:
|
119
|
+
_context.next = 24;
|
120
|
+
return _Api.default.sendRequest("/file_comments/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
|
121
|
+
case 24:
|
122
|
+
response = _context.sent;
|
123
|
+
return _context.abrupt("return", new FileComment(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
124
|
+
case 26:
|
125
|
+
case "end":
|
126
|
+
return _context.stop();
|
129
127
|
}
|
130
128
|
}, _callee);
|
131
129
|
})));
|
@@ -134,52 +132,50 @@ var FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
|
|
134
132
|
response,
|
135
133
|
_args2 = arguments;
|
136
134
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
137
|
-
while (1) {
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
if (params['id']) {
|
161
|
-
_context2.next = 14;
|
162
|
-
break;
|
163
|
-
}
|
164
|
-
if (!_this.attributes.id) {
|
165
|
-
_context2.next = 13;
|
166
|
-
break;
|
167
|
-
}
|
168
|
-
params['id'] = _this.id;
|
135
|
+
while (1) switch (_context2.prev = _context2.next) {
|
136
|
+
case 0:
|
137
|
+
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
138
|
+
if (_this.attributes.id) {
|
139
|
+
_context2.next = 3;
|
140
|
+
break;
|
141
|
+
}
|
142
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
143
|
+
case 3:
|
144
|
+
if ((0, _utils.isObject)(params)) {
|
145
|
+
_context2.next = 5;
|
146
|
+
break;
|
147
|
+
}
|
148
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
149
|
+
case 5:
|
150
|
+
params.id = _this.attributes.id;
|
151
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
152
|
+
_context2.next = 8;
|
153
|
+
break;
|
154
|
+
}
|
155
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
156
|
+
case 8:
|
157
|
+
if (params['id']) {
|
169
158
|
_context2.next = 14;
|
170
159
|
break;
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
160
|
+
}
|
161
|
+
if (!_this.attributes.id) {
|
162
|
+
_context2.next = 13;
|
163
|
+
break;
|
164
|
+
}
|
165
|
+
params['id'] = _this.id;
|
166
|
+
_context2.next = 14;
|
167
|
+
break;
|
168
|
+
case 13:
|
169
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
170
|
+
case 14:
|
171
|
+
_context2.next = 16;
|
172
|
+
return _Api.default.sendRequest("/file_comments/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
|
173
|
+
case 16:
|
174
|
+
response = _context2.sent;
|
175
|
+
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
176
|
+
case 18:
|
177
|
+
case "end":
|
178
|
+
return _context2.stop();
|
183
179
|
}
|
184
180
|
}, _callee2);
|
185
181
|
})));
|
@@ -217,104 +213,100 @@ var FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
|
|
217
213
|
response,
|
218
214
|
_args3 = arguments;
|
219
215
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
220
|
-
while (1) {
|
221
|
-
switch (_context3.prev = _context3.next) {
|
222
|
-
case 0:
|
223
|
-
params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
224
|
-
options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
|
225
|
-
if ((0, _utils.isObject)(params)) {
|
226
|
-
_context3.next = 4;
|
227
|
-
break;
|
228
|
-
}
|
229
|
-
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
230
|
-
case 4:
|
231
|
-
params['path'] = path;
|
232
|
-
if (params['path']) {
|
233
|
-
_context3.next = 7;
|
234
|
-
break;
|
235
|
-
}
|
236
|
-
throw new errors.MissingParameterError('Parameter missing: path');
|
237
|
-
case 7:
|
238
|
-
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
239
|
-
_context3.next = 9;
|
240
|
-
break;
|
241
|
-
}
|
242
|
-
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
|
243
|
-
case 9:
|
244
|
-
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
245
|
-
_context3.next = 11;
|
246
|
-
break;
|
247
|
-
}
|
248
|
-
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
|
249
|
-
case 11:
|
250
|
-
if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
|
251
|
-
_context3.next = 13;
|
252
|
-
break;
|
253
|
-
}
|
254
|
-
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
|
255
|
-
case 13:
|
256
|
-
_context3.next = 15;
|
257
|
-
return _Api.default.sendRequest("/file_comments/files/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
|
258
|
-
case 15:
|
259
|
-
response = _context3.sent;
|
260
|
-
return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
261
|
-
return new FileComment(obj, options);
|
262
|
-
})) || []);
|
263
|
-
case 17:
|
264
|
-
case "end":
|
265
|
-
return _context3.stop();
|
266
|
-
}
|
267
|
-
}
|
268
|
-
}, _callee3);
|
269
|
-
}));
|
270
|
-
return function (_x) {
|
271
|
-
return _ref5.apply(this, arguments);
|
272
|
-
};
|
273
|
-
}());
|
274
|
-
(0, _defineProperty2.default)(FileComment, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
275
|
-
var params,
|
276
|
-
options,
|
277
|
-
response,
|
278
|
-
_args4 = arguments;
|
279
|
-
return _regenerator.default.wrap(function _callee4$(_context4) {
|
280
|
-
while (1) {
|
281
|
-
switch (_context4.prev = _context4.next) {
|
216
|
+
while (1) switch (_context3.prev = _context3.next) {
|
282
217
|
case 0:
|
283
|
-
params =
|
284
|
-
options =
|
285
|
-
if (params
|
286
|
-
|
218
|
+
params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
219
|
+
options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
|
220
|
+
if ((0, _utils.isObject)(params)) {
|
221
|
+
_context3.next = 4;
|
287
222
|
break;
|
288
223
|
}
|
289
|
-
throw new errors.
|
224
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
290
225
|
case 4:
|
226
|
+
params['path'] = path;
|
291
227
|
if (params['path']) {
|
292
|
-
|
228
|
+
_context3.next = 7;
|
293
229
|
break;
|
294
230
|
}
|
295
231
|
throw new errors.MissingParameterError('Parameter missing: path');
|
296
|
-
case
|
297
|
-
if (!(params['
|
298
|
-
|
232
|
+
case 7:
|
233
|
+
if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
|
234
|
+
_context3.next = 9;
|
299
235
|
break;
|
300
236
|
}
|
301
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
302
|
-
case
|
237
|
+
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
|
238
|
+
case 9:
|
239
|
+
if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
|
240
|
+
_context3.next = 11;
|
241
|
+
break;
|
242
|
+
}
|
243
|
+
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
|
244
|
+
case 11:
|
303
245
|
if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
|
304
|
-
|
246
|
+
_context3.next = 13;
|
305
247
|
break;
|
306
248
|
}
|
307
249
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
|
308
|
-
case
|
309
|
-
|
310
|
-
return _Api.default.sendRequest("/file_comments", '
|
311
|
-
case
|
312
|
-
response =
|
313
|
-
return
|
314
|
-
|
250
|
+
case 13:
|
251
|
+
_context3.next = 15;
|
252
|
+
return _Api.default.sendRequest("/file_comments/files/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
|
253
|
+
case 15:
|
254
|
+
response = _context3.sent;
|
255
|
+
return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
256
|
+
return new FileComment(obj, options);
|
257
|
+
})) || []);
|
258
|
+
case 17:
|
315
259
|
case "end":
|
316
|
-
return
|
260
|
+
return _context3.stop();
|
317
261
|
}
|
262
|
+
}, _callee3);
|
263
|
+
}));
|
264
|
+
return function (_x) {
|
265
|
+
return _ref5.apply(this, arguments);
|
266
|
+
};
|
267
|
+
}());
|
268
|
+
(0, _defineProperty2.default)(FileComment, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
269
|
+
var params,
|
270
|
+
options,
|
271
|
+
response,
|
272
|
+
_args4 = arguments;
|
273
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
274
|
+
while (1) switch (_context4.prev = _context4.next) {
|
275
|
+
case 0:
|
276
|
+
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
277
|
+
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
278
|
+
if (params['body']) {
|
279
|
+
_context4.next = 4;
|
280
|
+
break;
|
281
|
+
}
|
282
|
+
throw new errors.MissingParameterError('Parameter missing: body');
|
283
|
+
case 4:
|
284
|
+
if (params['path']) {
|
285
|
+
_context4.next = 6;
|
286
|
+
break;
|
287
|
+
}
|
288
|
+
throw new errors.MissingParameterError('Parameter missing: path');
|
289
|
+
case 6:
|
290
|
+
if (!(params['body'] && !(0, _utils.isString)(params['body']))) {
|
291
|
+
_context4.next = 8;
|
292
|
+
break;
|
293
|
+
}
|
294
|
+
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params['body'])));
|
295
|
+
case 8:
|
296
|
+
if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
|
297
|
+
_context4.next = 10;
|
298
|
+
break;
|
299
|
+
}
|
300
|
+
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
|
301
|
+
case 10:
|
302
|
+
_context4.next = 12;
|
303
|
+
return _Api.default.sendRequest("/file_comments", 'POST', params, options);
|
304
|
+
case 12:
|
305
|
+
response = _context4.sent;
|
306
|
+
return _context4.abrupt("return", new FileComment(response === null || response === void 0 ? void 0 : response.data, options));
|
307
|
+
case 14:
|
308
|
+
case "end":
|
309
|
+
return _context4.stop();
|
318
310
|
}
|
319
311
|
}, _callee4);
|
320
312
|
})));
|
@@ -60,52 +60,50 @@ var FileCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function FileC
|
|
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
|
-
if (params['id']) {
|
87
|
-
_context.next = 14;
|
88
|
-
break;
|
89
|
-
}
|
90
|
-
if (!_this.attributes.id) {
|
91
|
-
_context.next = 13;
|
92
|
-
break;
|
93
|
-
}
|
94
|
-
params['id'] = _this.id;
|
63
|
+
while (1) switch (_context.prev = _context.next) {
|
64
|
+
case 0:
|
65
|
+
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
66
|
+
if (_this.attributes.id) {
|
67
|
+
_context.next = 3;
|
68
|
+
break;
|
69
|
+
}
|
70
|
+
throw new errors.EmptyPropertyError('Current object has no id');
|
71
|
+
case 3:
|
72
|
+
if ((0, _utils.isObject)(params)) {
|
73
|
+
_context.next = 5;
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
77
|
+
case 5:
|
78
|
+
params.id = _this.attributes.id;
|
79
|
+
if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
|
80
|
+
_context.next = 8;
|
81
|
+
break;
|
82
|
+
}
|
83
|
+
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
|
84
|
+
case 8:
|
85
|
+
if (params['id']) {
|
95
86
|
_context.next = 14;
|
96
87
|
break;
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
88
|
+
}
|
89
|
+
if (!_this.attributes.id) {
|
90
|
+
_context.next = 13;
|
91
|
+
break;
|
92
|
+
}
|
93
|
+
params['id'] = _this.id;
|
94
|
+
_context.next = 14;
|
95
|
+
break;
|
96
|
+
case 13:
|
97
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
98
|
+
case 14:
|
99
|
+
_context.next = 16;
|
100
|
+
return _Api.default.sendRequest("/file_comment_reactions/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
|
101
|
+
case 16:
|
102
|
+
response = _context.sent;
|
103
|
+
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
|
104
|
+
case 18:
|
105
|
+
case "end":
|
106
|
+
return _context.stop();
|
109
107
|
}
|
110
108
|
}, _callee);
|
111
109
|
})));
|
@@ -141,50 +139,48 @@ var FileCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function FileC
|
|
141
139
|
response,
|
142
140
|
_args2 = arguments;
|
143
141
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
144
|
-
while (1) {
|
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
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
return _context2.stop();
|
187
|
-
}
|
142
|
+
while (1) switch (_context2.prev = _context2.next) {
|
143
|
+
case 0:
|
144
|
+
params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
145
|
+
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
146
|
+
if (params['file_comment_id']) {
|
147
|
+
_context2.next = 4;
|
148
|
+
break;
|
149
|
+
}
|
150
|
+
throw new errors.MissingParameterError('Parameter missing: file_comment_id');
|
151
|
+
case 4:
|
152
|
+
if (params['emoji']) {
|
153
|
+
_context2.next = 6;
|
154
|
+
break;
|
155
|
+
}
|
156
|
+
throw new errors.MissingParameterError('Parameter missing: emoji');
|
157
|
+
case 6:
|
158
|
+
if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
|
159
|
+
_context2.next = 8;
|
160
|
+
break;
|
161
|
+
}
|
162
|
+
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
|
163
|
+
case 8:
|
164
|
+
if (!(params['file_comment_id'] && !(0, _utils.isInt)(params['file_comment_id']))) {
|
165
|
+
_context2.next = 10;
|
166
|
+
break;
|
167
|
+
}
|
168
|
+
throw new errors.InvalidParameterError("Bad parameter: file_comment_id must be of type Int, received ".concat((0, _utils.getType)(params['file_comment_id'])));
|
169
|
+
case 10:
|
170
|
+
if (!(params['emoji'] && !(0, _utils.isString)(params['emoji']))) {
|
171
|
+
_context2.next = 12;
|
172
|
+
break;
|
173
|
+
}
|
174
|
+
throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params['emoji'])));
|
175
|
+
case 12:
|
176
|
+
_context2.next = 14;
|
177
|
+
return _Api.default.sendRequest("/file_comment_reactions", 'POST', params, options);
|
178
|
+
case 14:
|
179
|
+
response = _context2.sent;
|
180
|
+
return _context2.abrupt("return", new FileCommentReaction(response === null || response === void 0 ? void 0 : response.data, options));
|
181
|
+
case 16:
|
182
|
+
case "end":
|
183
|
+
return _context2.stop();
|
188
184
|
}
|
189
185
|
}, _callee2);
|
190
186
|
})));
|