| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906 |
- # -*- coding: utf-8 -*-
- # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
- # source: chatto/api/v1/account.proto
- from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
- from typing import Protocol
- from connectrpc.client import ConnectClient, ConnectClientSync
- from connectrpc.code import Code
- from connectrpc.compression import Compression
- from connectrpc.errors import ConnectError
- from connectrpc.interceptor import Interceptor, InterceptorSync
- from connectrpc.method import IdempotencyLevel, MethodInfo
- from connectrpc.request import Headers, RequestContext
- from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
- import chatto.api.v1.account_pb2 as chatto_dot_api_dot_v1_dot_account__pb2
- import chatto.api.v1.external_identities_pb2 as chatto_dot_api_dot_v1_dot_external__identities__pb2
- import chatto.api.v1.presence_pb2 as chatto_dot_api_dot_v1_dot_presence__pb2
- import chatto.api.v1.user_status_pb2 as chatto_dot_api_dot_v1_dot_user__status__pb2
- class MyAccountService(Protocol):
- async def update_profile(self, request: chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def upload_avatar(self, request: chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def delete_avatar(self, request: chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def update_password(self, request: chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def update_settings(self, request: chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def list_external_identities(self, request: chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def start_external_identity_link(self, request: chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def disconnect_external_identity(self, request: chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def update_presence(self, request: chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def update_custom_status(self, request: chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def delete_custom_status(self, request: chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def request_account_deletion(self, request: chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def delete_my_account(self, request: chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- class MyAccountServiceASGIApplication(ConnectASGIApplication[MyAccountService]):
- def __init__(self, service: MyAccountService | AsyncGenerator[MyAccountService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
- super().__init__(
- service=service,
- endpoints=lambda svc: {
- "/chatto.api.v1.MyAccountService/UpdateProfile": Endpoint.unary(
- method=MethodInfo(
- name="UpdateProfile",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.update_profile,
- ),
- "/chatto.api.v1.MyAccountService/UploadAvatar": Endpoint.unary(
- method=MethodInfo(
- name="UploadAvatar",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.upload_avatar,
- ),
- "/chatto.api.v1.MyAccountService/DeleteAvatar": Endpoint.unary(
- method=MethodInfo(
- name="DeleteAvatar",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.delete_avatar,
- ),
- "/chatto.api.v1.MyAccountService/UpdatePassword": Endpoint.unary(
- method=MethodInfo(
- name="UpdatePassword",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.update_password,
- ),
- "/chatto.api.v1.MyAccountService/UpdateSettings": Endpoint.unary(
- method=MethodInfo(
- name="UpdateSettings",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.update_settings,
- ),
- "/chatto.api.v1.MyAccountService/ListExternalIdentities": Endpoint.unary(
- method=MethodInfo(
- name="ListExternalIdentities",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.list_external_identities,
- ),
- "/chatto.api.v1.MyAccountService/StartExternalIdentityLink": Endpoint.unary(
- method=MethodInfo(
- name="StartExternalIdentityLink",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.start_external_identity_link,
- ),
- "/chatto.api.v1.MyAccountService/DisconnectExternalIdentity": Endpoint.unary(
- method=MethodInfo(
- name="DisconnectExternalIdentity",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.disconnect_external_identity,
- ),
- "/chatto.api.v1.MyAccountService/UpdatePresence": Endpoint.unary(
- method=MethodInfo(
- name="UpdatePresence",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceRequest,
- output=chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.update_presence,
- ),
- "/chatto.api.v1.MyAccountService/UpdateCustomStatus": Endpoint.unary(
- method=MethodInfo(
- name="UpdateCustomStatus",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusRequest,
- output=chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.update_custom_status,
- ),
- "/chatto.api.v1.MyAccountService/DeleteCustomStatus": Endpoint.unary(
- method=MethodInfo(
- name="DeleteCustomStatus",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusRequest,
- output=chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.delete_custom_status,
- ),
- "/chatto.api.v1.MyAccountService/RequestAccountDeletion": Endpoint.unary(
- method=MethodInfo(
- name="RequestAccountDeletion",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.request_account_deletion,
- ),
- "/chatto.api.v1.MyAccountService/DeleteMyAccount": Endpoint.unary(
- method=MethodInfo(
- name="DeleteMyAccount",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.delete_my_account,
- ),
- },
- interceptors=interceptors,
- read_max_bytes=read_max_bytes,
- compressions=compressions,
- )
- @property
- def path(self) -> str:
- """Returns the URL path to mount the application to when serving multiple applications."""
- return "/chatto.api.v1.MyAccountService"
- class MyAccountServiceClient(ConnectClient):
- async def update_profile(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdateProfile",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def upload_avatar(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UploadAvatar",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def delete_avatar(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DeleteAvatar",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def update_password(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdatePassword",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def update_settings(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdateSettings",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def list_external_identities(
- self,
- request: chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="ListExternalIdentities",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def start_external_identity_link(
- self,
- request: chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="StartExternalIdentityLink",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def disconnect_external_identity(
- self,
- request: chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DisconnectExternalIdentity",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def update_presence(
- self,
- request: chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdatePresence",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceRequest,
- output=chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def update_custom_status(
- self,
- request: chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdateCustomStatus",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusRequest,
- output=chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def delete_custom_status(
- self,
- request: chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DeleteCustomStatus",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusRequest,
- output=chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def request_account_deletion(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="RequestAccountDeletion",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def delete_my_account(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DeleteMyAccount",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- class MyAccountServiceSync(Protocol):
- def update_profile(self, request: chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def upload_avatar(self, request: chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def delete_avatar(self, request: chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def update_password(self, request: chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def update_settings(self, request: chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def list_external_identities(self, request: chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def start_external_identity_link(self, request: chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def disconnect_external_identity(self, request: chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def update_presence(self, request: chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def update_custom_status(self, request: chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def delete_custom_status(self, request: chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def request_account_deletion(self, request: chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def delete_my_account(self, request: chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- class MyAccountServiceWSGIApplication(ConnectWSGIApplication):
- def __init__(self, service: MyAccountServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
- super().__init__(
- endpoints={
- "/chatto.api.v1.MyAccountService/UpdateProfile": EndpointSync.unary(
- method=MethodInfo(
- name="UpdateProfile",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.update_profile,
- ),
- "/chatto.api.v1.MyAccountService/UploadAvatar": EndpointSync.unary(
- method=MethodInfo(
- name="UploadAvatar",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.upload_avatar,
- ),
- "/chatto.api.v1.MyAccountService/DeleteAvatar": EndpointSync.unary(
- method=MethodInfo(
- name="DeleteAvatar",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.delete_avatar,
- ),
- "/chatto.api.v1.MyAccountService/UpdatePassword": EndpointSync.unary(
- method=MethodInfo(
- name="UpdatePassword",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.update_password,
- ),
- "/chatto.api.v1.MyAccountService/UpdateSettings": EndpointSync.unary(
- method=MethodInfo(
- name="UpdateSettings",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.update_settings,
- ),
- "/chatto.api.v1.MyAccountService/ListExternalIdentities": EndpointSync.unary(
- method=MethodInfo(
- name="ListExternalIdentities",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.list_external_identities,
- ),
- "/chatto.api.v1.MyAccountService/StartExternalIdentityLink": EndpointSync.unary(
- method=MethodInfo(
- name="StartExternalIdentityLink",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.start_external_identity_link,
- ),
- "/chatto.api.v1.MyAccountService/DisconnectExternalIdentity": EndpointSync.unary(
- method=MethodInfo(
- name="DisconnectExternalIdentity",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.disconnect_external_identity,
- ),
- "/chatto.api.v1.MyAccountService/UpdatePresence": EndpointSync.unary(
- method=MethodInfo(
- name="UpdatePresence",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceRequest,
- output=chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.update_presence,
- ),
- "/chatto.api.v1.MyAccountService/UpdateCustomStatus": EndpointSync.unary(
- method=MethodInfo(
- name="UpdateCustomStatus",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusRequest,
- output=chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.update_custom_status,
- ),
- "/chatto.api.v1.MyAccountService/DeleteCustomStatus": EndpointSync.unary(
- method=MethodInfo(
- name="DeleteCustomStatus",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusRequest,
- output=chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.delete_custom_status,
- ),
- "/chatto.api.v1.MyAccountService/RequestAccountDeletion": EndpointSync.unary(
- method=MethodInfo(
- name="RequestAccountDeletion",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.request_account_deletion,
- ),
- "/chatto.api.v1.MyAccountService/DeleteMyAccount": EndpointSync.unary(
- method=MethodInfo(
- name="DeleteMyAccount",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.delete_my_account,
- ),
- },
- interceptors=interceptors,
- read_max_bytes=read_max_bytes,
- compressions=compressions,
- )
- @property
- def path(self) -> str:
- """Returns the URL path to mount the application to when serving multiple applications."""
- return "/chatto.api.v1.MyAccountService"
- class MyAccountServiceClientSync(ConnectClientSync):
- def update_profile(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdateProfile",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdateProfileResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def upload_avatar(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UploadAvatar",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UploadAvatarResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def delete_avatar(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DeleteAvatar",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.DeleteAvatarResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def update_password(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdatePassword",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdatePasswordResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def update_settings(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdateSettings",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.UpdateSettingsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def list_external_identities(
- self,
- request: chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="ListExternalIdentities",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.ListExternalIdentitiesResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def start_external_identity_link(
- self,
- request: chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="StartExternalIdentityLink",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.StartExternalIdentityLinkResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def disconnect_external_identity(
- self,
- request: chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DisconnectExternalIdentity",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityRequest,
- output=chatto_dot_api_dot_v1_dot_external__identities__pb2.DisconnectExternalIdentityResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def update_presence(
- self,
- request: chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdatePresence",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceRequest,
- output=chatto_dot_api_dot_v1_dot_presence__pb2.UpdatePresenceResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def update_custom_status(
- self,
- request: chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="UpdateCustomStatus",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusRequest,
- output=chatto_dot_api_dot_v1_dot_user__status__pb2.UpdateCustomStatusResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def delete_custom_status(
- self,
- request: chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DeleteCustomStatus",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusRequest,
- output=chatto_dot_api_dot_v1_dot_user__status__pb2.DeleteCustomStatusResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def request_account_deletion(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="RequestAccountDeletion",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.RequestAccountDeletionResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def delete_my_account(
- self,
- request: chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DeleteMyAccount",
- service_name="chatto.api.v1.MyAccountService",
- input=chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountRequest,
- output=chatto_dot_api_dot_v1_dot_account__pb2.DeleteMyAccountResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
|