output
    Preparing search index...

    Type Alias WorkflowFunction<InputSchema, OutputSchema>

    WorkflowFunction: InputSchema extends AnyZodSchema
        ? (
            input: z.infer<InputSchema>,
            context: WorkflowContext<InputSchema, OutputSchema>,
        ) => Promise<
            OutputSchema extends AnyZodSchema ? z.input<OutputSchema> : void,
        >
        : (
            input: undefined | null,
            context: WorkflowContext<InputSchema, OutputSchema>,
        ) => Promise<
            OutputSchema extends AnyZodSchema ? z.input<OutputSchema> : void,
        >

    The handler function of a workflow.

    Type Parameters

    • InputSchema extends AnyZodSchema | undefined = undefined
    • OutputSchema extends AnyZodSchema | undefined = undefined

    Parsed workflow input (z.infer<inputSchema>).

    A context object with tools and information.

    A value accepted by outputSchema before parse (z.input<outputSchema>).