My agentic slop goes here. Not intended for anyone else!
1(** JMAP Binary Data Operations *)
2
3(** Upload response from POST to upload endpoint *)
4module Upload : sig
5 type t = {
6 account_id : Jmap_id.t;
7 blob_id : Jmap_id.t;
8 content_type : string;
9 size : Jmap_primitives.UnsignedInt.t;
10 }
11
12 (** Accessors *)
13 val account_id : t -> Jmap_id.t
14 val blob_id : t -> Jmap_id.t
15 val content_type : t -> string
16 val size : t -> Jmap_primitives.UnsignedInt.t
17
18 (** Constructor *)
19 val v :
20 account_id:Jmap_id.t ->
21 blob_id:Jmap_id.t ->
22 content_type:string ->
23 size:Jmap_primitives.UnsignedInt.t ->
24 t
25
26 (** Parse upload response from JSON *)
27 val of_json : Ezjsonm.value -> t
28end
29
30(** Blob/copy method for copying blobs between accounts *)
31module BlobCopy : sig
32 type request = {
33 from_account_id : Jmap_id.t;
34 account_id : Jmap_id.t;
35 blob_ids : Jmap_id.t list;
36 }
37
38 type response = {
39 from_account_id : Jmap_id.t;
40 account_id : Jmap_id.t;
41 copied : (Jmap_id.t * Jmap_id.t) list option;
42 not_copied : (Jmap_id.t * Jmap_error.set_error_detail) list option;
43 }
44
45 (** Accessors for request *)
46 val from_account_id : request -> Jmap_id.t
47 val account_id : request -> Jmap_id.t
48 val blob_ids : request -> Jmap_id.t list
49
50 (** Constructor for request *)
51 val request_v :
52 from_account_id:Jmap_id.t ->
53 account_id:Jmap_id.t ->
54 blob_ids:Jmap_id.t list ->
55 request
56
57 (** Accessors for response *)
58 val response_from_account_id : response -> Jmap_id.t
59 val response_account_id : response -> Jmap_id.t
60 val copied : response -> (Jmap_id.t * Jmap_id.t) list option
61 val not_copied : response -> (Jmap_id.t * Jmap_error.set_error_detail) list option
62
63 (** Constructor for response *)
64 val response_v :
65 from_account_id:Jmap_id.t ->
66 account_id:Jmap_id.t ->
67 ?copied:(Jmap_id.t * Jmap_id.t) list ->
68 ?not_copied:(Jmap_id.t * Jmap_error.set_error_detail) list ->
69 unit ->
70 response
71
72 val request_of_json : Ezjsonm.value -> request
73
74 val response_of_json : Ezjsonm.value -> response
75end