Interface Flow<I, O, S>

Flow is an observable, streamable, (optionally) strongly typed function.

interface Flow<
    I extends ZodTypeAny = ZodTypeAny,
    O extends ZodTypeAny = ZodTypeAny,
    S extends ZodTypeAny = ZodTypeAny,
> {
    __action: ActionMetadata<I, O, S>;
    __registry: Registry;
    run(
        input: TypeOf<I>,
        options?: ActionRunOptions<TypeOf<S>>,
    ): Promise<ActionResult<TypeOf<O>>>;
    stream(
        input?: TypeOf<I>,
        opts?: ActionRunOptions<TypeOf<S>>,
    ): StreamingResponse<O, S>;
    (input?: TypeOf<I>, options?: ActionRunOptions<S>): Promise<TypeOf<O>>;
}

Type Parameters

Hierarchy (View Summary)

  • Parameters

    • Optionalinput: TypeOf<I>
    • Optionaloptions: ActionRunOptions<S>

    Returns Promise<TypeOf<O>>

Properties

Methods

Properties

__action: ActionMetadata<I, O, S>
__registry: Registry

Methods

  • Parameters

    Returns Promise<ActionResult<TypeOf<O>>>