
    i                     R    d dl mZ d dlmZmZmZmZ d dlmZ  G d de	          Z
dS )    )Logger)AnyDictOptionalTuple)AuthorizeResultc                      e Zd ZdZg dZg dZeez   Zedefd            Z	ede
e         fd            Zede
e         fd            Zede
e         fd            Zede
e         fd	            Zede
e         fd
            Zede
e         fd            Zede
e         fd            Zede
e         fd            Zede
e         fd            Zede
e         fd            Zede
e         fd            Zede
e         fd            Zede
e         fd            Zede
eeef                  fd            Zede
e         fd            Zede
e         fd            Z ede
e         fd            Z!ede
e         fd            Z"ede
e         fd            Z#ede
e         fd            Z$defdZ%dS )BaseContextz4Context object associated with a request from Slack.)loggertokenenterprise_idis_enterprise_installteam_iduser_idactor_enterprise_idactor_team_idactor_user_id
channel_id	thread_tsresponse_urlmatchesauthorize_resultfunction_bot_access_token	bot_tokenbot_idbot_user_id
user_tokenfunction_execution_idinputsclientacksayrespondcompletefail
set_status	set_titleset_suggested_prompts)listener_runnerget_thread_contextsave_thread_contextreturnc                     | d         S )zJThe properly configured logger that is available for middleware/listeners.r    selfs    Z/root/projects/butler/venv/lib/python3.11/site-packages/slack_bolt/context/base_context.pyr   zBaseContext.logger6   s     H~    c                 ,    |                      d          S )z/The (bot/user) token resolved for this request.r   getr/   s    r1   r   zBaseContext.token;   s     xx   r2   c                 ,    |                      d          S )z4The Enterprise Grid Organization ID of this request.r   r4   r/   s    r1   r   zBaseContext.enterprise_id@   s     xx(((r2   c                 ,    |                      d          S )z@True if the request is associated with an Org-wide installation.r   r4   r/   s    r1   r   z!BaseContext.is_enterprise_installE   s     xx/000r2   c                 ,    |                      d          S )z!The Workspace ID of this request.r   r4   r/   s    r1   r   zBaseContext.team_idJ        xx	"""r2   c                 ,    |                      d          S )z(The user ID associated ith this request.r   r4   r/   s    r1   r   zBaseContext.user_idO   r9   r2   c                 ,    |                      d          S )a  The action's actor's Enterprise Grid organization ID.
        Note that this property is especially useful for handling events in Slack Connect channels.
        That being said, it's not guaranteed to have a valid ID for all events due to server-side inconsistency.
        r   r4   r/   s    r1   r   zBaseContext.actor_enterprise_idT   s     xx-...r2   c                 ,    |                      d          S )a   The action's actor's workspace ID.
        Note that this property is especially useful for handling events in Slack Connect channels.
        That being said, it's not guaranteed to have a valid ID for all events due to server-side inconsistency.
        r   r4   r/   s    r1   r   zBaseContext.actor_team_id\        xx(((r2   c                 ,    |                      d          S )zThe action's actor's user ID.
        Note that this property is especially useful for handling events in Slack Connect channels.
        That being said, it's not guaranteed to have a valid ID for all events due to server-side inconsistency.
        r   r4   r/   s    r1   r   zBaseContext.actor_user_idd   r=   r2   c                 ,    |                      d          S )z1The conversation ID associated with this request.r   r4   r/   s    r1   r   zBaseContext.channel_idl        xx%%%r2   c                 ,    |                      d          S )z:The conversation thread's ID associated with this request.r   r4   r/   s    r1   r   zBaseContext.thread_tsq        xx$$$r2   c                 ,    |                      d          S )z0The `response_url` associated with this request.r   r4   r/   s    r1   r   zBaseContext.response_urlv   s     xx'''r2   c                 ,    |                      d          S )z:Returns all the matched parts in message listener's regexpr   r4   r/   s    r1   r   zBaseContext.matches{   r9   r2   c                 ,    |                      d          S )zThe `function_execution_id` associated with this request.
        Only available for `function_executed` and interactivity events scoped to a custom step.
        r   r4   r/   s    r1   r   z!BaseContext.function_execution_id   s    
 xx/000r2   c                 ,    |                      d          S )zThe `inputs` associated with this request.
        Only available for `function_executed` and interactivity events scoped to a custom step.
        r   r4   r/   s    r1   r   zBaseContext.inputs   s    
 xx!!!r2   c                 ,    |                      d          S )z/The authorize result resolved for this request.r   r4   r/   s    r1   r   zBaseContext.authorize_result   s     xx*+++r2   c                 ,    |                      d          S )zThe bot token resolved for this function request.
        Only available for `function_executed` and interactivity events scoped to a custom step.
        r   r4   r/   s    r1   r   z%BaseContext.function_bot_access_token   s    
 xx3444r2   c                 ,    |                      d          S )z(The bot token resolved for this request.r   r4   r/   s    r1   r   zBaseContext.bot_token   rB   r2   c                 ,    |                      d          S )z%The bot ID resolved for this request.r   r4   r/   s    r1   r   zBaseContext.bot_id   s     xx!!!r2   c                 ,    |                      d          S )z*The bot user ID resolved for this request.r   r4   r/   s    r1   r   zBaseContext.bot_user_id   s     xx&&&r2   c                 ,    |                      d          S )z)The user token resolved for this request.r   r4   r/   s    r1   r   zBaseContext.user_token   r@   r2   r   c                     || d<   |j         
|j         | d<   |j        
|j        | d<   |j        
|j        | d<   |j        
|j        | d<   |j        |j        | d<   d S d S )Nr   r   r   r   r   r   )r   r   r   r   r   )r0   r   s     r1   set_authorize_resultz BaseContext.set_authorize_result   s    #3 ".-4DN'3"2">D%1 0 :D#/.6DO&2!1!<D 32r2   N)&__name__
__module____qualname____doc__ copyable_standard_property_names$non_copyable_standard_property_namesstandard_property_namespropertyr   r   r   strr   r   boolr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rN   r.   r2   r1   r
   r
      s       >>( ( ($H, , ,( ?Aee    X !x} ! ! ! X! )x} ) ) ) X) 1x~ 1 1 1 X1 ## # # # X# ## # # # X# /Xc] / / / X/ )x} ) ) ) X) )x} ) ) ) X) &HSM & & & X& %8C= % % % X% (hsm ( ( ( X( #% # # # X# 1x} 1 1 1 X1 "c3h0 " " " X" ,(?"; , , , X, 58C= 5 5 5 X5 %8C= % % % X% " " " " X" 'Xc] ' ' ' X' &HSM & & & X&=_ = = = = = =r2   r
   N)loggingr   typingr   r   r   r   slack_bolt.authorizationr   dictr
   r.   r2   r1   <module>r]      s          - - - - - - - - - - - - 4 4 4 4 4 4t= t= t= t= t=$ t= t= t= t= t=r2   