this repo has no description
at if-only 3.1 kB view raw
1(** JMAP Identity. 2 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-6> RFC 8621, Section 6 *) 3 4open Jmap.Types 5open Jmap.Methods 6 7(** Identity object. 8 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-6> RFC 8621, Section 6 *) 9type t 10 11(** Get the identity ID (immutable, server-set) *) 12val id : t -> id 13 14(** Get the display name (defaults to "") *) 15val name : t -> string 16 17(** Get the email address (immutable) *) 18val email : t -> string 19 20(** Get the reply-to addresses (if any) *) 21val reply_to : t -> Jmap_email_types.Email_address.t list option 22 23(** Get the bcc addresses (if any) *) 24val bcc : t -> Jmap_email_types.Email_address.t list option 25 26(** Get the plain text signature (defaults to "") *) 27val text_signature : t -> string 28 29(** Get the HTML signature (defaults to "") *) 30val html_signature : t -> string 31 32(** Check if this identity may be deleted (server-set) *) 33val may_delete : t -> bool 34 35(** Create a new identity object *) 36val v : 37 id:id -> 38 ?name:string -> 39 email:string -> 40 ?reply_to:Jmap_email_types.Email_address.t list -> 41 ?bcc:Jmap_email_types.Email_address.t list -> 42 ?text_signature:string -> 43 ?html_signature:string -> 44 may_delete:bool -> 45 unit -> t 46 47(** Types and functions for identity creation and updates *) 48module Create : sig 49 type t 50 51 (** Get the name (if specified) *) 52 val name : t -> string option 53 54 (** Get the email address *) 55 val email : t -> string 56 57 (** Get the reply-to addresses (if any) *) 58 val reply_to : t -> Jmap_email_types.Email_address.t list option 59 60 (** Get the bcc addresses (if any) *) 61 val bcc : t -> Jmap_email_types.Email_address.t list option 62 63 (** Get the plain text signature (if specified) *) 64 val text_signature : t -> string option 65 66 (** Get the HTML signature (if specified) *) 67 val html_signature : t -> string option 68 69 (** Create a new identity creation object *) 70 val v : 71 ?name:string -> 72 email:string -> 73 ?reply_to:Jmap_email_types.Email_address.t list -> 74 ?bcc:Jmap_email_types.Email_address.t list -> 75 ?text_signature:string -> 76 ?html_signature:string -> 77 unit -> t 78 79 (** Server response with info about the created identity *) 80 module Response : sig 81 type t 82 83 (** Get the server-assigned ID for the created identity *) 84 val id : t -> id 85 86 (** Check if this identity may be deleted *) 87 val may_delete : t -> bool 88 89 (** Create a new response object *) 90 val v : 91 id:id -> 92 may_delete:bool -> 93 unit -> t 94 end 95end 96 97(** Identity object for update. 98 Patch object, specific structure not enforced here. 99 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-6.3> RFC 8621, Section 6.3 *) 100type update = patch_object 101 102(** Server-set/computed info for updated identity. 103 Contains only changed server-set props. 104 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-6.3> RFC 8621, Section 6.3 *) 105module Update_response : sig 106 type t 107 108 (** Convert to a full Identity object (contains only changed server-set props) *) 109 val to_identity : t -> t 110 111 (** Create from a full Identity object *) 112 val of_identity : t -> t 113end 114