Files
Extrudex/backend/Domain/DTOs/Moonraker/MoonrakerPrinterInfo.cs
rex-bot 51bfb6d115
Some checks failed
Dev Build / build-test (pull_request) Failing after 58s
Dev Build / deploy-dev (pull_request) Has been skipped
Dev Build / notify-success (pull_request) Has been skipped
Dev Build / notify-failure (pull_request) Successful in 6s
CUB-10: Create IMoonrakerClient interface and DTOs
- Expanded IMoonrakerClient interface with 6 strongly-typed methods:
  - GetServerInfoAsync (Moonraker /server/info)
  - IsReachableAsync (connectivity check)
  - GetPrinterInfoAsync (Moonraker /printer/info)
  - GetPrintHistoryAsync (Moonraker /server/history/items)
  - GetPrintStatsAsync (Moonraker /printer/objects/query?print_stats)
  - GetDisplayStatusAsync (Moonraker /printer/objects/query?display_status)
  - GetFilamentUsageAsync (retained for backward compatibility)

- Created Domain/DTOs/Moonraker/ with 7 DTOs:
  - MoonrakerServerInfo, MoonrakerPrinterInfo, MoonrakerPrintJob
  - MoonrakerHistoryResponse, MoonrakerPrintStats
  - MoonrakerDisplayStatus, MoonrakerRequest

- Updated MoonrakerClient implementation to support all new methods
  with proper JSON parsing and mapping helpers

- Full XML doc comments on all public members
2026-04-27 18:42:47 -04:00

26 lines
933 B
C#

namespace Extrudex.Domain.DTOs.Moonraker;
/// <summary>
/// Response DTO for the Moonraker /printer/info endpoint.
/// Contains the current operational state of the Klipper printer.
/// Used to determine whether the printer is idle, printing, paused, or in error.
/// </summary>
public class MoonrakerPrinterInfo
{
/// <summary>
/// Current Klipper state: "ready", "startup", "shutdown", "error", "cancelled".
/// A "ready" state means the printer is connected and idle.
/// </summary>
public string State { get; set; } = string.Empty;
/// <summary>
/// Detailed state message from Klipper. May contain error details
/// when the state is "error" or "shutdown".
/// </summary>
public string StateMessage { get; set; } = string.Empty;
/// <summary>
/// Whether the Klipper firmware is currently connected and responsive.
/// </summary>
public bool KlippyReady { get; set; }
}