o
    5)i                     @   s   d dl Z d dlZd dlZd dlmZ eejj eej	ej
eddd eddZedd	Zdd
ededefddZdS )    N)load_dotenvz..z.env)dotenv_pathLARAVEL_BASE_URLzhttps://oms.siteLARAVEL_MCP_TOKEN endpointparamsreturnc                 C   sL   t jt d|  dd |pi  D dt ddddd	}|  | S )
z2GET /api/v1/mcp/{endpoint} with bearer token auth.z/api/v1/mcp/c                 S   s   i | ]\}}|d ur||qS N ).0kvr   r   4/var/www/html/oms-prod-mcp/oms_mcp/laravel_client.py
<dictcomp>   s    zget.<locals>.<dictcomp>zBearer zapplication/json)AuthorizationAcceptg      4@F)r   headerstimeoutverify)httpxgetBASE_URLitemsTOKENraise_for_statusjson)r   r   respr   r   r   r      s   r   r
   )r   osurllib3dotenvr   disable_warnings
exceptionsInsecureRequestWarningpathjoindirname__file__getenvr   r   strdictr   r   r   r   r   <module>   s    