feature gate exhaustive types for all spec crates:
- ruma-appservice-api - ruma-client-api - ruma-events - ruma-federation-api
This commit is contained in:
parent
38913946eb
commit
7ccdaa34d6
154 changed files with 347 additions and 331 deletions
|
@ -18,3 +18,6 @@ ruma-events = { version = "=0.22.0-alpha.1", path = "../ruma-events" }
|
|||
ruma-identifiers = { version = "0.17.4", path = "../ruma-identifiers" }
|
||||
serde = { version = "1.0.114", features = ["derive"] }
|
||||
serde_json = "1.0.57"
|
||||
|
||||
[features]
|
||||
unstable-exhaustive-types = []
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The transaction ID for this set of events.
|
||||
///
|
||||
|
@ -28,7 +28,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room alias being queried.
|
||||
#[ruma_api(path)]
|
||||
|
@ -21,7 +21,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user ID being queried.
|
||||
#[ruma_api(path)]
|
||||
|
@ -21,7 +21,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The protocol used to communicate to the third party network.
|
||||
#[ruma_api(path)]
|
||||
|
@ -27,7 +27,7 @@ ruma_api! {
|
|||
pub fields: BTreeMap<String, String>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party locations.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -14,14 +14,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The Matrix room alias to look up.
|
||||
#[ruma_api(query)]
|
||||
pub alias: &'a RoomAliasId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party locations.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -13,14 +13,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The name of the protocol.
|
||||
#[ruma_api(path)]
|
||||
pub protocol: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Metadata about the protocol.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The protocol used to communicate to the third party network.
|
||||
#[ruma_api(path)]
|
||||
|
@ -27,7 +27,7 @@ ruma_api! {
|
|||
pub fields: BTreeMap<String, String>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party users.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -14,14 +14,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The Matrix User ID to look up.
|
||||
#[ruma_api(query)]
|
||||
pub userid: &'a UserId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party users.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -35,5 +35,6 @@ maplit = "1.0.2"
|
|||
matches = "0.1.8"
|
||||
|
||||
[features]
|
||||
unstable-exhaustive-types = []
|
||||
unstable-pre-spec = []
|
||||
unstable-synapse-quirks = []
|
||||
|
|
|
@ -23,7 +23,7 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
/// Additional authentication information for requestToken endpoints.
|
||||
#[derive(Clone, Debug, Outgoing, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct IdentityServerInfo<'a> {
|
||||
/// The ID server to send the onward request to as a hostname with an
|
||||
/// appended colon and port number if the port is not the default.
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Additional information for the User-Interactive Authentication API.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -28,7 +28,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: UiaaResponse
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Client-generated secret string used to protect this session.
|
||||
pub client_secret: &'a str,
|
||||
|
@ -29,7 +29,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The new password for the account.
|
||||
pub new_password: &'a str,
|
||||
|
@ -35,7 +35,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: UiaaResponse
|
||||
|
|
|
@ -17,7 +17,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Additional authentication information for the user-interactive authentication API.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -29,7 +29,7 @@ ruma_api! {
|
|||
pub id_server: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Result of unbind operation.
|
||||
pub id_server_unbind_result: ThirdPartyIdRemovalStatus,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Identity server to delete from.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -28,7 +28,7 @@ ruma_api! {
|
|||
pub address: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Result of unbind operation.
|
||||
pub id_server_unbind_result: ThirdPartyIdRemovalStatus,
|
||||
|
|
|
@ -12,14 +12,14 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The username to check the availability of.
|
||||
#[ruma_api(query)]
|
||||
pub username: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A flag to indicate that the username is available.
|
||||
/// This should always be true when the server replies with 200 OK.
|
||||
|
|
|
@ -17,7 +17,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The desired password for the account.
|
||||
///
|
||||
|
@ -67,7 +67,7 @@ ruma_api! {
|
|||
pub inhibit_login: bool,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// An access token for the account.
|
||||
///
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Client-generated secret string used to protect this session.
|
||||
pub client_secret: &'a str,
|
||||
|
@ -36,7 +36,7 @@ ruma_api! {
|
|||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Client-generated secret string used to protect this session.
|
||||
pub client_secret: &'a str,
|
||||
|
@ -39,7 +39,7 @@ ruma_api! {
|
|||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
|
|
@ -16,14 +16,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// User ID of authenticated user.
|
||||
#[ruma_api(path)]
|
||||
pub user_id: &'a UserId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Access token for verifying user's identity.
|
||||
pub access_token: String,
|
||||
|
@ -64,7 +64,7 @@ impl Response {
|
|||
|
||||
/// Access token types.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub enum TokenType {
|
||||
/// Bearer token type
|
||||
Bearer,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Client-generated secret string used to protect this session.
|
||||
pub client_secret: &'a str,
|
||||
|
@ -36,7 +36,7 @@ ruma_api! {
|
|||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Client-generated secret string used to protect this session.
|
||||
pub client_secret: &'a str,
|
||||
|
@ -32,7 +32,7 @@ ruma_api! {
|
|||
pub next_link: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Client-generated secret string used to protect this session.
|
||||
pub client_secret: &'a str,
|
||||
|
@ -36,7 +36,7 @@ ruma_api! {
|
|||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Client-generated secret string used to protect this session.
|
||||
pub client_secret: &'a str,
|
||||
|
@ -39,7 +39,7 @@ ruma_api! {
|
|||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Identity server to unbind from.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -28,7 +28,7 @@ ruma_api! {
|
|||
pub address: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Result of unbind operation.
|
||||
pub id_server_unbind_result: ThirdPartyIdRemovalStatus,
|
||||
|
|
|
@ -14,10 +14,10 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The id of the user that owns the access token.
|
||||
pub user_id: UserId,
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room alias to set.
|
||||
#[ruma_api(path)]
|
||||
|
@ -24,7 +24,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room alias to remove.
|
||||
#[ruma_api(path)]
|
||||
|
@ -21,7 +21,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,14 +13,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room alias.
|
||||
#[ruma_api(path)]
|
||||
pub room_alias: &'a RoomAliasId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The room ID for this room alias.
|
||||
pub room_id: RoomId,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The protocol (network) ID to update the room list for.
|
||||
#[ruma_api(path)]
|
||||
|
@ -30,7 +30,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The backup version. Must be the current backup.
|
||||
#[ruma_api(query)]
|
||||
|
@ -27,7 +27,7 @@ ruma_api! {
|
|||
pub rooms: Rooms,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// An opaque string representing stored keys in the backup. Clients can compare it with
|
||||
/// the etag value they received in the request of their last key storage request.
|
||||
|
|
|
@ -14,14 +14,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The algorithm used for storing backups.
|
||||
#[serde(flatten)]
|
||||
pub algorithm: BackupAlgorithm,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The backup version. This is an opaque string.
|
||||
pub version: String,
|
||||
|
|
|
@ -15,14 +15,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The backup version.
|
||||
#[ruma_api(path)]
|
||||
pub version: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The algorithm used for storing backups.
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -14,14 +14,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The backup version. Must be the current backup.
|
||||
#[ruma_api(query)]
|
||||
pub version: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A map from room IDs to session IDs to key data.
|
||||
///
|
||||
|
|
|
@ -16,10 +16,10 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The algorithm used for storing backups.
|
||||
#[serde(flatten)]
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The backup version.
|
||||
#[ruma_api(path)]
|
||||
|
@ -26,7 +26,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -17,10 +17,10 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The capabilities the server supports
|
||||
pub capabilities: Capabilities,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// User ID of user for whom to retrieve data.
|
||||
#[ruma_api(path)]
|
||||
|
@ -26,7 +26,7 @@ ruma_api! {
|
|||
pub event_type: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Account data content for the given type.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// User ID of user for whom to retrieve data.
|
||||
#[ruma_api(path)]
|
||||
|
@ -30,7 +30,7 @@ ruma_api! {
|
|||
pub event_type: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Account data content for the given type.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Arbitrary JSON to store as config data.
|
||||
///
|
||||
|
@ -36,7 +36,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Arbitrary JSON to store as config data.
|
||||
///
|
||||
|
@ -40,7 +40,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -17,10 +17,10 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A list of third party identifiers the homeserver has associated with the user's
|
||||
/// account.
|
||||
|
@ -50,7 +50,7 @@ impl Response {
|
|||
/// To create an instance of this type, first create a `ThirdPartyIdentifierInit` and convert it to
|
||||
/// this type using `ThirdPartyIdentifier::Init` / `.into()`.
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[cfg_attr(test, derive(PartialEq))]
|
||||
pub struct ThirdPartyIdentifier {
|
||||
/// The third party identifier address.
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Client-generated secret string used to protect this session.
|
||||
pub client_secret: &'a str,
|
||||
|
@ -43,7 +43,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -18,7 +18,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to get events from.
|
||||
#[ruma_api(path)]
|
||||
|
@ -46,7 +46,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A token that can be used to paginate backwards with.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The device to delete.
|
||||
#[ruma_api(path)]
|
||||
|
@ -27,7 +27,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: UiaaResponse
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// List of devices to delete.
|
||||
pub devices: &'a [DeviceIdBox],
|
||||
|
@ -26,7 +26,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: UiaaResponse
|
||||
|
|
|
@ -14,14 +14,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The device to retrieve.
|
||||
#[ruma_api(path)]
|
||||
pub device_id: &'a DeviceId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Information about the device.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -14,10 +14,10 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A list of all registered devices for this user
|
||||
pub devices: Vec<Device>,
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The device to update.
|
||||
#[ruma_api(path)]
|
||||
|
@ -26,7 +26,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Limit for the number of results to return.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -35,7 +35,7 @@ ruma_api! {
|
|||
pub server: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A paginated chunk of public rooms.
|
||||
pub chunk: Vec<PublicRoomsChunk>,
|
||||
|
|
|
@ -17,7 +17,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The server to fetch the public room lists from.
|
||||
///
|
||||
|
@ -44,7 +44,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A paginated chunk of public rooms.
|
||||
pub chunk: Vec<PublicRoomsChunk>,
|
||||
|
|
|
@ -15,14 +15,14 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The ID of the room of which to request the visibility.
|
||||
#[ruma_api(path)]
|
||||
pub room_id: &'a RoomId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Visibility of the room.
|
||||
pub visibility: Visibility,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The ID of the room of which to set the visibility.
|
||||
#[ruma_api(path)]
|
||||
|
@ -26,7 +26,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The ID of the user uploading the filter.
|
||||
///
|
||||
|
@ -28,7 +28,7 @@ ruma_api! {
|
|||
pub filter: FilterDefinition<'a>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The ID of the filter that was created.
|
||||
pub filter_id: String,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user ID to download a filter for.
|
||||
#[ruma_api(path)]
|
||||
|
@ -26,7 +26,7 @@ ruma_api! {
|
|||
pub filter_id: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The filter definition.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -20,7 +20,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The time (in milliseconds) to wait when downloading keys from remote servers.
|
||||
/// 10 seconds is the recommended default.
|
||||
|
@ -35,7 +35,7 @@ ruma_api! {
|
|||
pub one_time_keys: BTreeMap<UserId, BTreeMap<DeviceIdBox, DeviceKeyAlgorithm>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// If any remote homeservers could not be reached, they are recorded here.
|
||||
/// The names of the properties are the names of the unreachable servers.
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The desired start point of the list.
|
||||
///
|
||||
|
@ -29,7 +29,7 @@ ruma_api! {
|
|||
pub to: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The Matrix User IDs of all users who updated their device identity keys.
|
||||
pub changed: Vec<UserId>,
|
||||
|
|
|
@ -21,7 +21,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The time (in milliseconds) to wait when downloading keys from remote
|
||||
/// servers. 10 seconds is the recommended default.
|
||||
|
@ -46,7 +46,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// If any remote homeservers could not be reached, they are recorded
|
||||
/// here. The names of the properties are the names of the unreachable
|
||||
|
|
|
@ -20,7 +20,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Identity keys for the device. May be absent if no new identity keys are required.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -31,7 +31,7 @@ ruma_api! {
|
|||
pub one_time_keys: Option<BTreeMap<DeviceKeyId, OneTimeKey>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// For each key algorithm, the number of unclaimed one-time keys of that
|
||||
/// type currently held on the server for this device.
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Signed keys.
|
||||
#[ruma_api(body)]
|
||||
|
@ -23,7 +23,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -16,7 +16,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Additional authentication information for the user-interactive authentication API.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -38,7 +38,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to kick the user from.
|
||||
#[ruma_api(path)]
|
||||
|
@ -28,7 +28,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to forget.
|
||||
#[ruma_api(path)]
|
||||
|
@ -21,7 +21,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -23,7 +23,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room where the user should be invited.
|
||||
#[ruma_api(path)]
|
||||
|
@ -35,7 +35,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -57,7 +57,7 @@ impl Response {
|
|||
|
||||
/// Distinguishes between invititations by Matrix or third party identifiers.
|
||||
#[derive(Clone, Debug, PartialEq, Outgoing, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(PartialEq)]
|
||||
#[serde(untagged)]
|
||||
pub enum InvitationRecipient<'a> {
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room where the user should be invited.
|
||||
#[ruma_api(path)]
|
||||
|
@ -27,7 +27,7 @@ ruma_api! {
|
|||
pub third_party_signed: Option<ThirdPartySigned<'a>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The room that the user joined.
|
||||
pub room_id: RoomId,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room where the user should be invited.
|
||||
#[ruma_api(path)]
|
||||
|
@ -33,7 +33,7 @@ ruma_api! {
|
|||
pub third_party_signed: Option<ThirdPartySigned<'a>>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The room that the user joined.
|
||||
pub room_id: RoomId,
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to kick the user from.
|
||||
#[ruma_api(path)]
|
||||
|
@ -28,7 +28,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to leave.
|
||||
#[ruma_api(path)]
|
||||
|
@ -21,7 +21,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to unban the user from.
|
||||
#[ruma_api(path)]
|
||||
|
@ -24,7 +24,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -19,7 +19,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to get events from.
|
||||
#[ruma_api(path)]
|
||||
|
@ -64,7 +64,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The token the pagination starts from.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
|
|
@ -18,7 +18,7 @@ use serde_json::value::RawValue as RawJsonValue;
|
|||
///
|
||||
/// Send a message event to a room.
|
||||
#[derive(Clone, Debug, Outgoing)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(!Deserialize)]
|
||||
pub struct Request<'a> {
|
||||
/// The room to send the event to.
|
||||
|
@ -44,7 +44,7 @@ impl<'a> Request<'a> {
|
|||
|
||||
/// Data in the response from the `send_message_event` API endpoint.
|
||||
#[derive(Clone, Debug, Outgoing)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(!Deserialize)]
|
||||
pub struct Response {
|
||||
/// A unique identifier for the event.
|
||||
|
|
|
@ -22,7 +22,7 @@ pub mod set_pushrule_enabled;
|
|||
#[derive(
|
||||
Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Display, EnumString,
|
||||
)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum RuleKind {
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room ID to set the read marker in for the user.
|
||||
#[ruma_api(path)]
|
||||
|
@ -33,7 +33,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -16,7 +16,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room in which to send the event.
|
||||
#[ruma_api(path)]
|
||||
|
@ -32,7 +32,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -54,7 +54,7 @@ impl Response {
|
|||
|
||||
/// The type of receipt.
|
||||
#[derive(Clone, Copy, Debug, Display, EnumString)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub enum ReceiptType {
|
||||
/// m.read
|
||||
#[strum(serialize = "m.read")]
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The ID of the room of the event to redact.
|
||||
#[ruma_api(path)]
|
||||
|
@ -35,7 +35,7 @@ ruma_api! {
|
|||
pub reason: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The ID of the redacted event.
|
||||
pub event_id: EventId,
|
||||
|
|
|
@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
/// Whether or not a newly created room will be listed in the room directory.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum Visibility {
|
||||
/// Indicates that the room will be shown in the published room list.
|
||||
|
|
|
@ -27,7 +27,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Extra keys to be added to the content of the `m.room.create`.
|
||||
#[serde(default, skip_serializing_if = "CreationContent::is_empty")]
|
||||
|
@ -88,7 +88,7 @@ ruma_api! {
|
|||
pub visibility: Visibility,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The created room's ID.
|
||||
pub room_id: RoomId,
|
||||
|
@ -116,7 +116,7 @@ impl Response {
|
|||
/// This is the same as the event content struct for `m.room.create`, but without some fields that
|
||||
/// servers are supposed to ignore.
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct CreationContent {
|
||||
/// Whether users on other servers can join this room.
|
||||
///
|
||||
|
@ -163,7 +163,7 @@ impl Default for CreationContent {
|
|||
|
||||
/// A convenience parameter for setting a few default state events.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum RoomPreset {
|
||||
/// `join_rules` is set to `invite` and `history_visibility` is set to `shared`.
|
||||
|
|
|
@ -21,7 +21,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The point to return events from.
|
||||
///
|
||||
|
@ -33,7 +33,7 @@ ruma_api! {
|
|||
pub search_categories: Categories<'a>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A grouping of search results by category.
|
||||
pub search_categories: ResultCategories,
|
||||
|
@ -58,7 +58,7 @@ impl Response {
|
|||
|
||||
/// Categories of events that can be searched for.
|
||||
#[derive(Clone, Debug, Default, Outgoing, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Categories<'a> {
|
||||
/// Criteria for searching room events.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -74,7 +74,7 @@ impl Categories<'_> {
|
|||
|
||||
/// Criteria for searching a category of events.
|
||||
#[derive(Clone, Copy, Debug, Outgoing, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Criteria<'a> {
|
||||
/// The string to search events for.
|
||||
pub search_term: &'a str,
|
||||
|
@ -121,7 +121,7 @@ impl<'a> Criteria<'a> {
|
|||
|
||||
/// Configures whether any context for the events returned are included in the response.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct EventContext {
|
||||
/// How many events before the result are returned.
|
||||
#[serde(
|
||||
|
@ -178,7 +178,7 @@ impl Default for EventContext {
|
|||
|
||||
/// Context for search results, if requested.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct EventContextResult {
|
||||
/// Pagination token for the end of the chunk.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -219,7 +219,7 @@ impl EventContextResult {
|
|||
|
||||
/// A grouping for partioning the result set.
|
||||
#[derive(Clone, Copy, Default, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Grouping {
|
||||
/// The key within events to use for this grouping.
|
||||
pub key: Option<GroupingKey>,
|
||||
|
@ -239,7 +239,7 @@ impl Grouping {
|
|||
|
||||
/// The key within events to use for this grouping.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Eq, PartialOrd, Ord, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum GroupingKey {
|
||||
/// `room_id`
|
||||
|
@ -252,7 +252,7 @@ pub enum GroupingKey {
|
|||
/// Requests that the server partitions the result set based on the provided list of keys.
|
||||
#[derive(Clone, Copy, Default, Debug, Outgoing, Serialize)]
|
||||
#[incoming_derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Groupings<'a> {
|
||||
/// List of groups to request.
|
||||
#[serde(default, skip_serializing_if = "<[_]>::is_empty")]
|
||||
|
@ -273,7 +273,7 @@ impl Groupings<'_> {
|
|||
|
||||
/// The keys to search for.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub enum SearchKeys {
|
||||
/// content.body
|
||||
#[serde(rename = "content.body")]
|
||||
|
@ -290,7 +290,7 @@ pub enum SearchKeys {
|
|||
|
||||
/// The order in which to search for results.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum OrderBy {
|
||||
/// Prioritize recent events.
|
||||
|
@ -303,7 +303,7 @@ pub enum OrderBy {
|
|||
|
||||
/// Categories of events that can be searched for.
|
||||
#[derive(Clone, Default, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct ResultCategories {
|
||||
/// Room event results.
|
||||
#[serde(default, skip_serializing_if = "ResultRoomEvents::is_empty")]
|
||||
|
@ -319,7 +319,7 @@ impl ResultCategories {
|
|||
|
||||
/// Categories of events that can be searched for.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct ResultRoomEvents {
|
||||
/// An approximate count of the total number of results found.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -368,7 +368,7 @@ impl ResultRoomEvents {
|
|||
|
||||
/// A grouping of results, if requested.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct ResultGroup {
|
||||
/// Token that can be used to get the next batch of results in the group, by passing as the
|
||||
/// `next_batch` parameter to the next call. If this field is absent, there are no more
|
||||
|
@ -399,7 +399,7 @@ impl ResultGroup {
|
|||
|
||||
/// A search result.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct SearchResult {
|
||||
/// Context for result, if requested.
|
||||
#[serde(skip_serializing_if = "EventContextResult::is_empty")]
|
||||
|
@ -428,7 +428,7 @@ impl SearchResult {
|
|||
|
||||
/// A user profile.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct UserProfile {
|
||||
/// The user's avatar URL, if set.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
|
|
@ -16,7 +16,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user to look up.
|
||||
#[ruma_api(path)]
|
||||
|
@ -24,7 +24,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The Matrix user ID of the user.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
|
|
@ -14,10 +14,10 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The homeserver's supported login types.
|
||||
pub flows: Vec<LoginType>
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Identification information for the user.
|
||||
#[serde(flatten)]
|
||||
|
@ -35,7 +35,7 @@ ruma_api! {
|
|||
pub initial_device_display_name: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The fully-qualified Matrix ID that has been registered.
|
||||
pub user_id: UserId,
|
||||
|
|
|
@ -13,11 +13,11 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,11 +13,11 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// URL to which the homeserver should return the user after completing
|
||||
/// authentication with the SSO identity provider.
|
||||
|
@ -21,7 +21,7 @@ ruma_api! {
|
|||
pub redirect_url: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Redirect URL to the SSO identity provider.
|
||||
#[ruma_api(header = LOCATION)]
|
||||
|
|
|
@ -18,7 +18,7 @@ use serde_json::value::RawValue as RawJsonValue;
|
|||
///
|
||||
/// Send a state event to a room associated with the empty state key.
|
||||
#[derive(Clone, Debug, Outgoing)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(!Deserialize)]
|
||||
pub struct Request<'a> {
|
||||
/// The room to set the state in.
|
||||
|
@ -37,7 +37,7 @@ impl<'a> Request<'a> {
|
|||
|
||||
/// Data in the response from the `send_state_event_for_empty_key` API endpoint.
|
||||
#[derive(Clone, Debug, Outgoing)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(!Deserialize)]
|
||||
pub struct Response {
|
||||
/// A unique identifier for the event.
|
||||
|
|
|
@ -18,7 +18,7 @@ use serde_json::value::RawValue as RawJsonValue;
|
|||
///
|
||||
/// Send a state event to a room associated with a given state key.
|
||||
#[derive(Clone, Debug, Outgoing)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(!Deserialize)]
|
||||
pub struct Request<'a> {
|
||||
/// The room to set the state in.
|
||||
|
@ -40,7 +40,7 @@ impl<'a> Request<'a> {
|
|||
|
||||
/// Data in the response from the `send_message_event` API endpoint.
|
||||
#[derive(Clone, Debug, Outgoing)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(!Deserialize)]
|
||||
pub struct Response {
|
||||
/// A unique identifier for the event.
|
||||
|
|
|
@ -25,7 +25,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// A filter represented either as its full JSON definition or the ID of a saved filter.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -60,7 +60,7 @@ ruma_api! {
|
|||
pub timeout: Option<Duration>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The batch token to supply in the `since` param of the next `/sync` request.
|
||||
pub next_batch: String,
|
||||
|
@ -155,7 +155,7 @@ impl<'a> From<&'a str> for Filter<'a> {
|
|||
|
||||
/// Updates to rooms.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Rooms {
|
||||
/// The rooms that the user has left or been banned from.
|
||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
||||
|
@ -184,7 +184,7 @@ impl Rooms {
|
|||
|
||||
/// Historical updates to left rooms.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct LeftRoom {
|
||||
/// The timeline of messages and state changes in the room up to the point when the user
|
||||
/// left.
|
||||
|
@ -214,7 +214,7 @@ impl LeftRoom {
|
|||
|
||||
/// Updates to joined rooms.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct JoinedRoom {
|
||||
/// Information about the room which clients may need to correctly render it
|
||||
/// to users.
|
||||
|
@ -264,7 +264,7 @@ impl JoinedRoom {
|
|||
|
||||
/// unread notifications count
|
||||
#[derive(Clone, Copy, Default, Debug, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct UnreadNotificationsCount {
|
||||
/// The number of unread notifications for this room with the highlight flag set.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -289,7 +289,7 @@ impl UnreadNotificationsCount {
|
|||
|
||||
/// Events in the room.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Timeline {
|
||||
/// True if the number of events returned was limited by the `limit` on the filter.
|
||||
#[serde(default, skip_serializing_if = "ruma_serde::is_default")]
|
||||
|
@ -319,7 +319,7 @@ impl Timeline {
|
|||
|
||||
/// State events in the room.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct State {
|
||||
/// A list of state events.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
|
@ -340,7 +340,7 @@ impl State {
|
|||
|
||||
/// The private data that this user has attached to this room.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct AccountData {
|
||||
/// A list of events.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
|
@ -361,7 +361,7 @@ impl AccountData {
|
|||
|
||||
/// Ephemeral events not recorded in the timeline or state of the room.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Ephemeral {
|
||||
/// A list of events.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
|
@ -382,7 +382,7 @@ impl Ephemeral {
|
|||
|
||||
/// Information about room for rendering to clients.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct RoomSummary {
|
||||
/// Users which can be used to generate a room name if the room does not have
|
||||
/// one. Required if room name or canonical aliases are not set or empty.
|
||||
|
@ -418,7 +418,7 @@ impl RoomSummary {
|
|||
|
||||
/// Updates to the rooms that the user has been invited to.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct InvitedRoom {
|
||||
/// The state of a room that the user has been invited to.
|
||||
#[serde(default, skip_serializing_if = "InviteState::is_empty")]
|
||||
|
@ -439,7 +439,7 @@ impl InvitedRoom {
|
|||
|
||||
/// The state of a room that the user has been invited to.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct InviteState {
|
||||
/// A list of state events.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
|
@ -460,7 +460,7 @@ impl InviteState {
|
|||
|
||||
/// Updates to the presence status of other users.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct Presence {
|
||||
/// A list of events.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
|
@ -481,7 +481,7 @@ impl Presence {
|
|||
|
||||
/// Messages sent dirrectly between devices.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct ToDevice {
|
||||
/// A list of to-device events.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
|
@ -502,7 +502,7 @@ impl ToDevice {
|
|||
|
||||
/// Information on E2E device udpates.
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
pub struct DeviceLists {
|
||||
/// List of users who have updated their device identity keys or who now
|
||||
/// share an encrypted room with the client since the previous sync
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The ID of the user creating the tag.
|
||||
#[ruma_api(path)]
|
||||
|
@ -34,7 +34,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -13,7 +13,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose tag will be deleted.
|
||||
#[ruma_api(path)]
|
||||
|
@ -29,7 +29,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -14,7 +14,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose tags will be retrieved.
|
||||
#[ruma_api(path)]
|
||||
|
@ -25,7 +25,7 @@ ruma_api! {
|
|||
pub room_id: &'a RoomId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The user's tags for the room.
|
||||
pub tags: Tags,
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The protocol used to communicate to the third party network.
|
||||
#[ruma_api(path)]
|
||||
|
@ -27,7 +27,7 @@ ruma_api! {
|
|||
pub fields: BTreeMap<String, String>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party locations.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -14,14 +14,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The Matrix room alias to look up.
|
||||
#[ruma_api(query)]
|
||||
pub alias: &'a RoomAliasId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party locations.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -13,14 +13,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The name of the protocol.
|
||||
#[ruma_api(path)]
|
||||
pub protocol: &'a str,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Metadata about the protocol.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -16,10 +16,10 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Metadata about protocols supported by the homeserver.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The protocol used to communicate to the third party network.
|
||||
#[ruma_api(path)]
|
||||
|
@ -27,7 +27,7 @@ ruma_api! {
|
|||
pub fields: BTreeMap<String, String>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party users.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -14,14 +14,14 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The Matrix User ID to look up.
|
||||
#[ruma_api(query)]
|
||||
pub userid: &'a UserId,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party users.
|
||||
#[ruma_api(body)]
|
||||
|
|
|
@ -19,7 +19,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Type of event being sent to each device.
|
||||
#[ruma_api(path)]
|
||||
|
@ -39,7 +39,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -16,7 +16,7 @@ ruma_api! {
|
|||
rate_limited: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user who has started to type.
|
||||
#[ruma_api(path)]
|
||||
|
@ -32,7 +32,7 @@ ruma_api! {
|
|||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
|
|
@ -15,7 +15,7 @@ ruma_api! {
|
|||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The term to search for.
|
||||
pub search_term: &'a str,
|
||||
|
@ -35,7 +35,7 @@ ruma_api! {
|
|||
pub language: Option<String>,
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Ordered by rank and then whether or not profile info is available.
|
||||
pub results: Vec<User>,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue