# This file was auto-generated by Fern from our API Definition.

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.public_chat_history_response import PublicChatHistoryResponse
from ..types.public_chat_response import PublicChatResponse
from ..types.public_chat_status_response import PublicChatStatusResponse
from ..types.public_transcript_response import PublicTranscriptResponse
from ..types.public_transcript_segment import PublicTranscriptSegment
from .raw_client import AsyncRawMeetingBuddyPublicClient, RawMeetingBuddyPublicClient

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class MeetingBuddyPublicClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawMeetingBuddyPublicClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawMeetingBuddyPublicClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawMeetingBuddyPublicClient
        """
        return self._raw_client

    def get_public_transcript(
        self, token: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PublicTranscriptResponse:
        """
        View a shared meeting transcript. No authentication required.

        Parameters
        ----------
        token : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PublicTranscriptResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_public.get_public_transcript(
            token="token",
        )
        """
        _response = self._raw_client.get_public_transcript(token, request_options=request_options)
        return _response.data

    def get_public_transcript_segments(
        self, token: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[PublicTranscriptSegment]:
        """
        Get raw transcript segments for a shared meeting. No authentication required.

        Parameters
        ----------
        token : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[PublicTranscriptSegment]
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_public.get_public_transcript_segments(
            token="token",
        )
        """
        _response = self._raw_client.get_public_transcript_segments(token, request_options=request_options)
        return _response.data

    def send_public_chat_message(
        self, token: str, *, message: str, request_options: typing.Optional[RequestOptions] = None
    ) -> PublicChatResponse:
        """
        Send a chat message about a shared meeting transcript.

        No authentication required. Rate limited per IP and per token.

        Parameters
        ----------
        token : str

        message : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PublicChatResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_public.send_public_chat_message(
            token="token",
            message="message",
        )
        """
        _response = self._raw_client.send_public_chat_message(token, message=message, request_options=request_options)
        return _response.data

    def get_public_chat_history(
        self, token: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PublicChatHistoryResponse:
        """
        Get chat history for a shared transcript. No authentication required.

        Parameters
        ----------
        token : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PublicChatHistoryResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_public.get_public_chat_history(
            token="token",
        )
        """
        _response = self._raw_client.get_public_chat_history(token, request_options=request_options)
        return _response.data

    def get_public_chat_status(
        self, token: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PublicChatStatusResponse:
        """
        Get chat status (remaining messages) for a shared transcript.

        No authentication required.

        Parameters
        ----------
        token : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PublicChatStatusResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_public.get_public_chat_status(
            token="token",
        )
        """
        _response = self._raw_client.get_public_chat_status(token, request_options=request_options)
        return _response.data


class AsyncMeetingBuddyPublicClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawMeetingBuddyPublicClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawMeetingBuddyPublicClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawMeetingBuddyPublicClient
        """
        return self._raw_client

    async def get_public_transcript(
        self, token: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PublicTranscriptResponse:
        """
        View a shared meeting transcript. No authentication required.

        Parameters
        ----------
        token : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PublicTranscriptResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.meeting_buddy_public.get_public_transcript(
                token="token",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_public_transcript(token, request_options=request_options)
        return _response.data

    async def get_public_transcript_segments(
        self, token: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[PublicTranscriptSegment]:
        """
        Get raw transcript segments for a shared meeting. No authentication required.

        Parameters
        ----------
        token : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[PublicTranscriptSegment]
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.meeting_buddy_public.get_public_transcript_segments(
                token="token",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_public_transcript_segments(token, request_options=request_options)
        return _response.data

    async def send_public_chat_message(
        self, token: str, *, message: str, request_options: typing.Optional[RequestOptions] = None
    ) -> PublicChatResponse:
        """
        Send a chat message about a shared meeting transcript.

        No authentication required. Rate limited per IP and per token.

        Parameters
        ----------
        token : str

        message : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PublicChatResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.meeting_buddy_public.send_public_chat_message(
                token="token",
                message="message",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.send_public_chat_message(
            token, message=message, request_options=request_options
        )
        return _response.data

    async def get_public_chat_history(
        self, token: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PublicChatHistoryResponse:
        """
        Get chat history for a shared transcript. No authentication required.

        Parameters
        ----------
        token : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PublicChatHistoryResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.meeting_buddy_public.get_public_chat_history(
                token="token",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_public_chat_history(token, request_options=request_options)
        return _response.data

    async def get_public_chat_status(
        self, token: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> PublicChatStatusResponse:
        """
        Get chat status (remaining messages) for a shared transcript.

        No authentication required.

        Parameters
        ----------
        token : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PublicChatStatusResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.meeting_buddy_public.get_public_chat_status(
                token="token",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_public_chat_status(token, request_options=request_options)
        return _response.data
