/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { IExecuteContext, IExecutePreviewContext, TaskConfig, TaskInput, TaskOutput } from "@workglow/task-graph"; import { CreateWorkflow, Task } from "@workglow/task-graph"; import type { 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 = TaskConfig & { execute?: (input: Input, context: IExecuteContext) => Promise; executePreview?: (input: Input, context: IExecutePreviewContext) => Promise; }; export type LambdaTaskInput = Record; export type LambdaTaskOutput = Record; export declare class LambdaTask = LambdaTaskConfig> extends Task { 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); execute(input: Input, context: IExecuteContext): Promise; executePreview(input: Input, context: IExecutePreviewContext): Promise; } export declare function lambda(fn: (input: I, context: IExecuteContext) => Promise): Promise; export declare function lambda(input: I, config?: LambdaTaskConfig): Promise; declare module "@workglow/task-graph" { interface Workflow { lambda: CreateWorkflow>; } } export {};