
    hi/                    P   d dl mZ d dlmZ d dlZddlmZmZmZm	Z	m
Z
mZmZ ddlmZmZ ddlmZ ddlmZmZ dd	lmZmZmZmZ dd
lmZ ddlmZmZ ddlm Z  ddl!m"Z" ddl#m$Z$ ddgZ% G d de      Z& G d de      Z' G d d      Z( G d d      Z) G d d      Z* G d d      Z+y)    )annotations)LiteralN   )BodyOmitQueryHeadersNotGivenomit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_raw_response_wrapperto_streamed_response_wrapperasync_to_raw_response_wrapper"async_to_streamed_response_wrapper)make_request_options)rc_send_paramsrc_generate_deeplink_params)RcsAgentMessageParam)RcSendResponse)RcGenerateDeeplinkResponseRcsResourceAsyncRcsResourcec            	          e Zd Zedd       Zed	d       Zeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d
dZeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	y)r   c                    t        |       S a  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
        )RcsResourceWithRawResponseselfs    `/mnt/e/genesis-system/.venv_telnyx/lib/python3.12/site-packages/telnyx/resources/messages/rcs.pywith_raw_responsezRcsResource.with_raw_response   s     *$//    c                    t        |       S z
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
        ) RcsResourceWithStreamingResponser"   s    r$   with_streaming_responsez#RcsResource.with_streaming_response'   s     055r&   Nbodyphone_numberextra_headersextra_query
extra_bodytimeoutc                   |st        d|      | j                  d| t        ||||t        ||dt        j
                              t              S )  
        Generate a deeplink URL that can be used to start an RCS conversation with a
        specific agent.

        Args:
          body: Pre-filled message body (URL encoded)

          phone_number: Phone number in E164 format (URL encoded)

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        7Expected a non-empty value for `agent_id` but received /messages/rcs/deeplinks/r,   r-   r.   r/   r0   r1   queryoptionscast_to)
ValueError_getr   r   r   RcGenerateDeeplinkParamsr   r#   agent_idr,   r-   r.   r/   r0   r1   s           r$   generate_deeplinkzRcsResource.generate_deeplink0   ss    < VW_Vbcddyy&xj1(+'%% $(4 0HH /  
 	
r&   mms_fallbacksms_fallbacktypewebhook_urlr.   r/   r0   r1   c                   | j                  dt        ||||||||dt        j                        t	        |	|
||      t
              S )^  
        Send an RCS message

        Args:
          agent_id: RCS Agent ID

          messaging_profile_id: A valid messaging profile ID

          to: Phone number in +E.164 format

          type: Message type - must be set to "RCS"

          webhook_url: The URL where webhooks related to this message will be sent.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        /messages/rcsr@   agent_messagemessaging_profile_idtorC   rD   rE   rF   r.   r/   r0   r1   r,   r:   r;   )_postr   r   RcSendParamsr   r   r#   r@   rK   rL   rM   rC   rD   rE   rF   r.   r/   r0   r1   s                r$   sendzRcsResource.sendb   sh    P zz  (%2,@$0$0 #.	 ++ )+Q[el #%  
 	
r&   )returnr!   )rT   r)   r@   strr,   
str | Omitr-   rW   r.   Headers | Noner/   Query | Noner0   Body | Noner1   'float | httpx.Timeout | None | NotGivenrT   r   r@   rV   rK   r   rL   rV   rM   rV   rC   z!rc_send_params.MmsFallback | OmitrD   z!rc_send_params.SMSFallback | OmitrE   zLiteral['RCS'] | OmitrF   rW   r.   rX   r/   rY   r0   rZ   r1   r[   rT   r   
__name__
__module____qualname__r   r%   r*   r   r   rA   rS    r&   r$   r   r      s5   0 0 6 6  #' )-$("&;D0
0
 	0

 !0
 &0
 "0
  0
 90
 
$0
r ;?:>&*"& )-$("&;D!;
 ;
 ,	;

 ";
 ;
 8;
 8;
 $;
  ;
 &;
 ";
  ;
  9!;
" 
#;
r&   c            	          e Zd Zedd       Zed	d       Zeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d
dZeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	y)r   c                    t        |       S r    )AsyncRcsResourceWithRawResponser"   s    r$   r%   z"AsyncRcsResource.with_raw_response   s     /t44r&   c                    t        |       S r(   )%AsyncRcsResourceWithStreamingResponser"   s    r$   r*   z(AsyncRcsResource.with_streaming_response   s     5T::r&   Nr+   c                  K   |st        d|      | j                  d| t        ||||t        ||dt        j
                         d{         t               d{   S 7 7 w)r3   r4   r5   r6   Nr7   r9   )r<   r=   r   r   r   r>   r   r?   s           r$   rA   z"AsyncRcsResource.generate_deeplink   s     < VW_VbcddYY&xj1(+'%1 $(4 0HH  /  
 
 	

s$   A	A+A'A+"A)#A+)A+rB   c                  K   | j                  dt        ||||||||dt        j                         d{   t	        |	|
||      t
               d{   S 7 $7 w)rH   rI   rJ   NrN   rO   )rP   r   r   rQ   r   r   rR   s                r$   rS   zAsyncRcsResource.send   s     P ZZ, (%2,@$0$0 #.	 ++  )+Q[el #%   
 
 	

s!   3AA
AAAA)rT   rd   )rT   rf   rU   r\   r]   ra   r&   r$   r   r      s5   5 5 ; ;  #' )-$("&;D0
0
 	0

 !0
 &0
 "0
  0
 90
 
$0
r ;?:>&*"& )-$("&;D!;
 ;
 ,	;

 ";
 ;
 8;
 8;
 $;
  ;
 &;
 ";
  ;
  9!;
" 
#;
r&   c                      e Zd ZddZy)r!   c                z    || _         t        |j                        | _        t        |j                        | _        y N)_rcsr   rA   rS   r#   rcss     r$   __init__z#RcsResourceWithRawResponse.__init__%  s4    	!8!!"
 ,HH
	r&   Nrn   r   rT   Noner^   r_   r`   ro   ra   r&   r$   r!   r!   $      
r&   r!   c                      e Zd ZddZy)rd   c                z    || _         t        |j                        | _        t        |j                        | _        y rk   )rl   r   rA   rS   rm   s     r$   ro   z(AsyncRcsResourceWithRawResponse.__init__1  s4    	!>!!"
 2HH
	r&   Nrn   r   rT   rq   rr   ra   r&   r$   rd   rd   0  rs   r&   rd   c                      e Zd ZddZy)r)   c                z    || _         t        |j                        | _        t        |j                        | _        y rk   )rl   r   rA   rS   rm   s     r$   ro   z)RcsResourceWithStreamingResponse.__init__=  s4    	!=!!"
 1HH
	r&   Nrp   rr   ra   r&   r$   r)   r)   <  rs   r&   r)   c                      e Zd ZddZy)rf   c                z    || _         t        |j                        | _        t        |j                        | _        y rk   )rl   r   rA   rS   rm   s     r$   ro   z.AsyncRcsResourceWithStreamingResponse.__init__I  s4    	!C!!"
 7HH
	r&   Nrv   rr   ra   r&   r$   rf   rf   H  rs   r&   rf   ),
__future__r   typing_extensionsr   httpx_typesr   r   r   r	   r
   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   r   r   _base_clientr   types.messagesr   r   types.rcs_agent_message_paramr   types.messages.rc_send_responser   ,types.messages.rc_generate_deeplink_responser   __all__r   r   r!   rd   r)   rf   ra   r&   r$   <module>r      s    # %  K K K < & :  1 I A = V,
-A
/ A
HA
' A
H	
 	
	
 	
	
 	
	
 	
r&   