My agentic slop goes here. Not intended for anyone else!
1(** JMAP HTTP Client *)
2
3(** Client configuration *)
4type t
5
6(** Create a new JMAP client
7 @param sw Switch for managing resources
8 @param env Eio environment providing clock and network
9 @param conn Connection configuration including auth
10 @param session_url URL to fetch JMAP session
11*)
12val create :
13 sw:Eio.Switch.t ->
14 env:< clock: [> float Eio.Time.clock_ty ] Eio.Resource.t; net: [> [> `Generic ] Eio.Net.ty ] Eio.Resource.t; fs: Eio.Fs.dir_ty Eio.Path.t; .. > ->
15 conn:Jmap_connection.t ->
16 session_url:string ->
17 unit ->
18 t
19
20(** Fetch session from server *)
21val fetch_session : t -> Jmap_core.Session.t
22
23(** Get cached session or fetch if needed *)
24val get_session : t -> Jmap_core.Session.t
25
26(** Make a JMAP API call *)
27val call : t -> Jmap_core.Request.t -> Jmap_core.Response.t
28
29(** Upload a blob *)
30val upload :
31 t ->
32 account_id:string ->
33 content_type:string ->
34 string ->
35 Jmap_core.Binary.Upload.t
36
37(** Download a blob *)
38val download :
39 t ->
40 account_id:string ->
41 blob_id:string ->
42 name:string ->
43 string