files.com 1.1.214 → 1.1.216

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11bd2f9bb9533128c97bf9198afd675c42bc956935f433d2925c20fcf6a72638
4
- data.tar.gz: 2b1f492c3470c6fecb11f66b2626b4715be24d70e6a3ddcc7c69034867632caa
3
+ metadata.gz: deb2cd30a3978ba262f163253fc81bfe7af16a9aa0884e453e05f10747e28eb9
4
+ data.tar.gz: 5fa33545fee8d37d48d7f58f0a2468b4aade77c84e8cebd59d3a0ae251214d48
5
5
  SHA512:
6
- metadata.gz: 90627b2d3b8cd0de08fc7833fd4d6345a22a082a2dad560467a40e2da6ea2f07d5712ef13f4fba2a8edf2072a1cca6fbadd706db024965671ee43aeb4fa9814f
7
- data.tar.gz: 8025e79d0ca34c65f66cbc568c461f0826317b9d92d46d50e3f55108965fd00ee40dbd95fd4117cea3ca010e1a3d41b8f182e922cdb1c3a8e9e570f73460b6c5
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.214
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
  ---
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.214"
4
+ VERSION = "1.1.216"
5
5
  end
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.214
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-15 00:00:00.000000000 Z
11
+ date: 2025-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable