/**
 * @license
 * Copyright 2025 Steven Roussey <sroussey@gmail.com>
 * SPDX-License-Identifier: Apache-2.0
 */
import type { TaskEntitlements } from "@workglow/task-graph";
import { CreateWorkflow, Task, TaskConfig } from "@workglow/task-graph";
import { FromSchema } from "@workglow/util/schema";
declare const inputSchema: {
    readonly type: "object";
    readonly properties: {
        readonly javascript_code: {
            readonly type: "string";
            readonly title: "Code";
            readonly minLength: 1;
            readonly description: "JavaScript code to execute";
            readonly format: "code:javascript";
        };
    };
    readonly required: readonly ["javascript_code"];
    readonly additionalProperties: true;
};
declare const outputSchema: {
    readonly type: "object";
    readonly properties: {
        readonly output: {
            readonly title: "Output";
            readonly description: "The output of the JavaScript code";
        };
    };
    readonly required: readonly ["output"];
    readonly additionalProperties: false;
};
export type JavaScriptTaskInput = FromSchema<typeof inputSchema>;
export type JavaScriptTaskOutput = FromSchema<typeof outputSchema>;
export type JavaScriptTaskConfig = TaskConfig & {
    javascript_code?: string;
};
export declare class JavaScriptTask extends Task<JavaScriptTaskInput, JavaScriptTaskOutput, JavaScriptTaskConfig> {
    static type: string;
    static category: string;
    static title: string;
    static description: string;
    static customizable: boolean;
    static hasDynamicSchemas: boolean;
    static entitlements(): TaskEntitlements;
    static configSchema(): {
        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 javascript_code: {
                readonly type: "string";
                readonly title: "Code";
                readonly minLength: 1;
                readonly description: "JavaScript code to execute";
                readonly format: "code:javascript";
            };
        };
        readonly additionalProperties: false;
    };
    static inputSchema(): {
        readonly type: "object";
        readonly properties: {
            readonly javascript_code: {
                readonly type: "string";
                readonly title: "Code";
                readonly minLength: 1;
                readonly description: "JavaScript code to execute";
                readonly format: "code:javascript";
            };
        };
        readonly required: readonly ["javascript_code"];
        readonly additionalProperties: true;
    };
    static outputSchema(): {
        readonly type: "object";
        readonly properties: {
            readonly output: {
                readonly title: "Output";
                readonly description: "The output of the JavaScript code";
            };
        };
        readonly required: readonly ["output"];
        readonly additionalProperties: false;
    };
    inputSchema(): true | {
        readonly type: "object";
        readonly properties: {
            readonly javascript_code: {
                readonly type: "string";
                readonly title: "Code";
                readonly minLength: 1;
                readonly description: "JavaScript code to execute";
                readonly format: "code:javascript";
            };
        };
        readonly required: readonly ["javascript_code"];
        readonly additionalProperties: true;
    } | import("@workglow/util/schema").DataPortSchemaObject<import("@workglow/util/schema").JsonSchemaCustomProps>;
    execute(input: JavaScriptTaskInput): Promise<{
        output: unknown;
    }>;
    executePreview(input: JavaScriptTaskInput): Promise<{
        output: unknown;
    }>;
}
export declare const javaScript: (input: JavaScriptTaskInput, config?: TaskConfig) => Promise<{
    output: unknown;
}>;
declare module "@workglow/task-graph" {
    interface Workflow {
        javaScript: CreateWorkflow<JavaScriptTaskInput, JavaScriptTaskOutput, TaskConfig>;
    }
}
export {};
//# sourceMappingURL=JavaScriptTask.d.ts.map