first
This commit is contained in:
3
TorchRemote.Models/Responses/ChatCommandResponse.cs
Normal file
3
TorchRemote.Models/Responses/ChatCommandResponse.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace TorchRemote.Models.Responses;
|
||||
|
||||
public record ChatCommandResponse(Guid Id, string Author, string Message) : ChatResponseBase;
|
4
TorchRemote.Models/Responses/ChatMessageResponse.cs
Normal file
4
TorchRemote.Models/Responses/ChatMessageResponse.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
using TorchRemote.Models.Shared;
|
||||
namespace TorchRemote.Models.Responses;
|
||||
|
||||
public record ChatMessageResponse(string AuthorName, ulong? Author, ChatChannel Channel, string Message) : ChatResponseBase;
|
6
TorchRemote.Models/Responses/ChatResponseBase.cs
Normal file
6
TorchRemote.Models/Responses/ChatResponseBase.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using System.Text.Json.Serialization;
|
||||
namespace TorchRemote.Models.Responses;
|
||||
|
||||
[JsonDerivedType(typeof(ChatCommandResponse), "command")]
|
||||
[JsonDerivedType(typeof(ChatMessageResponse), "message")]
|
||||
public record ChatResponseBase();
|
13
TorchRemote.Models/Responses/LogLineResponse.cs
Normal file
13
TorchRemote.Models/Responses/LogLineResponse.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace TorchRemote.Models.Responses;
|
||||
|
||||
public record struct LogLineResponse(DateTime Time, LogLineLevel Level, string Logger, string Message);
|
||||
|
||||
public enum LogLineLevel
|
||||
{
|
||||
Trace,
|
||||
Debug,
|
||||
Info,
|
||||
Warning,
|
||||
Error,
|
||||
Fatal
|
||||
}
|
15
TorchRemote.Models/Responses/ServerStatusResponse.cs
Normal file
15
TorchRemote.Models/Responses/ServerStatusResponse.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace TorchRemote.Models.Responses;
|
||||
|
||||
public record ServerStatusResponse(double SimSpeed, int MemberCount, TimeSpan Uptime, ServerStatus Status);
|
||||
|
||||
public enum ServerStatus
|
||||
{
|
||||
/// <summary>The server is not running.</summary>
|
||||
Stopped,
|
||||
/// <summary>The server is starting/loading the session.</summary>
|
||||
Starting,
|
||||
/// <summary>The server is running.</summary>
|
||||
Running,
|
||||
/// <summary>The server encountered an error.</summary>
|
||||
Error,
|
||||
}
|
15
TorchRemote.Models/Responses/SettingInfoResponse.cs
Normal file
15
TorchRemote.Models/Responses/SettingInfoResponse.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace TorchRemote.Models.Responses;
|
||||
|
||||
public record SettingInfoResponse(string Name, ICollection<SettingPropertyInfo> Properties);
|
||||
public record SettingPropertyInfo(string Name, string? Description, int? Order, Guid Type);
|
||||
|
||||
public struct SettingPropertyTypeEnum
|
||||
{
|
||||
public static readonly Guid Integer = new("95c0d25b-e44d-4505-9549-48ee9c14bce8");
|
||||
public static readonly Guid Boolean = new("028ef347-1fc3-486a-b70b-3d3b1dcdb538");
|
||||
public static readonly Guid Number = new("009ced71-4a69-4af0-abb9-ec3339fffce0");
|
||||
public static readonly Guid String = new("22dbed1b-b976-44b4-98c9-d1b742a93f0c");
|
||||
public static readonly Guid DateTime = new("f0978b29-9da9-4289-85c9-41d5b92056e8");
|
||||
public static readonly Guid TimeSpan = new("7a2bebf1-78f5-4e4e-8d83-18914dbee55c");
|
||||
public static readonly Guid Color = new("99c74632-0fa9-469b-ba05-825ba21a017b");
|
||||
}
|
3
TorchRemote.Models/Responses/WorldResponse.cs
Normal file
3
TorchRemote.Models/Responses/WorldResponse.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace TorchRemote.Models.Responses;
|
||||
|
||||
public record WorldResponse(string Name, long SizeKb);
|
Reference in New Issue
Block a user