partial type definitions for login
This commit is contained in:
parent
0e1b69f526
commit
676f88c843
2 changed files with 30 additions and 0 deletions
29
src/api/methods/login.rs
Normal file
29
src/api/methods/login.rs
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
use serde::Deserialize;
|
||||||
|
|
||||||
|
/// Response for 5.4.1: GET /_matrix/client/r0/login
|
||||||
|
#[derive(Deserialize)]
|
||||||
|
pub struct ValidLoginFlows {
|
||||||
|
pub flows: Option<LoginFlow>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize)]
|
||||||
|
pub struct LoginFlow {
|
||||||
|
pub r#type: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Request helper for 5.4.2: POST /_matrix/client/r0/login
|
||||||
|
pub struct LoginRequest {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Response object for a valid login from 5.4.2: POST /_matrix/client/r0/login
|
||||||
|
pub struct LoginResponse {
|
||||||
|
pub user_id: Option<String>,
|
||||||
|
pub access_token: Option<String>,
|
||||||
|
pub home_server: Option<String>,
|
||||||
|
pub device_id: Option<String>,
|
||||||
|
pub well_known: Option<DiscoveryInformation>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct DiscoveryInformation {
|
||||||
|
}
|
|
@ -1 +1,2 @@
|
||||||
|
pub mod login;
|
||||||
pub mod sync;
|
pub mod sync;
|
||||||
|
|
Loading…
Reference in a new issue