88from ..types .session_item_view import SessionItemView
99from ..types .session_list_response import SessionListResponse
1010from ..types .session_status import SessionStatus
11+ from ..types .session_update_action import SessionUpdateAction
1112from ..types .session_view import SessionView
1213from ..types .share_view import ShareView
1314from .raw_client import AsyncRawSessionsClient , RawSessionsClient
@@ -189,7 +190,7 @@ def delete_session(self, session_id: str, *, request_options: typing.Optional[Re
189190 return _response .data
190191
191192 def update_session (
192- self , session_id : str , * , request_options : typing .Optional [RequestOptions ] = None
193+ self , session_id : str , * , action : SessionUpdateAction , request_options : typing .Optional [RequestOptions ] = None
193194 ) -> SessionView :
194195 """
195196 Stop a session and all its running tasks.
@@ -198,6 +199,9 @@ def update_session(
198199 ----------
199200 session_id : str
200201
202+ action : SessionUpdateAction
203+ The action to perform on the session
204+
201205 request_options : typing.Optional[RequestOptions]
202206 Request-specific configuration.
203207
@@ -215,9 +219,10 @@ def update_session(
215219 )
216220 client.sessions.update_session(
217221 session_id="session_id",
222+ action="stop",
218223 )
219224 """
220- _response = self ._raw_client .update_session (session_id , request_options = request_options )
225+ _response = self ._raw_client .update_session (session_id , action = action , request_options = request_options )
221226 return _response .data
222227
223228 def get_session_public_share (
@@ -523,7 +528,7 @@ async def main() -> None:
523528 return _response .data
524529
525530 async def update_session (
526- self , session_id : str , * , request_options : typing .Optional [RequestOptions ] = None
531+ self , session_id : str , * , action : SessionUpdateAction , request_options : typing .Optional [RequestOptions ] = None
527532 ) -> SessionView :
528533 """
529534 Stop a session and all its running tasks.
@@ -532,6 +537,9 @@ async def update_session(
532537 ----------
533538 session_id : str
534539
540+ action : SessionUpdateAction
541+ The action to perform on the session
542+
535543 request_options : typing.Optional[RequestOptions]
536544 Request-specific configuration.
537545
@@ -554,12 +562,13 @@ async def update_session(
554562 async def main() -> None:
555563 await client.sessions.update_session(
556564 session_id="session_id",
565+ action="stop",
557566 )
558567
559568
560569 asyncio.run(main())
561570 """
562- _response = await self ._raw_client .update_session (session_id , request_options = request_options )
571+ _response = await self ._raw_client .update_session (session_id , action = action , request_options = request_options )
563572 return _response .data
564573
565574 async def get_session_public_share (
0 commit comments