files.com 1.2.23 → 1.2.24
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/Group.md +0 -7
- package/docs/models/Site.md +1 -1
- package/docs/models/User.md +4 -4
- package/lib/Files.js +1 -1
- package/lib/models/Group.js +15 -36
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Group.js +0 -17
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.24
|
package/docs/models/Group.md
CHANGED
@@ -6,7 +6,6 @@
|
|
6
6
|
{
|
7
7
|
"id": 1,
|
8
8
|
"name": "owners",
|
9
|
-
"allowed_ips": "10.0.0.0/8\n127.0.0.1",
|
10
9
|
"admin_ids": "1",
|
11
10
|
"notes": "example",
|
12
11
|
"user_ids": "1",
|
@@ -20,7 +19,6 @@
|
|
20
19
|
|
21
20
|
* `id` (int64): Group ID
|
22
21
|
* `name` (string): Group name
|
23
|
-
* `allowed_ips` (string): A list of allowed IPs if applicable. Newline delimited
|
24
22
|
* `admin_ids` (string): Comma-delimited list of user IDs who are group administrators (separated by commas)
|
25
23
|
* `notes` (string): Notes about this group
|
26
24
|
* `user_ids` (string): Comma-delimited list of user IDs who belong to this group (separated by commas)
|
@@ -76,7 +74,6 @@ await Group.create({
|
|
76
74
|
'sftp_permission': true,
|
77
75
|
'dav_permission': true,
|
78
76
|
'restapi_permission': true,
|
79
|
-
'allowed_ips': "10.0.0.0/8\n127.0.0.1",
|
80
77
|
'name': "name",
|
81
78
|
})
|
82
79
|
```
|
@@ -91,7 +88,6 @@ await Group.create({
|
|
91
88
|
* `sftp_permission` (boolean): If true, users in this group can use SFTP to login. This will override a false value of `sftp_permission` on the user level.
|
92
89
|
* `dav_permission` (boolean): If true, users in this group can use WebDAV to login. This will override a false value of `dav_permission` on the user level.
|
93
90
|
* `restapi_permission` (boolean): If true, users in this group can use the REST API to login. This will override a false value of `restapi_permission` on the user level.
|
94
|
-
* `allowed_ips` (string): A list of allowed IPs if applicable. Newline delimited
|
95
91
|
* `name` (string): Required - Group name.
|
96
92
|
|
97
93
|
---
|
@@ -109,7 +105,6 @@ await group.update({
|
|
109
105
|
'sftp_permission': true,
|
110
106
|
'dav_permission': true,
|
111
107
|
'restapi_permission': true,
|
112
|
-
'allowed_ips': "10.0.0.0/8\n127.0.0.1",
|
113
108
|
'name': "owners",
|
114
109
|
})
|
115
110
|
```
|
@@ -124,7 +119,6 @@ await group.update({
|
|
124
119
|
* `sftp_permission` (boolean): If true, users in this group can use SFTP to login. This will override a false value of `sftp_permission` on the user level.
|
125
120
|
* `dav_permission` (boolean): If true, users in this group can use WebDAV to login. This will override a false value of `dav_permission` on the user level.
|
126
121
|
* `restapi_permission` (boolean): If true, users in this group can use the REST API to login. This will override a false value of `restapi_permission` on the user level.
|
127
|
-
* `allowed_ips` (string): A list of allowed IPs if applicable. Newline delimited
|
128
122
|
* `name` (string): Group name.
|
129
123
|
|
130
124
|
### Example Response
|
@@ -133,7 +127,6 @@ await group.update({
|
|
133
127
|
{
|
134
128
|
"id": 1,
|
135
129
|
"name": "owners",
|
136
|
-
"allowed_ips": "10.0.0.0/8\n127.0.0.1",
|
137
130
|
"admin_ids": "1",
|
138
131
|
"notes": "example",
|
139
132
|
"user_ids": "1",
|
package/docs/models/Site.md
CHANGED
package/docs/models/User.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
"admin_group_ids": [
|
10
10
|
1
|
11
11
|
],
|
12
|
-
"allowed_ips": "
|
12
|
+
"allowed_ips": "127.0.0.1",
|
13
13
|
"attachments_permission": true,
|
14
14
|
"api_keys_count": 1,
|
15
15
|
"authenticate_until": "2000-01-01T01:00:00Z",
|
@@ -189,7 +189,7 @@ await User.create({
|
|
189
189
|
'group_id': 1,
|
190
190
|
'group_ids': "example",
|
191
191
|
'announcements_read': true,
|
192
|
-
'allowed_ips': "
|
192
|
+
'allowed_ips': "127.0.0.1",
|
193
193
|
'attachments_permission': true,
|
194
194
|
'authenticate_until': "2000-01-01T01:00:00Z",
|
195
195
|
'authentication_method': "password",
|
@@ -332,7 +332,7 @@ await user.update({
|
|
332
332
|
'group_id': 1,
|
333
333
|
'group_ids': "example",
|
334
334
|
'announcements_read': true,
|
335
|
-
'allowed_ips': "
|
335
|
+
'allowed_ips': "127.0.0.1",
|
336
336
|
'attachments_permission': true,
|
337
337
|
'authenticate_until': "2000-01-01T01:00:00Z",
|
338
338
|
'authentication_method': "password",
|
@@ -426,7 +426,7 @@ await user.update({
|
|
426
426
|
"admin_group_ids": [
|
427
427
|
1
|
428
428
|
],
|
429
|
-
"allowed_ips": "
|
429
|
+
"allowed_ips": "127.0.0.1",
|
430
430
|
"attachments_permission": true,
|
431
431
|
"api_keys_count": 1,
|
432
432
|
"authenticate_until": "2000-01-01T01:00:00Z",
|
package/lib/Files.js
CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
|
|
11
11
|
var apiKey;
|
12
12
|
var baseUrl = 'https://app.files.com';
|
13
13
|
var sessionId = null;
|
14
|
-
var version = '1.2.
|
14
|
+
var version = '1.2.24';
|
15
15
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
16
16
|
var logLevel = _Logger.LogLevel.INFO;
|
17
17
|
var debugRequest = false;
|
package/lib/models/Group.js
CHANGED
@@ -47,13 +47,6 @@ var Group = /*#__PURE__*/(0, _createClass2.default)(function Group() {
|
|
47
47
|
(0, _defineProperty2.default)(this, "setName", function (value) {
|
48
48
|
_this.attributes.name = value;
|
49
49
|
});
|
50
|
-
// string # A list of allowed IPs if applicable. Newline delimited
|
51
|
-
(0, _defineProperty2.default)(this, "getAllowedIps", function () {
|
52
|
-
return _this.attributes.allowed_ips;
|
53
|
-
});
|
54
|
-
(0, _defineProperty2.default)(this, "setAllowedIps", function (value) {
|
55
|
-
_this.attributes.allowed_ips = value;
|
56
|
-
});
|
57
50
|
// string # Comma-delimited list of user IDs who are group administrators (separated by commas)
|
58
51
|
(0, _defineProperty2.default)(this, "getAdminIds", function () {
|
59
52
|
return _this.attributes.admin_ids;
|
@@ -118,7 +111,6 @@ var Group = /*#__PURE__*/(0, _createClass2.default)(function Group() {
|
|
118
111
|
// sftp_permission - boolean - If true, users in this group can use SFTP to login. This will override a false value of `sftp_permission` on the user level.
|
119
112
|
// dav_permission - boolean - If true, users in this group can use WebDAV to login. This will override a false value of `dav_permission` on the user level.
|
120
113
|
// restapi_permission - boolean - If true, users in this group can use the REST API to login. This will override a false value of `restapi_permission` on the user level.
|
121
|
-
// allowed_ips - string - A list of allowed IPs if applicable. Newline delimited
|
122
114
|
// name - string - Group name.
|
123
115
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
124
116
|
var params,
|
@@ -165,38 +157,32 @@ var Group = /*#__PURE__*/(0, _createClass2.default)(function Group() {
|
|
165
157
|
}
|
166
158
|
throw new errors.InvalidParameterError("Bad parameter: admin_ids must be of type String, received ".concat((0, _utils.getType)(params.admin_ids)));
|
167
159
|
case 14:
|
168
|
-
if (!(params.allowed_ips && !(0, _utils.isString)(params.allowed_ips))) {
|
169
|
-
_context.next = 16;
|
170
|
-
break;
|
171
|
-
}
|
172
|
-
throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params.allowed_ips)));
|
173
|
-
case 16:
|
174
160
|
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
175
|
-
_context.next =
|
161
|
+
_context.next = 16;
|
176
162
|
break;
|
177
163
|
}
|
178
164
|
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
179
|
-
case
|
165
|
+
case 16:
|
180
166
|
if (params.id) {
|
181
|
-
_context.next =
|
167
|
+
_context.next = 22;
|
182
168
|
break;
|
183
169
|
}
|
184
170
|
if (!_this.attributes.id) {
|
185
|
-
_context.next =
|
171
|
+
_context.next = 21;
|
186
172
|
break;
|
187
173
|
}
|
188
174
|
params.id = _this.id;
|
189
|
-
_context.next =
|
175
|
+
_context.next = 22;
|
190
176
|
break;
|
191
|
-
case
|
177
|
+
case 21:
|
192
178
|
throw new errors.MissingParameterError('Parameter missing: id');
|
193
|
-
case
|
194
|
-
_context.next =
|
179
|
+
case 22:
|
180
|
+
_context.next = 24;
|
195
181
|
return _Api.default.sendRequest("/groups/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
196
|
-
case
|
182
|
+
case 24:
|
197
183
|
response = _context.sent;
|
198
184
|
return _context.abrupt("return", new Group(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
199
|
-
case
|
185
|
+
case 26:
|
200
186
|
case "end":
|
201
187
|
return _context.stop();
|
202
188
|
}
|
@@ -410,7 +396,6 @@ _Group = Group;
|
|
410
396
|
// sftp_permission - boolean - If true, users in this group can use SFTP to login. This will override a false value of `sftp_permission` on the user level.
|
411
397
|
// dav_permission - boolean - If true, users in this group can use WebDAV to login. This will override a false value of `dav_permission` on the user level.
|
412
398
|
// restapi_permission - boolean - If true, users in this group can use the REST API to login. This will override a false value of `restapi_permission` on the user level.
|
413
|
-
// allowed_ips - string - A list of allowed IPs if applicable. Newline delimited
|
414
399
|
// name (required) - string - Group name.
|
415
400
|
(0, _defineProperty2.default)(Group, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
416
401
|
var params,
|
@@ -446,24 +431,18 @@ _Group = Group;
|
|
446
431
|
}
|
447
432
|
throw new errors.InvalidParameterError("Bad parameter: admin_ids must be of type String, received ".concat((0, _utils.getType)(params.admin_ids)));
|
448
433
|
case 10:
|
449
|
-
if (!(params.allowed_ips && !(0, _utils.isString)(params.allowed_ips))) {
|
450
|
-
_context6.next = 12;
|
451
|
-
break;
|
452
|
-
}
|
453
|
-
throw new errors.InvalidParameterError("Bad parameter: allowed_ips must be of type String, received ".concat((0, _utils.getType)(params.allowed_ips)));
|
454
|
-
case 12:
|
455
434
|
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
456
|
-
_context6.next =
|
435
|
+
_context6.next = 12;
|
457
436
|
break;
|
458
437
|
}
|
459
438
|
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
460
|
-
case
|
461
|
-
_context6.next =
|
439
|
+
case 12:
|
440
|
+
_context6.next = 14;
|
462
441
|
return _Api.default.sendRequest('/groups', 'POST', params, options);
|
463
|
-
case
|
442
|
+
case 14:
|
464
443
|
response = _context6.sent;
|
465
444
|
return _context6.abrupt("return", new _Group(response === null || response === void 0 ? void 0 : response.data, options));
|
466
|
-
case
|
445
|
+
case 16:
|
467
446
|
case "end":
|
468
447
|
return _context6.stop();
|
469
448
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Group.js
CHANGED
@@ -42,13 +42,6 @@ class Group {
|
|
42
42
|
this.attributes.name = value
|
43
43
|
}
|
44
44
|
|
45
|
-
// string # A list of allowed IPs if applicable. Newline delimited
|
46
|
-
getAllowedIps = () => this.attributes.allowed_ips
|
47
|
-
|
48
|
-
setAllowedIps = value => {
|
49
|
-
this.attributes.allowed_ips = value
|
50
|
-
}
|
51
|
-
|
52
45
|
// string # Comma-delimited list of user IDs who are group administrators (separated by commas)
|
53
46
|
getAdminIds = () => this.attributes.admin_ids
|
54
47
|
|
@@ -113,7 +106,6 @@ class Group {
|
|
113
106
|
// sftp_permission - boolean - If true, users in this group can use SFTP to login. This will override a false value of `sftp_permission` on the user level.
|
114
107
|
// dav_permission - boolean - If true, users in this group can use WebDAV to login. This will override a false value of `dav_permission` on the user level.
|
115
108
|
// restapi_permission - boolean - If true, users in this group can use the REST API to login. This will override a false value of `restapi_permission` on the user level.
|
116
|
-
// allowed_ips - string - A list of allowed IPs if applicable. Newline delimited
|
117
109
|
// name - string - Group name.
|
118
110
|
update = async (params = {}) => {
|
119
111
|
if (!this.attributes.id) {
|
@@ -141,10 +133,6 @@ class Group {
|
|
141
133
|
throw new errors.InvalidParameterError(`Bad parameter: admin_ids must be of type String, received ${getType(params.admin_ids)}`)
|
142
134
|
}
|
143
135
|
|
144
|
-
if (params.allowed_ips && !isString(params.allowed_ips)) {
|
145
|
-
throw new errors.InvalidParameterError(`Bad parameter: allowed_ips must be of type String, received ${getType(params.allowed_ips)}`)
|
146
|
-
}
|
147
|
-
|
148
136
|
if (params.name && !isString(params.name)) {
|
149
137
|
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
|
150
138
|
}
|
@@ -263,7 +251,6 @@ class Group {
|
|
263
251
|
// sftp_permission - boolean - If true, users in this group can use SFTP to login. This will override a false value of `sftp_permission` on the user level.
|
264
252
|
// dav_permission - boolean - If true, users in this group can use WebDAV to login. This will override a false value of `dav_permission` on the user level.
|
265
253
|
// restapi_permission - boolean - If true, users in this group can use the REST API to login. This will override a false value of `restapi_permission` on the user level.
|
266
|
-
// allowed_ips - string - A list of allowed IPs if applicable. Newline delimited
|
267
254
|
// name (required) - string - Group name.
|
268
255
|
static create = async (params = {}, options = {}) => {
|
269
256
|
if (!params.name) {
|
@@ -282,10 +269,6 @@ class Group {
|
|
282
269
|
throw new errors.InvalidParameterError(`Bad parameter: admin_ids must be of type String, received ${getType(params.admin_ids)}`)
|
283
270
|
}
|
284
271
|
|
285
|
-
if (params.allowed_ips && !isString(params.allowed_ips)) {
|
286
|
-
throw new errors.InvalidParameterError(`Bad parameter: allowed_ips must be of type String, received ${getType(params.allowed_ips)}`)
|
287
|
-
}
|
288
|
-
|
289
272
|
if (params.name && !isString(params.name)) {
|
290
273
|
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
|
291
274
|
}
|