import { I18nValue } from "./i18n"; export type IJSONValue = string | number | boolean | IJSONObject | IJSONArray; export type IJSONArray = Array; export interface IJSONObject { [x: string]: IJSONValue; } export type ToolPropertyTypes = "string" | "file" | "number" | "boolean" | "options" | "json" | "notice" | "canvas-assist"; export declare const CODE_LANGUAGES: readonly ["javaScript", "json", "python", "sql"]; export type EditorType = "code" | "codeNodeEditor" | "htmlEditor" | "sqlEditor" | "json"; export type CodeNodeEditorLanguage = (typeof CODE_LANGUAGES)[number]; export interface ToolPropertyTypeOptions { editor?: EditorType; editorLanguage?: CodeNodeEditorLanguage; maxValue?: number; minValue?: number; multipleValues?: boolean; multipleValueButtonText?: string; numberPrecision?: number; password?: boolean; rows?: number; assetType?: AssetType; accept?: string; max?: number; [key: string]: any; } export type ToolPropertyParameterValue = string | number | boolean | undefined | null; export type ResourceLocatorModes = "id" | "url" | "list" | string; export interface IResourceLocatorResult { name: string; value: string; url?: string; } export interface ToolParameter { [key: string]: ToolParameterValueType; } export type ToolParameterValueType = ToolPropertyParameterValue | ToolParameter | ToolPropertyParameterValue[] | ToolParameter[]; export interface ToolPropertyDisplayOptions { hide?: { [key: string]: ToolPropertyParameterValue[] | undefined; }; show?: { [key: string]: ToolPropertyParameterValue[] | undefined; }; } export interface ToolPropertyOptions { name: string | I18nValue; value: string | number | boolean; action?: string; description?: string | I18nValue; } export interface ToolPropertyCollection { displayName: string; name: string; values: ToolProperty[]; } export interface ToolPropertyValueExtractorBase { type: string; } export interface ToolPropertyValueExtractorRegex { type: "regex"; regex: string | RegExp; } export type AssetType = "llm-model" | "sd-model" | "workflow" | "workflow-association" | "design-project" | "design-association" | "design-board" | "workflow-view" | "media-file" | "sql-knowledge-base-table" | "sql-knowledge-base" | "knowledge-base" | "canvas" | "workflow-template" | "fork-join-branch" | "workflow-version" | "tools" | "comfyui-server" | "comfyui-workflow" | "comfyui-model-type" | "comfyui-model" | "llm-channel" | "conversation-app" | "oneapi-model" | "leaderboard" | "model-training"; export interface ToolProperty { displayName: string | I18nValue; name: string; type: ToolPropertyTypes; typeOptions?: ToolPropertyTypeOptions; default?: ToolParameterValueType; description?: string | I18nValue; hint?: string; displayOptions?: ToolPropertyDisplayOptions; options?: Array; placeholder?: string | I18nValue; isNodeSetting?: boolean; noDataExpression?: boolean; required?: boolean; example?: string; extractValue?: ToolPropertyValueExtractorRegex; properties?: ToolProperty[]; assetType?: AssetType; flag?: boolean; } export type ToolCategory = "image" | "text" | "file" | "gen-image" | "gen-text" | "train-model" | "process" | "auto" | "bio" | "human" | "query" | "db" | "extra"; export declare enum ToolType { SIMPLE = "SIMPLE", FORK_JOIN = "FORK_JOIN", JOIN = "JOIN", DO_WHILE = "DO_WHILE", SWITCH = "SWITCH", DYNAMIC = "DYNAMIC", FORK_JOIN_DYNAMIC = "FORK_JOIN_DYNAMIC", TERMINATE = "TERMINATE", HUMAN = "HUMAN", SUB_WORKFLOW = "SUB_WORKFLOW", INLINE = "INLINE", SET_VARIABLE = "SET_VARIABLE" } export interface ToolRuleItem { type: string; [x: string]: any; } export interface ToolExtraInfo { [x: string]: any; } export interface ToolCredentialItem { name: string; required: boolean; } export interface ToolDef { type: ToolType; name: string; displayName: string | I18nValue; description?: string | I18nValue; icon?: string; input: ToolProperty[]; output: ToolProperty[]; categories?: ToolCategory[]; rules?: ToolRuleItem[]; extra?: ToolExtraInfo; credentials?: ToolCredentialItem[]; } //# sourceMappingURL=tool.d.ts.map