initial copy

This commit is contained in:
2025-12-24 21:26:35 +03:00
parent ff1f62f341
commit f3b5260f7e
88 changed files with 3308 additions and 0 deletions

View 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; }
}

View File

@@ -0,0 +1,8 @@
using s8n_runtime.ViewModels.EnvParts;
namespace s8n_runtime.ViewModels;
public class S8nEnvironmentView
{
public List<EnvMenuItem> MenuItems { get; set; } = [];
}

View 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; } = [];
}

View File

@@ -0,0 +1,8 @@
namespace s8n_runtime.ViewModels;
public enum SlotType
{
Event,
Property,
PropertySource,
}

View 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; }
}

View 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; }
}

View 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; }
}

View 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);

View File

@@ -0,0 +1,3 @@
namespace s8n_runtime.ViewModels;
public record WorkflowNodeToolSlot(string Key, string Type, SlotType SlotType, string? Label = null);

View File

@@ -0,0 +1,7 @@
namespace s8n_runtime.ViewModels;
public struct WorkflowPoint
{
public float X { get; set; }
public float Y { get; set; }
}