- split FederationRepository into FollowRepository, ActorRepository, BlocklistRepository, ActivityRepository
- RemoteActor: 5 new fields (bio, banner_url, followers_url, following_url, also_known_as)
- ApObjectHandler split: get_local_objects_page/count_local_posts → ApContentReader trait
- builder API: positional args → named setters
- broadcast_create_note/update_note: add ApVisibility + mentioned_inboxes params
- backfill_outbox → import_remote_outbox
- ApUser: also_known_as Option<String> → Vec<String>, new fields
AP gaps fixed:
- add GET /users/{id}/followers + /following with content negotiation
- wire EventPublisher into builder via FederationEventBridge adapter
- add display_name field full stack (domain→DB→API→AP)
- DB-side outbox pagination (get_local_reviews_page)
- set featured_url on ApUser
106 lines
2.3 KiB
Rust
106 lines
2.3 KiB
Rust
use chrono::NaiveDateTime;
|
|
use domain::models::{FieldMapping, FileFormat, UserRole};
|
|
use uuid::Uuid;
|
|
|
|
pub struct MovieInput {
|
|
pub movie_id: Option<Uuid>,
|
|
pub external_metadata_id: Option<String>,
|
|
pub manual_title: Option<String>,
|
|
pub manual_release_year: Option<u16>,
|
|
pub manual_director: Option<String>,
|
|
}
|
|
|
|
pub struct LogReviewCommand {
|
|
pub user_id: Uuid,
|
|
pub input: MovieInput,
|
|
pub rating: u8,
|
|
pub comment: Option<String>,
|
|
pub watched_at: NaiveDateTime,
|
|
}
|
|
|
|
#[derive(Clone)]
|
|
pub struct SyncPosterCommand {
|
|
pub movie_id: Uuid,
|
|
pub external_metadata_id: String,
|
|
}
|
|
|
|
pub struct RegisterCommand {
|
|
pub email: String,
|
|
pub username: String,
|
|
pub password: String,
|
|
pub role: UserRole,
|
|
}
|
|
|
|
pub struct DeleteReviewCommand {
|
|
pub review_id: Uuid,
|
|
pub requesting_user_id: Uuid,
|
|
}
|
|
|
|
// FileFormat is now in domain::models — no longer defined here
|
|
|
|
pub struct CreateImportSessionCommand {
|
|
pub user_id: Uuid,
|
|
pub bytes: Vec<u8>,
|
|
pub format: FileFormat,
|
|
}
|
|
|
|
pub struct ApplyImportMappingCommand {
|
|
pub user_id: Uuid,
|
|
pub session_id: Uuid,
|
|
pub mappings: Vec<FieldMapping>,
|
|
}
|
|
|
|
pub struct ExecuteImportCommand {
|
|
pub user_id: Uuid,
|
|
pub session_id: Uuid,
|
|
pub confirmed_indices: Vec<usize>,
|
|
}
|
|
|
|
pub struct SaveImportProfileCommand {
|
|
pub user_id: Uuid,
|
|
pub session_id: Uuid,
|
|
pub name: String,
|
|
}
|
|
|
|
pub struct ApplyImportProfileCommand {
|
|
pub user_id: Uuid,
|
|
pub session_id: Uuid,
|
|
pub profile_id: Uuid,
|
|
}
|
|
|
|
pub struct DeleteImportProfileCommand {
|
|
pub user_id: Uuid,
|
|
pub profile_id: Uuid,
|
|
}
|
|
|
|
pub struct UpdateProfileCommand {
|
|
pub user_id: Uuid,
|
|
pub display_name: Option<String>,
|
|
pub bio: Option<String>,
|
|
pub avatar_bytes: Option<Vec<u8>>,
|
|
pub avatar_content_type: Option<String>,
|
|
pub banner_bytes: Option<Vec<u8>>,
|
|
pub banner_content_type: Option<String>,
|
|
pub also_known_as: Option<String>,
|
|
}
|
|
|
|
pub struct UpdateProfileFieldsCommand {
|
|
pub user_id: Uuid,
|
|
pub fields: Vec<domain::models::ProfileField>,
|
|
}
|
|
|
|
pub struct EnrichMovieCommand {
|
|
pub movie_id: domain::value_objects::MovieId,
|
|
pub profile: domain::models::MovieProfile,
|
|
}
|
|
|
|
pub struct AddToWatchlistCommand {
|
|
pub user_id: Uuid,
|
|
pub input: MovieInput,
|
|
}
|
|
|
|
pub struct RemoveFromWatchlistCommand {
|
|
pub user_id: Uuid,
|
|
pub movie_id: Uuid,
|
|
}
|