stan44 e0f298ba36 Add LyricFlow .NET backend API and Python bridge integration
- introduce `LyricFlow.Core.Backend` with shared DTOs, rhyme/spellcheck engines, and REST endpoints
- wire Python GUI/core to run and call the backend via new bridge/client modules
- add backend parity/integration tests and update packaging/ignore settings
2026-03-15 01:44:56 -05:00

46 lines
1.9 KiB
C#

using System.Text.Json.Serialization;
using LyricFlow.Core.Dtos;
namespace LyricFlow.Backend.Api;
public record SaveSnapshotRequest(
[property: JsonPropertyName("file_path")] string FilePath,
[property: JsonPropertyName("content")] string Content
);
public record SaveScratchpadRequest(
[property: JsonPropertyName("project_id")] string ProjectId,
[property: JsonPropertyName("content")] string Content
);
public record AnalyzeRequest([property: JsonPropertyName("text")] string Text);
public record ProjectReadRequest([property: JsonPropertyName("project_file")] string ProjectFile);
public record ProjectWriteRequest(
[property: JsonPropertyName("project_file")] string ProjectFile,
[property: JsonPropertyName("state")] ProjectStateDto State
);
public record SessionLoadRequest([property: JsonPropertyName("workspace_root")] string? WorkspaceRoot);
public record SessionSaveRequest(
[property: JsonPropertyName("workspace_root")] string? WorkspaceRoot,
[property: JsonPropertyName("snapshots")] List<SessionTabSnapshotDto> Snapshots
);
public record SessionClearRequest([property: JsonPropertyName("workspace_root")] string? WorkspaceRoot);
public record FileReadRequest([property: JsonPropertyName("path")] string Path);
public record FileWriteRequest(
[property: JsonPropertyName("path")] string Path,
[property: JsonPropertyName("content")] string Content
);
public record FileCreateRequest(
[property: JsonPropertyName("path")] string Path,
[property: JsonPropertyName("is_directory")] bool IsDirectory
);
public record FileRenameRequest(
[property: JsonPropertyName("old_path")] string OldPath,
[property: JsonPropertyName("new_path")] string NewPath,
[property: JsonPropertyName("root_path")] string? RootPath
);
public record FileDeleteRequest(
[property: JsonPropertyName("path")] string Path,
[property: JsonPropertyName("root_path")] string? RootPath
);