Skip to content

Commit 2170693

Browse files
[Bot] push changes from Files.com
1 parent 648ba62 commit 2170693

File tree

11 files changed

+841
-821
lines changed

11 files changed

+841
-821
lines changed

_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.435
1+
1.0.436

docs/models/Group.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ await Group.find(id)
5959

6060
```
6161
await Group.create({
62-
'name': "owners",
6362
'notes': "example",
6463
'user_ids': "1",
6564
'admin_ids': "1",
65+
'name': "name",
6666
})
6767
```
6868

6969

7070
### Parameters
7171

72-
* `name` (string): Group name.
7372
* `notes` (string): Group notes.
7473
* `user_ids` (string): A list of user ids. If sent as a string, should be comma-delimited.
7574
* `admin_ids` (string): A list of group admin user ids. If sent as a string, should be comma-delimited.
75+
* `name` (string): Required - Group name.
7676

7777
---
7878

@@ -82,20 +82,20 @@ await Group.create({
8282
const [group] = await Group.list()
8383
8484
await group.update({
85-
'name': "owners",
8685
'notes': "example",
8786
'user_ids': "1",
8887
'admin_ids': "1",
88+
'name': "owners",
8989
})
9090
```
9191

9292
### Parameters
9393

9494
* `id` (int64): Required - Group ID.
95-
* `name` (string): Group name.
9695
* `notes` (string): Group notes.
9796
* `user_ids` (string): A list of user ids. If sent as a string, should be comma-delimited.
9897
* `admin_ids` (string): A list of group admin user ids. If sent as a string, should be comma-delimited.
98+
* `name` (string): Group name.
9999

100100
### Example Response
101101

docs/models/User.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ await User.create({
279279
* `require_2fa` (string): 2FA required setting
280280
* `time_zone` (string): User time zone
281281
* `user_root` (string): Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
282-
* `username` (string): User's username
282+
* `username` (string): Required - User's username
283283

284284
---
285285

lib/Files.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
1111
var apiKey;
1212
var baseUrl = 'https://app.files.com';
1313
var sessionId = null;
14-
var version = '1.0.435';
14+
var version = '1.0.436';
1515
var userAgent = "Files.com JavaScript SDK v".concat(version);
1616
var logLevel = _Logger.LogLevel.INFO;
1717
var debugRequest = false;

lib/models/Group.js

+21-15
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ var Group = /*#__PURE__*/(0, _createClass2.default)(function Group() {
7676
_this.attributes.usernames = value;
7777
});
7878
// Parameters:
79-
// name - string - Group name.
8079
// notes - string - Group notes.
8180
// user_ids - string - A list of user ids. If sent as a string, should be comma-delimited.
8281
// admin_ids - string - A list of group admin user ids. If sent as a string, should be comma-delimited.
82+
// name - string - Group name.
8383
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
8484
var params,
8585
response,
@@ -107,29 +107,29 @@ var Group = /*#__PURE__*/(0, _createClass2.default)(function Group() {
107107
}
108108
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
109109
case 8:
110-
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
110+
if (!(params['notes'] && !(0, _utils.isString)(params['notes']))) {
111111
_context.next = 10;
112112
break;
113113
}
114-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
114+
throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params['notes'])));
115115
case 10:
116-
if (!(params['notes'] && !(0, _utils.isString)(params['notes']))) {
116+
if (!(params['user_ids'] && !(0, _utils.isString)(params['user_ids']))) {
117117
_context.next = 12;
118118
break;
119119
}
120-
throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params['notes'])));
120+
throw new errors.InvalidParameterError("Bad parameter: user_ids must be of type String, received ".concat((0, _utils.getType)(params['user_ids'])));
121121
case 12:
122-
if (!(params['user_ids'] && !(0, _utils.isString)(params['user_ids']))) {
122+
if (!(params['admin_ids'] && !(0, _utils.isString)(params['admin_ids']))) {
123123
_context.next = 14;
124124
break;
125125
}
126-
throw new errors.InvalidParameterError("Bad parameter: user_ids must be of type String, received ".concat((0, _utils.getType)(params['user_ids'])));
126+
throw new errors.InvalidParameterError("Bad parameter: admin_ids must be of type String, received ".concat((0, _utils.getType)(params['admin_ids'])));
127127
case 14:
128-
if (!(params['admin_ids'] && !(0, _utils.isString)(params['admin_ids']))) {
128+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
129129
_context.next = 16;
130130
break;
131131
}
132-
throw new errors.InvalidParameterError("Bad parameter: admin_ids must be of type String, received ".concat((0, _utils.getType)(params['admin_ids'])));
132+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
133133
case 16:
134134
if (params['id']) {
135135
_context.next = 22;
@@ -342,10 +342,10 @@ _class = Group;
342342
return _class.find(id, params, options);
343343
});
344344
// Parameters:
345-
// name - string - Group name.
346345
// notes - string - Group notes.
347346
// user_ids - string - A list of user ids. If sent as a string, should be comma-delimited.
348347
// admin_ids - string - A list of group admin user ids. If sent as a string, should be comma-delimited.
348+
// name (required) - string - Group name.
349349
(0, _defineProperty2.default)(Group, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
350350
var params,
351351
options,
@@ -356,11 +356,11 @@ _class = Group;
356356
case 0:
357357
params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
358358
options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
359-
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
359+
if (params['name']) {
360360
_context5.next = 4;
361361
break;
362362
}
363-
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
363+
throw new errors.MissingParameterError('Parameter missing: name');
364364
case 4:
365365
if (!(params['notes'] && !(0, _utils.isString)(params['notes']))) {
366366
_context5.next = 6;
@@ -380,12 +380,18 @@ _class = Group;
380380
}
381381
throw new errors.InvalidParameterError("Bad parameter: admin_ids must be of type String, received ".concat((0, _utils.getType)(params['admin_ids'])));
382382
case 10:
383-
_context5.next = 12;
384-
return _Api.default.sendRequest("/groups", 'POST', params, options);
383+
if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
384+
_context5.next = 12;
385+
break;
386+
}
387+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
385388
case 12:
389+
_context5.next = 14;
390+
return _Api.default.sendRequest("/groups", 'POST', params, options);
391+
case 14:
386392
response = _context5.sent;
387393
return _context5.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
388-
case 14:
394+
case 16:
389395
case "end":
390396
return _context5.stop();
391397
}

0 commit comments

Comments
 (0)