/**
 * Generated by orval 🍺
 * Do not edit manually.
 * messages API
 * This is the messages API schema.
 * OpenAPI spec version: 1.0.0 (v1.0)
 */
import type { MailboxRole } from "./mailbox_role";
import type { MailboxAbilities } from "./mailbox_abilities";

/**
 * Serialize mailboxes.
 */
export interface Mailbox {
  /** primary key for the record as UUID */
  readonly id: string;
  readonly email: string;
  /**
   * Return the display name of the mailbox (its contact name).
   * @nullable
   */
  readonly name: string | null;
  readonly domain_id: string;
  /** Whether this mailbox identifies a person (i.e. is not an alias or a group) */
  readonly is_identity: boolean;
  /** Return True if the mailbox is shared (non-identity or has more than one access).

Drives mailbox-level UI gating for collaboration features (assignment
sub-folders, mention folder) that have no purpose in a mono-user
identity mailbox. */
  readonly is_shared: boolean;
  /** @nullable */
  readonly role: MailboxRole;
  /** Return the number of threads with unread messages in the mailbox. */
  readonly count_unread_threads: number;
  /** Return the number of threads in the mailbox. */
  readonly count_threads: number;
  /** Return the number of threads with messages being delivered. */
  readonly count_delivering: number;
  /** Return the number of threads with unread mentions for the current user. */
  readonly count_unread_mentions: number;
  /** Return the number of threads in this mailbox currently assigned to the current user. */
  readonly count_assigned: number;
  /** Instance permissions and capabilities */
  readonly abilities: MailboxAbilities;
}
