feat: implement settings

This commit is contained in:
2024-04-18 18:39:24 +02:00
parent e7f43020dc
commit 36faeae886
39 changed files with 1398 additions and 196 deletions

View File

@ -78,7 +78,7 @@ export interface RuntimeExecutor {
* @param graph - The graph to execute
* @returns The result of the execution
*/
execute: (graph: Graph) => unknown;
execute: (graph: Graph, settings: Record<string, unknown>) => unknown;
}

View File

@ -22,7 +22,7 @@ type NodeInputBoolean = {
type NodeInputSelect = {
type: "select";
labels: string[];
options: string[];
value?: number;
}

View File

@ -54,7 +54,7 @@ pub struct NodeInputBoolean {
#[derive(Serialize, Deserialize, Debug)]
pub struct NodeInputSelect {
pub labels: Vec<String>,
pub options: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<usize>,
}
@ -130,4 +130,3 @@ pub struct NodeType {
#[serde(skip_serializing_if = "Option::is_none")]
pub outputs: Option<Vec<String>>,
}