Compare commits

..

1 Commits

Author SHA1 Message Date
deb911cb0a Syncshell Public & MCDF Share 2025-11-01 19:55:54 +01:00
8 changed files with 102 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ public record GroupInfoDto(GroupData Group, UserData Owner, GroupPermissions Gro
{ {
public GroupPermissions GroupPermissions { get; set; } = GroupPermissions; public GroupPermissions GroupPermissions { get; set; } = GroupPermissions;
public UserData Owner { get; set; } = Owner; public UserData Owner { get; set; } = Owner;
public bool AutoDetectVisible { get; set; }
public bool PasswordTemporarilyDisabled { get; set; }
public string OwnerUID => Owner.UID; public string OwnerUID => Owner.UID;
public string? OwnerAlias => Owner.Alias; public string? OwnerAlias => Owner.Alias;

View 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; }
}

View 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; }
}

View File

@@ -0,0 +1,10 @@
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; }
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace MareSynchronos.API.Dto.McdfShare;
public class McdfShareEntryDto
{
public Guid Id { get; set; }
public string Description { get; set; } = string.Empty;
public DateTime CreatedUtc { get; set; }
public DateTime? UpdatedUtc { get; set; }
public DateTime? ExpiresAtUtc { get; set; }
public bool IsOwner { get; set; }
public string OwnerUid { get; set; } = string.Empty;
public string OwnerAlias { get; set; } = string.Empty;
public int DownloadCount { get; set; }
public List<string> AllowedIndividuals { get; set; } = [];
public List<string> AllowedSyncshells { get; set; } = [];
}

View File

@@ -0,0 +1,15 @@
using System;
namespace MareSynchronos.API.Dto.McdfShare;
public class McdfSharePayloadDto
{
public Guid ShareId { get; set; }
public string Description { get; set; } = string.Empty;
public byte[] CipherData { get; set; } = Array.Empty<byte>();
public byte[] Nonce { get; set; } = Array.Empty<byte>();
public byte[] Salt { get; set; } = Array.Empty<byte>();
public byte[] Tag { get; set; } = Array.Empty<byte>();
public DateTime CreatedUtc { get; set; }
public DateTime? ExpiresAtUtc { get; set; }
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace MareSynchronos.API.Dto.McdfShare;
public class McdfShareUpdateRequestDto
{
public Guid ShareId { get; set; }
public string Description { get; set; } = string.Empty;
public DateTime? ExpiresAtUtc { get; set; }
public List<string> AllowedIndividuals { get; set; } = [];
public List<string> AllowedSyncshells { get; set; } = [];
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace MareSynchronos.API.Dto.McdfShare;
public class McdfShareUploadRequestDto
{
public Guid ShareId { get; set; }
public string Description { get; set; } = string.Empty;
public byte[] CipherData { get; set; } = Array.Empty<byte>();
public byte[] Nonce { get; set; } = Array.Empty<byte>();
public byte[] Salt { get; set; } = Array.Empty<byte>();
public byte[] Tag { get; set; } = Array.Empty<byte>();
public DateTime? ExpiresAtUtc { get; set; }
public List<string> AllowedIndividuals { get; set; } = [];
public List<string> AllowedSyncshells { get; set; } = [];
}