forked from
anil.recoil.org/ocaml-jmap
this repo has no description
1(*---------------------------------------------------------------------------
2 Copyright (c) 2025 Anil Madhavapeddy. All rights reserved.
3 SPDX-License-Identifier: ISC
4 ---------------------------------------------------------------------------*)
5
6(** Thread type as defined in RFC 8621 Section 3
7
8 @canonical Jmap.Proto.Thread *)
9
10(** {1 Thread Properties}
11
12 Polymorphic variants for type-safe property selection in Thread/get requests.
13 Threads have only two properties per RFC 8621 Section 3. *)
14
15(** All Thread properties that can be requested. *)
16type property = [
17 | `Id
18 | `Email_ids
19]
20
21val property_to_string : [< property ] -> string
22(** Convert a property to its wire name (e.g., [`Email_ids] -> "emailIds"). *)
23
24val property_of_string : string -> property option
25(** Parse a property name, case-sensitive. *)
26
27(** {1 Thread Object} *)
28
29type t = {
30 id : Proto_id.t option;
31 (** Server-assigned thread id. *)
32 email_ids : Proto_id.t list option;
33 (** Ids of emails in this thread, in date order. *)
34}
35
36val id : t -> Proto_id.t option
37val email_ids : t -> Proto_id.t list option
38
39val jsont : t Jsont.t