(*--------------------------------------------------------------------------- Copyright (c) 2025 Anil Madhavapeddy. All rights reserved. SPDX-License-Identifier: ISC ---------------------------------------------------------------------------*) (** Thread type as defined in RFC 8621 Section 3 @canonical Jmap.Proto.Thread *) (** {1 Thread Properties} Polymorphic variants for type-safe property selection in Thread/get requests. Threads have only two properties per RFC 8621 Section 3. *) (** All Thread properties that can be requested. *) type property = [ | `Id | `Email_ids ] val property_to_string : [< property ] -> string (** Convert a property to its wire name (e.g., [`Email_ids] -> "emailIds"). *) val property_of_string : string -> property option (** Parse a property name, case-sensitive. *) (** {1 Thread Object} *) type t = { id : Proto_id.t option; (** Server-assigned thread id. *) email_ids : Proto_id.t list option; (** Ids of emails in this thread, in date order. *) } val id : t -> Proto_id.t option val email_ids : t -> Proto_id.t list option val jsont : t Jsont.t