output
    Preparing search index...

    Type Alias WorkflowFunctionWrapper<InputSchema, OutputSchema>

    WorkflowFunctionWrapper: InputSchema extends AnyZodSchema
        ? (
            input: z.input<InputSchema>,
            options?: WorkflowInvocationOptions,
        ) => Promise<
            OutputSchema extends AnyZodSchema ? z.infer<OutputSchema> : void,
        >
        : (
            input?: null,
            options?: WorkflowInvocationOptions,
        ) => Promise<
            OutputSchema extends AnyZodSchema ? z.infer<OutputSchema> : void,
        >

    A wrapper around the user defined fn handler function.

    Callers pass values accepted by inputSchema (z.input). The wrapper parses input, invokes fn, parses output, and returns z.infer<outputSchema>.

    The second argument is a WorkflowInvocationOptions object, allowing workflows configuration overwrite.

    Type Parameters

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

    The workflow input before inputSchema parse.

    Additional options for the invocation.

    The workflow output after outputSchema parse.