Compare commits
7 Commits
3b175900c1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
d105d20507
|
|||
|
f817187088
|
|||
|
7728ef2390
|
|||
|
f75f16fb13
|
|||
|
deb911cb0a
|
|||
|
0abb078c21
|
|||
|
5fc7969adf
|
9
MareSynchronosAPI/Data/Enum/TypingScope.cs
Normal file
9
MareSynchronosAPI/Data/Enum/TypingScope.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace MareSynchronos.API.Data.Enum;
|
||||
|
||||
public enum TypingScope
|
||||
{
|
||||
Unknown = 0,
|
||||
Proximity = 1, // Parler/Crier/Hurler
|
||||
Party = 2,
|
||||
CrossParty = 3
|
||||
}
|
||||
@@ -10,6 +10,8 @@ public record GroupInfoDto(GroupData Group, UserData Owner, GroupPermissions Gro
|
||||
{
|
||||
public GroupPermissions GroupPermissions { get; set; } = GroupPermissions;
|
||||
public UserData Owner { get; set; } = Owner;
|
||||
public bool AutoDetectVisible { get; set; }
|
||||
public bool PasswordTemporarilyDisabled { get; set; }
|
||||
|
||||
public string OwnerUID => Owner.UID;
|
||||
public string? OwnerAlias => Owner.Alias;
|
||||
|
||||
15
MareSynchronosAPI/Dto/Group/SyncshellDiscoveryEntryDto.cs
Normal file
15
MareSynchronosAPI/Dto/Group/SyncshellDiscoveryEntryDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.Group;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public sealed record SyncshellDiscoveryEntryDto
|
||||
{
|
||||
public string GID { get; init; } = string.Empty;
|
||||
public string? Alias { get; init; }
|
||||
public string OwnerUID { get; init; } = string.Empty;
|
||||
public string? OwnerAlias { get; init; }
|
||||
public int MemberCount { get; init; }
|
||||
public bool AutoAcceptPairs { get; init; }
|
||||
public string? Description { get; init; }
|
||||
}
|
||||
11
MareSynchronosAPI/Dto/Group/SyncshellDiscoveryStateDto.cs
Normal file
11
MareSynchronosAPI/Dto/Group/SyncshellDiscoveryStateDto.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.Group;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public sealed record SyncshellDiscoveryStateDto
|
||||
{
|
||||
public string GID { get; init; } = string.Empty;
|
||||
public bool AutoDetectVisible { get; init; }
|
||||
public bool PasswordTemporarilyDisabled { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.Group;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public sealed record SyncshellDiscoveryVisibilityRequestDto
|
||||
{
|
||||
public string GID { get; init; } = string.Empty;
|
||||
public bool AutoDetectVisible { get; init; }
|
||||
|
||||
public int? DisplayDurationHours { get; init; }
|
||||
public int[]? ActiveWeekdays { get; init; }
|
||||
public string? TimeStartLocal { get; init; }
|
||||
public string? TimeEndLocal { get; init; }
|
||||
public string? TimeZone { get; init; }
|
||||
}
|
||||
21
MareSynchronosAPI/Dto/McdfShare/McdfShareEntryDto.cs
Normal file
21
MareSynchronosAPI/Dto/McdfShare/McdfShareEntryDto.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.McdfShare;
|
||||
|
||||
[MessagePackObject]
|
||||
public class McdfShareEntryDto
|
||||
{
|
||||
[Key(0)] public Guid Id { get; set; }
|
||||
[Key(1)] public string Description { get; set; } = string.Empty;
|
||||
[Key(2)] public DateTime CreatedUtc { get; set; }
|
||||
[Key(3)] public DateTime? UpdatedUtc { get; set; }
|
||||
[Key(4)] public DateTime? ExpiresAtUtc { get; set; }
|
||||
[Key(5)] public bool IsOwner { get; set; }
|
||||
[Key(6)] public string OwnerUid { get; set; } = string.Empty;
|
||||
[Key(7)] public string OwnerAlias { get; set; } = string.Empty;
|
||||
[Key(8)] public int DownloadCount { get; set; }
|
||||
[Key(9)] public List<string> AllowedIndividuals { get; set; } = [];
|
||||
[Key(10)] public List<string> AllowedSyncshells { get; set; } = [];
|
||||
}
|
||||
17
MareSynchronosAPI/Dto/McdfShare/McdfSharePayloadDto.cs
Normal file
17
MareSynchronosAPI/Dto/McdfShare/McdfSharePayloadDto.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.McdfShare;
|
||||
|
||||
[MessagePackObject]
|
||||
public class McdfSharePayloadDto
|
||||
{
|
||||
[Key(0)] public Guid ShareId { get; set; }
|
||||
[Key(1)] public string Description { get; set; } = string.Empty;
|
||||
[Key(2)] public byte[] CipherData { get; set; } = Array.Empty<byte>();
|
||||
[Key(3)] public byte[] Nonce { get; set; } = Array.Empty<byte>();
|
||||
[Key(4)] public byte[] Salt { get; set; } = Array.Empty<byte>();
|
||||
[Key(5)] public byte[] Tag { get; set; } = Array.Empty<byte>();
|
||||
[Key(6)] public DateTime CreatedUtc { get; set; }
|
||||
[Key(7)] public DateTime? ExpiresAtUtc { get; set; }
|
||||
}
|
||||
15
MareSynchronosAPI/Dto/McdfShare/McdfShareUpdateRequestDto.cs
Normal file
15
MareSynchronosAPI/Dto/McdfShare/McdfShareUpdateRequestDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.McdfShare;
|
||||
|
||||
[MessagePackObject]
|
||||
public class McdfShareUpdateRequestDto
|
||||
{
|
||||
[Key(0)] public Guid ShareId { get; set; }
|
||||
[Key(1)] public string Description { get; set; } = string.Empty;
|
||||
[Key(2)] public DateTime? ExpiresAtUtc { get; set; }
|
||||
[Key(3)] public List<string> AllowedIndividuals { get; set; } = [];
|
||||
[Key(4)] public List<string> AllowedSyncshells { get; set; } = [];
|
||||
}
|
||||
19
MareSynchronosAPI/Dto/McdfShare/McdfShareUploadRequestDto.cs
Normal file
19
MareSynchronosAPI/Dto/McdfShare/McdfShareUploadRequestDto.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.McdfShare;
|
||||
|
||||
[MessagePackObject]
|
||||
public class McdfShareUploadRequestDto
|
||||
{
|
||||
[Key(0)] public Guid ShareId { get; set; }
|
||||
[Key(1)] public string Description { get; set; } = string.Empty;
|
||||
[Key(2)] public byte[] CipherData { get; set; } = Array.Empty<byte>();
|
||||
[Key(3)] public byte[] Nonce { get; set; } = Array.Empty<byte>();
|
||||
[Key(4)] public byte[] Salt { get; set; } = Array.Empty<byte>();
|
||||
[Key(5)] public byte[] Tag { get; set; } = Array.Empty<byte>();
|
||||
[Key(6)] public DateTime? ExpiresAtUtc { get; set; }
|
||||
[Key(7)] public List<string> AllowedIndividuals { get; set; } = [];
|
||||
[Key(8)] public List<string> AllowedSyncshells { get; set; } = [];
|
||||
}
|
||||
@@ -6,4 +6,5 @@ namespace MareSynchronos.API.Dto;
|
||||
public record SystemInfoDto
|
||||
{
|
||||
public int OnlineUsers { get; set; }
|
||||
public bool SupportsTypingState { get; set; }
|
||||
}
|
||||
@@ -1,5 +1,13 @@
|
||||
using MareSynchronos.API.Data;
|
||||
using MareSynchronos.API.Data.Enum;
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.User;
|
||||
|
||||
public record TypingStateDto(UserData User, bool IsTyping);
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record TypingStateDto(UserData User, bool IsTyping, TypingScope Scope)
|
||||
{
|
||||
public UserData User { get; set; } = User;
|
||||
public bool IsTyping { get; set; } = IsTyping;
|
||||
public TypingScope Scope { get; set; } = Scope;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<NoWarn>$(NoWarn);NU1900</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -131,6 +131,7 @@ public interface IMareHub
|
||||
Task UserSetProfile(UserProfileDto userDescription);
|
||||
|
||||
Task UserSetTypingState(bool isTyping);
|
||||
Task UserSetTypingState(bool isTyping, TypingScope scope);
|
||||
Task<CharaDataFullDto?> CharaDataCreate();
|
||||
Task<CharaDataFullDto?> CharaDataUpdate(CharaDataUpdateDto updateDto);
|
||||
Task<bool> CharaDataDelete(string id);
|
||||
|
||||
@@ -38,6 +38,8 @@ public interface IMareHubClient : IMareHub
|
||||
|
||||
void OnUserChatMsg(Action<UserChatMsgDto> chatMsgDto);
|
||||
|
||||
void OnUserTypingState(Action<TypingStateDto> act);
|
||||
|
||||
void OnUserReceiveCharacterData(Action<OnlineUserCharaDataDto> act);
|
||||
|
||||
void OnUserReceiveUploadStatus(Action<UserDto> act);
|
||||
|
||||
Reference in New Issue
Block a user