@@ -3,7 +3,10 @@ import type { Request } from 'express';
33import MicroserviceRequest from '@core/microservice-request' ;
44import MicroserviceResponse from '@core/microservice-response' ;
55import type { IMicroserviceRequest } from '@interfaces/core/i-microservice-request' ;
6- import type { IMicroserviceResponseResult } from '@interfaces/core/i-microservice-response' ;
6+ import type {
7+ IMicroserviceResponseResult ,
8+ IMicroserviceResponse ,
9+ } from '@interfaces/core/i-microservice-response' ;
710import type { LogDriverType } from '@interfaces/drivers/console-log' ;
811import AbstractMicroservice from '@services/abstract-microservice' ;
912
@@ -30,7 +33,7 @@ type ProcessExitHandler = (eventOrExitCodeOrError: Error | number) => void | Pro
3033
3134type MiddlewareData < TParams = Record < string , any > , TPayload = Record < string , any > > = {
3235 task : MicroserviceRequest < TParams , TPayload > ;
33- result ?: IMicroserviceResponseResult ;
36+ result ?: IMicroserviceResponse < TParams > [ 'result' ] ;
3437} ;
3538
3639type MiddlewareClientRequest = ITask [ 'req' ] | Request ;
@@ -41,8 +44,7 @@ type MiddlewareHandler = (
4144) =>
4245 | IMicroserviceRequest [ 'params' ]
4346 | Promise < IMicroserviceRequest [ 'params' ] >
44- | IMicroserviceResponseResult
45- | Promise < IMicroserviceResponseResult > ;
47+ | IMicroserviceResponseResult ;
4648
4749enum MiddlewareType {
4850 request = 'request' ,
0 commit comments