files-com 1.6.171__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.171.dist-info → files_com-1.6.219.dist-info}/METADATA +1 -1
- {files_com-1.6.171.dist-info → files_com-1.6.219.dist-info}/RECORD +27 -26
- 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 +23 -1
- files_sdk/models/gpg_key.py +28 -1
- files_sdk/models/group.py +10 -2
- 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/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.171.dist-info → files_com-1.6.219.dist-info}/WHEEL +0 -0
- {files_com-1.6.171.dist-info → files_com-1.6.219.dist-info}/licenses/LICENSE +0 -0
- {files_com-1.6.171.dist-info → files_com-1.6.219.dist-info}/top_level.txt +0 -0
_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.6.
|
|
1
|
+
1.6.219
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
README.md,sha256=8aKN5Kzi5hFh2nzFLY_3V3TF0_B83n6kIP-nPWktZzk,32129
|
|
2
|
-
_VERSION,sha256=
|
|
3
|
-
files_com-1.6.
|
|
4
|
-
files_sdk/__init__.py,sha256=
|
|
2
|
+
_VERSION,sha256=pvzJrKe3IeGtc-ApaQ655FNiZIDZ8tNaoCLq2DWkUDw,8
|
|
3
|
+
files_com-1.6.219.dist-info/licenses/LICENSE,sha256=ziANl9OTD-5-iE8XYIZNm6IYBDxOCHwQ-mdhci7lNew,1102
|
|
4
|
+
files_sdk/__init__.py,sha256=tJFuSbJ3FyzHdPBHvODv5nrvIKxquIE7fBC5pV9TAmM,13862
|
|
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=iC7_kFNXRn-xpHfnCix0J5UIT3JtkUpVotp1Okrm3u0,67004
|
|
8
8
|
files_sdk/list_obj.py,sha256=MWgmESLAmfh1uaSw76PWxmnf9f6_08TLUHe8_mCYKL4,1157
|
|
9
9
|
files_sdk/path_util.py,sha256=7x8X3JLoMkcqNefCaBeHYXD8MGvPby4AOy-xnBX_LNk,1694
|
|
10
10
|
files_sdk/util.py,sha256=6aA4N0Wq_ykINW7eMrs2ntFAL2hRLM6IvJf6n_yP34c,962
|
|
11
|
-
files_sdk/models/__init__.py,sha256=
|
|
11
|
+
files_sdk/models/__init__.py,sha256=CRP7NwvJ8oZgUKw6k8g7vCLbVy0hUhtekwyvTIO6g-Y,6316
|
|
12
12
|
files_sdk/models/account_line_item.py,sha256=8FLg83Aqpz4y_QYy3fZ_KZsZFWv1f1KGD9T5CH1WSGs,1929
|
|
13
13
|
files_sdk/models/action.py,sha256=M1lyMybE7SKht2nGXtYWp2l8b4oVkeImo6KF8DLiCos,2034
|
|
14
14
|
files_sdk/models/action_notification_export.py,sha256=4cdEo2ZCDV3RH3GLSqHV7RWyJ2ONRSUq0glCEi94zd0,6636
|
|
15
15
|
files_sdk/models/action_notification_export_result.py,sha256=yusHopmVJ9zO5lHG2C4sq4-kDnX3trRdb52SRL-R9Go,4071
|
|
16
16
|
files_sdk/models/agent_push_update.py,sha256=ruFoLVbY6OLmE3ah3YU0XmbjJuV8CfGiarhj8qdimnA,1419
|
|
17
|
-
files_sdk/models/api_key.py,sha256=
|
|
17
|
+
files_sdk/models/api_key.py,sha256=l2kHHSg6zFLnSwICnxRaQG88gQdduH_6vOpXb0-lNjc,16297
|
|
18
18
|
files_sdk/models/api_request_log.py,sha256=B3H8hwo9Qadh3C9q1UI-RcS9Yetx_gYeDQtCxxmykhQ,86447
|
|
19
19
|
files_sdk/models/app.py,sha256=JiK40FW3FOp_sUehb3RCWfkc9-1OcjWai15tn9BtxbU,4678
|
|
20
|
-
files_sdk/models/as2_incoming_message.py,sha256=
|
|
21
|
-
files_sdk/models/as2_outgoing_message.py,sha256=
|
|
22
|
-
files_sdk/models/as2_partner.py,sha256=
|
|
23
|
-
files_sdk/models/as2_station.py,sha256=
|
|
20
|
+
files_sdk/models/as2_incoming_message.py,sha256=YbH4X9mNdWIlDGKrKRnT_KSylKgOEPW9urEga4F2-So,7315
|
|
21
|
+
files_sdk/models/as2_outgoing_message.py,sha256=_RQHQkAMh3qfGwMGSph1myAd8xKrmOdb8AvUC7SOwR0,6858
|
|
22
|
+
files_sdk/models/as2_partner.py,sha256=AH4rc9j0Ds1RpBJ_gRYO5CNIlF138j8yi1XQkJ66Td0,23246
|
|
23
|
+
files_sdk/models/as2_station.py,sha256=0vLfQnAWgF9WJBmLe4n6g-GpyxHGN9RWzPWFj5URM4A,11746
|
|
24
24
|
files_sdk/models/auto.py,sha256=nODYUPqEsTw7suz0s6zDTsFd8j5yeSIzBELTiaXxzRE,995
|
|
25
|
-
files_sdk/models/automation.py,sha256=
|
|
25
|
+
files_sdk/models/automation.py,sha256=XhTlhVZNGTGsGtfRXxXn_tONSrz-Ya0M49C0wP-bEDA,51409
|
|
26
26
|
files_sdk/models/automation_log.py,sha256=jFaFfDJTTpY9Jsy1lVRjFtIHYTzbmxuFTTBp4aVEq8E,20922
|
|
27
|
-
files_sdk/models/automation_run.py,sha256=
|
|
27
|
+
files_sdk/models/automation_run.py,sha256=aM-RVDPhEdTx9KQTSjPO5odv_E-rnlOlxFMvXkLqunw,5519
|
|
28
28
|
files_sdk/models/bandwidth_snapshot.py,sha256=IBcRP5r_iFl86lhHOb5o5UZdsT8_-cBrAjKyPAc7OBw,4722
|
|
29
|
-
files_sdk/models/behavior.py,sha256=
|
|
30
|
-
files_sdk/models/bundle.py,sha256=
|
|
29
|
+
files_sdk/models/behavior.py,sha256=kkocek6zCU84c-OrfrSRw_w3o9wvWBcPqlyNeGpIe2M,17701
|
|
30
|
+
files_sdk/models/bundle.py,sha256=xxTgW4JaujOLzePjQntJJSrQk2JR7HpriBSW0vKD6BI,38358
|
|
31
31
|
files_sdk/models/bundle_action.py,sha256=Ze0A2n0EyzSxNHO_joS9fOYuQ7fmlOX_RJwC5FWSwyQ,5430
|
|
32
32
|
files_sdk/models/bundle_download.py,sha256=ZSjf6R0kCiFGgjQq7bu5nsFAtaW0sE72IZhCx2g5D10,4832
|
|
33
33
|
files_sdk/models/bundle_notification.py,sha256=tMauRH6qmejEisqsneVeprh4rb6UIjB43i6GY022NK8,10081
|
|
@@ -53,8 +53,8 @@ files_sdk/models/folder.py,sha256=rY5drNd1G0sLsRdeLeTSeYchKlOO3PSoNeTqSPAuzi8,11
|
|
|
53
53
|
files_sdk/models/form_field.py,sha256=xaaLnvctZ3Do5lnppn-s6UQguzfsyVpfdmz-Ykij9Nw,1509
|
|
54
54
|
files_sdk/models/form_field_set.py,sha256=7hms9QZNWmSoCdZZUsYoQvTaT5lmDwDGz5YdwBZxOq8,10528
|
|
55
55
|
files_sdk/models/ftp_action_log.py,sha256=Hcd-cSsDDuqKpWlneQs2rciVl91tdLsSBZO7x6CltFw,168584
|
|
56
|
-
files_sdk/models/gpg_key.py,sha256=
|
|
57
|
-
files_sdk/models/group.py,sha256=
|
|
56
|
+
files_sdk/models/gpg_key.py,sha256=9TB3w6AuIeKjZAs-PTtzaVE_NY2HDyTqmzoqKvCAEAk,15593
|
|
57
|
+
files_sdk/models/group.py,sha256=n1-lVfOZdcXp43c4zZzVEOuUGnew_1ANwdXegnsXA-c,16444
|
|
58
58
|
files_sdk/models/group_user.py,sha256=ZVl2vQ2FuPFC9YW5Geo9iST438eLvs6Pc_BlQRGg9Sg,10087
|
|
59
59
|
files_sdk/models/history.py,sha256=Elc04ji3rWWhEc68KzPzcEeCqfMSA4Jmjb9sAZ4LvKc,14138
|
|
60
60
|
files_sdk/models/history_export.py,sha256=yaHqn1ogmd_t9J_OSb1O6iMvykdLA88EYuxnO_Ns_R8,14466
|
|
@@ -76,7 +76,7 @@ files_sdk/models/message_comment_reaction.py,sha256=h9Kuk1Y2ztqMG7XkyP-ufGQyS7Od
|
|
|
76
76
|
files_sdk/models/message_reaction.py,sha256=ZGir-4Qj9k_FRC_X3Av7Yek-SZzFBK-IbvPn5HmaG5g,6288
|
|
77
77
|
files_sdk/models/notification.py,sha256=HEPLDynR4lCF_vZ7-RJD8hoxaWMl3BrrkGEIbQk6-yg,21993
|
|
78
78
|
files_sdk/models/outbound_connection_log.py,sha256=RJbcCNDZnbEX4aywguA6Rm4ddYtqOfQdJRHur5LXozs,45923
|
|
79
|
-
files_sdk/models/partner.py,sha256=
|
|
79
|
+
files_sdk/models/partner.py,sha256=9y7UKUjTTLEYVGS5lFrSrxGHynJNXqFEyp6g1Fi3ZOY,14517
|
|
80
80
|
files_sdk/models/payment.py,sha256=UUWxK3x2RVYQdRAWeA-WA_Oegh5TDXYPQA_m3BYd0bQ,3753
|
|
81
81
|
files_sdk/models/payment_line_item.py,sha256=x97h4kBtul5S1EqI_jskhbebnucwA-EOnQn1oV8Hid0,1284
|
|
82
82
|
files_sdk/models/permission.py,sha256=llVIdqsQjP7xcTPN-GuaP17hQ0GvQhKHIQhcafyg9mk,9410
|
|
@@ -85,12 +85,12 @@ files_sdk/models/priority.py,sha256=kByzhOOVwKVSxrMI5xJb1RwUtQdSuFFBLBNEHYzWSm0,
|
|
|
85
85
|
files_sdk/models/project.py,sha256=nDpX0qc7jY6evRprjQ7l4YgjM9WNH0aXaRbE2mpo6zk,7510
|
|
86
86
|
files_sdk/models/public_hosting_request_log.py,sha256=YOgcT8NX-x7Ag5ti2KU8npPRIjFItpbTHBo_ARhVtyc,7641
|
|
87
87
|
files_sdk/models/public_ip_address.py,sha256=5VSlJ4PZQilV6tpGRCnyvGJzqRzdSRpwVDZxKwsplcU,1259
|
|
88
|
-
files_sdk/models/public_key.py,sha256=
|
|
88
|
+
files_sdk/models/public_key.py,sha256=adaLO8Z3XM0B4EhaTy_PwGIYL8iMWiFBVhg5t5AfLik,12925
|
|
89
89
|
files_sdk/models/remote_bandwidth_snapshot.py,sha256=kryNewGqe_ZN4D3JBL26DoVYKDowubUNLXn7NQtEJb8,4476
|
|
90
90
|
files_sdk/models/remote_mount_backend.py,sha256=TZ6pLJPLy8se4poHMuREHYNavCOKiznBxPLti008CBY,19360
|
|
91
|
-
files_sdk/models/remote_server.py,sha256=
|
|
91
|
+
files_sdk/models/remote_server.py,sha256=mmw-pHBNhfZF6Mds2AzC9FkHqCF7jTG7UkO9j1il1D4,88672
|
|
92
92
|
files_sdk/models/remote_server_configuration_file.py,sha256=So6cK83z_6xwLnHJYgEwzSb9eBkDK5XG2Q4k8kp9nno,3476
|
|
93
|
-
files_sdk/models/remote_server_credential.py,sha256=
|
|
93
|
+
files_sdk/models/remote_server_credential.py,sha256=oKd3_eldntnFlrpNS-fR2ZDtJkUi_u06_iXCd33qDWo,38355
|
|
94
94
|
files_sdk/models/request.py,sha256=mWOS36b5pRiAZqDuf1tGidw-FAikYPDqfv5LXdDJA9Q,8867
|
|
95
95
|
files_sdk/models/restore.py,sha256=fDxydLjxeVPwDxxHGKI9sjGLR1fB7DcgGow2EgGU-A0,8620
|
|
96
96
|
files_sdk/models/scim_log.py,sha256=4j_IynVzpnSttAUAxTGhT2t56_Mx7KNvZdhVplxLmPM,3747
|
|
@@ -106,20 +106,21 @@ files_sdk/models/snapshot.py,sha256=zmdQWKR8EhUkF1mFQHFzWfreaEVXG1p_jEtmY4j3cKA,
|
|
|
106
106
|
files_sdk/models/sso_strategy.py,sha256=PA_B4cF4XUnzaTjH0Ld0yUNwWCy8Wpea46YuJrrXtXM,9305
|
|
107
107
|
files_sdk/models/status.py,sha256=IIY3RiJ2RZ2yPByAAh8eIq_cgZFTj13eR4UpqHTANQI,1363
|
|
108
108
|
files_sdk/models/style.py,sha256=KZY0fZ4kP4AtwZpCi24EtNXL8WFLhE9a1Jme1gA6Kkw,5201
|
|
109
|
-
files_sdk/models/sync.py,sha256
|
|
109
|
+
files_sdk/models/sync.py,sha256=N5vsuNYYorzbMp-UC9LPz2rqK2kk89K1PV21eP-dUVw,29608
|
|
110
110
|
files_sdk/models/sync_log.py,sha256=DjJaLnCgAE-FINRbkHYQ3JCsERucRy6Hc7zQoKBntRc,18062
|
|
111
|
-
files_sdk/models/sync_run.py,sha256=
|
|
111
|
+
files_sdk/models/sync_run.py,sha256=FKoVwhPkmjnKnVI2TwUAM2QGzYkBMMI_EIvUQ0vQ48Y,7733
|
|
112
112
|
files_sdk/models/usage_by_top_level_dir.py,sha256=o_dETvzcgEA9lsdES_yzwPVAZVFk4ZcnsCTugR8O8eY,1185
|
|
113
113
|
files_sdk/models/usage_daily_snapshot.py,sha256=rWf6GaTlN9spkUPwfF4IJ0Y6z-JTV9TAWjsFrxI-UFg,5477
|
|
114
114
|
files_sdk/models/usage_snapshot.py,sha256=3GzMIxBjKelgNP7ksWq4XlrRlAFcYxzd_J6vAgb52qc,4005
|
|
115
|
-
files_sdk/models/user.py,sha256=
|
|
115
|
+
files_sdk/models/user.py,sha256=XtkoVHWpocu-Uiz5zJHNyaf5CePlIz9bm60VHBoRyfw,66422
|
|
116
116
|
files_sdk/models/user_cipher_use.py,sha256=5Mto-oU87rG2jGIq8TQoOdNZgJA4_ViikvOdM9_jdt0,4994
|
|
117
117
|
files_sdk/models/user_lifecycle_rule.py,sha256=cphIpz9lbHh8g1kIeK91N46LVAQRk-1Wbrjs51byOOA,16422
|
|
118
118
|
files_sdk/models/user_request.py,sha256=ykA5Lq0MYB7qTDOMMFBuyKa_R_LgQwGVorC-q-6qxgU,6187
|
|
119
119
|
files_sdk/models/user_sftp_client_use.py,sha256=VnOo3ll6fwSc8grG5ZqGK8o3grYKg5P9b5B_hGS4vCs,2827
|
|
120
120
|
files_sdk/models/web_dav_action_log.py,sha256=q--_QSmpOhtoJUP2ATx5OQq1tp1eQT5zkzyow8R3B_o,76414
|
|
121
121
|
files_sdk/models/webhook_test.py,sha256=AWGH8ULsgltBJL2YtTYGnAJ80cCVekrjZ2sUP0UlWgc,5018
|
|
122
|
-
|
|
123
|
-
files_com-1.6.
|
|
124
|
-
files_com-1.6.
|
|
125
|
-
files_com-1.6.
|
|
122
|
+
files_sdk/models/workspace.py,sha256=t8oCa7nZqvoqxVwPV5hpbTHn1ixLUvTiUzE88Ibh7kg,7648
|
|
123
|
+
files_com-1.6.219.dist-info/METADATA,sha256=ihRSgNb1Yxx-vzvOzHllZbdd0bq4Qhj9Jht_U5LLMrc,32422
|
|
124
|
+
files_com-1.6.219.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
125
|
+
files_com-1.6.219.dist-info/top_level.txt,sha256=p_2P-gluT_8boeXQNixTP3x-tFd1-la2NedKOiln21I,10
|
|
126
|
+
files_com-1.6.219.dist-info/RECORD,,
|
files_sdk/__init__.py
CHANGED
|
@@ -109,6 +109,7 @@ import files_sdk.models.user_request as user_request
|
|
|
109
109
|
import files_sdk.models.user_sftp_client_use as user_sftp_client_use
|
|
110
110
|
import files_sdk.models.web_dav_action_log as web_dav_action_log
|
|
111
111
|
import files_sdk.models.webhook_test as webhook_test
|
|
112
|
+
import files_sdk.models.workspace as workspace
|
|
112
113
|
|
|
113
114
|
from files_sdk.models.account_line_item import AccountLineItem
|
|
114
115
|
from files_sdk.models.action import Action
|
|
@@ -228,6 +229,7 @@ from files_sdk.models.user_request import UserRequest
|
|
|
228
229
|
from files_sdk.models.user_sftp_client_use import UserSftpClientUse
|
|
229
230
|
from files_sdk.models.web_dav_action_log import WebDavActionLog
|
|
230
231
|
from files_sdk.models.webhook_test import WebhookTest
|
|
232
|
+
from files_sdk.models.workspace import Workspace
|
|
231
233
|
|
|
232
234
|
import files_sdk.path_util
|
|
233
235
|
import socket
|
|
@@ -239,7 +241,7 @@ session_id = None
|
|
|
239
241
|
source_ip = None
|
|
240
242
|
base_url = "https://app.files.com"
|
|
241
243
|
base_path = "api/rest/v1"
|
|
242
|
-
version = "1.6.
|
|
244
|
+
version = "1.6.219"
|
|
243
245
|
|
|
244
246
|
__version__ = version
|
|
245
247
|
|
files_sdk/models/__init__.py
CHANGED
|
@@ -116,3 +116,4 @@ from files_sdk.models.user_request import UserRequest
|
|
|
116
116
|
from files_sdk.models.user_sftp_client_use import UserSftpClientUse
|
|
117
117
|
from files_sdk.models.web_dav_action_log import WebDavActionLog
|
|
118
118
|
from files_sdk.models.webhook_test import WebhookTest
|
|
119
|
+
from files_sdk.models.workspace import Workspace
|
files_sdk/models/api_key.py
CHANGED
|
@@ -50,7 +50,6 @@ class ApiKey:
|
|
|
50
50
|
# Parameters:
|
|
51
51
|
# description - string - User-supplied description of API key.
|
|
52
52
|
# expires_at - string - API Key expiration date
|
|
53
|
-
# permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
|
54
53
|
# name - string - Internal name for the API Key. For your use.
|
|
55
54
|
def update(self, params=None):
|
|
56
55
|
if not isinstance(params, dict):
|
|
@@ -76,12 +75,6 @@ class ApiKey:
|
|
|
76
75
|
raise InvalidParameterError(
|
|
77
76
|
"Bad parameter: expires_at must be an str"
|
|
78
77
|
)
|
|
79
|
-
if "permission_set" in params and not isinstance(
|
|
80
|
-
params["permission_set"], str
|
|
81
|
-
):
|
|
82
|
-
raise InvalidParameterError(
|
|
83
|
-
"Bad parameter: permission_set must be an str"
|
|
84
|
-
)
|
|
85
78
|
if "name" in params and not isinstance(params["name"], str):
|
|
86
79
|
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
87
80
|
response, _options = Api.send_request(
|
|
@@ -204,10 +197,10 @@ def get(id, params=None, options=None):
|
|
|
204
197
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
205
198
|
# description - string - User-supplied description of API key.
|
|
206
199
|
# expires_at - string - API Key expiration date
|
|
207
|
-
# permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
|
208
200
|
# name (required) - string - Internal name for the API Key. For your use.
|
|
209
201
|
# aws_style_credentials - boolean - If `true`, this API key will be usable with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.
|
|
210
202
|
# path - string - Folder path restriction for `office_integration` permission set API keys.
|
|
203
|
+
# permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
|
211
204
|
def create(params=None, options=None):
|
|
212
205
|
if not isinstance(params, dict):
|
|
213
206
|
params = {}
|
|
@@ -221,12 +214,6 @@ def create(params=None, options=None):
|
|
|
221
214
|
)
|
|
222
215
|
if "expires_at" in params and not isinstance(params["expires_at"], str):
|
|
223
216
|
raise InvalidParameterError("Bad parameter: expires_at must be an str")
|
|
224
|
-
if "permission_set" in params and not isinstance(
|
|
225
|
-
params["permission_set"], str
|
|
226
|
-
):
|
|
227
|
-
raise InvalidParameterError(
|
|
228
|
-
"Bad parameter: permission_set must be an str"
|
|
229
|
-
)
|
|
230
217
|
if "name" in params and not isinstance(params["name"], str):
|
|
231
218
|
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
232
219
|
if "aws_style_credentials" in params and not isinstance(
|
|
@@ -237,6 +224,12 @@ def create(params=None, options=None):
|
|
|
237
224
|
)
|
|
238
225
|
if "path" in params and not isinstance(params["path"], str):
|
|
239
226
|
raise InvalidParameterError("Bad parameter: path must be an str")
|
|
227
|
+
if "permission_set" in params and not isinstance(
|
|
228
|
+
params["permission_set"], str
|
|
229
|
+
):
|
|
230
|
+
raise InvalidParameterError(
|
|
231
|
+
"Bad parameter: permission_set must be an str"
|
|
232
|
+
)
|
|
240
233
|
if "name" not in params:
|
|
241
234
|
raise MissingParameterError("Parameter missing: name")
|
|
242
235
|
response, options = Api.send_request("POST", "/api_keys", params, options)
|
|
@@ -269,7 +262,6 @@ def update_current(params=None, options=None):
|
|
|
269
262
|
# Parameters:
|
|
270
263
|
# description - string - User-supplied description of API key.
|
|
271
264
|
# expires_at - string - API Key expiration date
|
|
272
|
-
# permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
|
273
265
|
# name - string - Internal name for the API Key. For your use.
|
|
274
266
|
def update(id, params=None, options=None):
|
|
275
267
|
if not isinstance(params, dict):
|
|
@@ -285,12 +277,6 @@ def update(id, params=None, options=None):
|
|
|
285
277
|
)
|
|
286
278
|
if "expires_at" in params and not isinstance(params["expires_at"], str):
|
|
287
279
|
raise InvalidParameterError("Bad parameter: expires_at must be an str")
|
|
288
|
-
if "permission_set" in params and not isinstance(
|
|
289
|
-
params["permission_set"], str
|
|
290
|
-
):
|
|
291
|
-
raise InvalidParameterError(
|
|
292
|
-
"Bad parameter: permission_set must be an str"
|
|
293
|
-
)
|
|
294
280
|
if "name" in params and not isinstance(params["name"], str):
|
|
295
281
|
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
296
282
|
if "id" not in params:
|
|
@@ -11,6 +11,7 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class As2IncomingMessage:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - Id of the AS2 Partner.
|
|
14
|
+
"workspace_id": None, # int64 - ID of the Workspace associated with this AS2 Incoming Message.
|
|
14
15
|
"as2_partner_id": None, # int64 - Id of the AS2 Partner associated with this message.
|
|
15
16
|
"as2_station_id": None, # int64 - Id of the AS2 Station associated with this message.
|
|
16
17
|
"uuid": None, # string - UUID assigned to this message.
|
|
@@ -72,8 +73,8 @@ class As2IncomingMessage:
|
|
|
72
73
|
# Parameters:
|
|
73
74
|
# 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.
|
|
74
75
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
75
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`
|
|
76
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `as2_station_id` or `as2_partner_id`. Valid field combinations are `[ as2_station_id, created_at ]`
|
|
76
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `created_at` or `as2_partner_id`.
|
|
77
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `as2_station_id`, `workspace_id` or `as2_partner_id`. Valid field combinations are `[ as2_station_id, created_at ]`, `[ workspace_id, created_at ]`, `[ as2_partner_id, created_at ]`, `[ workspace_id, as2_station_id ]`, `[ workspace_id, as2_partner_id ]`, `[ workspace_id, as2_station_id, created_at ]` or `[ workspace_id, as2_partner_id, created_at ]`.
|
|
77
78
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
78
79
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
79
80
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
@@ -11,6 +11,7 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class As2OutgoingMessage:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - Id of the AS2 Partner.
|
|
14
|
+
"workspace_id": None, # int64 - ID of the Workspace associated with this AS2 Outgoing Message.
|
|
14
15
|
"as2_partner_id": None, # int64 - Id of the AS2 Partner associated with this message.
|
|
15
16
|
"as2_station_id": None, # int64 - Id of the AS2 Station associated with this message.
|
|
16
17
|
"uuid": None, # string - UUID assigned to this message.
|
|
@@ -68,8 +69,8 @@ class As2OutgoingMessage:
|
|
|
68
69
|
# Parameters:
|
|
69
70
|
# 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.
|
|
70
71
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
71
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`
|
|
72
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `as2_station_id` or `as2_partner_id`. Valid field combinations are `[ as2_station_id, created_at ]`
|
|
72
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `created_at` or `as2_partner_id`.
|
|
73
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `as2_station_id`, `workspace_id` or `as2_partner_id`. Valid field combinations are `[ as2_station_id, created_at ]`, `[ workspace_id, created_at ]`, `[ as2_partner_id, created_at ]`, `[ workspace_id, as2_station_id ]`, `[ workspace_id, as2_partner_id ]`, `[ workspace_id, as2_station_id, created_at ]` or `[ workspace_id, as2_partner_id, created_at ]`.
|
|
73
74
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
74
75
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
75
76
|
# 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/as2_partner.py
CHANGED
|
@@ -11,6 +11,7 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class As2Partner:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - ID of the AS2 Partner.
|
|
14
|
+
"workspace_id": None, # int64 - ID of the Workspace associated with this AS2 Partner.
|
|
14
15
|
"as2_station_id": None, # int64 - ID of the AS2 Station associated with this partner.
|
|
15
16
|
"name": None, # string - The partner's formal AS2 name.
|
|
16
17
|
"uri": None, # string - Public URI where we will send the AS2 messages (via HTTP/HTTPS).
|
|
@@ -165,8 +166,8 @@ class As2Partner:
|
|
|
165
166
|
# Parameters:
|
|
166
167
|
# 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.
|
|
167
168
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
168
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `as2_station_id`
|
|
169
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `as2_station_id`.
|
|
169
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `as2_station_id` or `name`.
|
|
170
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `as2_station_id` and `workspace_id`. Valid field combinations are `[ workspace_id, as2_station_id ]`.
|
|
170
171
|
def list(params=None, options=None):
|
|
171
172
|
if not isinstance(params, dict):
|
|
172
173
|
params = {}
|
files_sdk/models/as2_station.py
CHANGED
|
@@ -11,6 +11,7 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class As2Station:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - Id of the AS2 Station.
|
|
14
|
+
"workspace_id": None, # int64 - ID of the Workspace associated with this AS2 Station.
|
|
14
15
|
"name": None, # string - The station's formal AS2 name.
|
|
15
16
|
"uri": None, # string - Public URI for sending AS2 message to.
|
|
16
17
|
"domain": None, # string - The station's AS2 domain name.
|
|
@@ -48,7 +49,7 @@ class As2Station:
|
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
# Parameters:
|
|
51
|
-
# name - string - AS2
|
|
52
|
+
# name - string - The station's formal AS2 name.
|
|
52
53
|
# public_certificate - string
|
|
53
54
|
# private_key - string
|
|
54
55
|
# private_key_password - string
|
|
@@ -128,7 +129,8 @@ class As2Station:
|
|
|
128
129
|
# Parameters:
|
|
129
130
|
# 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.
|
|
130
131
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
131
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
|
|
132
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `name`.
|
|
133
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`.
|
|
132
134
|
def list(params=None, options=None):
|
|
133
135
|
if not isinstance(params, dict):
|
|
134
136
|
params = {}
|
|
@@ -140,6 +142,8 @@ def list(params=None, options=None):
|
|
|
140
142
|
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
141
143
|
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
142
144
|
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
145
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
146
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
143
147
|
return ListObj(As2Station, "GET", "/as2_stations", params, options)
|
|
144
148
|
|
|
145
149
|
|
|
@@ -170,7 +174,8 @@ def get(id, params=None, options=None):
|
|
|
170
174
|
|
|
171
175
|
|
|
172
176
|
# Parameters:
|
|
173
|
-
# name (required) - string - AS2
|
|
177
|
+
# name (required) - string - The station's formal AS2 name.
|
|
178
|
+
# workspace_id - int64 - ID of the Workspace associated with this AS2 Station.
|
|
174
179
|
# public_certificate (required) - string
|
|
175
180
|
# private_key (required) - string
|
|
176
181
|
# private_key_password - string
|
|
@@ -181,6 +186,12 @@ def create(params=None, options=None):
|
|
|
181
186
|
options = {}
|
|
182
187
|
if "name" in params and not isinstance(params["name"], str):
|
|
183
188
|
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
189
|
+
if "workspace_id" in params and not isinstance(
|
|
190
|
+
params["workspace_id"], int
|
|
191
|
+
):
|
|
192
|
+
raise InvalidParameterError(
|
|
193
|
+
"Bad parameter: workspace_id must be an int"
|
|
194
|
+
)
|
|
184
195
|
if "public_certificate" in params and not isinstance(
|
|
185
196
|
params["public_certificate"], str
|
|
186
197
|
):
|
|
@@ -210,7 +221,7 @@ def create(params=None, options=None):
|
|
|
210
221
|
|
|
211
222
|
|
|
212
223
|
# Parameters:
|
|
213
|
-
# name - string - AS2
|
|
224
|
+
# name - string - The station's formal AS2 name.
|
|
214
225
|
# public_certificate - string
|
|
215
226
|
# private_key - string
|
|
216
227
|
# private_key_password - string
|
files_sdk/models/automation.py
CHANGED
|
@@ -11,6 +11,7 @@ from files_sdk.error import ( # noqa: F401
|
|
|
11
11
|
class Automation:
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - Automation ID
|
|
14
|
+
"workspace_id": None, # int64 - Workspace ID
|
|
14
15
|
"always_serialize_jobs": None, # boolean - Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is `true` we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
|
|
15
16
|
"always_overwrite_size_matching_files": None, # boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
|
|
16
17
|
"automation": None, # string - Automation type
|
|
@@ -312,8 +313,8 @@ class Automation:
|
|
|
312
313
|
# Parameters:
|
|
313
314
|
# 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.
|
|
314
315
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
315
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `
|
|
316
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled`, `last_modified_at` or `automation`. Valid field combinations are `[ disabled, last_modified_at ]`, `[ automation, disabled ]`, `[ automation, last_modified_at ]`
|
|
316
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `name`, `automation`, `last_modified_at` or `disabled`.
|
|
317
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled`, `last_modified_at`, `workspace_id` or `automation`. Valid field combinations are `[ disabled, last_modified_at ]`, `[ workspace_id, disabled ]`, `[ disabled, automation ]`, `[ workspace_id, last_modified_at ]`, `[ automation, last_modified_at ]`, `[ workspace_id, automation ]`, `[ workspace_id, disabled, last_modified_at ]`, `[ disabled, automation, last_modified_at ]`, `[ workspace_id, disabled, automation ]`, `[ workspace_id, automation, last_modified_at ]` or `[ workspace_id, disabled, automation, last_modified_at ]`.
|
|
317
318
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `last_modified_at`.
|
|
318
319
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `last_modified_at`.
|
|
319
320
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `last_modified_at`.
|
|
@@ -406,6 +407,7 @@ def get(id, params=None, options=None):
|
|
|
406
407
|
# value - object - A Hash of attributes specific to the automation type.
|
|
407
408
|
# recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
|
|
408
409
|
# automation (required) - string - Automation type
|
|
410
|
+
# workspace_id - int64 - Workspace ID
|
|
409
411
|
def create(params=None, options=None):
|
|
410
412
|
if not isinstance(params, dict):
|
|
411
413
|
params = {}
|
|
@@ -563,6 +565,12 @@ def create(params=None, options=None):
|
|
|
563
565
|
)
|
|
564
566
|
if "automation" in params and not isinstance(params["automation"], str):
|
|
565
567
|
raise InvalidParameterError("Bad parameter: automation must be an str")
|
|
568
|
+
if "workspace_id" in params and not isinstance(
|
|
569
|
+
params["workspace_id"], int
|
|
570
|
+
):
|
|
571
|
+
raise InvalidParameterError(
|
|
572
|
+
"Bad parameter: workspace_id must be an int"
|
|
573
|
+
)
|
|
566
574
|
if "automation" not in params:
|
|
567
575
|
raise MissingParameterError("Parameter missing: automation")
|
|
568
576
|
response, options = Api.send_request(
|
|
@@ -12,6 +12,7 @@ class AutomationRun:
|
|
|
12
12
|
default_attributes = {
|
|
13
13
|
"id": None, # int64 - ID.
|
|
14
14
|
"automation_id": None, # int64 - ID of the associated Automation.
|
|
15
|
+
"workspace_id": None, # int64 - Workspace ID.
|
|
15
16
|
"completed_at": None, # date-time - Automation run completion/failure date/time.
|
|
16
17
|
"created_at": None, # date-time - Automation run start date/time.
|
|
17
18
|
"retry_at": None, # date-time - If set, this automation will be retried at this date/time due to `failure` or `partial_failure`.
|
|
@@ -53,7 +54,7 @@ class AutomationRun:
|
|
|
53
54
|
# 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.
|
|
54
55
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
55
56
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
|
56
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`
|
|
57
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
57
58
|
# automation_id (required) - int64 - ID of the associated Automation.
|
|
58
59
|
def list(params=None, options=None):
|
|
59
60
|
if not isinstance(params, dict):
|
files_sdk/models/behavior.py
CHANGED
|
@@ -43,7 +43,7 @@ class Behavior:
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
# Parameters:
|
|
46
|
-
# value -
|
|
46
|
+
# value - object - This field stores a hash of data specific to the type of behavior. See The Behavior Types section for example values for each type of behavior.
|
|
47
47
|
# attachment_file - file - Certain behaviors may require a file, for instance, the `watermark` behavior requires a watermark image. Attach that file here.
|
|
48
48
|
# disable_parent_folder_behavior - boolean - If `true`, the parent folder's behavior will be disabled for this folder and its children. This is the main mechanism for canceling out a `recursive` behavior higher in the folder tree.
|
|
49
49
|
# recursive - boolean - If `true`, behavior is treated as recursive, meaning that it impacts child folders as well.
|
|
@@ -62,8 +62,6 @@ class Behavior:
|
|
|
62
62
|
raise MissingParameterError("Parameter missing: id")
|
|
63
63
|
if "id" in params and not isinstance(params["id"], int):
|
|
64
64
|
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
65
|
-
if "value" in params and not isinstance(params["value"], str):
|
|
66
|
-
raise InvalidParameterError("Bad parameter: value must be an str")
|
|
67
65
|
if "name" in params and not isinstance(params["name"], str):
|
|
68
66
|
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
69
67
|
if "description" in params and not isinstance(
|
|
@@ -201,7 +199,7 @@ def list_for(path, params=None, options=None):
|
|
|
201
199
|
|
|
202
200
|
|
|
203
201
|
# Parameters:
|
|
204
|
-
# value -
|
|
202
|
+
# value - object - This field stores a hash of data specific to the type of behavior. See The Behavior Types section for example values for each type of behavior.
|
|
205
203
|
# attachment_file - file - Certain behaviors may require a file, for instance, the `watermark` behavior requires a watermark image. Attach that file here.
|
|
206
204
|
# disable_parent_folder_behavior - boolean - If `true`, the parent folder's behavior will be disabled for this folder and its children. This is the main mechanism for canceling out a `recursive` behavior higher in the folder tree.
|
|
207
205
|
# recursive - boolean - If `true`, behavior is treated as recursive, meaning that it impacts child folders as well.
|
|
@@ -214,8 +212,8 @@ def create(params=None, options=None):
|
|
|
214
212
|
params = {}
|
|
215
213
|
if not isinstance(options, dict):
|
|
216
214
|
options = {}
|
|
217
|
-
if "value" in params and not isinstance(params["value"],
|
|
218
|
-
raise InvalidParameterError("Bad parameter: value must be an
|
|
215
|
+
if "value" in params and not isinstance(params["value"], dict):
|
|
216
|
+
raise InvalidParameterError("Bad parameter: value must be an dict")
|
|
219
217
|
if "disable_parent_folder_behavior" in params and not isinstance(
|
|
220
218
|
params["disable_parent_folder_behavior"], bool
|
|
221
219
|
):
|
|
@@ -272,7 +270,7 @@ def webhook_test(params=None, options=None):
|
|
|
272
270
|
|
|
273
271
|
|
|
274
272
|
# Parameters:
|
|
275
|
-
# value -
|
|
273
|
+
# value - object - This field stores a hash of data specific to the type of behavior. See The Behavior Types section for example values for each type of behavior.
|
|
276
274
|
# attachment_file - file - Certain behaviors may require a file, for instance, the `watermark` behavior requires a watermark image. Attach that file here.
|
|
277
275
|
# disable_parent_folder_behavior - boolean - If `true`, the parent folder's behavior will be disabled for this folder and its children. This is the main mechanism for canceling out a `recursive` behavior higher in the folder tree.
|
|
278
276
|
# recursive - boolean - If `true`, behavior is treated as recursive, meaning that it impacts child folders as well.
|
|
@@ -285,12 +283,12 @@ def update(id, params=None, options=None):
|
|
|
285
283
|
if not isinstance(options, dict):
|
|
286
284
|
options = {}
|
|
287
285
|
params["id"] = id
|
|
288
|
-
if "id" in params and not isinstance(params["id"], (str, int
|
|
286
|
+
if "id" in params and not isinstance(params["id"], (dict, str, int)):
|
|
289
287
|
raise InvalidParameterError(
|
|
290
|
-
"Bad parameter: id must be one of str, int
|
|
288
|
+
"Bad parameter: id must be one of dict, str, int"
|
|
291
289
|
)
|
|
292
|
-
if "value" in params and not isinstance(params["value"],
|
|
293
|
-
raise InvalidParameterError("Bad parameter: value must be an
|
|
290
|
+
if "value" in params and not isinstance(params["value"], dict):
|
|
291
|
+
raise InvalidParameterError("Bad parameter: value must be an dict")
|
|
294
292
|
if "disable_parent_folder_behavior" in params and not isinstance(
|
|
295
293
|
params["disable_parent_folder_behavior"], bool
|
|
296
294
|
):
|
|
@@ -306,10 +304,10 @@ def update(id, params=None, options=None):
|
|
|
306
304
|
"Bad parameter: description must be an str"
|
|
307
305
|
)
|
|
308
306
|
if "attachment_delete" in params and not isinstance(
|
|
309
|
-
params["attachment_delete"], (str, int
|
|
307
|
+
params["attachment_delete"], (dict, str, int)
|
|
310
308
|
):
|
|
311
309
|
raise InvalidParameterError(
|
|
312
|
-
"Bad parameter: attachment_delete must be one of str, int
|
|
310
|
+
"Bad parameter: attachment_delete must be one of dict, str, int"
|
|
313
311
|
)
|
|
314
312
|
if "id" not in params:
|
|
315
313
|
raise MissingParameterError("Parameter missing: id")
|
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,6 +132,7 @@ 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.
|
|
@@ -269,7 +271,7 @@ class Bundle:
|
|
|
269
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.
|
|
270
272
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
271
273
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
|
|
272
|
-
# 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 ]`.
|
|
273
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`.
|
|
274
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`.
|
|
275
277
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.
|
|
@@ -357,6 +359,7 @@ def get(id, params=None, options=None):
|
|
|
357
359
|
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
|
358
360
|
# inbox_id - int64 - ID of the associated inbox, if available.
|
|
359
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.
|
|
360
363
|
# send_email_receipt_to_uploader - boolean - Send delivery receipt to the uploader. Note: For writable share only
|
|
361
364
|
# skip_email - boolean - BundleRegistrations can be saved without providing email?
|
|
362
365
|
# skip_name - boolean - BundleRegistrations can be saved without providing name?
|
|
@@ -447,6 +450,15 @@ def create(params=None, options=None):
|
|
|
447
450
|
raise InvalidParameterError(
|
|
448
451
|
"Bad parameter: require_share_recipient must be an bool"
|
|
449
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
|
+
)
|
|
450
462
|
if "send_email_receipt_to_uploader" in params and not isinstance(
|
|
451
463
|
params["send_email_receipt_to_uploader"], bool
|
|
452
464
|
):
|
|
@@ -531,6 +543,7 @@ def share(id, params=None, options=None):
|
|
|
531
543
|
# permissions - string - Permissions that apply to Folders in this Share Link.
|
|
532
544
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
|
533
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.
|
|
534
547
|
# send_email_receipt_to_uploader - boolean - Send delivery receipt to the uploader. Note: For writable share only
|
|
535
548
|
# skip_company - boolean - BundleRegistrations can be saved without providing company?
|
|
536
549
|
# start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
|
|
@@ -623,6 +636,15 @@ def update(id, params=None, options=None):
|
|
|
623
636
|
raise InvalidParameterError(
|
|
624
637
|
"Bad parameter: require_share_recipient must be an bool"
|
|
625
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
|
+
)
|
|
626
648
|
if "send_email_receipt_to_uploader" in params and not isinstance(
|
|
627
649
|
params["send_email_receipt_to_uploader"], bool
|
|
628
650
|
):
|
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)
|
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/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):
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Workspace:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - Workspace ID
|
|
14
|
+
"name": None, # string - Workspace name
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
def __init__(self, attributes=None, options=None):
|
|
18
|
+
if not isinstance(attributes, dict):
|
|
19
|
+
attributes = {}
|
|
20
|
+
if not isinstance(options, dict):
|
|
21
|
+
options = {}
|
|
22
|
+
self.set_attributes(attributes)
|
|
23
|
+
self.options = options
|
|
24
|
+
|
|
25
|
+
def set_attributes(self, attributes):
|
|
26
|
+
for attribute, default_value in Workspace.default_attributes.items():
|
|
27
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
28
|
+
|
|
29
|
+
def get_attributes(self):
|
|
30
|
+
return {
|
|
31
|
+
k: getattr(self, k, None)
|
|
32
|
+
for k in Workspace.default_attributes
|
|
33
|
+
if getattr(self, k, None) is not None
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
# Parameters:
|
|
37
|
+
# name - string - Workspace name
|
|
38
|
+
def update(self, params=None):
|
|
39
|
+
if not isinstance(params, dict):
|
|
40
|
+
params = {}
|
|
41
|
+
|
|
42
|
+
if hasattr(self, "id") and self.id:
|
|
43
|
+
params["id"] = self.id
|
|
44
|
+
else:
|
|
45
|
+
raise MissingParameterError("Current object doesn't have a id")
|
|
46
|
+
if "id" not in params:
|
|
47
|
+
raise MissingParameterError("Parameter missing: id")
|
|
48
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
49
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
50
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
51
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
52
|
+
response, _options = Api.send_request(
|
|
53
|
+
"PATCH",
|
|
54
|
+
"/workspaces/{id}".format(id=params["id"]),
|
|
55
|
+
params,
|
|
56
|
+
self.options,
|
|
57
|
+
)
|
|
58
|
+
return response.data
|
|
59
|
+
|
|
60
|
+
def delete(self, params=None):
|
|
61
|
+
if not isinstance(params, dict):
|
|
62
|
+
params = {}
|
|
63
|
+
|
|
64
|
+
if hasattr(self, "id") and self.id:
|
|
65
|
+
params["id"] = self.id
|
|
66
|
+
else:
|
|
67
|
+
raise MissingParameterError("Current object doesn't have a id")
|
|
68
|
+
if "id" not in params:
|
|
69
|
+
raise MissingParameterError("Parameter missing: id")
|
|
70
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
71
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
72
|
+
Api.send_request(
|
|
73
|
+
"DELETE",
|
|
74
|
+
"/workspaces/{id}".format(id=params["id"]),
|
|
75
|
+
params,
|
|
76
|
+
self.options,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
def destroy(self, params=None):
|
|
80
|
+
self.delete(params)
|
|
81
|
+
|
|
82
|
+
def save(self):
|
|
83
|
+
if hasattr(self, "id") and self.id:
|
|
84
|
+
new_obj = self.update(self.get_attributes())
|
|
85
|
+
self.set_attributes(new_obj.get_attributes())
|
|
86
|
+
return True
|
|
87
|
+
else:
|
|
88
|
+
new_obj = create(self.get_attributes(), self.options)
|
|
89
|
+
self.set_attributes(new_obj.get_attributes())
|
|
90
|
+
return True
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# Parameters:
|
|
94
|
+
# 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.
|
|
95
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
96
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`.
|
|
97
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `name`.
|
|
98
|
+
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `name`.
|
|
99
|
+
def list(params=None, options=None):
|
|
100
|
+
if not isinstance(params, dict):
|
|
101
|
+
params = {}
|
|
102
|
+
if not isinstance(options, dict):
|
|
103
|
+
options = {}
|
|
104
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
105
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
106
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
107
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
108
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
109
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
110
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
111
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
112
|
+
if "filter_prefix" in params and not isinstance(
|
|
113
|
+
params["filter_prefix"], dict
|
|
114
|
+
):
|
|
115
|
+
raise InvalidParameterError(
|
|
116
|
+
"Bad parameter: filter_prefix must be an dict"
|
|
117
|
+
)
|
|
118
|
+
return ListObj(Workspace, "GET", "/workspaces", params, options)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def all(params=None, options=None):
|
|
122
|
+
list(params, options)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
# Parameters:
|
|
126
|
+
# id (required) - int64 - Workspace ID.
|
|
127
|
+
def find(id, params=None, options=None):
|
|
128
|
+
if not isinstance(params, dict):
|
|
129
|
+
params = {}
|
|
130
|
+
if not isinstance(options, dict):
|
|
131
|
+
options = {}
|
|
132
|
+
params["id"] = id
|
|
133
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
134
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
135
|
+
if "id" not in params:
|
|
136
|
+
raise MissingParameterError("Parameter missing: id")
|
|
137
|
+
response, options = Api.send_request(
|
|
138
|
+
"GET", "/workspaces/{id}".format(id=params["id"]), params, options
|
|
139
|
+
)
|
|
140
|
+
return Workspace(response.data, options)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def get(id, params=None, options=None):
|
|
144
|
+
find(id, params, options)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
# Parameters:
|
|
148
|
+
# name - string - Workspace name
|
|
149
|
+
def create(params=None, options=None):
|
|
150
|
+
if not isinstance(params, dict):
|
|
151
|
+
params = {}
|
|
152
|
+
if not isinstance(options, dict):
|
|
153
|
+
options = {}
|
|
154
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
155
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
156
|
+
response, options = Api.send_request(
|
|
157
|
+
"POST", "/workspaces", params, options
|
|
158
|
+
)
|
|
159
|
+
return Workspace(response.data, options)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
# Parameters:
|
|
163
|
+
# name - string - Workspace name
|
|
164
|
+
def update(id, params=None, options=None):
|
|
165
|
+
if not isinstance(params, dict):
|
|
166
|
+
params = {}
|
|
167
|
+
if not isinstance(options, dict):
|
|
168
|
+
options = {}
|
|
169
|
+
params["id"] = id
|
|
170
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
171
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
172
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
173
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
174
|
+
if "id" not in params:
|
|
175
|
+
raise MissingParameterError("Parameter missing: id")
|
|
176
|
+
response, options = Api.send_request(
|
|
177
|
+
"PATCH", "/workspaces/{id}".format(id=params["id"]), params, options
|
|
178
|
+
)
|
|
179
|
+
return Workspace(response.data, options)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def delete(id, params=None, options=None):
|
|
183
|
+
if not isinstance(params, dict):
|
|
184
|
+
params = {}
|
|
185
|
+
if not isinstance(options, dict):
|
|
186
|
+
options = {}
|
|
187
|
+
params["id"] = id
|
|
188
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
189
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
190
|
+
if "id" not in params:
|
|
191
|
+
raise MissingParameterError("Parameter missing: id")
|
|
192
|
+
Api.send_request(
|
|
193
|
+
"DELETE", "/workspaces/{id}".format(id=params["id"]), params, options
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def destroy(id, params=None, options=None):
|
|
198
|
+
delete(id, params, options)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def new(*args, **kwargs):
|
|
202
|
+
return Workspace(*args, **kwargs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|