files-com 1.6.26__py3-none-any.whl → 1.6.28__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of files-com might be problematic. Click here for more details.

_VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.26
1
+ 1.6.28
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: files_com
3
- Version: 1.6.26
3
+ Version: 1.6.28
4
4
  Summary: Python bindings for the Files.com API
5
5
  License: MIT
6
6
  Requires-Python: >=3.5
@@ -1,7 +1,7 @@
1
1
  README.md,sha256=dJpTjuJA-JJIQ4CKgQhlbqyxanVatHk0RXgCD6KFl3A,28758
2
- _VERSION,sha256=86BEbfGOTjhyFUmfKHHP58ZDFguU8N3nZHYkAo18iXE,7
3
- files_com-1.6.26.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
- files_sdk/__init__.py,sha256=uSULouU7zQ65AjRvNqmmxodE72aL1RkZ8wlXkZzMj4k,12769
2
+ _VERSION,sha256=6lWguq-7ZVIMO_dKpRRqpFyjwOaTEUflNeMR6gEgvkw,7
3
+ files_com-1.6.28.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
4
+ files_sdk/__init__.py,sha256=_SDTfqH3vKpExnfKMRIn4sXorWp4tdLeueZYrtpVuaE,12769
5
5
  files_sdk/api.py,sha256=HOLk50HLQCbnHwnAr9OElQEWvdA_BABBSEvvFSt1S4A,1846
6
6
  files_sdk/api_client.py,sha256=cfFvm-o4Ao8SWADiJv7t7qnJfG_LJmWV3l6ALTC-Opo,11264
7
7
  files_sdk/error.py,sha256=lZKht6lYj9i99CzRbHschmdSs6T2Y51-YrZX_5Y_o7A,64945
@@ -51,7 +51,7 @@ files_sdk/models/folder.py,sha256=5pxgJvuk8MpyVCUW2c9vT77LAAHZQaBZ_mBdjaTOo2I,10
51
51
  files_sdk/models/form_field.py,sha256=xaaLnvctZ3Do5lnppn-s6UQguzfsyVpfdmz-Ykij9Nw,1509
52
52
  files_sdk/models/form_field_set.py,sha256=7hms9QZNWmSoCdZZUsYoQvTaT5lmDwDGz5YdwBZxOq8,10528
53
53
  files_sdk/models/ftp_action_log.py,sha256=LUI3rWD0nkgf2nquN1xY811Jlsu2t6c6DYt96M_jAKo,791504
54
- files_sdk/models/gpg_key.py,sha256=mzHuq2RVmJ7ppK0lFkmsnSqNENZ-AzI8dOMg8_oG4-s,10412
54
+ files_sdk/models/gpg_key.py,sha256=140Y0rU2XTeJW0KITsWurXKyxjKHy2owLkGTo8gWf2U,12439
55
55
  files_sdk/models/group.py,sha256=NCWhnhjBK8jAeCgLp2qYLV2lURxuSD1QO4EsmTF_tzw,16062
56
56
  files_sdk/models/group_user.py,sha256=ZVl2vQ2FuPFC9YW5Geo9iST438eLvs6Pc_BlQRGg9Sg,10087
57
57
  files_sdk/models/history.py,sha256=Elc04ji3rWWhEc68KzPzcEeCqfMSA4Jmjb9sAZ4LvKc,14138
@@ -79,9 +79,9 @@ files_sdk/models/priority.py,sha256=kByzhOOVwKVSxrMI5xJb1RwUtQdSuFFBLBNEHYzWSm0,
79
79
  files_sdk/models/project.py,sha256=nDpX0qc7jY6evRprjQ7l4YgjM9WNH0aXaRbE2mpo6zk,7510
80
80
  files_sdk/models/public_hosting_request_log.py,sha256=wEoNH5wiUtsE50q3SEWBJxhevJtQToBKICdcOQI_Lmc,18695
81
81
  files_sdk/models/public_ip_address.py,sha256=5VSlJ4PZQilV6tpGRCnyvGJzqRzdSRpwVDZxKwsplcU,1259
82
- files_sdk/models/public_key.py,sha256=c-OySt4m2ghmPZ6jutTZTmB8IVYp5jN-OE8_K9k2U9Y,10039
82
+ files_sdk/models/public_key.py,sha256=o_lyVnKLCGsX50Jmz5UJ4EZ3Wv-eETZHW5crBANNCvM,12306
83
83
  files_sdk/models/remote_bandwidth_snapshot.py,sha256=kryNewGqe_ZN4D3JBL26DoVYKDowubUNLXn7NQtEJb8,4476
84
- files_sdk/models/remote_mount_backend.py,sha256=4twrZnD0IMylK5XwTssELl4mCk9EkzDyPXPtv3J4D1o,20539
84
+ files_sdk/models/remote_mount_backend.py,sha256=vIcKsBsSev1HuYXM3JenXJMYUsXYAxADDTD0tjOEBRY,20843
85
85
  files_sdk/models/remote_server.py,sha256=crDqrWv56GEYW49Y0vUiZhXCvjymMyn-ByWmqfEof3k,86036
86
86
  files_sdk/models/remote_server_configuration_file.py,sha256=m6kfh5yUAYTP42nHuYJ-GFu73981kjjqPuZX3SeHbiA,3330
87
87
  files_sdk/models/request.py,sha256=mWOS36b5pRiAZqDuf1tGidw-FAikYPDqfv5LXdDJA9Q,8867
@@ -111,7 +111,7 @@ files_sdk/models/user_request.py,sha256=ykA5Lq0MYB7qTDOMMFBuyKa_R_LgQwGVorC-q-6q
111
111
  files_sdk/models/user_sftp_client_use.py,sha256=VnOo3ll6fwSc8grG5ZqGK8o3grYKg5P9b5B_hGS4vCs,2827
112
112
  files_sdk/models/web_dav_action_log.py,sha256=7__LZvb_fInvXwy90ur7IrcRSxKOwF8L6OwpjJbS73Y,355354
113
113
  files_sdk/models/webhook_test.py,sha256=AWGH8ULsgltBJL2YtTYGnAJ80cCVekrjZ2sUP0UlWgc,5018
114
- files_com-1.6.26.dist-info/METADATA,sha256=bkACbxqHTn6qAXOXAX72YIeGtzJ3lhMHvcQ7eiC-sfc,29050
115
- files_com-1.6.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
116
- files_com-1.6.26.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
117
- files_com-1.6.26.dist-info/RECORD,,
114
+ files_com-1.6.28.dist-info/METADATA,sha256=dEW_IJvua37VzwVrcZM6dbbaTly-DXLAxQhaFVHXZRY,29050
115
+ files_com-1.6.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
116
+ files_com-1.6.28.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
117
+ files_com-1.6.28.dist-info/RECORD,,
files_sdk/__init__.py CHANGED
@@ -221,7 +221,7 @@ session_id = None
221
221
  source_ip = None
222
222
  base_url = "https://app.files.com"
223
223
  base_path = "api/rest/v1"
224
- version = "1.6.26"
224
+ version = "1.6.28"
225
225
 
226
226
  __version__ = version
227
227
 
@@ -17,6 +17,10 @@ class GpgKey:
17
17
  "public_key": None, # string - Your GPG public key
18
18
  "private_key": None, # string - Your GPG private key.
19
19
  "private_key_password": None, # string - Your GPG private key password. Only required for password protected keys.
20
+ "generate_expires_at": None, # string - Expiration date of the key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
21
+ "generate_keypair": None, # boolean - If true, generate a new GPG key pair. Can not be used with `public_key`/`private_key`
22
+ "generate_full_name": None, # string - Full name of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
23
+ "generate_email": None, # string - Email address of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
20
24
  }
21
25
 
22
26
  def __init__(self, attributes=None, options=None):
@@ -169,6 +173,10 @@ def get(id, params=None, options=None):
169
173
  # private_key - string - Your GPG private key.
170
174
  # private_key_password - string - Your GPG private key password. Only required for password protected keys.
171
175
  # name (required) - string - Your GPG key name.
176
+ # generate_expires_at - string - Expiration date of the key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
177
+ # generate_keypair - boolean - If true, generate a new GPG key pair. Can not be used with `public_key`/`private_key`
178
+ # 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.
179
+ # generate_email - string - Email address of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
172
180
  def create(params=None, options=None):
173
181
  if not isinstance(params, dict):
174
182
  params = {}
@@ -190,6 +198,30 @@ def create(params=None, options=None):
190
198
  )
191
199
  if "name" in params and not isinstance(params["name"], str):
192
200
  raise InvalidParameterError("Bad parameter: name must be an str")
201
+ if "generate_expires_at" in params and not isinstance(
202
+ params["generate_expires_at"], str
203
+ ):
204
+ raise InvalidParameterError(
205
+ "Bad parameter: generate_expires_at must be an str"
206
+ )
207
+ if "generate_keypair" in params and not isinstance(
208
+ params["generate_keypair"], bool
209
+ ):
210
+ raise InvalidParameterError(
211
+ "Bad parameter: generate_keypair must be an bool"
212
+ )
213
+ if "generate_full_name" in params and not isinstance(
214
+ params["generate_full_name"], str
215
+ ):
216
+ raise InvalidParameterError(
217
+ "Bad parameter: generate_full_name must be an str"
218
+ )
219
+ if "generate_email" in params and not isinstance(
220
+ params["generate_email"], str
221
+ ):
222
+ raise InvalidParameterError(
223
+ "Bad parameter: generate_email must be an str"
224
+ )
193
225
  if "name" not in params:
194
226
  raise MissingParameterError("Parameter missing: name")
195
227
  response, options = Api.send_request("POST", "/gpg_keys", params, options)
@@ -15,10 +15,16 @@ class PublicKey:
15
15
  "created_at": None, # date-time - Public key created at date/time
16
16
  "fingerprint": None, # string - Public key fingerprint (MD5)
17
17
  "fingerprint_sha256": None, # string - Public key fingerprint (SHA256)
18
+ "status": None, # string - Can be invalid, not_generated, generating, complete
18
19
  "last_login_at": None, # date-time - Key's most recent login time via SFTP
20
+ "private_key": None, # string - Private key generated for the user.
21
+ "public_key": None, # string - Public key generated for the user.
19
22
  "username": None, # string - Username of the user this public key is associated with
20
23
  "user_id": None, # int64 - User ID this public key is associated with
21
- "public_key": None, # string - Actual contents of SSH key.
24
+ "generate_keypair": None, # boolean - If true, generate a new SSH key pair. Can not be used with `public_key`
25
+ "generate_private_key_password": None, # string - Password for the private key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
26
+ "generate_algorithm": None, # string - Type of key to generate. One of rsa, dsa, ecdsa, ed25519. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
27
+ "generate_length": None, # int64 - Length of key to generate. If algorithm is ecdsa, this is the signature size. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
22
28
  }
23
29
 
24
30
  def __init__(self, attributes=None, options=None):
@@ -165,7 +171,11 @@ def get(id, params=None, options=None):
165
171
  # Parameters:
166
172
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
167
173
  # title (required) - string - Internal reference for key.
168
- # public_key (required) - string - Actual contents of SSH key.
174
+ # public_key - string - Actual contents of SSH key.
175
+ # generate_keypair - boolean - If true, generate a new SSH key pair. Can not be used with `public_key`
176
+ # generate_private_key_password - string - Password for the private key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
177
+ # generate_algorithm - string - Type of key to generate. One of rsa, dsa, ecdsa, ed25519. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
178
+ # generate_length - int64 - Length of key to generate. If algorithm is ecdsa, this is the signature size. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
169
179
  def create(params=None, options=None):
170
180
  if not isinstance(params, dict):
171
181
  params = {}
@@ -177,10 +187,32 @@ def create(params=None, options=None):
177
187
  raise InvalidParameterError("Bad parameter: title must be an str")
178
188
  if "public_key" in params and not isinstance(params["public_key"], str):
179
189
  raise InvalidParameterError("Bad parameter: public_key must be an str")
190
+ if "generate_keypair" in params and not isinstance(
191
+ params["generate_keypair"], bool
192
+ ):
193
+ raise InvalidParameterError(
194
+ "Bad parameter: generate_keypair must be an bool"
195
+ )
196
+ if "generate_private_key_password" in params and not isinstance(
197
+ params["generate_private_key_password"], str
198
+ ):
199
+ raise InvalidParameterError(
200
+ "Bad parameter: generate_private_key_password must be an str"
201
+ )
202
+ if "generate_algorithm" in params and not isinstance(
203
+ params["generate_algorithm"], str
204
+ ):
205
+ raise InvalidParameterError(
206
+ "Bad parameter: generate_algorithm must be an str"
207
+ )
208
+ if "generate_length" in params and not isinstance(
209
+ params["generate_length"], int
210
+ ):
211
+ raise InvalidParameterError(
212
+ "Bad parameter: generate_length must be an int"
213
+ )
180
214
  if "title" not in params:
181
215
  raise MissingParameterError("Parameter missing: title")
182
- if "public_key" not in params:
183
- raise MissingParameterError("Parameter missing: public_key")
184
216
  response, options = Api.send_request(
185
217
  "POST", "/public_keys", params, options
186
218
  )
@@ -15,6 +15,7 @@ class RemoteMountBackend:
15
15
  "fall": None, # int64 - Number of consecutive failures before considering the backend unhealthy.
16
16
  "health_check_enabled": None, # boolean - True if health checks are enabled for this backend.
17
17
  "health_check_type": None, # string - Type of health check to perform.
18
+ "id": None, # int64 - Unique identifier for this backend.
18
19
  "interval": None, # int64 - Interval in seconds between health checks.
19
20
  "min_free_cpu": None, # double - Minimum free CPU percentage required for this backend to be considered healthy.
20
21
  "min_free_mem": None, # double - Minimum free memory percentage required for this backend to be considered healthy.
@@ -25,7 +26,6 @@ class RemoteMountBackend:
25
26
  "rise": None, # int64 - Number of consecutive successes before considering the backend healthy.
26
27
  "status": None, # string - Status of this backend.
27
28
  "undergoing_maintenance": None, # boolean - True if this backend is undergoing maintenance.
28
- "id": None, # int64 - Remote Mount Backend ID.
29
29
  }
30
30
 
31
31
  def __init__(self, attributes=None, options=None):
@@ -190,6 +190,7 @@ class RemoteMountBackend:
190
190
  # Parameters:
191
191
  # 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.
192
192
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
193
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `remote_server_mount_id`.
193
194
  def list(params=None, options=None):
194
195
  if not isinstance(params, dict):
195
196
  params = {}
@@ -199,6 +200,8 @@ def list(params=None, options=None):
199
200
  raise InvalidParameterError("Bad parameter: cursor must be an str")
200
201
  if "per_page" in params and not isinstance(params["per_page"], int):
201
202
  raise InvalidParameterError("Bad parameter: per_page must be an int")
203
+ if "filter" in params and not isinstance(params["filter"], dict):
204
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
202
205
  return ListObj(
203
206
  RemoteMountBackend, "GET", "/remote_mount_backends", params, options
204
207
  )