this repo has no description
0
fork

Configure Feed

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

more

+9 -12
+3 -3
jmap/bin/fastmail_connect.ml
··· 11 11 let query_json = 12 12 Jmap_email.Jmap_email_query.(query () |> with_account account_id |> order_by Sort.by_date_desc |> limit 5 |> build_email_query) in 13 13 14 - let properties = [`Id; `ThreadId; `From; `Subject; `ReceivedAt; `Preview; `Keywords; `HasAttachment] in 15 14 let get_json = 16 - Jmap_email.Jmap_email_query.(build_email_get_with_ref ~account_id ~properties:(properties_to_strings properties) 17 - ~result_of:"q1" ~method_name:"Email/query" ~path:"/ids") in 15 + Jmap_email.Jmap_email_query.(build_email_get_with_ref ~account_id 16 + ~properties:[`Id; `ThreadId; `From; `Subject; `ReceivedAt; `Preview; `Keywords; `HasAttachment] 17 + ~result_of:"q1") in 18 18 19 19 let builder = Jmap_unix.build ctx in 20 20 let builder = Jmap_unix.using builder [`Core; `Mail] in
+5 -4
jmap/jmap-email/jmap_email_query.ml
··· 186 186 | `Full -> Jmap_email_property.to_string_list (Jmap_email_property.for_reading ()) 187 187 | `Threading -> Jmap_email_property.to_string_list (Jmap_email_property.minimal_for_query ()) 188 188 189 - let build_email_get_with_ref ~account_id ~properties ~result_of ~method_name ~path = 189 + let build_email_get_with_ref ~account_id ~properties ~result_of = 190 + let property_strings = Jmap_email_property.to_string_list properties in 190 191 `Assoc [ 191 192 ("accountId", `String account_id); 192 - ("properties", `List (List.map (fun s -> `String s) properties)); 193 + ("properties", `List (List.map (fun s -> `String s) property_strings)); 193 194 ("#ids", `Assoc [ 194 195 ("resultOf", `String result_of); 195 - ("name", `String method_name); 196 - ("path", `String path) 196 + ("name", `String "Email/query"); 197 + ("path", `String "/ids") 197 198 ]) 198 199 ] 199 200
+1 -5
jmap/jmap-email/jmap_email_query.mli
··· 155 155 @param account_id Account identifier 156 156 @param properties List of property strings to fetch 157 157 @param result_of Method call ID to reference (e.g., "q1") 158 - @param method_name Method name being referenced (e.g., "Email/query") 159 - @param path Path to extract from result (e.g., "/ids") 160 158 @return JSON object for Email/get method arguments *) 161 159 val build_email_get_with_ref : 162 160 account_id:string -> 163 - properties:string list -> 161 + properties:property list -> 164 162 result_of:string -> 165 - method_name:string -> 166 - path:string -> 167 163 Yojson.Safe.t 168 164 169 165 (** Convert property list to string list for Email/get requests.