client-api: Allow custom values for ThirdPartyIdRemovalStatus

This commit is contained in:
Jonas Platte 2020-12-02 18:53:55 +01:00
parent e7b5a533d6
commit 8427f51ebd
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -18,8 +18,8 @@ pub mod unbind_3pid;
pub mod whoami; pub mod whoami;
use ruma_serde::Outgoing; use ruma_serde::{Outgoing, StringEnum};
use serde::{Deserialize, Serialize}; use serde::Serialize;
/// Additional authentication information for requestToken endpoints. /// Additional authentication information for requestToken endpoints.
#[derive(Clone, Debug, Outgoing, Serialize)] #[derive(Clone, Debug, Outgoing, Serialize)]
@ -40,9 +40,9 @@ impl<'a> IdentityServerInfo<'a> {
} }
} }
/// Possible values for deleting or unbinding 3PIDs /// Possible values for deleting or unbinding 3PIDs.
#[derive(Clone, Copy, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, StringEnum)]
#[serde(rename_all = "kebab-case")] #[ruma_enum(rename_all = "kebab-case")]
pub enum ThirdPartyIdRemovalStatus { pub enum ThirdPartyIdRemovalStatus {
/// Either the homeserver couldn't determine the right identity server to contact, or the /// Either the homeserver couldn't determine the right identity server to contact, or the
/// identity server refused the operation. /// identity server refused the operation.
@ -50,4 +50,7 @@ pub enum ThirdPartyIdRemovalStatus {
/// Success. /// Success.
Success, Success,
#[doc(hidden)]
_Custom(String),
} }