Sube carpetas API, API.Tests, Application y Domain del Backend

This commit is contained in:
FrancoRu
2026-09-18 13:35:59 -03:00
parent bbb09554bb
commit 2eb4eeef03
572 changed files with 56405 additions and 0 deletions
@@ -0,0 +1,13 @@
using System;
namespace Application.DTOs.Auth.Response;
/// <summary>
/// Confirmation payload returned after inviting a user by email; the account has no password until activation.
/// </summary>
public sealed class InviteUserResponse(Guid userId, string email, string role)
{
public Guid UserId { get; init; } = userId;
public string Email { get; init; } = email;
public string Role { get; init; } = role;
}
@@ -0,0 +1,10 @@
namespace Application.DTOs.Auth.Response;
/// <summary>
/// Response for magic-link request flow.
/// </summary>
public sealed class MagicLinkResponse(string message, string? magicLink = null)
{
public string Message { get; init; } = message;
public string? MagicLink { get; init; } = magicLink;
}
@@ -0,0 +1,15 @@
using System;
namespace Application.DTOs.Auth.Response;
/// <summary>
/// Confirmation payload returned after successfully registering a new user.
/// </summary>
public sealed class RegisterUserResponse(Guid userId, string email, string username, string role, string? phone)
{
public Guid UserId { get; init; } = userId;
public string Email { get; init; } = email;
public string Username { get; init; } = username;
public string Role { get; init; } = role;
public string? PhoneNumber { get; init; } = phone;
}
@@ -0,0 +1,21 @@
using System;
namespace Application.DTOs.Auth.Response;
/// <summary>
/// Represents the response containing access token, expiration time, and refresh token.
/// </summary>
public sealed class TokenResponse(string accessToken, TimeSpan expiresIn, string? refreshToken)
{
/// <summary>
/// The access token used for authorization.
/// </summary>
public string AccessToken { get; init; } = accessToken;
public TimeSpan ExpiresIn { get; init; } = expiresIn;
/// <summary>
/// The refresh token used to obtain a new access token.
/// </summary>
public string? RefreshToken { get; init; } = refreshToken;
}