
    i
                     @    S SK JrJr  S SKrS SKJrJr   " S S5      rg)    )OptionalUnionN)rawtypesc                   V    \ rS rSr    SSSS\\\4   S\S\S\S	\S
\S   4S jjr	Sr
g)
AddContact   Nselfzpyrogram.Clientuser_id
first_name	last_namephone_numbershare_phone_numbernoteztypes.FormattedTextc                 `  #    U R                  [        R                  R                  R	                  U R                  U5      I Sh  vN UUUUU(       a  UR                  5       I Sh  vN OSS95      I Sh  vN n[        R                  R                  XR                  S   5      $  Nb NB N47f)a  Add an existing Telegram user as contact, even without a phone number.

.. include:: /_includes/usable-by/users.rst

Parameters:
    user_id (``int`` | ``str``):
        Unique identifier (int) or username (str) of the target user.

    first_name (``str``):
        User's first name.

    last_name (``str``, *optional*):
        User's last name.

    phone_number (``str``, *optional*):
        User's phone number.

    share_phone_number (``bool``, *optional*):
        Whether or not to share the phone number with the user.
        Defaults to False.

    note (:obj:`~pyrogram.types.FormattedText`, *optional*):
        Note to set for the user.

Returns:
    :obj:`~pyrogram.types.User`: On success the user is returned.

Example:
    .. code-block:: python

        # Add contact by id
        await app.add_contact(12345678, "Foo")

        # Add contact by username
        await app.add_contact("username", "Bar")
N)idr   r   phoneadd_phone_privacy_exceptionr   r   )invoker   	functionscontactsr   resolve_peerwriter   User_parseusers)r
   r   r   r   r   r   r   rs           R/app/mltbenv/lib/python3.13/site-packages/pyrogram/methods/contacts/add_contact.pyadd_contactAddContact.add_contact   s     Z ++MM""--**733%#",>+/4::<''T . 	
 	
 zz  wwqz22 4
 (	
s6   AB.B(!B.'B*(B.7B,81B.*B.,B. ) r"   FN)__name__
__module____qualname____firstlineno__r   intstrboolr   r   __static_attributes__r!       r   r   r      sj    
 #(048383sCx83 83 	83
 83 !83 ,-83 83r+   r   )typingr   r   pyrogramr   r   r   r!   r+   r   <module>r.      s   & #  93 93r+   