/**
 * @license
 * Copyright 2025 Steven Roussey <sroussey@gmail.com>
 * SPDX-License-Identifier: Apache-2.0
 */
import { CreateWorkflow, IExecuteContext, IExecutePreviewContext, Task, TaskConfig, TaskInput, TaskOutput } from "@workglow/task-graph";
import { DataPortSchema } from "@workglow/util/schema";
export declare const lambdaTaskConfigSchema: {
    readonly type: "object";
    readonly properties: {
        readonly id: {
            readonly "x-ui-hidden": true;
        };
        readonly title: {
            readonly type: "string";
        };
        readonly description: {
            readonly type: "string";
        };
        readonly cacheable: {
            readonly type: "boolean";
        };
        readonly timeout: {
            readonly type: "number";
            readonly description: "Max execution time in milliseconds";
        };
        readonly inputSchema: {
            readonly type: "object";
            readonly properties: {};
            readonly additionalProperties: true;
            readonly "x-ui-hidden": true;
        };
        readonly outputSchema: {
            readonly type: "object";
            readonly properties: {};
            readonly additionalProperties: true;
            readonly "x-ui-hidden": true;
        };
        readonly extras: {
            readonly type: "object";
            readonly additionalProperties: true;
            readonly "x-ui-hidden": true;
        };
        readonly defaults: {
            readonly type: "object";
            readonly additionalProperties: true;
            readonly "x-ui-hidden": true;
        };
        readonly execute: {};
        readonly executePreview: {};
    };
    readonly additionalProperties: false;
};
type LambdaTaskConfig<Input extends TaskInput = TaskInput, Output extends TaskOutput = TaskOutput> = TaskConfig & {
    execute?: (input: Input, context: IExecuteContext) => Promise<Output>;
    executePreview?: (input: Input, context: IExecutePreviewContext) => Promise<Output | undefined>;
};
export type LambdaTaskInput = Record<string, any>;
export type LambdaTaskOutput = Record<string, any>;
/**
 * LambdaTask provides a way to execute arbitrary functions within the task framework
 * It wraps a provided function and its input into a task that can be integrated
 * into task graphs and workflows
 */
export declare class LambdaTask<Input extends TaskInput = LambdaTaskInput, Output extends TaskOutput = LambdaTaskOutput, Config extends LambdaTaskConfig<Input, Output> = LambdaTaskConfig<Input, Output>> extends Task<Input, Output, Config> {
    static type: string;
    static title: string;
    static description: string;
    static category: string;
    static cacheable: boolean;
    static configSchema(): DataPortSchema;
    static inputSchema(): {
        readonly type: "object";
        readonly properties: {
            readonly "*": {
                readonly title: "Input";
                readonly description: "Input data to pass to the function";
            };
        };
        readonly additionalProperties: true;
    };
    static outputSchema(): {
        readonly type: "object";
        readonly properties: {
            readonly "*": {
                readonly title: "Output";
                readonly description: "The output from the execute function";
            };
        };
        readonly additionalProperties: true;
    };
    canSerializeConfig(): boolean;
    constructor(config?: Partial<Config>);
    execute(input: Input, context: IExecuteContext): Promise<Output>;
    /**
     * Executes the user-provided preview function with the given input. Returns
     * undefined when no preview function was supplied in the config (the constructor
     * already validated that at least one of execute / executePreview is present).
     */
    executePreview(input: Input, context: IExecutePreviewContext): Promise<Output | undefined>;
}
/**
 * Convenience function to create and run a LambdaTask
 */
export declare function lambda<I extends TaskInput, O extends TaskOutput>(fn: (input: I, context: IExecuteContext) => Promise<O>): Promise<TaskOutput>;
export declare function lambda<I extends TaskInput, O extends TaskOutput>(input: I, config?: LambdaTaskConfig<I, O>): Promise<TaskOutput>;
declare module "@workglow/task-graph" {
    interface Workflow {
        lambda: CreateWorkflow<LambdaTaskInput, LambdaTaskOutput, LambdaTaskConfig<LambdaTaskInput, LambdaTaskOutput>>;
    }
}
export {};
//# sourceMappingURL=LambdaTask.d.ts.map