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 } from '@nestjs/core/interceptors/interceptors-consumer';
|
8 | import { InterceptorsContextCreator } from '@nestjs/core/interceptors/interceptors-context-creator';
|
9 | import { PipesConsumer } from '@nestjs/core/pipes/pipes-consumer';
|
10 | import { PipesContextCreator } from '@nestjs/core/pipes/pipes-context-creator';
|
11 | import { Observable } from 'rxjs';
|
12 | import { RpcParamsFactory } from '../factories/rpc-params-factory';
|
13 | import { ExceptionFiltersContext } from './exception-filters-context';
|
14 | import { RpcProxy } from './rpc-proxy';
|
15 | type RpcParamProperties = ParamProperties & {
|
16 | metatype?: any;
|
17 | };
|
18 | export interface RpcHandlerMetadata {
|
19 | argsLength: number;
|
20 | paramtypes: any[];
|
21 | getParamsMetadata: (moduleKey: string) => RpcParamProperties[];
|
22 | }
|
23 | export declare class RpcContextCreator {
|
24 | private readonly rpcProxy;
|
25 | private readonly exceptionFiltersContext;
|
26 | private readonly pipesContextCreator;
|
27 | private readonly pipesConsumer;
|
28 | private readonly guardsContextCreator;
|
29 | private readonly guardsConsumer;
|
30 | private readonly interceptorsContextCreator;
|
31 | private readonly interceptorsConsumer;
|
32 | private readonly contextUtils;
|
33 | private readonly rpcParamsFactory;
|
34 | private readonly handlerMetadataStorage;
|
35 | constructor(rpcProxy: RpcProxy, exceptionFiltersContext: ExceptionFiltersContext, pipesContextCreator: PipesContextCreator, pipesConsumer: PipesConsumer, guardsContextCreator: GuardsContextCreator, guardsConsumer: GuardsConsumer, interceptorsContextCreator: InterceptorsContextCreator, interceptorsConsumer: InterceptorsConsumer);
|
36 | create<T extends ParamsMetadata = ParamsMetadata>(instance: Controller, callback: (...args: unknown[]) => Observable<any>, moduleKey: string, methodName: string, contextId?: import("@nestjs/core").ContextId, inquirerId?: string, defaultCallMetadata?: Record<string, any>): (...args: any[]) => Promise<Observable<any>>;
|
37 | reflectCallbackParamtypes(instance: Controller, callback: (...args: unknown[]) => unknown): unknown[];
|
38 | createGuardsFn<TContext extends string = ContextType>(guards: any[], instance: Controller, callback: (...args: unknown[]) => unknown, contextType?: TContext): Function | null;
|
39 | getMetadata<TMetadata, TContext extends ContextType = ContextType>(instance: Controller, methodName: string, defaultCallMetadata: Record<string, any>, contextType: TContext): RpcHandlerMetadata;
|
40 | exchangeKeysForValues<TMetadata = any>(keys: string[], metadata: TMetadata, moduleContext: string, paramsFactory: RpcParamsFactory, contextFactory: (args: unknown[]) => ExecutionContextHost): ParamProperties[];
|
41 | createPipesFn(pipes: PipeTransform[], paramsOptions: (ParamProperties & {
|
42 | metatype?: unknown;
|
43 | })[]): (args: unknown[], ...params: unknown[]) => Promise<void>;
|
44 | getParamValue<T>(value: T, { metatype, type, data }: {
|
45 | metatype: any;
|
46 | type: any;
|
47 | data: any;
|
48 | }, pipes: PipeTransform[]): Promise<any>;
|
49 | }
|
50 | export {};
|