files.com 1.0.208 → 1.0.212

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: 338dbd01060e2af598a844cfc78d2fd3dc08056161ac59dc5d8ac8098c678462
4
- data.tar.gz: b3b1d00f73d4f0dd3b146c0df3472def4300478e377690b675da939a2bee988b
3
+ metadata.gz: b47255f7698ba6a1ebe5f8f8ba855d33aa546db17d89d212851219add42b5c2c
4
+ data.tar.gz: 92b8059a5f8a8d9bda18855fccf4e31a6109bd9a44c785c47ad5b0ab87f54bcf
5
5
  SHA512:
6
- metadata.gz: 83629f10047b516c31d63d5d593299ba8c1432c0e11dd13d88bedb52058820a7eeb342f7089c2c2d88947d28e41999b723be1e8c2e5192551242d4b936055608
7
- data.tar.gz: ac9673fc689b715369a25ce0d00350178b52e6d460aff78f733e37aa332d0e394eed627aa7431e1bfd534243e098201e436af7b890c9459e8e1a1ed46827f3ad
6
+ metadata.gz: 7f655df9c1e037f0d8e88b7f17b44584dcb2a393d4948066d4098522a9389c8d868e9366d1865d633e780acd220b6127a4b5f20d412a8e7f75b39558a3e91adc
7
+ data.tar.gz: b20cb722bd517b94b5b5344c883b5048d598794d66ea45b97388e44afee89786fc7b1393e21acab4b7e2ee453092f00f3b19c64c4a3c0d379a23471ca6099c89
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.208
1
+ 1.0.212
@@ -0,0 +1,35 @@
1
+ # AutomationRun
2
+
3
+ ## Example AutomationRun Object
4
+
5
+ ```
6
+ {
7
+ "automation_id": 1,
8
+ "status": "success",
9
+ "status_messages_url": "https://www.example.com/log_file.txt"
10
+ }
11
+ ```
12
+
13
+ * `automation_id` (int64): ID of the associated Automation.
14
+ * `status` (string): The success status of the AutomationRun. One of `running`, `success`, `partial_failure`, or `failure`.
15
+ * `status_messages_url` (string): Link to status messages log file.
16
+
17
+
18
+ ---
19
+
20
+ ## List Automation Runs
21
+
22
+ ```
23
+ Files::AutomationRun.list(
24
+ user_id: 1,
25
+ per_page: 1,
26
+ automation_id: 1
27
+ )
28
+ ```
29
+
30
+ ### Parameters
31
+
32
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
33
+ * `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
34
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
+ * `automation_id` (int64): Required - ID of the associated Automation.
data/docs/file.md CHANGED
@@ -150,10 +150,10 @@ Files::File.delete(path,
150
150
 
151
151
  ---
152
152
 
153
- ## Return metadata for file/folder
153
+ ## Find file/folder by path
154
154
 
155
155
  ```
156
- Files::File.metadata(path,
156
+ Files::File.find(path,
157
157
  with_previews: true,
158
158
  with_priority_color: true
159
159
  )
@@ -287,27 +287,6 @@ file.delete(
287
287
  * `recursive` (boolean): If true, will recursively delete folers. Otherwise, will error on non-empty folders.
288
288
 
289
289
 
290
- ---
291
-
292
- ## Return metadata for file/folder
293
-
294
- ```
295
- file = Files::File.list_for(path).first
296
-
297
- file.metadata(
298
- with_previews: true,
299
- with_priority_color: true
300
- )
301
- ```
302
-
303
- ### Parameters
304
-
305
- * `path` (string): Required - Path to operate on.
306
- * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
307
- * `with_previews` (boolean): Include file preview information?
308
- * `with_priority_color` (boolean): Include file priority color information?
309
-
310
-
311
290
  ---
312
291
 
313
292
  ## Copy file/folder
@@ -5,9 +5,13 @@
5
5
  ```
6
6
  {
7
7
  "ip_address": "1.1.1.1",
8
- "server_name": "server-1"
8
+ "server_name": "server-1",
9
+ "ftp_enabled": "",
10
+ "sftp_enabled": ""
9
11
  }
10
12
  ```
11
13
 
12
14
  * `ip_address` (string): The public IP address.
13
15
  * `server_name` (string): The name of the frontend server.
16
+ * `ftp_enabled` (string):
17
+ * `sftp_enabled` (string):
data/docs/session.md CHANGED
@@ -12,6 +12,7 @@
12
12
  "multiple_regions": true,
13
13
  "read_only": true,
14
14
  "root_path": "",
15
+ "sftp_insecure_ciphers": true,
15
16
  "site_id": 1,
16
17
  "ssl_required": true,
17
18
  "tls_disabled": true,
@@ -33,9 +34,10 @@
33
34
  * `multiple_regions` (boolean): Can access multiple regions?
34
35
  * `read_only` (boolean): Is this session read only?
35
36
  * `root_path` (string): Initial root path to start the user's session in.
37
+ * `sftp_insecure_ciphers` (boolean): Are insecure SFTP ciphers allowed for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure SSH ciphers for this user.)
36
38
  * `site_id` (int64): Site ID
37
39
  * `ssl_required` (boolean): Is SSL required for this user? (If so, ensure all your communications with this user use SSL.)
38
- * `tls_disabled` (boolean): Is strong TLS disabled for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure TLS versions for this user.)
40
+ * `tls_disabled` (boolean): Aee insecure TLS versions allowed for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure TLS versions for this user.)
39
41
  * `two_factor_setup_needed` (boolean): If true, this user needs to add a Two Factor Authentication method before performing any further actions.
40
42
  * `allowed_2fa_method_sms` (boolean): Sent only if 2FA setup is needed. Is SMS two factor authentication allowed?
41
43
  * `allowed_2fa_method_totp` (boolean): Sent only if 2FA setup is needed. Is TOTP two factor authentication allowed?
data/docs/site.md CHANGED
@@ -115,6 +115,7 @@
115
115
  "multiple_regions": true,
116
116
  "read_only": true,
117
117
  "root_path": "",
118
+ "sftp_insecure_ciphers": false,
118
119
  "site_id": 1,
119
120
  "ssl_required": true,
120
121
  "tls_disabled": false,
@@ -128,6 +129,7 @@
128
129
  },
129
130
  "session_pinned_by_ip": true,
130
131
  "sftp_enabled": true,
132
+ "sftp_insecure_ciphers": true,
131
133
  "sftp_user_root_enabled": true,
132
134
  "sharing_enabled": true,
133
135
  "show_request_access_link": true,
@@ -303,6 +305,7 @@
303
305
  * `session`: Current session
304
306
  * `session_pinned_by_ip` (boolean): Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
305
307
  * `sftp_enabled` (boolean): Is SFTP enabled?
308
+ * `sftp_insecure_ciphers` (boolean): Are Insecure Ciphers allowed for SFTP? Note: Settting TLS Disabled -> True will always allow insecure ciphers for SFTP as well. Enabling this is insecure.
306
309
  * `sftp_user_root_enabled` (boolean): Use user FTP roots also for SFTP?
307
310
  * `sharing_enabled` (boolean): Allow bundle creation
308
311
  * `show_request_access_link` (boolean): Show request access link for users without access? Currently unused.
@@ -317,7 +320,7 @@
317
320
  * `ssl_required` (boolean): Is SSL required? Disabling this is insecure.
318
321
  * `subdomain` (string): Site subdomain
319
322
  * `switch_to_plan_date` (date-time): If switching plans, when does the new plan take effect?
320
- * `tls_disabled` (boolean): Is TLS disabled(site setting)?
323
+ * `tls_disabled` (boolean): Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
321
324
  * `trial_days_left` (int64): Number of days left in trial
322
325
  * `trial_until` (date-time): When does this Site trial expire?
323
326
  * `updated_at` (date-time): Last time this Site was updated
@@ -387,6 +390,7 @@ Files::Site.update(
387
390
  session_expiry: 1.0,
388
391
  ssl_required: true,
389
392
  tls_disabled: true,
393
+ sftp_insecure_ciphers: true,
390
394
  user_lockout: true,
391
395
  user_lockout_tries: 1,
392
396
  user_lockout_within: 1,
@@ -487,7 +491,8 @@ Files::Site.update(
487
491
  * `office_integration_available` (boolean): Allow users to use Office for the web?
488
492
  * `session_expiry` (double): Session expiry in hours
489
493
  * `ssl_required` (boolean): Is SSL required? Disabling this is insecure.
490
- * `tls_disabled` (boolean): Is TLS disabled(site setting)?
494
+ * `tls_disabled` (boolean): Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
495
+ * `sftp_insecure_ciphers` (boolean): Are Insecure Ciphers allowed for SFTP? Note: Settting TLS Disabled -> True will always allow insecure ciphers for SFTP as well. Enabling this is insecure.
491
496
  * `user_lockout` (boolean): Will users be locked out after incorrect login attempts?
492
497
  * `user_lockout_tries` (int64): Number of login tries within `user_lockout_within` hours before users are locked out
493
498
  * `user_lockout_within` (int64): Number of hours for user lockout window
@@ -191,6 +191,9 @@ module Files
191
191
  class TooManyLoginAttemptsError < RateLimitedError; end
192
192
  class TooManyRequestsError < RateLimitedError; end
193
193
 
194
+ class ServiceUnavailableError < APIError; end
195
+ class UploadsUnavailableError < ServiceUnavailableError; end
196
+
194
197
  class SiteConfigurationError < APIError; end
195
198
  class AccountAlreadyExistsError < SiteConfigurationError; end
196
199
  class AccountOverdueError < SiteConfigurationError; end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class AutomationRun
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - ID of the associated Automation.
13
+ def automation_id
14
+ @attributes[:automation_id]
15
+ end
16
+
17
+ # string - The success status of the AutomationRun. One of `running`, `success`, `partial_failure`, or `failure`.
18
+ def status
19
+ @attributes[:status]
20
+ end
21
+
22
+ # string - Link to status messages log file.
23
+ def status_messages_url
24
+ @attributes[:status_messages_url]
25
+ end
26
+
27
+ # Parameters:
28
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
29
+ # cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
30
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
31
+ # automation_id (required) - int64 - ID of the associated Automation.
32
+ def self.list(params = {}, options = {})
33
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
34
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
35
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
36
+ raise InvalidParameterError.new("Bad parameter: automation_id must be an Integer") if params.dig(:automation_id) and !params.dig(:automation_id).is_a?(Integer)
37
+ raise MissingParameterError.new("Parameter missing: automation_id") unless params.dig(:automation_id)
38
+
39
+ List.new(AutomationRun, params) do
40
+ Api.send_request("/automation_runs", :get, params, options)
41
+ end
42
+ end
43
+
44
+ def self.all(params = {}, options = {})
45
+ list(params, options)
46
+ end
47
+ end
48
+ end
@@ -867,23 +867,6 @@ module Files
867
867
  delete(params)
868
868
  end
869
869
 
870
- # Return metadata for file/folder
871
- #
872
- # Parameters:
873
- # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
874
- # with_previews - boolean - Include file preview information?
875
- # with_priority_color - boolean - Include file priority color information?
876
- def metadata(params = {})
877
- params ||= {}
878
- params[:path] = @attributes[:path]
879
- raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
880
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
881
- raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
882
- raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
883
-
884
- Api.send_request("/file_actions/metadata/#{@attributes[:path]}", :get, params, @options)
885
- end
886
-
887
870
  # Copy file/folder
888
871
  #
889
872
  # Parameters:
@@ -1029,13 +1012,12 @@ module Files
1029
1012
  delete(path, params, options)
1030
1013
  end
1031
1014
 
1032
- # Return metadata for file/folder
1033
- #
1034
1015
  # Parameters:
1016
+ # path (required) - string - Path to operate on.
1035
1017
  # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
1036
1018
  # with_previews - boolean - Include file preview information?
1037
1019
  # with_priority_color - boolean - Include file priority color information?
1038
- def self.metadata(path, params = {}, options = {})
1020
+ def self.find(path, params = {}, options = {})
1039
1021
  params ||= {}
1040
1022
  params[:path] = path
1041
1023
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
@@ -1046,6 +1028,10 @@ module Files
1046
1028
  File.new(response.data, options)
1047
1029
  end
1048
1030
 
1031
+ def self.get(path, params = {}, options = {})
1032
+ find(path, params, options)
1033
+ end
1034
+
1049
1035
  # Copy file/folder
1050
1036
  #
1051
1037
  # Parameters:
@@ -18,5 +18,15 @@ module Files
18
18
  def server_name
19
19
  @attributes[:server_name]
20
20
  end
21
+
22
+ # string
23
+ def ftp_enabled
24
+ @attributes[:ftp_enabled]
25
+ end
26
+
27
+ # string
28
+ def sftp_enabled
29
+ @attributes[:sftp_enabled]
30
+ end
21
31
  end
22
32
  end
@@ -85,6 +85,15 @@ module Files
85
85
  @attributes[:root_path] = value
86
86
  end
87
87
 
88
+ # boolean - Are insecure SFTP ciphers allowed for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure SSH ciphers for this user.)
89
+ def sftp_insecure_ciphers
90
+ @attributes[:sftp_insecure_ciphers]
91
+ end
92
+
93
+ def sftp_insecure_ciphers=(value)
94
+ @attributes[:sftp_insecure_ciphers] = value
95
+ end
96
+
88
97
  # int64 - Site ID
89
98
  def site_id
90
99
  @attributes[:site_id]
@@ -103,7 +112,7 @@ module Files
103
112
  @attributes[:ssl_required] = value
104
113
  end
105
114
 
106
- # boolean - Is strong TLS disabled for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure TLS versions for this user.)
115
+ # boolean - Aee insecure TLS versions allowed for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure TLS versions for this user.)
107
116
  def tls_disabled
108
117
  @attributes[:tls_disabled]
109
118
  end
@@ -459,6 +459,11 @@ module Files
459
459
  @attributes[:sftp_enabled]
460
460
  end
461
461
 
462
+ # boolean - Are Insecure Ciphers allowed for SFTP? Note: Settting TLS Disabled -> True will always allow insecure ciphers for SFTP as well. Enabling this is insecure.
463
+ def sftp_insecure_ciphers
464
+ @attributes[:sftp_insecure_ciphers]
465
+ end
466
+
462
467
  # boolean - Use user FTP roots also for SFTP?
463
468
  def sftp_user_root_enabled
464
469
  @attributes[:sftp_user_root_enabled]
@@ -529,7 +534,7 @@ module Files
529
534
  @attributes[:switch_to_plan_date]
530
535
  end
531
536
 
532
- # boolean - Is TLS disabled(site setting)?
537
+ # boolean - Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
533
538
  def tls_disabled
534
539
  @attributes[:tls_disabled]
535
540
  end
@@ -652,7 +657,8 @@ module Files
652
657
  # office_integration_available - boolean - Allow users to use Office for the web?
653
658
  # session_expiry - double - Session expiry in hours
654
659
  # ssl_required - boolean - Is SSL required? Disabling this is insecure.
655
- # tls_disabled - boolean - Is TLS disabled(site setting)?
660
+ # tls_disabled - boolean - Are Insecure TLS and SFTP Ciphers allowed? Enabling this is insecure.
661
+ # sftp_insecure_ciphers - boolean - Are Insecure Ciphers allowed for SFTP? Note: Settting TLS Disabled -> True will always allow insecure ciphers for SFTP as well. Enabling this is insecure.
656
662
  # user_lockout - boolean - Will users be locked out after incorrect login attempts?
657
663
  # user_lockout_tries - int64 - Number of login tries within `user_lockout_within` hours before users are locked out
658
664
  # user_lockout_within - int64 - Number of hours for user lockout window
data/lib/files.com.rb CHANGED
@@ -37,6 +37,7 @@ require "files.com/models/app"
37
37
  require "files.com/models/as2_key"
38
38
  require "files.com/models/auto"
39
39
  require "files.com/models/automation"
40
+ require "files.com/models/automation_run"
40
41
  require "files.com/models/bandwidth_snapshot"
41
42
  require "files.com/models/behavior"
42
43
  require "files.com/models/bundle"
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.0.208
4
+ version: 1.0.212
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-14 00:00:00.000000000 Z
11
+ date: 2021-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -96,6 +96,7 @@ files:
96
96
  - docs/as2_key.md
97
97
  - docs/auto.md
98
98
  - docs/automation.md
99
+ - docs/automation_run.md
99
100
  - docs/bandwidth_snapshot.md
100
101
  - docs/behavior.md
101
102
  - docs/bundle.md
@@ -173,6 +174,7 @@ files:
173
174
  - lib/files.com/models/as2_key.rb
174
175
  - lib/files.com/models/auto.rb
175
176
  - lib/files.com/models/automation.rb
177
+ - lib/files.com/models/automation_run.rb
176
178
  - lib/files.com/models/bandwidth_snapshot.rb
177
179
  - lib/files.com/models/behavior.rb
178
180
  - lib/files.com/models/bundle.rb