My agentic slop goes here. Not intended for anyone else!
1(** JMAP SearchSnippet Type *)
2
3open Jmap_core
4
5(** SearchSnippet object type (RFC 8621 Section 5.1) *)
6type t = {
7 email_id : Id.t;
8 subject : string option;
9 preview : string option;
10}
11
12(** Accessors *)
13val email_id : t -> Id.t
14val subject : t -> string option
15val preview : t -> string option
16
17(** Constructor *)
18val v : email_id:Id.t -> ?subject:string -> ?preview:string -> unit -> t
19
20(** SearchSnippet/get method *)
21module Get : sig
22 type request = {
23 account_id : Id.t;
24 filter : Jmap_email.Filter.t Filter.t;
25 email_ids : Id.t list;
26 }
27
28 type response = {
29 account_id : Id.t;
30 list : t list;
31 not_found : Id.t list;
32 }
33
34 (** Accessors for request *)
35 val account_id : request -> Id.t
36 val filter : request -> Jmap_email.Filter.t Filter.t
37 val email_ids : request -> Id.t list
38
39 (** Constructor for request *)
40 val request_v :
41 account_id:Id.t ->
42 filter:Jmap_email.Filter.t Filter.t ->
43 email_ids:Id.t list ->
44 request
45
46 (** Accessors for response *)
47 val response_account_id : response -> Id.t
48 val list : response -> t list
49 val not_found : response -> Id.t list
50
51 (** Constructor for response *)
52 val response_v :
53 account_id:Id.t ->
54 list:t list ->
55 not_found:Id.t list ->
56 response
57
58 val request_of_json : Ezjsonm.value -> request
59 val response_of_json : Ezjsonm.value -> response
60end
61
62(** Parser submodule *)
63module Parser : sig
64 val of_json : Ezjsonm.value -> t
65 val to_json : t -> Ezjsonm.value
66end