using MediatR;

namespace ChatService.API.Application.Commands.Keys;

/// <summary>
/// EN: Command to register a user's E2EE key bundle.
/// VI: Command để đăng ký E2EE key bundle của user.
/// </summary>
public record RegisterUserKeysCommand(
    string IdentityUserId,
    string DisplayName,
    string? AvatarUrl,
    string IdentityPublicKey,
    string SignedPreKey,
    string SignedPreKeySignature,
    IEnumerable<OneTimePreKeyDto>? OneTimePreKeys = null
) : IRequest<RegisterUserKeysResult>;

public record OneTimePreKeyDto(int KeyId, string PublicKey);

public record RegisterUserKeysResult(
    Guid ChatUserId,
    int OneTimePreKeysUploaded
);
