§
    €î§i  ã                   ó†   — d Z ddlmZ ddlmZ ddlmZmZmZm	Z	 ddl
mZ ddlmZ h d£Zded	z  fd
„Zded	z  fd„Zg d¢Zd	S )aÎ  
JMAP calendar support for python-caldav.

Provides synchronous and asynchronous JMAP clients with the same public API as
the CalDAV client, so user code works regardless of server protocol.

Basic usage::

    from caldav.jmap import get_jmap_client

    client = get_jmap_client(
        url="https://jmap.example.com/.well-known/jmap",
        username="alice",
        password="secret",
    )
    calendars = client.get_calendars()

Async usage::

    from caldav.jmap import get_async_jmap_client

    async with get_async_jmap_client(
        url="https://jmap.example.com/.well-known/jmap",
        username="alice",
        password="secret",
    ) as client:
        calendars = await client.get_calendars()
é    )ÚAsyncJMAPClient)Ú
JMAPClient)ÚJMAPAuthErrorÚJMAPCapabilityErrorÚ	JMAPErrorÚJMAPMethodError)ÚJMAPCalendar)ÚJMAPCalendarObject>   ÚurlÚauthÚtimeoutÚpasswordÚusernameÚ	auth_typeÚreturnNc                  óv   — ddl m}  |di | ¤Ž}|€dS t          di d„ |                     ¦   «         D ¦   «         ¤ŽS )u|  Create a :class:`JMAPClient` from configuration.

    Configuration is read from the same sources as :func:`caldav.get_davclient`:

    1. Explicit keyword arguments (``url``, ``username``, ``password``, â€¦)
    2. Environment variables (``CALDAV_URL``, ``CALDAV_USERNAME``, â€¦)
    3. Config file (``~/.config/caldav/calendar.conf`` or equivalent)

    Returns ``None`` if no configuration is found, matching the behaviour
    of :func:`caldav.get_davclient`.

    Example::

        client = get_jmap_client(url="https://jmap.example.com/.well-known/jmap",
                                  username="alice", password="secret")
    r   ©Úget_connection_paramsNc                 ó,   — i | ]\  }}|t           v ¯||“ŒS © ©Ú
_JMAP_KEYS©Ú.0ÚkÚvs      úO/root/projects/butler/venv/lib/python3.11/site-packages/caldav/jmap/__init__.pyú
<dictcomp>z#get_jmap_client.<locals>.<dictcomp>B   s#   € ÐQÐQÐQ¡$ ! QÀÅjÀÀ˜˜AÀÀÀó    r   )Úcaldav.configr   r   Úitems©Úkwargsr   Úconn_paramss      r   Úget_jmap_clientr%   ,   sf   € ð" 4Ð3Ð3Ð3Ð3Ð3à'Ð'Ð1Ð1¨&Ð1Ð1€KØÐØˆtÝÐRÐRÐQÐQ¨+×*;Ò*;Ñ*=Ô*=ÐQÑQÔQÐRÐRÐRr   c                  óv   — ddl m}  |di | ¤Ž}|€dS t          di d„ |                     ¦   «         D ¦   «         ¤ŽS )aÉ  Create an :class:`AsyncJMAPClient` from configuration.

    Accepts the same arguments and reads configuration from the same sources
    as :func:`get_jmap_client`. Returns ``None`` if no configuration is found.

    Example::

        async with get_async_jmap_client(
            url="https://jmap.example.com/.well-known/jmap",
            username="alice", password="secret"
        ) as client:
            calendars = await client.get_calendars()
    r   r   Nc                 ó,   — i | ]\  }}|t           v ¯||“ŒS r   r   r   s      r   r   z)get_async_jmap_client.<locals>.<dictcomp>X   s#   € ÐVÐVÐV¡t q¨!ÀaÍ:ÀoÀo˜a ÀoÀoÀor   r   )r    r   r   r!   r"   s      r   Úget_async_jmap_clientr(   E   sf   € ð 4Ð3Ð3Ð3Ð3Ð3à'Ð'Ð1Ð1¨&Ð1Ð1€KØÐØˆtÝÐWÐWÐVÐV¨{×/@Ò/@Ñ/BÔ/BÐVÑVÔVÐWÐWÐWr   )
r   r   r%   r(   r   r   r   r   r	   r
   )Ú__doc__Úcaldav.jmap.async_clientr   Úcaldav.jmap.clientr   Úcaldav.jmap.errorr   r   r   r   Úcaldav.jmap.objects.calendarr	   Ú#caldav.jmap.objects.calendar_objectr
   r   r%   r(   Ú__all__r   r   r   ú<module>r0      s  ððð ð: 5Ð 4Ð 4Ð 4Ð 4Ð 4Ø )Ð )Ð )Ð )Ð )Ð )ðð ð ð ð ð ð ð ð ð ð ð ð 6Ð 5Ð 5Ð 5Ð 5Ð 5Ø BÐ BÐ BÐ BÐ BÐ BàLÐLÐL€
ðS ¨dÑ!2ð Sð Sð Sð Sð2X ¸Ñ'=ð Xð Xð Xð Xð,ð ð €€€r   