output-sdk
    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.infer<OutputSchema> : void,
        >
        : (
            input?: null,
            context: WorkflowContext<InputSchema, OutputSchema>,
        ) => Promise<
            OutputSchema extends AnyZodSchema ? z.infer<OutputSchema> : void,
        >

    The handler function of a workflow.

    Type Parameters

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

    The workflow input; it matches the schema defined by inputSchema.

    A context object with tools and information.

    A value matching the schema defined by outputSchema.