files.com 1.0.330 → 1.0.331

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.330
1
+ 1.0.331
@@ -32,9 +32,9 @@
32
32
  await Permission.list({
33
33
  'per_page': 1,
34
34
  'path': "example",
35
+ 'include_groups': true,
35
36
  'group_id': 1,
36
37
  'user_id': 1,
37
- 'include_groups': true,
38
38
  })
39
39
  ```
40
40
 
@@ -44,12 +44,12 @@ await Permission.list({
44
44
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
45
45
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
46
46
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[group_id]=desc`). Valid fields are `group_id`, `path`, `user_id` or `permission`.
47
- * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
47
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]` or `[ user_id, group_id, path ]`.
48
48
  * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
49
- * `path` (string): DEPRECATED: Permission path. If provided, will scope permissions to this path. Use `filter[path]` instead.
50
- * `group_id` (string): DEPRECATED: Group ID. If provided, will scope permissions to this group. Use `filter[group_id]` instead.`
51
- * `user_id` (string): DEPRECATED: User ID. If provided, will scope permissions to this user. Use `filter[user_id]` instead.`
49
+ * `path` (string): Permission path. If provided, will scope all permissions(including upward) to this path.
52
50
  * `include_groups` (boolean): If searching by user or group, also include user's permissions that are inherited from its groups?
51
+ * `group_id` (string):
52
+ * `user_id` (string):
53
53
 
54
54
  ---
55
55
 
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.0.330";
14
+ var version = "1.0.331";
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -171,12 +171,12 @@ _class = Permission;
171
171
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
172
172
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
173
173
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[group_id]=desc`). Valid fields are `group_id`, `path`, `user_id` or `permission`.
174
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
174
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]` or `[ user_id, group_id, path ]`.
175
175
  // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
176
- // path - string - DEPRECATED: Permission path. If provided, will scope permissions to this path. Use `filter[path]` instead.
177
- // group_id - string - DEPRECATED: Group ID. If provided, will scope permissions to this group. Use `filter[group_id]` instead.`
178
- // user_id - string - DEPRECATED: User ID. If provided, will scope permissions to this user. Use `filter[user_id]` instead.`
176
+ // path - string - Permission path. If provided, will scope all permissions(including upward) to this path.
179
177
  // include_groups - boolean - If searching by user or group, also include user's permissions that are inherited from its groups?
178
+ // group_id - string
179
+ // user_id - string
180
180
  (0, _defineProperty2.default)(Permission, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
181
181
  var _response$data;
182
182
  var params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.330",
3
+ "version": "1.0.331",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
5
5
  let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
- let version = "1.0.330"
8
+ let version = "1.0.331"
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -124,12 +124,12 @@ class Permission {
124
124
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
125
125
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
126
126
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[group_id]=desc`). Valid fields are `group_id`, `path`, `user_id` or `permission`.
127
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `group_id`, `user_id` or `path`. Valid field combinations are `[ group_id, path ]` and `[ user_id, path ]`.
127
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]` or `[ user_id, group_id, path ]`.
128
128
  // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
129
- // path - string - DEPRECATED: Permission path. If provided, will scope permissions to this path. Use `filter[path]` instead.
130
- // group_id - string - DEPRECATED: Group ID. If provided, will scope permissions to this group. Use `filter[group_id]` instead.`
131
- // user_id - string - DEPRECATED: User ID. If provided, will scope permissions to this user. Use `filter[user_id]` instead.`
129
+ // path - string - Permission path. If provided, will scope all permissions(including upward) to this path.
132
130
  // include_groups - boolean - If searching by user or group, also include user's permissions that are inherited from its groups?
131
+ // group_id - string
132
+ // user_id - string
133
133
  static list = async (params = {}, options = {}) => {
134
134
  if (params['cursor'] && !isString(params['cursor'])) {
135
135
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)