o
    ~hG                     @   s   d dl Z d dlmZmZmZ d dlmZmZ ddlm	Z	 deee
ef  deee
ef  fdd	Zd
ee
e
f deee
e
f  dee
e
f fddZde	ddfddZdS )    N)OptionalDictAny)_parse_web_class_objectsget_user_agent   )WebhookResponseoriginal_bodyreturnc                 C   s&   | rdd |   D }t| |S d S )Nc                 S   s   i | ]\}}|d ur||qS )N ).0kvr   r   X/var/www/html/zoom/venv/lib/python3.10/site-packages/slack_sdk/webhook/internal_utils.py
<dictcomp>   s    z_build_body.<locals>.<dictcomp>)itemsr   )r	   bodyr   r   r   _build_body   s
   r   default_headersadditional_headersc                 C   sR   | d u r
|d u r
i S ddi}| d u sd| vrt  |d< ||  |r'|| |S )NzContent-Typezapplication/json;charset=utf-8z
User-Agent)r   update)r   r   request_headersr   r   r   _build_request_headers   s   


r   respc                 C   s:   | j tjkr| d|j dt|j d|j  d S d S )Nz*Received the following response - status: z, headers: z, body: )levelloggingDEBUGdebugstatus_codedictheadersr   )loggerr   r   r   r   _debug_log_response&   s   r"   )r   typingr   r   r   slack_sdk.web.internal_utilsr   r   webhook_responser   strr   r   r"   r   r   r   r   <module>   s    *


