using MediatR;

namespace ChatService.API.Application.Queries.Keys;

/// <summary>
/// EN: Query to get a user's key bundle for initiating E2EE session.
/// VI: Query để lấy key bundle của user để khởi tạo E2EE session.
/// </summary>
public record GetUserKeyBundleQuery(
    Guid TargetUserId
) : IRequest<UserKeyBundleDto?>;

/// <summary>
/// EN: Key bundle DTO returned for key exchange.
/// VI: Key bundle DTO trả về cho key exchange.
/// </summary>
public record UserKeyBundleDto(
    Guid UserId,
    string IdentityPublicKey,
    string SignedPreKey,
    string SignedPreKeySignature,
    DateTime SignedPreKeyTimestamp,
    OneTimePreKeyResultDto? OneTimePreKey
);

public record OneTimePreKeyResultDto(
    int KeyId,
    string PublicKey
);
