1 | import { Observable } from 'rxjs';
|
2 | import { CallHandler, ExecutionContext, NestInterceptor } from '../interfaces';
|
3 | import { ClassTransformOptions } from '../interfaces/external/class-transform-options.interface';
|
4 | import { TransformerPackage } from '../interfaces/external/transformer-package.interface';
|
5 | export interface PlainLiteralObject {
|
6 | [key: string]: any;
|
7 | }
|
8 | export interface ClassSerializerInterceptorOptions extends ClassTransformOptions {
|
9 | transformerPackage?: TransformerPackage;
|
10 | }
|
11 | export declare class ClassSerializerInterceptor implements NestInterceptor {
|
12 | protected readonly reflector: any;
|
13 | protected readonly defaultOptions: ClassSerializerInterceptorOptions;
|
14 | constructor(reflector: any, defaultOptions?: ClassSerializerInterceptorOptions);
|
15 | intercept(context: ExecutionContext, next: CallHandler): Observable<any>;
|
16 | /**
|
17 | * Serializes responses that are non-null objects nor streamable files.
|
18 | */
|
19 | serialize(response: PlainLiteralObject | Array<PlainLiteralObject>, options: ClassTransformOptions): PlainLiteralObject | Array<PlainLiteralObject>;
|
20 | transformToPlain(plainOrClass: any, options: ClassTransformOptions): PlainLiteralObject;
|
21 | protected getContextOptions(context: ExecutionContext): ClassTransformOptions | undefined;
|
22 | private reflectSerializeMetadata;
|
23 | }
|