16 lines
572 B
TypeScript
16 lines
572 B
TypeScript
import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
|
|
import { Reflector } from '@nestjs/core';
|
|
import { Observable } from 'rxjs';
|
|
export interface StandardApiResponse<T> {
|
|
success: boolean;
|
|
statusCode: number;
|
|
path: string;
|
|
timestamp: string;
|
|
data: T;
|
|
}
|
|
export declare class ResponseInterceptor<T> implements NestInterceptor<T, StandardApiResponse<T>> {
|
|
private readonly reflector;
|
|
constructor(reflector: Reflector);
|
|
intercept(context: ExecutionContext, next: CallHandler): Observable<StandardApiResponse<T>>;
|
|
}
|