import * as plugins from './typedrequest.plugins.js'; import { TypedHandler } from './typedrequest.classes.typedhandler.js'; /** * A typed router decides on which typed handler to call based on the method * specified in the typed request * This is thought for reusing the same url endpoint for different methods */ export declare class TypedRouter { routerMap: plugins.lik.ObjectMap; handlerMap: plugins.lik.ObjectMap>; fireEventInterestMap: plugins.lik.InterestMap; /** * adds the handler to the routing map * @param typedHandlerArg */ addTypedHandler(typedHandlerArg: TypedHandler): void; /** * adds another sub typedRouter * @param typedRequest */ addTypedRouter(typedRouterArg: TypedRouter): void; checkForTypedHandler(methodArg: string): boolean; /** * gets a typed Router from the router chain, upstream and downstream * @param methodArg * @param checkUpstreamRouter */ getTypedHandlerForMethod(methodArg: string, checkedRouters?: TypedRouter[]): TypedHandler; /** * if typedrequest object has correlation.phase === 'request' -> routes a typed request object to a handler * if typedrequest object has correlation.phase === 'response' -> routes a typed request object to request fire event * @param typedRequestArg */ routeAndAddResponse(typedRequestArg: T, localRequestArg?: boolean): Promise; }