files.com 1.1.214 → 1.1.215

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11bd2f9bb9533128c97bf9198afd675c42bc956935f433d2925c20fcf6a72638
4
- data.tar.gz: 2b1f492c3470c6fecb11f66b2626b4715be24d70e6a3ddcc7c69034867632caa
3
+ metadata.gz: bbd484d37bc76b30ccf6b83aecbd6dc3ea290bc48e7ffc800c88eaf01789dfad
4
+ data.tar.gz: 55474dd7880a576b0841db13709743c563811943b41c3c0adbe1f81517e5abf3
5
5
  SHA512:
6
- metadata.gz: 90627b2d3b8cd0de08fc7833fd4d6345a22a082a2dad560467a40e2da6ea2f07d5712ef13f4fba2a8edf2072a1cca6fbadd706db024965671ee43aeb4fa9814f
7
- data.tar.gz: 8025e79d0ca34c65f66cbc568c461f0826317b9d92d46d50e3f55108965fd00ee40dbd95fd4117cea3ca010e1a3d41b8f182e922cdb1c3a8e9e570f73460b6c5
6
+ metadata.gz: 216284c45420dab170114d42625eb036252146d1377130405c8d64f3f818ec0150becb73c61b51d6fba20a79ad0575207451f435b13be81d4eeb179038a8d524
7
+ data.tar.gz: bef4589ef41d24231b12d7c5e320aea30e9cb1ace59120226ed51ed3f2f57fca80856023150ff656a6615f58a6f17d472920286b8e070fb273f414cf71d47214
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.214
1
+ 1.1.215
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
  ---
@@ -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.215"
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.215
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-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable