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

import datetime as dt
import typing

from .. import core
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.check_username_response import CheckUsernameResponse
from ..types.device_session_response import DeviceSessionResponse
from ..types.get_users_batch_response import GetUsersBatchResponse
from ..types.image_upload_response import ImageUploadResponse
from ..types.set_current_organization_response import SetCurrentOrganizationResponse
from ..types.update_profile_response import UpdateProfileResponse
from ..types.update_username_response import UpdateUsernameResponse
from ..types.user_profile_response import UserProfileResponse
from ..types.user_response import UserResponse
from ..types.welcome_details_response import WelcomeDetailsResponse
from .raw_client import AsyncRawUserManagementClient, RawUserManagementClient

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


class UserManagementClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawUserManagementClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawUserManagementClient
        """
        return self._raw_client

    def list_users(
        self,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        active_only: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[UserResponse]:
        """
        Returns all active users in the system with pagination support.

        Parameters
        ----------
        skip : typing.Optional[int]

        limit : typing.Optional[int]

        active_only : typing.Optional[bool]

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

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

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.list_users()
        """
        _response = self._raw_client.list_users(
            skip=skip, limit=limit, active_only=active_only, request_options=request_options
        )
        return _response.data

    def create_user(
        self,
        *,
        email: str,
        password: str,
        first_name: typing.Optional[str] = OMIT,
        last_name: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserResponse:
        """
        Creates a new user account. Requires authentication.

        Parameters
        ----------
        email : str

        password : str
            Password (min 8 characters)

        first_name : typing.Optional[str]

        last_name : typing.Optional[str]

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

        Returns
        -------
        UserResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.create_user(
            email="email",
            password="password",
        )
        """
        _response = self._raw_client.create_user(
            email=email, password=password, first_name=first_name, last_name=last_name, request_options=request_options
        )
        return _response.data

    def get_current_user_profile(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UserProfileResponse:
        """
        Returns the profile of the currently authenticated user.

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

        Returns
        -------
        UserProfileResponse
            Successful Response

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

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

    def update_user_profile(
        self,
        *,
        username: typing.Optional[str] = OMIT,
        first_name: typing.Optional[str] = OMIT,
        last_name: typing.Optional[str] = OMIT,
        full_name: typing.Optional[str] = OMIT,
        birthday: typing.Optional[dt.date] = OMIT,
        gender: typing.Optional[str] = OMIT,
        profile_image: typing.Optional[str] = OMIT,
        timezone: typing.Optional[str] = OMIT,
        country_id: typing.Optional[str] = OMIT,
        post_code: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UpdateProfileResponse:
        """
        Updates profile fields for the authenticated user.

        Parameters
        ----------
        username : typing.Optional[str]
            Username

        first_name : typing.Optional[str]
            First name

        last_name : typing.Optional[str]
            Last name

        full_name : typing.Optional[str]
            Full name

        birthday : typing.Optional[dt.date]
            Date of birth

        gender : typing.Optional[str]
            Gender

        profile_image : typing.Optional[str]
            Profile image URL

        timezone : typing.Optional[str]
            Timezone

        country_id : typing.Optional[str]
            Country ID (country_ prefix)

        post_code : typing.Optional[str]
            Postal code

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

        Returns
        -------
        UpdateProfileResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.update_user_profile()
        """
        _response = self._raw_client.update_user_profile(
            username=username,
            first_name=first_name,
            last_name=last_name,
            full_name=full_name,
            birthday=birthday,
            gender=gender,
            profile_image=profile_image,
            timezone=timezone,
            country_id=country_id,
            post_code=post_code,
            request_options=request_options,
        )
        return _response.data

    def set_current_organization(
        self, *, organization_id: str, request_options: typing.Optional[RequestOptions] = None
    ) -> SetCurrentOrganizationResponse:
        """
        Switches the user's active organization context.

        Parameters
        ----------
        organization_id : str
            Organization ID to set as current (org_xxx format)

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

        Returns
        -------
        SetCurrentOrganizationResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.set_current_organization(
            organization_id="organization_id",
        )
        """
        _response = self._raw_client.set_current_organization(
            organization_id=organization_id, request_options=request_options
        )
        return _response.data

    def get_user_by_email(self, email: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserResponse:
        """
        Looks up a user by their email address. Requires authentication.

        Parameters
        ----------
        email : str

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

        Returns
        -------
        UserResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.get_user_by_email(
            email="email",
        )
        """
        _response = self._raw_client.get_user_by_email(email, request_options=request_options)
        return _response.data

    def update_username(
        self, *, username: str, request_options: typing.Optional[RequestOptions] = None
    ) -> UpdateUsernameResponse:
        """
        Changes the authenticated user's username.

        Parameters
        ----------
        username : str
            New username (3-100 characters)

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

        Returns
        -------
        UpdateUsernameResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.update_username(
            username="username",
        )
        """
        _response = self._raw_client.update_username(username=username, request_options=request_options)
        return _response.data

    def check_username_availability(
        self, *, username: str, request_options: typing.Optional[RequestOptions] = None
    ) -> CheckUsernameResponse:
        """
        Checks if a username is available for use.

        Parameters
        ----------
        username : str
            Username to check

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

        Returns
        -------
        CheckUsernameResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.check_username_availability(
            username="username",
        )
        """
        _response = self._raw_client.check_username_availability(username=username, request_options=request_options)
        return _response.data

    def get_user_devices(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[DeviceSessionResponse]:
        """
        Returns all active device sessions for the authenticated user.

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

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

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

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

    def get_welcome_details(self, *, request_options: typing.Optional[RequestOptions] = None) -> WelcomeDetailsResponse:
        """
        Returns onboarding information for the authenticated user.

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

        Returns
        -------
        WelcomeDetailsResponse
            Successful Response

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

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

    def get_user(self, *, request_options: typing.Optional[RequestOptions] = None) -> UserResponse:
        """
        Returns the User model for the currently authenticated user.

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

        Returns
        -------
        UserResponse
            Successful Response

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

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

    def list_deleted_users(
        self,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[UserResponse]:
        """
        Returns all soft-deleted users. Requires admin access.

        Parameters
        ----------
        skip : typing.Optional[int]

        limit : typing.Optional[int]

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

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

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.list_deleted_users()
        """
        _response = self._raw_client.list_deleted_users(skip=skip, limit=limit, request_options=request_options)
        return _response.data

    def get_user_by_id(
        self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UserProfileResponse:
        """
        Returns user details by their user ID.

        Parameters
        ----------
        user_id : str

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

        Returns
        -------
        UserProfileResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.get_user_by_id(
            user_id="user_id",
        )
        """
        _response = self._raw_client.get_user_by_id(user_id, request_options=request_options)
        return _response.data

    def delete_user(
        self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Soft-deletes a user account by ID.

        Parameters
        ----------
        user_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.user_management.delete_user(
            user_id="user_id",
        )
        """
        _response = self._raw_client.delete_user(user_id, request_options=request_options)
        return _response.data

    def get_users_batch(
        self, *, user_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
    ) -> GetUsersBatchResponse:
        """
        Retrieves multiple users by their IDs in a single request.

        Parameters
        ----------
        user_ids : typing.Sequence[str]
            List of user IDs to retrieve

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

        Returns
        -------
        GetUsersBatchResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.get_users_batch(
            user_ids=["user_ids"],
        )
        """
        _response = self._raw_client.get_users_batch(user_ids=user_ids, request_options=request_options)
        return _response.data

    def serve_profile_image(
        self, file_path: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Any:
        """
        Serves a stored profile image. Development only.

        Parameters
        ----------
        file_path : str

        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.user_management.serve_profile_image(
            file_path="file_path",
        )
        """
        _response = self._raw_client.serve_profile_image(file_path, request_options=request_options)
        return _response.data

    def upload_profile_image_file(
        self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
    ) -> ImageUploadResponse:
        """
        Uploads a profile image from a file.

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

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

        Returns
        -------
        ImageUploadResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.upload_profile_image_file()
        """
        _response = self._raw_client.upload_profile_image_file(file=file, request_options=request_options)
        return _response.data

    def upload_profile_image_url(
        self, *, image_url: str, request_options: typing.Optional[RequestOptions] = None
    ) -> ImageUploadResponse:
        """
        Downloads and sets a profile image from a URL.

        Parameters
        ----------
        image_url : str
            URL of the image to upload

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

        Returns
        -------
        ImageUploadResponse
            Successful Response

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

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.user_management.upload_profile_image_url(
            image_url="image_url",
        )
        """
        _response = self._raw_client.upload_profile_image_url(image_url=image_url, request_options=request_options)
        return _response.data


class AsyncUserManagementClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawUserManagementClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawUserManagementClient
        """
        return self._raw_client

    async def list_users(
        self,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        active_only: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[UserResponse]:
        """
        Returns all active users in the system with pagination support.

        Parameters
        ----------
        skip : typing.Optional[int]

        limit : typing.Optional[int]

        active_only : typing.Optional[bool]

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

        Returns
        -------
        typing.List[UserResponse]
            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.user_management.list_users()


        asyncio.run(main())
        """
        _response = await self._raw_client.list_users(
            skip=skip, limit=limit, active_only=active_only, request_options=request_options
        )
        return _response.data

    async def create_user(
        self,
        *,
        email: str,
        password: str,
        first_name: typing.Optional[str] = OMIT,
        last_name: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserResponse:
        """
        Creates a new user account. Requires authentication.

        Parameters
        ----------
        email : str

        password : str
            Password (min 8 characters)

        first_name : typing.Optional[str]

        last_name : typing.Optional[str]

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

        Returns
        -------
        UserResponse
            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.user_management.create_user(
                email="email",
                password="password",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_user(
            email=email, password=password, first_name=first_name, last_name=last_name, request_options=request_options
        )
        return _response.data

    async def get_current_user_profile(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UserProfileResponse:
        """
        Returns the profile of the currently authenticated user.

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

        Returns
        -------
        UserProfileResponse
            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.user_management.get_current_user_profile()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_current_user_profile(request_options=request_options)
        return _response.data

    async def update_user_profile(
        self,
        *,
        username: typing.Optional[str] = OMIT,
        first_name: typing.Optional[str] = OMIT,
        last_name: typing.Optional[str] = OMIT,
        full_name: typing.Optional[str] = OMIT,
        birthday: typing.Optional[dt.date] = OMIT,
        gender: typing.Optional[str] = OMIT,
        profile_image: typing.Optional[str] = OMIT,
        timezone: typing.Optional[str] = OMIT,
        country_id: typing.Optional[str] = OMIT,
        post_code: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UpdateProfileResponse:
        """
        Updates profile fields for the authenticated user.

        Parameters
        ----------
        username : typing.Optional[str]
            Username

        first_name : typing.Optional[str]
            First name

        last_name : typing.Optional[str]
            Last name

        full_name : typing.Optional[str]
            Full name

        birthday : typing.Optional[dt.date]
            Date of birth

        gender : typing.Optional[str]
            Gender

        profile_image : typing.Optional[str]
            Profile image URL

        timezone : typing.Optional[str]
            Timezone

        country_id : typing.Optional[str]
            Country ID (country_ prefix)

        post_code : typing.Optional[str]
            Postal code

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

        Returns
        -------
        UpdateProfileResponse
            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.user_management.update_user_profile()


        asyncio.run(main())
        """
        _response = await self._raw_client.update_user_profile(
            username=username,
            first_name=first_name,
            last_name=last_name,
            full_name=full_name,
            birthday=birthday,
            gender=gender,
            profile_image=profile_image,
            timezone=timezone,
            country_id=country_id,
            post_code=post_code,
            request_options=request_options,
        )
        return _response.data

    async def set_current_organization(
        self, *, organization_id: str, request_options: typing.Optional[RequestOptions] = None
    ) -> SetCurrentOrganizationResponse:
        """
        Switches the user's active organization context.

        Parameters
        ----------
        organization_id : str
            Organization ID to set as current (org_xxx format)

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

        Returns
        -------
        SetCurrentOrganizationResponse
            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.user_management.set_current_organization(
                organization_id="organization_id",
            )


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

    async def get_user_by_email(
        self, email: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UserResponse:
        """
        Looks up a user by their email address. Requires authentication.

        Parameters
        ----------
        email : str

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

        Returns
        -------
        UserResponse
            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.user_management.get_user_by_email(
                email="email",
            )


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

    async def update_username(
        self, *, username: str, request_options: typing.Optional[RequestOptions] = None
    ) -> UpdateUsernameResponse:
        """
        Changes the authenticated user's username.

        Parameters
        ----------
        username : str
            New username (3-100 characters)

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

        Returns
        -------
        UpdateUsernameResponse
            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.user_management.update_username(
                username="username",
            )


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

    async def check_username_availability(
        self, *, username: str, request_options: typing.Optional[RequestOptions] = None
    ) -> CheckUsernameResponse:
        """
        Checks if a username is available for use.

        Parameters
        ----------
        username : str
            Username to check

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

        Returns
        -------
        CheckUsernameResponse
            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.user_management.check_username_availability(
                username="username",
            )


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

    async def get_user_devices(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[DeviceSessionResponse]:
        """
        Returns all active device sessions for the authenticated user.

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

        Returns
        -------
        typing.List[DeviceSessionResponse]
            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.user_management.get_user_devices()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_user_devices(request_options=request_options)
        return _response.data

    async def get_welcome_details(
        self, *, request_options: typing.Optional[RequestOptions] = None
    ) -> WelcomeDetailsResponse:
        """
        Returns onboarding information for the authenticated user.

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

        Returns
        -------
        WelcomeDetailsResponse
            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.user_management.get_welcome_details()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_welcome_details(request_options=request_options)
        return _response.data

    async def get_user(self, *, request_options: typing.Optional[RequestOptions] = None) -> UserResponse:
        """
        Returns the User model for the currently authenticated user.

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

        Returns
        -------
        UserResponse
            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.user_management.get_user()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_user(request_options=request_options)
        return _response.data

    async def list_deleted_users(
        self,
        *,
        skip: typing.Optional[int] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[UserResponse]:
        """
        Returns all soft-deleted users. Requires admin access.

        Parameters
        ----------
        skip : typing.Optional[int]

        limit : typing.Optional[int]

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

        Returns
        -------
        typing.List[UserResponse]
            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.user_management.list_deleted_users()


        asyncio.run(main())
        """
        _response = await self._raw_client.list_deleted_users(skip=skip, limit=limit, request_options=request_options)
        return _response.data

    async def get_user_by_id(
        self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UserProfileResponse:
        """
        Returns user details by their user ID.

        Parameters
        ----------
        user_id : str

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

        Returns
        -------
        UserProfileResponse
            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.user_management.get_user_by_id(
                user_id="user_id",
            )


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

    async def delete_user(
        self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Dict[str, typing.Any]:
        """
        Soft-deletes a user account by ID.

        Parameters
        ----------
        user_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.user_management.delete_user(
                user_id="user_id",
            )


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

    async def get_users_batch(
        self, *, user_ids: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
    ) -> GetUsersBatchResponse:
        """
        Retrieves multiple users by their IDs in a single request.

        Parameters
        ----------
        user_ids : typing.Sequence[str]
            List of user IDs to retrieve

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

        Returns
        -------
        GetUsersBatchResponse
            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.user_management.get_users_batch(
                user_ids=["user_ids"],
            )


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

    async def serve_profile_image(
        self, file_path: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.Any:
        """
        Serves a stored profile image. Development only.

        Parameters
        ----------
        file_path : str

        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.user_management.serve_profile_image(
                file_path="file_path",
            )


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

    async def upload_profile_image_file(
        self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
    ) -> ImageUploadResponse:
        """
        Uploads a profile image from a file.

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

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

        Returns
        -------
        ImageUploadResponse
            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.user_management.upload_profile_image_file()


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

    async def upload_profile_image_url(
        self, *, image_url: str, request_options: typing.Optional[RequestOptions] = None
    ) -> ImageUploadResponse:
        """
        Downloads and sets a profile image from a URL.

        Parameters
        ----------
        image_url : str
            URL of the image to upload

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

        Returns
        -------
        ImageUploadResponse
            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.user_management.upload_profile_image_url(
                image_url="image_url",
            )


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