1 | import { ContextType, Controller, PipeTransform } from '@nestjs/common/interfaces';
|
2 | import { GuardsConsumer } from '@nestjs/core/guards/guards-consumer';
|
3 | import { GuardsContextCreator } from '@nestjs/core/guards/guards-context-creator';
|
4 | import { ParamProperties } from '@nestjs/core/helpers/context-utils';
|
5 | import { ExecutionContextHost } from '@nestjs/core/helpers/execution-context-host';
|
6 | import { ParamsMetadata } from '@nestjs/core/helpers/interfaces';
|
7 | import { InterceptorsConsumer, InterceptorsContextCreator } from '@nestjs/core/interceptors';
|
8 | import { PipesConsumer, PipesContextCreator } from '@nestjs/core/pipes';
|
9 | import { WsParamsFactory } from '../factories/ws-params-factory';
|
10 | import { ExceptionFiltersContext } from './exception-filters-context';
|
11 | import { WsProxy } from './ws-proxy';
|
12 | type WsParamProperties = ParamProperties & {
|
13 | metatype?: any;
|
14 | };
|
15 | export interface WsHandlerMetadata {
|
16 | argsLength: number;
|
17 | paramtypes: any[];
|
18 | getParamsMetadata: (moduleKey: string) => WsParamProperties[];
|
19 | }
|
20 | export declare class WsContextCreator {
|
21 | private readonly wsProxy;
|
22 | private readonly exceptionFiltersContext;
|
23 | private readonly pipesContextCreator;
|
24 | private readonly pipesConsumer;
|
25 | private readonly guardsContextCreator;
|
26 | private readonly guardsConsumer;
|
27 | private readonly interceptorsContextCreator;
|
28 | private readonly interceptorsConsumer;
|
29 | private readonly contextUtils;
|
30 | private readonly wsParamsFactory;
|
31 | private readonly handlerMetadataStorage;
|
32 | constructor(wsProxy: WsProxy, exceptionFiltersContext: ExceptionFiltersContext, pipesContextCreator: PipesContextCreator, pipesConsumer: PipesConsumer, guardsContextCreator: GuardsContextCreator, guardsConsumer: GuardsConsumer, interceptorsContextCreator: InterceptorsContextCreator, interceptorsConsumer: InterceptorsConsumer);
|
33 | create<T extends ParamsMetadata = ParamsMetadata>(instance: Controller, callback: (...args: unknown[]) => void, moduleKey: string, methodName: string): (...args: any[]) => Promise<void>;
|
34 | reflectCallbackParamtypes(instance: Controller, callback: (...args: any[]) => any): any[];
|
35 | reflectCallbackPattern(callback: (...args: any[]) => any): string;
|
36 | createGuardsFn<TContext extends string = ContextType>(guards: any[], instance: Controller, callback: (...args: unknown[]) => any, contextType?: TContext): Function | null;
|
37 | getMetadata<TMetadata, TContext extends ContextType = ContextType>(instance: Controller, methodName: string, contextType: TContext): WsHandlerMetadata;
|
38 | exchangeKeysForValues<TMetadata = any>(keys: string[], metadata: TMetadata, moduleContext: string, paramsFactory: WsParamsFactory, contextFactory: (args: unknown[]) => ExecutionContextHost): ParamProperties[];
|
39 | createPipesFn(pipes: PipeTransform[], paramsOptions: (ParamProperties & {
|
40 | metatype?: unknown;
|
41 | })[]): (args: unknown[], ...params: unknown[]) => Promise<void>;
|
42 | getParamValue<T>(value: T, { metatype, type, data }: {
|
43 | metatype: any;
|
44 | type: any;
|
45 | data: any;
|
46 | }, pipes: PipeTransform[]): Promise<any>;
|
47 | }
|
48 | export {};
|