this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

more

+22 -317
+5 -21
jmap/jmap-email/jmap_email.mli
··· 21 21 *) 22 22 type t 23 23 24 + (** JSON serialization interface *) 25 + include Jmap_sigs.JSONABLE with type t := t 26 + 24 27 (** Get the server-assigned email identifier. 25 28 @param t The email object 26 29 @return Email ID if present in the object *) ··· 148 151 149 152 (** Get the value of a specific header field. 150 153 151 - Retrieves raw header values for headers requested via the Header:{name} 154 + Retrieves raw header values for headers requested via the Header:[name] 152 155 property in Email/get requests. 153 156 154 157 @param t The email object ··· 236 239 237 240 (** Extract the email ID, raising an exception if not present. 238 241 @param t The email object 239 - @return The email ID 240 - @raise Failure if the email has no ID *) 242 + @return The email ID *) 241 243 val take_id : t -> id 242 244 243 245 (** Check if the email is unread. ··· 285 287 @return String summary of email for list display *) 286 288 val display_summary : t -> string 287 289 288 - (** Convert email to JSON representation. 289 - 290 - Produces JSON object representation including all properties that are 291 - present in the email object. This is the format used in JMAP responses. 292 - 293 - @param t The email to convert 294 - @return JSON object with all email fields that are present *) 295 - val to_json : t -> Yojson.Safe.t 296 - 297 290 (** Convert email to JSON with specific properties. 298 291 299 292 Produces JSON object containing only the specified properties, which ··· 304 297 @param properties List of property names to include 305 298 @return JSON object with only the specified properties *) 306 299 val to_json_with_properties : t -> string list -> Yojson.Safe.t 307 - 308 - (** Parse email from JSON representation. 309 - 310 - Parses email from JSON object as received in JMAP responses. 311 - Handles partial objects where only some properties are present. 312 - 313 - @param json JSON object representing an email 314 - @return Result containing parsed email object or parse error *) 315 - val of_json : Yojson.Safe.t -> (t, string) result 316 300 317 301 318 302 (** Email patch operations for Email/set method.
-88
jmap/jmap-email/jmap_email_batch.mli
··· 1 - (** Batch operations for JMAP Email. 2 - 3 - This module provides efficient batch operations for common 4 - email management tasks, minimizing round-trips to the server. 5 - 6 - @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-4.6> RFC 8621 Section 4.6 *) 7 - 8 - (** {1 Batch Operations} *) 9 - 10 - (** Batch operation builder *) 11 - type t 12 - 13 - (** Create a new batch operation *) 14 - val create : unit -> t 15 - 16 - (** {2 Email Operations} *) 17 - 18 - (** Mark emails as read *) 19 - val mark_read : Jmap.Id.t list -> t -> t 20 - 21 - (** Mark emails as unread *) 22 - val mark_unread : Jmap.Id.t list -> t -> t 23 - 24 - (** Add flag/star to emails *) 25 - val add_flag : Jmap.Id.t list -> t -> t 26 - 27 - (** Remove flag/star from emails *) 28 - val remove_flag : Jmap.Id.t list -> t -> t 29 - 30 - (** Add custom keyword to emails *) 31 - val add_keyword : string -> Jmap.Id.t list -> t -> t 32 - 33 - (** Remove custom keyword from emails *) 34 - val remove_keyword : string -> Jmap.Id.t list -> t -> t 35 - 36 - (** Move emails to a mailbox *) 37 - val move_to_mailbox : mailbox_id:string -> Jmap.Id.t list -> t -> t 38 - 39 - (** Copy emails to a mailbox *) 40 - val copy_to_mailbox : mailbox_id:string -> Jmap.Id.t list -> t -> t 41 - 42 - (** Remove emails from a mailbox *) 43 - val remove_from_mailbox : mailbox_id:string -> Jmap.Id.t list -> t -> t 44 - 45 - (** Move emails to trash *) 46 - val move_to_trash : Jmap.Id.t list -> t -> t 47 - 48 - (** Permanently delete emails *) 49 - val delete : Jmap.Id.t list -> t -> t 50 - 51 - (** Archive emails (remove from inbox, keep in other mailboxes) *) 52 - val archive : Jmap.Id.t list -> t -> t 53 - 54 - (** {2 Mailbox Operations} *) 55 - 56 - (** Create a new mailbox *) 57 - val create_mailbox : 58 - name:string -> 59 - ?parent_id:string -> 60 - ?role:string -> 61 - t -> t 62 - 63 - (** Rename a mailbox *) 64 - val rename_mailbox : Jmap.Id.t -> string -> t -> t 65 - 66 - (** Delete a mailbox *) 67 - val delete_mailbox : Jmap.Id.t -> t -> t 68 - 69 - (** {2 Execution} *) 70 - 71 - (** Batch operation result *) 72 - type result = { 73 - created : (string * Jmap.Id.t) list; (** Temporary ID -> Server ID mapping *) 74 - updated : Jmap.Id.t list; (** Successfully updated IDs *) 75 - destroyed : Jmap.Id.t list; (** Successfully destroyed IDs *) 76 - not_created : (string * Jmap.Protocol.Error.Set_error.t) list; 77 - not_updated : (Jmap.Id.t * Jmap.Protocol.Error.Set_error.t) list; 78 - not_destroyed : (Jmap.Id.t * Jmap.Protocol.Error.Set_error.t) list; 79 - } 80 - 81 - (** {1 Progress Tracking} *) 82 - 83 - (** Progress callback for long operations *) 84 - type progress = { 85 - current : int; 86 - total : int; 87 - message : string; 88 - }
-150
jmap/jmap-email/jmap_email_methods.mli
··· 1 - (** JMAP Email method names and builders. 2 - 3 - This module provides type-safe method names and high-level 4 - builders for JMAP Email methods. 5 - 6 - @see <https://www.rfc-editor.org/rfc/rfc8621.html> RFC 8621 *) 7 - 8 - (** {1 Method Names} *) 9 - 10 - (** Email method names as a polymorphic variant type *) 11 - type t = [ 12 - | `Email_get 13 - | `Email_query 14 - | `Email_queryChanges 15 - | `Email_set 16 - | `Email_copy 17 - | `Email_import 18 - | `Email_parse 19 - | `EmailSubmission_get 20 - | `EmailSubmission_query 21 - | `EmailSubmission_queryChanges 22 - | `EmailSubmission_set 23 - | `Thread_get 24 - | `Thread_query 25 - | `Mailbox_get 26 - | `Mailbox_query 27 - | `Mailbox_queryChanges 28 - | `Mailbox_set 29 - | `Identity_get 30 - | `Identity_query 31 - | `Identity_set 32 - | `VacationResponse_get 33 - | `VacationResponse_set 34 - ] 35 - 36 - (** Convert method name to string for wire protocol *) 37 - val to_string : t -> string 38 - 39 - (** Parse method name from string *) 40 - val of_string : string -> t option 41 - 42 - (** Pretty-print a method name *) 43 - val pp : Format.formatter -> t -> unit 44 - 45 - (** {1 Method Call ID Management} *) 46 - 47 - (** Method call ID generator *) 48 - module CallId : sig 49 - type t 50 - 51 - (** Create a call ID generator *) 52 - val create : unit -> t 53 - 54 - (** Generate next call ID with optional prefix *) 55 - val next : ?prefix:string -> t -> string 56 - 57 - (** Reset the generator *) 58 - val reset : t -> unit 59 - end 60 - 61 - (** {1 Request Builders} *) 62 - 63 - (** High-level request builder that manages method chaining *) 64 - module RequestBuilder : sig 65 - type t 66 - 67 - (** Create a new request builder *) 68 - val create : unit -> t 69 - 70 - (** Add Email/query method *) 71 - val email_query : 72 - ?account_id:string -> 73 - ?filter:Jmap_email_query.Filter.t -> 74 - ?sort:Jmap_email_query.Sort.t list -> 75 - ?limit:int -> 76 - ?position:int -> 77 - t -> t 78 - 79 - (** Add Email/get method with automatic result reference *) 80 - val email_get : 81 - ?account_id:string -> 82 - ?ids:Jmap.Id.t list -> 83 - ?properties:Jmap_email_query.property list -> 84 - ?reference_from:string -> (* Call ID to reference *) 85 - t -> t 86 - 87 - (** Add Email/set method *) 88 - val email_set : 89 - ?account_id:string -> 90 - ?create:(string * Jmap_email.t) list -> 91 - ?update:(Jmap.Id.t * Jmap.Patch.t) list -> 92 - ?destroy:Jmap.Id.t list -> 93 - t -> t 94 - 95 - (** Add Thread/get method *) 96 - val thread_get : 97 - ?account_id:string -> 98 - ?ids:Jmap.Id.t list -> 99 - t -> t 100 - 101 - (** Add Mailbox/query method *) 102 - val mailbox_query : 103 - ?account_id:string -> 104 - ?filter:Yojson.Safe.t -> 105 - ?sort:Jmap.Methods.Comparator.t list -> 106 - t -> t 107 - 108 - (** Add Mailbox/get method *) 109 - val mailbox_get : 110 - ?account_id:string -> 111 - ?ids:Jmap.Id.t list -> 112 - t -> t 113 - 114 - (** Get specific method response by type *) 115 - val get_response : 116 - method_:t -> 117 - ?call_id:string -> 118 - Jmap.Protocol.Response.t -> 119 - (Yojson.Safe.t, Jmap.Protocol.Error.error) result 120 - end 121 - 122 - (** {1 Response Parsers} *) 123 - 124 - (** Type-safe response extraction *) 125 - module Response : sig 126 - (** Extract and parse Email/query response *) 127 - val parse_email_query : 128 - ?call_id:string -> 129 - Jmap.Protocol.Response.t -> 130 - (Jmap_email_query.query_result, Jmap.Protocol.Error.error) result 131 - 132 - (** Extract and parse Email/get response *) 133 - val parse_email_get : 134 - ?call_id:string -> 135 - Jmap.Protocol.Response.t -> 136 - (Jmap_email.t list, Jmap.Protocol.Error.error) result 137 - 138 - (** Extract and parse Thread/get response *) 139 - val parse_thread_get : 140 - ?call_id:string -> 141 - Jmap.Protocol.Response.t -> 142 - (Jmap_thread.t list, Jmap.Protocol.Error.error) result 143 - 144 - (** Extract and parse Mailbox/get response *) 145 - val parse_mailbox_get : 146 - ?call_id:string -> 147 - Jmap.Protocol.Response.t -> 148 - (Jmap_mailbox.t list, Jmap.Protocol.Error.error) result 149 - end 150 -
+1 -1
jmap/jmap-email/jmap_email_query.mli
··· 9 9 10 10 (** Type-safe email property selectors. 11 11 12 - Uses the canonical polymorphic variant property system from {!Jmap_email_property}. 12 + Uses the canonical polymorphic variant property system from [Jmap_email_property]. 13 13 This provides full compatibility with all JMAP Email properties including 14 14 header and custom extension properties. 15 15 *)
+1 -2
jmap/jmap-email/jmap_mailbox.mli
··· 67 67 type mailbox_t = t 68 68 69 69 (** JSON serialization interface *) 70 - val to_json : t -> Yojson.Safe.t 71 - val of_json : Yojson.Safe.t -> (t, string) Result.t 70 + include Jmap_sigs.JSONABLE with type t := t 72 71 73 72 (** {1 Property Accessors} *) 74 73
+1 -2
jmap/jmap-email/jmap_vacation.mli
··· 32 32 type vacation_response = t 33 33 34 34 (** JSON serialization interface *) 35 - val to_json : t -> Yojson.Safe.t 36 - val of_json : Yojson.Safe.t -> (t, string) Result.t 35 + include Jmap_sigs.JSONABLE with type t := t 37 36 38 37 (** Get the vacation response ID. 39 38 @return Always returns "singleton" for VacationResponse objects *)
+6 -9
jmap/jmap-unix/jmap_unix.mli
··· 567 567 568 568 @param json JSON object representing an email as returned by Email/get 569 569 @return Parsed Email object 570 - @raise Failure if JSON structure is invalid 570 + 571 571 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-4.1> RFC 8621, Section 4.1 *) 572 572 (* val from_json : Yojson.Safe.t -> t 573 573 ··· 575 575 576 576 @param json JSON object with 'email' and optional 'name' fields 577 577 @return Parsed EmailAddress object 578 - @raise Failure if JSON structure is invalid 578 + 579 579 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-4.1.2.3> RFC 8621, Section 4.1.2.3 *) 580 580 val from_json_address : Yojson.Safe.t -> Email_address.t 581 581 ··· 583 583 584 584 @param json JSON object mapping keyword strings to boolean values 585 585 @return Parsed Keywords set 586 - @raise Failure if JSON structure is invalid 586 + 587 587 @see <https://www.rfc-editor.org/rfc/rfc8621.html#section-4.1.1> RFC 8621, Section 4.1.1 *) 588 588 val from_json_keywords : Yojson.Safe.t -> Jmap_email.Email_keywords.t *) 589 589 end ··· 594 594 module Auth : sig 595 595 (** Read an API key from a file. 596 596 @param filename Path to the file containing the API key 597 - @return The API key as a string, with whitespace trimmed 598 - @raise Failure if the file cannot be read or is empty *) 597 + @return The API key as a string, with whitespace trimmed *) 599 598 val read_api_key : string -> string 600 599 601 600 (** Read an API key from the default ".api-key" file in the current directory. 602 - @return The API key as a string, with whitespace trimmed 603 - @raise Failure if the file cannot be read or is empty *) 601 + @return The API key as a string, with whitespace trimmed *) 604 602 val read_api_key_default : unit -> string 605 603 end 606 604 ··· 613 611 (** Get the primary mail account ID from a session. 614 612 Falls back to the first available account if no primary mail account is found. 615 613 @param session The JMAP session 616 - @return The account ID to use for mail operations 617 - @raise Failure if no accounts are found *) 614 + @return The account ID to use for mail operations *) 618 615 val get_primary_mail_account : Jmap.Protocol.Session.Session.t -> Jmap.Types.id 619 616 end 620 617
+2 -11
jmap/jmap/jmap_date.mli
··· 17 17 (** Abstract type representing a JMAP Date. *) 18 18 type t 19 19 20 - (** JSON serialization interface. *) 21 - 22 - (** Convert a JMAP Date to JSON. 23 - @param date The Date to serialize. 24 - @return A JSON string in RFC 3339 format. *) 25 - val to_json : t -> Yojson.Safe.t 26 - 27 - (** Parse a JMAP Date from JSON. 28 - @param json The JSON value to parse (expected to be RFC 3339 string). 29 - @return Ok with the parsed Date, or Error with a description of the parsing failure. *) 30 - val of_json : Yojson.Safe.t -> (t, string) result 20 + (** JSON serialization interface *) 21 + include Jmap_sigs.JSONABLE with type t := t 31 22 32 23 (** {1 Construction and Access} *) 33 24
+2 -11
jmap/jmap/jmap_id.mli
··· 14 14 (** Abstract type representing a JMAP Id. *) 15 15 type t 16 16 17 - (** JSON serialization interface. *) 18 - 19 - (** Convert a JMAP Id to JSON. 20 - @param id The Id to serialize. 21 - @return A JSON string representation. *) 22 - val to_json : t -> Yojson.Safe.t 23 - 24 - (** Parse a JMAP Id from JSON. 25 - @param json The JSON value to parse. 26 - @return Ok with the parsed Id, or Error with a description of the parsing failure. *) 27 - val of_json : Yojson.Safe.t -> (t, string) result 17 + (** JSON serialization interface *) 18 + include Jmap_sigs.JSONABLE with type t := t 28 19 29 20 (** {1 Construction and Access} *) 30 21
+2 -11
jmap/jmap/jmap_patch.mli
··· 19 19 (** Abstract type representing a JMAP Patch Object. *) 20 20 type t 21 21 22 - (** JSON serialization interface. *) 23 - 24 - (** Convert a JMAP Patch to JSON. 25 - @param patch The Patch to serialize. 26 - @return A JSON object representation. *) 27 - val to_json : t -> Yojson.Safe.t 28 - 29 - (** Parse a JMAP Patch from JSON. 30 - @param json The JSON value to parse (expected to be an object). 31 - @return Ok with the parsed Patch, or Error with a description of the parsing failure. *) 32 - val of_json : Yojson.Safe.t -> (t, string) result 22 + (** JSON serialization interface *) 23 + include Jmap_sigs.JSONABLE with type t := t 33 24 34 25 (** {1 Construction and Access} *) 35 26
+2 -11
jmap/jmap/jmap_uint.mli
··· 15 15 (** Abstract type representing a JMAP UnsignedInt. *) 16 16 type t 17 17 18 - (** JSON serialization interface. *) 19 - 20 - (** Convert a JMAP UnsignedInt to JSON. 21 - @param uint The UnsignedInt to serialize. 22 - @return A JSON number representation. *) 23 - val to_json : t -> Yojson.Safe.t 24 - 25 - (** Parse a JMAP UnsignedInt from JSON. 26 - @param json The JSON value to parse (expected to be a non-negative number). 27 - @return Ok with the parsed UnsignedInt, or Error with a description of the parsing failure. *) 28 - val of_json : Yojson.Safe.t -> (t, string) result 18 + (** JSON serialization interface *) 19 + include Jmap_sigs.JSONABLE with type t := t 29 20 30 21 (** {1 Construction and Access} *) 31 22