files.com 1.1.214 → 1.1.216
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/_VERSION +1 -1
- data/docs/permission.md +7 -3
- data/lib/files.com/errors.rb +4 -0
- data/lib/files.com/models/permission.rb +12 -1
- data/lib/files.com/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deb2cd30a3978ba262f163253fc81bfe7af16a9aa0884e453e05f10747e28eb9
|
4
|
+
data.tar.gz: 5fa33545fee8d37d48d7f58f0a2468b4aade77c84e8cebd59d3a0ae251214d48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 611b364bf246606816abb7fd6d2569bdd251134384153fc37bedcc27317cb2dc3e26512df2658f421c6d5c03a8eda46c54b48395def30686dd6bce8124310432
|
7
|
+
data.tar.gz: 33b9b6bb3f045891f39897e555b0acc26440fcdd73299aa2a5e4697df6d0b8d69b15a0bf0770cc4c1187102487251e155ea9652c72775cbead8f5045c4774818
|
data/README.md
CHANGED
@@ -392,6 +392,7 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
|
|
392
392
|
|`CantMoveWithMultipleLocationsError`| `BadRequestError` |
|
393
393
|
|`DatetimeParseError`| `BadRequestError` |
|
394
394
|
|`DestinationSameError`| `BadRequestError` |
|
395
|
+
|`DoesNotSupportSortingError`| `BadRequestError` |
|
395
396
|
|`FolderMustNotBeAFileError`| `BadRequestError` |
|
396
397
|
|`FoldersNotAllowedError`| `BadRequestError` |
|
397
398
|
|`InvalidBodyError`| `BadRequestError` |
|
@@ -408,11 +409,13 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
|
|
408
409
|
|`InvalidOauthProviderError`| `BadRequestError` |
|
409
410
|
|`InvalidPathError`| `BadRequestError` |
|
410
411
|
|`InvalidReturnToUrlError`| `BadRequestError` |
|
412
|
+
|`InvalidSortFieldError`| `BadRequestError` |
|
411
413
|
|`InvalidSortFilterCombinationError`| `BadRequestError` |
|
412
414
|
|`InvalidUploadOffsetError`| `BadRequestError` |
|
413
415
|
|`InvalidUploadPartGapError`| `BadRequestError` |
|
414
416
|
|`InvalidUploadPartSizeError`| `BadRequestError` |
|
415
417
|
|`MethodNotAllowedError`| `BadRequestError` |
|
418
|
+
|`MultipleSortParamsNotAllowedError`| `BadRequestError` |
|
416
419
|
|`NoValidInputParamsError`| `BadRequestError` |
|
417
420
|
|`PartNumberTooLargeError`| `BadRequestError` |
|
418
421
|
|`PathCannotHaveTrailingWhitespaceError`| `BadRequestError` |
|
@@ -421,6 +424,7 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
|
|
421
424
|
|`RequestParamsInvalidError`| `BadRequestError` |
|
422
425
|
|`RequestParamsRequiredError`| `BadRequestError` |
|
423
426
|
|`SearchAllOnChildPathError`| `BadRequestError` |
|
427
|
+
|`UnrecognizedSortIndexError`| `BadRequestError` |
|
424
428
|
|`UnsupportedCurrencyError`| `BadRequestError` |
|
425
429
|
|`UnsupportedHttpResponseFormatError`| `BadRequestError` |
|
426
430
|
|`UnsupportedMediaTypeError`| `BadRequestError` |
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.216
|
data/docs/permission.md
CHANGED
@@ -11,7 +11,8 @@
|
|
11
11
|
"group_id": 1,
|
12
12
|
"group_name": "example",
|
13
13
|
"permission": "full",
|
14
|
-
"recursive": true
|
14
|
+
"recursive": true,
|
15
|
+
"site_id": 1
|
15
16
|
}
|
16
17
|
```
|
17
18
|
|
@@ -23,6 +24,7 @@
|
|
23
24
|
* `group_name` (string): Group name (if applicable)
|
24
25
|
* `permission` (string): Permission type. See the table referenced in the documentation for an explanation of each permission.
|
25
26
|
* `recursive` (boolean): Recursive: does this permission apply to subfolders?
|
27
|
+
* `site_id` (int64): Site ID
|
26
28
|
|
27
29
|
|
28
30
|
---
|
@@ -42,7 +44,7 @@ Files::Permission.list(
|
|
42
44
|
|
43
45
|
* `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.
|
44
46
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
45
|
-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `group_id`, `path` or `user_id`.
|
47
|
+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path` or `user_id`.
|
46
48
|
* `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 ]`.
|
47
49
|
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
|
48
50
|
* `path` (string): Permission path. If provided, will scope all permissions(including upward) to this path.
|
@@ -63,7 +65,8 @@ Files::Permission.create(
|
|
63
65
|
recursive: false,
|
64
66
|
user_id: 1,
|
65
67
|
username: "user",
|
66
|
-
group_name: "example"
|
68
|
+
group_name: "example",
|
69
|
+
site_id: 1
|
67
70
|
)
|
68
71
|
```
|
69
72
|
|
@@ -76,6 +79,7 @@ Files::Permission.create(
|
|
76
79
|
* `user_id` (int64): User ID. Provide `username` or `user_id`
|
77
80
|
* `username` (string): User username. Provide `username` or `user_id`
|
78
81
|
* `group_name` (string): Group name. Provide `group_name` or `group_id`
|
82
|
+
* `site_id` (int64): Site ID. If not provided, will default to current site. Used when creating a permission for a child site.
|
79
83
|
|
80
84
|
|
81
85
|
---
|
data/lib/files.com/errors.rb
CHANGED
@@ -52,6 +52,7 @@ module Files
|
|
52
52
|
class CantMoveWithMultipleLocationsError < BadRequestError; end
|
53
53
|
class DatetimeParseError < BadRequestError; end
|
54
54
|
class DestinationSameError < BadRequestError; end
|
55
|
+
class DoesNotSupportSortingError < BadRequestError; end
|
55
56
|
class FolderMustNotBeAFileError < BadRequestError; end
|
56
57
|
class FoldersNotAllowedError < BadRequestError; end
|
57
58
|
class InvalidBodyError < BadRequestError; end
|
@@ -68,11 +69,13 @@ module Files
|
|
68
69
|
class InvalidOauthProviderError < BadRequestError; end
|
69
70
|
class InvalidPathError < BadRequestError; end
|
70
71
|
class InvalidReturnToUrlError < BadRequestError; end
|
72
|
+
class InvalidSortFieldError < BadRequestError; end
|
71
73
|
class InvalidSortFilterCombinationError < BadRequestError; end
|
72
74
|
class InvalidUploadOffsetError < BadRequestError; end
|
73
75
|
class InvalidUploadPartGapError < BadRequestError; end
|
74
76
|
class InvalidUploadPartSizeError < BadRequestError; end
|
75
77
|
class MethodNotAllowedError < BadRequestError; end
|
78
|
+
class MultipleSortParamsNotAllowedError < BadRequestError; end
|
76
79
|
class NoValidInputParamsError < BadRequestError; end
|
77
80
|
class PartNumberTooLargeError < BadRequestError; end
|
78
81
|
class PathCannotHaveTrailingWhitespaceError < BadRequestError; end
|
@@ -81,6 +84,7 @@ module Files
|
|
81
84
|
class RequestParamsInvalidError < BadRequestError; end
|
82
85
|
class RequestParamsRequiredError < BadRequestError; end
|
83
86
|
class SearchAllOnChildPathError < BadRequestError; end
|
87
|
+
class UnrecognizedSortIndexError < BadRequestError; end
|
84
88
|
class UnsupportedCurrencyError < BadRequestError; end
|
85
89
|
class UnsupportedHttpResponseFormatError < BadRequestError; end
|
86
90
|
class UnsupportedMediaTypeError < BadRequestError; end
|
@@ -81,6 +81,15 @@ module Files
|
|
81
81
|
@attributes[:recursive] = value
|
82
82
|
end
|
83
83
|
|
84
|
+
# int64 - Site ID
|
85
|
+
def site_id
|
86
|
+
@attributes[:site_id]
|
87
|
+
end
|
88
|
+
|
89
|
+
def site_id=(value)
|
90
|
+
@attributes[:site_id] = value
|
91
|
+
end
|
92
|
+
|
84
93
|
def delete(params = {})
|
85
94
|
params ||= {}
|
86
95
|
params[:id] = @attributes[:id]
|
@@ -110,7 +119,7 @@ module Files
|
|
110
119
|
# Parameters:
|
111
120
|
# 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.
|
112
121
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
113
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `group_id`, `path` or `user_id`.
|
122
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path` or `user_id`.
|
114
123
|
# 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 ]`.
|
115
124
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
|
116
125
|
# path - string - Permission path. If provided, will scope all permissions(including upward) to this path.
|
@@ -144,6 +153,7 @@ module Files
|
|
144
153
|
# user_id - int64 - User ID. Provide `username` or `user_id`
|
145
154
|
# username - string - User username. Provide `username` or `user_id`
|
146
155
|
# group_name - string - Group name. Provide `group_name` or `group_id`
|
156
|
+
# site_id - int64 - Site ID. If not provided, will default to current site. Used when creating a permission for a child site.
|
147
157
|
def self.create(params = {}, options = {})
|
148
158
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
149
159
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params[:group_id] and !params[:group_id].is_a?(Integer)
|
@@ -151,6 +161,7 @@ module Files
|
|
151
161
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
152
162
|
raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String)
|
153
163
|
raise InvalidParameterError.new("Bad parameter: group_name must be an String") if params[:group_name] and !params[:group_name].is_a?(String)
|
164
|
+
raise InvalidParameterError.new("Bad parameter: site_id must be an Integer") if params[:site_id] and !params[:site_id].is_a?(Integer)
|
154
165
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
155
166
|
|
156
167
|
response, options = Api.send_request("/permissions", :post, params, options)
|
data/lib/files.com/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: files.com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.216
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|