@bluelibs/runner - v6.3.1
    Preparing search index...

    Interface ITaskMiddlewareDefinition<TConfig, TEnforceInputContract, TEnforceOutputContract, TDependencies, TTags>

    Declarative task-middleware definition contract.

    interface ITaskMiddlewareDefinition<
        TConfig = any,
        TEnforceInputContract = void,
        TEnforceOutputContract = void,
        TDependencies extends DependencyMapType = any,
        TTags extends TaskMiddlewareTagType[] = TaskMiddlewareTagType[],
    > {
        configSchema?: ValidationSchemaInput<
            ResolveMiddlewareConfigContract<TConfig, TTags>,
        >;
        dependencies?:
            | TDependencies
            | (
                (
                    config: ResolveMiddlewareConfigContract<TConfig, TTags>,
                ) => TDependencies
            );
        id: string;
        meta?: IMiddlewareMeta;
        run: (
            input: ITaskMiddlewareExecutionInput<
                TEnforceInputContract extends void ? any : TEnforceInputContract,
                TEnforceOutputContract extends void ? any : TEnforceOutputContract,
            >,
            dependencies: DependencyValuesType<TDependencies>,
            config: ResolveMiddlewareConfigContract<TConfig, TTags>,
        ) => Promise<any>;
        tags?: TTags;
        throws?: ThrowsList;
    }

    Type Parameters

    Index

    Properties

    configSchema?: ValidationSchemaInput<
        ResolveMiddlewareConfigContract<TConfig, TTags>,
    >

    Optional validation schema for runtime config validation. When provided, middleware config will be validated when .with() is called.

    dependencies?:
        | TDependencies
        | (
            (
                config: ResolveMiddlewareConfigContract<TConfig, TTags>,
            ) => TDependencies
        )

    Static or lazy dependency map.

    id: string

    Stable middleware identifier.

    Optional metadata used by docs and tooling.

    run: (
        input: ITaskMiddlewareExecutionInput<
            TEnforceInputContract extends void ? any : TEnforceInputContract,
            TEnforceOutputContract extends void ? any : TEnforceOutputContract,
        >,
        dependencies: DependencyValuesType<TDependencies>,
        config: ResolveMiddlewareConfigContract<TConfig, TTags>,
    ) => Promise<any>

    The middleware body, called with task execution input.

    tags?: TTags

    Tags applied to the middleware definition.

    throws?: ThrowsList

    Declares which typed errors are part of this middleware's contract. Declarative only — does not imply DI or enforcement.