files.com 1.2.249 → 1.2.251
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/User.md +4 -1
- 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 +71 -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 +223 -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/User.js +6 -0
|
@@ -66,69 +66,69 @@ var FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
|
|
|
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("/file_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 FileComment(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 FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
|
|
|
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("/file_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 FileComment = /*#__PURE__*/(0, _createClass2.default)(function FileComment()
|
|
|
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 FileComment.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
|
}
|
|
@@ -239,50 +239,50 @@ _FileComment = FileComment;
|
|
|
239
239
|
options,
|
|
240
240
|
response,
|
|
241
241
|
_args4 = arguments;
|
|
242
|
-
return _regenerator.default.wrap(function
|
|
242
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
243
243
|
while (1) switch (_context4.prev = _context4.next) {
|
|
244
244
|
case 0:
|
|
245
245
|
params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
246
246
|
options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
|
|
247
247
|
if ((0, _utils.isObject)(params)) {
|
|
248
|
-
_context4.next =
|
|
248
|
+
_context4.next = 1;
|
|
249
249
|
break;
|
|
250
250
|
}
|
|
251
251
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
252
|
-
case
|
|
252
|
+
case 1:
|
|
253
253
|
params.path = path;
|
|
254
254
|
if (params.path) {
|
|
255
|
-
_context4.next =
|
|
255
|
+
_context4.next = 2;
|
|
256
256
|
break;
|
|
257
257
|
}
|
|
258
258
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
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.path && !(0, _utils.isString)(params.path))) {
|
|
273
|
-
_context4.next =
|
|
273
|
+
_context4.next = 5;
|
|
274
274
|
break;
|
|
275
275
|
}
|
|
276
276
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
277
|
-
case
|
|
278
|
-
_context4.next =
|
|
277
|
+
case 5:
|
|
278
|
+
_context4.next = 6;
|
|
279
279
|
return _Api.default.sendRequest("/file_comments/files/".concat(encodeURIComponent(params.path)), '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 _FileComment(obj, options);
|
|
284
284
|
})) || []);
|
|
285
|
-
case
|
|
285
|
+
case 7:
|
|
286
286
|
case "end":
|
|
287
287
|
return _context4.stop();
|
|
288
288
|
}
|
|
@@ -300,41 +300,41 @@ _FileComment = FileComment;
|
|
|
300
300
|
options,
|
|
301
301
|
response,
|
|
302
302
|
_args5 = arguments;
|
|
303
|
-
return _regenerator.default.wrap(function
|
|
303
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
304
304
|
while (1) switch (_context5.prev = _context5.next) {
|
|
305
305
|
case 0:
|
|
306
306
|
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
307
307
|
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
|
|
308
308
|
if (params.body) {
|
|
309
|
-
_context5.next =
|
|
309
|
+
_context5.next = 1;
|
|
310
310
|
break;
|
|
311
311
|
}
|
|
312
312
|
throw new errors.MissingParameterError('Parameter missing: body');
|
|
313
|
-
case
|
|
313
|
+
case 1:
|
|
314
314
|
if (params.path) {
|
|
315
|
-
_context5.next =
|
|
315
|
+
_context5.next = 2;
|
|
316
316
|
break;
|
|
317
317
|
}
|
|
318
318
|
throw new errors.MissingParameterError('Parameter missing: path');
|
|
319
|
-
case
|
|
319
|
+
case 2:
|
|
320
320
|
if (!(params.body && !(0, _utils.isString)(params.body))) {
|
|
321
|
-
_context5.next =
|
|
321
|
+
_context5.next = 3;
|
|
322
322
|
break;
|
|
323
323
|
}
|
|
324
324
|
throw new errors.InvalidParameterError("Bad parameter: body must be of type String, received ".concat((0, _utils.getType)(params.body)));
|
|
325
|
-
case
|
|
325
|
+
case 3:
|
|
326
326
|
if (!(params.path && !(0, _utils.isString)(params.path))) {
|
|
327
|
-
_context5.next =
|
|
327
|
+
_context5.next = 4;
|
|
328
328
|
break;
|
|
329
329
|
}
|
|
330
330
|
throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
|
|
331
|
-
case
|
|
332
|
-
_context5.next =
|
|
331
|
+
case 4:
|
|
332
|
+
_context5.next = 5;
|
|
333
333
|
return _Api.default.sendRequest('/file_comments', 'POST', params, options);
|
|
334
|
-
case
|
|
334
|
+
case 5:
|
|
335
335
|
response = _context5.sent;
|
|
336
336
|
return _context5.abrupt("return", new _FileComment(response === null || response === void 0 ? void 0 : response.data, options));
|
|
337
|
-
case
|
|
337
|
+
case 6:
|
|
338
338
|
case "end":
|
|
339
339
|
return _context5.stop();
|
|
340
340
|
}
|
|
@@ -63,46 +63,46 @@ var FileCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function FileC
|
|
|
63
63
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
64
64
|
var params,
|
|
65
65
|
_args = arguments;
|
|
66
|
-
return _regenerator.default.wrap(function
|
|
66
|
+
return _regenerator.default.wrap(function (_context) {
|
|
67
67
|
while (1) switch (_context.prev = _context.next) {
|
|
68
68
|
case 0:
|
|
69
69
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
70
70
|
if (_this.attributes.id) {
|
|
71
|
-
_context.next =
|
|
71
|
+
_context.next = 1;
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
74
|
throw new errors.EmptyPropertyError('Current object has no id');
|
|
75
|
-
case
|
|
75
|
+
case 1:
|
|
76
76
|
if ((0, _utils.isObject)(params)) {
|
|
77
|
-
_context.next =
|
|
77
|
+
_context.next = 2;
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
80
80
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
81
|
-
case
|
|
81
|
+
case 2:
|
|
82
82
|
params.id = _this.attributes.id;
|
|
83
83
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
84
|
-
_context.next =
|
|
84
|
+
_context.next = 3;
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
88
|
-
case
|
|
88
|
+
case 3:
|
|
89
89
|
if (params.id) {
|
|
90
|
-
_context.next =
|
|
90
|
+
_context.next = 5;
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
if (!_this.attributes.id) {
|
|
94
|
-
_context.next =
|
|
94
|
+
_context.next = 4;
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
97
|
params.id = _this.id;
|
|
98
|
-
_context.next =
|
|
98
|
+
_context.next = 5;
|
|
99
99
|
break;
|
|
100
|
-
case
|
|
100
|
+
case 4:
|
|
101
101
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
102
|
-
case
|
|
103
|
-
_context.next =
|
|
102
|
+
case 5:
|
|
103
|
+
_context.next = 6;
|
|
104
104
|
return _Api.default.sendRequest("/file_comment_reactions/".concat(encodeURIComponent(params.id)), 'DELETE', params, _this.options);
|
|
105
|
-
case
|
|
105
|
+
case 6:
|
|
106
106
|
case "end":
|
|
107
107
|
return _context.stop();
|
|
108
108
|
}
|
|
@@ -114,22 +114,22 @@ var FileCommentReaction = /*#__PURE__*/(0, _createClass2.default)(function FileC
|
|
|
114
114
|
});
|
|
115
115
|
(0, _defineProperty2.default)(this, "save", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
116
116
|
var newObject;
|
|
117
|
-
return _regenerator.default.wrap(function
|
|
117
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
118
118
|
while (1) switch (_context2.prev = _context2.next) {
|
|
119
119
|
case 0:
|
|
120
120
|
if (!_this.attributes.id) {
|
|
121
|
-
_context2.next =
|
|
121
|
+
_context2.next = 1;
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
124
|
throw new errors.NotImplementedError('The FileCommentReaction object doesn\'t support updates.');
|
|
125
|
-
case
|
|
126
|
-
_context2.next =
|
|
125
|
+
case 1:
|
|
126
|
+
_context2.next = 2;
|
|
127
127
|
return FileCommentReaction.create(_this.attributes, _this.options);
|
|
128
|
-
case
|
|
128
|
+
case 2:
|
|
129
129
|
newObject = _context2.sent;
|
|
130
130
|
_this.attributes = _objectSpread({}, newObject.attributes);
|
|
131
131
|
return _context2.abrupt("return", true);
|
|
132
|
-
case
|
|
132
|
+
case 3:
|
|
133
133
|
case "end":
|
|
134
134
|
return _context2.stop();
|
|
135
135
|
}
|
|
@@ -158,47 +158,47 @@ _FileCommentReaction = FileCommentReaction;
|
|
|
158
158
|
options,
|
|
159
159
|
response,
|
|
160
160
|
_args3 = arguments;
|
|
161
|
-
return _regenerator.default.wrap(function
|
|
161
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
162
162
|
while (1) switch (_context3.prev = _context3.next) {
|
|
163
163
|
case 0:
|
|
164
164
|
params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
165
165
|
options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
|
|
166
166
|
if (params.file_comment_id) {
|
|
167
|
-
_context3.next =
|
|
167
|
+
_context3.next = 1;
|
|
168
168
|
break;
|
|
169
169
|
}
|
|
170
170
|
throw new errors.MissingParameterError('Parameter missing: file_comment_id');
|
|
171
|
-
case
|
|
171
|
+
case 1:
|
|
172
172
|
if (params.emoji) {
|
|
173
|
-
_context3.next =
|
|
173
|
+
_context3.next = 2;
|
|
174
174
|
break;
|
|
175
175
|
}
|
|
176
176
|
throw new errors.MissingParameterError('Parameter missing: emoji');
|
|
177
|
-
case
|
|
177
|
+
case 2:
|
|
178
178
|
if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
|
|
179
|
-
_context3.next =
|
|
179
|
+
_context3.next = 3;
|
|
180
180
|
break;
|
|
181
181
|
}
|
|
182
182
|
throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
|
|
183
|
-
case
|
|
183
|
+
case 3:
|
|
184
184
|
if (!(params.file_comment_id && !(0, _utils.isInt)(params.file_comment_id))) {
|
|
185
|
-
_context3.next =
|
|
185
|
+
_context3.next = 4;
|
|
186
186
|
break;
|
|
187
187
|
}
|
|
188
188
|
throw new errors.InvalidParameterError("Bad parameter: file_comment_id must be of type Int, received ".concat((0, _utils.getType)(params.file_comment_id)));
|
|
189
|
-
case
|
|
189
|
+
case 4:
|
|
190
190
|
if (!(params.emoji && !(0, _utils.isString)(params.emoji))) {
|
|
191
|
-
_context3.next =
|
|
191
|
+
_context3.next = 5;
|
|
192
192
|
break;
|
|
193
193
|
}
|
|
194
194
|
throw new errors.InvalidParameterError("Bad parameter: emoji must be of type String, received ".concat((0, _utils.getType)(params.emoji)));
|
|
195
|
-
case
|
|
196
|
-
_context3.next =
|
|
195
|
+
case 5:
|
|
196
|
+
_context3.next = 6;
|
|
197
197
|
return _Api.default.sendRequest('/file_comment_reactions', 'POST', params, options);
|
|
198
|
-
case
|
|
198
|
+
case 6:
|
|
199
199
|
response = _context3.sent;
|
|
200
200
|
return _context3.abrupt("return", new _FileCommentReaction(response === null || response === void 0 ? void 0 : response.data, options));
|
|
201
|
-
case
|
|
201
|
+
case 7:
|
|
202
202
|
case "end":
|
|
203
203
|
return _context3.stop();
|
|
204
204
|
}
|
|
@@ -90,36 +90,36 @@ _FileMigration = FileMigration;
|
|
|
90
90
|
options,
|
|
91
91
|
response,
|
|
92
92
|
_args = arguments;
|
|
93
|
-
return _regenerator.default.wrap(function
|
|
93
|
+
return _regenerator.default.wrap(function (_context) {
|
|
94
94
|
while (1) switch (_context.prev = _context.next) {
|
|
95
95
|
case 0:
|
|
96
96
|
params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
97
97
|
options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
|
|
98
98
|
if ((0, _utils.isObject)(params)) {
|
|
99
|
-
_context.next =
|
|
99
|
+
_context.next = 1;
|
|
100
100
|
break;
|
|
101
101
|
}
|
|
102
102
|
throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
|
|
103
|
-
case
|
|
103
|
+
case 1:
|
|
104
104
|
params.id = id;
|
|
105
105
|
if (params.id) {
|
|
106
|
-
_context.next =
|
|
106
|
+
_context.next = 2;
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
109
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
110
|
-
case
|
|
110
|
+
case 2:
|
|
111
111
|
if (!(params.id && !(0, _utils.isInt)(params.id))) {
|
|
112
|
-
_context.next =
|
|
112
|
+
_context.next = 3;
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
115
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
116
|
-
case
|
|
117
|
-
_context.next =
|
|
116
|
+
case 3:
|
|
117
|
+
_context.next = 4;
|
|
118
118
|
return _Api.default.sendRequest("/file_migrations/".concat(encodeURIComponent(params.id)), 'GET', params, options);
|
|
119
|
-
case
|
|
119
|
+
case 4:
|
|
120
120
|
response = _context.sent;
|
|
121
121
|
return _context.abrupt("return", new _FileMigration(response === null || response === void 0 ? void 0 : response.data, options));
|
|
122
|
-
case
|
|
122
|
+
case 5:
|
|
123
123
|
case "end":
|
|
124
124
|
return _context.stop();
|
|
125
125
|
}
|
|
@@ -89,31 +89,31 @@ _FileMigrationLog = FileMigrationLog;
|
|
|
89
89
|
options,
|
|
90
90
|
response,
|
|
91
91
|
_args = arguments;
|
|
92
|
-
return _regenerator.default.wrap(function
|
|
92
|
+
return _regenerator.default.wrap(function (_context) {
|
|
93
93
|
while (1) switch (_context.prev = _context.next) {
|
|
94
94
|
case 0:
|
|
95
95
|
params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
96
96
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
97
97
|
if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
|
|
98
|
-
_context.next =
|
|
98
|
+
_context.next = 1;
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
101
|
throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
|
|
102
|
-
case
|
|
102
|
+
case 1:
|
|
103
103
|
if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
|
|
104
|
-
_context.next =
|
|
104
|
+
_context.next = 2;
|
|
105
105
|
break;
|
|
106
106
|
}
|
|
107
107
|
throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
|
|
108
|
-
case
|
|
109
|
-
_context.next =
|
|
108
|
+
case 2:
|
|
109
|
+
_context.next = 3;
|
|
110
110
|
return _Api.default.sendRequest('/file_migration_logs', 'GET', params, options);
|
|
111
|
-
case
|
|
111
|
+
case 3:
|
|
112
112
|
response = _context.sent;
|
|
113
113
|
return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
|
|
114
114
|
return new _FileMigrationLog(obj, options);
|
|
115
115
|
})) || []);
|
|
116
|
-
case
|
|
116
|
+
case 4:
|
|
117
117
|
case "end":
|
|
118
118
|
return _context.stop();
|
|
119
119
|
}
|