
    0j                        d Z ddlmZ ddlmZmZmZmZmZm	Z	 ddl
mZ dZe G d d                      Z ed	          Z	 d%dee         dee         dee         deee         gee         f         fdZdee         defdZed         Ze G d d                      Ze G d d                      Ze G d de                      Ze G d de                      Ze G d d                      Ze G d de                      Ze G d d e                      Ze G d! d"e                      Ze G d# d$e                      Ze	eeeeeeef         Zd
S )&z[
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
    )	dataclass)CallableLiteralOptionalTypeTypeVarUnion   )
PluginBasezteams:pluginc                   b    e Zd ZU dZdZee         ed<   dZee         ed<   dZ	ee         ed<   dS )PluginOptionszPlugin metadataNnameversiondescription)
__name__
__module____qualname____doc__r   r   str__annotations__r   r        m/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/microsoft_teams/apps/plugins/metadata.pyr   r      sT         D(3-!GXc]!!!!%K#%%%%%r   r   TNr   r   r   returnc                 d     dt           t                   dt           t                   f fd}|S )z:Turns any class into a plugin using the decorator pattern.clsr   c                 z    p| j         }pd}pd}t          |||          }t          | t          |           | S )Nz0.0.0 )r   r   r   )r   r   setattrPLUGIN_METADATA_KEY)r   plugin_nameplugin_versionplugin_descriptionupdated_metadatar   r   r   s        r   	decoratorzPlugin.<locals>.decorator   sS    *cl +G(.B(k>_qrrr(*:;;;
r   )r   r   )r   r   r   r&   s   ``` r   Pluginr'      sK    
tAw 47         r   r   c                 f    t          | t          d          }|st          d| j         d          |S )z!Get plugin metadata from a class.Nztype z is not a valid plugin)getattrr!   
ValueErrorr   )r   metadatas     r   get_metadatar,   *   s>    s/66H GEEEEFFFOr   )erroractivitycustomc                       e Zd ZU dZeed<   dS )EventMetadataz,Information associated with the plugin eventr   N)r   r   r   r   PluginEventNamer   r   r   r   r1   r1   5   s$         66
r   r1   c                   J    e Zd ZU dZdZee         ed<   	 dZee	         ed<   dS )DependencyMetadataz/Information associated with a plugin dependencyNr   Foptional)
r   r   r   r   r   r   r   r   r5   boolr   r   r   r4   r4   =   sC         99D(3-.$Hhtn$$$IIr   r4   c                       e Zd ZdZdZdS )IdDependencyOptionsidTNr   r   r   r   r5   r   r   r   r8   r8   H   s        DHHHr   r8   c                       e Zd ZdZdZdS )NameDependencyOptionsr   TNr:   r   r   r   r<   r<   N   s        DHHHr   r<   c                   .    e Zd ZU dZdZee         ed<   dS )ManifestDependencyOptionsmanifestFr5   Nr   r   r   r   r5   r   r6   r   r   r   r   r>   r>   T   s+         D$Hhtn$$$$$r   r>   c                       e Zd ZdZdZdS )CredentialsDependencyOptionscredentialsTNr:   r   r   r   rB   rB   Z   s        DHHHr   rB   c                       e Zd ZdZdZdS )BotTokenDependencyOptions	bot_tokenTNr:   r   r   r   rE   rE   `   s        DHHHr   rE   c                   .    e Zd ZU dZdZee         ed<   dS )StorageDependencyOptionsstorageFr5   Nr@   r   r   r   rH   rH   f   s+         D$Hhtn$$$$$r   rH   c                   D    e Zd ZU dZee         ed<   dZee         ed<   dS )PluginDependencyOptionsNr   r5   )	r   r   r   r   r   r   r   r5   r6   r   r   r   rK   rK   l   s:         D(3-#Hhtn#####r   rK   )NNN)r   dataclassesr   typingr   r   r   r   r   r	   plugins.plugin_baser   r!   r   r   r   r'   r,   r2   r1   r4   r8   r<   r>   rB   rE   rH   rK   DependencyOptionsr   r   r   <module>rP      s^   
 " ! ! ! ! ! D D D D D D D D D D D D D D D D , , , , , ,$  & & & & & & & & GCLL ]a 
3-)1#LTUXMtAwia !    d:& =     78         J J J J J J J J     ,   
     .   
 % % % % % % % %
     #5   
      2   
 % % % % %1 % % %
 $ $ $ $ $0 $ $ $
     r   