diff --git a/Core/Callbacks/DialogCallbacks.cs b/Core/Callbacks/DialogCallbacks.cs index ea7efc7d..e1d68160 100644 --- a/Core/Callbacks/DialogCallbacks.cs +++ b/Core/Callbacks/DialogCallbacks.cs @@ -1,4 +1,5 @@ using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Request; using Core.Models.Eft.Dialog; using Core.Models.Eft.HttpResponse; using Core.Models.Eft.Profile; @@ -27,7 +28,7 @@ public class DialogCallbacks throw new NotImplementedException(); } - public GetBodyResponseData GetMailDialogInfo(string url, GetMailDialogInfoRequestData info, string sessionID) + public GetBodyResponseData GetMailDialogInfo(string url, GetMailDialogInfoRequestData info, string sessionID) { throw new NotImplementedException(); } @@ -52,11 +53,16 @@ public class DialogCallbacks throw new NotImplementedException(); } - public GetBodyResponseData GetAllAttachments(string url, EmptyRequestData info, string sessionID) + public GetBodyResponseData GetAllAttachments(string url, EmptyRequestData info, string sessionID) // TODO: Fix type - GetBodyResponseData { throw new NotImplementedException(); } + public GetBodyResponseData SendMessage(string url, SendMessageRequest info, string sessionID) + { + throw new NotImplementedException(); + } + public GetBodyResponseData> ListOutbox(string url, EmptyRequestData info, string sessionID) { throw new NotImplementedException(); @@ -64,20 +70,85 @@ public class DialogCallbacks public GetBodyResponseData> ListInbox(string url, EmptyRequestData info, string sessionID) { - + throw new NotImplementedException(); } - - public NullResponseData SendFriendRequest(string url, FriendRequestData info, string sessionID) + + public GetBodyResponseData SendFriendRequest(string url, FriendRequestData info, string sessionID) { throw new NotImplementedException(); } - public GetBodyResponseData SendMessage(string url, SendMessageRequest info, string sessionID) + public NullResponseData AcceptAllFriendRequests(string url, EmptyRequestData info, string sessionID) { throw new NotImplementedException(); } - public bool Update() + public GetBodyResponseData AcceptFriendRequest(string url, AcceptFriendRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData DeclineFriendRequest(string url, DeclineFriendRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData CancelFriendRequest(string url, CancelFriendRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public NullResponseData DeleteFriend(string url, DeleteFriendRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public NullResponseData IgnoreFriend(string url, UIDRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public NullResponseData UnIgnoreFriend(string url, UIDRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> ClearMail(string url, ClearMailMessageRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> RemoveMail(string url, RemoveMailMessageRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> CreateGroupMail(string url, CreateGroupMailRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> ChangeMailGroupOwner(string url, ChangeGroupMailOwnerRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> AddUserToMail(string url, AddUserGroupMailRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData> RemoveUserFromMail(string url, RemoveUserGroupMailRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public async Task OnUpdate(int timeSinceLastRun) + { + throw new NotImplementedException(); + } + + public string GetRoute() { throw new NotImplementedException(); } diff --git a/Core/Callbacks/GameCallbacks.cs b/Core/Callbacks/GameCallbacks.cs index 166f5219..81e37135 100644 --- a/Core/Callbacks/GameCallbacks.cs +++ b/Core/Callbacks/GameCallbacks.cs @@ -1,18 +1,38 @@ -namespace Core.Callbacks; +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Request; +using Core.Models.Eft.Game; +using Core.Models.Eft.HttpResponse; + +namespace Core.Callbacks; public class GameCallbacks { - public NullResponseData VersionValidata(string url, VersionValidaterequestData info, string sessionID) + public GameCallbacks() + { + + } + + public async Task OnLoad() { throw new NotImplementedException(); } - public GetBodyResponseData GameStart(string url, EmptyRequestData info, string sessionID) + public string GetRoute() + { + throw new NotImplementedException(); + } + + public NullResponseData VersionValidata(string url, VersionValidateRequestData info, string sessionID) { throw new NotImplementedException(); } - public GetBodyResponseData GameLogout(string url, EmptyRequestData info, string sessionID) + public GetBodyResponseData GameStart(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GameLogout(string url, EmptyRequestData info, string sessionID) { throw new NotImplementedException(); } @@ -22,17 +42,22 @@ public class GameCallbacks throw new NotImplementedException(); } - public GetBodyResponseData GetServer(string url, EmptyRequestData info, string sessionID) + public GetBodyResponseData GetGameMode(string url, GameModeRequestData info, string sessionID) { throw new NotImplementedException(); } - public GetBodyResponseData ValidateGameVersion(string url, EmptyRequestData info, string sessionID) + public GetBodyResponseData> GetServer(string url, EmptyRequestData info, string sessionID) { throw new NotImplementedException(); } - public GetBodyResponseData GameKeepalive(string url, EmptyRequestData info, string sessionID) + public GetBodyResponseData ValidateGameVersion(string url, EmptyRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetBodyResponseData GameKeepalive(string url, EmptyRequestData info, string sessionID) { throw new NotImplementedException(); } @@ -41,4 +66,29 @@ public class GameCallbacks { throw new NotImplementedException(); } + + public NullResponseData ReportNickname(string url, UIDRequestData info, string sessionID) + { + throw new NotImplementedException(); + } + + public GetRaidTimeResponse GetRaidTime(string url, GetRaidTimeRequest info, string sessionID) + { + throw new NotImplementedException(); + } + + public object GetSurvey(string url, EmptyRequestData info, string sessionID) // TODO: Types given was NullResponseData | GetBodyResponseData + { + throw new NotImplementedException(); + } + + public NullResponseData GetSurveyView(string url, object info, string sessionID) + { + throw new NotImplementedException(); + } + + public NullResponseData SendSurveyOpinion(string url, SendSurveyOpinionRequest info, string sessionID) + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Models/Eft/Common/Request/UIDRequestData.cs b/Core/Models/Eft/Common/Request/UIDRequestData.cs new file mode 100644 index 00000000..c209c9f0 --- /dev/null +++ b/Core/Models/Eft/Common/Request/UIDRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Common.Request; + +public class UIDRequestData +{ + [JsonPropertyName("uid")] + public string Uid { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/AcceptFriendRequestData.cs b/Core/Models/Eft/Dialog/AcceptFriendRequestData.cs new file mode 100644 index 00000000..880d01aa --- /dev/null +++ b/Core/Models/Eft/Dialog/AcceptFriendRequestData.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class AcceptFriendRequestData : BaseFriendRequest +{ +} + +public class CancelFriendRequestData : BaseFriendRequest +{ +} + +public class DeclineFriendRequestData : BaseFriendRequest +{ +} + +public class BaseFriendRequest +{ + [JsonPropertyName("profileId")] + 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 new file mode 100644 index 00000000..f11c58c3 --- /dev/null +++ b/Core/Models/Eft/Dialog/AddUserGroupMailRequest.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class AddUserGroupMailRequest +{ + [JsonPropertyName("dialogId")] + public string DialogId { get; set; } + + [JsonPropertyName("uid")] + 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 new file mode 100644 index 00000000..15cc6839 --- /dev/null +++ b/Core/Models/Eft/Dialog/ChangeGroupMailOwnerRequest.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class ChangeGroupMailOwnerRequest +{ + [JsonPropertyName("dialogId")] + public string DialogId { get; set; } + + [JsonPropertyName("uid")] + public string Uid { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/ClearMailMessageRequest.cs b/Core/Models/Eft/Dialog/ClearMailMessageRequest.cs new file mode 100644 index 00000000..58c7bd8a --- /dev/null +++ b/Core/Models/Eft/Dialog/ClearMailMessageRequest.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class ClearMailMessageRequest +{ + [JsonPropertyName("dialogId")] + 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 new file mode 100644 index 00000000..d5db07c2 --- /dev/null +++ b/Core/Models/Eft/Dialog/CreateGroupMailRequest.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class CreateGroupMailRequest +{ + [JsonPropertyName("Name")] + public string Name { get; set; } + + [JsonPropertyName("Users")] + 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 new file mode 100644 index 00000000..27fa4ae1 --- /dev/null +++ b/Core/Models/Eft/Dialog/DeleteFriendRequest.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class DeleteFriendRequest +{ + [JsonPropertyName("friend_id")] + 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 new file mode 100644 index 00000000..3b010663 --- /dev/null +++ b/Core/Models/Eft/Dialog/FriendRequestData.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class FriendRequestData +{ + [JsonPropertyName("status")] + public int Status { get; set; } + + [JsonPropertyName("requestId")] + public string RequestId { get; set; } + + [JsonPropertyName("retryAfter")] + 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 new file mode 100644 index 00000000..2a2fb774 --- /dev/null +++ b/Core/Models/Eft/Dialog/FriendRequestSendResponse.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class FriendRequestSendResponse +{ + [JsonPropertyName("status")] + public int Status { get; set; } + + [JsonPropertyName("requestId")] + public string RequestId { get; set; } + + [JsonPropertyName("retryAfter")] + public int RetryAfter { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetMailDialogInfoRequestData.cs b/Core/Models/Eft/Dialog/GetMailDialogInfoRequestData.cs new file mode 100644 index 00000000..a4b83c62 --- /dev/null +++ b/Core/Models/Eft/Dialog/GetMailDialogInfoRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class GetMailDialogInfoRequestData +{ + [JsonPropertyName("dialogId")] + public string DialogId { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Dialog/GetMailDialogViewRequestData.cs b/Core/Models/Eft/Dialog/GetMailDialogViewRequestData.cs new file mode 100644 index 00000000..9684be00 --- /dev/null +++ b/Core/Models/Eft/Dialog/GetMailDialogViewRequestData.cs @@ -0,0 +1,19 @@ +using System.Text.Json.Serialization; +using Core.Models.Enums; + +namespace Core.Models.Eft.Dialog; + +public class GetMailDialogViewRequestData +{ + [JsonPropertyName("type")] + public MessageType Type { get; set; } + + [JsonPropertyName("dialogId")] + public string DialogId { get; set; } + + [JsonPropertyName("limit")] + public int Limit { get; set; } + + [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 new file mode 100644 index 00000000..379f489f --- /dev/null +++ b/Core/Models/Eft/Dialog/GetMailDialogViewResponseData.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Profile; + +namespace Core.Models.Eft.Dialog; + +public class GetMailDialogViewResponseData +{ + [JsonPropertyName("messages")] + public List Messages { get; set; } + + [JsonPropertyName("profiles")] + public List Profiles { 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 new file mode 100644 index 00000000..1a2980e2 --- /dev/null +++ b/Core/Models/Eft/Dialog/PinDialogRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class PinDialogRequestData +{ + [JsonPropertyName("dialogId")] + 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 new file mode 100644 index 00000000..dacdb9d2 --- /dev/null +++ b/Core/Models/Eft/Dialog/RemoveDialogRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class RemoveDialogRequestData +{ + [JsonPropertyName("dialogId")] + 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 new file mode 100644 index 00000000..a0a42650 --- /dev/null +++ b/Core/Models/Eft/Dialog/RemoveMailMessageRequest.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class RemoveMailMessageRequest +{ + [JsonPropertyName("dialogId")] + 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 new file mode 100644 index 00000000..8b768067 --- /dev/null +++ b/Core/Models/Eft/Dialog/RemoveUserGroupMailRequest.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class RemoveUserGroupMailRequest +{ + [JsonPropertyName("dialogId")] + public string DialogId { get; set; } + + [JsonPropertyName("uid")] + 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 new file mode 100644 index 00000000..1e3c0299 --- /dev/null +++ b/Core/Models/Eft/Dialog/SendMessageRequest.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; +using Core.Models.Enums; + +namespace Core.Models.Eft.Dialog; + +public class SendMessageRequest { + [JsonPropertyName("dialogId")] + public string DialogId { get; set; } + + [JsonPropertyName("type")] + public MessageType Type { get; set; } + + [JsonPropertyName("text")] + public string Text { 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 new file mode 100644 index 00000000..d1192c9f --- /dev/null +++ b/Core/Models/Eft/Dialog/SetDialogReadRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Dialog; + +public class SetDialogReadRequestData +{ + [JsonPropertyName("dialogId")] + public List DialogId { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/CheckVersionResponse.cs b/Core/Models/Eft/Game/CheckVersionResponse.cs new file mode 100644 index 00000000..bcf70dfa --- /dev/null +++ b/Core/Models/Eft/Game/CheckVersionResponse.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class CheckVersionResponse +{ + [JsonPropertyName("isvalid")] + public bool IsValid { get; set; } + + [JsonPropertyName("latestVersion")] + public string LatestVersion { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GameConfigResponse.cs b/Core/Models/Eft/Game/GameConfigResponse.cs new file mode 100644 index 00000000..fff5fadb --- /dev/null +++ b/Core/Models/Eft/Game/GameConfigResponse.cs @@ -0,0 +1,76 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class GameConfigResponse +{ + [JsonPropertyName("aid")] + public int Aid { get; set; } + + [JsonPropertyName("lang")] + public string Language { get; set; } + + [JsonPropertyName("languages")] + public Dictionary Languages { get; set; } + + [JsonPropertyName("ndaFree")] + public bool IsNdaFree { get; set; } + + [JsonPropertyName("taxonomy")] + public int Taxonomy { get; set; } + + [JsonPropertyName("activeProfileId")] + public string ActiveProfileId { get; set; } + + [JsonPropertyName("backend")] + public Backend Backend { get; set; } + + [JsonPropertyName("useProtobuf")] + public bool UseProtobuf { get; set; } + + [JsonPropertyName("utc_time")] + public long UtcTime { get; set; } + + /** Total in game time */ + [JsonPropertyName("totalInGame")] + public int TotalInGame { get; set; } + + [JsonPropertyName("reportAvailable")] + public bool IsReportAvailable { get; set; } + + [JsonPropertyName("twitchEventMember")] + public bool IsTwitchEventMember { get; set; } + + [JsonPropertyName("sessionMode")] + public string SessionMode { get; set; } + + [JsonPropertyName("purchasedGames")] + public PurchasedGames PurchasedGames { get; set; } +} + +public class PurchasedGames +{ + [JsonPropertyName("eft")] + public bool IsEftPurchased { get; set; } + + [JsonPropertyName("arena")] + public bool IsArenaPurchased { get; set; } +} + +public class Backend +{ + [JsonPropertyName("Lobby")] + public string Lobby { get; set; } + + [JsonPropertyName("Trading")] + public string Trading { get; set; } + + [JsonPropertyName("Messaging")] + public string Messaging { get; set; } + + [JsonPropertyName("Main")] + public string Main { get; set; } + + [JsonPropertyName("RagFair")] + public string RagFair { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GameEmptyCrcRequestData.cs b/Core/Models/Eft/Game/GameEmptyCrcRequestData.cs new file mode 100644 index 00000000..d06653b2 --- /dev/null +++ b/Core/Models/Eft/Game/GameEmptyCrcRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class GameEmptyCrcRequestData +{ + [JsonPropertyName("crc")] + public int Crc { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GameKeepAliveResponse.cs b/Core/Models/Eft/Game/GameKeepAliveResponse.cs new file mode 100644 index 00000000..23b44449 --- /dev/null +++ b/Core/Models/Eft/Game/GameKeepAliveResponse.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class GameKeepAliveResponse +{ + [JsonPropertyName("msg")] + public string Message { get; set; } + + [JsonPropertyName("utc_time")] + public double UtcTime { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GameLogoutResponseData.cs b/Core/Models/Eft/Game/GameLogoutResponseData.cs new file mode 100644 index 00000000..74772b66 --- /dev/null +++ b/Core/Models/Eft/Game/GameLogoutResponseData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class GameLogoutResponseData +{ + [JsonPropertyName("status")] + public string Status { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GameModeRequestData.cs b/Core/Models/Eft/Game/GameModeRequestData.cs new file mode 100644 index 00000000..37c9b125 --- /dev/null +++ b/Core/Models/Eft/Game/GameModeRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class GameModeRequestData +{ + [JsonPropertyName("sessionMode")] + public string? SessionMode { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GameModeResponse.cs b/Core/Models/Eft/Game/GameModeResponse.cs new file mode 100644 index 00000000..298e8134 --- /dev/null +++ b/Core/Models/Eft/Game/GameModeResponse.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public enum SessionMode +{ + REGULAR, + PVE +} + +public class GameModeResponse +{ + [JsonPropertyName("gameMode")] + public SessionMode GameMode { get; set; } + + [JsonPropertyName("backendUrl")] + public string BackendUrl { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GameStartResponse.cs b/Core/Models/Eft/Game/GameStartResponse.cs new file mode 100644 index 00000000..c5718bcd --- /dev/null +++ b/Core/Models/Eft/Game/GameStartResponse.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class GameStartResponse +{ + [JsonPropertyName("utc_time")] + public double UtcTime { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GetRaidTimeRequest.cs b/Core/Models/Eft/Game/GetRaidTimeRequest.cs new file mode 100644 index 00000000..953a6285 --- /dev/null +++ b/Core/Models/Eft/Game/GetRaidTimeRequest.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class GetRaidTimeRequest +{ + [JsonPropertyName("Side")] + public string Side { get; set; } + + [JsonPropertyName("Location")] + public string Location { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/GetRaidTimeResponse.cs b/Core/Models/Eft/Game/GetRaidTimeResponse.cs new file mode 100644 index 00000000..a1a99c68 --- /dev/null +++ b/Core/Models/Eft/Game/GetRaidTimeResponse.cs @@ -0,0 +1,33 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class GetRaidTimeResponse +{ + [JsonPropertyName("RaidTimeMinutes")] + public int RaidTimeMinutes { get; set; } + + [JsonPropertyName("NewSurviveTimeSeconds")] + public int? NewSurviveTimeSeconds { get; set; } + + [JsonPropertyName("OriginalSurvivalTimeSeconds")] + public int OriginalSurvivalTimeSeconds { get; set; } + + [JsonPropertyName("ExitChanges")] + public List ExitChanges { get; set; } +} + +public class ExtractChange +{ + [JsonPropertyName("Name")] + public string Name { get; set; } + + [JsonPropertyName("MinTime")] + public int? MinTime { get; set; } + + [JsonPropertyName("MaxTime")] + public int? MaxTime { get; set; } + + [JsonPropertyName("Chance")] + public int? Chance { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/SendSurveyOpinionRequest.cs b/Core/Models/Eft/Game/SendSurveyOpinionRequest.cs new file mode 100644 index 00000000..0d3337af --- /dev/null +++ b/Core/Models/Eft/Game/SendSurveyOpinionRequest.cs @@ -0,0 +1,24 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class SendSurveyOpinionRequest +{ + [JsonPropertyName("surveyId")] + public int SurveyId { get; set; } + + [JsonPropertyName("answers")] + public List Answers { get; set; } +} + +public class SurveyOpinionAnswer +{ + [JsonPropertyName("questionId")] + public int QuestionId { get; set; } + + [JsonPropertyName("answerType")] + public string AnswerType { get; set; } + + [JsonPropertyName("answers")] + public object Answers { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/ServerDetails.cs b/Core/Models/Eft/Game/ServerDetails.cs new file mode 100644 index 00000000..2b0448b9 --- /dev/null +++ b/Core/Models/Eft/Game/ServerDetails.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class ServerDetails +{ + [JsonPropertyName("ip")] + public string Ip { get; set; } + + [JsonPropertyName("port")] + public int Port { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/SurveyResponseData.cs b/Core/Models/Eft/Game/SurveyResponseData.cs new file mode 100644 index 00000000..91dfae4b --- /dev/null +++ b/Core/Models/Eft/Game/SurveyResponseData.cs @@ -0,0 +1,90 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class SurveyResponseData +{ + [JsonPropertyName("locale")] + public Dictionary> Locale { get; set; } + + [JsonPropertyName("survey")] + public Survey Survey { get; set; } +} + +public class Survey +{ + [JsonPropertyName("id")] + public int Id { get; set; } + + [JsonPropertyName("welcomePageData")] + public WelcomePageData WelcomePageData { get; set; } + + [JsonPropertyName("farewellPageData")] + public FarewellPageData FarewellPageData { get; set; } + + [JsonPropertyName("pages")] + public List> Pages { get; set; } + + [JsonPropertyName("questions")] + public List Questions { get; set; } + + [JsonPropertyName("isNew")] + public bool IsNew { get; set; } +} + +public class WelcomePageData +{ + [JsonPropertyName("titleLocaleKey")] + public string TitleLocaleKey { get; set; } + + [JsonPropertyName("timeLocaleKey")] + public string TimeLocaleKey { get; set; } + + [JsonPropertyName("descriptionLocaleKey")] + public string DescriptionLocaleKey { get; set; } +} + +public class FarewellPageData +{ + [JsonPropertyName("textLocaleKey")] + public string TextLocaleKey { get; set; } +} + +public class SurveyQuestion +{ + [JsonPropertyName("id")] + public int Id { get; set; } + + [JsonPropertyName("sortIndex")] + public int SortIndex { get; set; } + + [JsonPropertyName("titleLocaleKey")] + public string TitleLocaleKey { get; set; } + + [JsonPropertyName("hintLocaleKey")] + public string HintLocaleKey { get; set; } + + [JsonPropertyName("answerLimit")] + public int AnswerLimit { get; set; } + + [JsonPropertyName("answerType")] + public string AnswerType { get; set; } + + [JsonPropertyName("answers")] + public List Answers { get; set; } +} + +public class SurveyAnswer +{ + [JsonPropertyName("id")] + public int Id { get; set; } + + [JsonPropertyName("questionId")] + public int QuestionId { get; set; } + + [JsonPropertyName("sortIndex")] + public int SortIndex { get; set; } + + [JsonPropertyName("localeKey")] + public string LocaleKey { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Game/VersionValidateRequestData.cs b/Core/Models/Eft/Game/VersionValidateRequestData.cs new file mode 100644 index 00000000..8470f201 --- /dev/null +++ b/Core/Models/Eft/Game/VersionValidateRequestData.cs @@ -0,0 +1,30 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Game; + +public class VersionValidateRequestData +{ + [JsonPropertyName("version")] + public Version Version { get; set; } + + [JsonPropertyName("develop")] + public bool Develop { get; set; } +} + +public class Version +{ + [JsonPropertyName("major")] + public string Major { get; set; } + + [JsonPropertyName("minor")] + public string Minor { get; set; } + + [JsonPropertyName("game")] + public string Game { get; set; } + + [JsonPropertyName("backend")] + public string Backend { get; set; } + + [JsonPropertyName("taxonomy")] + public string Taxonomy { get; set; } +} \ No newline at end of file