this repo has no description
1(** JMAP Vacation Response.
2 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-8> RFC 8621, Section 8 *)
3
4open Jmap.Types
5open Jmap.Methods
6open Jmap.Error
7
8(** VacationResponse object.
9 Note: id is always "singleton".
10 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-8> RFC 8621, Section 8 *)
11module Vacation_response : sig
12 type t
13
14 (** Id of the vacation response (immutable, server-set, MUST be "singleton") *)
15 val id : t -> id
16 val is_enabled : t -> bool
17 val from_date : t -> utc_date option
18 val to_date : t -> utc_date option
19 val subject : t -> string option
20 val text_body : t -> string option
21 val html_body : t -> string option
22
23 val v :
24 id:id ->
25 is_enabled:bool ->
26 ?from_date:utc_date ->
27 ?to_date:utc_date ->
28 ?subject:string ->
29 ?text_body:string ->
30 ?html_body:string ->
31 unit ->
32 t
33end
34
35(** VacationResponse object for update.
36 Patch object, specific structure not enforced here.
37 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-8.2> RFC 8621, Section 8.2 *)
38type vacation_response_update = patch_object
39
40(** VacationResponse/get: Args type (specialized from ['record get_args]). *)
41module Vacation_response_get_args : sig
42 type t = Vacation_response.t Get_args.t
43
44 val v :
45 account_id:id ->
46 ?ids:id list ->
47 ?properties:string list ->
48 unit ->
49 t
50end
51
52(** VacationResponse/get: Response type (specialized from ['record get_response]). *)
53module Vacation_response_get_response : sig
54 type t = Vacation_response.t Get_response.t
55
56 val v :
57 account_id:id ->
58 state:string ->
59 list:Vacation_response.t list ->
60 not_found:id list ->
61 unit ->
62 t
63end
64
65(** VacationResponse/set: Args type.
66 Only allows update, id must be "singleton".
67 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-8.2> RFC 8621, Section 8.2 *)
68module Vacation_response_set_args : sig
69 type t
70
71 val account_id : t -> id
72 val if_in_state : t -> string option
73 val update : t -> vacation_response_update id_map option
74
75 val v :
76 account_id:id ->
77 ?if_in_state:string ->
78 ?update:vacation_response_update id_map ->
79 unit ->
80 t
81end
82
83(** VacationResponse/set: Response type.
84 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-8.2> RFC 8621, Section 8.2 *)
85module Vacation_response_set_response : sig
86 type t
87
88 val account_id : t -> id
89 val old_state : t -> string option
90 val new_state : t -> string
91 val updated : t -> Vacation_response.t option id_map option
92 val not_updated : t -> Set_error.t id_map option
93
94 val v :
95 account_id:id ->
96 ?old_state:string ->
97 new_state:string ->
98 ?updated:Vacation_response.t option id_map ->
99 ?not_updated:Set_error.t id_map ->
100 unit ->
101 t
102end