files.com 1.1.768 → 1.1.770
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +47 -7
- data/_VERSION +1 -1
- data/docs/file.md +37 -0
- data/lib/files.com/api.rb +9 -4
- data/lib/files.com/api_client.rb +181 -55
- data/lib/files.com/list.rb +98 -66
- data/lib/files.com/models/action_log.rb +7 -2
- data/lib/files.com/models/action_notification_export.rb +13 -3
- data/lib/files.com/models/action_notification_export_result.rb +7 -2
- data/lib/files.com/models/ai_assistant_personality.rb +34 -8
- data/lib/files.com/models/ai_task.rb +39 -8
- data/lib/files.com/models/api_key.rb +49 -10
- data/lib/files.com/models/api_request_log.rb +7 -2
- data/lib/files.com/models/app.rb +7 -2
- data/lib/files.com/models/as2_incoming_message.rb +7 -2
- data/lib/files.com/models/as2_outgoing_message.rb +7 -2
- data/lib/files.com/models/as2_partner.rb +34 -8
- data/lib/files.com/models/as2_station.rb +34 -8
- data/lib/files.com/models/automation.rb +50 -10
- data/lib/files.com/models/automation_log.rb +7 -2
- data/lib/files.com/models/automation_run.rb +31 -6
- data/lib/files.com/models/bandwidth_snapshot.rb +7 -2
- data/lib/files.com/models/behavior.rb +46 -10
- data/lib/files.com/models/bundle.rb +39 -8
- data/lib/files.com/models/bundle_action.rb +7 -2
- data/lib/files.com/models/bundle_download.rb +7 -2
- data/lib/files.com/models/bundle_notification.rb +34 -8
- data/lib/files.com/models/bundle_recipient.rb +14 -4
- data/lib/files.com/models/bundle_registration.rb +7 -2
- data/lib/files.com/models/chat_session.rb +13 -3
- data/lib/files.com/models/child_site_management_policy.rb +34 -8
- data/lib/files.com/models/clickwrap.rb +34 -8
- data/lib/files.com/models/custom_domain.rb +40 -9
- data/lib/files.com/models/desktop_configuration_profile.rb +34 -8
- data/lib/files.com/models/dns_record.rb +7 -2
- data/lib/files.com/models/email_incoming_message.rb +7 -2
- data/lib/files.com/models/email_log.rb +7 -2
- data/lib/files.com/models/event_channel.rb +34 -8
- data/lib/files.com/models/event_delivery_attempt.rb +13 -3
- data/lib/files.com/models/event_record.rb +13 -3
- data/lib/files.com/models/event_subscription.rb +34 -8
- data/lib/files.com/models/event_target.rb +34 -8
- data/lib/files.com/models/exavault_api_request_log.rb +7 -2
- data/lib/files.com/models/expectation.rb +40 -9
- data/lib/files.com/models/expectation_evaluation.rb +13 -3
- data/lib/files.com/models/expectation_incident.rb +31 -6
- data/lib/files.com/models/external_event.rb +20 -5
- data/lib/files.com/models/file.rb +93 -15
- data/lib/files.com/models/file_comment.rb +28 -7
- data/lib/files.com/models/file_comment_reaction.rb +11 -2
- data/lib/files.com/models/file_migration.rb +6 -1
- data/lib/files.com/models/file_migration_log.rb +7 -2
- data/lib/files.com/models/folder.rb +13 -3
- data/lib/files.com/models/form_field_set.rb +34 -8
- data/lib/files.com/models/ftp_action_log.rb +7 -2
- data/lib/files.com/models/gpg_key.rb +34 -8
- data/lib/files.com/models/group.rb +34 -8
- data/lib/files.com/models/group_user.rb +29 -7
- data/lib/files.com/models/history.rb +35 -10
- data/lib/files.com/models/history_export.rb +13 -3
- data/lib/files.com/models/history_export_result.rb +7 -2
- data/lib/files.com/models/holiday_calendar.rb +34 -8
- data/lib/files.com/models/holiday_region.rb +7 -2
- data/lib/files.com/models/inbound_s3_log.rb +7 -2
- data/lib/files.com/models/inbox_recipient.rb +14 -4
- data/lib/files.com/models/inbox_registration.rb +7 -2
- data/lib/files.com/models/inbox_upload.rb +7 -2
- data/lib/files.com/models/integration_centric_profile.rb +34 -8
- data/lib/files.com/models/invoice.rb +13 -3
- data/lib/files.com/models/ip_address.rb +28 -8
- data/lib/files.com/models/key_lifecycle_rule.rb +34 -8
- data/lib/files.com/models/lock.rb +18 -3
- data/lib/files.com/models/metadata_category.rb +41 -10
- data/lib/files.com/models/notification.rb +34 -8
- data/lib/files.com/models/outbound_connection_log.rb +7 -2
- data/lib/files.com/models/partner.rb +34 -8
- data/lib/files.com/models/partner_channel.rb +34 -8
- data/lib/files.com/models/partner_channel_template.rb +34 -8
- data/lib/files.com/models/partner_site.rb +4 -0
- data/lib/files.com/models/partner_site_request.rb +33 -4
- data/lib/files.com/models/payment.rb +13 -3
- data/lib/files.com/models/pending_work_event.rb +13 -3
- data/lib/files.com/models/permission.rb +18 -4
- data/lib/files.com/models/public_hosting_request_log.rb +7 -2
- data/lib/files.com/models/public_key.rb +34 -8
- data/lib/files.com/models/remote_bandwidth_snapshot.rb +7 -2
- data/lib/files.com/models/remote_mount_backend.rb +39 -8
- data/lib/files.com/models/remote_server.rb +52 -11
- data/lib/files.com/models/remote_server_credential.rb +34 -8
- data/lib/files.com/models/request.rb +25 -6
- data/lib/files.com/models/restore.rb +14 -4
- data/lib/files.com/models/schedule.rb +34 -8
- data/lib/files.com/models/scheduled_export.rb +34 -8
- data/lib/files.com/models/scim_log.rb +13 -3
- data/lib/files.com/models/secret.rb +34 -8
- data/lib/files.com/models/session.rb +11 -2
- data/lib/files.com/models/settings_change.rb +7 -2
- data/lib/files.com/models/sftp_action_log.rb +7 -2
- data/lib/files.com/models/sftp_host_key.rb +34 -8
- data/lib/files.com/models/share_group.rb +34 -8
- data/lib/files.com/models/siem_http_destination.rb +39 -8
- data/lib/files.com/models/siem_http_destination_event.rb +13 -3
- data/lib/files.com/models/site.rb +16 -3
- data/lib/files.com/models/site_subdomain_redirect.rb +17 -3
- data/lib/files.com/models/snapshot.rb +39 -8
- data/lib/files.com/models/sso_event.rb +13 -3
- data/lib/files.com/models/sso_strategy.rb +18 -3
- data/lib/files.com/models/style.rb +20 -5
- data/lib/files.com/models/sync.rb +44 -8
- data/lib/files.com/models/sync_log.rb +7 -2
- data/lib/files.com/models/sync_run.rb +13 -3
- data/lib/files.com/models/usage_daily_snapshot.rb +7 -2
- data/lib/files.com/models/usage_snapshot.rb +7 -2
- data/lib/files.com/models/user.rb +50 -8
- data/lib/files.com/models/user_additional_email_recipient.rb +34 -8
- data/lib/files.com/models/user_cipher_use.rb +7 -2
- data/lib/files.com/models/user_lifecycle_rule.rb +34 -8
- data/lib/files.com/models/user_request.rb +24 -5
- data/lib/files.com/models/user_security_event.rb +13 -3
- data/lib/files.com/models/user_sftp_client_use.rb +7 -2
- data/lib/files.com/models/web_dav_action_log.rb +7 -2
- data/lib/files.com/models/webhook_test.rb +7 -2
- data/lib/files.com/models/workspace.rb +34 -8
- data/lib/files.com/response.rb +24 -0
- data/lib/files.com/sizable_io.rb +65 -4
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +23 -1
- data/spec/language_spec.rb +20 -10
- data/spec/lib/api_client_spec.rb +173 -18
- data/spec/list_spec.rb +203 -187
- data/spec/models/file_transfer_spec.rb +346 -0
- data/spec/models/persistence_spec.rb +167 -0
- data/spec/spec_helper.rb +122 -6
- data/spec/support/stubbed_api.rb +14 -0
- data/spec/support/transfer_server.rb +60 -0
- metadata +6 -2
|
@@ -1064,7 +1064,9 @@ module Files
|
|
|
1064
1064
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
1065
1065
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
1066
1066
|
|
|
1067
|
-
Api.send_request("/users/#{@attributes[:id]}", :patch, params, @options)
|
|
1067
|
+
response, options = Api.send_request("/users/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("User") }
|
|
1068
|
+
@attributes = response.data
|
|
1069
|
+
[ response, options ]
|
|
1068
1070
|
end
|
|
1069
1071
|
|
|
1070
1072
|
# Parameters:
|
|
@@ -1087,12 +1089,12 @@ module Files
|
|
|
1087
1089
|
|
|
1088
1090
|
def save
|
|
1089
1091
|
if @attributes[:id]
|
|
1090
|
-
|
|
1092
|
+
update(@attributes)
|
|
1091
1093
|
else
|
|
1092
1094
|
new_obj = User.create(@attributes, @options)
|
|
1095
|
+
@attributes = new_obj.attributes
|
|
1093
1096
|
end
|
|
1094
1097
|
|
|
1095
|
-
@attributes = new_obj.attributes
|
|
1096
1098
|
true
|
|
1097
1099
|
end
|
|
1098
1100
|
|
|
@@ -1109,6 +1111,11 @@ module Files
|
|
|
1109
1111
|
# ids - string - comma-separated list of User IDs
|
|
1110
1112
|
# include_parent_site_users - boolean - Include users from the parent site.
|
|
1111
1113
|
# search - string - Searches for partial matches of name, username, or email.
|
|
1114
|
+
#
|
|
1115
|
+
# params:: Hash of API operation parameter values.
|
|
1116
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
1117
|
+
#
|
|
1118
|
+
# Returns a Files::List of Files::User objects.
|
|
1112
1119
|
def self.list(params = {}, options = {})
|
|
1113
1120
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
1114
1121
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
@@ -1122,8 +1129,8 @@ module Files
|
|
|
1122
1129
|
raise InvalidParameterError.new("Bad parameter: ids must be an String") if params[:ids] and !params[:ids].is_a?(String)
|
|
1123
1130
|
raise InvalidParameterError.new("Bad parameter: search must be an String") if params[:search] and !params[:search].is_a?(String)
|
|
1124
1131
|
|
|
1125
|
-
List.new(User, params) do
|
|
1126
|
-
Api.send_request("/users", :get,
|
|
1132
|
+
List.new(User, params) do |page_params, &check_page|
|
|
1133
|
+
Api.send_request("/users", :get, page_params, options, &check_page)
|
|
1127
1134
|
end
|
|
1128
1135
|
end
|
|
1129
1136
|
|
|
@@ -1133,13 +1140,18 @@ module Files
|
|
|
1133
1140
|
|
|
1134
1141
|
# Parameters:
|
|
1135
1142
|
# id (required) - int64 - User ID.
|
|
1143
|
+
#
|
|
1144
|
+
# params:: Hash of API operation parameter values.
|
|
1145
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
1146
|
+
#
|
|
1147
|
+
# Returns a Files::User.
|
|
1136
1148
|
def self.find(id, params = {}, options = {})
|
|
1137
1149
|
params ||= {}
|
|
1138
1150
|
params[:id] = id
|
|
1139
1151
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
1140
1152
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
1141
1153
|
|
|
1142
|
-
response, options = Api.send_request("/users/#{params[:id]}", :get, params, options)
|
|
1154
|
+
response, options = Api.send_request("/users/#{params[:id]}", :get, params, options) { |reply| reply.require_object("User") }
|
|
1143
1155
|
User.new(response.data, options)
|
|
1144
1156
|
end
|
|
1145
1157
|
|
|
@@ -1217,6 +1229,11 @@ module Files
|
|
|
1217
1229
|
# workspace_admin - boolean - Whether the user is an administrator of their own Custom Workspace. Does not reflect administration granted through Permissions.
|
|
1218
1230
|
# username (required) - string - User's username
|
|
1219
1231
|
# workspace_id - int64 - ID of the Workspace the user belongs to. 0 is the Default Workspace.
|
|
1232
|
+
#
|
|
1233
|
+
# params:: Hash of API operation parameter values.
|
|
1234
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
1235
|
+
#
|
|
1236
|
+
# Returns a Files::User.
|
|
1220
1237
|
def self.create(params = {}, options = {})
|
|
1221
1238
|
raise InvalidParameterError.new("Bad parameter: change_password must be an String") if params[:change_password] and !params[:change_password].is_a?(String)
|
|
1222
1239
|
raise InvalidParameterError.new("Bad parameter: change_password_confirmation must be an String") if params[:change_password_confirmation] and !params[:change_password_confirmation].is_a?(String)
|
|
@@ -1258,11 +1275,16 @@ module Files
|
|
|
1258
1275
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
1259
1276
|
raise MissingParameterError.new("Parameter missing: username") unless params[:username]
|
|
1260
1277
|
|
|
1261
|
-
response, options = Api.send_request("/users", :post, params, options)
|
|
1278
|
+
response, options = Api.send_request("/users", :post, params, options) { |reply| reply.require_object("User") }
|
|
1262
1279
|
User.new(response.data, options)
|
|
1263
1280
|
end
|
|
1264
1281
|
|
|
1265
1282
|
# Unlock user who has been locked out due to failed logins
|
|
1283
|
+
#
|
|
1284
|
+
# params:: Hash of API operation parameter values.
|
|
1285
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
1286
|
+
#
|
|
1287
|
+
# Returns nil.
|
|
1266
1288
|
def self.unlock(id, params = {}, options = {})
|
|
1267
1289
|
params ||= {}
|
|
1268
1290
|
params[:id] = id
|
|
@@ -1274,6 +1296,11 @@ module Files
|
|
|
1274
1296
|
end
|
|
1275
1297
|
|
|
1276
1298
|
# Resend user welcome email
|
|
1299
|
+
#
|
|
1300
|
+
# params:: Hash of API operation parameter values.
|
|
1301
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
1302
|
+
#
|
|
1303
|
+
# Returns nil.
|
|
1277
1304
|
def self.resend_welcome_email(id, params = {}, options = {})
|
|
1278
1305
|
params ||= {}
|
|
1279
1306
|
params[:id] = id
|
|
@@ -1285,6 +1312,11 @@ module Files
|
|
|
1285
1312
|
end
|
|
1286
1313
|
|
|
1287
1314
|
# Trigger 2FA Reset process for user who has lost access to their existing 2FA methods
|
|
1315
|
+
#
|
|
1316
|
+
# params:: Hash of API operation parameter values.
|
|
1317
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
1318
|
+
#
|
|
1319
|
+
# Returns nil.
|
|
1288
1320
|
def self.user_2fa_reset(id, params = {}, options = {})
|
|
1289
1321
|
params ||= {}
|
|
1290
1322
|
params[:id] = id
|
|
@@ -1367,6 +1399,11 @@ module Files
|
|
|
1367
1399
|
# workspace_id - int64 - Workspace ID. Only Site Administrators can change this field. Values supplied by Workspace Administrators, Group Administrators, or other non-Site Administrators using `/user` are ignored.
|
|
1368
1400
|
# clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
|
|
1369
1401
|
# convert_to_partner_user - boolean - Required when assigning a Partner to an existing non-Partner user. If true, convert the user by assigning the partner_id provided.
|
|
1402
|
+
#
|
|
1403
|
+
# params:: Hash of API operation parameter values.
|
|
1404
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
1405
|
+
#
|
|
1406
|
+
# Returns a Files::User.
|
|
1370
1407
|
def self.update(id, params = {}, options = {})
|
|
1371
1408
|
params ||= {}
|
|
1372
1409
|
params[:id] = id
|
|
@@ -1411,12 +1448,17 @@ module Files
|
|
|
1411
1448
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
1412
1449
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
1413
1450
|
|
|
1414
|
-
response, options = Api.send_request("/users/#{params[:id]}", :patch, params, options)
|
|
1451
|
+
response, options = Api.send_request("/users/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("User") }
|
|
1415
1452
|
User.new(response.data, options)
|
|
1416
1453
|
end
|
|
1417
1454
|
|
|
1418
1455
|
# Parameters:
|
|
1419
1456
|
# new_owner_id - int64 - Provide a User ID here to transfer ownership of certain resources such as Automations and Share Links (Bundles) to that new user.
|
|
1457
|
+
#
|
|
1458
|
+
# params:: Hash of API operation parameter values.
|
|
1459
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
1460
|
+
#
|
|
1461
|
+
# Returns nil.
|
|
1420
1462
|
def self.delete(id, params = {}, options = {})
|
|
1421
1463
|
params ||= {}
|
|
1422
1464
|
params[:id] = id
|
|
@@ -60,7 +60,9 @@ module Files
|
|
|
60
60
|
raise InvalidParameterError.new("Bad parameter: email must be an String") if params[:email] and !params[:email].is_a?(String)
|
|
61
61
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
62
62
|
|
|
63
|
-
Api.send_request("/user_additional_email_recipients/#{@attributes[:id]}", :patch, params, @options)
|
|
63
|
+
response, options = Api.send_request("/user_additional_email_recipients/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("UserAdditionalEmailRecipient") }
|
|
64
|
+
@attributes = response.data
|
|
65
|
+
[ response, options ]
|
|
64
66
|
end
|
|
65
67
|
|
|
66
68
|
def delete(params = {})
|
|
@@ -80,12 +82,12 @@ module Files
|
|
|
80
82
|
|
|
81
83
|
def save
|
|
82
84
|
if @attributes[:id]
|
|
83
|
-
|
|
85
|
+
update(@attributes)
|
|
84
86
|
else
|
|
85
87
|
new_obj = UserAdditionalEmailRecipient.create(@attributes, @options)
|
|
88
|
+
@attributes = new_obj.attributes
|
|
86
89
|
end
|
|
87
90
|
|
|
88
|
-
@attributes = new_obj.attributes
|
|
89
91
|
true
|
|
90
92
|
end
|
|
91
93
|
|
|
@@ -96,6 +98,11 @@ module Files
|
|
|
96
98
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `email`, `user_id` or `workspace_id`.
|
|
97
99
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `email`, `workspace_id` or `user_id`. Valid field combinations are `[ workspace_id, email ]`, `[ user_id, email ]`, `[ workspace_id, user_id ]` or `[ workspace_id, user_id, email ]`.
|
|
98
100
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `email`.
|
|
101
|
+
#
|
|
102
|
+
# params:: Hash of API operation parameter values.
|
|
103
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
104
|
+
#
|
|
105
|
+
# Returns a Files::List of Files::UserAdditionalEmailRecipient objects.
|
|
99
106
|
def self.list(params = {}, options = {})
|
|
100
107
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
101
108
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
@@ -104,8 +111,8 @@ module Files
|
|
|
104
111
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
105
112
|
raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if params[:filter_prefix] and !params[:filter_prefix].is_a?(Hash)
|
|
106
113
|
|
|
107
|
-
List.new(UserAdditionalEmailRecipient, params) do
|
|
108
|
-
Api.send_request("/user_additional_email_recipients", :get,
|
|
114
|
+
List.new(UserAdditionalEmailRecipient, params) do |page_params, &check_page|
|
|
115
|
+
Api.send_request("/user_additional_email_recipients", :get, page_params, options, &check_page)
|
|
109
116
|
end
|
|
110
117
|
end
|
|
111
118
|
|
|
@@ -115,13 +122,18 @@ module Files
|
|
|
115
122
|
|
|
116
123
|
# Parameters:
|
|
117
124
|
# id (required) - int64 - User Additional Email Recipient ID.
|
|
125
|
+
#
|
|
126
|
+
# params:: Hash of API operation parameter values.
|
|
127
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
128
|
+
#
|
|
129
|
+
# Returns a Files::UserAdditionalEmailRecipient.
|
|
118
130
|
def self.find(id, params = {}, options = {})
|
|
119
131
|
params ||= {}
|
|
120
132
|
params[:id] = id
|
|
121
133
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
122
134
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
123
135
|
|
|
124
|
-
response, options = Api.send_request("/user_additional_email_recipients/#{params[:id]}", :get, params, options)
|
|
136
|
+
response, options = Api.send_request("/user_additional_email_recipients/#{params[:id]}", :get, params, options) { |reply| reply.require_object("UserAdditionalEmailRecipient") }
|
|
125
137
|
UserAdditionalEmailRecipient.new(response.data, options)
|
|
126
138
|
end
|
|
127
139
|
|
|
@@ -132,17 +144,27 @@ module Files
|
|
|
132
144
|
# Parameters:
|
|
133
145
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
134
146
|
# email (required) - string - Additional email recipient address
|
|
147
|
+
#
|
|
148
|
+
# params:: Hash of API operation parameter values.
|
|
149
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
150
|
+
#
|
|
151
|
+
# Returns a Files::UserAdditionalEmailRecipient.
|
|
135
152
|
def self.create(params = {}, options = {})
|
|
136
153
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
137
154
|
raise InvalidParameterError.new("Bad parameter: email must be an String") if params[:email] and !params[:email].is_a?(String)
|
|
138
155
|
raise MissingParameterError.new("Parameter missing: email") unless params[:email]
|
|
139
156
|
|
|
140
|
-
response, options = Api.send_request("/user_additional_email_recipients", :post, params, options)
|
|
157
|
+
response, options = Api.send_request("/user_additional_email_recipients", :post, params, options) { |reply| reply.require_object("UserAdditionalEmailRecipient") }
|
|
141
158
|
UserAdditionalEmailRecipient.new(response.data, options)
|
|
142
159
|
end
|
|
143
160
|
|
|
144
161
|
# Parameters:
|
|
145
162
|
# email - string - Additional email recipient address
|
|
163
|
+
#
|
|
164
|
+
# params:: Hash of API operation parameter values.
|
|
165
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
166
|
+
#
|
|
167
|
+
# Returns a Files::UserAdditionalEmailRecipient.
|
|
146
168
|
def self.update(id, params = {}, options = {})
|
|
147
169
|
params ||= {}
|
|
148
170
|
params[:id] = id
|
|
@@ -150,10 +172,14 @@ module Files
|
|
|
150
172
|
raise InvalidParameterError.new("Bad parameter: email must be an String") if params[:email] and !params[:email].is_a?(String)
|
|
151
173
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
152
174
|
|
|
153
|
-
response, options = Api.send_request("/user_additional_email_recipients/#{params[:id]}", :patch, params, options)
|
|
175
|
+
response, options = Api.send_request("/user_additional_email_recipients/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("UserAdditionalEmailRecipient") }
|
|
154
176
|
UserAdditionalEmailRecipient.new(response.data, options)
|
|
155
177
|
end
|
|
156
178
|
|
|
179
|
+
# params:: Hash of API operation parameter values.
|
|
180
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
181
|
+
#
|
|
182
|
+
# Returns nil.
|
|
157
183
|
def self.delete(id, params = {}, options = {})
|
|
158
184
|
params ||= {}
|
|
159
185
|
params[:id] = id
|
|
@@ -59,6 +59,11 @@ module Files
|
|
|
59
59
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `updated_at`.
|
|
60
60
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `updated_at`.
|
|
61
61
|
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `updated_at`.
|
|
62
|
+
#
|
|
63
|
+
# params:: Hash of API operation parameter values.
|
|
64
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
65
|
+
#
|
|
66
|
+
# Returns a Files::List of Files::UserCipherUse objects.
|
|
62
67
|
def self.list(params = {}, options = {})
|
|
63
68
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
64
69
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
@@ -70,8 +75,8 @@ module Files
|
|
|
70
75
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
71
76
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
72
77
|
|
|
73
|
-
List.new(UserCipherUse, params) do
|
|
74
|
-
Api.send_request("/user_cipher_uses", :get,
|
|
78
|
+
List.new(UserCipherUse, params) do |page_params, &check_page|
|
|
79
|
+
Api.send_request("/user_cipher_uses", :get, page_params, options, &check_page)
|
|
75
80
|
end
|
|
76
81
|
end
|
|
77
82
|
|
|
@@ -174,7 +174,9 @@ module Files
|
|
|
174
174
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
175
175
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
176
176
|
|
|
177
|
-
Api.send_request("/user_lifecycle_rules/#{@attributes[:id]}", :patch, params, @options)
|
|
177
|
+
response, options = Api.send_request("/user_lifecycle_rules/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("UserLifecycleRule") }
|
|
178
|
+
@attributes = response.data
|
|
179
|
+
[ response, options ]
|
|
178
180
|
end
|
|
179
181
|
|
|
180
182
|
def delete(params = {})
|
|
@@ -194,12 +196,12 @@ module Files
|
|
|
194
196
|
|
|
195
197
|
def save
|
|
196
198
|
if @attributes[:id]
|
|
197
|
-
|
|
199
|
+
update(@attributes)
|
|
198
200
|
else
|
|
199
201
|
new_obj = UserLifecycleRule.create(@attributes, @options)
|
|
202
|
+
@attributes = new_obj.attributes
|
|
200
203
|
end
|
|
201
204
|
|
|
202
|
-
@attributes = new_obj.attributes
|
|
203
205
|
true
|
|
204
206
|
end
|
|
205
207
|
|
|
@@ -208,14 +210,19 @@ module Files
|
|
|
208
210
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
209
211
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id` and `workspace_id`.
|
|
210
212
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`.
|
|
213
|
+
#
|
|
214
|
+
# params:: Hash of API operation parameter values.
|
|
215
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
216
|
+
#
|
|
217
|
+
# Returns a Files::List of Files::UserLifecycleRule objects.
|
|
211
218
|
def self.list(params = {}, options = {})
|
|
212
219
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
213
220
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
214
221
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
215
222
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
216
223
|
|
|
217
|
-
List.new(UserLifecycleRule, params) do
|
|
218
|
-
Api.send_request("/user_lifecycle_rules", :get,
|
|
224
|
+
List.new(UserLifecycleRule, params) do |page_params, &check_page|
|
|
225
|
+
Api.send_request("/user_lifecycle_rules", :get, page_params, options, &check_page)
|
|
219
226
|
end
|
|
220
227
|
end
|
|
221
228
|
|
|
@@ -225,13 +232,18 @@ module Files
|
|
|
225
232
|
|
|
226
233
|
# Parameters:
|
|
227
234
|
# id (required) - int64 - User Lifecycle Rule ID.
|
|
235
|
+
#
|
|
236
|
+
# params:: Hash of API operation parameter values.
|
|
237
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
238
|
+
#
|
|
239
|
+
# Returns a Files::UserLifecycleRule.
|
|
228
240
|
def self.find(id, params = {}, options = {})
|
|
229
241
|
params ||= {}
|
|
230
242
|
params[:id] = id
|
|
231
243
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
232
244
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
233
245
|
|
|
234
|
-
response, options = Api.send_request("/user_lifecycle_rules/#{params[:id]}", :get, params, options)
|
|
246
|
+
response, options = Api.send_request("/user_lifecycle_rules/#{params[:id]}", :get, params, options) { |reply| reply.require_object("UserLifecycleRule") }
|
|
235
247
|
UserLifecycleRule.new(response.data, options)
|
|
236
248
|
end
|
|
237
249
|
|
|
@@ -253,6 +265,11 @@ module Files
|
|
|
253
265
|
# user_state - string - State of the users to apply the rule to (inactive or disabled)
|
|
254
266
|
# user_tag - string - If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
255
267
|
# workspace_id - int64 - Workspace whose users the rule applies to. `0` means the Default Workspace. A Custom Workspace rule applies only to users who belong to that Workspace, regardless of access granted to other users.
|
|
268
|
+
#
|
|
269
|
+
# params:: Hash of API operation parameter values.
|
|
270
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
271
|
+
#
|
|
272
|
+
# Returns a Files::UserLifecycleRule.
|
|
256
273
|
def self.create(params = {}, options = {})
|
|
257
274
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
|
|
258
275
|
raise InvalidParameterError.new("Bad parameter: authentication_method must be an String") if params[:authentication_method] and !params[:authentication_method].is_a?(String)
|
|
@@ -264,7 +281,7 @@ module Files
|
|
|
264
281
|
raise InvalidParameterError.new("Bad parameter: user_tag must be an String") if params[:user_tag] and !params[:user_tag].is_a?(String)
|
|
265
282
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
266
283
|
|
|
267
|
-
response, options = Api.send_request("/user_lifecycle_rules", :post, params, options)
|
|
284
|
+
response, options = Api.send_request("/user_lifecycle_rules", :post, params, options) { |reply| reply.require_object("UserLifecycleRule") }
|
|
268
285
|
UserLifecycleRule.new(response.data, options)
|
|
269
286
|
end
|
|
270
287
|
|
|
@@ -282,6 +299,11 @@ module Files
|
|
|
282
299
|
# user_state - string - State of the users to apply the rule to (inactive or disabled)
|
|
283
300
|
# user_tag - string - If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
284
301
|
# workspace_id - int64 - Workspace whose users the rule applies to. `0` means the Default Workspace. A Custom Workspace rule applies only to users who belong to that Workspace, regardless of access granted to other users.
|
|
302
|
+
#
|
|
303
|
+
# params:: Hash of API operation parameter values.
|
|
304
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
305
|
+
#
|
|
306
|
+
# Returns a Files::UserLifecycleRule.
|
|
285
307
|
def self.update(id, params = {}, options = {})
|
|
286
308
|
params ||= {}
|
|
287
309
|
params[:id] = id
|
|
@@ -297,10 +319,14 @@ module Files
|
|
|
297
319
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
298
320
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
299
321
|
|
|
300
|
-
response, options = Api.send_request("/user_lifecycle_rules/#{params[:id]}", :patch, params, options)
|
|
322
|
+
response, options = Api.send_request("/user_lifecycle_rules/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("UserLifecycleRule") }
|
|
301
323
|
UserLifecycleRule.new(response.data, options)
|
|
302
324
|
end
|
|
303
325
|
|
|
326
|
+
# params:: Hash of API operation parameter values.
|
|
327
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
328
|
+
#
|
|
329
|
+
# Returns nil.
|
|
304
330
|
def self.delete(id, params = {}, options = {})
|
|
305
331
|
params ||= {}
|
|
306
332
|
params[:id] = id
|
|
@@ -74,21 +74,26 @@ module Files
|
|
|
74
74
|
raise NotImplementedError.new("The UserRequest object doesn't support updates.")
|
|
75
75
|
else
|
|
76
76
|
new_obj = UserRequest.create(@attributes, @options)
|
|
77
|
+
@attributes = new_obj.attributes
|
|
77
78
|
end
|
|
78
79
|
|
|
79
|
-
@attributes = new_obj.attributes
|
|
80
80
|
true
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
# Parameters:
|
|
84
84
|
# 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.
|
|
85
85
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
86
|
+
#
|
|
87
|
+
# params:: Hash of API operation parameter values.
|
|
88
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
89
|
+
#
|
|
90
|
+
# Returns a Files::List of Files::UserRequest objects.
|
|
86
91
|
def self.list(params = {}, options = {})
|
|
87
92
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
88
93
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
89
94
|
|
|
90
|
-
List.new(UserRequest, params) do
|
|
91
|
-
Api.send_request("/user_requests", :get,
|
|
95
|
+
List.new(UserRequest, params) do |page_params, &check_page|
|
|
96
|
+
Api.send_request("/user_requests", :get, page_params, options, &check_page)
|
|
92
97
|
end
|
|
93
98
|
end
|
|
94
99
|
|
|
@@ -98,13 +103,18 @@ module Files
|
|
|
98
103
|
|
|
99
104
|
# Parameters:
|
|
100
105
|
# id (required) - int64 - User Request ID.
|
|
106
|
+
#
|
|
107
|
+
# params:: Hash of API operation parameter values.
|
|
108
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
109
|
+
#
|
|
110
|
+
# Returns a Files::UserRequest.
|
|
101
111
|
def self.find(id, params = {}, options = {})
|
|
102
112
|
params ||= {}
|
|
103
113
|
params[:id] = id
|
|
104
114
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
105
115
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
106
116
|
|
|
107
|
-
response, options = Api.send_request("/user_requests/#{params[:id]}", :get, params, options)
|
|
117
|
+
response, options = Api.send_request("/user_requests/#{params[:id]}", :get, params, options) { |reply| reply.require_object("UserRequest") }
|
|
108
118
|
UserRequest.new(response.data, options)
|
|
109
119
|
end
|
|
110
120
|
|
|
@@ -117,6 +127,11 @@ module Files
|
|
|
117
127
|
# email (required) - string - Email of user requested
|
|
118
128
|
# details (required) - string - Details of the user request
|
|
119
129
|
# company - string - Company of the user requested
|
|
130
|
+
#
|
|
131
|
+
# params:: Hash of API operation parameter values.
|
|
132
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
133
|
+
#
|
|
134
|
+
# Returns a Files::UserRequest.
|
|
120
135
|
def self.create(params = {}, options = {})
|
|
121
136
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
122
137
|
raise InvalidParameterError.new("Bad parameter: email must be an String") if params[:email] and !params[:email].is_a?(String)
|
|
@@ -126,10 +141,14 @@ module Files
|
|
|
126
141
|
raise MissingParameterError.new("Parameter missing: email") unless params[:email]
|
|
127
142
|
raise MissingParameterError.new("Parameter missing: details") unless params[:details]
|
|
128
143
|
|
|
129
|
-
response, options = Api.send_request("/user_requests", :post, params, options)
|
|
144
|
+
response, options = Api.send_request("/user_requests", :post, params, options) { |reply| reply.require_object("UserRequest") }
|
|
130
145
|
UserRequest.new(response.data, options)
|
|
131
146
|
end
|
|
132
147
|
|
|
148
|
+
# params:: Hash of API operation parameter values.
|
|
149
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
150
|
+
#
|
|
151
|
+
# Returns nil.
|
|
133
152
|
def self.delete(id, params = {}, options = {})
|
|
134
153
|
params ||= {}
|
|
135
154
|
params[:id] = id
|
|
@@ -53,6 +53,11 @@ module Files
|
|
|
53
53
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
54
54
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
55
55
|
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
56
|
+
#
|
|
57
|
+
# params:: Hash of API operation parameter values.
|
|
58
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
59
|
+
#
|
|
60
|
+
# Returns a Files::List of Files::UserSecurityEvent objects.
|
|
56
61
|
def self.list(params = {}, options = {})
|
|
57
62
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
58
63
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
@@ -63,8 +68,8 @@ module Files
|
|
|
63
68
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
64
69
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
65
70
|
|
|
66
|
-
List.new(UserSecurityEvent, params) do
|
|
67
|
-
Api.send_request("/user_security_events", :get,
|
|
71
|
+
List.new(UserSecurityEvent, params) do |page_params, &check_page|
|
|
72
|
+
Api.send_request("/user_security_events", :get, page_params, options, &check_page)
|
|
68
73
|
end
|
|
69
74
|
end
|
|
70
75
|
|
|
@@ -74,13 +79,18 @@ module Files
|
|
|
74
79
|
|
|
75
80
|
# Parameters:
|
|
76
81
|
# id (required) - int64 - User Security Event ID.
|
|
82
|
+
#
|
|
83
|
+
# params:: Hash of API operation parameter values.
|
|
84
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
85
|
+
#
|
|
86
|
+
# Returns a Files::UserSecurityEvent.
|
|
77
87
|
def self.find(id, params = {}, options = {})
|
|
78
88
|
params ||= {}
|
|
79
89
|
params[:id] = id
|
|
80
90
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
81
91
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
82
92
|
|
|
83
|
-
response, options = Api.send_request("/user_security_events/#{params[:id]}", :get, params, options)
|
|
93
|
+
response, options = Api.send_request("/user_security_events/#{params[:id]}", :get, params, options) { |reply| reply.require_object("UserSecurityEvent") }
|
|
84
94
|
UserSecurityEvent.new(response.data, options)
|
|
85
95
|
end
|
|
86
96
|
|
|
@@ -39,14 +39,19 @@ module Files
|
|
|
39
39
|
# 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.
|
|
40
40
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
41
41
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
|
|
42
|
+
#
|
|
43
|
+
# params:: Hash of API operation parameter values.
|
|
44
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
45
|
+
#
|
|
46
|
+
# Returns a Files::List of Files::UserSftpClientUse objects.
|
|
42
47
|
def self.list(params = {}, options = {})
|
|
43
48
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
44
49
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
45
50
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
46
51
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
47
52
|
|
|
48
|
-
List.new(UserSftpClientUse, params) do
|
|
49
|
-
Api.send_request("/user_sftp_client_uses", :get,
|
|
53
|
+
List.new(UserSftpClientUse, params) do |page_params, &check_page|
|
|
54
|
+
Api.send_request("/user_sftp_client_uses", :get, page_params, options, &check_page)
|
|
50
55
|
end
|
|
51
56
|
end
|
|
52
57
|
|