From 4325d472dc2e00b7b11244b063b112aa942e3498 Mon Sep 17 00:00:00 2001 From: Cj <161484149+CJ-SPT@users.noreply.github.com> Date: Tue, 7 Jan 2025 06:44:41 -0500 Subject: [PATCH] Profile stuff --- Core/Models/Eft/Profile/ConnectResponse.cs | 18 +++ .../Eft/Profile/CreateProfileResponse.cs | 9 ++ .../Eft/Profile/GetOtherProfileRequest.cs | 9 ++ .../Eft/Profile/GetOtherProfileResponse.cs | 103 ++++++++++++++++++ .../Eft/Profile/GetProfileSettingsRequest.cs | 15 +++ .../Profile/GetProfileStatusResponseData.cs | 51 +++++++++ .../ProfileChangeNicknameRequestData.cs | 9 ++ .../Profile/ProfileChangeVoiceRequestData.cs | 9 ++ .../Eft/Profile/ProfileCreateRequestData.cs | 18 +++ .../Eft/Profile/SearchFriendRequestData.cs | 9 ++ .../Eft/Profile/SearchFriendResponse.cs | 34 ++++++ .../Profile/ValidateNicknameRequestData.cs | 9 ++ 12 files changed, 293 insertions(+) create mode 100644 Core/Models/Eft/Profile/ConnectResponse.cs create mode 100644 Core/Models/Eft/Profile/CreateProfileResponse.cs create mode 100644 Core/Models/Eft/Profile/GetOtherProfileRequest.cs create mode 100644 Core/Models/Eft/Profile/GetOtherProfileResponse.cs create mode 100644 Core/Models/Eft/Profile/GetProfileSettingsRequest.cs create mode 100644 Core/Models/Eft/Profile/GetProfileStatusResponseData.cs create mode 100644 Core/Models/Eft/Profile/ProfileChangeNicknameRequestData.cs create mode 100644 Core/Models/Eft/Profile/ProfileChangeVoiceRequestData.cs create mode 100644 Core/Models/Eft/Profile/ProfileCreateRequestData.cs create mode 100644 Core/Models/Eft/Profile/SearchFriendRequestData.cs create mode 100644 Core/Models/Eft/Profile/SearchFriendResponse.cs create mode 100644 Core/Models/Eft/Profile/ValidateNicknameRequestData.cs diff --git a/Core/Models/Eft/Profile/ConnectResponse.cs b/Core/Models/Eft/Profile/ConnectResponse.cs new file mode 100644 index 00000000..d1ec9e2d --- /dev/null +++ b/Core/Models/Eft/Profile/ConnectResponse.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class ConnectResponse +{ + [JsonPropertyName("backendUrl")] + public string BackendUrl { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("editions")] + public List Editions { get; set; } + + [JsonPropertyName("profileDescriptions")] + public Dictionary ProfileDescriptions { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/CreateProfileResponse.cs b/Core/Models/Eft/Profile/CreateProfileResponse.cs new file mode 100644 index 00000000..464bbb2b --- /dev/null +++ b/Core/Models/Eft/Profile/CreateProfileResponse.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class CreateProfileResponse +{ + [JsonPropertyName("uid")] + public string UserId { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/GetOtherProfileRequest.cs b/Core/Models/Eft/Profile/GetOtherProfileRequest.cs new file mode 100644 index 00000000..abb60be3 --- /dev/null +++ b/Core/Models/Eft/Profile/GetOtherProfileRequest.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class GetOtherProfileRequest +{ + [JsonPropertyName("accountId")] + public string AccountId { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/GetOtherProfileResponse.cs b/Core/Models/Eft/Profile/GetOtherProfileResponse.cs new file mode 100644 index 00000000..41992ab5 --- /dev/null +++ b/Core/Models/Eft/Profile/GetOtherProfileResponse.cs @@ -0,0 +1,103 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Eft.Profile; + +public class GetOtherProfileResponse +{ + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("aid")] + public int Aid { get; set; } + + [JsonPropertyName("info")] + public OtherProfileInfo Info { get; set; } + + [JsonPropertyName("customization")] + public OtherProfileCustomization Customization { get; set; } + + [JsonPropertyName("skills")] + public Skills Skills { get; set; } + + [JsonPropertyName("equipment")] + public OtherProfileEquipment Equipment { get; set; } + + [JsonPropertyName("achievements")] + public Dictionary Achievements { get; set; } + + [JsonPropertyName("favoriteItems")] + public List FavoriteItems { get; set; } + + [JsonPropertyName("pmcStats")] + public OtherProfileStats PmcStats { get; set; } + + [JsonPropertyName("scavStats")] + public OtherProfileStats ScavStats { get; set; } +} + +public class OtherProfileInfo +{ + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + [JsonPropertyName("side")] + public string Side { get; set; } + + [JsonPropertyName("experience")] + public int Experience { get; set; } + + [JsonPropertyName("memberCategory")] + public int MemberCategory { get; set; } + + [JsonPropertyName("bannedState")] + public bool BannedState { get; set; } + + [JsonPropertyName("bannedUntil")] + public long BannedUntil { get; set; } + + [JsonPropertyName("registrationDate")] + public long RegistrationDate { get; set; } +} + +public class OtherProfileCustomization +{ + [JsonPropertyName("head")] + public string Head { get; set; } + + [JsonPropertyName("body")] + public string Body { get; set; } + + [JsonPropertyName("feet")] + public string Feet { get; set; } + + [JsonPropertyName("hands")] + public string Hands { get; set; } + + [JsonPropertyName("dogtag")] + public string Dogtag { get; set; } +} + +public class OtherProfileEquipment +{ + [JsonPropertyName("Id")] + public string Id { get; set; } + + [JsonPropertyName("Items")] + public List Items { get; set; } +} + +public class OtherProfileStats +{ + [JsonPropertyName("eft")] + public OtherProfileSubStats Eft { get; set; } +} + +public class OtherProfileSubStats +{ + [JsonPropertyName("totalInGameTime")] + public int TotalInGameTime { get; set; } + + [JsonPropertyName("overAllCounters")] + public OverallCounters OverAllCounters { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/GetProfileSettingsRequest.cs b/Core/Models/Eft/Profile/GetProfileSettingsRequest.cs new file mode 100644 index 00000000..1af5db10 --- /dev/null +++ b/Core/Models/Eft/Profile/GetProfileSettingsRequest.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class GetProfileSettingsRequest +{ + /// + /// Chosen value for profile.Info.SelectedMemberCategory + /// + [JsonPropertyName("memberCategory")] + public int MemberCategory { get; set; } + + [JsonPropertyName("squadInviteRestriction")] + public bool SquadInviteRestriction { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/GetProfileStatusResponseData.cs b/Core/Models/Eft/Profile/GetProfileStatusResponseData.cs new file mode 100644 index 00000000..647d3b76 --- /dev/null +++ b/Core/Models/Eft/Profile/GetProfileStatusResponseData.cs @@ -0,0 +1,51 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class GetProfileStatusResponseData +{ + [JsonPropertyName("maxPveCountExceeded")] + public bool MaxPveCountExceeded { get; set; } = false; + + [JsonPropertyName("profiles")] + public List Profiles { get; set; } +} + +public class ProfileStatusData +{ + [JsonPropertyName("profileid")] + public string ProfileId { get; set; } + + [JsonPropertyName("profileToken")] + public string ProfileToken { get; set; } + + [JsonPropertyName("status")] + public string Status { get; set; } + + [JsonPropertyName("ip")] + public string Ip { get; set; } + + [JsonPropertyName("port")] + public int Port { get; set; } + + [JsonPropertyName("sid")] + public string Sid { get; set; } + + [JsonPropertyName("version")] + public string? Version { get; set; } + + [JsonPropertyName("location")] + public string? Location { get; set; } + + [JsonPropertyName("raidMode")] + public string? RaidMode { get; set; } + + [JsonPropertyName("mode")] + public string? Mode { get; set; } + + [JsonPropertyName("shortId")] + public string? ShortId { get; set; } + + [JsonPropertyName("additional_info")] + public List? AdditionalInfo { get; set; } // TODO: Was `any` in the node server +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/ProfileChangeNicknameRequestData.cs b/Core/Models/Eft/Profile/ProfileChangeNicknameRequestData.cs new file mode 100644 index 00000000..c2381846 --- /dev/null +++ b/Core/Models/Eft/Profile/ProfileChangeNicknameRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class ProfileChangeNicknameRequestData +{ + [JsonPropertyName("nickname")] + public string Nickname { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/ProfileChangeVoiceRequestData.cs b/Core/Models/Eft/Profile/ProfileChangeVoiceRequestData.cs new file mode 100644 index 00000000..b8b7ba20 --- /dev/null +++ b/Core/Models/Eft/Profile/ProfileChangeVoiceRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class ProfileChangeVoiceRequestData +{ + [JsonPropertyName("voice")] + public string Voice { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/ProfileCreateRequestData.cs b/Core/Models/Eft/Profile/ProfileCreateRequestData.cs new file mode 100644 index 00000000..79fd8d7a --- /dev/null +++ b/Core/Models/Eft/Profile/ProfileCreateRequestData.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class ProfileCreateRequestData +{ + [JsonPropertyName("side")] + public string Side { get; set; } + + [JsonPropertyName("nickname")] + public string Nickname { get; set; } + + [JsonPropertyName("headId")] + public string HeadId { get; set; } + + [JsonPropertyName("voiceId")] + public string VoiceId { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/SearchFriendRequestData.cs b/Core/Models/Eft/Profile/SearchFriendRequestData.cs new file mode 100644 index 00000000..0cae43b9 --- /dev/null +++ b/Core/Models/Eft/Profile/SearchFriendRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class SearchFriendRequestData +{ + [JsonPropertyName("nickname")] + public string Nickname { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/SearchFriendResponse.cs b/Core/Models/Eft/Profile/SearchFriendResponse.cs new file mode 100644 index 00000000..cc54fd5a --- /dev/null +++ b/Core/Models/Eft/Profile/SearchFriendResponse.cs @@ -0,0 +1,34 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class SearchFriendResponse +{ + [JsonPropertyName("_id")] + public string Id { get; set; } + + [JsonPropertyName("aid")] + public int Aid { get; set; } + + [JsonPropertyName("Info")] + public FriendInfo Info { get; set; } +} + +// NOTE: Renamed from `Info` because of a name collision. +public class FriendInfo +{ + [JsonPropertyName("Nickname")] + public string Nickname { get; set; } + + [JsonPropertyName("Side")] + public string Side { get; set; } + + [JsonPropertyName("Level")] + public int Level { get; set; } + + [JsonPropertyName("MemberCategory")] + public int MemberCategory { get; set; } + + [JsonPropertyName("SelectedMemberCategory")] + public int SelectedMemberCategory { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Eft/Profile/ValidateNicknameRequestData.cs b/Core/Models/Eft/Profile/ValidateNicknameRequestData.cs new file mode 100644 index 00000000..8f0d6e70 --- /dev/null +++ b/Core/Models/Eft/Profile/ValidateNicknameRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class ValidateNicknameRequestData +{ + [JsonPropertyName("nickname")] + public string Nickname { get; set; } +} \ No newline at end of file