
    b?i,                         S SK JrJrJrJrJrJr  S SKJrJ	r	  S SK
Jr  S SKJr  SSKJr  \	" SS\05      r\	" S	S\\   05      r " S
 S5      rg)    )AnyDictListOptionalUnioncast)NotRequired	TypedDict)request)PaginationHelper   )	Broadcast_CreateParamsFromfrom_UpdateParamsFromc                      \ rS rSr " S S\5      r " S S\5      r " S S\5      r	 " S S	\5      r
 " S
 S\5      r " S S\
5      r " S S\5      r " S S\5      r " S S\5      r\S\S\
4S j5       r\S\S\4S j5       r\S\	S\4S j5       r\SS\\   S\4S jj5       r\S\S\4S j5       r\S\S\4S j5       rSrg) 
Broadcasts   c                       \ rS rSr% Sr\\   \S'    \\   \S'    \\S'    \\\	\   \4      \S'    \\   \S'    \\   \S'    \\   \S	'   S
r
g)Broadcasts.CreateParams   a  CreateParams is the class that wraps the parameters for the create method.

Attributes:
    from (str): The sender email address
    segment_id (NotRequired[str]): The ID of the segment you want to send to.
    audience_id (NotRequired[str]): The ID of the audience you want to send to. (deprecated: use segment_id)
    subject (str): Email subject.
    reply_to (NotRequired[Union[List[str], str]]): Reply-to email address(es).
    html (NotRequired[str]): The HTML version of the message.
    text (NotRequired[str]): The text version of the message.
    name (NotRequired[str]): The friendly name of the broadcast. Only used for internal reference.

segment_idaudience_idsubjectreply_tohtmltextname N)__name__
__module____qualname____firstlineno____doc__r	   str__annotations__r   r   __static_attributes__r       a/var/www/html/livechat/backend/venv/lib/python3.13/site-packages/resend/broadcasts/_broadcasts.pyCreateParamsr      s    	  $$	 !%%	 	 eDIsN344	 #	 #	 #	r(   r*   c                       \ rS rSr% Sr\\S'    \\   \S'    \\   \S'    \\   \S'    \\\	\   \4      \S'    \\   \S'    \\   \S	'    \\   \S
'   Sr
g)Broadcasts.UpdateParamsL   a  UpdateParams is the class that wraps the parameters for the update method.

Attributes:
    broadcast_id (str): The ID of the broadcast you want to update.
    segment_id (NotRequired[str]): The ID of the segment you want to send to.
    audience_id (NotRequired[str]): The ID of the audience you want to send to. (deprecated: use segment_id)
    from (NotRequired[str]): The sender email address
    subject (NotRequired[str]): Email subject.
    reply_to (NotRequired[Union[List[str], str]]): Reply-to email address(es).
    html (NotRequired[str]): The HTML version of the message.
    text (NotRequired[str]): The text version of the message.
    name (NotRequired[str]): The friendly name of the broadcast. Only used for internal reference.
broadcast_idr   r   r   r   r   r   r   r   N)r    r!   r"   r#   r$   r%   r&   r	   r   r   r'   r   r(   r)   UpdateParamsr,   L   s    	 	  $$	 !%%	 S!!	 eDIsN344	 #	 #	 #	r(   r/   c                   6    \ rS rSr% Sr\\S'    \\   \S'   Srg)Broadcasts.SendParams   aC  SendParams is the class that wraps the parameters for the send method.

Attributes:
    broadcast_id (str): The ID of the broadcast to send.
    scheduled_at (NotRequired[str]): Schedule email to be sent later.
    The date should be in natural language (e.g.: in 1 min) or ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z).
r.   scheduled_atr   N)	r    r!   r"   r#   r$   r%   r&   r	   r'   r   r(   r)   
SendParamsr1      s&    	 	 "#&&	r(   r4   c                   $    \ rS rSr% Sr\\S'   Srg)Broadcasts.CreateResponse   z
CreateResponse is the class that wraps the response of the create method.

Attributes:
    id (str): id of the created broadcast
idr   Nr    r!   r"   r#   r$   r%   r&   r'   r   r(   r)   CreateResponser6          	 	r(   r:   c                   $    \ rS rSr% Sr\\S'   Srg)Broadcasts.UpdateResponse   z
UpdateResponse is the class that wraps the response of the update method.

Attributes:
    id (str): id of the updated broadcast
r8   r   Nr9   r   r(   r)   UpdateResponser=      r;   r(   r?   c                       \ rS rSrSrSrg)Broadcasts.SendResponse   z~
SendResponse is the class that wraps the response of the send method.

Attributes:
    id (str): id of the created broadcast
r   N)r    r!   r"   r#   r$   r'   r   r(   r)   SendResponserA      s    	r(   rC   c                   J    \ rS rSr% \\   \S'    \\   \S'    \\   \S'   Srg)Broadcasts.ListParams   limitafterbeforer   N)	r    r!   r"   r#   r	   intr&   r%   r'   r   r(   r)   
ListParamsrE      s6    3	 3	
 C  	r(   rK   c                   B    \ rS rSr% Sr\\S'    \\   \S'    \	\S'   Sr
g)Broadcasts.ListResponse   a  
ListResponse is the class that wraps the response of the list method with pagination metadata.

Attributes:
    object (str): object type, always "list"
    data (List[Broadcast]): A list of broadcast objects
    has_more (bool): Whether there are more results available
objectdatahas_morer   N)r    r!   r"   r#   r$   r%   r&   r   r   boolr'   r   r(   r)   ListResponserM      s0    	 	 9o	 	r(   rS   c                   <    \ rS rSr% Sr\\S'    \\S'    \\S'   Srg)Broadcasts.RemoveResponse   z
RemoveResponse is the class that wraps the response of the remove method.

Attributes:
    object (str): object type: "broadcast"
    id (str): id of the removed broadcast
    deleted (bool): True if the broadcast was deleted
rO   r8   deletedr   N)	r    r!   r"   r#   r$   r%   r&   rR   r'   r   r(   r)   RemoveResponserU      s+    	 	 	 	r(   rX   paramsreturnc                     Sn[         R                  [        R                     " U[	        [
        [        [        4   U5      SS9R                  5       nU$ )z
Create a broadcast.
see more: https://resend.com/docs/api-reference/broadcasts/create-broadcast

Args:
    params (CreateParams): The broadcast creation parameters

Returns:
    CreateResponse: The new broadcast object response
/broadcastspostpathrY   verb)r   Requestr   r:   r   r   r   perform_with_contentclsrY   r_   resps       r)   createBroadcasts.create   sK     z889d4S>6:



  	 r(   c                     SUS    3n[         R                  [        R                     " U[	        [
        [        [        4   U5      SS9R                  5       nU$ )z
Update a broadcast.
see more: https://resend.com/docs/api-reference/broadcasts/update-broadcast

Args:
    params (UpdateParams): The broadcast update parameters

Returns:
    UpdateResponse: The updated broadcast object response
/broadcasts/r.   patchr^   )r   ra   r   r?   r   r   r   rb   rc   s       r)   updateBroadcasts.update  sX     f^456z889d4S>6:



  	 r(   c                     SUS    S3n[         R                  [        R                     " U[	        [
        [        [        4   U5      SS9R                  5       nU$ )z
Sends a broadcast.
see more: https://resend.com/docs/api-reference/broadcasts/send-broadcast

Args:
    params (CreateParams): The broadcast creation parameters

Returns:
    SendResponse: The new broadcast object response
ri   r.   z/sendr]   r^   )r   ra   r   rC   r   r   r   rb   rc   s       r)   sendBroadcasts.send  sZ     f^45U;z667d4S>6:



  	 r(   Nc                     SnU(       a  [        [        [        [        4   U5      OSn[        R                  " X#5      n[
        R                  [        R                     " U0 SS9R                  5       nU$ )a  
Retrieve a list of broadcasts.
see more: https://resend.com/docs/api-reference/broadcasts/list-broadcasts

Args:
    params (Optional[ListParams]): Optional pagination parameters
        - limit: Number of broadcasts to retrieve (max 100, min 1).
          If not provided, all broadcasts will be returned without pagination.
        - after: ID after which to retrieve more broadcasts
        - before: ID before which to retrieve more broadcasts

Returns:
    ListResponse: A list of broadcast objects
r\   Ngetr^   )
r   r   r   r   build_paginated_pathr   ra   r   rS   rb   )rd   rY   	base_pathquery_paramsr_   re   s         r)   listBroadcasts.list-  sd      "	7=tDcNF3444YMz667bu



  	 r(   r8   c                 f    SU 3n[         R                  [           " U0 SS9R                  5       nU$ )z
Retrieve a single broadcast.
see more: https://resend.com/docs/api-reference/broadcasts/get-broadcast

Args:
    id (str): The broadcast ID

Returns:
    Broadcast: The broadcast object
ri   rq   r^   )r   ra   r   rb   rd   r8   r_   re   s       r)   rq   Broadcasts.getE  s=     bT"y)bu



  	 r(   c                 z    SU 3n[         R                  [        R                     " U0 SS9R	                  5       nU$ )z
Delete a single broadcast.
see more: https://resend.com/docs/api-reference/broadcasts/delete-broadcasts

Args:
    id (str): The broadcast ID

Returns:
    RemoveResponse: The remove response object
ri   deleter^   )r   ra   r   rX   rb   rx   s       r)   removeBroadcasts.removeW  sC     bT"z889bx



  	 r(   r   )N)r    r!   r"   r#   r   r*   r   r/   r
   r4   r:   r?   rC   rK   rS   rX   classmethodrf   rk   rn   r   ru   r%   r   rq   r|   r'   r   r(   r)   r   r      sC   ,( ,\1( 1fY &  ~ Y $y . . L ^  $ L ^  $ *   $ (:. ,  . S Y  "    r(   r   N)typingr   r   r   r   r   r   typing_extensionsr	   r
   resendr   resend.pagination_helperr   
_broadcastr   r%   r   r   r   r   r(   r)   <module>r      s\    9 9 4  5 !
   C  K Kr(   