reorganize
All checks were successful
publish-nuget / checkout-code (push) Successful in 6s
publish-nuget / build-and-publish (push) Successful in 17s

This commit is contained in:
2026-01-01 03:35:38 +03:00
parent 509b2e4aa1
commit 5c44ebf452
31 changed files with 9 additions and 342 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; } = [];
}

10
ViewModels/S8nWorkflow.cs Normal file
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; } = [];
}

8
ViewModels/SlotType.cs Normal file
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; }
}