import { RestRequest } from './request'; import { RestResponse } from './response'; export type RestMiddlewareNextFunction = (request: RestRequest, response: RestResponse) => void; export type RestMiddlewareFunction = (request: RestRequest, response: RestResponse, next: RestMiddlewareNextFunction) => Promise | unknown; export interface RestMiddleware { callback(request: RestRequest, response: RestResponse, next: RestMiddlewareNextFunction): Promise | unknown; }