Initial commit

This commit is contained in:
2026-07-03 16:31:37 +07:00
commit 899c7c637d
1939 changed files with 641750 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using RobotNet10.MapEditor.Shared.DTOs.Node;
using RobotNet10.MapEditor.Shared.DTOs.Edge;
namespace RobotNet10.MapEditor.Shared.DTOs.Responses;
/// <summary>
/// Response from copy nodes operation
/// </summary>
public class CopyNodesResponse
{
/// <summary>
/// Whether the copy operation was successful
/// </summary>
public bool Success { get; set; }
/// <summary>
/// Error message if copy failed
/// </summary>
public string? ErrorMessage { get; set; }
/// <summary>
/// Newly created nodes
/// </summary>
public List<NodeDto> NewNodes { get; set; } = new();
/// <summary>
/// Newly created edges
/// </summary>
public List<EdgeDto> NewEdges { get; set; } = new();
/// <summary>
/// Mapping from original node ID to new node ID
/// </summary>
public Dictionary<Guid, Guid> NodeIdMapping { get; set; } = new();
}

View File

@@ -0,0 +1,25 @@
namespace RobotNet10.MapEditor.Shared.DTOs.Responses;
/// <summary>
/// Standard error response DTO
/// </summary>
public class ErrorResponseDto
{
/// <summary>
/// Error message
/// </summary>
public string Error { get; set; } = string.Empty;
/// <summary>
/// Error code for programmatic handling
/// </summary>
public string? ErrorCode { get; set; }
/// <summary>
/// Additional error details
/// </summary>
public Dictionary<string, object>? Details { get; set; }
}

View File

@@ -0,0 +1,27 @@
using RobotNet10.MapEditor.Shared.DTOs.Node;
using RobotNet10.MapEditor.Shared.DTOs.Edge;
namespace RobotNet10.MapEditor.Shared.DTOs.Responses;
/// <summary>
/// Response from merge nodes operation
/// </summary>
public class MergeNodesResponse
{
/// <summary>
/// The newly created merged node
/// </summary>
public NodeDto MergedNode { get; set; } = null!;
/// <summary>
/// List of edges that were updated (StartNodeId or EndNodeId changed)
/// </summary>
public List<EdgeDto> UpdatedEdges { get; set; } = new();
/// <summary>
/// List of node IDs that were deleted (original nodes)
/// </summary>
public List<Guid> DeletedNodeIds { get; set; } = new();
}

View File

@@ -0,0 +1,39 @@
namespace RobotNet10.MapEditor.Shared.DTOs.Responses;
/// <summary>
/// Response from batch save operation
/// </summary>
public class SaveLayoutDataResponse
{
/// <summary>
/// Whether the save operation was successful
/// </summary>
public bool Success { get; set; }
/// <summary>
/// Error message if save failed
/// </summary>
public string? ErrorMessage { get; set; }
/// <summary>
/// Number of nodes updated
/// </summary>
public int NodesUpdated { get; set; }
/// <summary>
/// Number of edges updated
/// </summary>
public int EdgesUpdated { get; set; }
/// <summary>
/// List of node IDs that were not found (skipped)
/// </summary>
public List<Guid> SkippedNodeIds { get; set; } = new();
/// <summary>
/// List of edge IDs that were not found (skipped)
/// </summary>
public List<Guid> SkippedEdgeIds { get; set; } = new();
}

View File

@@ -0,0 +1,27 @@
using RobotNet10.MapEditor.Shared.DTOs.Node;
using RobotNet10.MapEditor.Shared.DTOs.Edge;
namespace RobotNet10.MapEditor.Shared.DTOs.Responses;
/// <summary>
/// Response from split node operation
/// </summary>
public class SplitNodeResponse
{
/// <summary>
/// List of newly created nodes (one for each connected edge)
/// </summary>
public List<NodeDto> NewNodes { get; set; } = new();
/// <summary>
/// List of edges that were updated (StartNodeId or EndNodeId changed)
/// </summary>
public List<EdgeDto> UpdatedEdges { get; set; } = new();
/// <summary>
/// ID of the original node that was split (now deleted)
/// </summary>
public Guid DeletedNodeId { get; set; }
}