o
    V
h                     @   s  d dl mZmZmZ d dlmZ d dlmZmZ ddl	m
Z
 e ZG dd deZG dd	 d	eZG d
d deZG dd deZedd!dedefddZejdeddefddZejdeddefddZejdeddedefddZeddefddZd S )"    )	APIRouterDependsHTTPException)	BaseModel)ListUnion   )get_current_userc                   @   s.   e Zd ZU eed< eed< eed< eed< dS )IntegrationBasenamedescriptionlogo_urlsetup_instructionsN)__name__
__module____qualname__str__annotations__ r   r   ?/var/www/html/moveengine/app/v1/routers/platform/marketplace.pyr
   
   s
   
 r
   c                   @      e Zd ZdS )IntegrationCreateNr   r   r   r   r   r   r   r          r   c                   @   s$   e Zd ZU eed< G dd dZdS )Integrationintegration_idc                   @   s   e Zd ZdZdS )zIntegration.ConfigTN)r   r   r   orm_moder   r   r   r   Config   s    r   N)r   r   r   intr   r   r   r   r   r   r      s   
 r   c                   @   r   )IntegrationUpdateNr   r   r   r   r   r      r   r   /
   skiplimitc                    s   dd t | | | D S )z List all available integrations.c                 S   s(   g | ]}|d | d| dddqS )integration_desc_/path/to/logoFollow these steps...r   r   r   r   r   r   ).0ir   r   r   
<listcomp>"   s   ( z%list_integrations.<locals>.<listcomp>)range)r"   r#   r   r   r   list_integrations   s   r-   )response_modelintegrationc                    s   i |   ddiS )z)Add a new integration to the marketplace.r   {   dict)r/   r   r   r   add_integration$   s   r3   z/{integration_id}r   c                    s   | d|  d|  dddS )z+Retrieve details of a specific integration.r$   r%   r&   r'   r(   r   r   r   r   r   read_integration+   s   r5   c                    s   i |  d| iS )z)Update details of a specific integration.r   r1   )r   r/   r   r   r   update_integration1   s   r6   c                    s   dd|  ddS )z3Remove a specific integration from the marketplace.successzIntegration z removed successfully)statusmessager   r4   r   r   r   remove_integration7   s   r:   N)r   r!   )fastapir   r   r   pydanticr   typingr   r   dependenciesr	   routerr
   r   r   r   getr   r-   postr3   r5   putr6   deleter:   r   r   r   r   <module>   s&    