Matrix protocol in OCaml, Eio specialised
at main 43 lines 1.0 kB view raw
1(** Device management operations. *) 2 3(** Device information. *) 4type device = { 5 device_id : string; 6 display_name : string option; 7 last_seen_ip : string option; 8 last_seen_ts : int64 option; 9} 10 11(** Get all devices for the current user. *) 12val get_devices : Client.t -> (device list, Error.t) result 13 14(** Get information about a specific device. *) 15val get_device : 16 Client.t -> 17 device_id:string -> 18 (device, Error.t) result 19 20(** Update a device's display name. *) 21val update_device : 22 Client.t -> 23 device_id:string -> 24 display_name:string -> 25 (unit, Error.t) result 26 27(** Delete a device. 28 29 Note: This may require interactive authentication (UIAA) 30 which is not fully supported. *) 31val delete_device : 32 Client.t -> 33 device_id:string -> 34 (unit, Error.t) result 35 36(** Delete multiple devices. 37 38 Note: This may require interactive authentication (UIAA) 39 which is not fully supported. *) 40val delete_devices : 41 Client.t -> 42 device_ids:string list -> 43 (unit, Error.t) result