Add the cast-allow block to zesdex-entities/src/lib.rs and zesdex-utils/src/lib.rs (which lacked it), then remove from 65 sub-files across all 8 crates. Build and all 223 tests continue to pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
62 lines
1.8 KiB
Rust
62 lines
1.8 KiB
Rust
//! IAM-specific HTTP / IPC DTOs (Data Transfer Objects).
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::domain::oauth::{OAuthConfig, OAuthToken};
|
|
use crate::domain::session::Session;
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Session DTOs
|
|
// ---------------------------------------------------------------------------
|
|
|
|
/// Request body for creating a new session.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct CreateSessionRequest {
|
|
pub title: String,
|
|
}
|
|
|
|
/// Response containing one session.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct SessionResponse {
|
|
pub session: Session,
|
|
}
|
|
|
|
/// Response containing a list of sessions.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct SessionListResponse {
|
|
pub sessions: Vec<Session>,
|
|
pub total: usize,
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// OAuth DTOs
|
|
// ---------------------------------------------------------------------------
|
|
|
|
/// Request body for starting an OAuth flow.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct OAuthStartRequest {
|
|
pub config: OAuthConfig,
|
|
pub redirect_uri: String,
|
|
}
|
|
|
|
/// Response containing the authorization URL and CSRF state for an OAuth flow.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct OAuthStartResponse {
|
|
pub auth_url: String,
|
|
pub state: String,
|
|
}
|
|
|
|
/// Request body for completing an OAuth flow with an authorization code.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct OAuthCompleteRequest {
|
|
pub config: OAuthConfig,
|
|
pub redirect_uri: String,
|
|
pub code: String,
|
|
pub state: String,
|
|
}
|
|
|
|
/// Response containing the acquired OAuth token.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct OAuthTokenResponse {
|
|
pub token: OAuthToken,
|
|
}
|