From ae882e9f7d2faac42dd4e221853ef7c0db4b2970 Mon Sep 17 00:00:00 2001 From: Cj <161484149+CJ-SPT@users.noreply.github.com> Date: Wed, 8 Jan 2025 06:29:57 -0500 Subject: [PATCH] Dialogs nullable --- .../Customization/BuyClothingRequestData.cs | 24 +++---- .../Customization/CustomizationSetRequest.cs | 20 +++--- .../Eft/Customization/GetSuitsResponse.cs | 4 +- .../Eft/Dialog/AcceptFriendRequestData.cs | 2 +- .../Eft/Dialog/AddUserGroupMailRequest.cs | 4 +- .../Eft/Dialog/ChangeGroupMailOwnerRequest.cs | 4 +- Core/Models/Eft/Dialog/ChatServer.cs | 64 +++++++++---------- .../Eft/Dialog/ClearMailMessageRequest.cs | 2 +- .../Eft/Dialog/CreateGroupMailRequest.cs | 4 +- Core/Models/Eft/Dialog/DeleteFriendRequest.cs | 2 +- Core/Models/Eft/Dialog/FriendRequestData.cs | 6 +- .../Eft/Dialog/FriendRequestSendResponse.cs | 12 ++-- .../Eft/Dialog/GetAllAttachmentsResponse.cs | 12 ++-- .../Dialog/GetChatServerListRequestData.cs | 2 +- .../Eft/Dialog/GetFriendListDataResponse.cs | 12 ++-- .../Dialog/GetMailDialogInfoRequestData.cs | 2 +- .../Dialog/GetMailDialogListRequestData.cs | 4 +- .../Dialog/GetMailDialogViewRequestData.cs | 16 ++--- .../Dialog/GetMailDialogViewResponseData.cs | 12 ++-- .../Models/Eft/Dialog/PinDialogRequestData.cs | 2 +- .../Eft/Dialog/RemoveDialogRequestData.cs | 2 +- .../Eft/Dialog/RemoveMailMessageRequest.cs | 2 +- .../Eft/Dialog/RemoveUserGroupMailRequest.cs | 4 +- Core/Models/Eft/Dialog/SendMessageRequest.cs | 19 +++--- .../Eft/Dialog/SetDialogReadRequestData.cs | 2 +- 25 files changed, 120 insertions(+), 119 deletions(-) diff --git a/Core/Models/Eft/Customization/BuyClothingRequestData.cs b/Core/Models/Eft/Customization/BuyClothingRequestData.cs index 3d22dcbc..46ca767a 100644 --- a/Core/Models/Eft/Customization/BuyClothingRequestData.cs +++ b/Core/Models/Eft/Customization/BuyClothingRequestData.cs @@ -4,24 +4,24 @@ namespace Core.Models.Eft.Customization; public class BuyClothingRequestData { - [JsonPropertyName("Action")] - public string Action { get; set; } = "CustomizationBuy"; + [JsonPropertyName("Action")] + public string Action { get; set; } = "CustomizationBuy"; - [JsonPropertyName("offer")] - public string Offer { get; set; } + [JsonPropertyName("offer")] + public string? Offer { get; set; } - [JsonPropertyName("items")] - public List Items { get; set; } + [JsonPropertyName("items")] + public List? Items { get; set; } } public class PaymentItemForClothing { - [JsonPropertyName("del")] - public bool Del { get; set; } + [JsonPropertyName("del")] + public bool? Del { get; set; } - [JsonPropertyName("id")] - public string Id { get; set; } + [JsonPropertyName("id")] + public string? Id { get; set; } - [JsonPropertyName("count")] - public int Count { get; set; } + [JsonPropertyName("count")] + public int? Count { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Customization/CustomizationSetRequest.cs b/Core/Models/Eft/Customization/CustomizationSetRequest.cs index ea01a9f7..94722b70 100644 --- a/Core/Models/Eft/Customization/CustomizationSetRequest.cs +++ b/Core/Models/Eft/Customization/CustomizationSetRequest.cs @@ -4,21 +4,21 @@ namespace Core.Models.Eft.Customization; public class CustomizationSetRequest { - [JsonPropertyName("Action")] - public string Action { get; set; } = "CustomizationSet"; + [JsonPropertyName("Action")] + public string Action { get; set; } = "CustomizationSet"; - [JsonPropertyName("customizations")] - public List Customizations { get; set; } + [JsonPropertyName("customizations")] + public List? Customizations { get; set; } } public class CustomizationSetOption { - [JsonPropertyName("id")] - public string Id { get; set; } + [JsonPropertyName("id")] + public string? Id { get; set; } - [JsonPropertyName("type")] - public string Type { get; set; } + [JsonPropertyName("type")] + public string? Type { get; set; } - [JsonPropertyName("source")] - public string Source { get; set; } + [JsonPropertyName("source")] + public string? Source { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Customization/GetSuitsResponse.cs b/Core/Models/Eft/Customization/GetSuitsResponse.cs index f7efeffe..42f61197 100644 --- a/Core/Models/Eft/Customization/GetSuitsResponse.cs +++ b/Core/Models/Eft/Customization/GetSuitsResponse.cs @@ -5,8 +5,8 @@ namespace Core.Models.Eft.Customization; public class GetSuitsResponse { [JsonPropertyName("_id")] - public string Id { get; set; } + public string? Id { get; set; } [JsonPropertyName("suites")] - public List Suites { get; set; } + public List? Suites { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/AcceptFriendRequestData.cs b/Core/Models/Eft/Dialog/AcceptFriendRequestData.cs index 880d01aa..5cd4b141 100644 --- a/Core/Models/Eft/Dialog/AcceptFriendRequestData.cs +++ b/Core/Models/Eft/Dialog/AcceptFriendRequestData.cs @@ -17,5 +17,5 @@ public class DeclineFriendRequestData : BaseFriendRequest public class BaseFriendRequest { [JsonPropertyName("profileId")] - public string ProfileId { get; set; } + public string? ProfileId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/AddUserGroupMailRequest.cs b/Core/Models/Eft/Dialog/AddUserGroupMailRequest.cs index f11c58c3..4b9d1b8a 100644 --- a/Core/Models/Eft/Dialog/AddUserGroupMailRequest.cs +++ b/Core/Models/Eft/Dialog/AddUserGroupMailRequest.cs @@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog; public class AddUserGroupMailRequest { [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + public string? DialogId { get; set; } [JsonPropertyName("uid")] - public string Uid { get; set; } + public string? Uid { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/ChangeGroupMailOwnerRequest.cs b/Core/Models/Eft/Dialog/ChangeGroupMailOwnerRequest.cs index 15cc6839..281b7281 100644 --- a/Core/Models/Eft/Dialog/ChangeGroupMailOwnerRequest.cs +++ b/Core/Models/Eft/Dialog/ChangeGroupMailOwnerRequest.cs @@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog; public class ChangeGroupMailOwnerRequest { [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + public string? DialogId { get; set; } [JsonPropertyName("uid")] - public string Uid { get; set; } + public string? Uid { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/ChatServer.cs b/Core/Models/Eft/Dialog/ChatServer.cs index 27b3bb67..437de19d 100644 --- a/Core/Models/Eft/Dialog/ChatServer.cs +++ b/Core/Models/Eft/Dialog/ChatServer.cs @@ -4,40 +4,40 @@ namespace Core.Models.Eft.Dialog; public class ChatServer { - [JsonPropertyName("_id")] - public string Id { get; set; } - - [JsonPropertyName("RegistrationId")] - public int RegistrationId { get; set; } - - [JsonPropertyName("VersionId")] - public string VersionId { get; set; } - - [JsonPropertyName("Ip")] - public string Ip { get; set; } - - [JsonPropertyName("Port")] - public int Port { get; set; } - - [JsonPropertyName("DateTime")] - public long DateTime { get; set; } - - [JsonPropertyName("Chats")] - public List Chats { get; set; } - - [JsonPropertyName("Regions")] - public List Regions { get; set; } - - /** Possibly removed */ - [JsonPropertyName("IsDeveloper")] - public bool? IsDeveloper { get; set; } + [JsonPropertyName("_id")] + public string? Id { get; set; } + + [JsonPropertyName("RegistrationId")] + public int? RegistrationId { get; set; } + + [JsonPropertyName("VersionId")] + public string? VersionId { get; set; } + + [JsonPropertyName("Ip")] + public string? Ip { get; set; } + + [JsonPropertyName("Port")] + public int? Port { get; set; } + + [JsonPropertyName("DateTime")] + public long? DateTime { get; set; } + + [JsonPropertyName("Chats")] + public List? Chats { get; set; } + + [JsonPropertyName("Regions")] + public List? Regions { get; set; } + + /** Possibly removed */ + [JsonPropertyName("IsDeveloper")] + public bool? IsDeveloper { get; set; } } public class Chat { - [JsonPropertyName("_id")] - public string Id { get; set; } - - [JsonPropertyName("Members")] - public int Members { get; set; } + [JsonPropertyName("_id")] + public string? Id { get; set; } + + [JsonPropertyName("Members")] + public int? Members { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/ClearMailMessageRequest.cs b/Core/Models/Eft/Dialog/ClearMailMessageRequest.cs index 58c7bd8a..69c84414 100644 --- a/Core/Models/Eft/Dialog/ClearMailMessageRequest.cs +++ b/Core/Models/Eft/Dialog/ClearMailMessageRequest.cs @@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog; public class ClearMailMessageRequest { [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + public string? DialogId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/CreateGroupMailRequest.cs b/Core/Models/Eft/Dialog/CreateGroupMailRequest.cs index d5db07c2..c012819b 100644 --- a/Core/Models/Eft/Dialog/CreateGroupMailRequest.cs +++ b/Core/Models/Eft/Dialog/CreateGroupMailRequest.cs @@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog; public class CreateGroupMailRequest { [JsonPropertyName("Name")] - public string Name { get; set; } + public string? Name { get; set; } [JsonPropertyName("Users")] - public List Users { get; set; } + public List? Users { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/DeleteFriendRequest.cs b/Core/Models/Eft/Dialog/DeleteFriendRequest.cs index 27fa4ae1..73628f79 100644 --- a/Core/Models/Eft/Dialog/DeleteFriendRequest.cs +++ b/Core/Models/Eft/Dialog/DeleteFriendRequest.cs @@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog; public class DeleteFriendRequest { [JsonPropertyName("friend_id")] - public string FriendId { get; set; } + public string? FriendId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/FriendRequestData.cs b/Core/Models/Eft/Dialog/FriendRequestData.cs index 3b010663..8690f0f5 100644 --- a/Core/Models/Eft/Dialog/FriendRequestData.cs +++ b/Core/Models/Eft/Dialog/FriendRequestData.cs @@ -5,11 +5,11 @@ namespace Core.Models.Eft.Dialog; public class FriendRequestData { [JsonPropertyName("status")] - public int Status { get; set; } + public int? Status { get; set; } [JsonPropertyName("requestId")] - public string RequestId { get; set; } + public string? RequestId { get; set; } [JsonPropertyName("retryAfter")] - public int RetryAfter { get; set; } + public int? RetryAfter { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/FriendRequestSendResponse.cs b/Core/Models/Eft/Dialog/FriendRequestSendResponse.cs index 2a2fb774..e41878d2 100644 --- a/Core/Models/Eft/Dialog/FriendRequestSendResponse.cs +++ b/Core/Models/Eft/Dialog/FriendRequestSendResponse.cs @@ -4,12 +4,12 @@ namespace Core.Models.Eft.Dialog; public class FriendRequestSendResponse { - [JsonPropertyName("status")] - public int Status { get; set; } + [JsonPropertyName("status")] + public int? Status { get; set; } - [JsonPropertyName("requestId")] - public string RequestId { get; set; } + [JsonPropertyName("requestId")] + public string? RequestId { get; set; } - [JsonPropertyName("retryAfter")] - public int RetryAfter { get; set; } + [JsonPropertyName("retryAfter")] + public int? RetryAfter { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetAllAttachmentsResponse.cs b/Core/Models/Eft/Dialog/GetAllAttachmentsResponse.cs index 3a854457..0d26a1e1 100644 --- a/Core/Models/Eft/Dialog/GetAllAttachmentsResponse.cs +++ b/Core/Models/Eft/Dialog/GetAllAttachmentsResponse.cs @@ -5,12 +5,12 @@ namespace Core.Models.Eft.Dialog; public class GetAllAttachmentsResponse { - [JsonPropertyName("messages")] - public List Messages { get; set; } + [JsonPropertyName("messages")] + public List? Messages { get; set; } - [JsonPropertyName("profiles")] - public List Profiles { get; set; } // Assuming 'any' translates to 'object' + [JsonPropertyName("profiles")] + public List Profiles { get; set; } // Assuming 'any' translates to 'object' - [JsonPropertyName("hasMessagesWithRewards")] - public bool HasMessagesWithRewards { get; set; } + [JsonPropertyName("hasMessagesWithRewards")] + public bool? HasMessagesWithRewards { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetChatServerListRequestData.cs b/Core/Models/Eft/Dialog/GetChatServerListRequestData.cs index 86265d65..5664a516 100644 --- a/Core/Models/Eft/Dialog/GetChatServerListRequestData.cs +++ b/Core/Models/Eft/Dialog/GetChatServerListRequestData.cs @@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog; public class GetChatServerListRequestData { [JsonPropertyName("VersionId")] - public string VersionId { get; set; } + public string? VersionId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetFriendListDataResponse.cs b/Core/Models/Eft/Dialog/GetFriendListDataResponse.cs index 8c26afa7..9fffd120 100644 --- a/Core/Models/Eft/Dialog/GetFriendListDataResponse.cs +++ b/Core/Models/Eft/Dialog/GetFriendListDataResponse.cs @@ -5,12 +5,12 @@ namespace Core.Models.Eft.Dialog; public class GetFriendListDataResponse { - [JsonPropertyName("Friends")] - public List Friends { get; set; } + [JsonPropertyName("Friends")] + public List? Friends { get; set; } - [JsonPropertyName("Ignore")] - public List Ignore { get; set; } + [JsonPropertyName("Ignore")] + public List? Ignore { get; set; } - [JsonPropertyName("InIgnoreList")] - public List InIgnoreList { get; set; } + [JsonPropertyName("InIgnoreList")] + public List? InIgnoreList { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetMailDialogInfoRequestData.cs b/Core/Models/Eft/Dialog/GetMailDialogInfoRequestData.cs index a4b83c62..8aca17e2 100644 --- a/Core/Models/Eft/Dialog/GetMailDialogInfoRequestData.cs +++ b/Core/Models/Eft/Dialog/GetMailDialogInfoRequestData.cs @@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog; public class GetMailDialogInfoRequestData { [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + public string? DialogId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetMailDialogListRequestData.cs b/Core/Models/Eft/Dialog/GetMailDialogListRequestData.cs index 90084b53..a6f8eea4 100644 --- a/Core/Models/Eft/Dialog/GetMailDialogListRequestData.cs +++ b/Core/Models/Eft/Dialog/GetMailDialogListRequestData.cs @@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog; public class GetMailDialogListRequestData { [JsonPropertyName("limit")] - public int Limit { get; set; } + public int? Limit { get; set; } [JsonPropertyName("offset")] - public int Offset { get; set; } + public int? Offset { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetMailDialogViewRequestData.cs b/Core/Models/Eft/Dialog/GetMailDialogViewRequestData.cs index 9684be00..3ca6f9fe 100644 --- a/Core/Models/Eft/Dialog/GetMailDialogViewRequestData.cs +++ b/Core/Models/Eft/Dialog/GetMailDialogViewRequestData.cs @@ -5,15 +5,15 @@ namespace Core.Models.Eft.Dialog; public class GetMailDialogViewRequestData { - [JsonPropertyName("type")] - public MessageType Type { get; set; } + [JsonPropertyName("type")] + public MessageType? Type { get; set; } - [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + [JsonPropertyName("dialogId")] + public string? DialogId { get; set; } - [JsonPropertyName("limit")] - public int Limit { get; set; } + [JsonPropertyName("limit")] + public int? Limit { get; set; } - [JsonPropertyName("time")] - public decimal Time { get; set; } // decimal + [JsonPropertyName("time")] + public decimal Time { get; set; } // decimal } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetMailDialogViewResponseData.cs b/Core/Models/Eft/Dialog/GetMailDialogViewResponseData.cs index 379f489f..a039a288 100644 --- a/Core/Models/Eft/Dialog/GetMailDialogViewResponseData.cs +++ b/Core/Models/Eft/Dialog/GetMailDialogViewResponseData.cs @@ -5,12 +5,12 @@ namespace Core.Models.Eft.Dialog; public class GetMailDialogViewResponseData { - [JsonPropertyName("messages")] - public List Messages { get; set; } + [JsonPropertyName("messages")] + public List? Messages { get; set; } - [JsonPropertyName("profiles")] - public List Profiles { get; set; } + [JsonPropertyName("profiles")] + public List? Profiles { get; set; } - [JsonPropertyName("hasMessagesWithRewards")] - public bool HasMessagesWithRewards { get; set; } + [JsonPropertyName("hasMessagesWithRewards")] + public bool? HasMessagesWithRewards { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/PinDialogRequestData.cs b/Core/Models/Eft/Dialog/PinDialogRequestData.cs index 1a2980e2..d98657da 100644 --- a/Core/Models/Eft/Dialog/PinDialogRequestData.cs +++ b/Core/Models/Eft/Dialog/PinDialogRequestData.cs @@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog; public class PinDialogRequestData { [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + public string? DialogId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/RemoveDialogRequestData.cs b/Core/Models/Eft/Dialog/RemoveDialogRequestData.cs index dacdb9d2..08c05ec2 100644 --- a/Core/Models/Eft/Dialog/RemoveDialogRequestData.cs +++ b/Core/Models/Eft/Dialog/RemoveDialogRequestData.cs @@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog; public class RemoveDialogRequestData { [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + public string? DialogId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/RemoveMailMessageRequest.cs b/Core/Models/Eft/Dialog/RemoveMailMessageRequest.cs index a0a42650..54d96164 100644 --- a/Core/Models/Eft/Dialog/RemoveMailMessageRequest.cs +++ b/Core/Models/Eft/Dialog/RemoveMailMessageRequest.cs @@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog; public class RemoveMailMessageRequest { [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + public string? DialogId { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/RemoveUserGroupMailRequest.cs b/Core/Models/Eft/Dialog/RemoveUserGroupMailRequest.cs index 8b768067..f70adf30 100644 --- a/Core/Models/Eft/Dialog/RemoveUserGroupMailRequest.cs +++ b/Core/Models/Eft/Dialog/RemoveUserGroupMailRequest.cs @@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog; public class RemoveUserGroupMailRequest { [JsonPropertyName("dialogId")] - public string DialogId { get; set; } + public string? DialogId { get; set; } [JsonPropertyName("uid")] - public string Uid { get; set; } + public string? Uid { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/SendMessageRequest.cs b/Core/Models/Eft/Dialog/SendMessageRequest.cs index 1e3c0299..ffa5c2ce 100644 --- a/Core/Models/Eft/Dialog/SendMessageRequest.cs +++ b/Core/Models/Eft/Dialog/SendMessageRequest.cs @@ -3,16 +3,17 @@ using Core.Models.Enums; namespace Core.Models.Eft.Dialog; -public class SendMessageRequest { - [JsonPropertyName("dialogId")] - public string DialogId { get; set; } +public class SendMessageRequest +{ + [JsonPropertyName("dialogId")] + public string? DialogId { get; set; } - [JsonPropertyName("type")] - public MessageType Type { get; set; } + [JsonPropertyName("type")] + public MessageType? Type { get; set; } - [JsonPropertyName("text")] - public string Text { get; set; } + [JsonPropertyName("text")] + public string? Text { get; set; } - [JsonPropertyName("replyTo")] - public string ReplyTo { get; set; } + [JsonPropertyName("replyTo")] + public string? ReplyTo { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/SetDialogReadRequestData.cs b/Core/Models/Eft/Dialog/SetDialogReadRequestData.cs index d1192c9f..4e235250 100644 --- a/Core/Models/Eft/Dialog/SetDialogReadRequestData.cs +++ b/Core/Models/Eft/Dialog/SetDialogReadRequestData.cs @@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog; public class SetDialogReadRequestData { [JsonPropertyName("dialogId")] - public List DialogId { get; set; } + public List? DialogId { get; set; } } \ No newline at end of file