import type { Action } from "../../messaging"; import type { ActionContextType } from "./ActionContextType"; import type { CommandSettings } from "./CommandSettings"; import type { DesignerCommandTool } from "./DesignerCommandTool"; /** * Utilities for working with commands and operations. */ export interface ConfigurableItemCommandUtilities { /** * Converts an API Action into CommandSettings. */ actionToCommandSettings: (action: Action | undefined) => Promise; /** * Converts CommandSettings to an API Action. */ commandSettingsToAction: (settings: CommandSettings | undefined) => Promise; /** * Gets the default action for a tool of a specific type. */ getDefaultAction: (type: ActionContextType) => Action; /** * Determines if an action matches a known tool. */ getTool: (contextType: ActionContextType, action: CommandSettings, outputType?: ActionContextType) => DesignerCommandTool | undefined; /** * The list of command tools. */ tools: DesignerCommandTool[]; }