
    i                     \    d dl mZmZ d dlmZmZ d dlmZ d dlm	Z	  G d de          Z
dS )	    )ABCMetaabstractmethod)CallableOptional)BoltRequest)BoltResponsec            
       r    e Zd ZdZedededeg ef         dee         fd            Z	e
defd            ZdS )	
MiddlewarezUA middleware can process request data before other middleware and listener functions.reqrespnextreturnc                    t                      )aY  Processes a request data before other middleware and listeners.
        A middleware calls `next()` function if the chain should continue.

            @app.middleware
            def simple_middleware(req, resp, next):
                # do something here
                next()

        This `process(req, resp, next)` method is supposed to be invoked only inside bolt-python.
        If you want to avoid the name `next()` in your middleware functions, you can use `next_()` method instead.

            @app.middleware
            def simple_middleware(req, resp, next_):
                # do something here
                next_()

        Args:
            req: The incoming request
            resp: The response
            next: The function to tell the chain that it can continue

        Returns:
            Processed response (optional)
        )NotImplementedError)selfr   r   r   s       [/root/projects/butler/venv/lib/python3.11/site-packages/slack_bolt/middleware/middleware.pyprocesszMiddleware.process   s    F "###    c                 .    | j          d| j        j         S )zThe name of this middleware.)
__module__	__class____name__)r   s    r   namezMiddleware.name0   s     /==DN$;===r   N)r   r   __qualname____doc__r   r   r   r   r   r   propertystrr    r   r   r
   r
      s        __"$ "$ 	"$ r<'("$ 
,	"$ "$ "$ ^"$H >c > > > X> > >r   r
   )	metaclassN)abcr   r   typingr   r   slack_bolt.requestr   slack_bolt.responser   r
   r   r   r   <module>r%      s    ' ' ' ' ' ' ' ' % % % % % % % % * * * * * * , , , , , ,+> +> +> +> +>7 +> +> +> +> +> +>r   