api: Add non_exhaustive attribute to request and reponse types through the macro
This commit is contained in:
parent
bb9b2b4a06
commit
67d113ba57
@ -522,6 +522,7 @@ impl ToTokens for Request {
|
||||
|
||||
let request = quote! {
|
||||
#[derive(Debug, Clone, #import_path::Outgoing)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(!Deserialize)]
|
||||
#( #struct_attributes )*
|
||||
pub struct Request #request_generics #request_def
|
||||
|
@ -319,6 +319,7 @@ impl ToTokens for Response {
|
||||
|
||||
let response = quote! {
|
||||
#[derive(Debug, Clone, #import_path::Outgoing)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(!Deserialize)]
|
||||
#( #struct_attributes )*
|
||||
pub struct Response #response_def
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The transaction ID for this set of events.
|
||||
///
|
||||
@ -28,7 +27,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room alias being queried.
|
||||
#[ruma_api(path)]
|
||||
@ -21,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user ID being queried.
|
||||
#[ruma_api(path)]
|
||||
@ -21,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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 +26,6 @@ ruma_api! {
|
||||
pub fields: BTreeMap<String, String>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party locations.
|
||||
#[ruma_api(body)]
|
||||
|
@ -14,14 +14,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The Matrix room alias to look up.
|
||||
#[ruma_api(query)]
|
||||
pub alias: &'a RoomAliasId,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party locations.
|
||||
#[ruma_api(body)]
|
||||
|
@ -13,14 +13,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The name of the protocol.
|
||||
#[ruma_api(path)]
|
||||
pub protocol: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Metadata about the protocol.
|
||||
#[ruma_api(body)]
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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 +26,6 @@ ruma_api! {
|
||||
pub fields: BTreeMap<String, String>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party users.
|
||||
#[ruma_api(body)]
|
||||
|
@ -14,14 +14,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The Matrix User ID to look up.
|
||||
#[ruma_api(query)]
|
||||
pub userid: &'a UserId,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// List of matched third party users.
|
||||
#[ruma_api(body)]
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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 +27,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: UiaaResponse
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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 +28,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The new password for the account.
|
||||
pub new_password: &'a str,
|
||||
@ -35,7 +34,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: UiaaResponse
|
||||
|
@ -17,7 +17,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[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 +28,6 @@ ruma_api! {
|
||||
pub id_server: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Result of unbind operation.
|
||||
pub id_server_unbind_result: ThirdPartyIdRemovalStatus,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Identity server to delete from.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -28,7 +27,6 @@ ruma_api! {
|
||||
pub address: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Result of unbind operation.
|
||||
pub id_server_unbind_result: ThirdPartyIdRemovalStatus,
|
||||
|
@ -12,14 +12,12 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The username to check the availability of.
|
||||
#[ruma_api(query)]
|
||||
pub username: &'a str,
|
||||
}
|
||||
|
||||
#[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,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The desired password for the account.
|
||||
///
|
||||
@ -67,7 +66,6 @@ ruma_api! {
|
||||
pub inhibit_login: bool,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// An access token for the account.
|
||||
///
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[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 +35,6 @@ ruma_api! {
|
||||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[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 +38,6 @@ ruma_api! {
|
||||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
@ -16,14 +16,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// User ID of authenticated user.
|
||||
#[ruma_api(path)]
|
||||
pub user_id: &'a UserId,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Access token for verifying user's identity.
|
||||
pub access_token: String,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[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 +35,6 @@ ruma_api! {
|
||||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[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 +31,6 @@ ruma_api! {
|
||||
pub next_link: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[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 +35,6 @@ ruma_api! {
|
||||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[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 +38,6 @@ ruma_api! {
|
||||
pub identity_server_info: Option<IdentityServerInfo<'a>>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The session identifier given by the identity server.
|
||||
pub sid: String,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Identity server to unbind from.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -28,7 +27,6 @@ ruma_api! {
|
||||
pub address: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Result of unbind operation.
|
||||
pub id_server_unbind_result: ThirdPartyIdRemovalStatus,
|
||||
|
@ -14,10 +14,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[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,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room alias to set.
|
||||
#[ruma_api(path)]
|
||||
@ -24,7 +23,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room alias to remove.
|
||||
#[ruma_api(path)]
|
||||
@ -21,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -13,14 +13,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room alias.
|
||||
#[ruma_api(path)]
|
||||
pub room_alias: &'a RoomAliasId,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The room ID for this room alias.
|
||||
pub room_id: RoomId,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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 +29,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The backup version. Must be the current backup.
|
||||
#[ruma_api(query)]
|
||||
@ -27,7 +26,6 @@ ruma_api! {
|
||||
pub rooms: Rooms,
|
||||
}
|
||||
|
||||
#[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,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The algorithm used for storing backups.
|
||||
#[serde(flatten)]
|
||||
pub algorithm: BackupAlgorithm,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The backup version. This is an opaque string.
|
||||
pub version: String,
|
||||
|
@ -15,14 +15,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The backup version.
|
||||
#[ruma_api(path)]
|
||||
pub version: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The algorithm used for storing backups.
|
||||
#[serde(flatten)]
|
||||
|
@ -14,14 +14,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A map from room IDs to session IDs to key data.
|
||||
///
|
||||
|
@ -16,10 +16,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The algorithm used for storing backups.
|
||||
#[serde(flatten)]
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The backup version.
|
||||
#[ruma_api(path)]
|
||||
@ -26,7 +25,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -17,10 +17,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The capabilities the server supports
|
||||
pub capabilities: Capabilities,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// User ID of user for whom to retrieve data.
|
||||
#[ruma_api(path)]
|
||||
@ -26,7 +25,6 @@ ruma_api! {
|
||||
pub event_type: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Account data content for the given type.
|
||||
#[ruma_api(body)]
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// User ID of user for whom to retrieve data.
|
||||
#[ruma_api(path)]
|
||||
@ -30,7 +29,6 @@ ruma_api! {
|
||||
pub event_type: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Account data content for the given type.
|
||||
#[ruma_api(body)]
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Arbitrary JSON to store as config data.
|
||||
///
|
||||
@ -36,7 +35,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Arbitrary JSON to store as config data.
|
||||
///
|
||||
@ -40,7 +39,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -17,10 +17,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[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.
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[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 +42,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -18,7 +18,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to get events from.
|
||||
#[ruma_api(path)]
|
||||
@ -46,7 +45,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[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,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The device to delete.
|
||||
#[ruma_api(path)]
|
||||
@ -27,7 +26,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: UiaaResponse
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// List of devices to delete.
|
||||
pub devices: &'a [DeviceIdBox],
|
||||
@ -26,7 +25,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: UiaaResponse
|
||||
|
@ -14,14 +14,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The device to retrieve.
|
||||
#[ruma_api(path)]
|
||||
pub device_id: &'a DeviceId,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Information about the device.
|
||||
#[ruma_api(body)]
|
||||
|
@ -14,10 +14,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[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,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The device to update.
|
||||
#[ruma_api(path)]
|
||||
@ -26,7 +25,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[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 +34,6 @@ ruma_api! {
|
||||
pub server: Option<&'a str>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A paginated chunk of public rooms.
|
||||
pub chunk: Vec<PublicRoomsChunk>,
|
||||
|
@ -17,7 +17,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The server to fetch the public room lists from.
|
||||
///
|
||||
@ -44,7 +43,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A paginated chunk of public rooms.
|
||||
pub chunk: Vec<PublicRoomsChunk>,
|
||||
|
@ -15,14 +15,12 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[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,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Visibility of the room.
|
||||
pub visibility: Visibility,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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 +25,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The ID of the user uploading the filter.
|
||||
///
|
||||
@ -28,7 +27,6 @@ ruma_api! {
|
||||
pub filter: FilterDefinition<'a>,
|
||||
}
|
||||
|
||||
#[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,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user ID to download a filter for.
|
||||
#[ruma_api(path)]
|
||||
@ -26,7 +25,6 @@ ruma_api! {
|
||||
pub filter_id: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The filter definition.
|
||||
#[ruma_api(body)]
|
||||
|
@ -20,7 +20,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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 +34,6 @@ ruma_api! {
|
||||
pub one_time_keys: BTreeMap<UserId, BTreeMap<DeviceIdBox, DeviceKeyAlgorithm>>,
|
||||
}
|
||||
|
||||
#[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,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The desired start point of the list.
|
||||
///
|
||||
@ -29,7 +28,6 @@ ruma_api! {
|
||||
pub to: &'a str,
|
||||
}
|
||||
|
||||
#[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,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[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 +45,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[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,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[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 +30,6 @@ ruma_api! {
|
||||
pub one_time_keys: Option<BTreeMap<DeviceKeyId, OneTimeKey>>,
|
||||
}
|
||||
|
||||
#[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,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Signed keys.
|
||||
#[ruma_api(body)]
|
||||
@ -23,7 +22,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -16,7 +16,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[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 +37,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -12,7 +12,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The name of the file being uploaded.
|
||||
#[ruma_api(query)]
|
||||
@ -29,7 +28,6 @@ ruma_api! {
|
||||
pub file: Vec<u8>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The MXC URI for the uploaded content.
|
||||
pub content_uri: String,
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The media ID from the mxc:// URI (the path component).
|
||||
#[ruma_api(path)]
|
||||
@ -31,7 +30,6 @@ ruma_api! {
|
||||
pub allow_remote: bool,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The content that was previously uploaded.
|
||||
#[ruma_api(raw_body)]
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The media ID from the mxc:// URI (the path component).
|
||||
#[ruma_api(path)]
|
||||
@ -35,7 +34,6 @@ ruma_api! {
|
||||
pub allow_remote: bool,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The content that was previously uploaded.
|
||||
#[ruma_api(raw_body)]
|
||||
|
@ -26,7 +26,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The media ID from the mxc:// URI (the path component).
|
||||
#[ruma_api(path)]
|
||||
@ -59,7 +58,6 @@ ruma_api! {
|
||||
pub allow_remote: bool,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The content type of the thumbnail.
|
||||
#[ruma_api(header = CONTENT_TYPE)]
|
||||
|
@ -14,10 +14,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Maximum size of upload in bytes.
|
||||
#[serde(rename = "m.upload.size")]
|
||||
|
@ -16,7 +16,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// URL to get a preview of.
|
||||
#[ruma_api(query)]
|
||||
@ -29,7 +28,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// OpenGraph-like data for the URL.
|
||||
///
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to kick the user from.
|
||||
#[ruma_api(path)]
|
||||
@ -28,7 +27,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to forget.
|
||||
#[ruma_api(path)]
|
||||
@ -21,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -16,7 +16,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to get the member events for.
|
||||
#[ruma_api(path)]
|
||||
@ -42,7 +41,6 @@ ruma_api! {
|
||||
pub not_membership: Option<MembershipEventFilter>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A list of member events.
|
||||
pub chunk: Vec<Raw<MemberEvent>>
|
||||
|
@ -23,7 +23,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room where the user should be invited.
|
||||
#[ruma_api(path)]
|
||||
@ -35,7 +34,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room where the user should be invited.
|
||||
#[ruma_api(path)]
|
||||
@ -27,7 +26,6 @@ ruma_api! {
|
||||
pub third_party_signed: Option<ThirdPartySigned<'a>>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The room that the user joined.
|
||||
pub room_id: RoomId,
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room where the user should be invited.
|
||||
#[ruma_api(path)]
|
||||
@ -33,7 +32,6 @@ ruma_api! {
|
||||
pub third_party_signed: Option<ThirdPartySigned<'a>>,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The room that the user joined.
|
||||
pub room_id: RoomId,
|
||||
|
@ -16,14 +16,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to get the members of.
|
||||
#[ruma_api(path)]
|
||||
pub room_id: &'a RoomId,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A list of the rooms the user is in, i.e.
|
||||
/// the ID of each room in which the user has joined membership.
|
||||
|
@ -14,10 +14,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// A list of the rooms the user is in, i.e. the ID of each room in
|
||||
/// which the user has joined membership.
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to kick the user from.
|
||||
#[ruma_api(path)]
|
||||
@ -28,7 +27,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to leave.
|
||||
#[ruma_api(path)]
|
||||
@ -21,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to unban the user from.
|
||||
#[ruma_api(path)]
|
||||
@ -24,7 +23,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -19,7 +19,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room to get events from.
|
||||
#[ruma_api(path)]
|
||||
@ -64,7 +63,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The token the pagination starts from.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -16,14 +16,12 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose presence state will be retrieved.
|
||||
#[ruma_api(path)]
|
||||
pub user_id: &'a UserId,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The state message for this user if one was set.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose presence state will be updated.
|
||||
#[ruma_api(path)]
|
||||
@ -29,7 +28,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose avatar URL will be retrieved.
|
||||
#[ruma_api(path)]
|
||||
@ -21,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The user's avatar URL, if set.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose display name will be retrieved.
|
||||
#[ruma_api(path)]
|
||||
@ -21,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The user's display name, if set.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: false,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose profile will be retrieved.
|
||||
#[ruma_api(path)]
|
||||
@ -21,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The user's avatar URL, if set.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose avatar URL will be set.
|
||||
#[ruma_api(path)]
|
||||
@ -26,7 +25,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The user whose display name will be set.
|
||||
#[ruma_api(path)]
|
||||
@ -25,7 +24,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The scope to delete from. 'global' to specify global rules.
|
||||
#[ruma_api(path)]
|
||||
@ -30,7 +29,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -20,7 +20,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// Pagination token given to retrieve the next set of events.
|
||||
#[ruma_api(query)]
|
||||
@ -39,7 +38,6 @@ ruma_api! {
|
||||
pub only: Option<&'a str>
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The token to supply in the from param of the next /notifications request in order
|
||||
/// to request more events. If this is absent, there are no more results.
|
||||
|
@ -15,10 +15,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// An array containing the current pushers for the user.
|
||||
pub pushers: Vec<Pusher>
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The scope to fetch rules from. 'global' to specify global rules.
|
||||
#[ruma_api(path)]
|
||||
@ -30,7 +29,6 @@ ruma_api! {
|
||||
pub rule_id: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The specific push rule.
|
||||
#[ruma_api(body)]
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The scope to fetch a rule from. 'global' to specify global rules.
|
||||
#[ruma_api(path)]
|
||||
@ -30,7 +29,6 @@ ruma_api! {
|
||||
pub rule_id: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The actions to perform for this rule.
|
||||
pub actions: Vec<Action>
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The scope to fetch a rule from. 'global' to specify global rules.
|
||||
#[ruma_api(path)]
|
||||
@ -29,7 +28,6 @@ ruma_api! {
|
||||
pub rule_id: &'a str,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// Whether the push rule is enabled or not.
|
||||
pub enabled: bool,
|
||||
|
@ -14,10 +14,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The global ruleset.
|
||||
pub global: Ruleset,
|
||||
|
@ -14,10 +14,8 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {
|
||||
/// The global ruleset.
|
||||
#[ruma_api(body)]
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The pusher to configure.
|
||||
#[serde(flatten)]
|
||||
@ -28,7 +27,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The scope to set the rule in. 'global' to specify global rules.
|
||||
#[ruma_api(path)]
|
||||
@ -54,7 +53,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -15,7 +15,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The scope to fetch a rule from. 'global' to specify global rules.
|
||||
#[ruma_api(path)]
|
||||
@ -34,7 +33,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -14,7 +14,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The scope to fetch a rule from. 'global' to specify global rules.
|
||||
#[ruma_api(path)]
|
||||
@ -33,7 +32,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -13,7 +13,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[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 +32,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
@ -16,7 +16,6 @@ ruma_api! {
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
request: {
|
||||
/// The room in which to send the event.
|
||||
#[ruma_api(path)]
|
||||
@ -32,7 +31,6 @@ ruma_api! {
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
response: {}
|
||||
|
||||
error: crate::Error
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user