files.com 1.0.309 → 1.0.311

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: f9886b13b98ac876358ccd85138f6c84a1214f97a34e69a6bbf1f7d35c6331d3
4
- data.tar.gz: ebc93bc1fe74de6f75afc8bd33cfc3c81622a72ade67e2e56cdc7456dbbd8178
3
+ metadata.gz: 603f738d47c3d761d19a66df997aa7e7b46dc0d93f908239b8445f6713749c97
4
+ data.tar.gz: d8e1775860d4c4f0a5407f41f8bcf0a5199d614624cb675f3e2c2e5a5d705821
5
5
  SHA512:
6
- metadata.gz: e4cab9cf85e598f96212646f5726b250928351fab4eeb882c248b58b9584369d0589f25f8543659d199cf7ce5065ac6e14e882f4ba47f8280302bd4227c8c474
7
- data.tar.gz: 066f28504469069ac18f54c7f557d2fb40d103e8a7a88de8d9dc122400e2655cf70f0d2f080c25ff284a544f2b43237f2432cc112433dc813c93ccd94b796300
6
+ metadata.gz: 863b75de449d8ef4ca227e0c64f827a447f1b2ad59a6b4c0acb165d7719c0a228f9b5591fafca7e3f5c18d2f143364d92028ca55fbdb4f5f81786ef8a1dc1307
7
+ data.tar.gz: 989a9e5a0a0a85f22d83de4e1104318308ad3b38c8952da808acd7e441d6d15fedbab836b76dfcabc75d245618a0be7fc353e1f7858e938627de3c29c46fe652
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.309
1
+ 1.0.311
@@ -0,0 +1,97 @@
1
+ # BundleNotification
2
+
3
+ ## Example BundleNotification Object
4
+
5
+ ```
6
+ {
7
+ "bundle_id": 1,
8
+ "id": 1,
9
+ "notify_on_registration": true,
10
+ "user_id": 1
11
+ }
12
+ ```
13
+
14
+ * `bundle_id` (int64): Bundle ID to notify on
15
+ * `id` (int64): Bundle Notification ID
16
+ * `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
17
+ * `user_id` (int64): The id of the user to notify.
18
+
19
+
20
+ ---
21
+
22
+ ## List Bundle Notifications
23
+
24
+ ```
25
+ Files::BundleNotification.list(
26
+ user_id: 1,
27
+ per_page: 1,
28
+ bundle_id: 1
29
+ )
30
+ ```
31
+
32
+ ### Parameters
33
+
34
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
35
+ * `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 either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
36
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
37
+ * `bundle_id` (int64): Bundle ID to notify on
38
+
39
+
40
+ ---
41
+
42
+ ## Show Bundle Notification
43
+
44
+ ```
45
+ Files::BundleNotification.find(id)
46
+ ```
47
+
48
+ ### Parameters
49
+
50
+ * `id` (int64): Required - Bundle Notification ID.
51
+
52
+
53
+ ---
54
+
55
+ ## Create Bundle Notification
56
+
57
+ ```
58
+ Files::BundleNotification.create(
59
+ user_id: 1,
60
+ notify_on_registration: true,
61
+ bundle_id: 1
62
+ )
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ * `user_id` (int64): Required - The id of the user to notify.
68
+ * `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
69
+ * `bundle_id` (int64): Required - Bundle ID to notify on
70
+
71
+
72
+ ---
73
+
74
+ ## Delete Bundle Notification
75
+
76
+ ```
77
+ Files::BundleNotification.delete(id)
78
+ ```
79
+
80
+ ### Parameters
81
+
82
+ * `id` (int64): Required - Bundle Notification ID.
83
+
84
+
85
+ ---
86
+
87
+ ## Delete Bundle Notification
88
+
89
+ ```
90
+ bundle_notification = Files::BundleNotification.list.first
91
+
92
+ bundle_notification.delete
93
+ ```
94
+
95
+ ### Parameters
96
+
97
+ * `id` (int64): Required - Bundle Notification ID.
data/docs/site.md CHANGED
@@ -16,10 +16,12 @@
16
16
  "allowed_countries": "US,DE",
17
17
  "allowed_ips": "example",
18
18
  "ask_about_overwrites": true,
19
+ "bundle_activity_notifications": "never",
19
20
  "bundle_expiration": 1,
20
21
  "bundle_password_required": true,
21
22
  "bundle_registration_notifications": "never",
22
23
  "bundle_require_share_recipient": true,
24
+ "bundle_upload_receipt_notifications": "never",
23
25
  "bundle_watermark_attachment": "",
24
26
  "bundle_watermark_value": {
25
27
  "key": "example value"
@@ -159,10 +161,12 @@
159
161
  * `allowed_countries` (string): Comma seperated list of allowed Country codes
160
162
  * `allowed_ips` (string): List of allowed IP addresses
161
163
  * `ask_about_overwrites` (boolean): If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
164
+ * `bundle_activity_notifications` (string): Do Bundle owners receive activity notifications?
162
165
  * `bundle_expiration` (int64): Site-wide Bundle expiration in days
163
166
  * `bundle_password_required` (boolean): Do Bundles require password protection?
164
167
  * `bundle_registration_notifications` (string): Do Bundle owners receive registration notification?
165
168
  * `bundle_require_share_recipient` (boolean): Do Bundles require recipients for sharing?
169
+ * `bundle_upload_receipt_notifications` (string): Do Bundle uploaders receive upload confirmation notifications?
166
170
  * `bundle_watermark_attachment` (Image): Preview watermark image applied to all bundle items.
167
171
  * `bundle_watermark_value` (object): Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
168
172
  * `color2_left` (string): Page link and button color
@@ -372,6 +376,8 @@ Files::Site.update(
372
376
  bundle_password_required: true,
373
377
  bundle_require_share_recipient: true,
374
378
  bundle_registration_notifications: "never",
379
+ bundle_activity_notifications: "never",
380
+ bundle_upload_receipt_notifications: "never",
375
381
  password_requirements_apply_to_bundles: true,
376
382
  opt_out_global: true,
377
383
  use_provided_modified_at: true,
@@ -497,6 +503,8 @@ Files::Site.update(
497
503
  * `bundle_password_required` (boolean): Do Bundles require password protection?
498
504
  * `bundle_require_share_recipient` (boolean): Do Bundles require recipients for sharing?
499
505
  * `bundle_registration_notifications` (string): Do Bundle owners receive registration notification?
506
+ * `bundle_activity_notifications` (string): Do Bundle owners receive activity notifications?
507
+ * `bundle_upload_receipt_notifications` (string): Do Bundle uploaders receive upload confirmation notifications?
500
508
  * `password_requirements_apply_to_bundles` (boolean): Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
501
509
  * `opt_out_global` (boolean): Use servers in the USA only?
502
510
  * `use_provided_modified_at` (boolean): Allow uploaders to set `provided_modified_at` for uploaded files?
data/docs/user.md CHANGED
@@ -63,7 +63,9 @@
63
63
  "time_zone": "Pacific Time (US & Canada)",
64
64
  "type_of_2fa": "yubi",
65
65
  "updated_at": "2000-01-01T01:00:00Z",
66
- "user_root": "example"
66
+ "user_root": "example",
67
+ "days_remaining_until_password_expire": "2000-01-01T01:00:00Z",
68
+ "password_expire_at": "2000-01-01T01:00:00Z"
67
69
  }
68
70
  ```
69
71
 
@@ -125,6 +127,8 @@
125
127
  * `type_of_2fa` (string): Type(s) of 2FA methods in use. Will be either `sms`, `totp`, `u2f`, `yubi`, or multiple values sorted alphabetically and joined by an underscore.
126
128
  * `updated_at` (date-time): User record most recently updated at. Note this may be incremented because of internal or external updates.
127
129
  * `user_root` (string): Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
130
+ * `days_remaining_until_password_expire` (date-time): Number of days remaining until password expires
131
+ * `password_expire_at` (date-time): Password expiration datetime
128
132
  * `avatar_file` (file): An image file for your user avatar.
129
133
  * `avatar_delete` (boolean): If true, the avatar will be deleted.
130
134
  * `change_password` (string): Used for changing a password on an existing user.
@@ -0,0 +1,135 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class BundleNotification
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - Bundle ID to notify on
13
+ def bundle_id
14
+ @attributes[:bundle_id]
15
+ end
16
+
17
+ def bundle_id=(value)
18
+ @attributes[:bundle_id] = value
19
+ end
20
+
21
+ # int64 - Bundle Notification ID
22
+ def id
23
+ @attributes[:id]
24
+ end
25
+
26
+ def id=(value)
27
+ @attributes[:id] = value
28
+ end
29
+
30
+ # boolean - Triggers bundle notification when a registration action occurs for it.
31
+ def notify_on_registration
32
+ @attributes[:notify_on_registration]
33
+ end
34
+
35
+ def notify_on_registration=(value)
36
+ @attributes[:notify_on_registration] = value
37
+ end
38
+
39
+ # int64 - The id of the user to notify.
40
+ def user_id
41
+ @attributes[:user_id]
42
+ end
43
+
44
+ def user_id=(value)
45
+ @attributes[:user_id] = value
46
+ end
47
+
48
+ def delete(params = {})
49
+ params ||= {}
50
+ params[:id] = @attributes[:id]
51
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
52
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
53
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
54
+
55
+ Api.send_request("/bundle_notifications/#{@attributes[:id]}", :delete, params, @options)
56
+ end
57
+
58
+ def destroy(params = {})
59
+ delete(params)
60
+ end
61
+
62
+ def save
63
+ if @attributes[:id]
64
+ raise NotImplementedError.new("The BundleNotification object doesn't support updates.")
65
+ else
66
+ new_obj = BundleNotification.create(@attributes, @options)
67
+ @attributes = new_obj.attributes
68
+ end
69
+ end
70
+
71
+ # Parameters:
72
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
73
+ # 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 either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
74
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
75
+ # bundle_id - int64 - Bundle ID to notify on
76
+ def self.list(params = {}, options = {})
77
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
78
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
79
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
80
+ raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
81
+
82
+ List.new(BundleNotification, params) do
83
+ Api.send_request("/bundle_notifications", :get, params, options)
84
+ end
85
+ end
86
+
87
+ def self.all(params = {}, options = {})
88
+ list(params, options)
89
+ end
90
+
91
+ # Parameters:
92
+ # id (required) - int64 - Bundle Notification ID.
93
+ def self.find(id, params = {}, options = {})
94
+ params ||= {}
95
+ params[:id] = id
96
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
97
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
98
+
99
+ response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :get, params, options)
100
+ BundleNotification.new(response.data, options)
101
+ end
102
+
103
+ def self.get(id, params = {}, options = {})
104
+ find(id, params, options)
105
+ end
106
+
107
+ # Parameters:
108
+ # user_id (required) - int64 - The id of the user to notify.
109
+ # notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
110
+ # bundle_id (required) - int64 - Bundle ID to notify on
111
+ def self.create(params = {}, options = {})
112
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
113
+ raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
114
+ raise MissingParameterError.new("Parameter missing: user_id") unless params[:user_id]
115
+ raise MissingParameterError.new("Parameter missing: bundle_id") unless params[:bundle_id]
116
+
117
+ response, options = Api.send_request("/bundle_notifications", :post, params, options)
118
+ BundleNotification.new(response.data, options)
119
+ end
120
+
121
+ def self.delete(id, params = {}, options = {})
122
+ params ||= {}
123
+ params[:id] = id
124
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
125
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
126
+
127
+ response, _options = Api.send_request("/bundle_notifications/#{params[:id]}", :delete, params, options)
128
+ response.data
129
+ end
130
+
131
+ def self.destroy(id, params = {}, options = {})
132
+ delete(id, params, options)
133
+ end
134
+ end
135
+ end
@@ -69,6 +69,11 @@ module Files
69
69
  @attributes[:ask_about_overwrites]
70
70
  end
71
71
 
72
+ # string - Do Bundle owners receive activity notifications?
73
+ def bundle_activity_notifications
74
+ @attributes[:bundle_activity_notifications]
75
+ end
76
+
72
77
  # int64 - Site-wide Bundle expiration in days
73
78
  def bundle_expiration
74
79
  @attributes[:bundle_expiration]
@@ -89,6 +94,11 @@ module Files
89
94
  @attributes[:bundle_require_share_recipient]
90
95
  end
91
96
 
97
+ # string - Do Bundle uploaders receive upload confirmation notifications?
98
+ def bundle_upload_receipt_notifications
99
+ @attributes[:bundle_upload_receipt_notifications]
100
+ end
101
+
92
102
  # Image - Preview watermark image applied to all bundle items.
93
103
  def bundle_watermark_attachment
94
104
  @attributes[:bundle_watermark_attachment]
@@ -771,6 +781,8 @@ module Files
771
781
  # bundle_password_required - boolean - Do Bundles require password protection?
772
782
  # bundle_require_share_recipient - boolean - Do Bundles require recipients for sharing?
773
783
  # bundle_registration_notifications - string - Do Bundle owners receive registration notification?
784
+ # bundle_activity_notifications - string - Do Bundle owners receive activity notifications?
785
+ # bundle_upload_receipt_notifications - string - Do Bundle uploaders receive upload confirmation notifications?
774
786
  # password_requirements_apply_to_bundles - boolean - Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
775
787
  # opt_out_global - boolean - Use servers in the USA only?
776
788
  # use_provided_modified_at - boolean - Allow uploaders to set `provided_modified_at` for uploaded files?
@@ -868,6 +880,8 @@ module Files
868
880
  raise InvalidParameterError.new("Bad parameter: password_validity_days must be an Integer") if params[:password_validity_days] and !params[:password_validity_days].is_a?(Integer)
869
881
  raise InvalidParameterError.new("Bad parameter: password_min_length must be an Integer") if params[:password_min_length] and !params[:password_min_length].is_a?(Integer)
870
882
  raise InvalidParameterError.new("Bad parameter: bundle_registration_notifications must be an String") if params[:bundle_registration_notifications] and !params[:bundle_registration_notifications].is_a?(String)
883
+ raise InvalidParameterError.new("Bad parameter: bundle_activity_notifications must be an String") if params[:bundle_activity_notifications] and !params[:bundle_activity_notifications].is_a?(String)
884
+ raise InvalidParameterError.new("Bad parameter: bundle_upload_receipt_notifications must be an String") if params[:bundle_upload_receipt_notifications] and !params[:bundle_upload_receipt_notifications].is_a?(String)
871
885
  raise InvalidParameterError.new("Bad parameter: disable_users_from_inactivity_period_days must be an Integer") if params[:disable_users_from_inactivity_period_days] and !params[:disable_users_from_inactivity_period_days].is_a?(Integer)
872
886
  raise InvalidParameterError.new("Bad parameter: sftp_host_key_type must be an String") if params[:sftp_host_key_type] and !params[:sftp_host_key_type].is_a?(String)
873
887
  raise InvalidParameterError.new("Bad parameter: active_sftp_host_key_id must be an Integer") if params[:active_sftp_host_key_id] and !params[:active_sftp_host_key_id].is_a?(Integer)
@@ -523,6 +523,24 @@ module Files
523
523
  @attributes[:user_root] = value
524
524
  end
525
525
 
526
+ # date-time - Number of days remaining until password expires
527
+ def days_remaining_until_password_expire
528
+ @attributes[:days_remaining_until_password_expire]
529
+ end
530
+
531
+ def days_remaining_until_password_expire=(value)
532
+ @attributes[:days_remaining_until_password_expire] = value
533
+ end
534
+
535
+ # date-time - Password expiration datetime
536
+ def password_expire_at
537
+ @attributes[:password_expire_at]
538
+ end
539
+
540
+ def password_expire_at=(value)
541
+ @attributes[:password_expire_at] = value
542
+ end
543
+
526
544
  # file - An image file for your user avatar.
527
545
  def avatar_file
528
546
  @attributes[:avatar_file]
data/lib/files.com.rb CHANGED
@@ -49,6 +49,7 @@ require "files.com/models/bandwidth_snapshot"
49
49
  require "files.com/models/behavior"
50
50
  require "files.com/models/bundle"
51
51
  require "files.com/models/bundle_download"
52
+ require "files.com/models/bundle_notification"
52
53
  require "files.com/models/bundle_recipient"
53
54
  require "files.com/models/bundle_registration"
54
55
  require "files.com/models/clickwrap"
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.309
4
+ version: 1.0.311
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-17 00:00:00.000000000 Z
11
+ date: 2022-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -132,6 +132,7 @@ files:
132
132
  - docs/behavior.md
133
133
  - docs/bundle.md
134
134
  - docs/bundle_download.md
135
+ - docs/bundle_notification.md
135
136
  - docs/bundle_recipient.md
136
137
  - docs/bundle_registration.md
137
138
  - docs/clickwrap.md
@@ -215,6 +216,7 @@ files:
215
216
  - lib/files.com/models/behavior.rb
216
217
  - lib/files.com/models/bundle.rb
217
218
  - lib/files.com/models/bundle_download.rb
219
+ - lib/files.com/models/bundle_notification.rb
218
220
  - lib/files.com/models/bundle_recipient.rb
219
221
  - lib/files.com/models/bundle_registration.rb
220
222
  - lib/files.com/models/clickwrap.rb