Source code for soulfire.user_connect

# Generated from soulfire/user.proto. DO NOT EDIT.
# Generated by protoc-gen-connectrpc-py v0.11.1 with parameter "protobuf=google".
# ruff: noqa: PGH004
# ruff: noqa
# fmt: off

from __future__ import annotations

from typing import Protocol, TYPE_CHECKING

from connectrpc.client import ConnectClient, ConnectClientSync
from connectrpc.code import Code
from connectrpc.compat import google_protobuf_binary_codec, google_protobuf_codecs
from connectrpc.compression.gzip import GzipCompression
from connectrpc.errors import ConnectError
from connectrpc.method import IdempotencyLevel, MethodInfo
from connectrpc.protocol import ProtocolType
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
from pyqwest import Client, SyncClient

from .user_pb2 import DeleteUserPluginPermissionGrantRequest, DeleteUserPluginPermissionGrantResponse, GenerateUserAPITokenRequest, GenerateUserAPITokenResponse, InvalidateSessionsRequest, InvalidateSessionsResponse, ListUserPluginPermissionGrantsRequest, ListUserPluginPermissionGrantsResponse, SetUserPluginPermissionGrantRequest, UpdateUserRequest, UpdateUserResponse, UserCreateRequest, UserCreateResponse, UserDeleteRequest, UserDeleteResponse, UserInfoRequest, UserInfoResponse, UserListRequest, UserListResponse, UserPluginPermissionGrant

if TYPE_CHECKING:
    from collections.abc import AsyncGenerator, Iterable, Mapping

    from connectrpc.codec import Codec
    from connectrpc.compression import Compression
    from connectrpc.interceptor import Interceptor, InterceptorSync
    from connectrpc.request import Headers, RequestContext



_DEFAULT_CODECS = google_protobuf_codecs()
_PROTO_BINARY_CODEC = google_protobuf_binary_codec()
_GZIP_COMPRESSION = GzipCompression()

[docs] class UserService(Protocol):
[docs] async def create_user(self, request: UserCreateRequest, ctx: RequestContext[UserCreateRequest, UserCreateResponse]) -> UserCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def delete_user(self, request: UserDeleteRequest, ctx: RequestContext[UserDeleteRequest, UserDeleteResponse]) -> UserDeleteResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def list_users(self, request: UserListRequest, ctx: RequestContext[UserListRequest, UserListResponse]) -> UserListResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def get_user_info(self, request: UserInfoRequest, ctx: RequestContext[UserInfoRequest, UserInfoResponse]) -> UserInfoResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def invalidate_sessions(self, request: InvalidateSessionsRequest, ctx: RequestContext[InvalidateSessionsRequest, InvalidateSessionsResponse]) -> InvalidateSessionsResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def update_user(self, request: UpdateUserRequest, ctx: RequestContext[UpdateUserRequest, UpdateUserResponse]) -> UpdateUserResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def generate_user_api_token(self, request: GenerateUserAPITokenRequest, ctx: RequestContext[GenerateUserAPITokenRequest, GenerateUserAPITokenResponse]) -> GenerateUserAPITokenResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def list_user_plugin_permission_grants(self, request: ListUserPluginPermissionGrantsRequest, ctx: RequestContext[ListUserPluginPermissionGrantsRequest, ListUserPluginPermissionGrantsResponse]) -> ListUserPluginPermissionGrantsResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def set_user_plugin_permission_grant(self, request: SetUserPluginPermissionGrantRequest, ctx: RequestContext[SetUserPluginPermissionGrantRequest, UserPluginPermissionGrant]) -> UserPluginPermissionGrant: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] async def delete_user_plugin_permission_grant(self, request: DeleteUserPluginPermissionGrantRequest, ctx: RequestContext[DeleteUserPluginPermissionGrantRequest, DeleteUserPluginPermissionGrantResponse]) -> DeleteUserPluginPermissionGrantResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] class UserServiceASGIApplication(ConnectASGIApplication[UserService]): def __init__( self, service: UserService | AsyncGenerator[UserService], *, interceptors: Iterable[Interceptor] = (), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = _DEFAULT_CODECS, ) -> None: super().__init__( service=service, endpoints=lambda svc: { "/soulfire.v1.UserService/CreateUser": Endpoint.unary( method=MethodInfo( name="CreateUser", service_name="soulfire.v1.UserService", input=UserCreateRequest, output=UserCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.create_user, ), "/soulfire.v1.UserService/DeleteUser": Endpoint.unary( method=MethodInfo( name="DeleteUser", service_name="soulfire.v1.UserService", input=UserDeleteRequest, output=UserDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.delete_user, ), "/soulfire.v1.UserService/ListUsers": Endpoint.unary( method=MethodInfo( name="ListUsers", service_name="soulfire.v1.UserService", input=UserListRequest, output=UserListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.list_users, ), "/soulfire.v1.UserService/GetUserInfo": Endpoint.unary( method=MethodInfo( name="GetUserInfo", service_name="soulfire.v1.UserService", input=UserInfoRequest, output=UserInfoResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.get_user_info, ), "/soulfire.v1.UserService/InvalidateSessions": Endpoint.unary( method=MethodInfo( name="InvalidateSessions", service_name="soulfire.v1.UserService", input=InvalidateSessionsRequest, output=InvalidateSessionsResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.invalidate_sessions, ), "/soulfire.v1.UserService/UpdateUser": Endpoint.unary( method=MethodInfo( name="UpdateUser", service_name="soulfire.v1.UserService", input=UpdateUserRequest, output=UpdateUserResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.update_user, ), "/soulfire.v1.UserService/GenerateUserAPIToken": Endpoint.unary( method=MethodInfo( name="GenerateUserAPIToken", service_name="soulfire.v1.UserService", input=GenerateUserAPITokenRequest, output=GenerateUserAPITokenResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.generate_user_api_token, ), "/soulfire.v1.UserService/ListUserPluginPermissionGrants": Endpoint.unary( method=MethodInfo( name="ListUserPluginPermissionGrants", service_name="soulfire.v1.UserService", input=ListUserPluginPermissionGrantsRequest, output=ListUserPluginPermissionGrantsResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.list_user_plugin_permission_grants, ), "/soulfire.v1.UserService/SetUserPluginPermissionGrant": Endpoint.unary( method=MethodInfo( name="SetUserPluginPermissionGrant", service_name="soulfire.v1.UserService", input=SetUserPluginPermissionGrantRequest, output=UserPluginPermissionGrant, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.set_user_plugin_permission_grant, ), "/soulfire.v1.UserService/DeleteUserPluginPermissionGrant": Endpoint.unary( method=MethodInfo( name="DeleteUserPluginPermissionGrant", service_name="soulfire.v1.UserService", input=DeleteUserPluginPermissionGrantRequest, output=DeleteUserPluginPermissionGrantResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=svc.delete_user_plugin_permission_grant, ), }, interceptors=interceptors, read_max_bytes=read_max_bytes, compressions=compressions, codecs=codecs, ) @property def path(self) -> str: """Returns the URL path to mount the application to when serving multiple applications.""" return "/soulfire.v1.UserService"
[docs] class UserServiceClient(ConnectClient): def __init__( self, address: str, *, codec: Codec | None = _PROTO_BINARY_CODEC, protocol: ProtocolType = ProtocolType.CONNECT, accept_compression: Iterable[Compression] | None = None, send_compression: Compression | None = _GZIP_COMPRESSION, timeout_ms: int | None = None, read_max_bytes: int | None = None, interceptors: Iterable[Interceptor] = (), http_client: Client | None = None, ) -> None: super().__init__( address=address, codec=codec, protocol=protocol, accept_compression=accept_compression, send_compression=send_compression, timeout_ms=timeout_ms, read_max_bytes=read_max_bytes, interceptors=interceptors, http_client=http_client, )
[docs] async def create_user( self, request: UserCreateRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserCreateResponse: return await self.execute_unary( request=request, method=MethodInfo( name="CreateUser", service_name="soulfire.v1.UserService", input=UserCreateRequest, output=UserCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def delete_user( self, request: UserDeleteRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserDeleteResponse: return await self.execute_unary( request=request, method=MethodInfo( name="DeleteUser", service_name="soulfire.v1.UserService", input=UserDeleteRequest, output=UserDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def list_users( self, request: UserListRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserListResponse: return await self.execute_unary( request=request, method=MethodInfo( name="ListUsers", service_name="soulfire.v1.UserService", input=UserListRequest, output=UserListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def get_user_info( self, request: UserInfoRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserInfoResponse: return await self.execute_unary( request=request, method=MethodInfo( name="GetUserInfo", service_name="soulfire.v1.UserService", input=UserInfoRequest, output=UserInfoResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def invalidate_sessions( self, request: InvalidateSessionsRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> InvalidateSessionsResponse: return await self.execute_unary( request=request, method=MethodInfo( name="InvalidateSessions", service_name="soulfire.v1.UserService", input=InvalidateSessionsRequest, output=InvalidateSessionsResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def update_user( self, request: UpdateUserRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UpdateUserResponse: return await self.execute_unary( request=request, method=MethodInfo( name="UpdateUser", service_name="soulfire.v1.UserService", input=UpdateUserRequest, output=UpdateUserResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def generate_user_api_token( self, request: GenerateUserAPITokenRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> GenerateUserAPITokenResponse: return await self.execute_unary( request=request, method=MethodInfo( name="GenerateUserAPIToken", service_name="soulfire.v1.UserService", input=GenerateUserAPITokenRequest, output=GenerateUserAPITokenResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def list_user_plugin_permission_grants( self, request: ListUserPluginPermissionGrantsRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> ListUserPluginPermissionGrantsResponse: return await self.execute_unary( request=request, method=MethodInfo( name="ListUserPluginPermissionGrants", service_name="soulfire.v1.UserService", input=ListUserPluginPermissionGrantsRequest, output=ListUserPluginPermissionGrantsResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def set_user_plugin_permission_grant( self, request: SetUserPluginPermissionGrantRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserPluginPermissionGrant: return await self.execute_unary( request=request, method=MethodInfo( name="SetUserPluginPermissionGrant", service_name="soulfire.v1.UserService", input=SetUserPluginPermissionGrantRequest, output=UserPluginPermissionGrant, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] async def delete_user_plugin_permission_grant( self, request: DeleteUserPluginPermissionGrantRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> DeleteUserPluginPermissionGrantResponse: return await self.execute_unary( request=request, method=MethodInfo( name="DeleteUserPluginPermissionGrant", service_name="soulfire.v1.UserService", input=DeleteUserPluginPermissionGrantRequest, output=DeleteUserPluginPermissionGrantResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] class UserServiceSync(Protocol):
[docs] def create_user(self, request: UserCreateRequest, ctx: RequestContext[UserCreateRequest, UserCreateResponse]) -> UserCreateResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def delete_user(self, request: UserDeleteRequest, ctx: RequestContext[UserDeleteRequest, UserDeleteResponse]) -> UserDeleteResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def list_users(self, request: UserListRequest, ctx: RequestContext[UserListRequest, UserListResponse]) -> UserListResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def get_user_info(self, request: UserInfoRequest, ctx: RequestContext[UserInfoRequest, UserInfoResponse]) -> UserInfoResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def invalidate_sessions(self, request: InvalidateSessionsRequest, ctx: RequestContext[InvalidateSessionsRequest, InvalidateSessionsResponse]) -> InvalidateSessionsResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def update_user(self, request: UpdateUserRequest, ctx: RequestContext[UpdateUserRequest, UpdateUserResponse]) -> UpdateUserResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def generate_user_api_token(self, request: GenerateUserAPITokenRequest, ctx: RequestContext[GenerateUserAPITokenRequest, GenerateUserAPITokenResponse]) -> GenerateUserAPITokenResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def list_user_plugin_permission_grants(self, request: ListUserPluginPermissionGrantsRequest, ctx: RequestContext[ListUserPluginPermissionGrantsRequest, ListUserPluginPermissionGrantsResponse]) -> ListUserPluginPermissionGrantsResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def set_user_plugin_permission_grant(self, request: SetUserPluginPermissionGrantRequest, ctx: RequestContext[SetUserPluginPermissionGrantRequest, UserPluginPermissionGrant]) -> UserPluginPermissionGrant: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] def delete_user_plugin_permission_grant(self, request: DeleteUserPluginPermissionGrantRequest, ctx: RequestContext[DeleteUserPluginPermissionGrantRequest, DeleteUserPluginPermissionGrantResponse]) -> DeleteUserPluginPermissionGrantResponse: raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')
[docs] class UserServiceWSGIApplication(ConnectWSGIApplication): def __init__( self, service: UserServiceSync, interceptors: Iterable[InterceptorSync] = (), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None, codecs: Iterable[Codec] | None = _DEFAULT_CODECS, ) -> None: super().__init__( endpoints={ "/soulfire.v1.UserService/CreateUser": EndpointSync.unary( method=MethodInfo( name="CreateUser", service_name="soulfire.v1.UserService", input=UserCreateRequest, output=UserCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.create_user, ), "/soulfire.v1.UserService/DeleteUser": EndpointSync.unary( method=MethodInfo( name="DeleteUser", service_name="soulfire.v1.UserService", input=UserDeleteRequest, output=UserDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.delete_user, ), "/soulfire.v1.UserService/ListUsers": EndpointSync.unary( method=MethodInfo( name="ListUsers", service_name="soulfire.v1.UserService", input=UserListRequest, output=UserListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.list_users, ), "/soulfire.v1.UserService/GetUserInfo": EndpointSync.unary( method=MethodInfo( name="GetUserInfo", service_name="soulfire.v1.UserService", input=UserInfoRequest, output=UserInfoResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.get_user_info, ), "/soulfire.v1.UserService/InvalidateSessions": EndpointSync.unary( method=MethodInfo( name="InvalidateSessions", service_name="soulfire.v1.UserService", input=InvalidateSessionsRequest, output=InvalidateSessionsResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.invalidate_sessions, ), "/soulfire.v1.UserService/UpdateUser": EndpointSync.unary( method=MethodInfo( name="UpdateUser", service_name="soulfire.v1.UserService", input=UpdateUserRequest, output=UpdateUserResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.update_user, ), "/soulfire.v1.UserService/GenerateUserAPIToken": EndpointSync.unary( method=MethodInfo( name="GenerateUserAPIToken", service_name="soulfire.v1.UserService", input=GenerateUserAPITokenRequest, output=GenerateUserAPITokenResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.generate_user_api_token, ), "/soulfire.v1.UserService/ListUserPluginPermissionGrants": EndpointSync.unary( method=MethodInfo( name="ListUserPluginPermissionGrants", service_name="soulfire.v1.UserService", input=ListUserPluginPermissionGrantsRequest, output=ListUserPluginPermissionGrantsResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.list_user_plugin_permission_grants, ), "/soulfire.v1.UserService/SetUserPluginPermissionGrant": EndpointSync.unary( method=MethodInfo( name="SetUserPluginPermissionGrant", service_name="soulfire.v1.UserService", input=SetUserPluginPermissionGrantRequest, output=UserPluginPermissionGrant, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.set_user_plugin_permission_grant, ), "/soulfire.v1.UserService/DeleteUserPluginPermissionGrant": EndpointSync.unary( method=MethodInfo( name="DeleteUserPluginPermissionGrant", service_name="soulfire.v1.UserService", input=DeleteUserPluginPermissionGrantRequest, output=DeleteUserPluginPermissionGrantResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), function=service.delete_user_plugin_permission_grant, ), }, interceptors=interceptors, read_max_bytes=read_max_bytes, compressions=compressions, codecs=codecs, ) @property def path(self) -> str: """Returns the URL path to mount the application to when serving multiple applications.""" return "/soulfire.v1.UserService"
[docs] class UserServiceClientSync(ConnectClientSync): def __init__( self, address: str, *, codec: Codec | None = _PROTO_BINARY_CODEC, protocol: ProtocolType = ProtocolType.CONNECT, accept_compression: Iterable[Compression] | None = None, send_compression: Compression | None = _GZIP_COMPRESSION, timeout_ms: int | None = None, read_max_bytes: int | None = None, interceptors: Iterable[InterceptorSync] = (), http_client: SyncClient | None = None, ) -> None: super().__init__( address=address, codec=codec, protocol=protocol, accept_compression=accept_compression, send_compression=send_compression, timeout_ms=timeout_ms, read_max_bytes=read_max_bytes, interceptors=interceptors, http_client=http_client, )
[docs] def create_user( self, request: UserCreateRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserCreateResponse: return self.execute_unary( request=request, method=MethodInfo( name="CreateUser", service_name="soulfire.v1.UserService", input=UserCreateRequest, output=UserCreateResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def delete_user( self, request: UserDeleteRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserDeleteResponse: return self.execute_unary( request=request, method=MethodInfo( name="DeleteUser", service_name="soulfire.v1.UserService", input=UserDeleteRequest, output=UserDeleteResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def list_users( self, request: UserListRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserListResponse: return self.execute_unary( request=request, method=MethodInfo( name="ListUsers", service_name="soulfire.v1.UserService", input=UserListRequest, output=UserListResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def get_user_info( self, request: UserInfoRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserInfoResponse: return self.execute_unary( request=request, method=MethodInfo( name="GetUserInfo", service_name="soulfire.v1.UserService", input=UserInfoRequest, output=UserInfoResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def invalidate_sessions( self, request: InvalidateSessionsRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> InvalidateSessionsResponse: return self.execute_unary( request=request, method=MethodInfo( name="InvalidateSessions", service_name="soulfire.v1.UserService", input=InvalidateSessionsRequest, output=InvalidateSessionsResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def update_user( self, request: UpdateUserRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UpdateUserResponse: return self.execute_unary( request=request, method=MethodInfo( name="UpdateUser", service_name="soulfire.v1.UserService", input=UpdateUserRequest, output=UpdateUserResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def generate_user_api_token( self, request: GenerateUserAPITokenRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> GenerateUserAPITokenResponse: return self.execute_unary( request=request, method=MethodInfo( name="GenerateUserAPIToken", service_name="soulfire.v1.UserService", input=GenerateUserAPITokenRequest, output=GenerateUserAPITokenResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def list_user_plugin_permission_grants( self, request: ListUserPluginPermissionGrantsRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> ListUserPluginPermissionGrantsResponse: return self.execute_unary( request=request, method=MethodInfo( name="ListUserPluginPermissionGrants", service_name="soulfire.v1.UserService", input=ListUserPluginPermissionGrantsRequest, output=ListUserPluginPermissionGrantsResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def set_user_plugin_permission_grant( self, request: SetUserPluginPermissionGrantRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> UserPluginPermissionGrant: return self.execute_unary( request=request, method=MethodInfo( name="SetUserPluginPermissionGrant", service_name="soulfire.v1.UserService", input=SetUserPluginPermissionGrantRequest, output=UserPluginPermissionGrant, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )
[docs] def delete_user_plugin_permission_grant( self, request: DeleteUserPluginPermissionGrantRequest, *, headers: Headers | Mapping[str, str] | None = None, timeout_ms: int | None = None, ) -> DeleteUserPluginPermissionGrantResponse: return self.execute_unary( request=request, method=MethodInfo( name="DeleteUserPluginPermissionGrant", service_name="soulfire.v1.UserService", input=DeleteUserPluginPermissionGrantRequest, output=DeleteUserPluginPermissionGrantResponse, idempotency_level=IdempotencyLevel.UNKNOWN, ), headers=headers, timeout_ms=timeout_ms, )