Release: NX9-Auth v0.3.0

This commit is contained in:
thakares committed 2026-07-22 19:36:22 +05:30
1 parent 6a04d7f793
commit d93f2cef95
92 files changed
+2418 -1143

No files matched your search

+14
View File
@@ -38,6 +38,20 @@ impl std::fmt::Display for AuditSeverity {
}
}
/// Filtered audit log query. All filters are optional.
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct AuditFilter {
pub actor_user_id: Option<String>,
pub action: Option<String>,
pub resource_type: Option<String>,
pub severity: Option<String>,
pub since: Option<String>,
pub until: Option<String>,
pub search: Option<String>,
pub limit: i64,
pub offset: i64,
}
/// A row from the `audit_logs` table.
#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
pub struct AuditLog {
+6 -4
View File
@@ -1,7 +1,9 @@
pub mod api_token;
pub mod application;
pub mod audit_log;
pub mod group;
pub mod permission;
pub mod refresh_token;
pub mod role;
pub mod service_account;
pub mod session;
@@ -10,13 +12,13 @@ pub mod user;
pub use api_token::ApiToken;
pub use application::Application;
pub use audit_log::{AuditLog, AuditSeverity};
pub use audit_log::{AuditFilter, AuditLog, AuditSeverity};
pub use group::Group;
#[allow(unused_imports)]
pub use permission::Permission;
pub use refresh_token::RefreshToken;
pub use role::Role;
pub use service_account::ServiceAccount;
pub use session::Session;
pub use tenant::Tenant;
pub use user::{User, UserStatus};
pub mod group;
pub use group::Group;
pub use user::{User, UserProfile, UserStatus};
+10
View File
@@ -57,6 +57,16 @@ pub struct User {
pub updated_at: String,
}
/// User profile fields from `user_profiles`.
#[derive(Debug, Clone, FromRow, Serialize, Deserialize)]
pub struct UserProfile {
pub user_id: String,
pub email: Option<String>,
pub full_name: Option<String>,
pub avatar_url: Option<String>,
pub metadata_json: Option<String>,
}
impl User {
/// Typed status accessor.
pub fn status(&self) -> UserStatus {