/**
 * 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 { ThreadAccessRoleChoices } from "./thread_access_role_choices";
import type { ThreadAccessDetail } from "./thread_access_detail";
import type { ThreadLabel } from "./thread_label";

/**
 * Serialize threads.
 */
export interface Thread {
  /** primary key for the record as UUID */
  readonly id: string;
  /** @nullable */
  readonly subject: string | null;
  readonly snippet: string;
  readonly messages: string;
  readonly has_unread: boolean;
  readonly has_trashed: boolean;
  /** Whether all messages in the thread are trashed */
  readonly is_trashed: boolean;
  readonly has_archived: boolean;
  readonly has_draft: boolean;
  readonly has_starred: boolean;
  readonly has_attachments: boolean;
  readonly has_sender: boolean;
  readonly has_messages: boolean;
  /** True if thread has messages with permanent delivery failure. */
  readonly has_delivery_failed: boolean;
  /** True if thread has messages awaiting successful delivery (sending, retrying, or failed). */
  readonly has_delivery_pending: boolean;
  readonly is_spam: boolean;
  readonly has_active: boolean;
  /** @nullable */
  readonly messaged_at: string | null;
  readonly sender_names: readonly string[];
  /** date and time at which a record was last updated */
  readonly updated_at: string;
  readonly user_role: ThreadAccessRoleChoices;
  readonly accesses: readonly ThreadAccessDetail[];
  readonly labels: readonly ThreadLabel[];
  readonly summary: string;
}
