files.com 1.1.89 → 1.1.91

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: 1414c7cf9517e6057c06be370998024dc7121509a78d195780075b75d39586d2
4
- data.tar.gz: b63f8e7df98483e298ff519cc27cc3e60985aaf43415c4597ef97feb73fcb01b
3
+ metadata.gz: e23ac37c0fbc768b08e43834909bb807d536fb9ac5b449c7ca7b06771b5e21e3
4
+ data.tar.gz: d39965767ded76d0fc0fbe93c559f67133db2b4804af5a915efbe8802cba8c56
5
5
  SHA512:
6
- metadata.gz: ef8df9195fb639fdd0d0ac74a5584c2b5c5c30eca17b254c87254193a1ff037cd7370b4f16c07b4f7e3e87429252c6cb09119742cd1a697cc85cfb7284948777
7
- data.tar.gz: ceb203825594e2fb809bb143cc244060e8a773cf6ec1100df41bc133262c68f28f10280a107272a7efc536d50bd285355a957b7a41243575eaca3a5cf1035549
6
+ metadata.gz: 6904ceda28408d1e8319cac88c55cdadfb367011183968af2da32bcff4c130bc5276c455b581c104dd4380995a15c2bad4496eb9ef98f7d8f2c9e99a0ec31886
7
+ data.tar.gz: 2b9df80391d98cf56f39597df7e5552830288f47891d50ed9906006cf92c1b604918f6c0e0427a12363eefd23093e44d0d65948a87e312fadb87723f92a25364
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.89
1
+ 1.1.91
data/docs/behavior.md CHANGED
@@ -150,8 +150,6 @@ Files::Behavior.update(id,
150
150
  recursive: true,
151
151
  name: "example",
152
152
  description: "example",
153
- behavior: "webhook",
154
- path: "example",
155
153
  attachment_delete: true
156
154
  )
157
155
  ```
@@ -165,8 +163,6 @@ Files::Behavior.update(id,
165
163
  * `recursive` (boolean): Is behavior recursive?
166
164
  * `name` (string): Name for this behavior.
167
165
  * `description` (string): Description for this behavior.
168
- * `behavior` (string): Behavior type.
169
- * `path` (string): Folder behaviors path.
170
166
  * `attachment_delete` (boolean): If true, will delete the file stored in attachment
171
167
 
172
168
 
@@ -196,8 +192,6 @@ behavior.update(
196
192
  recursive: true,
197
193
  name: "example",
198
194
  description: "example",
199
- behavior: "webhook",
200
- path: "example",
201
195
  attachment_delete: true
202
196
  )
203
197
  ```
@@ -211,8 +205,6 @@ behavior.update(
211
205
  * `recursive` (boolean): Is behavior recursive?
212
206
  * `name` (string): Name for this behavior.
213
207
  * `description` (string): Description for this behavior.
214
- * `behavior` (string): Behavior type.
215
- * `path` (string): Folder behaviors path.
216
208
  * `attachment_delete` (boolean): If true, will delete the file stored in attachment
217
209
 
218
210
 
@@ -0,0 +1,43 @@
1
+ # PublicHostingRequestLog
2
+
3
+ ## Example PublicHostingRequestLog Object
4
+
5
+ ```
6
+ {
7
+ "timestamp": "2000-01-01T01:00:00Z",
8
+ "remote_ip": "example",
9
+ "server_ip": "example",
10
+ "hostname": "example",
11
+ "path": "example",
12
+ "responseCode": 1,
13
+ "success": true,
14
+ "duration_ms": 1
15
+ }
16
+ ```
17
+
18
+ * `timestamp` (date-time): Start Time of Action
19
+ * `remote_ip` (string): IP Address of Public Hosting Client
20
+ * `server_ip` (string): IP Address of Public Hosting Server
21
+ * `hostname` (string): HTTP Request Hostname
22
+ * `path` (string): HTTP Request Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
23
+ * `responseCode` (int64): HTTP Response Code
24
+ * `success` (boolean): Whether SFTP Action was successful.
25
+ * `duration_ms` (int64): Duration (in milliseconds)
26
+
27
+
28
+ ---
29
+
30
+ ## List Public Hosting Request Logs
31
+
32
+ ```
33
+ Files::PublicHostingRequestLog.list(
34
+ per_page: 1
35
+ )
36
+ ```
37
+
38
+ ### Parameters
39
+
40
+ * `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.
41
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
42
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `start_date`, `end_date`, `path`, `remote_ip` or `success`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ remote_ip, success ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, remote_ip, success ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, remote_ip, success ]`, `[ path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, path, remote_ip, success ]` or `[ end_date, path, remote_ip, success ]`.
43
+ * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ remote_ip, success ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, remote_ip, success ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, remote_ip, success ]`, `[ path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, path, remote_ip, success ]` or `[ end_date, path, remote_ip, success ]`.
@@ -115,8 +115,6 @@ module Files
115
115
  # recursive - boolean - Is behavior recursive?
116
116
  # name - string - Name for this behavior.
117
117
  # description - string - Description for this behavior.
118
- # behavior - string - Behavior type.
119
- # path - string - Folder behaviors path.
120
118
  # attachment_delete - boolean - If true, will delete the file stored in attachment
121
119
  def update(params = {})
122
120
  params ||= {}
@@ -126,8 +124,6 @@ module Files
126
124
  raise InvalidParameterError.new("Bad parameter: value must be an String") if params[:value] and !params[:value].is_a?(String)
127
125
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
128
126
  raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
129
- raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params[:behavior] and !params[:behavior].is_a?(String)
130
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
131
127
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
132
128
 
133
129
  Api.send_request("/behaviors/#{@attributes[:id]}", :patch, params, @options)
@@ -273,8 +269,6 @@ module Files
273
269
  # recursive - boolean - Is behavior recursive?
274
270
  # name - string - Name for this behavior.
275
271
  # description - string - Description for this behavior.
276
- # behavior - string - Behavior type.
277
- # path - string - Folder behaviors path.
278
272
  # attachment_delete - boolean - If true, will delete the file stored in attachment
279
273
  def self.update(id, params = {}, options = {})
280
274
  params ||= {}
@@ -283,8 +277,6 @@ module Files
283
277
  raise InvalidParameterError.new("Bad parameter: value must be an String") if params[:value] and !params[:value].is_a?(String)
284
278
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
285
279
  raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
286
- raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params[:behavior] and !params[:behavior].is_a?(String)
287
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
288
280
  raise InvalidParameterError.new("Bad parameter: attachment_delete must be one of String, Integer, Hash") if params[:attachment_delete] and [ String, Integer, Hash ].none? { |klass| params[:attachment_delete].is_a?(klass) }
289
281
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
290
282
 
@@ -229,17 +229,18 @@ module Files
229
229
  options[:client] || ApiClient.active_client
230
230
  end
231
231
 
232
- def close
232
+ def close(**kwargs)
233
233
  flush
234
234
 
235
235
  if @upload
236
236
  end_options = {
237
- action: "end",
237
+ action: 'end',
238
238
  etags: @etags,
239
239
  provided_mtime: Time.now.to_s,
240
240
  ref: @upload.ref,
241
- size: @bytes_written
241
+ size: @bytes_written,
242
242
  }
243
+ end_options.merge(kwargs) if kwargs
243
244
 
244
245
  file = File.create(path, end_options, @options)
245
246
  @attributes = file.attributes
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class PublicHostingRequestLog
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # date-time - Start Time of Action
13
+ def timestamp
14
+ @attributes[:timestamp]
15
+ end
16
+
17
+ # string - IP Address of Public Hosting Client
18
+ def remote_ip
19
+ @attributes[:remote_ip]
20
+ end
21
+
22
+ # string - IP Address of Public Hosting Server
23
+ def server_ip
24
+ @attributes[:server_ip]
25
+ end
26
+
27
+ # string - HTTP Request Hostname
28
+ def hostname
29
+ @attributes[:hostname]
30
+ end
31
+
32
+ # string - HTTP Request Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
33
+ def path
34
+ @attributes[:path]
35
+ end
36
+
37
+ # int64 - HTTP Response Code
38
+ def response_code
39
+ @attributes[:responseCode]
40
+ end
41
+
42
+ # boolean - Whether SFTP Action was successful.
43
+ def success
44
+ @attributes[:success]
45
+ end
46
+
47
+ # int64 - Duration (in milliseconds)
48
+ def duration_ms
49
+ @attributes[:duration_ms]
50
+ end
51
+
52
+ # Parameters:
53
+ # 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.
54
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
55
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `start_date`, `end_date`, `path`, `remote_ip` or `success`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ remote_ip, success ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, remote_ip, success ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, remote_ip, success ]`, `[ path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, path, remote_ip, success ]` or `[ end_date, path, remote_ip, success ]`.
56
+ # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ remote_ip, success ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, remote_ip, success ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, remote_ip, success ]`, `[ path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, path, remote_ip, success ]` or `[ end_date, path, remote_ip, success ]`.
57
+ def self.list(params = {}, options = {})
58
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
59
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
60
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
61
+ raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if params[:filter_prefix] and !params[:filter_prefix].is_a?(Hash)
62
+
63
+ List.new(PublicHostingRequestLog, params) do
64
+ Api.send_request("/public_hosting_request_logs", :get, params, options)
65
+ end
66
+ end
67
+
68
+ def self.all(params = {}, options = {})
69
+ list(params, options)
70
+ end
71
+ end
72
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.89"
4
+ VERSION = "1.1.91"
5
5
  end
data/lib/files.com.rb CHANGED
@@ -100,6 +100,7 @@ require "files.com/models/permission"
100
100
  require "files.com/models/preview"
101
101
  require "files.com/models/priority"
102
102
  require "files.com/models/project"
103
+ require "files.com/models/public_hosting_request_log"
103
104
  require "files.com/models/public_ip_address"
104
105
  require "files.com/models/public_key"
105
106
  require "files.com/models/remote_bandwidth_snapshot"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.89
4
+ version: 1.1.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
@@ -183,6 +183,7 @@ files:
183
183
  - docs/preview.md
184
184
  - docs/priority.md
185
185
  - docs/project.md
186
+ - docs/public_hosting_request_log.md
186
187
  - docs/public_ip_address.md
187
188
  - docs/public_key.md
188
189
  - docs/remote_bandwidth_snapshot.md
@@ -284,6 +285,7 @@ files:
284
285
  - lib/files.com/models/preview.rb
285
286
  - lib/files.com/models/priority.rb
286
287
  - lib/files.com/models/project.rb
288
+ - lib/files.com/models/public_hosting_request_log.rb
287
289
  - lib/files.com/models/public_ip_address.rb
288
290
  - lib/files.com/models/public_key.rb
289
291
  - lib/files.com/models/remote_bandwidth_snapshot.rb