| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578 |
- # -*- coding: utf-8 -*-
- # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
- # source: chatto/api/v1/notifications.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.notifications_pb2 as chatto_dot_api_dot_v1_dot_notifications__pb2
- class NotificationService(Protocol):
- async def list_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def get_notification(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def batch_get_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def list_room_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def list_room_notification_counts(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def has_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def dismiss_notification(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- async def dismiss_all_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- class NotificationServiceASGIApplication(ConnectASGIApplication[NotificationService]):
- def __init__(self, service: NotificationService | AsyncGenerator[NotificationService], *, 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.NotificationService/ListNotifications": Endpoint.unary(
- method=MethodInfo(
- name="ListNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.list_notifications,
- ),
- "/chatto.api.v1.NotificationService/GetNotification": Endpoint.unary(
- method=MethodInfo(
- name="GetNotification",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.get_notification,
- ),
- "/chatto.api.v1.NotificationService/BatchGetNotifications": Endpoint.unary(
- method=MethodInfo(
- name="BatchGetNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.batch_get_notifications,
- ),
- "/chatto.api.v1.NotificationService/ListRoomNotifications": Endpoint.unary(
- method=MethodInfo(
- name="ListRoomNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.list_room_notifications,
- ),
- "/chatto.api.v1.NotificationService/ListRoomNotificationCounts": Endpoint.unary(
- method=MethodInfo(
- name="ListRoomNotificationCounts",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.list_room_notification_counts,
- ),
- "/chatto.api.v1.NotificationService/HasNotifications": Endpoint.unary(
- method=MethodInfo(
- name="HasNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.has_notifications,
- ),
- "/chatto.api.v1.NotificationService/DismissNotification": Endpoint.unary(
- method=MethodInfo(
- name="DismissNotification",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.dismiss_notification,
- ),
- "/chatto.api.v1.NotificationService/DismissAllNotifications": Endpoint.unary(
- method=MethodInfo(
- name="DismissAllNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=svc.dismiss_all_notifications,
- ),
- },
- 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.NotificationService"
- class NotificationServiceClient(ConnectClient):
- async def list_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="ListNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def get_notification(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="GetNotification",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def batch_get_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="BatchGetNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def list_room_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="ListRoomNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def list_room_notification_counts(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="ListRoomNotificationCounts",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def has_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="HasNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def dismiss_notification(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DismissNotification",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- async def dismiss_all_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsResponse:
- return await self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DismissAllNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- class NotificationServiceSync(Protocol):
- def list_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def get_notification(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def batch_get_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def list_room_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def list_room_notification_counts(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def has_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def dismiss_notification(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- def dismiss_all_notifications(self, request: chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsResponse:
- raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
- class NotificationServiceWSGIApplication(ConnectWSGIApplication):
- def __init__(self, service: NotificationServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
- super().__init__(
- endpoints={
- "/chatto.api.v1.NotificationService/ListNotifications": EndpointSync.unary(
- method=MethodInfo(
- name="ListNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.list_notifications,
- ),
- "/chatto.api.v1.NotificationService/GetNotification": EndpointSync.unary(
- method=MethodInfo(
- name="GetNotification",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.get_notification,
- ),
- "/chatto.api.v1.NotificationService/BatchGetNotifications": EndpointSync.unary(
- method=MethodInfo(
- name="BatchGetNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.batch_get_notifications,
- ),
- "/chatto.api.v1.NotificationService/ListRoomNotifications": EndpointSync.unary(
- method=MethodInfo(
- name="ListRoomNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.list_room_notifications,
- ),
- "/chatto.api.v1.NotificationService/ListRoomNotificationCounts": EndpointSync.unary(
- method=MethodInfo(
- name="ListRoomNotificationCounts",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.list_room_notification_counts,
- ),
- "/chatto.api.v1.NotificationService/HasNotifications": EndpointSync.unary(
- method=MethodInfo(
- name="HasNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.has_notifications,
- ),
- "/chatto.api.v1.NotificationService/DismissNotification": EndpointSync.unary(
- method=MethodInfo(
- name="DismissNotification",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.dismiss_notification,
- ),
- "/chatto.api.v1.NotificationService/DismissAllNotifications": EndpointSync.unary(
- method=MethodInfo(
- name="DismissAllNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- function=service.dismiss_all_notifications,
- ),
- },
- 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.NotificationService"
- class NotificationServiceClientSync(ConnectClientSync):
- def list_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="ListNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def get_notification(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="GetNotification",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.GetNotificationResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def batch_get_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="BatchGetNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.BatchGetNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def list_room_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="ListRoomNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def list_room_notification_counts(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="ListRoomNotificationCounts",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.ListRoomNotificationCountsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def has_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="HasNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.HasNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def dismiss_notification(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DismissNotification",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissNotificationResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
- def dismiss_all_notifications(
- self,
- request: chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsRequest,
- *,
- headers: Headers | Mapping[str, str] | None = None,
- timeout_ms: int | None = None,
- ) -> chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsResponse:
- return self.execute_unary(
- request=request,
- method=MethodInfo(
- name="DismissAllNotifications",
- service_name="chatto.api.v1.NotificationService",
- input=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsRequest,
- output=chatto_dot_api_dot_v1_dot_notifications__pb2.DismissAllNotificationsResponse,
- idempotency_level=IdempotencyLevel.UNKNOWN,
- ),
- headers=headers,
- timeout_ms=timeout_ms,
- )
|