Masked email: Fastmail's Masked Email API, MaskedEmail/get and /set (ME-1, ME-7a, ME-16)

Advertised as https://www.fastmail.com/dev/maskedemail in the session and on
every account that may hold masks. Masks created through it start pending
unless the create sets a state; pending can't be set again once left; state
and the other mutable fields map onto the same records the x: API uses.
This commit is contained in:
2026-09-18 16:29:47 -07:00
parent 7080028437
commit d04aafd3d7
16 changed files with 626 additions and 5 deletions
+15
View File
@@ -98,6 +98,7 @@ pub enum GetResponseMethod {
ParticipantIdentity(GetResponse<ParticipantIdentity>),
ShareNotification(GetResponse<ShareNotification>),
Registry(GetResponse<Registry>),
MaskedEmail(GetResponse<crate::object::fastmail_masked_email::FastmailMaskedEmail>),
}
#[derive(Debug, serde::Serialize)]
@@ -119,6 +120,7 @@ pub enum SetResponseMethod {
CalendarEventNotification(Box<SetResponse<CalendarEventNotification>>),
ParticipantIdentity(Box<SetResponse<ParticipantIdentity>>),
Registry(Box<SetResponse<Registry>>),
MaskedEmail(Box<SetResponse<crate::object::fastmail_masked_email::FastmailMaskedEmail>>),
}
#[derive(Debug, serde::Serialize)]
@@ -265,6 +267,19 @@ impl<'x> From<GetResponse<Sieve>> for ResponseMethod<'x> {
}
}
// inbuxa: Fastmail's MaskedEmail
impl<'x> From<GetResponse<crate::object::fastmail_masked_email::FastmailMaskedEmail>> for ResponseMethod<'x> {
fn from(value: GetResponse<crate::object::fastmail_masked_email::FastmailMaskedEmail>) -> Self {
ResponseMethod::Get(GetResponseMethod::MaskedEmail(value))
}
}
impl<'x> From<SetResponse<crate::object::fastmail_masked_email::FastmailMaskedEmail>> for ResponseMethod<'x> {
fn from(value: SetResponse<crate::object::fastmail_masked_email::FastmailMaskedEmail>) -> Self {
ResponseMethod::Set(SetResponseMethod::MaskedEmail(Box::new(value)))
}
}
impl<'x> From<GetResponse<VacationResponse>> for ResponseMethod<'x> {
fn from(value: GetResponse<VacationResponse>) -> Self {
ResponseMethod::Get(GetResponseMethod::VacationResponse(value))