files-com 1.6.14__py3-none-any.whl → 1.6.113__py3-none-any.whl
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.
Potentially problematic release.
This version of files-com might be problematic. Click here for more details.
- README.md +80 -18
- _VERSION +1 -1
- {files_com-1.6.14.dist-info → files_com-1.6.113.dist-info}/METADATA +81 -19
- {files_com-1.6.14.dist-info → files_com-1.6.113.dist-info}/RECORD +53 -46
- files_sdk/__init__.py +17 -1
- files_sdk/error.py +98 -23
- files_sdk/models/__init__.py +9 -0
- files_sdk/models/api_key.py +10 -0
- files_sdk/models/api_request_log.py +20 -3
- files_sdk/models/as2_partner.py +27 -5
- files_sdk/models/as2_station.py +1 -1
- files_sdk/models/automation.py +49 -5
- files_sdk/models/automation_log.py +20 -3
- files_sdk/models/behavior.py +2 -16
- files_sdk/models/bundle.py +1 -1
- files_sdk/models/bundle_action.py +5 -1
- files_sdk/models/bundle_registration.py +1 -1
- files_sdk/models/child_site_management_policy.py +278 -0
- files_sdk/models/email_log.py +17 -7
- files_sdk/models/exavault_api_request_log.py +20 -3
- files_sdk/models/file.py +8 -0
- files_sdk/models/file_migration_log.py +17 -7
- files_sdk/models/folder.py +11 -1
- files_sdk/models/ftp_action_log.py +20 -3
- files_sdk/models/gpg_key.py +61 -9
- files_sdk/models/history_export.py +4 -4
- files_sdk/models/history_export_result.py +2 -2
- files_sdk/models/holiday_region.py +58 -0
- files_sdk/models/inbox_registration.py +1 -1
- files_sdk/models/invoice_line_item.py +5 -0
- files_sdk/models/outbound_connection_log.py +20 -3
- files_sdk/models/partner.py +296 -0
- files_sdk/models/permission.py +10 -2
- files_sdk/models/public_hosting_request_log.py +27 -8
- files_sdk/models/public_key.py +39 -3
- files_sdk/models/remote_mount_backend.py +438 -0
- files_sdk/models/remote_server.py +19 -91
- files_sdk/models/remote_server_configuration_file.py +1 -0
- files_sdk/models/scim_log.py +88 -0
- files_sdk/models/sftp_action_log.py +20 -3
- files_sdk/models/siem_http_destination.py +98 -19
- files_sdk/models/site.py +37 -20
- files_sdk/models/sso_strategy.py +2 -1
- files_sdk/models/sync.py +574 -0
- files_sdk/models/sync_log.py +19 -8
- files_sdk/models/sync_run.py +123 -0
- files_sdk/models/user.py +79 -2
- files_sdk/models/user_cipher_use.py +24 -1
- files_sdk/models/user_lifecycle_rule.py +94 -39
- files_sdk/models/web_dav_action_log.py +20 -3
- {files_com-1.6.14.dist-info → files_com-1.6.113.dist-info}/WHEEL +0 -0
- {files_com-1.6.14.dist-info → files_com-1.6.113.dist-info}/licenses/LICENSE +0 -0
- {files_com-1.6.14.dist-info → files_com-1.6.113.dist-info}/top_level.txt +0 -0
files_sdk/models/sync_log.py
CHANGED
|
@@ -10,9 +10,10 @@ from files_sdk.error import ( # noqa: F401
|
|
|
10
10
|
|
|
11
11
|
class SyncLog:
|
|
12
12
|
default_attributes = {
|
|
13
|
-
"timestamp": None, # date-time - Start Time of Action
|
|
13
|
+
"timestamp": None, # date-time - Start Time of Action. Deprecrated: Use created_at.
|
|
14
14
|
"sync_id": None, # int64 - Sync ID
|
|
15
|
-
"external_event_id": None, # int64 - External Event ID
|
|
15
|
+
"external_event_id": None, # int64 - External Event ID used by legacy syncs
|
|
16
|
+
"sync_run_id": None, # int64 - Sync Run ID
|
|
16
17
|
"error_type": None, # string - Error type, if applicable
|
|
17
18
|
"message": None, # string - Message
|
|
18
19
|
"operation": None, # string - Operation type
|
|
@@ -20,6 +21,7 @@ class SyncLog:
|
|
|
20
21
|
"size": None, # int64 - File size
|
|
21
22
|
"file_type": None, # string - File type
|
|
22
23
|
"status": None, # string - Status
|
|
24
|
+
"created_at": None, # date-time - Start Time of Action
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
def __init__(self, attributes=None, options=None):
|
|
@@ -45,8 +47,11 @@ class SyncLog:
|
|
|
45
47
|
# Parameters:
|
|
46
48
|
# 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.
|
|
47
49
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
48
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `
|
|
49
|
-
#
|
|
50
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `external_event_id`, `operation`, `status`, `sync_id`, `created_at` or `sync_run_id`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
|
|
51
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
|
|
52
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
|
|
53
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
|
|
54
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
|
|
50
55
|
def list(params=None, options=None):
|
|
51
56
|
if not isinstance(params, dict):
|
|
52
57
|
params = {}
|
|
@@ -58,11 +63,17 @@ def list(params=None, options=None):
|
|
|
58
63
|
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
59
64
|
if "filter" in params and not isinstance(params["filter"], dict):
|
|
60
65
|
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
61
|
-
if "
|
|
62
|
-
|
|
63
|
-
):
|
|
66
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
67
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
68
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
64
69
|
raise InvalidParameterError(
|
|
65
|
-
"Bad parameter:
|
|
70
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
71
|
+
)
|
|
72
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
73
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
74
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
75
|
+
raise InvalidParameterError(
|
|
76
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
66
77
|
)
|
|
67
78
|
return ListObj(SyncLog, "GET", "/sync_logs", params, options)
|
|
68
79
|
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SyncRun:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - SyncRun ID
|
|
14
|
+
"body": None, # string - Log or summary body for this run
|
|
15
|
+
"bytes_synced": None, # int64 - Total bytes synced in this run
|
|
16
|
+
"compared_files": None, # int64 - Number of files compared
|
|
17
|
+
"compared_folders": None, # int64 - Number of folders compared
|
|
18
|
+
"completed_at": None, # date-time - When this run was completed
|
|
19
|
+
"created_at": None, # date-time - When this run was created
|
|
20
|
+
"dest_remote_server_type": None, # string - Destination remote server type, if any
|
|
21
|
+
"dry_run": None, # boolean - Whether this run was a dry run (no actual changes made)
|
|
22
|
+
"errored_files": None, # int64 - Number of files that errored
|
|
23
|
+
"estimated_bytes_count": None, # int64 - Estimated bytes count for this run
|
|
24
|
+
"event_errors": None, # array(string) - Array of errors encountered during the run
|
|
25
|
+
"log_url": None, # string - Link to external log file.
|
|
26
|
+
"runtime": None, # double - Total runtime in seconds
|
|
27
|
+
"site_id": None, # int64 - Site ID
|
|
28
|
+
"src_remote_server_type": None, # string - Source remote server type, if any
|
|
29
|
+
"status": None, # string - Status of the sync run (success, failure, partial_failure, in_progress, skipped)
|
|
30
|
+
"successful_files": None, # int64 - Number of files successfully synced
|
|
31
|
+
"sync_id": None, # int64 - ID of the Sync this run belongs to
|
|
32
|
+
"sync_name": None, # string - Name of the Sync this run belongs to
|
|
33
|
+
"updated_at": None, # date-time - When this run was last updated
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
def __init__(self, attributes=None, options=None):
|
|
37
|
+
if not isinstance(attributes, dict):
|
|
38
|
+
attributes = {}
|
|
39
|
+
if not isinstance(options, dict):
|
|
40
|
+
options = {}
|
|
41
|
+
self.set_attributes(attributes)
|
|
42
|
+
self.options = options
|
|
43
|
+
|
|
44
|
+
def set_attributes(self, attributes):
|
|
45
|
+
for attribute, default_value in SyncRun.default_attributes.items():
|
|
46
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
47
|
+
|
|
48
|
+
def get_attributes(self):
|
|
49
|
+
return {
|
|
50
|
+
k: getattr(self, k, None)
|
|
51
|
+
for k in SyncRun.default_attributes
|
|
52
|
+
if getattr(self, k, None) is not None
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# Parameters:
|
|
57
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
58
|
+
# 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.
|
|
59
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
60
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `sync_id`, `created_at` or `status`.
|
|
61
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `status`, `dry_run`, `src_remote_server_type`, `dest_remote_server_type` or `sync_id`. Valid field combinations are `[ status, created_at ]`, `[ src_remote_server_type, created_at ]`, `[ dest_remote_server_type, created_at ]`, `[ sync_id, created_at ]`, `[ src_remote_server_type, status ]`, `[ dest_remote_server_type, status ]`, `[ sync_id, status ]`, `[ src_remote_server_type, status, created_at ]`, `[ dest_remote_server_type, status, created_at ]` or `[ sync_id, status, created_at ]`.
|
|
62
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
63
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
64
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
65
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
66
|
+
def list(params=None, options=None):
|
|
67
|
+
if not isinstance(params, dict):
|
|
68
|
+
params = {}
|
|
69
|
+
if not isinstance(options, dict):
|
|
70
|
+
options = {}
|
|
71
|
+
if "user_id" in params and not isinstance(params["user_id"], int):
|
|
72
|
+
raise InvalidParameterError("Bad parameter: user_id must be an int")
|
|
73
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
74
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
75
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
76
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
77
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
78
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
79
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
80
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
81
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
82
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
83
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
84
|
+
raise InvalidParameterError(
|
|
85
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
86
|
+
)
|
|
87
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
88
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
89
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
90
|
+
raise InvalidParameterError(
|
|
91
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
92
|
+
)
|
|
93
|
+
return ListObj(SyncRun, "GET", "/sync_runs", params, options)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def all(params=None, options=None):
|
|
97
|
+
list(params, options)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# Parameters:
|
|
101
|
+
# id (required) - int64 - Sync Run ID.
|
|
102
|
+
def find(id, params=None, options=None):
|
|
103
|
+
if not isinstance(params, dict):
|
|
104
|
+
params = {}
|
|
105
|
+
if not isinstance(options, dict):
|
|
106
|
+
options = {}
|
|
107
|
+
params["id"] = id
|
|
108
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
109
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
110
|
+
if "id" not in params:
|
|
111
|
+
raise MissingParameterError("Parameter missing: id")
|
|
112
|
+
response, options = Api.send_request(
|
|
113
|
+
"GET", "/sync_runs/{id}".format(id=params["id"]), params, options
|
|
114
|
+
)
|
|
115
|
+
return SyncRun(response.data, options)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def get(id, params=None, options=None):
|
|
119
|
+
find(id, params, options)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def new(*args, **kwargs):
|
|
123
|
+
return SyncRun(*args, **kwargs)
|
files_sdk/models/user.py
CHANGED
|
@@ -28,6 +28,7 @@ class User:
|
|
|
28
28
|
"disabled": None, # boolean - Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.
|
|
29
29
|
"disabled_expired_or_inactive": None, # boolean - Computed property that returns true if user disabled or expired or inactive.
|
|
30
30
|
"email": None, # email - User email address
|
|
31
|
+
"filesystem_layout": None, # string - File system layout
|
|
31
32
|
"first_login_at": None, # date-time - User's first login time
|
|
32
33
|
"ftp_permission": None, # boolean - Can the user access with FTP/FTPS?
|
|
33
34
|
"group_ids": None, # string - Comma-separated list of group IDs of which this user is a member
|
|
@@ -49,6 +50,9 @@ class User:
|
|
|
49
50
|
"notes": None, # string - Any internal notes on the user
|
|
50
51
|
"notification_daily_send_time": None, # int64 - Hour of the day at which daily notifications should be sent. Can be in range 0 to 23
|
|
51
52
|
"office_integration_enabled": None, # boolean - Enable integration with Office for the web?
|
|
53
|
+
"partner_admin": None, # boolean - Is this user a Partner administrator?
|
|
54
|
+
"partner_id": None, # int64 - Partner ID if this user belongs to a Partner
|
|
55
|
+
"partner_name": None, # string - Name of the Partner if this user belongs to a Partner
|
|
52
56
|
"password_set_at": None, # date-time - Last time the user's password was set
|
|
53
57
|
"password_validity_days": None, # int64 - Number of days to allow user to use the same password
|
|
54
58
|
"public_keys_count": None, # int64 - Number of public keys associated with this user
|
|
@@ -69,6 +73,7 @@ class User:
|
|
|
69
73
|
"sso_strategy_id": None, # int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
70
74
|
"subscribe_to_newsletter": None, # boolean - Is the user subscribed to the newsletter?
|
|
71
75
|
"externally_managed": None, # boolean - Is this user managed by a SsoStrategy?
|
|
76
|
+
"tags": None, # string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
72
77
|
"time_zone": None, # string - User time zone
|
|
73
78
|
"type_of_2fa": None, # string - Type(s) of 2FA methods in use, for programmatic use. Will be either `sms`, `totp`, `webauthn`, `yubi`, `email`, or multiple values sorted alphabetically and joined by an underscore. Does not specify whether user has more than one of a given method.
|
|
74
79
|
"type_of_2fa_for_display": None, # string - Type(s) of 2FA methods in use, formatted for displaying in the UI. Unlike `type_of_2fa`, this value will make clear when a user has more than 1 of the same type of method.
|
|
@@ -86,6 +91,8 @@ class User:
|
|
|
86
91
|
"password": None, # string - User password.
|
|
87
92
|
"password_confirmation": None, # string - Optional, but if provided, we will ensure that it matches the value sent in `password`.
|
|
88
93
|
"announcements_read": None, # boolean - Signifies that the user has read all the announcements in the UI.
|
|
94
|
+
"clear_2fa": None, # boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
|
|
95
|
+
"convert_to_partner_user": None, # boolean - If true, convert this user to a partner user by assigning the partner_id provided.
|
|
89
96
|
}
|
|
90
97
|
|
|
91
98
|
def __init__(self, attributes=None, options=None):
|
|
@@ -189,6 +196,7 @@ class User:
|
|
|
189
196
|
# bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
190
197
|
# dav_permission - boolean - Can the user connect with WebDAV?
|
|
191
198
|
# disabled - boolean - Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.
|
|
199
|
+
# filesystem_layout - string - File system layout
|
|
192
200
|
# ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
193
201
|
# header_text - string - Text to display to the user in the header of the UI
|
|
194
202
|
# language - string - Preferred language
|
|
@@ -197,6 +205,8 @@ class User:
|
|
|
197
205
|
# company - string - User's company
|
|
198
206
|
# notes - string - Any internal notes on the user
|
|
199
207
|
# office_integration_enabled - boolean - Enable integration with Office for the web?
|
|
208
|
+
# partner_admin - boolean - Is this user a Partner administrator?
|
|
209
|
+
# partner_id - int64 - Partner ID if this user belongs to a Partner
|
|
200
210
|
# password_validity_days - int64 - Number of days to allow user to use the same password
|
|
201
211
|
# readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
|
|
202
212
|
# receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
|
|
@@ -211,10 +221,13 @@ class User:
|
|
|
211
221
|
# sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
212
222
|
# subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
213
223
|
# require_2fa - string - 2FA required setting
|
|
224
|
+
# tags - string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
214
225
|
# time_zone - string - User time zone
|
|
215
226
|
# 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.
|
|
216
227
|
# user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
217
228
|
# username - string - User's username
|
|
229
|
+
# clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
|
|
230
|
+
# convert_to_partner_user - boolean - If true, convert this user to a partner user by assigning the partner_id provided.
|
|
218
231
|
def update(self, params=None):
|
|
219
232
|
if not isinstance(params, dict):
|
|
220
233
|
params = {}
|
|
@@ -289,6 +302,12 @@ class User:
|
|
|
289
302
|
raise InvalidParameterError(
|
|
290
303
|
"Bad parameter: authentication_method must be an str"
|
|
291
304
|
)
|
|
305
|
+
if "filesystem_layout" in params and not isinstance(
|
|
306
|
+
params["filesystem_layout"], str
|
|
307
|
+
):
|
|
308
|
+
raise InvalidParameterError(
|
|
309
|
+
"Bad parameter: filesystem_layout must be an str"
|
|
310
|
+
)
|
|
292
311
|
if "header_text" in params and not isinstance(
|
|
293
312
|
params["header_text"], str
|
|
294
313
|
):
|
|
@@ -313,6 +332,12 @@ class User:
|
|
|
313
332
|
)
|
|
314
333
|
if "notes" in params and not isinstance(params["notes"], str):
|
|
315
334
|
raise InvalidParameterError("Bad parameter: notes must be an str")
|
|
335
|
+
if "partner_id" in params and not isinstance(
|
|
336
|
+
params["partner_id"], int
|
|
337
|
+
):
|
|
338
|
+
raise InvalidParameterError(
|
|
339
|
+
"Bad parameter: partner_id must be an int"
|
|
340
|
+
)
|
|
316
341
|
if "password_validity_days" in params and not isinstance(
|
|
317
342
|
params["password_validity_days"], int
|
|
318
343
|
):
|
|
@@ -343,6 +368,8 @@ class User:
|
|
|
343
368
|
raise InvalidParameterError(
|
|
344
369
|
"Bad parameter: require_2fa must be an str"
|
|
345
370
|
)
|
|
371
|
+
if "tags" in params and not isinstance(params["tags"], str):
|
|
372
|
+
raise InvalidParameterError("Bad parameter: tags must be an str")
|
|
346
373
|
if "time_zone" in params and not isinstance(params["time_zone"], str):
|
|
347
374
|
raise InvalidParameterError(
|
|
348
375
|
"Bad parameter: time_zone must be an str"
|
|
@@ -411,8 +438,8 @@ class User:
|
|
|
411
438
|
# Parameters:
|
|
412
439
|
# 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.
|
|
413
440
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
414
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required`, `username` or `
|
|
415
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `
|
|
441
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required`, `username`, `site_admin` or `disabled`.
|
|
442
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]` or `[ company, name ]`.
|
|
416
443
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
|
417
444
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
|
|
418
445
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`. Valid field combinations are `[ company, name ]`.
|
|
@@ -513,6 +540,7 @@ def get(id, params=None, options=None):
|
|
|
513
540
|
# bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
514
541
|
# dav_permission - boolean - Can the user connect with WebDAV?
|
|
515
542
|
# disabled - boolean - Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.
|
|
543
|
+
# filesystem_layout - string - File system layout
|
|
516
544
|
# ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
517
545
|
# header_text - string - Text to display to the user in the header of the UI
|
|
518
546
|
# language - string - Preferred language
|
|
@@ -521,6 +549,8 @@ def get(id, params=None, options=None):
|
|
|
521
549
|
# company - string - User's company
|
|
522
550
|
# notes - string - Any internal notes on the user
|
|
523
551
|
# office_integration_enabled - boolean - Enable integration with Office for the web?
|
|
552
|
+
# partner_admin - boolean - Is this user a Partner administrator?
|
|
553
|
+
# partner_id - int64 - Partner ID if this user belongs to a Partner
|
|
524
554
|
# password_validity_days - int64 - Number of days to allow user to use the same password
|
|
525
555
|
# readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
|
|
526
556
|
# receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
|
|
@@ -535,6 +565,7 @@ def get(id, params=None, options=None):
|
|
|
535
565
|
# sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
536
566
|
# subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
537
567
|
# require_2fa - string - 2FA required setting
|
|
568
|
+
# tags - string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
538
569
|
# time_zone - string - User time zone
|
|
539
570
|
# 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.
|
|
540
571
|
# user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
@@ -642,6 +673,12 @@ def create(params=None, options=None):
|
|
|
642
673
|
)
|
|
643
674
|
if "disabled" in params and not isinstance(params["disabled"], bool):
|
|
644
675
|
raise InvalidParameterError("Bad parameter: disabled must be an bool")
|
|
676
|
+
if "filesystem_layout" in params and not isinstance(
|
|
677
|
+
params["filesystem_layout"], str
|
|
678
|
+
):
|
|
679
|
+
raise InvalidParameterError(
|
|
680
|
+
"Bad parameter: filesystem_layout must be an str"
|
|
681
|
+
)
|
|
645
682
|
if "ftp_permission" in params and not isinstance(
|
|
646
683
|
params["ftp_permission"], bool
|
|
647
684
|
):
|
|
@@ -672,6 +709,14 @@ def create(params=None, options=None):
|
|
|
672
709
|
raise InvalidParameterError(
|
|
673
710
|
"Bad parameter: office_integration_enabled must be an bool"
|
|
674
711
|
)
|
|
712
|
+
if "partner_admin" in params and not isinstance(
|
|
713
|
+
params["partner_admin"], bool
|
|
714
|
+
):
|
|
715
|
+
raise InvalidParameterError(
|
|
716
|
+
"Bad parameter: partner_admin must be an bool"
|
|
717
|
+
)
|
|
718
|
+
if "partner_id" in params and not isinstance(params["partner_id"], int):
|
|
719
|
+
raise InvalidParameterError("Bad parameter: partner_id must be an int")
|
|
675
720
|
if "password_validity_days" in params and not isinstance(
|
|
676
721
|
params["password_validity_days"], int
|
|
677
722
|
):
|
|
@@ -752,6 +797,8 @@ def create(params=None, options=None):
|
|
|
752
797
|
raise InvalidParameterError(
|
|
753
798
|
"Bad parameter: require_2fa must be an str"
|
|
754
799
|
)
|
|
800
|
+
if "tags" in params and not isinstance(params["tags"], str):
|
|
801
|
+
raise InvalidParameterError("Bad parameter: tags must be an str")
|
|
755
802
|
if "time_zone" in params and not isinstance(params["time_zone"], str):
|
|
756
803
|
raise InvalidParameterError("Bad parameter: time_zone must be an str")
|
|
757
804
|
if "user_root" in params and not isinstance(params["user_root"], str):
|
|
@@ -842,6 +889,7 @@ def user_2fa_reset(id, params=None, options=None):
|
|
|
842
889
|
# bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
843
890
|
# dav_permission - boolean - Can the user connect with WebDAV?
|
|
844
891
|
# disabled - boolean - Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.
|
|
892
|
+
# filesystem_layout - string - File system layout
|
|
845
893
|
# ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
846
894
|
# header_text - string - Text to display to the user in the header of the UI
|
|
847
895
|
# language - string - Preferred language
|
|
@@ -850,6 +898,8 @@ def user_2fa_reset(id, params=None, options=None):
|
|
|
850
898
|
# company - string - User's company
|
|
851
899
|
# notes - string - Any internal notes on the user
|
|
852
900
|
# office_integration_enabled - boolean - Enable integration with Office for the web?
|
|
901
|
+
# partner_admin - boolean - Is this user a Partner administrator?
|
|
902
|
+
# partner_id - int64 - Partner ID if this user belongs to a Partner
|
|
853
903
|
# password_validity_days - int64 - Number of days to allow user to use the same password
|
|
854
904
|
# readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
|
|
855
905
|
# receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
|
|
@@ -864,10 +914,13 @@ def user_2fa_reset(id, params=None, options=None):
|
|
|
864
914
|
# sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
865
915
|
# subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
866
916
|
# require_2fa - string - 2FA required setting
|
|
917
|
+
# tags - string - Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
867
918
|
# time_zone - string - User time zone
|
|
868
919
|
# 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.
|
|
869
920
|
# user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
870
921
|
# username - string - User's username
|
|
922
|
+
# clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
|
|
923
|
+
# convert_to_partner_user - boolean - If true, convert this user to a partner user by assigning the partner_id provided.
|
|
871
924
|
def update(id, params=None, options=None):
|
|
872
925
|
if not isinstance(params, dict):
|
|
873
926
|
params = {}
|
|
@@ -974,6 +1027,12 @@ def update(id, params=None, options=None):
|
|
|
974
1027
|
)
|
|
975
1028
|
if "disabled" in params and not isinstance(params["disabled"], bool):
|
|
976
1029
|
raise InvalidParameterError("Bad parameter: disabled must be an bool")
|
|
1030
|
+
if "filesystem_layout" in params and not isinstance(
|
|
1031
|
+
params["filesystem_layout"], str
|
|
1032
|
+
):
|
|
1033
|
+
raise InvalidParameterError(
|
|
1034
|
+
"Bad parameter: filesystem_layout must be an str"
|
|
1035
|
+
)
|
|
977
1036
|
if "ftp_permission" in params and not isinstance(
|
|
978
1037
|
params["ftp_permission"], bool
|
|
979
1038
|
):
|
|
@@ -1004,6 +1063,14 @@ def update(id, params=None, options=None):
|
|
|
1004
1063
|
raise InvalidParameterError(
|
|
1005
1064
|
"Bad parameter: office_integration_enabled must be an bool"
|
|
1006
1065
|
)
|
|
1066
|
+
if "partner_admin" in params and not isinstance(
|
|
1067
|
+
params["partner_admin"], bool
|
|
1068
|
+
):
|
|
1069
|
+
raise InvalidParameterError(
|
|
1070
|
+
"Bad parameter: partner_admin must be an bool"
|
|
1071
|
+
)
|
|
1072
|
+
if "partner_id" in params and not isinstance(params["partner_id"], int):
|
|
1073
|
+
raise InvalidParameterError("Bad parameter: partner_id must be an int")
|
|
1007
1074
|
if "password_validity_days" in params and not isinstance(
|
|
1008
1075
|
params["password_validity_days"], int
|
|
1009
1076
|
):
|
|
@@ -1084,6 +1151,8 @@ def update(id, params=None, options=None):
|
|
|
1084
1151
|
raise InvalidParameterError(
|
|
1085
1152
|
"Bad parameter: require_2fa must be an str"
|
|
1086
1153
|
)
|
|
1154
|
+
if "tags" in params and not isinstance(params["tags"], str):
|
|
1155
|
+
raise InvalidParameterError("Bad parameter: tags must be an str")
|
|
1087
1156
|
if "time_zone" in params and not isinstance(params["time_zone"], str):
|
|
1088
1157
|
raise InvalidParameterError("Bad parameter: time_zone must be an str")
|
|
1089
1158
|
if "user_root" in params and not isinstance(params["user_root"], str):
|
|
@@ -1092,6 +1161,14 @@ def update(id, params=None, options=None):
|
|
|
1092
1161
|
raise InvalidParameterError("Bad parameter: user_home must be an str")
|
|
1093
1162
|
if "username" in params and not isinstance(params["username"], str):
|
|
1094
1163
|
raise InvalidParameterError("Bad parameter: username must be an str")
|
|
1164
|
+
if "clear_2fa" in params and not isinstance(params["clear_2fa"], bool):
|
|
1165
|
+
raise InvalidParameterError("Bad parameter: clear_2fa must be an bool")
|
|
1166
|
+
if "convert_to_partner_user" in params and not isinstance(
|
|
1167
|
+
params["convert_to_partner_user"], bool
|
|
1168
|
+
):
|
|
1169
|
+
raise InvalidParameterError(
|
|
1170
|
+
"Bad parameter: convert_to_partner_user must be an bool"
|
|
1171
|
+
)
|
|
1095
1172
|
if "id" not in params:
|
|
1096
1173
|
raise MissingParameterError("Parameter missing: id")
|
|
1097
1174
|
response, options = Api.send_request(
|
|
@@ -11,12 +11,13 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class UserCipherUse:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - UserCipherUse ID
|
|
14
|
+
"user_id": None, # int64 - ID of the user who performed this access
|
|
15
|
+
"username": None, # string - Username of the user who performed this access
|
|
14
16
|
"protocol_cipher": None, # string - The protocol and cipher employed
|
|
15
17
|
"created_at": None, # date-time - The earliest recorded use of this combination of interface and protocol and cipher (for this user)
|
|
16
18
|
"insecure": None, # boolean - Is this cipher considered insecure?
|
|
17
19
|
"interface": None, # string - The interface accessed
|
|
18
20
|
"updated_at": None, # date-time - The most recent use of this combination of interface and protocol and cipher (for this user)
|
|
19
|
-
"user_id": None, # int64 - ID of the user who performed this access
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
def __init__(self, attributes=None, options=None):
|
|
@@ -46,6 +47,12 @@ class UserCipherUse:
|
|
|
46
47
|
# user_id - int64 - User ID. If provided, will return uses for this user.
|
|
47
48
|
# 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.
|
|
48
49
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
50
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `updated_at`.
|
|
51
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `insecure` and `updated_at`. Valid field combinations are `[ insecure, updated_at ]`.
|
|
52
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `updated_at`.
|
|
53
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `updated_at`.
|
|
54
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `updated_at`.
|
|
55
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `updated_at`.
|
|
49
56
|
def list(params=None, options=None):
|
|
50
57
|
if not isinstance(params, dict):
|
|
51
58
|
params = {}
|
|
@@ -57,6 +64,22 @@ def list(params=None, options=None):
|
|
|
57
64
|
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
58
65
|
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
59
66
|
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
67
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
68
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
69
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
70
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
71
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
72
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
73
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
74
|
+
raise InvalidParameterError(
|
|
75
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
76
|
+
)
|
|
77
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
78
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
79
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
80
|
+
raise InvalidParameterError(
|
|
81
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
82
|
+
)
|
|
60
83
|
return ListObj(UserCipherUse, "GET", "/user_cipher_uses", params, options)
|
|
61
84
|
|
|
62
85
|
|