My agentic slop goes here. Not intended for anyone else!
1(** Unified JMAP Library Interface
2
3 This module provides a convenient, ergonomic interface to the complete JMAP library.
4 It combines jmap-core, jmap-mail, and jmap-client into a single unified API.
5
6 For most use cases, you should use this module. For specialized functionality,
7 you can fall back to the individual submodules (Jmap_core, Jmap_mail, Jmap_client).
8
9 {2 Quick Start}
10
11 {[
12 (* Create a client *)
13 let client = Jmap.Client.create
14 ~sw
15 ~env
16 ~conn:(Jmap.Connection.bearer_auth ~token:"your-token" ())
17 ~session_url:"https://api.example.com/.well-known/jmap"
18 ()
19
20 (* Fetch session *)
21 let session = Jmap.Client.get_session client
22
23 (* Build and send a request *)
24 let query_req = Jmap.Email.Query.request_v
25 ~account_id:(Jmap.Id.of_string account_id)
26 ~limit:(Jmap.Primitives.UnsignedInt.of_int 10)
27 ()
28 in
29
30 let query_args = Jmap.Email.Query.request_to_json query_req in
31 let invocation = Jmap.Invocation.make_echo "Email/query" query_args "q1" in
32 let req = Jmap.Request.make
33 ~using:[Jmap.Capability.core; Jmap.Capability.mail]
34 [invocation]
35 in
36
37 let resp = Jmap.Client.call client req
38 ]}
39*)
40
41(** {1 High-level Client API} *)
42
43(** JMAP HTTP Client - Start here for most use cases *)
44module Client = Jmap_client
45
46(** Connection configuration *)
47module Connection = Jmap_connection
48
49(** {1 Mail Extension (RFC 8621)} *)
50
51(** Email operations *)
52module Email = Jmap_mail.Email
53
54(** Mailbox operations *)
55module Mailbox = Jmap_mail.Mailbox
56
57(** Thread operations *)
58module Thread = Jmap_mail.Thread
59
60(** Identity management *)
61module Identity = Jmap_mail.Identity
62
63(** Email submission *)
64module Email_submission = Jmap_mail.Email_submission
65
66(** Vacation responses *)
67module Vacation_response = Jmap_mail.Vacation_response
68
69(** Search snippets *)
70module Search_snippet = Jmap_mail.Search_snippet
71
72(** Mail parsing utilities *)
73module Mail_parser = Jmap_mail.Mail_parser
74
75(** {1 Core Protocol (RFC 8620)} *)
76
77(** JMAP Session *)
78module Session = Jmap_core.Session
79
80(** Request building *)
81module Request = Jmap_core.Request
82
83(** Response handling *)
84module Response = Jmap_core.Response
85
86(** Method invocations *)
87module Invocation = Jmap_core.Invocation
88
89(** JMAP IDs *)
90module Id = Jmap_core.Id
91
92(** Capabilities *)
93module Capability = Jmap_core.Capability
94
95(** Filters *)
96module Filter = Jmap_core.Filter
97
98(** Comparators (sorting) *)
99module Comparator = Jmap_core.Comparator
100
101(** Primitive types *)
102module Primitives = Jmap_core.Primitives
103
104(** Standard methods *)
105module Standard_methods = Jmap_core.Standard_methods
106
107(** Error handling *)
108module Error = Jmap_core.Error
109
110(** Binary data (upload/download) *)
111module Binary = Jmap_core.Binary
112
113(** Push notifications *)
114module Push = Jmap_core.Push
115
116(** JSON parsing utilities *)
117module Parser = Jmap_core.Parser
118
119(** {1 Full Module Access} *)
120
121(** Complete jmap-core library *)
122module Core = Jmap_core
123
124(** Complete jmap-mail library *)
125module Mail = Jmap_mail