initial copy
This commit is contained in:
9
s8n-runtime/ViewModels/EnvParts/EnvMenuItem.cs
Normal file
9
s8n-runtime/ViewModels/EnvParts/EnvMenuItem.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace s8n_runtime.ViewModels.EnvParts;
|
||||
|
||||
public class EnvMenuItem
|
||||
{
|
||||
public required string Title { get; set; }
|
||||
public required string Link { get; set; }
|
||||
public string? Icon { get; set; }
|
||||
public string? IconColor { get; set; }
|
||||
}
|
||||
8
s8n-runtime/ViewModels/S8nEnvironmentView.cs
Normal file
8
s8n-runtime/ViewModels/S8nEnvironmentView.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using s8n_runtime.ViewModels.EnvParts;
|
||||
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public class S8nEnvironmentView
|
||||
{
|
||||
public List<EnvMenuItem> MenuItems { get; set; } = [];
|
||||
}
|
||||
10
s8n-runtime/ViewModels/S8nWorkflow.cs
Normal file
10
s8n-runtime/ViewModels/S8nWorkflow.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public class S8nWorkflow
|
||||
{
|
||||
public required string Name { get; set; }
|
||||
public Dictionary<string, object?> Settings { get; set; } = [];
|
||||
|
||||
public List<WorkflowNode> Nodes { get; set; } = [];
|
||||
public List<WorkflowEdge> Edges { get; set; } = [];
|
||||
}
|
||||
8
s8n-runtime/ViewModels/SlotType.cs
Normal file
8
s8n-runtime/ViewModels/SlotType.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public enum SlotType
|
||||
{
|
||||
Event,
|
||||
Property,
|
||||
PropertySource,
|
||||
}
|
||||
15
s8n-runtime/ViewModels/WorkflowEdge.cs
Normal file
15
s8n-runtime/ViewModels/WorkflowEdge.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public class WorkflowEdge
|
||||
{
|
||||
public required string Id { get; set; }
|
||||
|
||||
public required string Source { get; set; }
|
||||
public required string Target { get; set; }
|
||||
|
||||
public string? Type { get; set; }
|
||||
public bool IsEvent { get; set; }
|
||||
|
||||
public string? SourceHandle { get; set; }
|
||||
public string? TargetHandle { get; set; }
|
||||
}
|
||||
17
s8n-runtime/ViewModels/WorkflowNode.cs
Normal file
17
s8n-runtime/ViewModels/WorkflowNode.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public class WorkflowNode
|
||||
{
|
||||
public string Id { get; set; } = null!;
|
||||
public string? ParentId { get; set; }
|
||||
public WorkflowPoint Position { get; set; }
|
||||
public float Width { get; set; }
|
||||
public float Height { get; set; }
|
||||
|
||||
public string Type { get; set; } = "default";
|
||||
|
||||
public string? Class { get; set; }
|
||||
public string? Style { get; set; }
|
||||
|
||||
public WorkflowNodeData? Data { get; set; }
|
||||
}
|
||||
11
s8n-runtime/ViewModels/WorkflowNodeData.cs
Normal file
11
s8n-runtime/ViewModels/WorkflowNodeData.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public class WorkflowNodeData
|
||||
{
|
||||
public string? Label { get; set; }
|
||||
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, object?>? Extra { get; set; }
|
||||
}
|
||||
8
s8n-runtime/ViewModels/WorkflowNodeToolInfo.cs
Normal file
8
s8n-runtime/ViewModels/WorkflowNodeToolInfo.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public record WorkflowNodeToolInfo(
|
||||
string Icon, string? IconColor,
|
||||
int Width, int Height, string Classes, string Styles,
|
||||
string? Render, string? RenderEdit,
|
||||
object? InitNode,
|
||||
List<WorkflowNodeToolSlot>? Slots);
|
||||
3
s8n-runtime/ViewModels/WorkflowNodeToolSlot.cs
Normal file
3
s8n-runtime/ViewModels/WorkflowNodeToolSlot.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public record WorkflowNodeToolSlot(string Key, string Type, SlotType SlotType, string? Label = null);
|
||||
7
s8n-runtime/ViewModels/WorkflowPoint.cs
Normal file
7
s8n-runtime/ViewModels/WorkflowPoint.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace s8n_runtime.ViewModels;
|
||||
|
||||
public struct WorkflowPoint
|
||||
{
|
||||
public float X { get; set; }
|
||||
public float Y { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user