Add files via upload
This commit is contained in:
37
LightlessSyncAPI/Data/CharacterData.cs
Normal file
37
LightlessSyncAPI/Data/CharacterData.cs
Normal file
@@ -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<ObjectKind, string> CustomizePlusData { get; set; } = new();
|
||||
[JsonIgnore]
|
||||
public Lazy<string> DataHash { get; }
|
||||
|
||||
public Dictionary<ObjectKind, List<FileReplacementData>> FileReplacements { get; set; } = new();
|
||||
public Dictionary<ObjectKind, string> 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;
|
||||
}
|
||||
22
LightlessSyncAPI/Data/Comparer/GroupDataComparer.cs
Normal file
22
LightlessSyncAPI/Data/Comparer/GroupDataComparer.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace LightlessSync.API.Data.Comparer;
|
||||
|
||||
public class GroupDataComparer : IEqualityComparer<GroupData>
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
24
LightlessSyncAPI/Data/Comparer/GroupDtoComparer.cs
Normal file
24
LightlessSyncAPI/Data/Comparer/GroupDtoComparer.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using LightlessSync.API.Dto.Group;
|
||||
|
||||
namespace LightlessSync.API.Data.Comparer;
|
||||
|
||||
public class GroupDtoComparer : IEqualityComparer<GroupDto>
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
24
LightlessSyncAPI/Data/Comparer/GroupPairDtoComparer.cs
Normal file
24
LightlessSyncAPI/Data/Comparer/GroupPairDtoComparer.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using LightlessSync.API.Dto.Group;
|
||||
|
||||
namespace LightlessSync.API.Data.Comparer;
|
||||
|
||||
public class GroupPairDtoComparer : IEqualityComparer<GroupPairDto>
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
22
LightlessSyncAPI/Data/Comparer/UserDataComparer.cs
Normal file
22
LightlessSyncAPI/Data/Comparer/UserDataComparer.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace LightlessSync.API.Data.Comparer;
|
||||
|
||||
public class UserDataComparer : IEqualityComparer<UserData>
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
24
LightlessSyncAPI/Data/Comparer/UserDtoComparer.cs
Normal file
24
LightlessSyncAPI/Data/Comparer/UserDtoComparer.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using LightlessSync.API.Dto.User;
|
||||
|
||||
namespace LightlessSync.API.Data.Comparer;
|
||||
|
||||
public class UserDtoComparer : IEqualityComparer<UserDto>
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
6
LightlessSyncAPI/Data/Constants.cs
Normal file
6
LightlessSyncAPI/Data/Constants.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace LightlessSync.API.Data;
|
||||
|
||||
public class Constants
|
||||
{
|
||||
public const string IndividualKeyword = "//MARE//DIRECT";
|
||||
}
|
||||
9
LightlessSyncAPI/Data/Enum/GroupPairUserInfo.cs
Normal file
9
LightlessSyncAPI/Data/Enum/GroupPairUserInfo.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace LightlessSync.API.Data.Enum;
|
||||
|
||||
[Flags]
|
||||
public enum GroupPairUserInfo
|
||||
{
|
||||
None = 0x0,
|
||||
IsModerator = 0x2,
|
||||
IsPinned = 0x4
|
||||
}
|
||||
11
LightlessSyncAPI/Data/Enum/GroupPermissions.cs
Normal file
11
LightlessSyncAPI/Data/Enum/GroupPermissions.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace LightlessSync.API.Data.Enum;
|
||||
|
||||
[Flags]
|
||||
public enum GroupPermissions
|
||||
{
|
||||
NoneSet = 0x0,
|
||||
PreferDisableAnimations = 0x1,
|
||||
PreferDisableSounds = 0x2,
|
||||
DisableInvites = 0x4,
|
||||
PreferDisableVFX = 0x8,
|
||||
}
|
||||
11
LightlessSyncAPI/Data/Enum/GroupUserPreferredPermissions.cs
Normal file
11
LightlessSyncAPI/Data/Enum/GroupUserPreferredPermissions.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace LightlessSync.API.Data.Enum;
|
||||
|
||||
[Flags]
|
||||
public enum GroupUserPreferredPermissions
|
||||
{
|
||||
NoneSet = 0x0,
|
||||
Paused = 0x1,
|
||||
DisableAnimations = 0x2,
|
||||
DisableSounds = 0x4,
|
||||
DisableVFX = 0x8,
|
||||
}
|
||||
8
LightlessSyncAPI/Data/Enum/IndividualPairStatus.cs
Normal file
8
LightlessSyncAPI/Data/Enum/IndividualPairStatus.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace LightlessSync.API.Data.Enum;
|
||||
|
||||
public enum IndividualPairStatus
|
||||
{
|
||||
None,
|
||||
OneSided,
|
||||
Bidirectional
|
||||
}
|
||||
8
LightlessSyncAPI/Data/Enum/MessageSeverity.cs
Normal file
8
LightlessSyncAPI/Data/Enum/MessageSeverity.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace LightlessSync.API.Data.Enum;
|
||||
|
||||
public enum MessageSeverity
|
||||
{
|
||||
Information,
|
||||
Warning,
|
||||
Error
|
||||
}
|
||||
9
LightlessSyncAPI/Data/Enum/ObjectKind.cs
Normal file
9
LightlessSyncAPI/Data/Enum/ObjectKind.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace LightlessSync.API.Data.Enum;
|
||||
|
||||
public enum ObjectKind
|
||||
{
|
||||
Player = 0,
|
||||
MinionOrMount = 1,
|
||||
Companion = 2,
|
||||
Pet = 3,
|
||||
}
|
||||
12
LightlessSyncAPI/Data/Enum/UserPermissions.cs
Normal file
12
LightlessSyncAPI/Data/Enum/UserPermissions.cs
Normal file
@@ -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,
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
28
LightlessSyncAPI/Data/Extensions/GroupUserInfoExtensions.cs
Normal file
28
LightlessSyncAPI/Data/Extensions/GroupUserInfoExtensions.cs
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
29
LightlessSyncAPI/Data/FileReplacementData.cs
Normal file
29
LightlessSyncAPI/Data/FileReplacementData.cs
Normal file
@@ -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<string> DataHash { get; }
|
||||
public string FileSwapPath { get; set; } = string.Empty;
|
||||
public string[] GamePaths { get; set; } = Array.Empty<string>();
|
||||
public string Hash { get; set; } = string.Empty;
|
||||
}
|
||||
10
LightlessSyncAPI/Data/GroupData.cs
Normal file
10
LightlessSyncAPI/Data/GroupData.cs
Normal file
@@ -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;
|
||||
}
|
||||
10
LightlessSyncAPI/Data/UserData.cs
Normal file
10
LightlessSyncAPI/Data/UserData.cs
Normal file
@@ -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;
|
||||
}
|
||||
9
LightlessSyncAPI/Dto/CharaData/AccessTypeDto.cs
Normal file
9
LightlessSyncAPI/Dto/CharaData/AccessTypeDto.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace LightlessSync.API.Dto.CharaData;
|
||||
|
||||
public enum AccessTypeDto
|
||||
{
|
||||
Individuals,
|
||||
ClosePairs,
|
||||
AllPairs,
|
||||
Public
|
||||
}
|
||||
14
LightlessSyncAPI/Dto/CharaData/CharaDataDownloadDto.cs
Normal file
14
LightlessSyncAPI/Dto/CharaData/CharaDataDownloadDto.cs
Normal file
@@ -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<GamePathEntry> FileGamePaths { get; init; } = [];
|
||||
public List<GamePathEntry> FileSwaps { get; init; } = [];
|
||||
}
|
||||
9
LightlessSyncAPI/Dto/CharaData/CharaDataDto.cs
Normal file
9
LightlessSyncAPI/Dto/CharaData/CharaDataDto.cs
Normal file
@@ -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; }
|
||||
}
|
||||
88
LightlessSyncAPI/Dto/CharaData/CharaDataFullDto.cs
Normal file
88
LightlessSyncAPI/Dto/CharaData/CharaDataFullDto.cs
Normal file
@@ -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<UserData> AllowedUsers { get; set; } = [];
|
||||
public List<GroupData> AllowedGroups { get; set; } = [];
|
||||
public List<GamePathEntry> FileGamePaths { get; set; } = [];
|
||||
public List<GamePathEntry> FileSwaps { get; set; } = [];
|
||||
public List<GamePathEntry> OriginalFiles { get; set; } = [];
|
||||
public AccessTypeDto AccessType { get; set; }
|
||||
public ShareTypeDto ShareType { get; set; }
|
||||
public List<PoseEntry> 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<string, BoneData> Bones { get; set; }
|
||||
[Key(2)] public Dictionary<string, BoneData> MainHand { get; set; }
|
||||
[Key(3)] public Dictionary<string, BoneData> 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; }
|
||||
}
|
||||
11
LightlessSyncAPI/Dto/CharaData/CharaDataMetaInfoDto.cs
Normal file
11
LightlessSyncAPI/Dto/CharaData/CharaDataMetaInfoDto.cs
Normal file
@@ -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<PoseEntry> PoseData { get; set; } = [];
|
||||
}
|
||||
20
LightlessSyncAPI/Dto/CharaData/CharaDataUpdateDto.cs
Normal file
20
LightlessSyncAPI/Dto/CharaData/CharaDataUpdateDto.cs
Normal file
@@ -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<string>? AllowedUsers { get; set; }
|
||||
public List<string>? AllowedGroups { get; set; }
|
||||
public List<GamePathEntry>? FileGamePaths { get; set; }
|
||||
public List<GamePathEntry>? FileSwaps { get; set; }
|
||||
public AccessTypeDto? AccessType { get; set; }
|
||||
public ShareTypeDto? ShareType { get; set; }
|
||||
public List<PoseEntry>? Poses { get; set; }
|
||||
}
|
||||
7
LightlessSyncAPI/Dto/CharaData/ShareTypeDto.cs
Normal file
7
LightlessSyncAPI/Dto/CharaData/ShareTypeDto.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace LightlessSync.API.Dto.CharaData;
|
||||
|
||||
public enum ShareTypeDto
|
||||
{
|
||||
Private,
|
||||
Shared
|
||||
}
|
||||
27
LightlessSyncAPI/Dto/ConnectionDto.cs
Normal file
27
LightlessSyncAPI/Dto/ConnectionDto.cs
Normal file
@@ -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; }
|
||||
}
|
||||
15
LightlessSyncAPI/Dto/DefaultPermissionsDto.cs
Normal file
15
LightlessSyncAPI/Dto/DefaultPermissionsDto.cs
Normal file
@@ -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;
|
||||
}
|
||||
15
LightlessSyncAPI/Dto/Files/DownloadFileDto.cs
Normal file
15
LightlessSyncAPI/Dto/Files/DownloadFileDto.cs
Normal file
@@ -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;
|
||||
}
|
||||
13
LightlessSyncAPI/Dto/Files/FilesSendDto.cs
Normal file
13
LightlessSyncAPI/Dto/Files/FilesSendDto.cs
Normal file
@@ -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<string> FileHashes { get; set; } = new();
|
||||
public List<string> UIDs { get; set; } = new();
|
||||
}
|
||||
8
LightlessSyncAPI/Dto/Files/ITransferFileDto.cs
Normal file
8
LightlessSyncAPI/Dto/Files/ITransferFileDto.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace LightlessSync.API.Dto.Files;
|
||||
|
||||
public interface ITransferFileDto
|
||||
{
|
||||
string ForbiddenBy { get; set; }
|
||||
string Hash { get; set; }
|
||||
bool IsForbidden { get; set; }
|
||||
}
|
||||
11
LightlessSyncAPI/Dto/Files/UploadFileDto.cs
Normal file
11
LightlessSyncAPI/Dto/Files/UploadFileDto.cs
Normal file
@@ -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;
|
||||
}
|
||||
19
LightlessSyncAPI/Dto/Group/BannedGroupUserDto.cs
Normal file
19
LightlessSyncAPI/Dto/Group/BannedGroupUserDto.cs
Normal file
@@ -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; }
|
||||
}
|
||||
13
LightlessSyncAPI/Dto/Group/GroupDto.cs
Normal file
13
LightlessSyncAPI/Dto/Group/GroupDto.cs
Normal file
@@ -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;
|
||||
}
|
||||
14
LightlessSyncAPI/Dto/Group/GroupFullInfoDto.cs
Normal file
14
LightlessSyncAPI/Dto/Group/GroupFullInfoDto.cs
Normal file
@@ -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<string, GroupPairUserInfo> GroupPairUserInfos) : GroupInfoDto(Group, Owner, GroupPermissions)
|
||||
{
|
||||
public GroupUserPreferredPermissions GroupUserPermissions { get; set; } = GroupUserPermissions;
|
||||
public GroupPairUserInfo GroupUserInfo { get; set; } = GroupUserInfo;
|
||||
}
|
||||
18
LightlessSyncAPI/Dto/Group/GroupInfoDto.cs
Normal file
18
LightlessSyncAPI/Dto/Group/GroupInfoDto.cs
Normal file
@@ -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);
|
||||
11
LightlessSyncAPI/Dto/Group/GroupJoinDto.cs
Normal file
11
LightlessSyncAPI/Dto/Group/GroupJoinDto.cs
Normal file
@@ -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);
|
||||
12
LightlessSyncAPI/Dto/Group/GroupPairDto.cs
Normal file
12
LightlessSyncAPI/Dto/Group/GroupPairDto.cs
Normal file
@@ -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;
|
||||
}
|
||||
8
LightlessSyncAPI/Dto/Group/GroupPairFullInfoDto.cs
Normal file
8
LightlessSyncAPI/Dto/Group/GroupPairFullInfoDto.cs
Normal file
@@ -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);
|
||||
8
LightlessSyncAPI/Dto/Group/GroupPairUserInfoDto.cs
Normal file
8
LightlessSyncAPI/Dto/Group/GroupPairUserInfoDto.cs
Normal file
@@ -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);
|
||||
8
LightlessSyncAPI/Dto/Group/GroupPairUserPermissionDto.cs
Normal file
8
LightlessSyncAPI/Dto/Group/GroupPairUserPermissionDto.cs
Normal file
@@ -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);
|
||||
8
LightlessSyncAPI/Dto/Group/GroupPermissionDto.cs
Normal file
8
LightlessSyncAPI/Dto/Group/GroupPermissionDto.cs
Normal file
@@ -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);
|
||||
9
LightlessSyncAPI/Dto/SystemInfoDto.cs
Normal file
9
LightlessSyncAPI/Dto/SystemInfoDto.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace LightlessSync.API.Dto;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record SystemInfoDto
|
||||
{
|
||||
public int OnlineUsers { get; set; }
|
||||
}
|
||||
7
LightlessSyncAPI/Dto/User/BulkPermissionsDto.cs
Normal file
7
LightlessSyncAPI/Dto/User/BulkPermissionsDto.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using LightlessSync.API.Data.Enum;
|
||||
using MessagePack;
|
||||
|
||||
namespace LightlessSync.API.Dto.User;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record BulkPermissionsDto(Dictionary<string, UserPermissions> AffectedUsers, Dictionary<string, GroupUserPreferredPermissions> AffectedGroups);
|
||||
6
LightlessSyncAPI/Dto/User/CensusDataDto.cs
Normal file
6
LightlessSyncAPI/Dto/User/CensusDataDto.cs
Normal file
@@ -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);
|
||||
7
LightlessSyncAPI/Dto/User/OnlineUserCharaDataDto.cs
Normal file
7
LightlessSyncAPI/Dto/User/OnlineUserCharaDataDto.cs
Normal file
@@ -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);
|
||||
7
LightlessSyncAPI/Dto/User/OnlineUserIdentDto.cs
Normal file
7
LightlessSyncAPI/Dto/User/OnlineUserIdentDto.cs
Normal file
@@ -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);
|
||||
7
LightlessSyncAPI/Dto/User/UserCharaDataMessageDto.cs
Normal file
7
LightlessSyncAPI/Dto/User/UserCharaDataMessageDto.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using LightlessSync.API.Data;
|
||||
using MessagePack;
|
||||
|
||||
namespace LightlessSync.API.Dto.User;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record UserCharaDataMessageDto(List<UserData> Recipients, CharacterData CharaData, CensusDataDto? CensusDataDto);
|
||||
7
LightlessSyncAPI/Dto/User/UserDto.cs
Normal file
7
LightlessSyncAPI/Dto/User/UserDto.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using LightlessSync.API.Data;
|
||||
using MessagePack;
|
||||
|
||||
namespace LightlessSync.API.Dto.User;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record UserDto(UserData User);
|
||||
8
LightlessSyncAPI/Dto/User/UserIndividualPairStatusDto.cs
Normal file
8
LightlessSyncAPI/Dto/User/UserIndividualPairStatusDto.cs
Normal file
@@ -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);
|
||||
21
LightlessSyncAPI/Dto/User/UserPairDto.cs
Normal file
21
LightlessSyncAPI/Dto/User/UserPairDto.cs
Normal file
@@ -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<string> 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;
|
||||
}
|
||||
8
LightlessSyncAPI/Dto/User/UserPermissionsDto.cs
Normal file
8
LightlessSyncAPI/Dto/User/UserPermissionsDto.cs
Normal file
@@ -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);
|
||||
7
LightlessSyncAPI/Dto/User/UserProfileDto.cs
Normal file
7
LightlessSyncAPI/Dto/User/UserProfileDto.cs
Normal file
@@ -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);
|
||||
13
LightlessSyncAPI/LightlessSync.API.csproj
Normal file
13
LightlessSyncAPI/LightlessSync.API.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
25
LightlessSyncAPI/LightlessSyncAPI.sln
Normal file
25
LightlessSyncAPI/LightlessSyncAPI.sln
Normal file
@@ -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
|
||||
23
LightlessSyncAPI/Routes/LightlessAuth.cs
Normal file
23
LightlessSyncAPI/Routes/LightlessAuth.cs
Normal file
@@ -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);
|
||||
}
|
||||
47
LightlessSyncAPI/Routes/LightlessFiles.cs
Normal file
47
LightlessSyncAPI/Routes/LightlessFiles.cs
Normal file
@@ -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());
|
||||
}
|
||||
91
LightlessSyncAPI/SignalR/ILightlessHub.cs
Normal file
91
LightlessSyncAPI/SignalR/ILightlessHub.cs
Normal file
@@ -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<bool> 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<ConnectionDto> GetConnectionDto();
|
||||
|
||||
Task GroupBanUser(GroupPairDto dto, string reason);
|
||||
Task GroupChangeGroupPermissionState(GroupPermissionDto dto);
|
||||
Task GroupChangeOwnership(GroupPairDto groupPair);
|
||||
Task<bool> GroupChangePassword(GroupPasswordDto groupPassword);
|
||||
Task GroupClear(GroupDto group);
|
||||
Task<GroupJoinDto> GroupCreate();
|
||||
Task<List<string>> GroupCreateTempInvite(GroupDto group, int amount);
|
||||
Task GroupDelete(GroupDto group);
|
||||
Task<List<BannedGroupUserDto>> GroupGetBannedUsers(GroupDto group);
|
||||
Task<GroupJoinInfoDto> GroupJoin(GroupPasswordDto passwordedGroup);
|
||||
Task<bool> GroupJoinFinalize(GroupJoinDto passwordedGroup);
|
||||
Task GroupLeave(GroupDto group);
|
||||
Task GroupRemoveUser(GroupPairDto groupPair);
|
||||
Task GroupSetUserInfo(GroupPairUserInfoDto groupPair);
|
||||
Task<List<GroupFullInfoDto>> GroupsGetAll();
|
||||
Task GroupUnbanUser(GroupPairDto groupPair);
|
||||
Task<int> GroupPrune(GroupDto group, int days, bool execute);
|
||||
|
||||
Task UserAddPair(UserDto user);
|
||||
Task UserDelete();
|
||||
Task<List<OnlineUserIdentDto>> UserGetOnlinePairs(CensusDataDto? censusDataDto);
|
||||
Task<List<UserFullPairDto>> UserGetPairedClients();
|
||||
Task<UserProfileDto> UserGetProfile(UserDto dto);
|
||||
Task UserPushData(UserCharaDataMessageDto dto);
|
||||
Task UserRemovePair(UserDto userDto);
|
||||
Task UserSetProfile(UserProfileDto userDescription);
|
||||
Task UserUpdateDefaultPermissions(DefaultPermissionsDto defaultPermissionsDto);
|
||||
Task SetBulkPermissions(BulkPermissionsDto dto);
|
||||
|
||||
Task<CharaDataFullDto?> CharaDataCreate();
|
||||
Task<CharaDataFullDto?> CharaDataUpdate(CharaDataUpdateDto updateDto);
|
||||
Task<bool> CharaDataDelete(string id);
|
||||
Task<CharaDataMetaInfoDto?> CharaDataGetMetainfo(string id);
|
||||
Task<CharaDataDownloadDto?> CharaDataDownload(string id);
|
||||
Task<List<CharaDataFullDto>> CharaDataGetOwn();
|
||||
Task<List<CharaDataMetaInfoDto>> CharaDataGetShared();
|
||||
Task<CharaDataFullDto?> CharaDataAttemptRestore(string id);
|
||||
|
||||
Task<string> GposeLobbyCreate();
|
||||
Task<List<UserData>> GposeLobbyJoin(string lobbyId);
|
||||
Task<bool> GposeLobbyLeave();
|
||||
Task GposeLobbyPushCharacterData(CharaDataDownloadDto charaDownloadDto);
|
||||
Task GposeLobbyPushPoseData(PoseData poseData);
|
||||
Task GposeLobbyPushWorldData(WorldData worldData);
|
||||
}
|
||||
61
LightlessSyncAPI/SignalR/ILightlessHubClient.cs
Normal file
61
LightlessSyncAPI/SignalR/ILightlessHubClient.cs
Normal file
@@ -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<Guid> act);
|
||||
|
||||
void OnGroupChangePermissions(Action<GroupPermissionDto> act);
|
||||
|
||||
void OnGroupDelete(Action<GroupDto> act);
|
||||
|
||||
void OnGroupPairChangeUserInfo(Action<GroupPairUserInfoDto> act);
|
||||
|
||||
void OnGroupPairJoined(Action<GroupPairFullInfoDto> act);
|
||||
|
||||
void OnGroupPairLeft(Action<GroupPairDto> act);
|
||||
|
||||
void OnGroupSendFullInfo(Action<GroupFullInfoDto> act);
|
||||
|
||||
void OnGroupSendInfo(Action<GroupInfoDto> act);
|
||||
|
||||
void OnReceiveServerMessage(Action<MessageSeverity, string> act);
|
||||
|
||||
void OnUpdateSystemInfo(Action<SystemInfoDto> act);
|
||||
|
||||
void OnUserAddClientPair(Action<UserPairDto> act);
|
||||
|
||||
void OnUserReceiveCharacterData(Action<OnlineUserCharaDataDto> act);
|
||||
|
||||
void OnUserReceiveUploadStatus(Action<UserDto> act);
|
||||
|
||||
void OnUserRemoveClientPair(Action<UserDto> act);
|
||||
|
||||
void OnUserSendOffline(Action<UserDto> act);
|
||||
|
||||
void OnUserSendOnline(Action<OnlineUserIdentDto> act);
|
||||
|
||||
void OnUserUpdateOtherPairPermissions(Action<UserPermissionsDto> act);
|
||||
|
||||
void OnUserUpdateProfile(Action<UserDto> act);
|
||||
|
||||
void OnUserUpdateSelfPairPermissions(Action<UserPermissionsDto> act);
|
||||
|
||||
void OnUserDefaultPermissionUpdate(Action<DefaultPermissionsDto> act);
|
||||
|
||||
void OnUpdateUserIndividualPairStatusDto(Action<UserIndividualPairStatusDto> act);
|
||||
|
||||
void OnGroupChangeUserPairPermissions(Action<GroupPairUserPermissionDto> act);
|
||||
|
||||
void OnGposeLobbyJoin(Action<UserData> act);
|
||||
void OnGposeLobbyLeave(Action<UserData> act);
|
||||
void OnGposeLobbyPushCharacterData(Action<CharaDataDownloadDto> act);
|
||||
void OnGposeLobbyPushPoseData(Action<UserData, PoseData> act);
|
||||
void OnGposeLobbyPushWorldData(Action<UserData, WorldData> act);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
d7978da7783597a936d105ab0a1530bc46639af1215e27e49a0889eac4dcb719
|
||||
@@ -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 =
|
||||
@@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
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;
|
||||
BIN
LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.assets.cache
Normal file
BIN
LightlessSyncAPI/obj/Debug/net8.0/LightlessSync.API.assets.cache
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
d5b656aad03c9253d5564e6f82a3bb740e40d2d0149678c0e120d569593acc35
|
||||
@@ -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 =
|
||||
@@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
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;
|
||||
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.props
Normal file
16
LightlessSyncAPI/obj/LightlessSync.API.csproj.nuget.g.props
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\leong\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.1</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\leong\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.props
Normal file
16
LightlessSyncAPI/obj/MareSynchronos.API.csproj.nuget.g.props
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\leong\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.1</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\leong\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
115
LightlessSyncAPI/obj/project.assets.json
Normal file
115
LightlessSyncAPI/obj/project.assets.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
LightlessSyncAPI/obj/project.nuget.cache
Normal file
10
LightlessSyncAPI/obj/project.nuget.cache
Normal file
@@ -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": []
|
||||
}
|
||||
Reference in New Issue
Block a user