Interface Flow<I, O, S>

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

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

Type Parameters

Hierarchy (View Summary)

  • Parameters

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

    Returns Promise<z.TypeOf<O>>

Properties

Methods

Properties

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

Methods

  • Parameters

    Returns Promise<ActionResult<z.TypeOf<O>>>