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

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.pagination import AsyncPager, SyncPager
from ..core.request_options import RequestOptions
from ..types.add_asset_response import AddAssetResponse
from ..types.include_total_count import IncludeTotalCount
from ..types.remove_asset_response import RemoveAssetResponse
from ..types.request_after_opaque_cursor import RequestAfterOpaqueCursor
from ..types.request_page_size import RequestPageSize
from ..types.share import Share
from ..types.share_response import ShareResponse
from ..types.share_reviewers_response import ShareReviewersResponse
from ..types.shares_response import SharesResponse
from ..types.user import User
from ..types.uuid_ import Uuid
from .raw_client import AsyncRawSharesClient, RawSharesClient
from .types.add_asset_params_data import AddAssetParamsData
from .types.add_reviewers_to_share_params_data import AddReviewersToShareParamsData
from .types.create_share_params_data import CreateShareParamsData
from .types.remove_reviewer_params_data import RemoveReviewerParamsData
from .types.update_share_params_data import UpdateShareParamsData

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


class SharesClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawSharesClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawSharesClient
        """
        return self._raw_client

    def show(
        self, account_id: Uuid, share_id: Uuid, *, request_options: typing.Optional[RequestOptions] = None
    ) -> ShareResponse:
        """
        Show a single Share. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


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

        Returns
        -------
        ShareResponse
            OK

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.shares.show(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
        )
        """
        _response = self._raw_client.show(account_id, share_id, request_options=request_options)
        return _response.data

    def delete(
        self, account_id: Uuid, share_id: Uuid, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Delete a share. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


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

        Returns
        -------
        None

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.shares.delete(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
        )
        """
        _response = self._raw_client.delete(account_id, share_id, request_options=request_options)
        return _response.data

    def update(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        data: UpdateShareParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ShareResponse:
        """
        Update share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        data : UpdateShareParamsData

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

        Returns
        -------
        ShareResponse
            OK

        Examples
        --------
        import datetime

        from frameio import Frameio
        from frameio.shares import UpdateShareParamsData

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.shares.update(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=UpdateShareParamsData(
                access="public",
                description="A descriptive summary of the share",
                downloading_enabled=True,
                expiration=datetime.datetime.fromisoformat(
                    "2026-01-29 19:41:37+00:00",
                ),
                name="Share Name",
                passphrase="as!dfj39sd(*",
            ),
        )
        """
        _response = self._raw_client.update(account_id, share_id, data=data, request_options=request_options)
        return _response.data

    def list_reviewers(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        after: typing.Optional[RequestAfterOpaqueCursor] = None,
        page_size: typing.Optional[RequestPageSize] = None,
        include_total_count: typing.Optional[IncludeTotalCount] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SyncPager[User, ShareReviewersResponse]:
        """
        List share reviewers. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        after : typing.Optional[RequestAfterOpaqueCursor]
            Opaque Cursor query param for requests returning paginated results.
            <br/>
            NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.

        page_size : typing.Optional[RequestPageSize]


        include_total_count : typing.Optional[IncludeTotalCount]


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

        Returns
        -------
        SyncPager[User, ShareReviewersResponse]
            OK

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        response = client.shares.list_reviewers(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            after="<opaque_cursor>",
            page_size=10,
            include_total_count=False,
        )
        for item in response:
            yield item
        # alternatively, you can paginate page-by-page
        for page in response.iter_pages():
            yield page
        """
        return self._raw_client.list_reviewers(
            account_id,
            share_id,
            after=after,
            page_size=page_size,
            include_total_count=include_total_count,
            request_options=request_options,
        )

    def add_reviewers(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        data: AddReviewersToShareParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> None:
        """
        Add reviewers to secure share by three identifier types: `adobe_user_id`, `email`, and `user_id`.
        <br>
        A request can only include one identifier type parameter.
        <br>
        `email` is the only identifier able to add reviewers to a Share who don't have a Frame account member on the account where the Share belongs.
        <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        data : AddReviewersToShareParamsData

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

        Returns
        -------
        None

        Examples
        --------
        from frameio import Frameio
        from frameio.shares import (
            AddReviewersToShareParamsData,
            AddReviewersToShareParamsDataReviewers,
        )

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.shares.add_reviewers(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=AddReviewersToShareParamsData(
                message="Please join my share!",
                reviewers=AddReviewersToShareParamsDataReviewers(
                    emails=["email1@domain.com", "email2@domain.com"],
                ),
            ),
        )
        """
        _response = self._raw_client.add_reviewers(account_id, share_id, data=data, request_options=request_options)
        return _response.data

    def remove_reviewers(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        data: RemoveReviewerParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> None:
        """
        Removes reviewers from secure Share by three identifier types: `adobe_user_id`, `email`, and `user_id`.
        <br>
        A request can only include one identifier type parameter.
        <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        data : RemoveReviewerParamsData

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

        Returns
        -------
        None

        Examples
        --------
        from frameio import Frameio
        from frameio.shares import (
            RemoveReviewerParamsData,
            RemoveReviewerParamsDataReviewers,
        )

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.shares.remove_reviewers(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=RemoveReviewerParamsData(
                reviewers=RemoveReviewerParamsDataReviewers(
                    adobe_user_ids=[
                        "2A3C1A3D66C621B20A494021@176719f5667c82b4499999.e"
                    ],
                ),
            ),
        )
        """
        _response = self._raw_client.remove_reviewers(account_id, share_id, data=data, request_options=request_options)
        return _response.data

    def remove_asset(
        self,
        account_id: Uuid,
        share_id: Uuid,
        asset_id: Uuid,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> RemoveAssetResponse:
        """
        Remove an asset currently in the share from that share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        asset_id : Uuid


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

        Returns
        -------
        RemoveAssetResponse
            OK

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.shares.remove_asset(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            asset_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
        )
        """
        _response = self._raw_client.remove_asset(account_id, share_id, asset_id, request_options=request_options)
        return _response.data

    def add_asset(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        data: AddAssetParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AddAssetResponse:
        """
        Add new asset share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        data : AddAssetParamsData

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

        Returns
        -------
        AddAssetResponse
            OK

        Examples
        --------
        from frameio import Frameio
        from frameio.shares import AddAssetParamsData

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.shares.add_asset(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=AddAssetParamsData(
                asset_id="26a44993-9abd-49bb-8e39-2f44b4a72f62",
            ),
        )
        """
        _response = self._raw_client.add_asset(account_id, share_id, data=data, request_options=request_options)
        return _response.data

    def index(
        self,
        account_id: Uuid,
        project_id: Uuid,
        *,
        after: typing.Optional[RequestAfterOpaqueCursor] = None,
        page_size: typing.Optional[RequestPageSize] = None,
        include_total_count: typing.Optional[IncludeTotalCount] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SyncPager[Share, SharesResponse]:
        """
        List shares on a project. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        project_id : Uuid


        after : typing.Optional[RequestAfterOpaqueCursor]
            Opaque Cursor query param for requests returning paginated results.
            <br/>
            NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.

        page_size : typing.Optional[RequestPageSize]


        include_total_count : typing.Optional[IncludeTotalCount]


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

        Returns
        -------
        SyncPager[Share, SharesResponse]
            OK

        Examples
        --------
        from frameio import Frameio

        client = Frameio(
            token="YOUR_TOKEN",
        )
        response = client.shares.index(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            after="<opaque_cursor>",
            page_size=10,
            include_total_count=False,
        )
        for item in response:
            yield item
        # alternatively, you can paginate page-by-page
        for page in response.iter_pages():
            yield page
        """
        return self._raw_client.index(
            account_id,
            project_id,
            after=after,
            page_size=page_size,
            include_total_count=include_total_count,
            request_options=request_options,
        )

    def create(
        self,
        account_id: Uuid,
        project_id: Uuid,
        *,
        data: CreateShareParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ShareResponse:
        """
        Create share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        project_id : Uuid


        data : CreateShareParamsData

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

        Returns
        -------
        ShareResponse
            Created

        Examples
        --------
        import datetime

        from frameio import Frameio
        from frameio.shares import CreateShareParamsData_Asset

        client = Frameio(
            token="YOUR_TOKEN",
        )
        client.shares.create(
            account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            data=CreateShareParamsData_Asset(
                access="public",
                asset_ids=[
                    "b68f4112-23fe-475e-9927-c0405331266b",
                    "888a368c-06b2-47f8-b3b1-09ce71d37e6b",
                ],
                downloading_enabled=True,
                expiration=datetime.datetime.fromisoformat(
                    "2026-01-29 19:41:37+00:00",
                ),
                name="Share Name",
                passphrase="as!dfj39sd(*",
            ),
        )
        """
        _response = self._raw_client.create(account_id, project_id, data=data, request_options=request_options)
        return _response.data


class AsyncSharesClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawSharesClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawSharesClient
        """
        return self._raw_client

    async def show(
        self, account_id: Uuid, share_id: Uuid, *, request_options: typing.Optional[RequestOptions] = None
    ) -> ShareResponse:
        """
        Show a single Share. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


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

        Returns
        -------
        ShareResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.shares.show(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.show(account_id, share_id, request_options=request_options)
        return _response.data

    async def delete(
        self, account_id: Uuid, share_id: Uuid, *, request_options: typing.Optional[RequestOptions] = None
    ) -> None:
        """
        Delete a share. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.shares.delete(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.delete(account_id, share_id, request_options=request_options)
        return _response.data

    async def update(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        data: UpdateShareParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ShareResponse:
        """
        Update share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        data : UpdateShareParamsData

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

        Returns
        -------
        ShareResponse
            OK

        Examples
        --------
        import asyncio
        import datetime

        from frameio import AsyncFrameio
        from frameio.shares import UpdateShareParamsData

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.shares.update(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=UpdateShareParamsData(
                    access="public",
                    description="A descriptive summary of the share",
                    downloading_enabled=True,
                    expiration=datetime.datetime.fromisoformat(
                        "2026-01-29 19:41:37+00:00",
                    ),
                    name="Share Name",
                    passphrase="as!dfj39sd(*",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.update(account_id, share_id, data=data, request_options=request_options)
        return _response.data

    async def list_reviewers(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        after: typing.Optional[RequestAfterOpaqueCursor] = None,
        page_size: typing.Optional[RequestPageSize] = None,
        include_total_count: typing.Optional[IncludeTotalCount] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncPager[User, ShareReviewersResponse]:
        """
        List share reviewers. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        after : typing.Optional[RequestAfterOpaqueCursor]
            Opaque Cursor query param for requests returning paginated results.
            <br/>
            NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.

        page_size : typing.Optional[RequestPageSize]


        include_total_count : typing.Optional[IncludeTotalCount]


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

        Returns
        -------
        AsyncPager[User, ShareReviewersResponse]
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            response = await client.shares.list_reviewers(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                after="<opaque_cursor>",
                page_size=10,
                include_total_count=False,
            )
            async for item in response:
                yield item

            # alternatively, you can paginate page-by-page
            async for page in response.iter_pages():
                yield page


        asyncio.run(main())
        """
        return await self._raw_client.list_reviewers(
            account_id,
            share_id,
            after=after,
            page_size=page_size,
            include_total_count=include_total_count,
            request_options=request_options,
        )

    async def add_reviewers(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        data: AddReviewersToShareParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> None:
        """
        Add reviewers to secure share by three identifier types: `adobe_user_id`, `email`, and `user_id`.
        <br>
        A request can only include one identifier type parameter.
        <br>
        `email` is the only identifier able to add reviewers to a Share who don't have a Frame account member on the account where the Share belongs.
        <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        data : AddReviewersToShareParamsData

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.shares import (
            AddReviewersToShareParamsData,
            AddReviewersToShareParamsDataReviewers,
        )

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.shares.add_reviewers(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=AddReviewersToShareParamsData(
                    message="Please join my share!",
                    reviewers=AddReviewersToShareParamsDataReviewers(
                        emails=["email1@domain.com", "email2@domain.com"],
                    ),
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.add_reviewers(
            account_id, share_id, data=data, request_options=request_options
        )
        return _response.data

    async def remove_reviewers(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        data: RemoveReviewerParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> None:
        """
        Removes reviewers from secure Share by three identifier types: `adobe_user_id`, `email`, and `user_id`.
        <br>
        A request can only include one identifier type parameter.
        <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        data : RemoveReviewerParamsData

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.shares import (
            RemoveReviewerParamsData,
            RemoveReviewerParamsDataReviewers,
        )

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.shares.remove_reviewers(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=RemoveReviewerParamsData(
                    reviewers=RemoveReviewerParamsDataReviewers(
                        adobe_user_ids=[
                            "2A3C1A3D66C621B20A494021@176719f5667c82b4499999.e"
                        ],
                    ),
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.remove_reviewers(
            account_id, share_id, data=data, request_options=request_options
        )
        return _response.data

    async def remove_asset(
        self,
        account_id: Uuid,
        share_id: Uuid,
        asset_id: Uuid,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> RemoveAssetResponse:
        """
        Remove an asset currently in the share from that share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        asset_id : Uuid


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

        Returns
        -------
        RemoveAssetResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.shares.remove_asset(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                asset_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.remove_asset(account_id, share_id, asset_id, request_options=request_options)
        return _response.data

    async def add_asset(
        self,
        account_id: Uuid,
        share_id: Uuid,
        *,
        data: AddAssetParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AddAssetResponse:
        """
        Add new asset share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        share_id : Uuid


        data : AddAssetParamsData

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

        Returns
        -------
        AddAssetResponse
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio
        from frameio.shares import AddAssetParamsData

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.shares.add_asset(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                share_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=AddAssetParamsData(
                    asset_id="26a44993-9abd-49bb-8e39-2f44b4a72f62",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.add_asset(account_id, share_id, data=data, request_options=request_options)
        return _response.data

    async def index(
        self,
        account_id: Uuid,
        project_id: Uuid,
        *,
        after: typing.Optional[RequestAfterOpaqueCursor] = None,
        page_size: typing.Optional[RequestPageSize] = None,
        include_total_count: typing.Optional[IncludeTotalCount] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> AsyncPager[Share, SharesResponse]:
        """
        List shares on a project. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        project_id : Uuid


        after : typing.Optional[RequestAfterOpaqueCursor]
            Opaque Cursor query param for requests returning paginated results.
            <br/>
            NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.

        page_size : typing.Optional[RequestPageSize]


        include_total_count : typing.Optional[IncludeTotalCount]


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

        Returns
        -------
        AsyncPager[Share, SharesResponse]
            OK

        Examples
        --------
        import asyncio

        from frameio import AsyncFrameio

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            response = await client.shares.index(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                after="<opaque_cursor>",
                page_size=10,
                include_total_count=False,
            )
            async for item in response:
                yield item

            # alternatively, you can paginate page-by-page
            async for page in response.iter_pages():
                yield page


        asyncio.run(main())
        """
        return await self._raw_client.index(
            account_id,
            project_id,
            after=after,
            page_size=page_size,
            include_total_count=include_total_count,
            request_options=request_options,
        )

    async def create(
        self,
        account_id: Uuid,
        project_id: Uuid,
        *,
        data: CreateShareParamsData,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ShareResponse:
        """
        Create share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user

        Parameters
        ----------
        account_id : Uuid


        project_id : Uuid


        data : CreateShareParamsData

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

        Returns
        -------
        ShareResponse
            Created

        Examples
        --------
        import asyncio
        import datetime

        from frameio import AsyncFrameio
        from frameio.shares import CreateShareParamsData_Asset

        client = AsyncFrameio(
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.shares.create(
                account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
                data=CreateShareParamsData_Asset(
                    access="public",
                    asset_ids=[
                        "b68f4112-23fe-475e-9927-c0405331266b",
                        "888a368c-06b2-47f8-b3b1-09ce71d37e6b",
                    ],
                    downloading_enabled=True,
                    expiration=datetime.datetime.fromisoformat(
                        "2026-01-29 19:41:37+00:00",
                    ),
                    name="Share Name",
                    passphrase="as!dfj39sd(*",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create(account_id, project_id, data=data, request_options=request_options)
        return _response.data
