operation-log.interceptor.d.ts 845 B

1234567891011121314
  1. import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
  2. import { Reflector } from '@nestjs/core';
  3. import { Observable } from 'rxjs';
  4. import { ApiResponse } from '../interfaces/api-response.interface';
  5. import { IOperationLogger } from '../interfaces/operation-logger.interface';
  6. import { ExceptionService } from '../services/exception.service';
  7. export declare class OperationLogInterceptor implements NestInterceptor {
  8. private readonly reflector;
  9. private readonly operationLogger;
  10. private readonly exceptionService;
  11. constructor(reflector: Reflector, operationLogger: IOperationLogger | null, exceptionService: ExceptionService);
  12. intercept(context: ExecutionContext, next: CallHandler): Observable<any>;
  13. log(context: ExecutionContext, data: ApiResponse<unknown>, status: boolean): Promise<void>;
  14. }