Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
//-----------------------------------------------------------------------
// <copyright file="MailboxApiModel.cs" company="aliasvault">
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------
namespace AliasVault.Shared.Models.WebApi.V2.Email;
/// <summary>
/// Represents the mailbox API model.
/// </summary>
public class MailboxApiModel
{
/// <summary>
/// Gets or sets the address of the mailbox.
/// </summary>
public string Address { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether the mailbox is subscribed.
/// </summary>
public bool Subscribed { get; set; }
/// <summary>
/// Gets or sets the public keys referenced by the decryption keys of the returned emails, sent once for the whole
/// response. A decryption key's <see cref="EmailDecryptionKeyApiModel.KeyIndex"/> is its position in this list.
/// </summary>
public List<string> PublicKeys { get; set; } = [];
/// <summary>
/// Gets or sets the manifest that owns the alias. A client shows the alias as owned elsewhere when this differs from the
/// manifest of the item it is looking at.
/// </summary>
public Guid? OwnerManifestId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the caller may move the alias to another manifest it can access.
/// </summary>
public bool CanTransfer { get; set; }
/// <summary>
/// Gets or sets the version of the alias claim, which a transfer to another manifest is signed over.
/// </summary>
public long? ClaimVersion { get; set; }
/// <summary>
/// Gets or sets the list of mailbox email API models.
/// </summary>
public List<MailboxEmailApiModel> Mails { get; set; } = [];
}