added more support for supabase-js
This commit is contained in:
@@ -13,7 +13,9 @@ pub struct User {
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub updated_at: DateTime<Utc>,
|
||||
pub last_sign_in_at: Option<DateTime<Utc>>,
|
||||
#[serde(rename = "app_metadata")]
|
||||
pub raw_app_meta_data: serde_json::Value,
|
||||
#[serde(rename = "user_metadata")]
|
||||
pub raw_user_meta_data: serde_json::Value,
|
||||
pub is_super_admin: Option<bool>,
|
||||
pub confirmed_at: Option<DateTime<Utc>>,
|
||||
@@ -62,3 +64,25 @@ pub struct RefreshToken {
|
||||
pub parent: Option<String>,
|
||||
pub session_id: Option<Uuid>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Validate)]
|
||||
pub struct RecoverRequest {
|
||||
#[validate(email)]
|
||||
pub email: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct VerifyRequest {
|
||||
pub r#type: String, // signup, recovery, magiclink, invite
|
||||
pub token: String,
|
||||
pub password: Option<String>, // for recovery flow
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Validate)]
|
||||
pub struct UserUpdateRequest {
|
||||
#[validate(email)]
|
||||
pub email: Option<String>,
|
||||
#[validate(length(min = 6, message = "Password must be at least 6 characters"))]
|
||||
pub password: Option<String>,
|
||||
pub data: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user