CUB-10: Create IMoonrakerClient interface and DTOs #25
Reference in New Issue
Block a user
Delete Branch "agent/dex/CUB-10-imoonrakerclient-interface-dtos"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Expanded the IMoonrakerClient interface from 2 methods with Dictionary returns to 6 strongly-typed methods with proper DTOs, plus retained the backward-compatible GetFilamentUsageAsync method.
Changes
Interface (IMoonrakerClient.cs)
GetServerInfoAsync→/server/info→MoonrakerServerInfoIsReachableAsync→ connectivity check (now delegates to GetServerInfoAsync)GetPrinterInfoAsync→/printer/info→MoonrakerPrinterInfoGetPrintHistoryAsync→/server/history/items→MoonrakerHistoryResponseGetPrintStatsAsync→/printer/objects/query?print_stats→MoonrakerPrintStatsGetDisplayStatusAsync→/printer/objects/query?display_status→MoonrakerDisplayStatusGetFilamentUsageAsync→ retained for backward compatibility with FilamentUsageSyncServiceNew DTOs (Domain/DTOs/Moonraker/)
MoonrakerServerInfo— server version, Klipper state, plugin listMoonrakerPrinterInfo— Klipper state, readinessMoonrakerPrintJob— single history item with filament, duration, metadataMoonrakerHistoryResponse— paginated history wrapperMoonrakerPrintStats— real-time print state and filament consumedMoonrakerDisplayStatus— progress % and message for SignalR hubMoonrakerRequest— connection parameters DTOImplementation (MoonrakerClient.cs)
Linear
Closes CUB-10
APPROVED — base=dev, author=Dex, 9 files in scope (interface+DTOs+impl), dotnet build PASS 0 errors, Closes CUB-10 present, no secrets. Clean.