namespace Tiku.Application.Auth;

public sealed record CompleteOwnerActivationRequest(
    Guid ActivationId,
    string Token,
    string NewPassword);

public interface IOwnerActivationService
{
    Task CompleteAsync(
        CompleteOwnerActivationRequest request,
        CancellationToken cancellationToken = default);

    Task<AuthenticationResult> CompleteAndAuthenticateAsync(
        CompleteOwnerActivationRequest request,
        Guid expectedTenantId,
        string expectedHost,
        string? ipAddress,
        string? userAgent,
        CancellationToken cancellationToken = default);
}

public sealed class OwnerActivationException(string message, string code) : Exception(message)
{
    public string Code { get; } = code;
}