Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit cfc457a

Browse files
Add and to (#115)
1 parent 8ea1598 commit cfc457a

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

seamapi/connect_webviews.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ConnectWebviews(AbstractConnectWebviews):
3030
get(connect_webview)
3131
Gets a connect webview
3232
create(
33-
accepted_providers, custom_redirect_url=None, custom_redirect_failure_url=None, device_selection_mode=None
33+
accepted_providers, custom_redirect_url=None, custom_redirect_failure_url=None, device_selection_mode=None, provider_category=None, custom_metadata=None, automatically_manage_new_devices=None, wait_for_device_creation=None
3434
)
3535
Creates a connect webview
3636
"""
@@ -68,7 +68,8 @@ def list(self) -> List[ConnectWebview]:
6868
json_webviews = res["connect_webviews"]
6969

7070
return [
71-
ConnectWebview.from_dict(json_webview) for json_webview in json_webviews
71+
ConnectWebview.from_dict(json_webview)
72+
for json_webview in json_webviews
7273
]
7374

7475
@report_error
@@ -111,6 +112,8 @@ def create(
111112
custom_redirect_failure_url: Optional[str] = None,
112113
device_selection_mode: Optional[str] = None,
113114
custom_metadata: Optional[dict] = None,
115+
automatically_manage_new_devices: Optional[bool] = None,
116+
wait_for_device_creation: Optional[bool] = None,
114117
) -> ConnectWebview:
115118
"""Creates a connect webview.
116119
@@ -127,6 +130,10 @@ def create(
127130
device_selection_mode : str, optional
128131
Selection mode: 'none', 'single' or 'multiple'
129132
custom_metadata : dict, optional
133+
automatically_manage_new_devices : bool, optional
134+
Defaults to true, whether newly added devices should appear as a Managed Device
135+
wait_for_device_creation : bool, optional
136+
Wait until your connected account and devices are synced
130137
131138
Raises
132139
------
@@ -152,11 +159,21 @@ def create(
152159
if custom_redirect_url is not None:
153160
create_payload["custom_redirect_url"] = custom_redirect_url
154161
if custom_redirect_failure_url is not None:
155-
create_payload["custom_redirect_failure_url"] = custom_redirect_failure_url
162+
create_payload[
163+
"custom_redirect_failure_url"
164+
] = custom_redirect_failure_url
156165
if device_selection_mode is not None:
157166
create_payload["device_selection_mode"] = device_selection_mode
158167
if custom_metadata is not None:
159168
create_payload["custom_metadata"] = custom_metadata
169+
if automatically_manage_new_devices is not None:
170+
create_payload[
171+
"automatically_manage_new_devices"
172+
] = automatically_manage_new_devices
173+
if wait_for_device_creation is not None:
174+
create_payload[
175+
"wait_for_device_creation"
176+
] = wait_for_device_creation
160177

161178
res = self.seam.make_request(
162179
"POST",

seamapi/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ class ConnectWebview:
169169
accepted_providers: Optional[List[AcceptedProvider]] = None
170170
accepted_devices: Optional[List[str]] = None
171171
selected_provider: Optional[str] = None
172+
wait_for_device_creation: Optional[bool] = None
173+
automatically_manage_new_devices: Optional[bool] = None
172174

173175

174176
@dataclass_json

0 commit comments

Comments
 (0)