namespace Backend.Contracts;

public sealed record LoginRequest(
    string TwitchUserId,
    string DisplayName,
    string Role);

public sealed record DemoLoginRequest(
    string? Login,
    string? Email,
    string? Password);

public sealed record TeamLoginRequest(
    string Login,
    string Password);

public sealed record ChangePasswordRequest(
    string CurrentPassword,
    string NewPassword);

public sealed record TwitchAuthorizeRequest(
    string Purpose,
    string? ReturnUrl,
    string? FrontendOrigin);

public sealed record TwitchAuthorizeResponse(
    string AuthorizationUrl);

public sealed record AuthSessionDto(
    string SessionToken,
    string TwitchUserId,
    string DisplayName,
    string Role,
    IEnumerable<string> PermissionKeys,
    int SessionIdleTimeoutHours,
    bool MustChangePassword = false,
    string? TeamLogin = null,
    string? BoundTwitchUserId = null,
    string? BoundTwitchDisplayName = null);

public sealed record TwitchBindingDisconnectResponse(
    bool Disconnected,
    bool LoggedOut,
    AuthSessionDto? Session);
