UNPKG

2.85 kBTypeScriptView Raw
1import { Injectable } from '@nestjs/common/interfaces';
2import { Controller } from '@nestjs/common/interfaces/controllers/controller.interface';
3import { NestContainer } from '@nestjs/core/injector/container';
4import { Injector } from '@nestjs/core/injector/injector';
5import { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';
6import { Module } from '@nestjs/core/injector/module';
7import { GraphInspector } from '@nestjs/core/inspector/graph-inspector';
8import { Observable, ObservedValueOf } from 'rxjs';
9import { IClientProxyFactory } from './client/client-proxy-factory';
10import { ClientsContainer } from './container';
11import { ExceptionFiltersContext } from './context/exception-filters-context';
12import { RpcContextCreator } from './context/rpc-context-creator';
13import { Transport } from './enums';
14import { CustomTransportStrategy, MessageHandler, PatternMetadata } from './interfaces';
15import { EventOrMessageListenerDefinition } from './listener-metadata-explorer';
16import { Server } from './server/server';
17export declare class ListenersController {
18 private readonly clientsContainer;
19 private readonly contextCreator;
20 private readonly container;
21 private readonly injector;
22 private readonly clientFactory;
23 private readonly exceptionFiltersContext;
24 private readonly graphInspector;
25 private readonly metadataExplorer;
26 private readonly exceptionFiltersCache;
27 constructor(clientsContainer: ClientsContainer, contextCreator: RpcContextCreator, container: NestContainer, injector: Injector, clientFactory: IClientProxyFactory, exceptionFiltersContext: ExceptionFiltersContext, graphInspector: GraphInspector);
28 registerPatternHandlers(instanceWrapper: InstanceWrapper<Controller | Injectable>, server: Server & CustomTransportStrategy, moduleKey: string): void;
29 insertEntrypointDefinition(instanceWrapper: InstanceWrapper, definition: EventOrMessageListenerDefinition, transportId: Transport | symbol): void;
30 forkJoinHandlersIfAttached(currentReturnValue: Promise<unknown> | Observable<unknown>, originalArgs: unknown[], handlerRef: MessageHandler): Observable<unknown> | Promise<unknown>;
31 assignClientsToProperties(instance: Controller | Injectable): void;
32 assignClientToInstance<T = any>(instance: Controller | Injectable, property: string, client: T): void;
33 createRequestScopedHandler(wrapper: InstanceWrapper, pattern: PatternMetadata, moduleRef: Module, moduleKey: string, methodKey: string, defaultCallMetadata?: Record<string, any>, isEventHandler?: boolean): MessageHandler<any, any, any>;
34 private getContextId;
35 transformToObservable<T>(resultOrDeferred: Observable<T> | Promise<T>): Observable<T>;
36 transformToObservable<T>(resultOrDeferred: T): never extends Observable<ObservedValueOf<T>> ? Observable<T> : Observable<ObservedValueOf<T>>;
37}