files-com 1.6.7__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.7.dist-info → files_com-1.6.113.dist-info}/METADATA +81 -19
- {files_com-1.6.7.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 +21 -3
- files_sdk/models/as2_partner.py +31 -9
- files_sdk/models/as2_station.py +1 -1
- files_sdk/models/automation.py +65 -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 +59 -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 -31
- 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 +105 -12
- 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.7.dist-info → files_com-1.6.113.dist-info}/WHEEL +0 -0
- {files_com-1.6.7.dist-info → files_com-1.6.113.dist-info}/licenses/LICENSE +0 -0
- {files_com-1.6.7.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
|
@@ -22,12 +22,13 @@ class User:
|
|
|
22
22
|
"billable": None, # boolean - Is this a billable user record?
|
|
23
23
|
"billing_permission": None, # boolean - Allow this user to perform operations on the account, payments, and invoices?
|
|
24
24
|
"bypass_site_allowed_ips": None, # boolean - Allow this user to skip site-wide IP blacklists?
|
|
25
|
-
"
|
|
25
|
+
"bypass_user_lifecycle_rules": None, # boolean - Exempt this user from user lifecycle rules?
|
|
26
26
|
"created_at": None, # date-time - When this user was created
|
|
27
27
|
"dav_permission": None, # boolean - Can the user connect with WebDAV?
|
|
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):
|
|
@@ -185,10 +192,11 @@ class User:
|
|
|
185
192
|
# authenticate_until - string - Scheduled Date/Time at which user will be deactivated
|
|
186
193
|
# authentication_method - string - How is this user authenticated?
|
|
187
194
|
# billing_permission - boolean - Allow this user to perform operations on the account, payments, and invoices?
|
|
188
|
-
#
|
|
195
|
+
# bypass_user_lifecycle_rules - boolean - Exempt this user from user lifecycle rules?
|
|
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"
|
|
@@ -367,6 +394,8 @@ class User:
|
|
|
367
394
|
)
|
|
368
395
|
return response.data
|
|
369
396
|
|
|
397
|
+
# Parameters:
|
|
398
|
+
# 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.
|
|
370
399
|
def delete(self, params=None):
|
|
371
400
|
if not isinstance(params, dict):
|
|
372
401
|
params = {}
|
|
@@ -379,6 +408,12 @@ class User:
|
|
|
379
408
|
raise MissingParameterError("Parameter missing: id")
|
|
380
409
|
if "id" in params and not isinstance(params["id"], int):
|
|
381
410
|
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
411
|
+
if "new_owner_id" in params and not isinstance(
|
|
412
|
+
params["new_owner_id"], int
|
|
413
|
+
):
|
|
414
|
+
raise InvalidParameterError(
|
|
415
|
+
"Bad parameter: new_owner_id must be an int"
|
|
416
|
+
)
|
|
382
417
|
Api.send_request(
|
|
383
418
|
"DELETE",
|
|
384
419
|
"/users/{id}".format(id=params["id"]),
|
|
@@ -403,8 +438,8 @@ class User:
|
|
|
403
438
|
# Parameters:
|
|
404
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.
|
|
405
440
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
406
|
-
# 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 `
|
|
407
|
-
# 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 ]`.
|
|
408
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`.
|
|
409
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`.
|
|
410
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 ]`.
|
|
@@ -501,10 +536,11 @@ def get(id, params=None, options=None):
|
|
|
501
536
|
# authenticate_until - string - Scheduled Date/Time at which user will be deactivated
|
|
502
537
|
# authentication_method - string - How is this user authenticated?
|
|
503
538
|
# billing_permission - boolean - Allow this user to perform operations on the account, payments, and invoices?
|
|
504
|
-
#
|
|
539
|
+
# bypass_user_lifecycle_rules - boolean - Exempt this user from user lifecycle rules?
|
|
505
540
|
# bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
506
541
|
# dav_permission - boolean - Can the user connect with WebDAV?
|
|
507
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
|
|
508
544
|
# ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
509
545
|
# header_text - string - Text to display to the user in the header of the UI
|
|
510
546
|
# language - string - Preferred language
|
|
@@ -513,6 +549,8 @@ def get(id, params=None, options=None):
|
|
|
513
549
|
# company - string - User's company
|
|
514
550
|
# notes - string - Any internal notes on the user
|
|
515
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
|
|
516
554
|
# password_validity_days - int64 - Number of days to allow user to use the same password
|
|
517
555
|
# readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
|
|
518
556
|
# receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
|
|
@@ -527,6 +565,7 @@ def get(id, params=None, options=None):
|
|
|
527
565
|
# sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
528
566
|
# subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
529
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.
|
|
530
569
|
# time_zone - string - User time zone
|
|
531
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.
|
|
532
571
|
# user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
@@ -614,11 +653,11 @@ def create(params=None, options=None):
|
|
|
614
653
|
raise InvalidParameterError(
|
|
615
654
|
"Bad parameter: billing_permission must be an bool"
|
|
616
655
|
)
|
|
617
|
-
if "
|
|
618
|
-
params["
|
|
656
|
+
if "bypass_user_lifecycle_rules" in params and not isinstance(
|
|
657
|
+
params["bypass_user_lifecycle_rules"], bool
|
|
619
658
|
):
|
|
620
659
|
raise InvalidParameterError(
|
|
621
|
-
"Bad parameter:
|
|
660
|
+
"Bad parameter: bypass_user_lifecycle_rules must be an bool"
|
|
622
661
|
)
|
|
623
662
|
if "bypass_site_allowed_ips" in params and not isinstance(
|
|
624
663
|
params["bypass_site_allowed_ips"], bool
|
|
@@ -634,6 +673,12 @@ def create(params=None, options=None):
|
|
|
634
673
|
)
|
|
635
674
|
if "disabled" in params and not isinstance(params["disabled"], bool):
|
|
636
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
|
+
)
|
|
637
682
|
if "ftp_permission" in params and not isinstance(
|
|
638
683
|
params["ftp_permission"], bool
|
|
639
684
|
):
|
|
@@ -664,6 +709,14 @@ def create(params=None, options=None):
|
|
|
664
709
|
raise InvalidParameterError(
|
|
665
710
|
"Bad parameter: office_integration_enabled must be an bool"
|
|
666
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")
|
|
667
720
|
if "password_validity_days" in params and not isinstance(
|
|
668
721
|
params["password_validity_days"], int
|
|
669
722
|
):
|
|
@@ -744,6 +797,8 @@ def create(params=None, options=None):
|
|
|
744
797
|
raise InvalidParameterError(
|
|
745
798
|
"Bad parameter: require_2fa must be an str"
|
|
746
799
|
)
|
|
800
|
+
if "tags" in params and not isinstance(params["tags"], str):
|
|
801
|
+
raise InvalidParameterError("Bad parameter: tags must be an str")
|
|
747
802
|
if "time_zone" in params and not isinstance(params["time_zone"], str):
|
|
748
803
|
raise InvalidParameterError("Bad parameter: time_zone must be an str")
|
|
749
804
|
if "user_root" in params and not isinstance(params["user_root"], str):
|
|
@@ -830,10 +885,11 @@ def user_2fa_reset(id, params=None, options=None):
|
|
|
830
885
|
# authenticate_until - string - Scheduled Date/Time at which user will be deactivated
|
|
831
886
|
# authentication_method - string - How is this user authenticated?
|
|
832
887
|
# billing_permission - boolean - Allow this user to perform operations on the account, payments, and invoices?
|
|
833
|
-
#
|
|
888
|
+
# bypass_user_lifecycle_rules - boolean - Exempt this user from user lifecycle rules?
|
|
834
889
|
# bypass_site_allowed_ips - boolean - Allow this user to skip site-wide IP blacklists?
|
|
835
890
|
# dav_permission - boolean - Can the user connect with WebDAV?
|
|
836
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
|
|
837
893
|
# ftp_permission - boolean - Can the user access with FTP/FTPS?
|
|
838
894
|
# header_text - string - Text to display to the user in the header of the UI
|
|
839
895
|
# language - string - Preferred language
|
|
@@ -842,6 +898,8 @@ def user_2fa_reset(id, params=None, options=None):
|
|
|
842
898
|
# company - string - User's company
|
|
843
899
|
# notes - string - Any internal notes on the user
|
|
844
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
|
|
845
903
|
# password_validity_days - int64 - Number of days to allow user to use the same password
|
|
846
904
|
# readonly_site_admin - boolean - Is the user an allowed to view all (non-billing) site configuration for this site?
|
|
847
905
|
# receive_admin_alerts - boolean - Should the user receive admin alerts such a certificate expiration notifications and overages?
|
|
@@ -856,10 +914,13 @@ def user_2fa_reset(id, params=None, options=None):
|
|
|
856
914
|
# sso_strategy_id - int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
857
915
|
# subscribe_to_newsletter - boolean - Is the user subscribed to the newsletter?
|
|
858
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.
|
|
859
918
|
# time_zone - string - User time zone
|
|
860
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.
|
|
861
920
|
# user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
862
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.
|
|
863
924
|
def update(id, params=None, options=None):
|
|
864
925
|
if not isinstance(params, dict):
|
|
865
926
|
params = {}
|
|
@@ -946,11 +1007,11 @@ def update(id, params=None, options=None):
|
|
|
946
1007
|
raise InvalidParameterError(
|
|
947
1008
|
"Bad parameter: billing_permission must be an bool"
|
|
948
1009
|
)
|
|
949
|
-
if "
|
|
950
|
-
params["
|
|
1010
|
+
if "bypass_user_lifecycle_rules" in params and not isinstance(
|
|
1011
|
+
params["bypass_user_lifecycle_rules"], bool
|
|
951
1012
|
):
|
|
952
1013
|
raise InvalidParameterError(
|
|
953
|
-
"Bad parameter:
|
|
1014
|
+
"Bad parameter: bypass_user_lifecycle_rules must be an bool"
|
|
954
1015
|
)
|
|
955
1016
|
if "bypass_site_allowed_ips" in params and not isinstance(
|
|
956
1017
|
params["bypass_site_allowed_ips"], bool
|
|
@@ -966,6 +1027,12 @@ def update(id, params=None, options=None):
|
|
|
966
1027
|
)
|
|
967
1028
|
if "disabled" in params and not isinstance(params["disabled"], bool):
|
|
968
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
|
+
)
|
|
969
1036
|
if "ftp_permission" in params and not isinstance(
|
|
970
1037
|
params["ftp_permission"], bool
|
|
971
1038
|
):
|
|
@@ -996,6 +1063,14 @@ def update(id, params=None, options=None):
|
|
|
996
1063
|
raise InvalidParameterError(
|
|
997
1064
|
"Bad parameter: office_integration_enabled must be an bool"
|
|
998
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")
|
|
999
1074
|
if "password_validity_days" in params and not isinstance(
|
|
1000
1075
|
params["password_validity_days"], int
|
|
1001
1076
|
):
|
|
@@ -1076,6 +1151,8 @@ def update(id, params=None, options=None):
|
|
|
1076
1151
|
raise InvalidParameterError(
|
|
1077
1152
|
"Bad parameter: require_2fa must be an str"
|
|
1078
1153
|
)
|
|
1154
|
+
if "tags" in params and not isinstance(params["tags"], str):
|
|
1155
|
+
raise InvalidParameterError("Bad parameter: tags must be an str")
|
|
1079
1156
|
if "time_zone" in params and not isinstance(params["time_zone"], str):
|
|
1080
1157
|
raise InvalidParameterError("Bad parameter: time_zone must be an str")
|
|
1081
1158
|
if "user_root" in params and not isinstance(params["user_root"], str):
|
|
@@ -1084,6 +1161,14 @@ def update(id, params=None, options=None):
|
|
|
1084
1161
|
raise InvalidParameterError("Bad parameter: user_home must be an str")
|
|
1085
1162
|
if "username" in params and not isinstance(params["username"], str):
|
|
1086
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
|
+
)
|
|
1087
1172
|
if "id" not in params:
|
|
1088
1173
|
raise MissingParameterError("Parameter missing: id")
|
|
1089
1174
|
response, options = Api.send_request(
|
|
@@ -1092,6 +1177,8 @@ def update(id, params=None, options=None):
|
|
|
1092
1177
|
return User(response.data, options)
|
|
1093
1178
|
|
|
1094
1179
|
|
|
1180
|
+
# Parameters:
|
|
1181
|
+
# 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.
|
|
1095
1182
|
def delete(id, params=None, options=None):
|
|
1096
1183
|
if not isinstance(params, dict):
|
|
1097
1184
|
params = {}
|
|
@@ -1100,6 +1187,12 @@ def delete(id, params=None, options=None):
|
|
|
1100
1187
|
params["id"] = id
|
|
1101
1188
|
if "id" in params and not isinstance(params["id"], int):
|
|
1102
1189
|
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
1190
|
+
if "new_owner_id" in params and not isinstance(
|
|
1191
|
+
params["new_owner_id"], int
|
|
1192
|
+
):
|
|
1193
|
+
raise InvalidParameterError(
|
|
1194
|
+
"Bad parameter: new_owner_id must be an int"
|
|
1195
|
+
)
|
|
1103
1196
|
if "id" not in params:
|
|
1104
1197
|
raise MissingParameterError("Parameter missing: id")
|
|
1105
1198
|
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
|
|