feat: Initial commit - Base application with Next.js - Configuration, Auth, Library navigation, CBZ/CBR reader, Cache, Responsive design
This commit is contained in:
100
src/types/komga.ts
Normal file
100
src/types/komga.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
export interface KomgaUser {
|
||||
id: string;
|
||||
email: string;
|
||||
roles: KomgaRole[];
|
||||
sharedAllLibraries: boolean;
|
||||
sharedLibrariesIds: string[];
|
||||
authenticated: boolean;
|
||||
authorities: string[];
|
||||
}
|
||||
|
||||
export type KomgaRole = "ROLE_ADMIN" | "ROLE_USER";
|
||||
|
||||
export interface KomgaLibrary {
|
||||
id: string;
|
||||
name: string;
|
||||
root: string;
|
||||
importLastModified: string;
|
||||
lastModified: string;
|
||||
unavailable: boolean;
|
||||
}
|
||||
|
||||
export interface KomgaSeries {
|
||||
id: string;
|
||||
libraryId: string;
|
||||
name: string;
|
||||
url: string;
|
||||
created: string;
|
||||
lastModified: string;
|
||||
fileLastModified: string;
|
||||
booksCount: number;
|
||||
booksReadCount: number;
|
||||
booksUnreadCount: number;
|
||||
metadata: SeriesMetadata;
|
||||
booksMetadata: BooksMetadata;
|
||||
}
|
||||
|
||||
export interface SeriesMetadata {
|
||||
status: "ENDED" | "ONGOING" | "ABANDONED" | "HIATUS";
|
||||
title: string;
|
||||
titleSort: string;
|
||||
summary: string;
|
||||
publisher: string;
|
||||
readingDirection: "LEFT_TO_RIGHT" | "RIGHT_TO_LEFT" | "VERTICAL" | "WEBTOON";
|
||||
ageRating: number | null;
|
||||
language: string;
|
||||
genres: string[];
|
||||
tags: string[];
|
||||
}
|
||||
|
||||
export interface BooksMetadata {
|
||||
created: string;
|
||||
lastModified: string;
|
||||
authors: Author[];
|
||||
}
|
||||
|
||||
export interface Author {
|
||||
name: string;
|
||||
role: string;
|
||||
}
|
||||
|
||||
export interface ReadProgress {
|
||||
booksCount: number;
|
||||
booksReadCount: number;
|
||||
booksUnreadCount: number;
|
||||
booksInProgressCount: number;
|
||||
completed: boolean;
|
||||
}
|
||||
|
||||
export interface KomgaBook {
|
||||
id: string;
|
||||
seriesId: string;
|
||||
seriesTitle: string;
|
||||
name: string;
|
||||
url: string;
|
||||
number: number;
|
||||
created: string;
|
||||
lastModified: string;
|
||||
fileLastModified: string;
|
||||
sizeBytes: number;
|
||||
size: string;
|
||||
media: BookMedia;
|
||||
metadata: BookMetadata;
|
||||
}
|
||||
|
||||
export interface BookMedia {
|
||||
status: "READY" | "UNKNOWN" | "ERROR";
|
||||
mediaType: string;
|
||||
pagesCount: number;
|
||||
}
|
||||
|
||||
export interface BookMetadata {
|
||||
title: string;
|
||||
titleSort: string;
|
||||
summary: string;
|
||||
number: string;
|
||||
authors: Author[];
|
||||
tags: string[];
|
||||
releaseDate: string;
|
||||
isbn: string;
|
||||
}
|
||||
Reference in New Issue
Block a user