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