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

import typing

from .. import core
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.activity_log_response import ActivityLogResponse
from ..types.recording_info_response import RecordingInfoResponse
from ..types.session_chat_history_response import SessionChatHistoryResponse
from ..types.session_list_response import SessionListResponse
from ..types.session_participants_response import SessionParticipantsResponse
from ..types.session_response import SessionResponse
from ..types.speakers_response import SpeakersResponse
from ..types.transcript_segment import TranscriptSegment
from ..types.video_metadata_response import VideoMetadataResponse
from ..types.video_quality_config import VideoQualityConfig
from .raw_client import AsyncRawMeetingBuddyClient, RawMeetingBuddyClient

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


class MeetingBuddyClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawMeetingBuddyClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawMeetingBuddyClient
        """
        return self._raw_client

    def list_meeting_buddy_sessions(
        self,
        *,
        status: typing.Optional[str] = None,
        search: typing.Optional[str] = None,
        start_date: typing.Optional[str] = None,
        end_date: typing.Optional[str] = None,
        page: typing.Optional[int] = None,
        page_size: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SessionListResponse:
        """
        List all Meeting Buddy bot sessions for the authenticated user's organization.

            **Filtering Options:**
            - `status`: Filter by session status (initializing, joining, waiting, active, recording, leaving, completed, failed)
            - `start_date`: Filter sessions created after this date (ISO 8601 format)
            - `end_date`: Filter sessions created before this date (ISO 8601 format)

            **Pagination:**
            - `page`: Page number (default: 1)
            - `page_size`: Items per page (default: 20, max: 100)

            **Authentication:** Requires valid JWT token. User must belong to an organization.

            **Returns:** Paginated list of sessions with total count and page metadata.

        Parameters
        ----------
        status : typing.Optional[str]
            Filter by status

        search : typing.Optional[str]
            Search across meeting link, bot name, session ID, and platform

        start_date : typing.Optional[str]
            Filter by start date (ISO format)

        end_date : typing.Optional[str]
            Filter by end date (ISO format)

        page : typing.Optional[int]
            Page number

        page_size : typing.Optional[int]
            Items per page

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

        Returns
        -------
        SessionListResponse
            Sessions retrieved successfully

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.list_meeting_buddy_sessions()
        """
        _response = self._raw_client.list_meeting_buddy_sessions(
            status=status,
            search=search,
            start_date=start_date,
            end_date=end_date,
            page=page,
            page_size=page_size,
            request_options=request_options,
        )
        return _response.data

    def create_meeting_buddy_session(
        self,
        *,
        meeting_link: str,
        bot_name: typing.Optional[str] = OMIT,
        transcription_enabled: typing.Optional[bool] = OMIT,
        transcription_language: typing.Optional[str] = OMIT,
        debug_mode: typing.Optional[bool] = OMIT,
        recording_mode: typing.Optional[str] = OMIT,
        video_quality: typing.Optional[VideoQualityConfig] = OMIT,
        participation_mode: typing.Optional[str] = OMIT,
        voice_profile_id: typing.Optional[str] = OMIT,
        voice_agent_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
        visibility: typing.Optional[str] = OMIT,
        shared_department_ids: typing.Optional[typing.Sequence[str]] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SessionResponse:
        """
        Start a new Meeting Buddy bot to join and record a meeting.

            The bot joins the meeting asynchronously in the background. The API returns immediately
            with session details. Session status transitions: initializing → joining → waiting → active → completed.

            **Configuration Options:**
            - `meeting_link`: HTTPS URL to the meeting (Teams, Zoom, etc.)
            - `bot_name`: Display name for the bot (optional, defaults to "Meeting Buddy")
            - `transcription_enabled`: Enable real-time transcription (default: true)
            - `transcription_language`: Language code for transcription (default: "en")

            **Authentication:** Requires valid JWT token. User must belong to an organization.

            **Rate Limits:** Standard rate limits apply per organization.

        Parameters
        ----------
        meeting_link : str
            Meeting URL to join

        bot_name : typing.Optional[str]
            Display name for the bot

        transcription_enabled : typing.Optional[bool]
            Enable real-time transcription

        transcription_language : typing.Optional[str]
            Language code for transcription

        debug_mode : typing.Optional[bool]
            Enable visual debugging (non-headless browser)

        recording_mode : typing.Optional[str]
            Recording mode: audio_only or audio_video

        video_quality : typing.Optional[VideoQualityConfig]
            Video quality settings (only used when recording_mode=audio_video)

        participation_mode : typing.Optional[str]
            How the AI participates: 'listener' (transcribe only) or 'participant' (active voice agent)

        voice_profile_id : typing.Optional[str]
            Voice profile ID (mbvp_ prefix) to use when participation_mode='participant'

        voice_agent_config : typing.Optional[typing.Dict[str, typing.Any]]
            Voice agent config overrides. Only used when participation_mode='participant'.

        visibility : typing.Optional[str]
            Session visibility: private, participants, department, or organization

        shared_department_ids : typing.Optional[typing.Sequence[str]]
            Department IDs for department-level sharing (used when visibility='department')

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

        Returns
        -------
        SessionResponse
            Session created successfully

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.create_meeting_buddy_session(
            meeting_link="meeting_link",
        )
        """
        _response = self._raw_client.create_meeting_buddy_session(
            meeting_link=meeting_link,
            bot_name=bot_name,
            transcription_enabled=transcription_enabled,
            transcription_language=transcription_language,
            debug_mode=debug_mode,
            recording_mode=recording_mode,
            video_quality=video_quality,
            participation_mode=participation_mode,
            voice_profile_id=voice_profile_id,
            voice_agent_config=voice_agent_config,
            visibility=visibility,
            shared_department_ids=shared_department_ids,
            request_options=request_options,
        )
        return _response.data

    def get_meeting_buddy_session(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionResponse:
        """
        Get detailed information about a specific Meeting Buddy bot session.

            **Returns:**
            - Full session profile including status, timestamps, and statistics
            - Real-time statistics for active sessions (duration, participant count, etc.)
            - Final recording and transcription information for completed sessions

            **Authentication:** Requires valid JWT token. User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionResponse
            Session details retrieved successfully

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_meeting_buddy_session(
            session_id="session_id",
        )
        """
        _response = self._raw_client.get_meeting_buddy_session(session_id, request_options=request_options)
        return _response.data

    def stop_meeting_buddy_session(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionResponse:
        """
        Stop a running Meeting Buddy bot session gracefully.

            **Behavior:**
            - Bot leaves the meeting gracefully
            - All pending transcriptions are saved
            - Recording metadata is finalized
            - Session status updated to "completed"
            - Already-stopped sessions return current status without error

            **Authentication:** Requires valid JWT token. User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

            **Note:** This operation is idempotent. Calling it multiple times on the same session
            will not cause errors.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionResponse
            Session stopped successfully

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.stop_meeting_buddy_session(
            session_id="session_id",
        )
        """
        _response = self._raw_client.stop_meeting_buddy_session(session_id, request_options=request_options)
        return _response.data

    def stop_meeting_buddy_session_post(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionResponse:
        """
        POST alias for DELETE /sessions/{session_id}. Stops a running session gracefully.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionResponse
            Session stopped successfully

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.stop_meeting_buddy_session_post(
            session_id="session_id",
        )
        """
        _response = self._raw_client.stop_meeting_buddy_session_post(session_id, request_options=request_options)
        return _response.data

    def get_meeting_buddy_transcripts(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[TranscriptSegment]:
        """
        Get transcription segments for a Meeting Buddy session.

            **Returns:**
            - All transcript segments ordered by start_time
            - Empty list if transcription is disabled
            - Empty list if no transcripts available yet (session still initializing)
            - Partial results if session is still active

            **Transcript Segments Include:**
            - Text content
            - Confidence score (0.0 to 1.0)
            - Start and end timestamps (seconds from session start)
            - Speaker identification (if available)
            - Language code

            **Authentication:** Requires valid JWT token. User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        typing.List[TranscriptSegment]
            Transcripts retrieved successfully

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_meeting_buddy_transcripts(
            session_id="session_id",
        )
        """
        _response = self._raw_client.get_meeting_buddy_transcripts(session_id, request_options=request_options)
        return _response.data

    def put_speaker_labels(
        self, session_id: str, *, labels: typing.Dict[str, str], request_options: typing.Optional[RequestOptions] = None
    ) -> SessionResponse:
        """
        Assign or update display names for numbered speakers in a session.

        Parameters
        ----------
        session_id : str

        labels : typing.Dict[str, str]
            Map speaker keys to names: {"0": "Phillip"}

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

        Returns
        -------
        SessionResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.put_speaker_labels(
            session_id="session_id",
            labels={"key": "value"},
        )
        """
        _response = self._raw_client.put_speaker_labels(session_id, labels=labels, request_options=request_options)
        return _response.data

    def get_session_speakers(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SpeakersResponse:
        """
        List distinct speakers in a session with segment counts and sample text.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SpeakersResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_session_speakers(
            session_id="session_id",
        )
        """
        _response = self._raw_client.get_session_speakers(session_id, request_options=request_options)
        return _response.data

    def download_meeting_buddy_recording(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Any:
        """
        Download the audio recording (WAV) for a completed Meeting Buddy session.

            **Requirements:**
            - Session must belong to the authenticated user's organization
            - Session must have a recording available
              (check `has_recording` on session response)

            **Response:**
            - Returns the WAV file as a binary download
            - Content-Type: audio/wav
            - Content-Disposition: attachment with filename

            **Authentication:** Requires valid JWT token or API key.
            User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        typing.Any
            Recording file download

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.download_meeting_buddy_recording(
            session_id="session_id",
        )
        """
        _response = self._raw_client.download_meeting_buddy_recording(session_id, request_options=request_options)
        return _response.data

    def delete_meeting_buddy_session_permanent(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Permanently delete a Meeting Buddy session from the database.

            **Warning:** This action is irreversible. The session and all associated data
            (transcripts, metadata) will be permanently removed.

            **Authentication:** Requires valid JWT token. User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        None

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.delete_meeting_buddy_session_permanent(
            session_id="session_id",
        )
        """
        _response = self._raw_client.delete_meeting_buddy_session_permanent(session_id, request_options=request_options)
        return _response.data

    def get_meeting_buddy_activity_log(
        self,
        session_id: str,
        *,
        limit: typing.Optional[int] = None,
        offset: typing.Optional[int] = None,
        category: typing.Optional[str] = None,
        severity: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ActivityLogResponse:
        """
        Returns a chronological activity log for a session, showing every lifecycle event, status change, error, and more.

        Parameters
        ----------
        session_id : str

        limit : typing.Optional[int]
            Max entries to return

        offset : typing.Optional[int]
            Number of entries to skip

        category : typing.Optional[str]
            Filter by event category

        severity : typing.Optional[str]
            Filter by severity

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

        Returns
        -------
        ActivityLogResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_meeting_buddy_activity_log(
            session_id="session_id",
        )
        """
        _response = self._raw_client.get_meeting_buddy_activity_log(
            session_id,
            limit=limit,
            offset=offset,
            category=category,
            severity=severity,
            request_options=request_options,
        )
        return _response.data

    def chat_with_meeting_session(
        self,
        session_id: str,
        *,
        message: str,
        thread_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.Any:
        """
        Ask questions about a completed meeting session. Returns a streaming SSE response with the AI's answer.

        Parameters
        ----------
        session_id : str

        message : str
            Chat message

        thread_id : typing.Optional[str]
            Existing chat thread ID

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

        Returns
        -------
        typing.Any
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.chat_with_meeting_session(
            session_id="session_id",
            message="message",
        )
        """
        _response = self._raw_client.chat_with_meeting_session(
            session_id, message=message, thread_id=thread_id, request_options=request_options
        )
        return _response.data

    def get_meeting_buddy_chat_history(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionChatHistoryResponse:
        """
        Returns the full chat history for a meeting session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionChatHistoryResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_meeting_buddy_chat_history(
            session_id="session_id",
        )
        """
        _response = self._raw_client.get_meeting_buddy_chat_history(session_id, request_options=request_options)
        return _response.data

    def upload_recording_for_transcription(
        self,
        *,
        file: core.File,
        title: typing.Optional[str] = OMIT,
        meeting_date: typing.Optional[str] = OMIT,
        participants: typing.Optional[str] = OMIT,
        language: typing.Optional[str] = OMIT,
        bot_name: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.Dict[str, typing.Any]:
        """
        Upload an audio or video file for offline transcription without a bot.

        Accepted audio formats: WAV, MP3, M4A, FLAC, OGG. Max size: 500 MB.
        Accepted video formats: MP4, WEBM, MOV, MKV. Max size: 2 GB.
        Creates a session with source='upload' and triggers background transcription.

        Parameters
        ----------
        file : core.File
            See core.File for more documentation

        title : typing.Optional[str]
            Meeting title (defaults to filename)

        meeting_date : typing.Optional[str]
            When the meeting took place (ISO datetime string)

        participants : typing.Optional[str]
            Comma-separated list of participant names

        language : typing.Optional[str]
            Language code for transcription

        bot_name : typing.Optional[str]
            Display name for the upload session

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.upload_recording_for_transcription()
        """
        _response = self._raw_client.upload_recording_for_transcription(
            file=file,
            title=title,
            meeting_date=meeting_date,
            participants=participants,
            language=language,
            bot_name=bot_name,
            request_options=request_options,
        )
        return _response.data

    def get_upload_status(
        self, upload_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Check the processing status of an uploaded audio file.

        Parameters
        ----------
        upload_id : str

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_upload_status(
            upload_id="upload_id",
        )
        """
        _response = self._raw_client.get_upload_status(upload_id, request_options=request_options)
        return _response.data

    def set_session_language(
        self, session_id: str, *, language: str, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Set or change the transcription language for a session.

        Parameters
        ----------
        session_id : str

        language : str
            Language code for transcription (e.g., 'en', 'es', 'de')

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.set_session_language(
            session_id="session_id",
            language="language",
        )
        """
        _response = self._raw_client.set_session_language(
            session_id, language=language, request_options=request_options
        )
        return _response.data

    def list_meeting_buddy_share_links(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[typing.Dict[str, typing.Any]]:
        """
        List all share links for a meeting session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        typing.List[typing.Dict[str, typing.Any]]
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.list_meeting_buddy_share_links(
            session_id="session_id",
        )
        """
        _response = self._raw_client.list_meeting_buddy_share_links(session_id, request_options=request_options)
        return _response.data

    def revoke_meeting_buddy_share_link(
        self, token_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Revoke a share link by its ID.

        Parameters
        ----------
        token_id : str

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.revoke_meeting_buddy_share_link(
            token_id="token_id",
        )
        """
        _response = self._raw_client.revoke_meeting_buddy_share_link(token_id, request_options=request_options)
        return _response.data

    def retry_session_transcription(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Re-transcribe a session's saved recording using the batch API. Returns immediately; poll the session detail to track progress via transcription_status.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.retry_session_transcription(
            session_id="session_id",
        )
        """
        _response = self._raw_client.retry_session_transcription(session_id, request_options=request_options)
        return _response.data

    def get_session_participants(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionParticipantsResponse:
        """
        Get participant join/leave timeline for a session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionParticipantsResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_session_participants(
            session_id="session_id",
        )
        """
        _response = self._raw_client.get_session_participants(session_id, request_options=request_options)
        return _response.data

    def get_recording_info(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> RecordingInfoResponse:
        """
        Get recording metadata for a session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        RecordingInfoResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_recording_info(
            session_id="session_id",
        )
        """
        _response = self._raw_client.get_recording_info(session_id, request_options=request_options)
        return _response.data

    def get_session_video(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> VideoMetadataResponse:
        """
        Get video recording URL and metadata for a session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        VideoMetadataResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.get_session_video(
            session_id="session_id",
        )
        """
        _response = self._raw_client.get_session_video(session_id, request_options=request_options)
        return _response.data

    def export_session_transcripts(
        self,
        session_id: str,
        *,
        format: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.Any:
        """
        Export session transcripts as a downloadable file.

        Parameters
        ----------
        session_id : str

        format : typing.Optional[str]
            Export format: txt, srt, or json

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

        Returns
        -------
        typing.Any
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy.export_session_transcripts(
            session_id="session_id",
        )
        """
        _response = self._raw_client.export_session_transcripts(
            session_id, format=format, request_options=request_options
        )
        return _response.data


class AsyncMeetingBuddyClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawMeetingBuddyClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawMeetingBuddyClient
        """
        return self._raw_client

    async def list_meeting_buddy_sessions(
        self,
        *,
        status: typing.Optional[str] = None,
        search: typing.Optional[str] = None,
        start_date: typing.Optional[str] = None,
        end_date: typing.Optional[str] = None,
        page: typing.Optional[int] = None,
        page_size: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SessionListResponse:
        """
        List all Meeting Buddy bot sessions for the authenticated user's organization.

            **Filtering Options:**
            - `status`: Filter by session status (initializing, joining, waiting, active, recording, leaving, completed, failed)
            - `start_date`: Filter sessions created after this date (ISO 8601 format)
            - `end_date`: Filter sessions created before this date (ISO 8601 format)

            **Pagination:**
            - `page`: Page number (default: 1)
            - `page_size`: Items per page (default: 20, max: 100)

            **Authentication:** Requires valid JWT token. User must belong to an organization.

            **Returns:** Paginated list of sessions with total count and page metadata.

        Parameters
        ----------
        status : typing.Optional[str]
            Filter by status

        search : typing.Optional[str]
            Search across meeting link, bot name, session ID, and platform

        start_date : typing.Optional[str]
            Filter by start date (ISO format)

        end_date : typing.Optional[str]
            Filter by end date (ISO format)

        page : typing.Optional[int]
            Page number

        page_size : typing.Optional[int]
            Items per page

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

        Returns
        -------
        SessionListResponse
            Sessions retrieved successfully

        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.list_meeting_buddy_sessions()


        asyncio.run(main())
        """
        _response = await self._raw_client.list_meeting_buddy_sessions(
            status=status,
            search=search,
            start_date=start_date,
            end_date=end_date,
            page=page,
            page_size=page_size,
            request_options=request_options,
        )
        return _response.data

    async def create_meeting_buddy_session(
        self,
        *,
        meeting_link: str,
        bot_name: typing.Optional[str] = OMIT,
        transcription_enabled: typing.Optional[bool] = OMIT,
        transcription_language: typing.Optional[str] = OMIT,
        debug_mode: typing.Optional[bool] = OMIT,
        recording_mode: typing.Optional[str] = OMIT,
        video_quality: typing.Optional[VideoQualityConfig] = OMIT,
        participation_mode: typing.Optional[str] = OMIT,
        voice_profile_id: typing.Optional[str] = OMIT,
        voice_agent_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
        visibility: typing.Optional[str] = OMIT,
        shared_department_ids: typing.Optional[typing.Sequence[str]] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SessionResponse:
        """
        Start a new Meeting Buddy bot to join and record a meeting.

            The bot joins the meeting asynchronously in the background. The API returns immediately
            with session details. Session status transitions: initializing → joining → waiting → active → completed.

            **Configuration Options:**
            - `meeting_link`: HTTPS URL to the meeting (Teams, Zoom, etc.)
            - `bot_name`: Display name for the bot (optional, defaults to "Meeting Buddy")
            - `transcription_enabled`: Enable real-time transcription (default: true)
            - `transcription_language`: Language code for transcription (default: "en")

            **Authentication:** Requires valid JWT token. User must belong to an organization.

            **Rate Limits:** Standard rate limits apply per organization.

        Parameters
        ----------
        meeting_link : str
            Meeting URL to join

        bot_name : typing.Optional[str]
            Display name for the bot

        transcription_enabled : typing.Optional[bool]
            Enable real-time transcription

        transcription_language : typing.Optional[str]
            Language code for transcription

        debug_mode : typing.Optional[bool]
            Enable visual debugging (non-headless browser)

        recording_mode : typing.Optional[str]
            Recording mode: audio_only or audio_video

        video_quality : typing.Optional[VideoQualityConfig]
            Video quality settings (only used when recording_mode=audio_video)

        participation_mode : typing.Optional[str]
            How the AI participates: 'listener' (transcribe only) or 'participant' (active voice agent)

        voice_profile_id : typing.Optional[str]
            Voice profile ID (mbvp_ prefix) to use when participation_mode='participant'

        voice_agent_config : typing.Optional[typing.Dict[str, typing.Any]]
            Voice agent config overrides. Only used when participation_mode='participant'.

        visibility : typing.Optional[str]
            Session visibility: private, participants, department, or organization

        shared_department_ids : typing.Optional[typing.Sequence[str]]
            Department IDs for department-level sharing (used when visibility='department')

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

        Returns
        -------
        SessionResponse
            Session created successfully

        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.create_meeting_buddy_session(
                meeting_link="meeting_link",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_meeting_buddy_session(
            meeting_link=meeting_link,
            bot_name=bot_name,
            transcription_enabled=transcription_enabled,
            transcription_language=transcription_language,
            debug_mode=debug_mode,
            recording_mode=recording_mode,
            video_quality=video_quality,
            participation_mode=participation_mode,
            voice_profile_id=voice_profile_id,
            voice_agent_config=voice_agent_config,
            visibility=visibility,
            shared_department_ids=shared_department_ids,
            request_options=request_options,
        )
        return _response.data

    async def get_meeting_buddy_session(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionResponse:
        """
        Get detailed information about a specific Meeting Buddy bot session.

            **Returns:**
            - Full session profile including status, timestamps, and statistics
            - Real-time statistics for active sessions (duration, participant count, etc.)
            - Final recording and transcription information for completed sessions

            **Authentication:** Requires valid JWT token. User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionResponse
            Session details retrieved successfully

        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.get_meeting_buddy_session(
                session_id="session_id",
            )


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

    async def stop_meeting_buddy_session(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionResponse:
        """
        Stop a running Meeting Buddy bot session gracefully.

            **Behavior:**
            - Bot leaves the meeting gracefully
            - All pending transcriptions are saved
            - Recording metadata is finalized
            - Session status updated to "completed"
            - Already-stopped sessions return current status without error

            **Authentication:** Requires valid JWT token. User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

            **Note:** This operation is idempotent. Calling it multiple times on the same session
            will not cause errors.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionResponse
            Session stopped successfully

        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.stop_meeting_buddy_session(
                session_id="session_id",
            )


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

    async def stop_meeting_buddy_session_post(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionResponse:
        """
        POST alias for DELETE /sessions/{session_id}. Stops a running session gracefully.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionResponse
            Session stopped successfully

        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.stop_meeting_buddy_session_post(
                session_id="session_id",
            )


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

    async def get_meeting_buddy_transcripts(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[TranscriptSegment]:
        """
        Get transcription segments for a Meeting Buddy session.

            **Returns:**
            - All transcript segments ordered by start_time
            - Empty list if transcription is disabled
            - Empty list if no transcripts available yet (session still initializing)
            - Partial results if session is still active

            **Transcript Segments Include:**
            - Text content
            - Confidence score (0.0 to 1.0)
            - Start and end timestamps (seconds from session start)
            - Speaker identification (if available)
            - Language code

            **Authentication:** Requires valid JWT token. User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        typing.List[TranscriptSegment]
            Transcripts retrieved successfully

        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.get_meeting_buddy_transcripts(
                session_id="session_id",
            )


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

    async def put_speaker_labels(
        self, session_id: str, *, labels: typing.Dict[str, str], request_options: typing.Optional[RequestOptions] = None
    ) -> SessionResponse:
        """
        Assign or update display names for numbered speakers in a session.

        Parameters
        ----------
        session_id : str

        labels : typing.Dict[str, str]
            Map speaker keys to names: {"0": "Phillip"}

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

        Returns
        -------
        SessionResponse
            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.put_speaker_labels(
                session_id="session_id",
                labels={"key": "value"},
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.put_speaker_labels(
            session_id, labels=labels, request_options=request_options
        )
        return _response.data

    async def get_session_speakers(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SpeakersResponse:
        """
        List distinct speakers in a session with segment counts and sample text.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SpeakersResponse
            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.get_session_speakers(
                session_id="session_id",
            )


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

    async def download_meeting_buddy_recording(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Any:
        """
        Download the audio recording (WAV) for a completed Meeting Buddy session.

            **Requirements:**
            - Session must belong to the authenticated user's organization
            - Session must have a recording available
              (check `has_recording` on session response)

            **Response:**
            - Returns the WAV file as a binary download
            - Content-Type: audio/wav
            - Content-Disposition: attachment with filename

            **Authentication:** Requires valid JWT token or API key.
            User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        typing.Any
            Recording file download

        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.download_meeting_buddy_recording(
                session_id="session_id",
            )


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

    async def delete_meeting_buddy_session_permanent(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Permanently delete a Meeting Buddy session from the database.

            **Warning:** This action is irreversible. The session and all associated data
            (transcripts, metadata) will be permanently removed.

            **Authentication:** Requires valid JWT token. User must have access to the session's organization.

            **Session ID Format:** Must start with `mbsess_` prefix.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        None

        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.delete_meeting_buddy_session_permanent(
                session_id="session_id",
            )


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

    async def get_meeting_buddy_activity_log(
        self,
        session_id: str,
        *,
        limit: typing.Optional[int] = None,
        offset: typing.Optional[int] = None,
        category: typing.Optional[str] = None,
        severity: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ActivityLogResponse:
        """
        Returns a chronological activity log for a session, showing every lifecycle event, status change, error, and more.

        Parameters
        ----------
        session_id : str

        limit : typing.Optional[int]
            Max entries to return

        offset : typing.Optional[int]
            Number of entries to skip

        category : typing.Optional[str]
            Filter by event category

        severity : typing.Optional[str]
            Filter by severity

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

        Returns
        -------
        ActivityLogResponse
            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.get_meeting_buddy_activity_log(
                session_id="session_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_meeting_buddy_activity_log(
            session_id,
            limit=limit,
            offset=offset,
            category=category,
            severity=severity,
            request_options=request_options,
        )
        return _response.data

    async def chat_with_meeting_session(
        self,
        session_id: str,
        *,
        message: str,
        thread_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.Any:
        """
        Ask questions about a completed meeting session. Returns a streaming SSE response with the AI's answer.

        Parameters
        ----------
        session_id : str

        message : str
            Chat message

        thread_id : typing.Optional[str]
            Existing chat thread ID

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

        Returns
        -------
        typing.Any
            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.chat_with_meeting_session(
                session_id="session_id",
                message="message",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.chat_with_meeting_session(
            session_id, message=message, thread_id=thread_id, request_options=request_options
        )
        return _response.data

    async def get_meeting_buddy_chat_history(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionChatHistoryResponse:
        """
        Returns the full chat history for a meeting session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionChatHistoryResponse
            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.get_meeting_buddy_chat_history(
                session_id="session_id",
            )


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

    async def upload_recording_for_transcription(
        self,
        *,
        file: core.File,
        title: typing.Optional[str] = OMIT,
        meeting_date: typing.Optional[str] = OMIT,
        participants: typing.Optional[str] = OMIT,
        language: typing.Optional[str] = OMIT,
        bot_name: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.Dict[str, typing.Any]:
        """
        Upload an audio or video file for offline transcription without a bot.

        Accepted audio formats: WAV, MP3, M4A, FLAC, OGG. Max size: 500 MB.
        Accepted video formats: MP4, WEBM, MOV, MKV. Max size: 2 GB.
        Creates a session with source='upload' and triggers background transcription.

        Parameters
        ----------
        file : core.File
            See core.File for more documentation

        title : typing.Optional[str]
            Meeting title (defaults to filename)

        meeting_date : typing.Optional[str]
            When the meeting took place (ISO datetime string)

        participants : typing.Optional[str]
            Comma-separated list of participant names

        language : typing.Optional[str]
            Language code for transcription

        bot_name : typing.Optional[str]
            Display name for the upload session

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            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.upload_recording_for_transcription()


        asyncio.run(main())
        """
        _response = await self._raw_client.upload_recording_for_transcription(
            file=file,
            title=title,
            meeting_date=meeting_date,
            participants=participants,
            language=language,
            bot_name=bot_name,
            request_options=request_options,
        )
        return _response.data

    async def get_upload_status(
        self, upload_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Check the processing status of an uploaded audio file.

        Parameters
        ----------
        upload_id : str

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            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.get_upload_status(
                upload_id="upload_id",
            )


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

    async def set_session_language(
        self, session_id: str, *, language: str, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Set or change the transcription language for a session.

        Parameters
        ----------
        session_id : str

        language : str
            Language code for transcription (e.g., 'en', 'es', 'de')

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            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.set_session_language(
                session_id="session_id",
                language="language",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.set_session_language(
            session_id, language=language, request_options=request_options
        )
        return _response.data

    async def list_meeting_buddy_share_links(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[typing.Dict[str, typing.Any]]:
        """
        List all share links for a meeting session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        typing.List[typing.Dict[str, typing.Any]]
            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.list_meeting_buddy_share_links(
                session_id="session_id",
            )


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

    async def revoke_meeting_buddy_share_link(
        self, token_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Revoke a share link by its ID.

        Parameters
        ----------
        token_id : str

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            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.revoke_meeting_buddy_share_link(
                token_id="token_id",
            )


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

    async def retry_session_transcription(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Re-transcribe a session's saved recording using the batch API. Returns immediately; poll the session detail to track progress via transcription_status.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        typing.Dict[str, typing.Any]
            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.retry_session_transcription(
                session_id="session_id",
            )


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

    async def get_session_participants(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> SessionParticipantsResponse:
        """
        Get participant join/leave timeline for a session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        SessionParticipantsResponse
            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.get_session_participants(
                session_id="session_id",
            )


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

    async def get_recording_info(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> RecordingInfoResponse:
        """
        Get recording metadata for a session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        RecordingInfoResponse
            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.get_recording_info(
                session_id="session_id",
            )


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

    async def get_session_video(
        self, session_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> VideoMetadataResponse:
        """
        Get video recording URL and metadata for a session.

        Parameters
        ----------
        session_id : str

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

        Returns
        -------
        VideoMetadataResponse
            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.get_session_video(
                session_id="session_id",
            )


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

    async def export_session_transcripts(
        self,
        session_id: str,
        *,
        format: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.Any:
        """
        Export session transcripts as a downloadable file.

        Parameters
        ----------
        session_id : str

        format : typing.Optional[str]
            Export format: txt, srt, or json

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

        Returns
        -------
        typing.Any
            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.export_session_transcripts(
                session_id="session_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.export_session_transcripts(
            session_id, format=format, request_options=request_options
        )
        return _response.data
