yuken 3 лет назад
Родитель
Сommit
9f6392d909
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      packages/app/src/interfaces/interceptor-manager.ts

+ 5 - 2
packages/app/src/interfaces/interceptor-manager.ts

@@ -1,12 +1,15 @@
 interface BasicInterceptor {
+  getId: () => string,
   isInterceptWhen: (contextName: string) => boolean,
   isProcessableParallel: () => boolean,
   process: (contextName: string, args: any) => Promise<any>
 }
 
 export interface IInterceptorManager {
+  interceptorAndOrders: {interceptor: BasicInterceptor, order: number}[],
+  interceptors: BasicInterceptor[],
   addInterceptor: (inerceptor: BasicInterceptor, order: number) => void,
   addInterceptors: (inerceptors: BasicInterceptor[], order: number) => void,
-  process: (contextName: string, args: any) => void,
-  doProcess: (inerceptor: BasicInterceptor, contextName: string, args: any) => void
+  process: (contextName: string, args: any) => Promise<void>,
+  doProcess: (inerceptor: BasicInterceptor, contextName: string, args: any) => Promise<void>
 }