# 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.intelligence_config_list_response import IntelligenceConfigListResponse
from ..types.intelligence_config_response import IntelligenceConfigResponse
from ..types.prompt_module import PromptModule
from .raw_client import AsyncRawMeetingBuddyIntelligenceConfigClient, RawMeetingBuddyIntelligenceConfigClient

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


class MeetingBuddyIntelligenceConfigClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawMeetingBuddyIntelligenceConfigClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawMeetingBuddyIntelligenceConfigClient
        """
        return self._raw_client

    def list_intelligence_configs(
        self, *, scope: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> IntelligenceConfigListResponse:
        """
        List intelligence configs. Use scope=org for org-level only, scope=user for user-level only.

        Parameters
        ----------
        scope : typing.Optional[str]

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

        Returns
        -------
        IntelligenceConfigListResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_intelligence_config.list_intelligence_configs()
        """
        _response = self._raw_client.list_intelligence_configs(scope=scope, request_options=request_options)
        return _response.data

    def create_intelligence_config(
        self,
        *,
        name: str,
        is_default: typing.Optional[bool] = OMIT,
        prompts: typing.Optional[typing.Sequence[PromptModule]] = OMIT,
        model_override: typing.Optional[str] = OMIT,
        output_sections: typing.Optional[typing.Sequence[str]] = OMIT,
        meeting_type_filter: typing.Optional[typing.Sequence[str]] = OMIT,
        auto_vector_store_id: typing.Optional[str] = OMIT,
        user_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> IntelligenceConfigResponse:
        """
        Create an intelligence config. Omit user_id for org-level config.

        Parameters
        ----------
        name : str

        is_default : typing.Optional[bool]

        prompts : typing.Optional[typing.Sequence[PromptModule]]

        model_override : typing.Optional[str]

        output_sections : typing.Optional[typing.Sequence[str]]

        meeting_type_filter : typing.Optional[typing.Sequence[str]]

        auto_vector_store_id : typing.Optional[str]

        user_id : typing.Optional[str]
            Set to create a user-level config. Omit for org-level.

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

        Returns
        -------
        IntelligenceConfigResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_intelligence_config.create_intelligence_config(
            name="name",
        )
        """
        _response = self._raw_client.create_intelligence_config(
            name=name,
            is_default=is_default,
            prompts=prompts,
            model_override=model_override,
            output_sections=output_sections,
            meeting_type_filter=meeting_type_filter,
            auto_vector_store_id=auto_vector_store_id,
            user_id=user_id,
            request_options=request_options,
        )
        return _response.data

    def delete_intelligence_config(
        self, config_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Soft-delete an intelligence config by ID.

        Parameters
        ----------
        config_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_intelligence_config.delete_intelligence_config(
            config_id="config_id",
        )
        """
        _response = self._raw_client.delete_intelligence_config(config_id, request_options=request_options)
        return _response.data

    def update_intelligence_config(
        self,
        config_id: str,
        *,
        name: typing.Optional[str] = OMIT,
        is_default: typing.Optional[bool] = OMIT,
        prompts: typing.Optional[typing.Sequence[PromptModule]] = OMIT,
        model_override: typing.Optional[str] = OMIT,
        output_sections: typing.Optional[typing.Sequence[str]] = OMIT,
        meeting_type_filter: typing.Optional[typing.Sequence[str]] = OMIT,
        auto_vector_store_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> IntelligenceConfigResponse:
        """
        Update an intelligence config by ID.

        Parameters
        ----------
        config_id : str

        name : typing.Optional[str]

        is_default : typing.Optional[bool]

        prompts : typing.Optional[typing.Sequence[PromptModule]]

        model_override : typing.Optional[str]

        output_sections : typing.Optional[typing.Sequence[str]]

        meeting_type_filter : typing.Optional[typing.Sequence[str]]

        auto_vector_store_id : typing.Optional[str]

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

        Returns
        -------
        IntelligenceConfigResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.meeting_buddy_intelligence_config.update_intelligence_config(
            config_id="config_id",
        )
        """
        _response = self._raw_client.update_intelligence_config(
            config_id,
            name=name,
            is_default=is_default,
            prompts=prompts,
            model_override=model_override,
            output_sections=output_sections,
            meeting_type_filter=meeting_type_filter,
            auto_vector_store_id=auto_vector_store_id,
            request_options=request_options,
        )
        return _response.data


class AsyncMeetingBuddyIntelligenceConfigClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawMeetingBuddyIntelligenceConfigClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawMeetingBuddyIntelligenceConfigClient
        """
        return self._raw_client

    async def list_intelligence_configs(
        self, *, scope: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> IntelligenceConfigListResponse:
        """
        List intelligence configs. Use scope=org for org-level only, scope=user for user-level only.

        Parameters
        ----------
        scope : typing.Optional[str]

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

        Returns
        -------
        IntelligenceConfigListResponse
            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_intelligence_config.list_intelligence_configs()


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

    async def create_intelligence_config(
        self,
        *,
        name: str,
        is_default: typing.Optional[bool] = OMIT,
        prompts: typing.Optional[typing.Sequence[PromptModule]] = OMIT,
        model_override: typing.Optional[str] = OMIT,
        output_sections: typing.Optional[typing.Sequence[str]] = OMIT,
        meeting_type_filter: typing.Optional[typing.Sequence[str]] = OMIT,
        auto_vector_store_id: typing.Optional[str] = OMIT,
        user_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> IntelligenceConfigResponse:
        """
        Create an intelligence config. Omit user_id for org-level config.

        Parameters
        ----------
        name : str

        is_default : typing.Optional[bool]

        prompts : typing.Optional[typing.Sequence[PromptModule]]

        model_override : typing.Optional[str]

        output_sections : typing.Optional[typing.Sequence[str]]

        meeting_type_filter : typing.Optional[typing.Sequence[str]]

        auto_vector_store_id : typing.Optional[str]

        user_id : typing.Optional[str]
            Set to create a user-level config. Omit for org-level.

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

        Returns
        -------
        IntelligenceConfigResponse
            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_intelligence_config.create_intelligence_config(
                name="name",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_intelligence_config(
            name=name,
            is_default=is_default,
            prompts=prompts,
            model_override=model_override,
            output_sections=output_sections,
            meeting_type_filter=meeting_type_filter,
            auto_vector_store_id=auto_vector_store_id,
            user_id=user_id,
            request_options=request_options,
        )
        return _response.data

    async def delete_intelligence_config(
        self, config_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Soft-delete an intelligence config by ID.

        Parameters
        ----------
        config_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_intelligence_config.delete_intelligence_config(
                config_id="config_id",
            )


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

    async def update_intelligence_config(
        self,
        config_id: str,
        *,
        name: typing.Optional[str] = OMIT,
        is_default: typing.Optional[bool] = OMIT,
        prompts: typing.Optional[typing.Sequence[PromptModule]] = OMIT,
        model_override: typing.Optional[str] = OMIT,
        output_sections: typing.Optional[typing.Sequence[str]] = OMIT,
        meeting_type_filter: typing.Optional[typing.Sequence[str]] = OMIT,
        auto_vector_store_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> IntelligenceConfigResponse:
        """
        Update an intelligence config by ID.

        Parameters
        ----------
        config_id : str

        name : typing.Optional[str]

        is_default : typing.Optional[bool]

        prompts : typing.Optional[typing.Sequence[PromptModule]]

        model_override : typing.Optional[str]

        output_sections : typing.Optional[typing.Sequence[str]]

        meeting_type_filter : typing.Optional[typing.Sequence[str]]

        auto_vector_store_id : typing.Optional[str]

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

        Returns
        -------
        IntelligenceConfigResponse
            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_intelligence_config.update_intelligence_config(
                config_id="config_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.update_intelligence_config(
            config_id,
            name=name,
            is_default=is_default,
            prompts=prompts,
            model_override=model_override,
            output_sections=output_sections,
            meeting_type_filter=meeting_type_filter,
            auto_vector_store_id=auto_vector_store_id,
            request_options=request_options,
        )
        return _response.data
