files-com 1.6.171__py3-none-any.whl → 1.6.227__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.
@@ -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` and `expires_at`.
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` and `name`.
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)
@@ -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)
@@ -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 `title`, `created_at` or `user_id`.
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 `[ linode_bucket, name ]`.
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,14 +11,13 @@ 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.
17
18
  "aws_access_key": None, # string - AWS Access Key.
18
19
  "google_cloud_storage_s3_compatible_access_key": None, # string - Google Cloud Storage: S3-compatible Access Key.
19
20
  "wasabi_access_key": None, # string - Wasabi: Access Key.
20
- "azure_blob_storage_account": None, # string - Azure Blob Storage: Account name
21
- "azure_files_storage_account": None, # string - Azure Files: Storage Account name
22
21
  "s3_compatible_access_key": None, # string - S3-compatible: Access Key
23
22
  "filebase_access_key": None, # string - Filebase: Access Key.
24
23
  "cloudflare_access_key": None, # string - Cloudflare: Access Key.
@@ -70,8 +69,6 @@ class RemoteServerCredential:
70
69
  # description - string - Internal description for your reference
71
70
  # server_type - string - Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
72
71
  # aws_access_key - string - AWS Access Key.
73
- # azure_blob_storage_account - string - Azure Blob Storage: Account name
74
- # azure_files_storage_account - string - Azure Files: Storage Account name
75
72
  # cloudflare_access_key - string - Cloudflare: Access Key.
76
73
  # filebase_access_key - string - Filebase: Access Key.
77
74
  # google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
@@ -128,18 +125,6 @@ class RemoteServerCredential:
128
125
  raise InvalidParameterError(
129
126
  "Bad parameter: aws_access_key must be an str"
130
127
  )
131
- if "azure_blob_storage_account" in params and not isinstance(
132
- params["azure_blob_storage_account"], str
133
- ):
134
- raise InvalidParameterError(
135
- "Bad parameter: azure_blob_storage_account must be an str"
136
- )
137
- if "azure_files_storage_account" in params and not isinstance(
138
- params["azure_files_storage_account"], str
139
- ):
140
- raise InvalidParameterError(
141
- "Bad parameter: azure_files_storage_account must be an str"
142
- )
143
128
  if "cloudflare_access_key" in params and not isinstance(
144
129
  params["cloudflare_access_key"], str
145
130
  ):
@@ -333,7 +318,8 @@ class RemoteServerCredential:
333
318
  # Parameters:
334
319
  # 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
320
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
336
- # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `name`.
321
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `id`.
322
+ # 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
323
  # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `name`.
338
324
  def list(params=None, options=None):
339
325
  if not isinstance(params, dict):
@@ -344,6 +330,8 @@ def list(params=None, options=None):
344
330
  raise InvalidParameterError("Bad parameter: cursor must be an str")
345
331
  if "per_page" in params and not isinstance(params["per_page"], int):
346
332
  raise InvalidParameterError("Bad parameter: per_page must be an int")
333
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
334
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
347
335
  if "filter" in params and not isinstance(params["filter"], dict):
348
336
  raise InvalidParameterError("Bad parameter: filter must be an dict")
349
337
  if "filter_prefix" in params and not isinstance(
@@ -395,8 +383,6 @@ def get(id, params=None, options=None):
395
383
  # description - string - Internal description for your reference
396
384
  # server_type - string - Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
397
385
  # aws_access_key - string - AWS Access Key.
398
- # azure_blob_storage_account - string - Azure Blob Storage: Account name
399
- # azure_files_storage_account - string - Azure Files: Storage Account name
400
386
  # cloudflare_access_key - string - Cloudflare: Access Key.
401
387
  # filebase_access_key - string - Filebase: Access Key.
402
388
  # google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
@@ -421,6 +407,7 @@ def get(id, params=None, options=None):
421
407
  # linode_secret_key - string - Linode: Secret Key
422
408
  # s3_compatible_secret_key - string - S3-compatible: Secret Key
423
409
  # wasabi_secret_key - string - Wasabi: Secret Key
410
+ # workspace_id - int64 - Workspace ID (0 for default workspace)
424
411
  def create(params=None, options=None):
425
412
  if not isinstance(params, dict):
426
413
  params = {}
@@ -442,18 +429,6 @@ def create(params=None, options=None):
442
429
  raise InvalidParameterError(
443
430
  "Bad parameter: aws_access_key must be an str"
444
431
  )
445
- if "azure_blob_storage_account" in params and not isinstance(
446
- params["azure_blob_storage_account"], str
447
- ):
448
- raise InvalidParameterError(
449
- "Bad parameter: azure_blob_storage_account must be an str"
450
- )
451
- if "azure_files_storage_account" in params and not isinstance(
452
- params["azure_files_storage_account"], str
453
- ):
454
- raise InvalidParameterError(
455
- "Bad parameter: azure_files_storage_account must be an str"
456
- )
457
432
  if "cloudflare_access_key" in params and not isinstance(
458
433
  params["cloudflare_access_key"], str
459
434
  ):
@@ -594,6 +569,12 @@ def create(params=None, options=None):
594
569
  raise InvalidParameterError(
595
570
  "Bad parameter: wasabi_secret_key must be an str"
596
571
  )
572
+ if "workspace_id" in params and not isinstance(
573
+ params["workspace_id"], int
574
+ ):
575
+ raise InvalidParameterError(
576
+ "Bad parameter: workspace_id must be an int"
577
+ )
597
578
  response, options = Api.send_request(
598
579
  "POST", "/remote_server_credentials", params, options
599
580
  )
@@ -605,8 +586,6 @@ def create(params=None, options=None):
605
586
  # description - string - Internal description for your reference
606
587
  # server_type - string - Remote server type. Remote Server Credentials are only valid for a single type of Remote Server.
607
588
  # aws_access_key - string - AWS Access Key.
608
- # azure_blob_storage_account - string - Azure Blob Storage: Account name
609
- # azure_files_storage_account - string - Azure Files: Storage Account name
610
589
  # cloudflare_access_key - string - Cloudflare: Access Key.
611
590
  # filebase_access_key - string - Filebase: Access Key.
612
591
  # google_cloud_storage_s3_compatible_access_key - string - Google Cloud Storage: S3-compatible Access Key.
@@ -655,18 +634,6 @@ def update(id, params=None, options=None):
655
634
  raise InvalidParameterError(
656
635
  "Bad parameter: aws_access_key must be an str"
657
636
  )
658
- if "azure_blob_storage_account" in params and not isinstance(
659
- params["azure_blob_storage_account"], str
660
- ):
661
- raise InvalidParameterError(
662
- "Bad parameter: azure_blob_storage_account must be an str"
663
- )
664
- if "azure_files_storage_account" in params and not isinstance(
665
- params["azure_files_storage_account"], str
666
- ):
667
- raise InvalidParameterError(
668
- "Bad parameter: azure_files_storage_account must be an str"
669
- )
670
637
  if "cloudflare_access_key" in params and not isinstance(
671
638
  params["cloudflare_access_key"], str
672
639
  ):
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` and `dest_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
 
@@ -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,11 +441,11 @@ 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`, `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 ]`.
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 ]`, `[ workspace_id, disabled ]` or `[ workspace_id, disabled, username ]`.
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
- # 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 ]`.
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`.
446
449
  # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
447
450
  # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
448
451
  # ids - string - comma-separated list of User IDs
@@ -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):