Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExternalContextCreator

Hierarchy

  • ExternalContextCreator

Index

Constructors

constructor

Properties

Private container

container: NestContainer

Private Readonly contextUtils

contextUtils: ContextUtils = new ContextUtils()

Private Readonly externalErrorProxy

externalErrorProxy: ExternalErrorProxy = new ExternalErrorProxy()

Private Readonly filtersContextCreator

filtersContextCreator: ExternalExceptionFilterContext

Private Readonly guardsConsumer

guardsConsumer: GuardsConsumer

Private Readonly guardsContextCreator

guardsContextCreator: GuardsContextCreator

Private Readonly handlerMetadataStorage

handlerMetadataStorage: HandlerMetadataStorage<ExternalHandlerMetadata, any> = new HandlerMetadataStorage<ExternalHandlerMetadata>()

Private Readonly interceptorsConsumer

interceptorsConsumer: InterceptorsConsumer

Private Readonly interceptorsContextCreator

interceptorsContextCreator: InterceptorsContextCreator

Private Readonly modulesContainer

modulesContainer: ModulesContainer

Private Readonly pipesConsumer

pipesConsumer: PipesConsumer

Private Readonly pipesContextCreator

pipesContextCreator: PipesContextCreator

Methods

create

  • create<TParamsMetadata, TContext>(instance: Controller, callback: (...args: unknown[]) => unknown, methodName: string, metadataKey?: string, paramsFactory?: ParamsFactory, contextId?: ContextId, inquirerId?: string, options?: ExternalContextOptions, contextType?: TContext): target
  • Type parameters

    • TParamsMetadata: ParamsMetadata = ParamsMetadata

    • TContext: string = ContextType

    Parameters

    • instance: Controller
    • callback: (...args: unknown[]) => unknown
        • (...args: unknown[]): unknown
        • Parameters

          • Rest ...args: unknown[]

          Returns unknown

    • methodName: string
    • Optional metadataKey: string
    • Optional paramsFactory: ParamsFactory
    • Default value contextId: ContextId = STATIC_CONTEXT
    • Optional inquirerId: string
    • Default value options: ExternalContextOptions = {interceptors: true,guards: true,filters: true,}
    • Default value contextType: TContext = 'http' as TContext

    Returns target

createGuardsFn

  • createGuardsFn<TContext>(guards: any[], instance: Controller, callback: (...args: any[]) => any, contextType?: TContext): Function | null

createPipesFn

  • createPipesFn(pipes: PipeTransform[], paramsOptions: (ParamProperties & { metatype?: unknown })[]): pipesFn

exchangeKeysForValues

getContextModuleName

  • getContextModuleName(constructor: Function): string

getMetadata

getParamValue

  • getParamValue<T>(value: T, __namedParameters: { data: any; metatype: any; type: any }, pipes: PipeTransform[]): Promise<any>

getProviderByClassName

  • getProviderByClassName(module: Module, className: string): boolean

registerRequestProvider

  • registerRequestProvider<T>(request: T, contextId: ContextId): void

transformToResult

  • transformToResult(resultOrDeffered: any): Promise<any>

Static fromContainer

Generated using TypeDoc