@@ -66,6 +66,7 @@ def create(
6666 health_check_interval : int | Omit = omit ,
6767 login_url : str | Omit = omit ,
6868 proxy : connection_create_params .Proxy | Omit = omit ,
69+ record_session : bool | Omit = omit ,
6970 save_credentials : bool | Omit = omit ,
7071 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7172 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -122,6 +123,9 @@ def create(
122123 proxy: Proxy selection. Provide either id or name. The proxy must belong to the
123124 caller's org.
124125
126+ record_session: Whether to record browser sessions for this connection by default. Useful for
127+ debugging. Can be overridden per-login. Defaults to false.
128+
125129 save_credentials: Whether to save credentials after every successful login. Defaults to true.
126130 One-time codes (TOTP, SMS, etc.) are not saved.
127131
@@ -144,6 +148,7 @@ def create(
144148 "health_check_interval" : health_check_interval ,
145149 "login_url" : login_url ,
146150 "proxy" : proxy ,
151+ "record_session" : record_session ,
147152 "save_credentials" : save_credentials ,
148153 },
149154 connection_create_params .ConnectionCreateParams ,
@@ -198,6 +203,7 @@ def update(
198203 health_check_interval : int | Omit = omit ,
199204 login_url : str | Omit = omit ,
200205 proxy : connection_update_params .Proxy | Omit = omit ,
206+ record_session : bool | Omit = omit ,
201207 save_credentials : bool | Omit = omit ,
202208 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
203209 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -228,6 +234,8 @@ def update(
228234 proxy: Proxy selection. Provide either id or name. The proxy must belong to the
229235 caller's org.
230236
237+ record_session: Whether to record browser sessions for this connection by default
238+
231239 save_credentials: Whether to save credentials after every successful login
232240
233241 extra_headers: Send extra headers
@@ -249,6 +257,7 @@ def update(
249257 "health_check_interval" : health_check_interval ,
250258 "login_url" : login_url ,
251259 "proxy" : proxy ,
260+ "record_session" : record_session ,
252261 "save_credentials" : save_credentials ,
253262 },
254263 connection_update_params .ConnectionUpdateParams ,
@@ -398,6 +407,7 @@ def login(
398407 id : str ,
399408 * ,
400409 proxy : connection_login_params .Proxy | Omit = omit ,
410+ record_session : bool | Omit = omit ,
401411 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
402412 # The extra values given here take precedence over values defined on the client or passed to this method.
403413 extra_headers : Headers | None = None ,
@@ -415,6 +425,9 @@ def login(
415425 proxy: Proxy selection. Provide either id or name. The proxy must belong to the
416426 caller's org.
417427
428+ record_session: Override the connection's default for recording this login's browser session.
429+ When omitted, the connection's record_session default is used.
430+
418431 extra_headers: Send extra headers
419432
420433 extra_query: Add additional query parameters to the request
@@ -427,7 +440,13 @@ def login(
427440 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
428441 return self ._post (
429442 path_template ("/auth/connections/{id}/login" , id = id ),
430- body = maybe_transform ({"proxy" : proxy }, connection_login_params .ConnectionLoginParams ),
443+ body = maybe_transform (
444+ {
445+ "proxy" : proxy ,
446+ "record_session" : record_session ,
447+ },
448+ connection_login_params .ConnectionLoginParams ,
449+ ),
431450 options = make_request_options (
432451 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
433452 ),
@@ -529,6 +548,7 @@ async def create(
529548 health_check_interval : int | Omit = omit ,
530549 login_url : str | Omit = omit ,
531550 proxy : connection_create_params .Proxy | Omit = omit ,
551+ record_session : bool | Omit = omit ,
532552 save_credentials : bool | Omit = omit ,
533553 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
534554 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -585,6 +605,9 @@ async def create(
585605 proxy: Proxy selection. Provide either id or name. The proxy must belong to the
586606 caller's org.
587607
608+ record_session: Whether to record browser sessions for this connection by default. Useful for
609+ debugging. Can be overridden per-login. Defaults to false.
610+
588611 save_credentials: Whether to save credentials after every successful login. Defaults to true.
589612 One-time codes (TOTP, SMS, etc.) are not saved.
590613
@@ -607,6 +630,7 @@ async def create(
607630 "health_check_interval" : health_check_interval ,
608631 "login_url" : login_url ,
609632 "proxy" : proxy ,
633+ "record_session" : record_session ,
610634 "save_credentials" : save_credentials ,
611635 },
612636 connection_create_params .ConnectionCreateParams ,
@@ -661,6 +685,7 @@ async def update(
661685 health_check_interval : int | Omit = omit ,
662686 login_url : str | Omit = omit ,
663687 proxy : connection_update_params .Proxy | Omit = omit ,
688+ record_session : bool | Omit = omit ,
664689 save_credentials : bool | Omit = omit ,
665690 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
666691 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -691,6 +716,8 @@ async def update(
691716 proxy: Proxy selection. Provide either id or name. The proxy must belong to the
692717 caller's org.
693718
719+ record_session: Whether to record browser sessions for this connection by default
720+
694721 save_credentials: Whether to save credentials after every successful login
695722
696723 extra_headers: Send extra headers
@@ -712,6 +739,7 @@ async def update(
712739 "health_check_interval" : health_check_interval ,
713740 "login_url" : login_url ,
714741 "proxy" : proxy ,
742+ "record_session" : record_session ,
715743 "save_credentials" : save_credentials ,
716744 },
717745 connection_update_params .ConnectionUpdateParams ,
@@ -861,6 +889,7 @@ async def login(
861889 id : str ,
862890 * ,
863891 proxy : connection_login_params .Proxy | Omit = omit ,
892+ record_session : bool | Omit = omit ,
864893 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
865894 # The extra values given here take precedence over values defined on the client or passed to this method.
866895 extra_headers : Headers | None = None ,
@@ -878,6 +907,9 @@ async def login(
878907 proxy: Proxy selection. Provide either id or name. The proxy must belong to the
879908 caller's org.
880909
910+ record_session: Override the connection's default for recording this login's browser session.
911+ When omitted, the connection's record_session default is used.
912+
881913 extra_headers: Send extra headers
882914
883915 extra_query: Add additional query parameters to the request
@@ -890,7 +922,13 @@ async def login(
890922 raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
891923 return await self ._post (
892924 path_template ("/auth/connections/{id}/login" , id = id ),
893- body = await async_maybe_transform ({"proxy" : proxy }, connection_login_params .ConnectionLoginParams ),
925+ body = await async_maybe_transform (
926+ {
927+ "proxy" : proxy ,
928+ "record_session" : record_session ,
929+ },
930+ connection_login_params .ConnectionLoginParams ,
931+ ),
894932 options = make_request_options (
895933 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
896934 ),
0 commit comments