1212 account_list_sso_logins_params ,
1313 account_get_sso_login_url_params ,
1414 account_list_login_providers_params ,
15+ account_get_chat_identity_token_params ,
1516 account_list_joinable_organizations_params ,
1617)
1718from .._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
3839from ..types .account_retrieve_response import AccountRetrieveResponse
3940from ..types .account_list_sso_logins_response import AccountListSSOLoginsResponse
4041from ..types .account_get_sso_login_url_response import AccountGetSSOLoginURLResponse
42+ from ..types .account_get_chat_identity_token_response import AccountGetChatIdentityTokenResponse
4143
4244__all__ = ["AccountsResource" , "AsyncAccountsResource" ]
4345
@@ -170,6 +172,58 @@ def delete(
170172 cast_to = object ,
171173 )
172174
175+ def get_chat_identity_token (
176+ self ,
177+ * ,
178+ empty : bool | Omit = omit ,
179+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
180+ # The extra values given here take precedence over values defined on the client or passed to this method.
181+ extra_headers : Headers | None = None ,
182+ extra_query : Query | None = None ,
183+ extra_body : Body | None = None ,
184+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
185+ ) -> AccountGetChatIdentityTokenResponse :
186+ """
187+ Gets the chat identity token for the currently authenticated account.
188+
189+ Use this method to:
190+
191+ - Obtain a verification hash for in-app chat identity verification
192+ - Secure chat sessions against impersonation
193+
194+ The returned hash is an HMAC-SHA256 signature of the account's email, used by
195+ the chat widget to verify user identity.
196+
197+ ### Examples
198+
199+ - Get chat identity token:
200+
201+ Retrieves the identity verification hash for the authenticated account.
202+
203+ ```yaml
204+ {}
205+ ```
206+
207+ Args:
208+ extra_headers: Send extra headers
209+
210+ extra_query: Add additional query parameters to the request
211+
212+ extra_body: Add additional JSON properties to the request
213+
214+ timeout: Override the client-level default timeout for this request, in seconds
215+ """
216+ return self ._post (
217+ "/gitpod.v1.AccountService/GetChatIdentityToken" ,
218+ body = maybe_transform (
219+ {"empty" : empty }, account_get_chat_identity_token_params .AccountGetChatIdentityTokenParams
220+ ),
221+ options = make_request_options (
222+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
223+ ),
224+ cast_to = AccountGetChatIdentityTokenResponse ,
225+ )
226+
173227 def get_sso_login_url (
174228 self ,
175229 * ,
@@ -580,6 +634,58 @@ async def delete(
580634 cast_to = object ,
581635 )
582636
637+ async def get_chat_identity_token (
638+ self ,
639+ * ,
640+ empty : bool | Omit = omit ,
641+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
642+ # The extra values given here take precedence over values defined on the client or passed to this method.
643+ extra_headers : Headers | None = None ,
644+ extra_query : Query | None = None ,
645+ extra_body : Body | None = None ,
646+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
647+ ) -> AccountGetChatIdentityTokenResponse :
648+ """
649+ Gets the chat identity token for the currently authenticated account.
650+
651+ Use this method to:
652+
653+ - Obtain a verification hash for in-app chat identity verification
654+ - Secure chat sessions against impersonation
655+
656+ The returned hash is an HMAC-SHA256 signature of the account's email, used by
657+ the chat widget to verify user identity.
658+
659+ ### Examples
660+
661+ - Get chat identity token:
662+
663+ Retrieves the identity verification hash for the authenticated account.
664+
665+ ```yaml
666+ {}
667+ ```
668+
669+ Args:
670+ extra_headers: Send extra headers
671+
672+ extra_query: Add additional query parameters to the request
673+
674+ extra_body: Add additional JSON properties to the request
675+
676+ timeout: Override the client-level default timeout for this request, in seconds
677+ """
678+ return await self ._post (
679+ "/gitpod.v1.AccountService/GetChatIdentityToken" ,
680+ body = await async_maybe_transform (
681+ {"empty" : empty }, account_get_chat_identity_token_params .AccountGetChatIdentityTokenParams
682+ ),
683+ options = make_request_options (
684+ extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
685+ ),
686+ cast_to = AccountGetChatIdentityTokenResponse ,
687+ )
688+
583689 async def get_sso_login_url (
584690 self ,
585691 * ,
@@ -872,6 +978,9 @@ def __init__(self, accounts: AccountsResource) -> None:
872978 self .delete = to_raw_response_wrapper (
873979 accounts .delete ,
874980 )
981+ self .get_chat_identity_token = to_raw_response_wrapper (
982+ accounts .get_chat_identity_token ,
983+ )
875984 self .get_sso_login_url = to_raw_response_wrapper (
876985 accounts .get_sso_login_url ,
877986 )
@@ -896,6 +1005,9 @@ def __init__(self, accounts: AsyncAccountsResource) -> None:
8961005 self .delete = async_to_raw_response_wrapper (
8971006 accounts .delete ,
8981007 )
1008+ self .get_chat_identity_token = async_to_raw_response_wrapper (
1009+ accounts .get_chat_identity_token ,
1010+ )
8991011 self .get_sso_login_url = async_to_raw_response_wrapper (
9001012 accounts .get_sso_login_url ,
9011013 )
@@ -920,6 +1032,9 @@ def __init__(self, accounts: AccountsResource) -> None:
9201032 self .delete = to_streamed_response_wrapper (
9211033 accounts .delete ,
9221034 )
1035+ self .get_chat_identity_token = to_streamed_response_wrapper (
1036+ accounts .get_chat_identity_token ,
1037+ )
9231038 self .get_sso_login_url = to_streamed_response_wrapper (
9241039 accounts .get_sso_login_url ,
9251040 )
@@ -944,6 +1059,9 @@ def __init__(self, accounts: AsyncAccountsResource) -> None:
9441059 self .delete = async_to_streamed_response_wrapper (
9451060 accounts .delete ,
9461061 )
1062+ self .get_chat_identity_token = async_to_streamed_response_wrapper (
1063+ accounts .get_chat_identity_token ,
1064+ )
9471065 self .get_sso_login_url = async_to_streamed_response_wrapper (
9481066 accounts .get_sso_login_url ,
9491067 )
0 commit comments