Added TTS Voice & TTS Voice State data classes. Renamed certain classes. Fixed some compiler warnings.

This commit is contained in:
Tom 2025-01-17 04:38:03 +00:00
parent 78bab88165
commit e7a3b2a367
20 changed files with 70 additions and 55 deletions

View File

@ -2,7 +2,7 @@ namespace HermesSocketLibrary.Requests.Messages
{ {
public class EmoteInfo public class EmoteInfo
{ {
public string Id { get; set; } public required string Id { get; set; }
public string Name { get; set; } public required string Name { get; set; }
} }
} }

View File

@ -2,8 +2,9 @@ namespace HermesSocketLibrary.Requests.Messages
{ {
public class Group public class Group
{ {
public string Id { get; set; } public required string Id { get; set; }
public string Name { get; set; } public required string UserId { get; set; }
public required string Name { get; set; }
public int Priority { get; set; } public int Priority { get; set; }
} }
} }

View File

@ -2,7 +2,9 @@ namespace HermesSocketLibrary.Requests.Messages
{ {
public class GroupChatter public class GroupChatter
{ {
public string GroupId { get; set; } public required string UserId { get; set; }
public required string GroupId { get; set; }
public long ChatterId { get; set;} public long ChatterId { get; set;}
public required string ChatterLabel { get; set; }
} }
} }

View File

@ -2,8 +2,8 @@ namespace HermesSocketLibrary.Requests.Messages
{ {
public class GroupInfo public class GroupInfo
{ {
public IEnumerable<Group> Groups { get; set; } public required IEnumerable<Group> Groups { get; set; }
public IEnumerable<GroupChatter> GroupChatters { get; set; } public required IEnumerable<GroupChatter> GroupChatters { get; set; }
public IEnumerable<GroupPermission> GroupPermissions { get; set; } public required IEnumerable<GroupPermission> GroupPermissions { get; set; }
} }
} }

View File

@ -2,9 +2,10 @@ namespace HermesSocketLibrary.Requests.Messages
{ {
public class GroupPermission public class GroupPermission
{ {
public string Id { get; set; } public required string Id { get; set; }
public string GroupId { get; set; } public required string UserId { get; set; }
public string Path { get; set; } public required string GroupId { get; set; }
public required string Path { get; set; }
public bool? Allow { get; set; } public bool? Allow { get; set; }
} }
} }

View File

@ -1,11 +1,11 @@
namespace HermesSocketServer.Models namespace HermesSocketServer.Messages
{ {
public class PolicyMessage public class Policy
{ {
public Guid Id { get; set; } public Guid Id { get; set; }
public string UserId { get; set; } public required string UserId { get; set; }
public Guid GroupId { get; set; } public Guid GroupId { get; set; }
public string Path { get; set; } public required string Path { get; set; }
public int Usage { get; set; } public int Usage { get; set; }
public int Span { get; set; } public int Span { get; set; }
} }

View File

@ -2,8 +2,9 @@ namespace HermesSocketLibrary.Requests.Messages
{ {
public class RedeemableAction public class RedeemableAction
{ {
public string Name { get; set; } public required string UserId { get; set; }
public string Type { get; set; } public required string Name { get; set; }
public IDictionary<string, string> Data { get; set; } public required string Type { get; set; }
public required IDictionary<string, string> Data { get; set; }
} }
} }

View File

@ -2,9 +2,10 @@ namespace HermesSocketLibrary.Requests.Messages
{ {
public class Redemption public class Redemption
{ {
public string Id { get; set; } public required string Id { get; set; }
public string RedemptionId { get; set; } public required string UserId { get; set; }
public string ActionName { get; set; } public required string RedemptionId { get; set; }
public required string ActionName { get; set; }
public int Order { get; set; } public int Order { get; set; }
public bool State { get; set; } public bool State { get; set; }
} }

View File

@ -0,0 +1,8 @@
namespace HermesSocketLibrary.Requests.Messages
{
public class TTSVoice
{
public required string Id { get; set; }
public required string Name { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace HermesSocketLibrary.Requests.Messages
{
public class TTSVoiceState
{
public required string Id { get; set; }
public required string UserId { get; set; }
public bool Enabled { get; set; }
}
}

View File

@ -5,17 +5,12 @@ namespace HermesSocketLibrary.Requests.Messages
{ {
public class TTSWordFilter public class TTSWordFilter
{ {
public string? Id { get; set; } public required string Id { get; set; }
public string? Search { get; set; } public required string UserId { get; set; }
public string? Replace { get; set; } public required string Search { get; set; }
public required string Replace { get; set; }
public int Flag { get; set; }
[JsonIgnore] [JsonIgnore]
public Regex? Regex { get; set; } public Regex? Regex { get; set; }
public bool IsRegex { get; set; }
public TTSWordFilter()
{
IsRegex = true;
}
} }
} }

View File

@ -1,8 +0,0 @@
namespace HermesSocketLibrary.Requests.Messages
{
public class VoiceDetails
{
public string Id { get; set; }
public string Name { get; set; }
}
}

View File

@ -2,7 +2,7 @@ namespace HermesSocketLibrary.Socket.Data
{ {
public class ChatterMessage public class ChatterMessage
{ {
public long Id { get; set; } public required long Id { get; set; }
public string Name { get; set; } public required string Name { get; set; }
} }
} }

View File

@ -2,12 +2,13 @@ namespace HermesSocketLibrary.Socket.Data
{ {
public class Connection public class Connection
{ {
public string Name { get; set; } public required string UserId { get; set; }
public string Type { get; set; } public required string Name { get; set; }
public string ClientId { get; set; } public required string Type { get; set; }
public string AccessToken { get; set; } public required string ClientId { get; set; }
public string GrantType { get; set; } public required string AccessToken { get; set; }
public string Scope { get; set; } public required string GrantType { get; set; }
public required string Scope { get; set; }
public DateTime ExpiresAt { get; set; } public DateTime ExpiresAt { get; set; }
public bool Default { get; set; } public bool Default { get; set; }
} }

View File

@ -2,6 +2,6 @@ namespace HermesSocketLibrary.Socket.Data
{ {
public class EmoteDetailsMessage public class EmoteDetailsMessage
{ {
public IDictionary<string, string> Emotes { get; set; } public required IDictionary<string, string> Emotes { get; set; }
} }
} }

View File

@ -2,10 +2,10 @@ namespace HermesSocketLibrary.Socket.Data
{ {
public class EmoteUsageMessage public class EmoteUsageMessage
{ {
public string MessageId { get; set; } public required string MessageId { get; set; }
public DateTime DateTime { get; set; } public DateTime DateTime { get; set; }
public long BroadcasterId { get; set; } public long BroadcasterId { get; set; }
public ICollection<string> Emotes { get; set; } public required ICollection<string> Emotes { get; set; }
public long ChatterId { get; set; } public long ChatterId { get; set; }
} }
} }

View File

@ -2,8 +2,8 @@ namespace HermesSocketLibrary.Socket.Data
{ {
public class HermesLoginMessage public class HermesLoginMessage
{ {
public string ApiKey { get; set; } public required string ApiKey { get; set; }
public string Password { get; set; } public string? Password { get; set; }
public bool WebLogin { get; set; } public bool WebLogin { get; set; }
public int? MajorVersion { get; set; } public int? MajorVersion { get; set; }
public int? MinorVersion { get; set; } public int? MinorVersion { get; set; }

View File

@ -5,6 +5,9 @@ namespace HermesSocketLibrary.Socket.Data
public class LoginAckMessage public class LoginAckMessage
{ {
public string UserId { get; set; } public string UserId { get; set; }
public string ProviderAccountId { get; set; }
public string SessionId { get; set; }
public string UserName { get; set; }
public bool AnotherClient { get; set; } public bool AnotherClient { get; set; }
public long? OwnerId { get; set; } public long? OwnerId { get; set; }
public bool Admin { get; set; } public bool Admin { get; set; }
@ -14,7 +17,7 @@ namespace HermesSocketLibrary.Socket.Data
public IList<string> EnabledTTSVoices { get; set; } public IList<string> EnabledTTSVoices { get; set; }
public IDictionary<string, string> TTSVoicesAvailable { get; set; } public IDictionary<string, string> TTSVoicesAvailable { get; set; }
public IList<TTSWordFilter> WordFilters { get; set; } public IEnumerable<TTSWordFilter> WordFilters { get; set; }
public IList<Connection> Connections { get; set; } public IList<Connection> Connections { get; set; }
} }

View File

@ -5,5 +5,6 @@ namespace HermesSocketLibrary.Socket.Data
public RequestMessage? Request { get; set; } public RequestMessage? Request { get; set; }
public string? Nounce { get; set; } public string? Nounce { get; set; }
public object? Data { get; set; } public object? Data { get; set; }
public string? Error { get; set; }
} }
} }

View File

@ -2,8 +2,8 @@ namespace HermesSocketLibrary.Socket.Data
{ {
public class RequestMessage public class RequestMessage
{ {
public string RequestId { get; set; } public string? RequestId { get; set; }
public string? Type { get; set; } public required string Type { get; set; }
public IDictionary<string, object>? Data { get; set; } public IDictionary<string, object>? Data { get; set; }
public string? Nounce { get; set; } public string? Nounce { get; set; }
} }