remove OIDC/Postgres, replace ApiError w/ AppError, move params to api-types
This commit is contained in:
@@ -17,6 +17,11 @@ pub struct ActivityEventResponse {
|
||||
pub channel_id: Option<Uuid>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
pub struct ActivityLogParams {
|
||||
pub limit: Option<u32>,
|
||||
}
|
||||
|
||||
impl From<domain::ActivityEvent> for ActivityEventResponse {
|
||||
fn from(e: domain::ActivityEvent) -> Self {
|
||||
Self {
|
||||
|
||||
7
crates/api-types/src/iptv.rs
Normal file
7
crates/api-types/src/iptv.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
use serde::Deserialize;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
pub struct IptvParams {
|
||||
pub token: Option<String>,
|
||||
}
|
||||
@@ -3,12 +3,13 @@ pub mod auth;
|
||||
pub mod channels;
|
||||
pub mod common;
|
||||
pub mod config;
|
||||
pub mod iptv;
|
||||
pub mod library;
|
||||
pub mod providers;
|
||||
pub mod schedule;
|
||||
pub mod transcode;
|
||||
|
||||
pub use admin::{ActivityEventResponse, SettingsResponse};
|
||||
pub use admin::{ActivityEventResponse, ActivityLogParams, SettingsResponse};
|
||||
pub use auth::{LoginRequest, RefreshRequest, RegisterRequest, TokenResponse, UserResponse};
|
||||
pub use channels::{
|
||||
ChannelResponse, ConfigSnapshotResponse, CreateChannelRequest, PatchSnapshotRequest,
|
||||
@@ -16,7 +17,11 @@ pub use channels::{
|
||||
};
|
||||
pub use common::{ErrorResponse, PaginatedResponse};
|
||||
pub use config::{ConfigResponse, ProviderCapabilitiesResponse, ProviderInfo};
|
||||
pub use library::{CollectionResponse, LibraryItemResponse, SeasonResponse, ShowResponse};
|
||||
pub use iptv::IptvParams;
|
||||
pub use library::{
|
||||
CollectionResponse, GenresParams, LibraryItemResponse, LibrarySearchParams, ProviderParam,
|
||||
SeasonResponse, SeasonsParams, ShowResponse, ShowsParams,
|
||||
};
|
||||
pub use providers::{ProviderConfigRequest, ProviderConfigResponse};
|
||||
pub use schedule::{
|
||||
CurrentBroadcastResponse, MediaItemResponse, ScheduleHistoryEntry, ScheduleResponse,
|
||||
|
||||
@@ -102,3 +102,44 @@ impl From<domain::SeasonSummary> for SeasonResponse {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
pub struct LibrarySearchParams {
|
||||
pub provider: Option<String>,
|
||||
pub content_type: Option<String>,
|
||||
#[serde(default, rename = "genres[]")]
|
||||
pub genres: Vec<String>,
|
||||
pub search_term: Option<String>,
|
||||
pub collection_id: Option<String>,
|
||||
#[serde(default, rename = "series_names[]")]
|
||||
pub series_names: Vec<String>,
|
||||
pub season_number: Option<u32>,
|
||||
pub decade: Option<u16>,
|
||||
pub offset: Option<u32>,
|
||||
pub limit: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
pub struct ProviderParam {
|
||||
pub provider: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
pub struct ShowsParams {
|
||||
pub provider: Option<String>,
|
||||
pub search_term: Option<String>,
|
||||
#[serde(default, rename = "genres[]")]
|
||||
pub genres: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
pub struct SeasonsParams {
|
||||
pub series_name: String,
|
||||
pub provider: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, ToSchema)]
|
||||
pub struct GenresParams {
|
||||
pub content_type: Option<String>,
|
||||
pub provider: Option<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user