5555from .types .create_token_response import CreateTokenResponse
5656from .types .get_connection_response import GetConnectionResponse
5757from .types .check_connection_response import CheckConnectionResponse
58+ from .types .get_current_user_response import GetCurrentUserResponse
5859from .types .list_connections_response import ListConnectionsResponse
5960from .types .create_magic_link_response import CreateMagicLinkResponse
6061from .types .list_connection_configs_response import ListConnectionConfigsResponse
@@ -480,6 +481,30 @@ def get_connection(
480481 ),
481482 )
482483
484+ def get_current_user (
485+ self ,
486+ * ,
487+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
488+ # The extra values given here take precedence over values defined on the client or passed to this method.
489+ extra_headers : Headers | None = None ,
490+ extra_query : Query | None = None ,
491+ extra_body : Body | None = None ,
492+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
493+ ) -> GetCurrentUserResponse :
494+ """Get information about the current authenticated user"""
495+ return cast (
496+ GetCurrentUserResponse ,
497+ self .get (
498+ "/viewer" ,
499+ options = make_request_options (
500+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
501+ ),
502+ cast_to = cast (
503+ Any , GetCurrentUserResponse
504+ ), # Union types cannot be passed in as arguments in the type system
505+ ),
506+ )
507+
483508 def list_connection_configs (
484509 self ,
485510 * ,
@@ -1147,6 +1172,30 @@ async def get_connection(
11471172 ),
11481173 )
11491174
1175+ async def get_current_user (
1176+ self ,
1177+ * ,
1178+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1179+ # The extra values given here take precedence over values defined on the client or passed to this method.
1180+ extra_headers : Headers | None = None ,
1181+ extra_query : Query | None = None ,
1182+ extra_body : Body | None = None ,
1183+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1184+ ) -> GetCurrentUserResponse :
1185+ """Get information about the current authenticated user"""
1186+ return cast (
1187+ GetCurrentUserResponse ,
1188+ await self .get (
1189+ "/viewer" ,
1190+ options = make_request_options (
1191+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
1192+ ),
1193+ cast_to = cast (
1194+ Any , GetCurrentUserResponse
1195+ ), # Union types cannot be passed in as arguments in the type system
1196+ ),
1197+ )
1198+
11501199 def list_connection_configs (
11511200 self ,
11521201 * ,
@@ -1410,6 +1459,9 @@ def __init__(self, client: Openint) -> None:
14101459 self .get_connection = to_raw_response_wrapper (
14111460 client .get_connection ,
14121461 )
1462+ self .get_current_user = to_raw_response_wrapper (
1463+ client .get_current_user ,
1464+ )
14131465 self .list_connection_configs = to_raw_response_wrapper (
14141466 client .list_connection_configs ,
14151467 )
@@ -1432,6 +1484,9 @@ def __init__(self, client: AsyncOpenint) -> None:
14321484 self .get_connection = async_to_raw_response_wrapper (
14331485 client .get_connection ,
14341486 )
1487+ self .get_current_user = async_to_raw_response_wrapper (
1488+ client .get_current_user ,
1489+ )
14351490 self .list_connection_configs = async_to_raw_response_wrapper (
14361491 client .list_connection_configs ,
14371492 )
@@ -1454,6 +1509,9 @@ def __init__(self, client: Openint) -> None:
14541509 self .get_connection = to_streamed_response_wrapper (
14551510 client .get_connection ,
14561511 )
1512+ self .get_current_user = to_streamed_response_wrapper (
1513+ client .get_current_user ,
1514+ )
14571515 self .list_connection_configs = to_streamed_response_wrapper (
14581516 client .list_connection_configs ,
14591517 )
@@ -1476,6 +1534,9 @@ def __init__(self, client: AsyncOpenint) -> None:
14761534 self .get_connection = async_to_streamed_response_wrapper (
14771535 client .get_connection ,
14781536 )
1537+ self .get_current_user = async_to_streamed_response_wrapper (
1538+ client .get_current_user ,
1539+ )
14791540 self .list_connection_configs = async_to_streamed_response_wrapper (
14801541 client .list_connection_configs ,
14811542 )
0 commit comments