From 73ecaf1e3e964a81f29daf4b5a64583d00dc1b34 Mon Sep 17 00:00:00 2001 From: Zura Date: Thu, 21 Aug 2025 23:17:27 +0200 Subject: [PATCH] Add files via upload --- LightlessSyncAPI/Data/CharacterData.cs | 37 ++++++ .../Data/Comparer/GroupDataComparer.cs | 22 ++++ .../Data/Comparer/GroupDtoComparer.cs | 24 ++++ .../Data/Comparer/GroupPairDtoComparer.cs | 24 ++++ .../Data/Comparer/UserDataComparer.cs | 22 ++++ .../Data/Comparer/UserDtoComparer.cs | 24 ++++ LightlessSyncAPI/Data/Constants.cs | 6 + .../Data/Enum/GroupPairUserInfo.cs | 9 ++ .../Data/Enum/GroupPermissions.cs | 11 ++ .../Enum/GroupUserPreferredPermissions.cs | 11 ++ .../Data/Enum/IndividualPairStatus.cs | 8 ++ LightlessSyncAPI/Data/Enum/MessageSeverity.cs | 8 ++ LightlessSyncAPI/Data/Enum/ObjectKind.cs | 9 ++ LightlessSyncAPI/Data/Enum/UserPermissions.cs | 12 ++ .../Extensions/GroupPermissionsExtensions.cs | 50 ++++++++ .../Extensions/GroupUserInfoExtensions.cs | 28 +++++ .../GroupUserPermissionsExtensions.cs | 50 ++++++++ .../Extensions/UserPermissionsExtensions.cs | 61 ++++++++++ LightlessSyncAPI/Data/FileReplacementData.cs | 29 +++++ LightlessSyncAPI/Data/GroupData.cs | 10 ++ LightlessSyncAPI/Data/UserData.cs | 10 ++ .../Dto/CharaData/AccessTypeDto.cs | 9 ++ .../Dto/CharaData/CharaDataDownloadDto.cs | 14 +++ .../Dto/CharaData/CharaDataDto.cs | 9 ++ .../Dto/CharaData/CharaDataFullDto.cs | 88 ++++++++++++++ .../Dto/CharaData/CharaDataMetaInfoDto.cs | 11 ++ .../Dto/CharaData/CharaDataUpdateDto.cs | 20 +++ .../Dto/CharaData/ShareTypeDto.cs | 7 ++ LightlessSyncAPI/Dto/ConnectionDto.cs | 27 ++++ LightlessSyncAPI/Dto/DefaultPermissionsDto.cs | 15 +++ LightlessSyncAPI/Dto/Files/DownloadFileDto.cs | 15 +++ LightlessSyncAPI/Dto/Files/FilesSendDto.cs | 13 ++ .../Dto/Files/ITransferFileDto.cs | 8 ++ LightlessSyncAPI/Dto/Files/UploadFileDto.cs | 11 ++ .../Dto/Group/BannedGroupUserDto.cs | 19 +++ LightlessSyncAPI/Dto/Group/GroupDto.cs | 13 ++ .../Dto/Group/GroupFullInfoDto.cs | 14 +++ LightlessSyncAPI/Dto/Group/GroupInfoDto.cs | 18 +++ LightlessSyncAPI/Dto/Group/GroupJoinDto.cs | 11 ++ LightlessSyncAPI/Dto/Group/GroupPairDto.cs | 12 ++ .../Dto/Group/GroupPairFullInfoDto.cs | 8 ++ .../Dto/Group/GroupPairUserInfoDto.cs | 8 ++ .../Dto/Group/GroupPairUserPermissionDto.cs | 8 ++ .../Dto/Group/GroupPermissionDto.cs | 8 ++ LightlessSyncAPI/Dto/SystemInfoDto.cs | 9 ++ .../Dto/User/BulkPermissionsDto.cs | 7 ++ LightlessSyncAPI/Dto/User/CensusDataDto.cs | 6 + .../Dto/User/OnlineUserCharaDataDto.cs | 7 ++ .../Dto/User/OnlineUserIdentDto.cs | 7 ++ .../Dto/User/UserCharaDataMessageDto.cs | 7 ++ LightlessSyncAPI/Dto/User/UserDto.cs | 7 ++ .../Dto/User/UserIndividualPairStatusDto.cs | 8 ++ LightlessSyncAPI/Dto/User/UserPairDto.cs | 21 ++++ .../Dto/User/UserPermissionsDto.cs | 8 ++ LightlessSyncAPI/Dto/User/UserProfileDto.cs | 7 ++ LightlessSyncAPI/LightlessSync.API.csproj | 13 ++ LightlessSyncAPI/LightlessSyncAPI.sln | 25 ++++ LightlessSyncAPI/Routes/LightlessAuth.cs | 23 ++++ LightlessSyncAPI/Routes/LightlessFiles.cs | 47 +++++++ LightlessSyncAPI/SignalR/ILightlessHub.cs | 91 ++++++++++++++ .../SignalR/ILightlessHubClient.cs | 61 ++++++++++ .../net8.0/LightlessSync.API.AssemblyInfo.cs | 23 ++++ ...LightlessSync.API.AssemblyInfoInputs.cache | 1 + ....GeneratedMSBuildEditorConfig.editorconfig | 15 +++ .../LightlessSync.API.GlobalUsings.g.cs | 8 ++ .../net8.0/LightlessSync.API.assets.cache | Bin 0 -> 1079 bytes ...essSync.API.csproj.AssemblyReference.cache | Bin 0 -> 599 bytes .../net8.0/MareSynchronos.API.AssemblyInfo.cs | 23 ++++ ...areSynchronos.API.AssemblyInfoInputs.cache | 1 + ....GeneratedMSBuildEditorConfig.editorconfig | 15 +++ .../MareSynchronos.API.GlobalUsings.g.cs | 8 ++ .../net8.0/MareSynchronos.API.assets.cache | Bin 0 -> 1079 bytes ...chronos.API.csproj.AssemblyReference.cache | Bin 0 -> 599 bytes ...LightlessSync.API.csproj.nuget.dgspec.json | 79 ++++++++++++ .../LightlessSync.API.csproj.nuget.g.props | 16 +++ .../LightlessSync.API.csproj.nuget.g.targets | 2 + ...areSynchronos.API.csproj.nuget.dgspec.json | 79 ++++++++++++ .../MareSynchronos.API.csproj.nuget.g.props | 16 +++ .../MareSynchronos.API.csproj.nuget.g.targets | 2 + LightlessSyncAPI/obj/project.assets.json | 115 ++++++++++++++++++ LightlessSyncAPI/obj/project.nuget.cache | 10 ++ 81 files changed, 1598 insertions(+) create mode 100644 LightlessSyncAPI/Data/CharacterData.cs create mode 100644 LightlessSyncAPI/Data/Comparer/GroupDataComparer.cs create mode 100644 LightlessSyncAPI/Data/Comparer/GroupDtoComparer.cs create mode 100644 LightlessSyncAPI/Data/Comparer/GroupPairDtoComparer.cs create mode 100644 LightlessSyncAPI/Data/Comparer/UserDataComparer.cs create mode 100644 LightlessSyncAPI/Data/Comparer/UserDtoComparer.cs create mode 100644 LightlessSyncAPI/Data/Constants.cs create mode 100644 LightlessSyncAPI/Data/Enum/GroupPairUserInfo.cs create mode 100644 LightlessSyncAPI/Data/Enum/GroupPermissions.cs create mode 100644 LightlessSyncAPI/Data/Enum/GroupUserPreferredPermissions.cs create mode 100644 LightlessSyncAPI/Data/Enum/IndividualPairStatus.cs create mode 100644 LightlessSyncAPI/Data/Enum/MessageSeverity.cs create mode 100644 LightlessSyncAPI/Data/Enum/ObjectKind.cs create mode 100644 LightlessSyncAPI/Data/Enum/UserPermissions.cs create mode 100644 LightlessSyncAPI/Data/Extensions/GroupPermissionsExtensions.cs create mode 100644 LightlessSyncAPI/Data/Extensions/GroupUserInfoExtensions.cs create mode 100644 LightlessSyncAPI/Data/Extensions/GroupUserPermissionsExtensions.cs create mode 100644 LightlessSyncAPI/Data/Extensions/UserPermissionsExtensions.cs create mode 100644 LightlessSyncAPI/Data/FileReplacementData.cs create mode 100644 LightlessSyncAPI/Data/GroupData.cs create mode 100644 LightlessSyncAPI/Data/UserData.cs create mode 100644 LightlessSyncAPI/Dto/CharaData/AccessTypeDto.cs create mode 100644 LightlessSyncAPI/Dto/CharaData/CharaDataDownloadDto.cs create mode 100644 LightlessSyncAPI/Dto/CharaData/CharaDataDto.cs create mode 100644 LightlessSyncAPI/Dto/CharaData/CharaDataFullDto.cs create mode 100644 LightlessSyncAPI/Dto/CharaData/CharaDataMetaInfoDto.cs create mode 100644 LightlessSyncAPI/Dto/CharaData/CharaDataUpdateDto.cs create mode 100644 LightlessSyncAPI/Dto/CharaData/ShareTypeDto.cs create mode 100644 LightlessSyncAPI/Dto/ConnectionDto.cs create mode 100644 LightlessSyncAPI/Dto/DefaultPermissionsDto.cs create mode 100644 LightlessSyncAPI/Dto/Files/DownloadFileDto.cs create mode 100644 LightlessSyncAPI/Dto/Files/FilesSendDto.cs create mode 100644 LightlessSyncAPI/Dto/Files/ITransferFileDto.cs create mode 100644 LightlessSyncAPI/Dto/Files/UploadFileDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/BannedGroupUserDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupFullInfoDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupInfoDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupJoinDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupPairDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupPairFullInfoDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupPairUserInfoDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupPairUserPermissionDto.cs create mode 100644 LightlessSyncAPI/Dto/Group/GroupPermissionDto.cs create mode 100644 LightlessSyncAPI/Dto/SystemInfoDto.cs create mode 100644 LightlessSyncAPI/Dto/User/BulkPermissionsDto.cs create mode 100644 LightlessSyncAPI/Dto/User/CensusDataDto.cs create mode 100644 LightlessSyncAPI/Dto/User/OnlineUserCharaDataDto.cs create mode 100644 LightlessSyncAPI/Dto/User/OnlineUserIdentDto.cs create mode 100644 LightlessSyncAPI/Dto/User/UserCharaDataMessageDto.cs create mode 100644 LightlessSyncAPI/Dto/User/UserDto.cs create mode 100644 LightlessSyncAPI/Dto/User/UserIndividualPairStatusDto.cs create mode 100644 LightlessSyncAPI/Dto/User/UserPairDto.cs create mode 100644 LightlessSyncAPI/Dto/User/UserPermissionsDto.cs create mode 100644 LightlessSyncAPI/Dto/User/UserProfileDto.cs create mode 100644 LightlessSyncAPI/LightlessSync.API.csproj create mode 100644 LightlessSyncAPI/LightlessSyncAPI.sln create mode 100644 LightlessSyncAPI/Routes/LightlessAuth.cs create mode 100644 LightlessSyncAPI/Routes/LightlessFiles.cs create mode 100644 LightlessSyncAPI/SignalR/ILightlessHub.cs create mode 100644 LightlessSyncAPI/SignalR/ILightlessHubClient.cs create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.AssemblyInfo.cs create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.AssemblyInfoInputs.cache create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.GeneratedMSBuildEditorConfig.editorconfig create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.GlobalUsings.g.cs create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.assets.cache create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.csproj.AssemblyReference.cache create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.AssemblyInfo.cs create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.AssemblyInfoInputs.cache create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.GeneratedMSBuildEditorConfig.editorconfig create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.GlobalUsings.g.cs create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.assets.cache create mode 100644 LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.csproj.AssemblyReference.cache create mode 100644 LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.dgspec.json create mode 100644 LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.props create mode 100644 LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.targets create mode 100644 LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.dgspec.json create mode 100644 LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.props create mode 100644 LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.targets create mode 100644 LightlessSyncAPI/obj/project.assets.json create mode 100644 LightlessSyncAPI/obj/project.nuget.cache diff --git a/LightlessSyncAPI/Data/CharacterData.cs b/LightlessSyncAPI/Data/CharacterData.cs new file mode 100644 index 0000000..611ade2 --- /dev/null +++ b/LightlessSyncAPI/Data/CharacterData.cs @@ -0,0 +1,37 @@ +using LightlessSync.API.Data.Enum; +using MessagePack; +using System.Security.Cryptography; + +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace LightlessSync.API.Data; + +[MessagePackObject(keyAsPropertyName: true)] +public class CharacterData +{ + public CharacterData() + { + DataHash = new(() => + { + var json = JsonSerializer.Serialize(this); +#pragma warning disable SYSLIB0021 // Type or member is obsolete + using SHA256CryptoServiceProvider cryptoProvider = new(); +#pragma warning restore SYSLIB0021 // Type or member is obsolete + return BitConverter.ToString(cryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(json))).Replace("-", "", StringComparison.Ordinal); + }); + } + + public Dictionary CustomizePlusData { get; set; } = new(); + [JsonIgnore] + public Lazy DataHash { get; } + + public Dictionary> FileReplacements { get; set; } = new(); + public Dictionary GlamourerData { get; set; } = new(); + public string HeelsData { get; set; } = string.Empty; + public string HonorificData { get; set; } = string.Empty; + public string ManipulationData { get; set; } = string.Empty; + public string MoodlesData { get; set; } = string.Empty; + public string PetNamesData { get; set; } = string.Empty; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Comparer/GroupDataComparer.cs b/LightlessSyncAPI/Data/Comparer/GroupDataComparer.cs new file mode 100644 index 0000000..2b9f706 --- /dev/null +++ b/LightlessSyncAPI/Data/Comparer/GroupDataComparer.cs @@ -0,0 +1,22 @@ +namespace LightlessSync.API.Data.Comparer; + +public class GroupDataComparer : IEqualityComparer +{ + private static GroupDataComparer _instance = new GroupDataComparer(); + + private GroupDataComparer() + { } + + public static GroupDataComparer Instance => _instance; + + public bool Equals(GroupData? x, GroupData? y) + { + if (x == null || y == null) return false; + return x.GID.Equals(y.GID, StringComparison.Ordinal); + } + + public int GetHashCode(GroupData obj) + { + return obj.GID.GetHashCode(); + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Comparer/GroupDtoComparer.cs b/LightlessSyncAPI/Data/Comparer/GroupDtoComparer.cs new file mode 100644 index 0000000..b59c9d2 --- /dev/null +++ b/LightlessSyncAPI/Data/Comparer/GroupDtoComparer.cs @@ -0,0 +1,24 @@ +using LightlessSync.API.Dto.Group; + +namespace LightlessSync.API.Data.Comparer; + +public class GroupDtoComparer : IEqualityComparer +{ + private static GroupDtoComparer _instance = new GroupDtoComparer(); + + private GroupDtoComparer() + { } + + public static GroupDtoComparer Instance => _instance; + + public bool Equals(GroupDto? x, GroupDto? y) + { + if (x == null || y == null) return false; + return x.GID.Equals(y.GID, StringComparison.Ordinal); + } + + public int GetHashCode(GroupDto obj) + { + return obj.Group.GID.GetHashCode(); + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Comparer/GroupPairDtoComparer.cs b/LightlessSyncAPI/Data/Comparer/GroupPairDtoComparer.cs new file mode 100644 index 0000000..ade60c0 --- /dev/null +++ b/LightlessSyncAPI/Data/Comparer/GroupPairDtoComparer.cs @@ -0,0 +1,24 @@ +using LightlessSync.API.Dto.Group; + +namespace LightlessSync.API.Data.Comparer; + +public class GroupPairDtoComparer : IEqualityComparer +{ + private static GroupPairDtoComparer _instance = new(); + + private GroupPairDtoComparer() + { } + + public static GroupPairDtoComparer Instance => _instance; + + public bool Equals(GroupPairDto? x, GroupPairDto? y) + { + if (x == null || y == null) return false; + return x.GID.Equals(y.GID, StringComparison.Ordinal) && x.UID.Equals(y.UID, StringComparison.Ordinal); + } + + public int GetHashCode(GroupPairDto obj) + { + return HashCode.Combine(obj.Group.GID.GetHashCode(), obj.User.UID.GetHashCode()); + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Comparer/UserDataComparer.cs b/LightlessSyncAPI/Data/Comparer/UserDataComparer.cs new file mode 100644 index 0000000..e9f55de --- /dev/null +++ b/LightlessSyncAPI/Data/Comparer/UserDataComparer.cs @@ -0,0 +1,22 @@ +namespace LightlessSync.API.Data.Comparer; + +public class UserDataComparer : IEqualityComparer +{ + private static UserDataComparer _instance = new(); + + private UserDataComparer() + { } + + public static UserDataComparer Instance => _instance; + + public bool Equals(UserData? x, UserData? y) + { + if (x == null || y == null) return false; + return x.UID.Equals(y.UID, StringComparison.Ordinal); + } + + public int GetHashCode(UserData obj) + { + return obj.UID.GetHashCode(); + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Comparer/UserDtoComparer.cs b/LightlessSyncAPI/Data/Comparer/UserDtoComparer.cs new file mode 100644 index 0000000..16bb129 --- /dev/null +++ b/LightlessSyncAPI/Data/Comparer/UserDtoComparer.cs @@ -0,0 +1,24 @@ +using LightlessSync.API.Dto.User; + +namespace LightlessSync.API.Data.Comparer; + +public class UserDtoComparer : IEqualityComparer +{ + private static UserDtoComparer _instance = new(); + + private UserDtoComparer() + { } + + public static UserDtoComparer Instance => _instance; + + public bool Equals(UserDto? x, UserDto? y) + { + if (x == null || y == null) return false; + return x.User.UID.Equals(y.User.UID, StringComparison.Ordinal); + } + + public int GetHashCode(UserDto obj) + { + return obj.User.UID.GetHashCode(); + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Constants.cs b/LightlessSyncAPI/Data/Constants.cs new file mode 100644 index 0000000..95ddd18 --- /dev/null +++ b/LightlessSyncAPI/Data/Constants.cs @@ -0,0 +1,6 @@ +namespace LightlessSync.API.Data; + +public class Constants +{ + public const string IndividualKeyword = "//MARE//DIRECT"; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Enum/GroupPairUserInfo.cs b/LightlessSyncAPI/Data/Enum/GroupPairUserInfo.cs new file mode 100644 index 0000000..8e95df2 --- /dev/null +++ b/LightlessSyncAPI/Data/Enum/GroupPairUserInfo.cs @@ -0,0 +1,9 @@ +namespace LightlessSync.API.Data.Enum; + +[Flags] +public enum GroupPairUserInfo +{ + None = 0x0, + IsModerator = 0x2, + IsPinned = 0x4 +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Enum/GroupPermissions.cs b/LightlessSyncAPI/Data/Enum/GroupPermissions.cs new file mode 100644 index 0000000..a58a8a8 --- /dev/null +++ b/LightlessSyncAPI/Data/Enum/GroupPermissions.cs @@ -0,0 +1,11 @@ +namespace LightlessSync.API.Data.Enum; + +[Flags] +public enum GroupPermissions +{ + NoneSet = 0x0, + PreferDisableAnimations = 0x1, + PreferDisableSounds = 0x2, + DisableInvites = 0x4, + PreferDisableVFX = 0x8, +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Enum/GroupUserPreferredPermissions.cs b/LightlessSyncAPI/Data/Enum/GroupUserPreferredPermissions.cs new file mode 100644 index 0000000..cf0b448 --- /dev/null +++ b/LightlessSyncAPI/Data/Enum/GroupUserPreferredPermissions.cs @@ -0,0 +1,11 @@ +namespace LightlessSync.API.Data.Enum; + +[Flags] +public enum GroupUserPreferredPermissions +{ + NoneSet = 0x0, + Paused = 0x1, + DisableAnimations = 0x2, + DisableSounds = 0x4, + DisableVFX = 0x8, +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Enum/IndividualPairStatus.cs b/LightlessSyncAPI/Data/Enum/IndividualPairStatus.cs new file mode 100644 index 0000000..03e324c --- /dev/null +++ b/LightlessSyncAPI/Data/Enum/IndividualPairStatus.cs @@ -0,0 +1,8 @@ +namespace LightlessSync.API.Data.Enum; + +public enum IndividualPairStatus +{ + None, + OneSided, + Bidirectional +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Enum/MessageSeverity.cs b/LightlessSyncAPI/Data/Enum/MessageSeverity.cs new file mode 100644 index 0000000..ca120f4 --- /dev/null +++ b/LightlessSyncAPI/Data/Enum/MessageSeverity.cs @@ -0,0 +1,8 @@ +namespace LightlessSync.API.Data.Enum; + +public enum MessageSeverity +{ + Information, + Warning, + Error +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Enum/ObjectKind.cs b/LightlessSyncAPI/Data/Enum/ObjectKind.cs new file mode 100644 index 0000000..f34e02e --- /dev/null +++ b/LightlessSyncAPI/Data/Enum/ObjectKind.cs @@ -0,0 +1,9 @@ +namespace LightlessSync.API.Data.Enum; + +public enum ObjectKind +{ + Player = 0, + MinionOrMount = 1, + Companion = 2, + Pet = 3, +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Enum/UserPermissions.cs b/LightlessSyncAPI/Data/Enum/UserPermissions.cs new file mode 100644 index 0000000..7d875d7 --- /dev/null +++ b/LightlessSyncAPI/Data/Enum/UserPermissions.cs @@ -0,0 +1,12 @@ +namespace LightlessSync.API.Data.Enum; + +[Flags] +public enum UserPermissions +{ + NoneSet = 0, + Paused = 1, + DisableAnimations = 2, + DisableSounds = 4, + DisableVFX = 8, + Sticky = 16, +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Extensions/GroupPermissionsExtensions.cs b/LightlessSyncAPI/Data/Extensions/GroupPermissionsExtensions.cs new file mode 100644 index 0000000..05dbb22 --- /dev/null +++ b/LightlessSyncAPI/Data/Extensions/GroupPermissionsExtensions.cs @@ -0,0 +1,50 @@ +using LightlessSync.API.Data.Enum; + +namespace LightlessSync.API.Data.Extensions; + +public static class GroupPermissionsExtensions +{ + public static bool IsDisableInvites(this GroupPermissions perm) + { + return perm.HasFlag(GroupPermissions.DisableInvites); + } + + public static bool IsPreferDisableAnimations(this GroupPermissions perm) + { + return perm.HasFlag(GroupPermissions.PreferDisableAnimations); + } + + public static bool IsPreferDisableSounds(this GroupPermissions perm) + { + return perm.HasFlag(GroupPermissions.PreferDisableSounds); + } + + public static bool IsPreferDisableVFX(this GroupPermissions perm) + { + return perm.HasFlag(GroupPermissions.PreferDisableVFX); + } + + public static void SetDisableInvites(this ref GroupPermissions perm, bool set) + { + if (set) perm |= GroupPermissions.DisableInvites; + else perm &= ~GroupPermissions.DisableInvites; + } + + public static void SetPreferDisableAnimations(this ref GroupPermissions perm, bool set) + { + if (set) perm |= GroupPermissions.PreferDisableAnimations; + else perm &= ~GroupPermissions.PreferDisableAnimations; + } + + public static void SetPreferDisableSounds(this ref GroupPermissions perm, bool set) + { + if (set) perm |= GroupPermissions.PreferDisableSounds; + else perm &= ~GroupPermissions.PreferDisableSounds; + } + + public static void SetPreferDisableVFX(this ref GroupPermissions perm, bool set) + { + if (set) perm |= GroupPermissions.PreferDisableVFX; + else perm &= ~GroupPermissions.PreferDisableVFX; + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Extensions/GroupUserInfoExtensions.cs b/LightlessSyncAPI/Data/Extensions/GroupUserInfoExtensions.cs new file mode 100644 index 0000000..ba5159e --- /dev/null +++ b/LightlessSyncAPI/Data/Extensions/GroupUserInfoExtensions.cs @@ -0,0 +1,28 @@ +using LightlessSync.API.Data.Enum; + +namespace LightlessSync.API.Data.Extensions; + +public static class GroupUserInfoExtensions +{ + public static bool IsModerator(this GroupPairUserInfo info) + { + return info.HasFlag(GroupPairUserInfo.IsModerator); + } + + public static bool IsPinned(this GroupPairUserInfo info) + { + return info.HasFlag(GroupPairUserInfo.IsPinned); + } + + public static void SetModerator(this ref GroupPairUserInfo info, bool isModerator) + { + if (isModerator) info |= GroupPairUserInfo.IsModerator; + else info &= ~GroupPairUserInfo.IsModerator; + } + + public static void SetPinned(this ref GroupPairUserInfo info, bool isPinned) + { + if (isPinned) info |= GroupPairUserInfo.IsPinned; + else info &= ~GroupPairUserInfo.IsPinned; + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Extensions/GroupUserPermissionsExtensions.cs b/LightlessSyncAPI/Data/Extensions/GroupUserPermissionsExtensions.cs new file mode 100644 index 0000000..f55f1cd --- /dev/null +++ b/LightlessSyncAPI/Data/Extensions/GroupUserPermissionsExtensions.cs @@ -0,0 +1,50 @@ +using LightlessSync.API.Data.Enum; + +namespace LightlessSync.API.Data.Extensions; + +public static class GroupUserPermissionsExtensions +{ + public static bool IsDisableAnimations(this GroupUserPreferredPermissions perm) + { + return perm.HasFlag(GroupUserPreferredPermissions.DisableAnimations); + } + + public static bool IsDisableSounds(this GroupUserPreferredPermissions perm) + { + return perm.HasFlag(GroupUserPreferredPermissions.DisableSounds); + } + + public static bool IsDisableVFX(this GroupUserPreferredPermissions perm) + { + return perm.HasFlag(GroupUserPreferredPermissions.DisableVFX); + } + + public static bool IsPaused(this GroupUserPreferredPermissions perm) + { + return perm.HasFlag(GroupUserPreferredPermissions.Paused); + } + + public static void SetDisableAnimations(this ref GroupUserPreferredPermissions perm, bool set) + { + if (set) perm |= GroupUserPreferredPermissions.DisableAnimations; + else perm &= ~GroupUserPreferredPermissions.DisableAnimations; + } + + public static void SetDisableSounds(this ref GroupUserPreferredPermissions perm, bool set) + { + if (set) perm |= GroupUserPreferredPermissions.DisableSounds; + else perm &= ~GroupUserPreferredPermissions.DisableSounds; + } + + public static void SetDisableVFX(this ref GroupUserPreferredPermissions perm, bool set) + { + if (set) perm |= GroupUserPreferredPermissions.DisableVFX; + else perm &= ~GroupUserPreferredPermissions.DisableVFX; + } + + public static void SetPaused(this ref GroupUserPreferredPermissions perm, bool set) + { + if (set) perm |= GroupUserPreferredPermissions.Paused; + else perm &= ~GroupUserPreferredPermissions.Paused; + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/Extensions/UserPermissionsExtensions.cs b/LightlessSyncAPI/Data/Extensions/UserPermissionsExtensions.cs new file mode 100644 index 0000000..6357b8f --- /dev/null +++ b/LightlessSyncAPI/Data/Extensions/UserPermissionsExtensions.cs @@ -0,0 +1,61 @@ +using LightlessSync.API.Data.Enum; + +namespace LightlessSync.API.Data.Extensions; + +public static class UserPermissionsExtensions +{ + public static bool IsDisableAnimations(this UserPermissions perm) + { + return perm.HasFlag(UserPermissions.DisableAnimations); + } + + public static bool IsDisableSounds(this UserPermissions perm) + { + return perm.HasFlag(UserPermissions.DisableSounds); + } + + public static bool IsDisableVFX(this UserPermissions perm) + { + return perm.HasFlag(UserPermissions.DisableVFX); + } + + public static bool IsPaused(this UserPermissions perm) + { + return perm.HasFlag(UserPermissions.Paused); + } + + public static bool IsSticky(this UserPermissions perm) + { + return perm.HasFlag(UserPermissions.Sticky); + } + + public static void SetDisableAnimations(this ref UserPermissions perm, bool set) + { + if (set) perm |= UserPermissions.DisableAnimations; + else perm &= ~UserPermissions.DisableAnimations; + } + + public static void SetDisableSounds(this ref UserPermissions perm, bool set) + { + if (set) perm |= UserPermissions.DisableSounds; + else perm &= ~UserPermissions.DisableSounds; + } + + public static void SetDisableVFX(this ref UserPermissions perm, bool set) + { + if (set) perm |= UserPermissions.DisableVFX; + else perm &= ~UserPermissions.DisableVFX; + } + + public static void SetPaused(this ref UserPermissions perm, bool paused) + { + if (paused) perm |= UserPermissions.Paused; + else perm &= ~UserPermissions.Paused; + } + + public static void SetSticky(this ref UserPermissions perm, bool sticky) + { + if (sticky) perm |= UserPermissions.Sticky; + else perm &= ~UserPermissions.Sticky; + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/FileReplacementData.cs b/LightlessSyncAPI/Data/FileReplacementData.cs new file mode 100644 index 0000000..387df7f --- /dev/null +++ b/LightlessSyncAPI/Data/FileReplacementData.cs @@ -0,0 +1,29 @@ +using MessagePack; +using System.Security.Cryptography; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace LightlessSync.API.Data; + +[MessagePackObject(keyAsPropertyName: true)] +public class FileReplacementData +{ + public FileReplacementData() + { + DataHash = new(() => + { + var json = JsonSerializer.Serialize(this); +#pragma warning disable SYSLIB0021 // Type or member is obsolete + using SHA256CryptoServiceProvider cryptoProvider = new(); +#pragma warning restore SYSLIB0021 // Type or member is obsolete + return BitConverter.ToString(cryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(json))).Replace("-", "", StringComparison.Ordinal); + }); + } + + [JsonIgnore] + public Lazy DataHash { get; } + public string FileSwapPath { get; set; } = string.Empty; + public string[] GamePaths { get; set; } = Array.Empty(); + public string Hash { get; set; } = string.Empty; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/GroupData.cs b/LightlessSyncAPI/Data/GroupData.cs new file mode 100644 index 0000000..a8ccca2 --- /dev/null +++ b/LightlessSyncAPI/Data/GroupData.cs @@ -0,0 +1,10 @@ +using MessagePack; + +namespace LightlessSync.API.Data; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupData(string GID, string? Alias = null) +{ + [IgnoreMember] + public string AliasOrGID => string.IsNullOrWhiteSpace(Alias) ? GID : Alias; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Data/UserData.cs b/LightlessSyncAPI/Data/UserData.cs new file mode 100644 index 0000000..d993fa3 --- /dev/null +++ b/LightlessSyncAPI/Data/UserData.cs @@ -0,0 +1,10 @@ +using MessagePack; + +namespace LightlessSync.API.Data; + +[MessagePackObject(keyAsPropertyName: true)] +public record UserData(string UID, string? Alias = null) +{ + [IgnoreMember] + public string AliasOrUID => string.IsNullOrWhiteSpace(Alias) ? UID : Alias; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/CharaData/AccessTypeDto.cs b/LightlessSyncAPI/Dto/CharaData/AccessTypeDto.cs new file mode 100644 index 0000000..e4f7e84 --- /dev/null +++ b/LightlessSyncAPI/Dto/CharaData/AccessTypeDto.cs @@ -0,0 +1,9 @@ +namespace LightlessSync.API.Dto.CharaData; + +public enum AccessTypeDto +{ + Individuals, + ClosePairs, + AllPairs, + Public +} diff --git a/LightlessSyncAPI/Dto/CharaData/CharaDataDownloadDto.cs b/LightlessSyncAPI/Dto/CharaData/CharaDataDownloadDto.cs new file mode 100644 index 0000000..84f9251 --- /dev/null +++ b/LightlessSyncAPI/Dto/CharaData/CharaDataDownloadDto.cs @@ -0,0 +1,14 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.CharaData; + +[MessagePackObject(keyAsPropertyName: true)] +public record CharaDataDownloadDto(string Id, UserData Uploader) : CharaDataDto(Id, Uploader) +{ + public string GlamourerData { get; init; } = string.Empty; + public string CustomizeData { get; init; } = string.Empty; + public string ManipulationData { get; set; } = string.Empty; + public List FileGamePaths { get; init; } = []; + public List FileSwaps { get; init; } = []; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/CharaData/CharaDataDto.cs b/LightlessSyncAPI/Dto/CharaData/CharaDataDto.cs new file mode 100644 index 0000000..d6d5862 --- /dev/null +++ b/LightlessSyncAPI/Dto/CharaData/CharaDataDto.cs @@ -0,0 +1,9 @@ +using LightlessSync.API.Data; + +namespace LightlessSync.API.Dto.CharaData; + +public record CharaDataDto(string Id, UserData Uploader) +{ + public string Description { get; init; } = string.Empty; + public DateTime UpdatedDate { get; init; } +} diff --git a/LightlessSyncAPI/Dto/CharaData/CharaDataFullDto.cs b/LightlessSyncAPI/Dto/CharaData/CharaDataFullDto.cs new file mode 100644 index 0000000..726b4b2 --- /dev/null +++ b/LightlessSyncAPI/Dto/CharaData/CharaDataFullDto.cs @@ -0,0 +1,88 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.CharaData; + +[MessagePackObject(keyAsPropertyName: true)] +public record CharaDataFullDto(string Id, UserData Uploader) : CharaDataDto(Id, Uploader) +{ + public DateTime CreatedDate { get; init; } + public DateTime ExpiryDate { get; set; } + public string GlamourerData { get; set; } = string.Empty; + public string CustomizeData { get; set; } = string.Empty; + public string ManipulationData { get; set; } = string.Empty; + public int DownloadCount { get; set; } = 0; + public List AllowedUsers { get; set; } = []; + public List AllowedGroups { get; set; } = []; + public List FileGamePaths { get; set; } = []; + public List FileSwaps { get; set; } = []; + public List OriginalFiles { get; set; } = []; + public AccessTypeDto AccessType { get; set; } + public ShareTypeDto ShareType { get; set; } + public List PoseData { get; set; } = []; +} + +[MessagePackObject(keyAsPropertyName: true)] +public record GamePathEntry(string HashOrFileSwap, string GamePath); + +[MessagePackObject(keyAsPropertyName: true)] +public record PoseEntry(long? Id) +{ + public string? Description { get; set; } = string.Empty; + public string? PoseData { get; set; } = string.Empty; + public WorldData? WorldData { get; set; } +} + +[MessagePackObject] +public record struct WorldData +{ + [Key(0)] public LocationInfo LocationInfo { get; set; } + [Key(1)] public float PositionX { get; set; } + [Key(2)] public float PositionY { get; set; } + [Key(3)] public float PositionZ { get; set; } + [Key(4)] public float RotationX { get; set; } + [Key(5)] public float RotationY { get; set; } + [Key(6)] public float RotationZ { get; set; } + [Key(7)] public float RotationW { get; set; } + [Key(8)] public float ScaleX { get; set; } + [Key(9)] public float ScaleY { get; set; } + [Key(10)] public float ScaleZ { get; set; } +} + +[MessagePackObject] +public record struct LocationInfo +{ + [Key(0)] public uint ServerId { get; set; } + [Key(1)] public uint MapId { get; set; } + [Key(2)] public uint TerritoryId { get; set; } + [Key(3)] public uint DivisionId { get; set; } + [Key(4)] public uint WardId { get; set; } + [Key(5)] public uint HouseId { get; set; } + [Key(6)] public uint RoomId { get; set; } +} + +[MessagePackObject] +public record struct PoseData +{ + [Key(0)] public bool IsDelta { get; set; } + [Key(1)] public Dictionary Bones { get; set; } + [Key(2)] public Dictionary MainHand { get; set; } + [Key(3)] public Dictionary OffHand { get; set; } + [Key(4)] public BoneData ModelDifference { get; set; } +} + +[MessagePackObject] +public record struct BoneData +{ + [Key(0)] public bool Exists { get; set; } + [Key(1)] public float PositionX { get; set; } + [Key(2)] public float PositionY { get; set; } + [Key(3)] public float PositionZ { get; set; } + [Key(4)] public float RotationX { get; set; } + [Key(5)] public float RotationY { get; set; } + [Key(6)] public float RotationZ { get; set; } + [Key(7)] public float RotationW { get; set; } + [Key(8)] public float ScaleX { get; set; } + [Key(9)] public float ScaleY { get; set; } + [Key(10)] public float ScaleZ { get; set; } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/CharaData/CharaDataMetaInfoDto.cs b/LightlessSyncAPI/Dto/CharaData/CharaDataMetaInfoDto.cs new file mode 100644 index 0000000..76cc363 --- /dev/null +++ b/LightlessSyncAPI/Dto/CharaData/CharaDataMetaInfoDto.cs @@ -0,0 +1,11 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.CharaData; + +[MessagePackObject(keyAsPropertyName: true)] +public record CharaDataMetaInfoDto(string Id, UserData Uploader) : CharaDataDto(Id, Uploader) +{ + public bool CanBeDownloaded { get; init; } + public List PoseData { get; set; } = []; +} diff --git a/LightlessSyncAPI/Dto/CharaData/CharaDataUpdateDto.cs b/LightlessSyncAPI/Dto/CharaData/CharaDataUpdateDto.cs new file mode 100644 index 0000000..a08cc94 --- /dev/null +++ b/LightlessSyncAPI/Dto/CharaData/CharaDataUpdateDto.cs @@ -0,0 +1,20 @@ +using MessagePack; + +namespace LightlessSync.API.Dto.CharaData; + +[MessagePackObject(keyAsPropertyName: true)] +public record CharaDataUpdateDto(string Id) +{ + public string? Description { get; set; } + public DateTime? ExpiryDate { get; set; } + public string? GlamourerData { get; set; } + public string? CustomizeData { get; set; } + public string? ManipulationData { get; set; } + public List? AllowedUsers { get; set; } + public List? AllowedGroups { get; set; } + public List? FileGamePaths { get; set; } + public List? FileSwaps { get; set; } + public AccessTypeDto? AccessType { get; set; } + public ShareTypeDto? ShareType { get; set; } + public List? Poses { get; set; } +} diff --git a/LightlessSyncAPI/Dto/CharaData/ShareTypeDto.cs b/LightlessSyncAPI/Dto/CharaData/ShareTypeDto.cs new file mode 100644 index 0000000..48dce0d --- /dev/null +++ b/LightlessSyncAPI/Dto/CharaData/ShareTypeDto.cs @@ -0,0 +1,7 @@ +namespace LightlessSync.API.Dto.CharaData; + +public enum ShareTypeDto +{ + Private, + Shared +} diff --git a/LightlessSyncAPI/Dto/ConnectionDto.cs b/LightlessSyncAPI/Dto/ConnectionDto.cs new file mode 100644 index 0000000..eea8666 --- /dev/null +++ b/LightlessSyncAPI/Dto/ConnectionDto.cs @@ -0,0 +1,27 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto; + +[MessagePackObject(keyAsPropertyName: true)] +public record ConnectionDto(UserData User) +{ + public Version CurrentClientVersion { get; set; } = new(0, 0, 0); + public int ServerVersion { get; set; } + public bool IsAdmin { get; set; } + public bool IsModerator { get; set; } + public ServerInfo ServerInfo { get; set; } = new(); + public DefaultPermissionsDto DefaultPreferredPermissions { get; set; } = new(); +} + +[MessagePackObject(keyAsPropertyName: true)] +public record ServerInfo +{ + public string ShardName { get; set; } = string.Empty; + public int MaxGroupUserCount { get; set; } + public int MaxGroupsCreatedByUser { get; set; } + public int MaxGroupsJoinedByUser { get; set; } + public Uri FileServerAddress { get; set; } = new Uri("http://nonemptyuri"); + public int MaxCharaData { get; set; } + public int MaxCharaDataVanity { get; set; } +} diff --git a/LightlessSyncAPI/Dto/DefaultPermissionsDto.cs b/LightlessSyncAPI/Dto/DefaultPermissionsDto.cs new file mode 100644 index 0000000..1e46e87 --- /dev/null +++ b/LightlessSyncAPI/Dto/DefaultPermissionsDto.cs @@ -0,0 +1,15 @@ +using MessagePack; + +namespace LightlessSync.API.Dto; + +[MessagePackObject(keyAsPropertyName: true)] +public record DefaultPermissionsDto +{ + public bool DisableIndividualAnimations { get; set; } = false; + public bool DisableIndividualSounds { get; set; } = false; + public bool DisableIndividualVFX { get; set; } = false; + public bool DisableGroupAnimations { get; set; } = false; + public bool DisableGroupSounds { get; set; } = false; + public bool DisableGroupVFX { get; set; } = false; + public bool IndividualIsSticky { get; set; } = true; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Files/DownloadFileDto.cs b/LightlessSyncAPI/Dto/Files/DownloadFileDto.cs new file mode 100644 index 0000000..44f24a0 --- /dev/null +++ b/LightlessSyncAPI/Dto/Files/DownloadFileDto.cs @@ -0,0 +1,15 @@ +using MessagePack; + +namespace LightlessSync.API.Dto.Files; + +[MessagePackObject(keyAsPropertyName: true)] +public record DownloadFileDto : ITransferFileDto +{ + public bool FileExists { get; set; } = true; + public string Hash { get; set; } = string.Empty; + public string Url { get; set; } = string.Empty; + public long Size { get; set; } = 0; + public bool IsForbidden { get; set; } = false; + public string ForbiddenBy { get; set; } = string.Empty; + public long RawSize { get; set; } = 0; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Files/FilesSendDto.cs b/LightlessSyncAPI/Dto/Files/FilesSendDto.cs new file mode 100644 index 0000000..d9d1594 --- /dev/null +++ b/LightlessSyncAPI/Dto/Files/FilesSendDto.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LightlessSync.API.Dto.Files; + +public class FilesSendDto +{ + public List FileHashes { get; set; } = new(); + public List UIDs { get; set; } = new(); +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Files/ITransferFileDto.cs b/LightlessSyncAPI/Dto/Files/ITransferFileDto.cs new file mode 100644 index 0000000..ad44fdd --- /dev/null +++ b/LightlessSyncAPI/Dto/Files/ITransferFileDto.cs @@ -0,0 +1,8 @@ +namespace LightlessSync.API.Dto.Files; + +public interface ITransferFileDto +{ + string ForbiddenBy { get; set; } + string Hash { get; set; } + bool IsForbidden { get; set; } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Files/UploadFileDto.cs b/LightlessSyncAPI/Dto/Files/UploadFileDto.cs new file mode 100644 index 0000000..f836671 --- /dev/null +++ b/LightlessSyncAPI/Dto/Files/UploadFileDto.cs @@ -0,0 +1,11 @@ +using MessagePack; + +namespace LightlessSync.API.Dto.Files; + +[MessagePackObject(keyAsPropertyName: true)] +public record UploadFileDto : ITransferFileDto +{ + public string Hash { get; set; } = string.Empty; + public bool IsForbidden { get; set; } = false; + public string ForbiddenBy { get; set; } = string.Empty; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/BannedGroupUserDto.cs b/LightlessSyncAPI/Dto/Group/BannedGroupUserDto.cs new file mode 100644 index 0000000..269b2bf --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/BannedGroupUserDto.cs @@ -0,0 +1,19 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record BannedGroupUserDto : GroupPairDto +{ + public BannedGroupUserDto(GroupData group, UserData user, string reason, DateTime bannedOn, string bannedBy) : base(group, user) + { + Reason = reason; + BannedOn = bannedOn; + BannedBy = bannedBy; + } + + public string Reason { get; set; } + public DateTime BannedOn { get; set; } + public string BannedBy { get; set; } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupDto.cs b/LightlessSyncAPI/Dto/Group/GroupDto.cs new file mode 100644 index 0000000..9656cc3 --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupDto.cs @@ -0,0 +1,13 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupDto(GroupData Group) +{ + public GroupData Group { get; set; } = Group; + public string GID => Group.GID; + public string? GroupAlias => Group.Alias; + public string GroupAliasOrGID => Group.AliasOrGID; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupFullInfoDto.cs b/LightlessSyncAPI/Dto/Group/GroupFullInfoDto.cs new file mode 100644 index 0000000..46ad2f6 --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupFullInfoDto.cs @@ -0,0 +1,14 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupFullInfoDto(GroupData Group, UserData Owner, GroupPermissions GroupPermissions, + GroupUserPreferredPermissions GroupUserPermissions, GroupPairUserInfo GroupUserInfo, + Dictionary GroupPairUserInfos) : GroupInfoDto(Group, Owner, GroupPermissions) +{ + public GroupUserPreferredPermissions GroupUserPermissions { get; set; } = GroupUserPermissions; + public GroupPairUserInfo GroupUserInfo { get; set; } = GroupUserInfo; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupInfoDto.cs b/LightlessSyncAPI/Dto/Group/GroupInfoDto.cs new file mode 100644 index 0000000..c7f95c4 --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupInfoDto.cs @@ -0,0 +1,18 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupInfoDto(GroupData Group, UserData Owner, GroupPermissions GroupPermissions) : GroupDto(Group) +{ + public GroupPermissions GroupPermissions { get; set; } = GroupPermissions; + public UserData Owner { get; set; } = Owner; + + public string OwnerUID => Owner.UID; + public string? OwnerAlias => Owner.Alias; + public string OwnerAliasOrUID => Owner.AliasOrUID; +} + +public record GroupJoinInfoDto(GroupData Group, UserData Owner, GroupPermissions GroupPermissions, bool Success) : GroupInfoDto(Group, Owner, GroupPermissions); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupJoinDto.cs b/LightlessSyncAPI/Dto/Group/GroupJoinDto.cs new file mode 100644 index 0000000..43c1c74 --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupJoinDto.cs @@ -0,0 +1,11 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupPasswordDto(GroupData Group, string Password) : GroupDto(Group); + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupJoinDto(GroupData Group, string Password, GroupUserPreferredPermissions GroupUserPreferredPermissions) : GroupPasswordDto(Group, Password); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupPairDto.cs b/LightlessSyncAPI/Dto/Group/GroupPairDto.cs new file mode 100644 index 0000000..e1f4ef0 --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupPairDto.cs @@ -0,0 +1,12 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupPairDto(GroupData Group, UserData User) : GroupDto(Group) +{ + public string UID => User.UID; + public string? UserAlias => User.Alias; + public string UserAliasOrUID => User.AliasOrUID; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupPairFullInfoDto.cs b/LightlessSyncAPI/Dto/Group/GroupPairFullInfoDto.cs new file mode 100644 index 0000000..dd21840 --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupPairFullInfoDto.cs @@ -0,0 +1,8 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupPairFullInfoDto(GroupData Group, UserData User, UserPermissions SelfToOtherPermissions, UserPermissions OtherToSelfPermissions) : GroupPairDto(Group, User); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupPairUserInfoDto.cs b/LightlessSyncAPI/Dto/Group/GroupPairUserInfoDto.cs new file mode 100644 index 0000000..6b0ae75 --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupPairUserInfoDto.cs @@ -0,0 +1,8 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupPairUserInfoDto(GroupData Group, UserData User, GroupPairUserInfo GroupUserInfo) : GroupPairDto(Group, User); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupPairUserPermissionDto.cs b/LightlessSyncAPI/Dto/Group/GroupPairUserPermissionDto.cs new file mode 100644 index 0000000..7e3208a --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupPairUserPermissionDto.cs @@ -0,0 +1,8 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupPairUserPermissionDto(GroupData Group, UserData User, GroupUserPreferredPermissions GroupPairPermissions) : GroupPairDto(Group, User); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/Group/GroupPermissionDto.cs b/LightlessSyncAPI/Dto/Group/GroupPermissionDto.cs new file mode 100644 index 0000000..e92bd1c --- /dev/null +++ b/LightlessSyncAPI/Dto/Group/GroupPermissionDto.cs @@ -0,0 +1,8 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.Group; + +[MessagePackObject(keyAsPropertyName: true)] +public record GroupPermissionDto(GroupData Group, GroupPermissions Permissions) : GroupDto(Group); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/SystemInfoDto.cs b/LightlessSyncAPI/Dto/SystemInfoDto.cs new file mode 100644 index 0000000..f430d8a --- /dev/null +++ b/LightlessSyncAPI/Dto/SystemInfoDto.cs @@ -0,0 +1,9 @@ +using MessagePack; + +namespace LightlessSync.API.Dto; + +[MessagePackObject(keyAsPropertyName: true)] +public record SystemInfoDto +{ + public int OnlineUsers { get; set; } +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/User/BulkPermissionsDto.cs b/LightlessSyncAPI/Dto/User/BulkPermissionsDto.cs new file mode 100644 index 0000000..d8b0d9d --- /dev/null +++ b/LightlessSyncAPI/Dto/User/BulkPermissionsDto.cs @@ -0,0 +1,7 @@ +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record BulkPermissionsDto(Dictionary AffectedUsers, Dictionary AffectedGroups); diff --git a/LightlessSyncAPI/Dto/User/CensusDataDto.cs b/LightlessSyncAPI/Dto/User/CensusDataDto.cs new file mode 100644 index 0000000..d18c616 --- /dev/null +++ b/LightlessSyncAPI/Dto/User/CensusDataDto.cs @@ -0,0 +1,6 @@ +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record CensusDataDto(ushort WorldId, short RaceId, short TribeId, short Gender); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/User/OnlineUserCharaDataDto.cs b/LightlessSyncAPI/Dto/User/OnlineUserCharaDataDto.cs new file mode 100644 index 0000000..2e79cac --- /dev/null +++ b/LightlessSyncAPI/Dto/User/OnlineUserCharaDataDto.cs @@ -0,0 +1,7 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record OnlineUserCharaDataDto(UserData User, CharacterData CharaData) : UserDto(User); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/User/OnlineUserIdentDto.cs b/LightlessSyncAPI/Dto/User/OnlineUserIdentDto.cs new file mode 100644 index 0000000..ae47e9c --- /dev/null +++ b/LightlessSyncAPI/Dto/User/OnlineUserIdentDto.cs @@ -0,0 +1,7 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record OnlineUserIdentDto(UserData User, string Ident) : UserDto(User); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/User/UserCharaDataMessageDto.cs b/LightlessSyncAPI/Dto/User/UserCharaDataMessageDto.cs new file mode 100644 index 0000000..4a719d0 --- /dev/null +++ b/LightlessSyncAPI/Dto/User/UserCharaDataMessageDto.cs @@ -0,0 +1,7 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record UserCharaDataMessageDto(List Recipients, CharacterData CharaData, CensusDataDto? CensusDataDto); diff --git a/LightlessSyncAPI/Dto/User/UserDto.cs b/LightlessSyncAPI/Dto/User/UserDto.cs new file mode 100644 index 0000000..a4bccbc --- /dev/null +++ b/LightlessSyncAPI/Dto/User/UserDto.cs @@ -0,0 +1,7 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record UserDto(UserData User); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/User/UserIndividualPairStatusDto.cs b/LightlessSyncAPI/Dto/User/UserIndividualPairStatusDto.cs new file mode 100644 index 0000000..7b28c86 --- /dev/null +++ b/LightlessSyncAPI/Dto/User/UserIndividualPairStatusDto.cs @@ -0,0 +1,8 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record UserIndividualPairStatusDto(UserData User, IndividualPairStatus IndividualPairStatus) : UserDto(User); \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/User/UserPairDto.cs b/LightlessSyncAPI/Dto/User/UserPairDto.cs new file mode 100644 index 0000000..6cfa950 --- /dev/null +++ b/LightlessSyncAPI/Dto/User/UserPairDto.cs @@ -0,0 +1,21 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record UserFullPairDto(UserData User, IndividualPairStatus IndividualPairStatus, List Groups, UserPermissions OwnPermissions, UserPermissions OtherPermissions) : UserDto(User) +{ + public UserPermissions OwnPermissions { get; set; } = OwnPermissions; + public UserPermissions OtherPermissions { get; set; } = OtherPermissions; + public IndividualPairStatus IndividualPairStatus { get; set; } = IndividualPairStatus; +} + +[MessagePackObject(keyAsPropertyName: true)] +public record UserPairDto(UserData User, IndividualPairStatus IndividualPairStatus, UserPermissions OwnPermissions, UserPermissions OtherPermissions) : UserDto(User) +{ + public UserPermissions OwnPermissions { get; set; } = OwnPermissions; + public UserPermissions OtherPermissions { get; set; } = OtherPermissions; + public IndividualPairStatus IndividualPairStatus { get; set; } = IndividualPairStatus; +} \ No newline at end of file diff --git a/LightlessSyncAPI/Dto/User/UserPermissionsDto.cs b/LightlessSyncAPI/Dto/User/UserPermissionsDto.cs new file mode 100644 index 0000000..4719aaa --- /dev/null +++ b/LightlessSyncAPI/Dto/User/UserPermissionsDto.cs @@ -0,0 +1,8 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record UserPermissionsDto(UserData User, UserPermissions Permissions) : UserDto(User); diff --git a/LightlessSyncAPI/Dto/User/UserProfileDto.cs b/LightlessSyncAPI/Dto/User/UserProfileDto.cs new file mode 100644 index 0000000..8a050c2 --- /dev/null +++ b/LightlessSyncAPI/Dto/User/UserProfileDto.cs @@ -0,0 +1,7 @@ +using LightlessSync.API.Data; +using MessagePack; + +namespace LightlessSync.API.Dto.User; + +[MessagePackObject(keyAsPropertyName: true)] +public record UserProfileDto(UserData User, bool Disabled, bool? IsNSFW, string? ProfilePictureBase64, string? Description) : UserDto(User); \ No newline at end of file diff --git a/LightlessSyncAPI/LightlessSync.API.csproj b/LightlessSyncAPI/LightlessSync.API.csproj new file mode 100644 index 0000000..6b7f2aa --- /dev/null +++ b/LightlessSyncAPI/LightlessSync.API.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + enable + enable + + + + + + + diff --git a/LightlessSyncAPI/LightlessSyncAPI.sln b/LightlessSyncAPI/LightlessSyncAPI.sln new file mode 100644 index 0000000..2e0cb41 --- /dev/null +++ b/LightlessSyncAPI/LightlessSyncAPI.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32602.215 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LightlessSync.API", "LightlessSync.API.csproj", "{CD05EE19-802F-4490-AAD8-CAD4BF1D630D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD05EE19-802F-4490-AAD8-CAD4BF1D630D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD05EE19-802F-4490-AAD8-CAD4BF1D630D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD05EE19-802F-4490-AAD8-CAD4BF1D630D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD05EE19-802F-4490-AAD8-CAD4BF1D630D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DFB70C71-AB27-468D-A08B-218CA79BF69D} + EndGlobalSection +EndGlobal diff --git a/LightlessSyncAPI/Routes/LightlessAuth.cs b/LightlessSyncAPI/Routes/LightlessAuth.cs new file mode 100644 index 0000000..3414bbd --- /dev/null +++ b/LightlessSyncAPI/Routes/LightlessAuth.cs @@ -0,0 +1,23 @@ +namespace LightlessSync.API.Routes; + +public class LightlessAuth +{ + public const string OAuth = "/oauth"; + public const string Auth = "/auth"; + public const string Auth_CreateIdent = "createWithIdent"; + public const string Auth_RenewToken = "renewToken"; + public const string OAuth_GetUIDsBasedOnSecretKeys = "getUIDsViaSecretKey"; + public const string OAuth_CreateOAuth = "createWithOAuth"; + public const string OAuth_RenewOAuthToken = "renewToken"; + public const string OAuth_GetDiscordOAuthEndpoint = "getDiscordOAuthEndpoint"; + public const string OAuth_GetUIDs = "getUIDs"; + public const string OAuth_GetDiscordOAuthToken = "getDiscordOAuthToken"; + public static Uri AuthFullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_CreateIdent); + public static Uri AuthWithOauthFullPath(Uri baseUri) => new Uri(baseUri, OAuth + "/" + OAuth_CreateOAuth); + public static Uri RenewTokenFullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_RenewToken); + public static Uri RenewOAuthTokenFullPath(Uri baseUri) => new Uri(baseUri, OAuth + "/" + OAuth_RenewOAuthToken); + public static Uri GetUIDsBasedOnSecretKeyFullPath(Uri baseUri) => new Uri(baseUri, OAuth + "/" + OAuth_GetUIDsBasedOnSecretKeys); + public static Uri GetDiscordOAuthEndpointFullPath(Uri baseUri) => new Uri(baseUri, OAuth + "/" + OAuth_GetDiscordOAuthEndpoint); + public static Uri GetDiscordOAuthTokenFullPath(Uri baseUri, string sessionId) => new Uri(baseUri, OAuth + "/" + OAuth_GetDiscordOAuthToken + "?sessionId=" + sessionId); + public static Uri GetUIDsFullPath(Uri baseUri) => new Uri(baseUri, OAuth + "/" + OAuth_GetUIDs); +} \ No newline at end of file diff --git a/LightlessSyncAPI/Routes/LightlessFiles.cs b/LightlessSyncAPI/Routes/LightlessFiles.cs new file mode 100644 index 0000000..c836bbc --- /dev/null +++ b/LightlessSyncAPI/Routes/LightlessFiles.cs @@ -0,0 +1,47 @@ +namespace LightlessSync.API.Routes; + +public class LightlessFiles +{ + public const string Cache = "/cache"; + public const string Cache_Get = "get"; + + public const string Request = "/request"; + public const string Request_Cancel = "cancel"; + public const string Request_Check = "check"; + public const string Request_Enqueue = "enqueue"; + public const string Request_RequestFile = "file"; + + public const string ServerFiles = "/files"; + public const string ServerFiles_DeleteAll = "deleteAll"; + public const string ServerFiles_FilesSend = "filesSend"; + public const string ServerFiles_GetSizes = "getFileSizes"; + public const string ServerFiles_Upload = "upload"; + public const string ServerFiles_UploadMunged = "uploadMunged"; + public const string ServerFiles_DownloadServers = "downloadServers"; + + public const string Distribution = "/dist"; + public const string Distribution_Get = "get"; + + public const string Main = "/main"; + public const string Main_SendReady = "sendReady"; + + public const string Speedtest = "/speedtest"; + public const string Speedtest_Run = "run"; + + public static Uri CacheGetFullPath(Uri baseUri, Guid requestId) => new(baseUri, Cache + "/" + Cache_Get + "?requestId=" + requestId.ToString()); + + public static Uri RequestCancelFullPath(Uri baseUri, Guid guid) => new Uri(baseUri, Request + "/" + Request_Cancel + "?requestId=" + guid.ToString()); + public static Uri RequestCheckQueueFullPath(Uri baseUri, Guid guid) => new Uri(baseUri, Request + "/" + Request_Check + "?requestId=" + guid.ToString()); + public static Uri RequestEnqueueFullPath(Uri baseUri) => new(baseUri, Request + "/" + Request_Enqueue); + public static Uri RequestRequestFileFullPath(Uri baseUri, string hash) => new(baseUri, Request + "/" + Request_RequestFile + "?file=" + hash); + + public static Uri ServerFilesDeleteAllFullPath(Uri baseUri) => new(baseUri, ServerFiles + "/" + ServerFiles_DeleteAll); + public static Uri ServerFilesFilesSendFullPath(Uri baseUri) => new(baseUri, ServerFiles + "/" + ServerFiles_FilesSend); + public static Uri ServerFilesGetSizesFullPath(Uri baseUri) => new(baseUri, ServerFiles + "/" + ServerFiles_GetSizes); + public static Uri ServerFilesUploadFullPath(Uri baseUri, string hash) => new(baseUri, ServerFiles + "/" + ServerFiles_Upload + "/" + hash); + public static Uri ServerFilesUploadMunged(Uri baseUri, string hash) => new(baseUri, ServerFiles + "/" + ServerFiles_UploadMunged + "/" + hash); + public static Uri ServerFilesGetDownloadServersFullPath(Uri baseUri) => new(baseUri, ServerFiles + "/" + ServerFiles_DownloadServers); + public static Uri DistributionGetFullPath(Uri baseUri, string hash) => new(baseUri, Distribution + "/" + Distribution_Get + "?file=" + hash); + public static Uri SpeedtestRunFullPath(Uri baseUri) => new(baseUri, Speedtest + "/" + Speedtest_Run); + public static Uri MainSendReadyFullPath(Uri baseUri, string uid, Guid request) => new(baseUri, Main + "/" + Main_SendReady + "/" + "?uid=" + uid + "&requestId=" + request.ToString()); +} \ No newline at end of file diff --git a/LightlessSyncAPI/SignalR/ILightlessHub.cs b/LightlessSyncAPI/SignalR/ILightlessHub.cs new file mode 100644 index 0000000..dcf4b4a --- /dev/null +++ b/LightlessSyncAPI/SignalR/ILightlessHub.cs @@ -0,0 +1,91 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using LightlessSync.API.Dto; +using LightlessSync.API.Dto.CharaData; +using LightlessSync.API.Dto.Group; +using LightlessSync.API.Dto.User; + +namespace LightlessSync.API.SignalR; + +public interface ILightlessHub +{ + const int ApiVersion = 33; + const string Path = "/mare"; + + Task CheckClientHealth(); + + Task Client_DownloadReady(Guid requestId); + Task Client_GroupChangePermissions(GroupPermissionDto groupPermission); + Task Client_GroupDelete(GroupDto groupDto); + Task Client_GroupPairChangeUserInfo(GroupPairUserInfoDto userInfo); + Task Client_GroupPairJoined(GroupPairFullInfoDto groupPairInfoDto); + Task Client_GroupPairLeft(GroupPairDto groupPairDto); + Task Client_GroupSendFullInfo(GroupFullInfoDto groupInfo); + Task Client_GroupSendInfo(GroupInfoDto groupInfo); + Task Client_ReceiveServerMessage(MessageSeverity messageSeverity, string message); + Task Client_UpdateSystemInfo(SystemInfoDto systemInfo); + Task Client_UserAddClientPair(UserPairDto dto); + Task Client_UserReceiveCharacterData(OnlineUserCharaDataDto dataDto); + Task Client_UserReceiveUploadStatus(UserDto dto); + Task Client_UserRemoveClientPair(UserDto dto); + Task Client_UserSendOffline(UserDto dto); + Task Client_UserSendOnline(OnlineUserIdentDto dto); + Task Client_UserUpdateOtherPairPermissions(UserPermissionsDto dto); + Task Client_UpdateUserIndividualPairStatusDto(UserIndividualPairStatusDto dto); + Task Client_UserUpdateProfile(UserDto dto); + Task Client_UserUpdateSelfPairPermissions(UserPermissionsDto dto); + Task Client_UserUpdateDefaultPermissions(DefaultPermissionsDto dto); + Task Client_GroupChangeUserPairPermissions(GroupPairUserPermissionDto dto); + Task Client_GposeLobbyJoin(UserData userData); + Task Client_GposeLobbyLeave(UserData userData); + Task Client_GposeLobbyPushCharacterData(CharaDataDownloadDto charaDownloadDto); + Task Client_GposeLobbyPushPoseData(UserData userData, PoseData poseData); + Task Client_GposeLobbyPushWorldData(UserData userData, WorldData worldData); + + Task GetConnectionDto(); + + Task GroupBanUser(GroupPairDto dto, string reason); + Task GroupChangeGroupPermissionState(GroupPermissionDto dto); + Task GroupChangeOwnership(GroupPairDto groupPair); + Task GroupChangePassword(GroupPasswordDto groupPassword); + Task GroupClear(GroupDto group); + Task GroupCreate(); + Task> GroupCreateTempInvite(GroupDto group, int amount); + Task GroupDelete(GroupDto group); + Task> GroupGetBannedUsers(GroupDto group); + Task GroupJoin(GroupPasswordDto passwordedGroup); + Task GroupJoinFinalize(GroupJoinDto passwordedGroup); + Task GroupLeave(GroupDto group); + Task GroupRemoveUser(GroupPairDto groupPair); + Task GroupSetUserInfo(GroupPairUserInfoDto groupPair); + Task> GroupsGetAll(); + Task GroupUnbanUser(GroupPairDto groupPair); + Task GroupPrune(GroupDto group, int days, bool execute); + + Task UserAddPair(UserDto user); + Task UserDelete(); + Task> UserGetOnlinePairs(CensusDataDto? censusDataDto); + Task> UserGetPairedClients(); + Task UserGetProfile(UserDto dto); + Task UserPushData(UserCharaDataMessageDto dto); + Task UserRemovePair(UserDto userDto); + Task UserSetProfile(UserProfileDto userDescription); + Task UserUpdateDefaultPermissions(DefaultPermissionsDto defaultPermissionsDto); + Task SetBulkPermissions(BulkPermissionsDto dto); + + Task CharaDataCreate(); + Task CharaDataUpdate(CharaDataUpdateDto updateDto); + Task CharaDataDelete(string id); + Task CharaDataGetMetainfo(string id); + Task CharaDataDownload(string id); + Task> CharaDataGetOwn(); + Task> CharaDataGetShared(); + Task CharaDataAttemptRestore(string id); + + Task GposeLobbyCreate(); + Task> GposeLobbyJoin(string lobbyId); + Task GposeLobbyLeave(); + Task GposeLobbyPushCharacterData(CharaDataDownloadDto charaDownloadDto); + Task GposeLobbyPushPoseData(PoseData poseData); + Task GposeLobbyPushWorldData(WorldData worldData); +} \ No newline at end of file diff --git a/LightlessSyncAPI/SignalR/ILightlessHubClient.cs b/LightlessSyncAPI/SignalR/ILightlessHubClient.cs new file mode 100644 index 0000000..38918de --- /dev/null +++ b/LightlessSyncAPI/SignalR/ILightlessHubClient.cs @@ -0,0 +1,61 @@ +using LightlessSync.API.Data; +using LightlessSync.API.Data.Enum; +using LightlessSync.API.Dto; +using LightlessSync.API.Dto.CharaData; +using LightlessSync.API.Dto.Group; +using LightlessSync.API.Dto.User; + +namespace LightlessSync.API.SignalR; + +public interface ILightlessHubClient : ILightlessHub +{ + void OnDownloadReady(Action act); + + void OnGroupChangePermissions(Action act); + + void OnGroupDelete(Action act); + + void OnGroupPairChangeUserInfo(Action act); + + void OnGroupPairJoined(Action act); + + void OnGroupPairLeft(Action act); + + void OnGroupSendFullInfo(Action act); + + void OnGroupSendInfo(Action act); + + void OnReceiveServerMessage(Action act); + + void OnUpdateSystemInfo(Action act); + + void OnUserAddClientPair(Action act); + + void OnUserReceiveCharacterData(Action act); + + void OnUserReceiveUploadStatus(Action act); + + void OnUserRemoveClientPair(Action act); + + void OnUserSendOffline(Action act); + + void OnUserSendOnline(Action act); + + void OnUserUpdateOtherPairPermissions(Action act); + + void OnUserUpdateProfile(Action act); + + void OnUserUpdateSelfPairPermissions(Action act); + + void OnUserDefaultPermissionUpdate(Action act); + + void OnUpdateUserIndividualPairStatusDto(Action act); + + void OnGroupChangeUserPairPermissions(Action act); + + void OnGposeLobbyJoin(Action act); + void OnGposeLobbyLeave(Action act); + void OnGposeLobbyPushCharacterData(Action act); + void OnGposeLobbyPushPoseData(Action act); + void OnGposeLobbyPushWorldData(Action act); +} \ No newline at end of file diff --git a/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.AssemblyInfo.cs b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.AssemblyInfo.cs new file mode 100644 index 0000000..04b6567 --- /dev/null +++ b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("LightlessSync.API")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+38cae9bdf8b5a9dc67a924af0b85750ee1cf5182")] +[assembly: System.Reflection.AssemblyProductAttribute("LightlessSync.API")] +[assembly: System.Reflection.AssemblyTitleAttribute("LightlessSync.API")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.AssemblyInfoInputs.cache b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.AssemblyInfoInputs.cache new file mode 100644 index 0000000..7d40732 --- /dev/null +++ b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +d7978da7783597a936d105ab0a1530bc46639af1215e27e49a0889eac4dcb719 diff --git a/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.GeneratedMSBuildEditorConfig.editorconfig b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..3cd6907 --- /dev/null +++ b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = LightlessSync.API +build_property.ProjectDir = D:\Coding\Lightless Sync\LightlessAPI\LightlessSyncAPI\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 8.0 +build_property.EnableCodeStyleSeverity = diff --git a/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.GlobalUsings.g.cs b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.GlobalUsings.g.cs new file mode 100644 index 0000000..ac22929 --- /dev/null +++ b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.assets.cache b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.assets.cache new file mode 100644 index 0000000000000000000000000000000000000000..6c10d5b4384ed8934c535cd5f702c4fe79a74681 GIT binary patch literal 1079 zcmcgrPfHs?6i?etV``(-2p)o%i}X@98ll+IONb;a{vk9rr@2hBFLB81OxT$fb14N6 zBKSE9J(qq5LC`PYM=7n?0fTmZ{Pb(W2atunM$Q@zJ5P1T)kfE zzxh@gjdB;aXDh$HT%PQHZskvZul~6H`4ofV^#pCd`ks9<5E>>ys~&Sz)C0=~ywm4B zFf0ILa6@O8E2S;BLMy{I-3@n>NzrBstg&4AJoL-%I@`Ou(4Y&IzZYCz%4ZY2R0f?L zL^}TdzoGh;r{tqp@~=$sm&OHB=I3!_1}!npAhL)Th*<=6Er+0rRv+jFhNS8k(+G7h z9uSn^Btx3-|oS EA5};`L;wH) literal 0 HcmV?d00001 diff --git a/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.csproj.AssemblyReference.cache b/LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.csproj.AssemblyReference.cache new file mode 100644 index 0000000000000000000000000000000000000000..3beb87c126bd6bdcc8155213bdabf50e0aa12ab3 GIT binary patch literal 599 zcmZQ$WMp7qV9a*5iU}=FEh>)5NzKnokI~C3O;0U}DM(DtPE1cNj>%0eE(S6{e7(fH zy!?{HlFa(&WjDzx6xq zJ54MF^7pewO+WtY!1o`A=S4hkF1*8Mq55>^^+)UfGZ%fZ@lF3<`{DNQh&yXv3%IoK zJ`CF5RB*5Us8i^g7w<2q9ZVK1uvnIsw*n^~Hgn5G#d Y8YZOztpNf?t}+un13hB{V?#>@00@iC;Q#;t literal 0 HcmV?d00001 diff --git a/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.AssemblyInfo.cs b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.AssemblyInfo.cs new file mode 100644 index 0000000..fc07367 --- /dev/null +++ b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("MareSynchronos.API")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9a8ffe093f63ef67711452c861ea2822e3b694b1")] +[assembly: System.Reflection.AssemblyProductAttribute("MareSynchronos.API")] +[assembly: System.Reflection.AssemblyTitleAttribute("MareSynchronos.API")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.AssemblyInfoInputs.cache b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.AssemblyInfoInputs.cache new file mode 100644 index 0000000..a1f7e98 --- /dev/null +++ b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +d5b656aad03c9253d5564e6f82a3bb740e40d2d0149678c0e120d569593acc35 diff --git a/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.GeneratedMSBuildEditorConfig.editorconfig b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..c062e2d --- /dev/null +++ b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = MareSynchronos.API +build_property.ProjectDir = D:\Coding\Lightless Sync\LightlessAPI\MareSynchronosAPI\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 8.0 +build_property.EnableCodeStyleSeverity = diff --git a/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.GlobalUsings.g.cs b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.GlobalUsings.g.cs new file mode 100644 index 0000000..ac22929 --- /dev/null +++ b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.assets.cache b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.assets.cache new file mode 100644 index 0000000000000000000000000000000000000000..0f9caa7b52794a712c69d17a59e145861f64750c GIT binary patch literal 1079 zcmcgrJx?1!5H;b9aR{GAN+g7GDQM4N3j`4oG9WCA4_Psx+Gg<$_KLk->vk`~e*_A8 zI(`76L!!+uph5{H1r04T&Yduk3>_;y&F;c>Rz!z_0*} z!3~`~u9UXi3atz)dUIZpNwLoqSYx^JdFU6sS+@P}LX|F*o-cU5l>J@2R0f?LL^}Td zzoGg*_sB=F0&vy!>%mZ;`1}!lTBC?2&h#>@ZZ5TlneSM=F7?LVuOf}SvkO%ID zkYL=I!s5~5!c1X_ZHs!SjXtpMo-h%YZp}u%(5%+vA^2=3DuboYP-`jIyH4OJkje0g zH<`e@*MUl)nIybP9f=Y~&@qY_LyRLP5IIEmn#99McQ-43FQMeR!}d_u?|x_~{KU4GjJOqvbE~o!u}3 zhZvXN&{*)=i_4ab0lV97K_-lp6#-<|bgR9k>s&e(DJIszSfM(vv=;3X;nXX?@dPvX BJ;MM1 literal 0 HcmV?d00001 diff --git a/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.csproj.AssemblyReference.cache b/LightlessSyncAPI/obj/Debug/net8.0/MareSynchronos.API.csproj.AssemblyReference.cache new file mode 100644 index 0000000000000000000000000000000000000000..3beb87c126bd6bdcc8155213bdabf50e0aa12ab3 GIT binary patch literal 599 zcmZQ$WMp7qV9a*5iU}=FEh>)5NzKnokI~C3O;0U}DM(DtPE1cNj>%0eE(S6{e7(fH zy!?{HlFa(&WjDzx6xq zJ54MF^7pewO+WtY!1o`A=S4hkF1*8Mq55>^^+)UfGZ%fZ@lF3<`{DNQh&yXv3%IoK zJ`CF5RB*5Us8i^g7w<2q9ZVK1uvnIsw*n^~Hgn5G#d Y8YZOztpNf?t}+un13hB{V?#>@00@iC;Q#;t literal 0 HcmV?d00001 diff --git a/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.dgspec.json b/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.dgspec.json new file mode 100644 index 0000000..0f82ffc --- /dev/null +++ b/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.dgspec.json @@ -0,0 +1,79 @@ +{ + "format": 1, + "restore": { + "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\LightlessSync.API.csproj": {} + }, + "projects": { + "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\LightlessSync.API.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\LightlessSync.API.csproj", + "projectName": "LightlessSync.API", + "projectPath": "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\LightlessSync.API.csproj", + "packagesPath": "C:\\Users\\leong\\.nuget\\packages\\", + "outputPath": "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\leong\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net8.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "dependencies": { + "MessagePack.Annotations": { + "target": "Package", + "version": "[3.1.3, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.304/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.props b/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.props new file mode 100644 index 0000000..998e392 --- /dev/null +++ b/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\leong\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.14.1 + + + + + + \ No newline at end of file diff --git a/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.targets b/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.targets new file mode 100644 index 0000000..35a7576 --- /dev/null +++ b/LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.dgspec.json b/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.dgspec.json new file mode 100644 index 0000000..f3f4336 --- /dev/null +++ b/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.dgspec.json @@ -0,0 +1,79 @@ +{ + "format": 1, + "restore": { + "D:\\Coding\\Lightless Sync\\LightlessAPI\\MareSynchronosAPI\\MareSynchronos.API.csproj": {} + }, + "projects": { + "D:\\Coding\\Lightless Sync\\LightlessAPI\\MareSynchronosAPI\\MareSynchronos.API.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\Coding\\Lightless Sync\\LightlessAPI\\MareSynchronosAPI\\MareSynchronos.API.csproj", + "projectName": "MareSynchronos.API", + "projectPath": "D:\\Coding\\Lightless Sync\\LightlessAPI\\MareSynchronosAPI\\MareSynchronos.API.csproj", + "packagesPath": "C:\\Users\\leong\\.nuget\\packages\\", + "outputPath": "D:\\Coding\\Lightless Sync\\LightlessAPI\\MareSynchronosAPI\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\leong\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net8.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "dependencies": { + "MessagePack.Annotations": { + "target": "Package", + "version": "[3.1.3, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.304/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.props b/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.props new file mode 100644 index 0000000..998e392 --- /dev/null +++ b/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\leong\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.14.1 + + + + + + \ No newline at end of file diff --git a/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.targets b/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.targets new file mode 100644 index 0000000..35a7576 --- /dev/null +++ b/LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/LightlessSyncAPI/obj/project.assets.json b/LightlessSyncAPI/obj/project.assets.json new file mode 100644 index 0000000..e2b3b1d --- /dev/null +++ b/LightlessSyncAPI/obj/project.assets.json @@ -0,0 +1,115 @@ +{ + "version": 3, + "targets": { + "net8.0": { + "MessagePack.Annotations/3.1.3": { + "type": "package", + "compile": { + "lib/netstandard2.0/MessagePack.Annotations.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/MessagePack.Annotations.dll": { + "related": ".xml" + } + } + } + } + }, + "libraries": { + "MessagePack.Annotations/3.1.3": { + "sha512": "XTy4njgTAf6UVBKFj7c7ad5R0WVKbvAgkbYZy4f00kplzX2T3VOQ34AUke/Vn/QgQZ7ETdd34/IDWS3KBInSGA==", + "type": "package", + "path": "messagepack.annotations/3.1.3", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/netstandard2.0/MessagePack.Annotations.dll", + "lib/netstandard2.0/MessagePack.Annotations.xml", + "messagepack.annotations.3.1.3.nupkg.sha512", + "messagepack.annotations.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "net8.0": [ + "MessagePack.Annotations >= 3.1.3" + ] + }, + "packageFolders": { + "C:\\Users\\leong\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\LightlessSync.API.csproj", + "projectName": "LightlessSync.API", + "projectPath": "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\LightlessSync.API.csproj", + "packagesPath": "C:\\Users\\leong\\.nuget\\packages\\", + "outputPath": "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\leong\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net8.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "dependencies": { + "MessagePack.Annotations": { + "target": "Package", + "version": "[3.1.3, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.304/PortableRuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/LightlessSyncAPI/obj/project.nuget.cache b/LightlessSyncAPI/obj/project.nuget.cache new file mode 100644 index 0000000..a14fbf4 --- /dev/null +++ b/LightlessSyncAPI/obj/project.nuget.cache @@ -0,0 +1,10 @@ +{ + "version": 2, + "dgSpecHash": "HQ1DiBt5G5o=", + "success": true, + "projectFilePath": "D:\\Coding\\Lightless Sync\\LightlessAPI\\LightlessSyncAPI\\LightlessSync.API.csproj", + "expectedPackageFiles": [ + "C:\\Users\\leong\\.nuget\\packages\\messagepack.annotations\\3.1.3\\messagepack.annotations.3.1.3.nupkg.sha512" + ], + "logs": [] +} \ No newline at end of file