from sqlalchemy import orm
from couchers.context import CouchersContext
"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import collections.abc
import donations_pb2
import google.protobuf.empty_pb2
import grpc
import grpc.aio
import sys
import typing

if sys.version_info >= (3, 13):
    import typing as typing_extensions
else:
    import typing_extensions

_T = typing.TypeVar("_T")

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore[misc, type-arg]
    ...

GRPC_GENERATED_VERSION: str
GRPC_VERSION: str
class DonationsServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def InitiateDonation(
        self,
        request: donations_pb2.InitiateDonationReq,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[donations_pb2.InitiateDonationRes, collections.abc.Awaitable[donations_pb2.InitiateDonationRes]]:
        """Initiate a donation
        This will return a stripe checkout_session_id, that the frontend then needs to use with the Stripe SDK to launch
        the checkout session (basically directing the user to a Stripe operated page to enter in their card details to
        donate)
        """

    @abc.abstractmethod
    def GetDonationPortalLink(
        self,
        request: google.protobuf.empty_pb2.Empty,
        context: CouchersContext,
        session: orm.Session,
    ) -> typing.Union[donations_pb2.GetDonationPortalLinkRes, collections.abc.Awaitable[donations_pb2.GetDonationPortalLinkRes]]:
        """Gets a link to the Stripe subscription management portal"""

def add_DonationsServicer_to_server(servicer: DonationsServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
