My agentic slop goes here. Not intended for anyone else!
at main 1.9 kB view raw
1(** JMAP Push Notification Types *) 2 3(** StateChange notification object *) 4module StateChange : sig 5 (** Map of type name to state string *) 6 type type_state = (string * string) list 7 8 type t = { 9 at_type : string; 10 changed : (Jmap_id.t * type_state) list; 11 } 12 13 (** Accessors *) 14 val at_type : t -> string 15 val changed : t -> (Jmap_id.t * type_state) list 16 17 (** Constructor *) 18 val v : at_type:string -> changed:(Jmap_id.t * type_state) list -> t 19 20 (** Parse from JSON *) 21 val of_json : Ezjsonm.value -> t 22end 23 24(** PushSubscription object *) 25module PushSubscription : sig 26 type t = { 27 id : Jmap_id.t; 28 device_client_id : string; 29 url : string; 30 keys : Ezjsonm.value option; 31 verification_code : string option; 32 expires : Jmap_primitives.UTCDate.t option; 33 types : string list option; 34 } 35 36 (** Accessors *) 37 val id : t -> Jmap_id.t 38 val device_client_id : t -> string 39 val url : t -> string 40 val keys : t -> Ezjsonm.value option 41 val verification_code : t -> string option 42 val expires : t -> Jmap_primitives.UTCDate.t option 43 val types : t -> string list option 44 45 (** Constructor *) 46 val v : 47 id:Jmap_id.t -> 48 device_client_id:string -> 49 url:string -> 50 ?keys:Ezjsonm.value -> 51 ?verification_code:string -> 52 ?expires:Jmap_primitives.UTCDate.t -> 53 ?types:string list -> 54 unit -> 55 t 56 57 (** Parse from JSON *) 58 val of_json : Ezjsonm.value -> t 59end 60 61(** PushVerification object (sent to push endpoint) *) 62module PushVerification : sig 63 type t = { 64 at_type : string; 65 push_subscription_id : string; 66 verification_code : string; 67 } 68 69 (** Accessors *) 70 val at_type : t -> string 71 val push_subscription_id : t -> string 72 val verification_code : t -> string 73 74 (** Constructor *) 75 val v : at_type:string -> push_subscription_id:string -> verification_code:string -> t 76 77 val of_json : Ezjsonm.value -> t 78end