this repo has no description
1(* JMAP Binary Data Handling. *)
2
3open Jmap_types
4open Jmap_error
5
6(* Response from uploading binary data. *)
7module Upload_response = struct
8 type t = {
9 account_id: id;
10 blob_id: id;
11 type_: string;
12 size: uint;
13 }
14
15 let account_id t = t.account_id
16 let blob_id t = t.blob_id
17 let type_ t = t.type_
18 let size t = t.size
19
20 let v ~account_id ~blob_id ~type_ ~size () =
21 { account_id; blob_id; type_; size }
22end
23
24(* Arguments for Blob/copy. *)
25module Blob_copy_args = struct
26 type t = {
27 from_account_id: id;
28 account_id: id;
29 blob_ids: id list;
30 }
31
32 let from_account_id t = t.from_account_id
33 let account_id t = t.account_id
34 let blob_ids t = t.blob_ids
35
36 let v ~from_account_id ~account_id ~blob_ids () =
37 { from_account_id; account_id; blob_ids }
38end
39
40(* Response for Blob/copy. *)
41module Blob_copy_response = struct
42 type t = {
43 from_account_id: id;
44 account_id: id;
45 copied: id id_map option;
46 not_copied: Set_error.t id_map option;
47 }
48
49 let from_account_id t = t.from_account_id
50 let account_id t = t.account_id
51 let copied t = t.copied
52 let not_copied t = t.not_copied
53
54 let v ~from_account_id ~account_id ?copied ?not_copied () =
55 { from_account_id; account_id; copied; not_copied }
56end