types: Expand ReaderMetadata interface to match server API schema
- Add comprehensive metadata fields from server response (30+ properties) - Include core identification fields (id, media_item_id, library_id) - Add content metadata (description, ISBN, series, tags, publisher, etc.) - Add format identification (format_group, mime_type, file_path, file_size) - Add library classification (library_type_name, library_type) - Add comic/manga specific fields (manga_type, reading_direction, series_count) - Add additional metadata (age_rating, community_rating, story_arc, etc.) - Add timestamps (created_at, updated_at) - Maintain backward compatibility with existing properties This aligns the TypeScript interface with the actual server API response structure, preventing type mismatches and improving type safety across the reader codebase. Related to: Reader type system improvements
This commit is contained in:
Vendored
+48
-3
@@ -72,15 +72,60 @@ interface ParserCapabilities {
|
||||
// ============================================================
|
||||
|
||||
interface ReaderMetadata {
|
||||
// Core identification
|
||||
id: string;
|
||||
media_item_id: string;
|
||||
library_id: string;
|
||||
|
||||
// Content metadata
|
||||
title: string;
|
||||
author: string;
|
||||
cover_image_path: string;
|
||||
format_group: "reflowable" | "fixed_layout" | "comic_archive" | "unkown";
|
||||
library_type_name: "ebooks" | "comics" | "manga" | "pdf";
|
||||
description: string;
|
||||
isbn: string;
|
||||
series: string;
|
||||
series_number: number;
|
||||
tags: string[];
|
||||
asin: string;
|
||||
date_published: string;
|
||||
publisher: string;
|
||||
contributors: string[];
|
||||
language: string;
|
||||
edition: string;
|
||||
page_count: number;
|
||||
genre: string;
|
||||
|
||||
// Format identification
|
||||
format_group: string;
|
||||
mime_type: string;
|
||||
manga_type: "unknown" | "no" | "yes" | "yes_and_right_to_left";
|
||||
file_path: string;
|
||||
file_size: number;
|
||||
|
||||
// Library classification
|
||||
library_type_name: string;
|
||||
library_type: string;
|
||||
|
||||
// Comic/Manga specific
|
||||
manga_type: string;
|
||||
reading_direction: string;
|
||||
series_count: number;
|
||||
|
||||
// Additional metadata from server
|
||||
volume: number;
|
||||
imprint: string;
|
||||
age_rating: string;
|
||||
web_url: string;
|
||||
metadata_notes: string;
|
||||
community_rating: number;
|
||||
story_arc: string;
|
||||
is_black_and_white: boolean;
|
||||
alternate_info: string;
|
||||
scan_information: string;
|
||||
summary: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
|
||||
// Progress tracking
|
||||
chapter_metadata?: ChapterMetadata;
|
||||
total_pages?: number;
|
||||
saved_progress?: {
|
||||
|
||||
Reference in New Issue
Block a user