files-com 1.6.164__py3-none-any.whl → 1.6.219__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.
- _VERSION +1 -1
- {files_com-1.6.164.dist-info → files_com-1.6.219.dist-info}/METADATA +1 -1
- {files_com-1.6.164.dist-info → files_com-1.6.219.dist-info}/RECORD +29 -28
- files_sdk/__init__.py +3 -1
- files_sdk/models/__init__.py +1 -0
- files_sdk/models/api_key.py +7 -21
- files_sdk/models/as2_incoming_message.py +3 -2
- files_sdk/models/as2_outgoing_message.py +3 -2
- files_sdk/models/as2_partner.py +3 -2
- files_sdk/models/as2_station.py +15 -4
- files_sdk/models/automation.py +10 -2
- files_sdk/models/automation_run.py +2 -1
- files_sdk/models/behavior.py +11 -13
- files_sdk/models/bundle.py +31 -1
- files_sdk/models/gpg_key.py +28 -1
- files_sdk/models/group.py +10 -2
- files_sdk/models/key_lifecycle_rule.py +4 -1
- files_sdk/models/partner.py +12 -1
- files_sdk/models/public_key.py +3 -2
- files_sdk/models/remote_server.py +11 -2
- files_sdk/models/remote_server_credential.py +12 -1
- files_sdk/models/restore.py +20 -0
- files_sdk/models/sync.py +10 -2
- files_sdk/models/sync_run.py +3 -2
- files_sdk/models/user.py +26 -2
- files_sdk/models/workspace.py +202 -0
- {files_com-1.6.164.dist-info → files_com-1.6.219.dist-info}/WHEEL +0 -0
- {files_com-1.6.164.dist-info → files_com-1.6.219.dist-info}/licenses/LICENSE +0 -0
- {files_com-1.6.164.dist-info → files_com-1.6.219.dist-info}/top_level.txt +0 -0
files_sdk/models/bundle.py
CHANGED
|
@@ -46,6 +46,7 @@ class Bundle:
|
|
|
46
46
|
"inbox_id": None, # int64 - ID of the associated inbox, if available.
|
|
47
47
|
"watermark_attachment": None, # Image - Preview watermark image applied to all bundle items.
|
|
48
48
|
"watermark_value": None, # object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
|
|
49
|
+
"send_one_time_password_to_recipient_at_registration": None, # boolean - If true, require_share_recipient bundles will send a one-time password to the recipient when they register. Cannot be enabled if the bundle has a password set.
|
|
49
50
|
"has_inbox": None, # boolean - Does this bundle have an associated inbox?
|
|
50
51
|
"dont_allow_folders_in_uploads": None, # boolean - Should folder uploads be prevented?
|
|
51
52
|
"paths": None, # array(string) - A list of paths in this bundle. For performance reasons, this is not provided when listing bundles.
|
|
@@ -131,11 +132,13 @@ class Bundle:
|
|
|
131
132
|
# permissions - string - Permissions that apply to Folders in this Share Link.
|
|
132
133
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
|
133
134
|
# require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
|
135
|
+
# send_one_time_password_to_recipient_at_registration - boolean - If true, require_share_recipient bundles will send a one-time password to the recipient when they register. Cannot be enabled if the bundle has a password set.
|
|
134
136
|
# send_email_receipt_to_uploader - boolean - Send delivery receipt to the uploader. Note: For writable share only
|
|
135
137
|
# skip_company - boolean - BundleRegistrations can be saved without providing company?
|
|
136
138
|
# start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
|
|
137
139
|
# skip_email - boolean - BundleRegistrations can be saved without providing email?
|
|
138
140
|
# skip_name - boolean - BundleRegistrations can be saved without providing name?
|
|
141
|
+
# user_id - int64 - The owning user id. Only site admins can set this.
|
|
139
142
|
# watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
|
|
140
143
|
# watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
|
141
144
|
def update(self, params=None):
|
|
@@ -218,6 +221,10 @@ class Bundle:
|
|
|
218
221
|
raise InvalidParameterError(
|
|
219
222
|
"Bad parameter: start_access_on_date must be an str"
|
|
220
223
|
)
|
|
224
|
+
if "user_id" in params and not isinstance(params["user_id"], int):
|
|
225
|
+
raise InvalidParameterError(
|
|
226
|
+
"Bad parameter: user_id must be an int"
|
|
227
|
+
)
|
|
221
228
|
response, _options = Api.send_request(
|
|
222
229
|
"PATCH",
|
|
223
230
|
"/bundles/{id}".format(id=params["id"]),
|
|
@@ -264,7 +271,7 @@ class Bundle:
|
|
|
264
271
|
# 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.
|
|
265
272
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
266
273
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
|
|
267
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, expires_at ]`.
|
|
274
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, created_at ]` and `[ user_id, expires_at ]`.
|
|
268
275
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at` and `expires_at`.
|
|
269
276
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
|
|
270
277
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.
|
|
@@ -352,6 +359,7 @@ def get(id, params=None, options=None):
|
|
|
352
359
|
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
|
353
360
|
# inbox_id - int64 - ID of the associated inbox, if available.
|
|
354
361
|
# require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
|
362
|
+
# send_one_time_password_to_recipient_at_registration - boolean - If true, require_share_recipient bundles will send a one-time password to the recipient when they register. Cannot be enabled if the bundle has a password set.
|
|
355
363
|
# send_email_receipt_to_uploader - boolean - Send delivery receipt to the uploader. Note: For writable share only
|
|
356
364
|
# skip_email - boolean - BundleRegistrations can be saved without providing email?
|
|
357
365
|
# skip_name - boolean - BundleRegistrations can be saved without providing name?
|
|
@@ -442,6 +450,15 @@ def create(params=None, options=None):
|
|
|
442
450
|
raise InvalidParameterError(
|
|
443
451
|
"Bad parameter: require_share_recipient must be an bool"
|
|
444
452
|
)
|
|
453
|
+
if (
|
|
454
|
+
"send_one_time_password_to_recipient_at_registration" in params
|
|
455
|
+
and not isinstance(
|
|
456
|
+
params["send_one_time_password_to_recipient_at_registration"], bool
|
|
457
|
+
)
|
|
458
|
+
):
|
|
459
|
+
raise InvalidParameterError(
|
|
460
|
+
"Bad parameter: send_one_time_password_to_recipient_at_registration must be an bool"
|
|
461
|
+
)
|
|
445
462
|
if "send_email_receipt_to_uploader" in params and not isinstance(
|
|
446
463
|
params["send_email_receipt_to_uploader"], bool
|
|
447
464
|
):
|
|
@@ -526,11 +543,13 @@ def share(id, params=None, options=None):
|
|
|
526
543
|
# permissions - string - Permissions that apply to Folders in this Share Link.
|
|
527
544
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
|
528
545
|
# require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
|
546
|
+
# send_one_time_password_to_recipient_at_registration - boolean - If true, require_share_recipient bundles will send a one-time password to the recipient when they register. Cannot be enabled if the bundle has a password set.
|
|
529
547
|
# send_email_receipt_to_uploader - boolean - Send delivery receipt to the uploader. Note: For writable share only
|
|
530
548
|
# skip_company - boolean - BundleRegistrations can be saved without providing company?
|
|
531
549
|
# start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
|
|
532
550
|
# skip_email - boolean - BundleRegistrations can be saved without providing email?
|
|
533
551
|
# skip_name - boolean - BundleRegistrations can be saved without providing name?
|
|
552
|
+
# user_id - int64 - The owning user id. Only site admins can set this.
|
|
534
553
|
# watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
|
|
535
554
|
# watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
|
536
555
|
def update(id, params=None, options=None):
|
|
@@ -617,6 +636,15 @@ def update(id, params=None, options=None):
|
|
|
617
636
|
raise InvalidParameterError(
|
|
618
637
|
"Bad parameter: require_share_recipient must be an bool"
|
|
619
638
|
)
|
|
639
|
+
if (
|
|
640
|
+
"send_one_time_password_to_recipient_at_registration" in params
|
|
641
|
+
and not isinstance(
|
|
642
|
+
params["send_one_time_password_to_recipient_at_registration"], bool
|
|
643
|
+
)
|
|
644
|
+
):
|
|
645
|
+
raise InvalidParameterError(
|
|
646
|
+
"Bad parameter: send_one_time_password_to_recipient_at_registration must be an bool"
|
|
647
|
+
)
|
|
620
648
|
if "send_email_receipt_to_uploader" in params and not isinstance(
|
|
621
649
|
params["send_email_receipt_to_uploader"], bool
|
|
622
650
|
):
|
|
@@ -641,6 +669,8 @@ def update(id, params=None, options=None):
|
|
|
641
669
|
)
|
|
642
670
|
if "skip_name" in params and not isinstance(params["skip_name"], bool):
|
|
643
671
|
raise InvalidParameterError("Bad parameter: skip_name must be an bool")
|
|
672
|
+
if "user_id" in params and not isinstance(params["user_id"], int):
|
|
673
|
+
raise InvalidParameterError("Bad parameter: user_id must be an int")
|
|
644
674
|
if "watermark_attachment_delete" in params and not isinstance(
|
|
645
675
|
params["watermark_attachment_delete"], bool
|
|
646
676
|
):
|
files_sdk/models/gpg_key.py
CHANGED
|
@@ -11,6 +11,7 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class GpgKey:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - GPG key ID.
|
|
14
|
+
"workspace_id": None, # int64 - Workspace ID (0 for default workspace).
|
|
14
15
|
"expires_at": None, # date-time - GPG key expiration date.
|
|
15
16
|
"name": None, # string - GPG key name.
|
|
16
17
|
"partner_id": None, # int64 - Partner ID who owns this GPG Key, if applicable.
|
|
@@ -138,7 +139,12 @@ class GpgKey:
|
|
|
138
139
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
139
140
|
# 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.
|
|
140
141
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
141
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`
|
|
142
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `name` or `expires_at`.
|
|
143
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`, `partner_id` or `expires_at`. Valid field combinations are `[ workspace_id, expires_at ]`.
|
|
144
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `expires_at`.
|
|
145
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `expires_at`.
|
|
146
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `expires_at`.
|
|
147
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `expires_at`.
|
|
142
148
|
def list(params=None, options=None):
|
|
143
149
|
if not isinstance(params, dict):
|
|
144
150
|
params = {}
|
|
@@ -152,6 +158,20 @@ def list(params=None, options=None):
|
|
|
152
158
|
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
153
159
|
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
154
160
|
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
161
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
162
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
163
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
164
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
165
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
166
|
+
raise InvalidParameterError(
|
|
167
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
168
|
+
)
|
|
169
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
170
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
171
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
172
|
+
raise InvalidParameterError(
|
|
173
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
174
|
+
)
|
|
155
175
|
return ListObj(GpgKey, "GET", "/gpg_keys", params, options)
|
|
156
176
|
|
|
157
177
|
|
|
@@ -188,6 +208,7 @@ def get(id, params=None, options=None):
|
|
|
188
208
|
# private_key - string - The GPG private key
|
|
189
209
|
# private_key_password - string - The GPG private key password
|
|
190
210
|
# name (required) - string - GPG key name.
|
|
211
|
+
# workspace_id - int64 - Workspace ID (0 for default workspace).
|
|
191
212
|
# generate_expires_at - string - Expiration date of the key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
|
192
213
|
# generate_keypair - boolean - If true, generate a new GPG key pair. Can not be used with `public_key`/`private_key`
|
|
193
214
|
# generate_full_name - string - Full name of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
|
@@ -215,6 +236,12 @@ def create(params=None, options=None):
|
|
|
215
236
|
)
|
|
216
237
|
if "name" in params and not isinstance(params["name"], str):
|
|
217
238
|
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
239
|
+
if "workspace_id" in params and not isinstance(
|
|
240
|
+
params["workspace_id"], int
|
|
241
|
+
):
|
|
242
|
+
raise InvalidParameterError(
|
|
243
|
+
"Bad parameter: workspace_id must be an int"
|
|
244
|
+
)
|
|
218
245
|
if "generate_expires_at" in params and not isinstance(
|
|
219
246
|
params["generate_expires_at"], str
|
|
220
247
|
):
|
files_sdk/models/group.py
CHANGED
|
@@ -22,6 +22,7 @@ class Group:
|
|
|
22
22
|
"dav_permission": None, # boolean - If true, users in this group can use WebDAV to login. This will override a false value of `dav_permission` on the user level.
|
|
23
23
|
"restapi_permission": None, # boolean - If true, users in this group can use the REST API to login. This will override a false value of `restapi_permission` on the user level.
|
|
24
24
|
"site_id": None, # int64 - Site ID
|
|
25
|
+
"workspace_id": None, # int64 - Workspace ID
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
def __init__(self, attributes=None, options=None):
|
|
@@ -127,8 +128,8 @@ class Group:
|
|
|
127
128
|
# Parameters:
|
|
128
129
|
# 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.
|
|
129
130
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
130
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`
|
|
131
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `name`.
|
|
131
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `workspace_id` or `name`.
|
|
132
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `name` and `workspace_id`. Valid field combinations are `[ workspace_id, name ]`.
|
|
132
133
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `name`.
|
|
133
134
|
# ids - string - Comma-separated list of group ids to include in results.
|
|
134
135
|
# include_parent_site_groups - boolean - Include groups from the parent site.
|
|
@@ -198,6 +199,7 @@ def get(id, params=None, options=None):
|
|
|
198
199
|
# restapi_permission - boolean - If true, users in this group can use the REST API to login. This will override a false value of `restapi_permission` on the user level.
|
|
199
200
|
# allowed_ips - string - A list of allowed IPs if applicable. Newline delimited
|
|
200
201
|
# name (required) - string - Group name.
|
|
202
|
+
# workspace_id - int64 - Workspace ID
|
|
201
203
|
def create(params=None, options=None):
|
|
202
204
|
if not isinstance(params, dict):
|
|
203
205
|
params = {}
|
|
@@ -239,6 +241,12 @@ def create(params=None, options=None):
|
|
|
239
241
|
)
|
|
240
242
|
if "name" in params and not isinstance(params["name"], str):
|
|
241
243
|
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
244
|
+
if "workspace_id" in params and not isinstance(
|
|
245
|
+
params["workspace_id"], int
|
|
246
|
+
):
|
|
247
|
+
raise InvalidParameterError(
|
|
248
|
+
"Bad parameter: workspace_id must be an int"
|
|
249
|
+
)
|
|
242
250
|
if "name" not in params:
|
|
243
251
|
raise MissingParameterError("Parameter missing: name")
|
|
244
252
|
response, options = Api.send_request("POST", "/groups", params, options)
|
|
@@ -110,7 +110,8 @@ class KeyLifecycleRule:
|
|
|
110
110
|
# Parameters:
|
|
111
111
|
# 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.
|
|
112
112
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
113
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are
|
|
113
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `key_type`.
|
|
114
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `key_type`.
|
|
114
115
|
def list(params=None, options=None):
|
|
115
116
|
if not isinstance(params, dict):
|
|
116
117
|
params = {}
|
|
@@ -122,6 +123,8 @@ def list(params=None, options=None):
|
|
|
122
123
|
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
123
124
|
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
124
125
|
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
126
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
127
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
125
128
|
return ListObj(
|
|
126
129
|
KeyLifecycleRule, "GET", "/key_lifecycle_rules", params, options
|
|
127
130
|
)
|
files_sdk/models/partner.py
CHANGED
|
@@ -15,6 +15,7 @@ class Partner:
|
|
|
15
15
|
"allow_providing_gpg_keys": None, # boolean - Allow Partner Admins to provide GPG keys.
|
|
16
16
|
"allow_user_creation": None, # boolean - Allow Partner Admins to create users.
|
|
17
17
|
"id": None, # int64 - The unique ID of the Partner.
|
|
18
|
+
"workspace_id": None, # int64 - ID of the Workspace associated with this Partner.
|
|
18
19
|
"name": None, # string - The name of the Partner.
|
|
19
20
|
"notes": None, # string - Notes about this Partner.
|
|
20
21
|
"partner_admin_ids": None, # array(int64) - Array of User IDs that are Partner Admins for this Partner.
|
|
@@ -119,7 +120,8 @@ class Partner:
|
|
|
119
120
|
# Parameters:
|
|
120
121
|
# 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.
|
|
121
122
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
122
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
|
|
123
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `name`.
|
|
124
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`.
|
|
123
125
|
def list(params=None, options=None):
|
|
124
126
|
if not isinstance(params, dict):
|
|
125
127
|
params = {}
|
|
@@ -131,6 +133,8 @@ def list(params=None, options=None):
|
|
|
131
133
|
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
132
134
|
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
133
135
|
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
136
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
137
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
134
138
|
return ListObj(Partner, "GET", "/partners", params, options)
|
|
135
139
|
|
|
136
140
|
|
|
@@ -169,6 +173,7 @@ def get(id, params=None, options=None):
|
|
|
169
173
|
# root_folder - string - The root folder path for this Partner.
|
|
170
174
|
# tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
171
175
|
# name (required) - string - The name of the Partner.
|
|
176
|
+
# workspace_id - int64 - ID of the Workspace associated with this Partner.
|
|
172
177
|
def create(params=None, options=None):
|
|
173
178
|
if not isinstance(params, dict):
|
|
174
179
|
params = {}
|
|
@@ -208,6 +213,12 @@ def create(params=None, options=None):
|
|
|
208
213
|
raise InvalidParameterError("Bad parameter: tags must be an str")
|
|
209
214
|
if "name" in params and not isinstance(params["name"], str):
|
|
210
215
|
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
216
|
+
if "workspace_id" in params and not isinstance(
|
|
217
|
+
params["workspace_id"], int
|
|
218
|
+
):
|
|
219
|
+
raise InvalidParameterError(
|
|
220
|
+
"Bad parameter: workspace_id must be an int"
|
|
221
|
+
)
|
|
211
222
|
if "name" not in params:
|
|
212
223
|
raise MissingParameterError("Parameter missing: name")
|
|
213
224
|
response, options = Api.send_request("POST", "/partners", params, options)
|
files_sdk/models/public_key.py
CHANGED
|
@@ -11,6 +11,7 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class PublicKey:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - Public key ID
|
|
14
|
+
"workspace_id": None, # int64 - Workspace ID (0 for default workspace).
|
|
14
15
|
"title": None, # string - Public key title
|
|
15
16
|
"created_at": None, # date-time - Public key created at date/time
|
|
16
17
|
"fingerprint": None, # string - Public key fingerprint (MD5)
|
|
@@ -110,8 +111,8 @@ class PublicKey:
|
|
|
110
111
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
111
112
|
# 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.
|
|
112
113
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
113
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `
|
|
114
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
|
|
114
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `user_id`, `title` or `created_at`.
|
|
115
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at` and `workspace_id`.
|
|
115
116
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
116
117
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
117
118
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
@@ -33,6 +33,7 @@ class RemoteServer:
|
|
|
33
33
|
"server_certificate": None, # string - Remote server certificate
|
|
34
34
|
"server_host_key": None, # string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
|
|
35
35
|
"server_type": None, # string - Remote server type.
|
|
36
|
+
"workspace_id": None, # int64 - Workspace ID (0 for default workspace)
|
|
36
37
|
"ssl": None, # string - Should we require SSL?
|
|
37
38
|
"username": None, # string - Remote server username.
|
|
38
39
|
"google_cloud_storage_bucket": None, # string - Google Cloud Storage: Bucket Name
|
|
@@ -64,6 +65,7 @@ class RemoteServer:
|
|
|
64
65
|
"files_agent_version": None, # string - Files Agent version
|
|
65
66
|
"files_agent_up_to_date": None, # boolean - If true, the Files Agent is up to date.
|
|
66
67
|
"files_agent_latest_version": None, # string - Latest available Files Agent version
|
|
68
|
+
"files_agent_supports_push_updates": None, # boolean - Files Agent supports receiving push updates
|
|
67
69
|
"outbound_agent_id": None, # int64 - Route traffic to outbound on a files-agent
|
|
68
70
|
"filebase_bucket": None, # string - Filebase: Bucket name
|
|
69
71
|
"filebase_access_key": None, # string - Filebase: Access Key.
|
|
@@ -718,8 +720,8 @@ class RemoteServer:
|
|
|
718
720
|
# Parameters:
|
|
719
721
|
# 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.
|
|
720
722
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
721
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `server_type`, `backblaze_b2_bucket`, `google_cloud_storage_bucket`, `wasabi_bucket`, `s3_bucket`, `azure_blob_storage_container`, `azure_files_storage_share_name`, `s3_compatible_bucket`, `filebase_bucket`, `cloudflare_bucket` or `linode_bucket`.
|
|
722
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `name`, `server_type`, `backblaze_b2_bucket`, `google_cloud_storage_bucket`, `wasabi_bucket`, `s3_bucket`, `azure_blob_storage_container`, `azure_files_storage_share_name`, `s3_compatible_bucket`, `filebase_bucket`, `cloudflare_bucket` or `linode_bucket`. Valid field combinations are `[ server_type, name ]`, `[ backblaze_b2_bucket, name ]`, `[ google_cloud_storage_bucket, name ]`, `[ wasabi_bucket, name ]`, `[ s3_bucket, name ]`, `[ azure_blob_storage_container, name ]`, `[ azure_files_storage_share_name, name ]`, `[ s3_compatible_bucket, name ]`, `[ filebase_bucket, name ]`, `[ cloudflare_bucket, name ]` or `[
|
|
723
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `name`, `server_type`, `backblaze_b2_bucket`, `google_cloud_storage_bucket`, `wasabi_bucket`, `s3_bucket`, `azure_blob_storage_container`, `azure_files_storage_share_name`, `s3_compatible_bucket`, `filebase_bucket`, `cloudflare_bucket` or `linode_bucket`.
|
|
724
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `name`, `server_type`, `workspace_id`, `backblaze_b2_bucket`, `google_cloud_storage_bucket`, `wasabi_bucket`, `s3_bucket`, `azure_blob_storage_container`, `azure_files_storage_share_name`, `s3_compatible_bucket`, `filebase_bucket`, `cloudflare_bucket` or `linode_bucket`. Valid field combinations are `[ server_type, name ]`, `[ workspace_id, name ]`, `[ backblaze_b2_bucket, name ]`, `[ google_cloud_storage_bucket, name ]`, `[ wasabi_bucket, name ]`, `[ s3_bucket, name ]`, `[ azure_blob_storage_container, name ]`, `[ azure_files_storage_share_name, name ]`, `[ s3_compatible_bucket, name ]`, `[ filebase_bucket, name ]`, `[ cloudflare_bucket, name ]`, `[ linode_bucket, name ]`, `[ workspace_id, server_type ]` or `[ workspace_id, server_type, name ]`.
|
|
723
725
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `name`, `backblaze_b2_bucket`, `google_cloud_storage_bucket`, `wasabi_bucket`, `s3_bucket`, `azure_blob_storage_container`, `azure_files_storage_share_name`, `s3_compatible_bucket`, `filebase_bucket`, `cloudflare_bucket` or `linode_bucket`. Valid field combinations are `[ backblaze_b2_bucket, name ]`, `[ google_cloud_storage_bucket, name ]`, `[ wasabi_bucket, name ]`, `[ s3_bucket, name ]`, `[ azure_blob_storage_container, name ]`, `[ azure_files_storage_share_name, name ]`, `[ s3_compatible_bucket, name ]`, `[ filebase_bucket, name ]`, `[ cloudflare_bucket, name ]` or `[ linode_bucket, name ]`.
|
|
724
726
|
def list(params=None, options=None):
|
|
725
727
|
if not isinstance(params, dict):
|
|
@@ -860,6 +862,7 @@ def find_configuration_file(id, params=None, options=None):
|
|
|
860
862
|
# wasabi_access_key - string - Wasabi: Access Key.
|
|
861
863
|
# wasabi_bucket - string - Wasabi: Bucket name
|
|
862
864
|
# wasabi_region - string - Wasabi: Region
|
|
865
|
+
# workspace_id - int64 - Workspace ID (0 for default workspace)
|
|
863
866
|
def create(params=None, options=None):
|
|
864
867
|
if not isinstance(params, dict):
|
|
865
868
|
params = {}
|
|
@@ -1250,6 +1253,12 @@ def create(params=None, options=None):
|
|
|
1250
1253
|
raise InvalidParameterError(
|
|
1251
1254
|
"Bad parameter: wasabi_region must be an str"
|
|
1252
1255
|
)
|
|
1256
|
+
if "workspace_id" in params and not isinstance(
|
|
1257
|
+
params["workspace_id"], int
|
|
1258
|
+
):
|
|
1259
|
+
raise InvalidParameterError(
|
|
1260
|
+
"Bad parameter: workspace_id must be an int"
|
|
1261
|
+
)
|
|
1253
1262
|
response, options = Api.send_request(
|
|
1254
1263
|
"POST", "/remote_servers", params, options
|
|
1255
1264
|
)
|
|
@@ -11,6 +11,7 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class RemoteServerCredential:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - Remote Server Credential ID
|
|
14
|
+
"workspace_id": None, # int64 - Workspace ID (0 for default workspace)
|
|
14
15
|
"name": None, # string - Internal name for your reference
|
|
15
16
|
"description": None, # string - Internal description for your reference
|
|
16
17
|
"server_type": None, # string - Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
|
|
@@ -333,7 +334,8 @@ class RemoteServerCredential:
|
|
|
333
334
|
# Parameters:
|
|
334
335
|
# 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.
|
|
335
336
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
336
|
-
#
|
|
337
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `id`.
|
|
338
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id` and `name`. Valid field combinations are `[ workspace_id, name ]`.
|
|
337
339
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `name`.
|
|
338
340
|
def list(params=None, options=None):
|
|
339
341
|
if not isinstance(params, dict):
|
|
@@ -344,6 +346,8 @@ def list(params=None, options=None):
|
|
|
344
346
|
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
345
347
|
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
346
348
|
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
349
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
350
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
347
351
|
if "filter" in params and not isinstance(params["filter"], dict):
|
|
348
352
|
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
349
353
|
if "filter_prefix" in params and not isinstance(
|
|
@@ -421,6 +425,7 @@ def get(id, params=None, options=None):
|
|
|
421
425
|
# linode_secret_key - string - Linode: Secret Key
|
|
422
426
|
# s3_compatible_secret_key - string - S3-compatible: Secret Key
|
|
423
427
|
# wasabi_secret_key - string - Wasabi: Secret Key
|
|
428
|
+
# workspace_id - int64 - Workspace ID (0 for default workspace)
|
|
424
429
|
def create(params=None, options=None):
|
|
425
430
|
if not isinstance(params, dict):
|
|
426
431
|
params = {}
|
|
@@ -594,6 +599,12 @@ def create(params=None, options=None):
|
|
|
594
599
|
raise InvalidParameterError(
|
|
595
600
|
"Bad parameter: wasabi_secret_key must be an str"
|
|
596
601
|
)
|
|
602
|
+
if "workspace_id" in params and not isinstance(
|
|
603
|
+
params["workspace_id"], int
|
|
604
|
+
):
|
|
605
|
+
raise InvalidParameterError(
|
|
606
|
+
"Bad parameter: workspace_id must be an int"
|
|
607
|
+
)
|
|
597
608
|
response, options = Api.send_request(
|
|
598
609
|
"POST", "/remote_server_credentials", params, options
|
|
599
610
|
)
|
files_sdk/models/restore.py
CHANGED
|
@@ -19,8 +19,15 @@ class Restore:
|
|
|
19
19
|
"files_errored": None, # int64 - Number of files that were not able to be restored.
|
|
20
20
|
"files_total": None, # int64 - Total number of files processed.
|
|
21
21
|
"prefix": None, # string - Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
|
|
22
|
+
"restoration_type": None, # string - Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated access/authentication records.
|
|
22
23
|
"restore_in_place": None, # boolean - If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
|
|
23
24
|
"restore_deleted_permissions": None, # boolean - If true, we will also restore any Permissions that match the same path prefix from the same dates.
|
|
25
|
+
"users_restored": None, # int64 - Number of users successfully restored (only present for `restoration_type=users`).
|
|
26
|
+
"users_errored": None, # int64 - Number of users that failed to restore (only present for `restoration_type=users`).
|
|
27
|
+
"users_total": None, # int64 - Total number of users processed (only present for `restoration_type=users`).
|
|
28
|
+
"api_keys_restored": None, # int64 - Number of API keys restored (only present for `restoration_type=users`).
|
|
29
|
+
"public_keys_restored": None, # int64 - Number of public keys restored (only present for `restoration_type=users`).
|
|
30
|
+
"two_factor_authentication_methods_restored": None, # int64 - Number of two factor authentication methods restored (only present for `restoration_type=users`).
|
|
24
31
|
"status": None, # string - Status of the restoration process.
|
|
25
32
|
"update_timestamps": None, # boolean - If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
|
|
26
33
|
"error_messages": None, # array(string) - Error messages received while restoring files and/or directories. Only present if there were errors.
|
|
@@ -59,6 +66,8 @@ class Restore:
|
|
|
59
66
|
# Parameters:
|
|
60
67
|
# 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.
|
|
61
68
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
69
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
|
|
70
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `restoration_type`.
|
|
62
71
|
def list(params=None, options=None):
|
|
63
72
|
if not isinstance(params, dict):
|
|
64
73
|
params = {}
|
|
@@ -68,6 +77,10 @@ def list(params=None, options=None):
|
|
|
68
77
|
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
69
78
|
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
70
79
|
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
80
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
81
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
82
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
83
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
71
84
|
return ListObj(Restore, "GET", "/restores", params, options)
|
|
72
85
|
|
|
73
86
|
|
|
@@ -78,6 +91,7 @@ def all(params=None, options=None):
|
|
|
78
91
|
# Parameters:
|
|
79
92
|
# earliest_date (required) - string - Restore all files deleted after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
|
|
80
93
|
# prefix - string - Prefix of the files/folders to restore. To restore a folder, add a trailing slash to the folder name. Do not use a leading slash. To restore all deleted items, specify an empty string (`''`) in the prefix field or omit the field from the request.
|
|
94
|
+
# restoration_type - string - Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated access/authentication records.
|
|
81
95
|
# restore_deleted_permissions - boolean - If true, we will also restore any Permissions that match the same path prefix from the same dates.
|
|
82
96
|
# restore_in_place - boolean - If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
|
|
83
97
|
# update_timestamps - boolean - If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
|
|
@@ -94,6 +108,12 @@ def create(params=None, options=None):
|
|
|
94
108
|
)
|
|
95
109
|
if "prefix" in params and not isinstance(params["prefix"], str):
|
|
96
110
|
raise InvalidParameterError("Bad parameter: prefix must be an str")
|
|
111
|
+
if "restoration_type" in params and not isinstance(
|
|
112
|
+
params["restoration_type"], str
|
|
113
|
+
):
|
|
114
|
+
raise InvalidParameterError(
|
|
115
|
+
"Bad parameter: restoration_type must be an str"
|
|
116
|
+
)
|
|
97
117
|
if "restore_deleted_permissions" in params and not isinstance(
|
|
98
118
|
params["restore_deleted_permissions"], bool
|
|
99
119
|
):
|
files_sdk/models/sync.py
CHANGED
|
@@ -14,6 +14,7 @@ class Sync:
|
|
|
14
14
|
"name": None, # string - Name for this sync job
|
|
15
15
|
"description": None, # string - Description for this sync job
|
|
16
16
|
"site_id": None, # int64 - Site ID this sync belongs to
|
|
17
|
+
"workspace_id": None, # int64 - Workspace ID this sync belongs to
|
|
17
18
|
"user_id": None, # int64 - User who created or owns this sync
|
|
18
19
|
"src_path": None, # string - Absolute source path for the sync
|
|
19
20
|
"dest_path": None, # string - Absolute destination path for the sync
|
|
@@ -251,8 +252,8 @@ class Sync:
|
|
|
251
252
|
# Parameters:
|
|
252
253
|
# 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.
|
|
253
254
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
254
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`.
|
|
255
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `src_remote_server_id`
|
|
255
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `workspace_id` or `name`.
|
|
256
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`, `disabled`, `src_remote_server_id` or `dest_remote_server_id`. Valid field combinations are `[ workspace_id, disabled ]`, `[ workspace_id, src_remote_server_id ]`, `[ workspace_id, dest_remote_server_id ]`, `[ disabled, src_remote_server_id ]`, `[ disabled, dest_remote_server_id ]`, `[ workspace_id, disabled, src_remote_server_id ]` or `[ workspace_id, disabled, dest_remote_server_id ]`.
|
|
256
257
|
def list(params=None, options=None):
|
|
257
258
|
if not isinstance(params, dict):
|
|
258
259
|
params = {}
|
|
@@ -314,6 +315,7 @@ def get(id, params=None, options=None):
|
|
|
314
315
|
# schedule_time_zone - string - If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
|
|
315
316
|
# schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
|
|
316
317
|
# schedule_times_of_day - array(string) - If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. Times of day in HH:MM format.
|
|
318
|
+
# workspace_id - int64 - Workspace ID this sync belongs to
|
|
317
319
|
def create(params=None, options=None):
|
|
318
320
|
if not isinstance(params, dict):
|
|
319
321
|
params = {}
|
|
@@ -401,6 +403,12 @@ def create(params=None, options=None):
|
|
|
401
403
|
raise InvalidParameterError(
|
|
402
404
|
"Bad parameter: schedule_times_of_day must be an list"
|
|
403
405
|
)
|
|
406
|
+
if "workspace_id" in params and not isinstance(
|
|
407
|
+
params["workspace_id"], int
|
|
408
|
+
):
|
|
409
|
+
raise InvalidParameterError(
|
|
410
|
+
"Bad parameter: workspace_id must be an int"
|
|
411
|
+
)
|
|
404
412
|
response, options = Api.send_request("POST", "/syncs", params, options)
|
|
405
413
|
return Sync(response.data, options)
|
|
406
414
|
|
files_sdk/models/sync_run.py
CHANGED
|
@@ -25,6 +25,7 @@ class SyncRun:
|
|
|
25
25
|
"log_url": None, # string - Link to external log file.
|
|
26
26
|
"runtime": None, # double - Total runtime in seconds
|
|
27
27
|
"site_id": None, # int64 - Site ID
|
|
28
|
+
"workspace_id": None, # int64 - Workspace ID
|
|
28
29
|
"src_remote_server_type": None, # string - Source remote server type, if any
|
|
29
30
|
"status": None, # string - Status of the sync run (success, failure, partial_failure, in_progress, skipped)
|
|
30
31
|
"successful_files": None, # int64 - Number of files successfully synced
|
|
@@ -57,8 +58,8 @@ class SyncRun:
|
|
|
57
58
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
58
59
|
# 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
60
|
# 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 ]`.
|
|
61
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `workspace_id`, `sync_id`, `created_at` or `status`.
|
|
62
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `status`, `dry_run`, `workspace_id`, `src_remote_server_type`, `dest_remote_server_type` or `sync_id`. Valid field combinations are `[ status, created_at ]`, `[ workspace_id, created_at ]`, `[ src_remote_server_type, created_at ]`, `[ dest_remote_server_type, created_at ]`, `[ sync_id, created_at ]`, `[ workspace_id, status ]`, `[ src_remote_server_type, status ]`, `[ dest_remote_server_type, status ]`, `[ sync_id, status ]`, `[ workspace_id, src_remote_server_type ]`, `[ workspace_id, dest_remote_server_type ]`, `[ workspace_id, sync_id ]`, `[ workspace_id, status, created_at ]`, `[ src_remote_server_type, status, created_at ]`, `[ dest_remote_server_type, status, created_at ]`, `[ sync_id, status, created_at ]`, `[ workspace_id, src_remote_server_type, created_at ]`, `[ workspace_id, dest_remote_server_type, created_at ]`, `[ workspace_id, sync_id, created_at ]`, `[ workspace_id, src_remote_server_type, status ]`, `[ workspace_id, dest_remote_server_type, status ]`, `[ workspace_id, sync_id, status ]`, `[ workspace_id, src_remote_server_type, status, created_at ]`, `[ workspace_id, dest_remote_server_type, status, created_at ]` or `[ workspace_id, sync_id, status, created_at ]`.
|
|
62
63
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
63
64
|
# 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
65
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
files_sdk/models/user.py
CHANGED
|
@@ -67,7 +67,9 @@ class User:
|
|
|
67
67
|
"self_managed": None, # boolean - Does this user manage it's own credentials or is it a shared/bot user?
|
|
68
68
|
"sftp_permission": None, # boolean - Can the user access with SFTP?
|
|
69
69
|
"site_admin": None, # boolean - Is the user an administrator for this site?
|
|
70
|
+
"workspace_admin": None, # boolean - Is the user a Workspace administrator? Applicable only to the workspace ID related to this user, if one is set.
|
|
70
71
|
"site_id": None, # int64 - Site ID
|
|
72
|
+
"workspace_id": None, # int64 - Workspace ID
|
|
71
73
|
"skip_welcome_screen": None, # boolean - Skip Welcome page in the UI?
|
|
72
74
|
"ssl_required": None, # string - SSL required setting
|
|
73
75
|
"sso_strategy_id": None, # int64 - SSO (Single Sign On) strategy ID for the user, if applicable.
|
|
@@ -225,6 +227,7 @@ class User:
|
|
|
225
227
|
# time_zone - string - User time zone
|
|
226
228
|
# 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.
|
|
227
229
|
# user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
230
|
+
# workspace_admin - boolean - Is the user a Workspace administrator? Applicable only to the workspace ID related to this user, if one is set.
|
|
228
231
|
# username - string - User's username
|
|
229
232
|
# clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
|
|
230
233
|
# convert_to_partner_user - boolean - If true, convert this user to a partner user by assigning the partner_id provided.
|
|
@@ -438,8 +441,8 @@ class User:
|
|
|
438
441
|
# Parameters:
|
|
439
442
|
# 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.
|
|
440
443
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
441
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `
|
|
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 `
|
|
444
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `workspace_id`, `company`, `name`, `disabled`, `authenticate_until`, `username`, `email`, `last_desktop_login_at`, `last_login_at`, `site_admin`, `password_validity_days` or `ssl_required`.
|
|
445
|
+
# 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`, `partner_id` or `workspace_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]`, `[ workspace_id, username ]`, `[ company, name ]`, `[ workspace_id, name ]`, `[ workspace_id, email ]`, `[ workspace_id, company ]`, `[ workspace_id, disabled ]`, `[ workspace_id, disabled, username ]` or `[ workspace_id, company, name ]`.
|
|
443
446
|
# 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`.
|
|
444
447
|
# 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`.
|
|
445
448
|
# 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 ]`.
|
|
@@ -569,7 +572,9 @@ def get(id, params=None, options=None):
|
|
|
569
572
|
# time_zone - string - User time zone
|
|
570
573
|
# 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.
|
|
571
574
|
# user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
575
|
+
# workspace_admin - boolean - Is the user a Workspace administrator? Applicable only to the workspace ID related to this user, if one is set.
|
|
572
576
|
# username (required) - string - User's username
|
|
577
|
+
# workspace_id - int64 - Workspace ID
|
|
573
578
|
def create(params=None, options=None):
|
|
574
579
|
if not isinstance(params, dict):
|
|
575
580
|
params = {}
|
|
@@ -805,8 +810,20 @@ def create(params=None, options=None):
|
|
|
805
810
|
raise InvalidParameterError("Bad parameter: user_root must be an str")
|
|
806
811
|
if "user_home" in params and not isinstance(params["user_home"], str):
|
|
807
812
|
raise InvalidParameterError("Bad parameter: user_home must be an str")
|
|
813
|
+
if "workspace_admin" in params and not isinstance(
|
|
814
|
+
params["workspace_admin"], bool
|
|
815
|
+
):
|
|
816
|
+
raise InvalidParameterError(
|
|
817
|
+
"Bad parameter: workspace_admin must be an bool"
|
|
818
|
+
)
|
|
808
819
|
if "username" in params and not isinstance(params["username"], str):
|
|
809
820
|
raise InvalidParameterError("Bad parameter: username must be an str")
|
|
821
|
+
if "workspace_id" in params and not isinstance(
|
|
822
|
+
params["workspace_id"], int
|
|
823
|
+
):
|
|
824
|
+
raise InvalidParameterError(
|
|
825
|
+
"Bad parameter: workspace_id must be an int"
|
|
826
|
+
)
|
|
810
827
|
if "username" not in params:
|
|
811
828
|
raise MissingParameterError("Parameter missing: username")
|
|
812
829
|
response, options = Api.send_request("POST", "/users", params, options)
|
|
@@ -918,6 +935,7 @@ def user_2fa_reset(id, params=None, options=None):
|
|
|
918
935
|
# time_zone - string - User time zone
|
|
919
936
|
# 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.
|
|
920
937
|
# user_home - string - Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
|
938
|
+
# workspace_admin - boolean - Is the user a Workspace administrator? Applicable only to the workspace ID related to this user, if one is set.
|
|
921
939
|
# username - string - User's username
|
|
922
940
|
# clear_2fa - boolean - If true when changing authentication_method from `password` to `sso`, remove all two-factor methods. Ignored in all other cases.
|
|
923
941
|
# convert_to_partner_user - boolean - If true, convert this user to a partner user by assigning the partner_id provided.
|
|
@@ -1159,6 +1177,12 @@ def update(id, params=None, options=None):
|
|
|
1159
1177
|
raise InvalidParameterError("Bad parameter: user_root must be an str")
|
|
1160
1178
|
if "user_home" in params and not isinstance(params["user_home"], str):
|
|
1161
1179
|
raise InvalidParameterError("Bad parameter: user_home must be an str")
|
|
1180
|
+
if "workspace_admin" in params and not isinstance(
|
|
1181
|
+
params["workspace_admin"], bool
|
|
1182
|
+
):
|
|
1183
|
+
raise InvalidParameterError(
|
|
1184
|
+
"Bad parameter: workspace_admin must be an bool"
|
|
1185
|
+
)
|
|
1162
1186
|
if "username" in params and not isinstance(params["username"], str):
|
|
1163
1187
|
raise InvalidParameterError("Bad parameter: username must be an str")
|
|
1164
1188
|
if "clear_2fa" in params and not isinstance(params["clear_2fa"], bool):
|