use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub struct AppleS2SNERequest {
pub iss: String,
pub aud: String,
pub iat: u64,
pub jti: String,
pub events: Vec<AppleS2SNEEvent>,
}
#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub struct AppleS2SNEEvent {
#[serde(rename = "type")]
pub event_type: AppleS2SNEEventType,
pub sub: String,
pub email: Option<String>,
pub is_private_email: Option<bool>,
pub event_time: u64,
}
#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub enum AppleS2SNEEventType {
#[serde(rename = "email-enabled")]
EmailEnabled,
#[serde(rename = "email-disabled")]
EmailDisabled,
#[serde(rename = "consent-revoked")]
ConsentRevoked,
#[serde(rename = "account-delete")]
AccountDelete,
}