92 lines
1.9 KiB
TypeScript
92 lines
1.9 KiB
TypeScript
import {Shelf} from './shelf.model';
|
|
|
|
export type BookType = "PDF" | "EPUB";
|
|
|
|
export interface Book {
|
|
id: number;
|
|
bookType: BookType;
|
|
libraryId: number;
|
|
metadata?: BookMetadata;
|
|
shelves?: Shelf[];
|
|
lastReadTime?: string;
|
|
addedOn?: string;
|
|
epubProgress?: string;
|
|
pdfProgress?: number;
|
|
filePath?: string;
|
|
}
|
|
|
|
export interface BookMetadata {
|
|
bookId: number;
|
|
title: string;
|
|
subtitle?: string;
|
|
publisher?: string;
|
|
publishedDate?: string;
|
|
description?: string;
|
|
seriesName?: string;
|
|
seriesNumber?: number | null;
|
|
seriesTotal?: number | null;
|
|
isbn13?: string;
|
|
isbn10?: string;
|
|
asin?: string;
|
|
pageCount?: number | null;
|
|
language?: string;
|
|
rating?: number | null;
|
|
reviewCount?: number | null;
|
|
coverUpdatedOn?: string;
|
|
authors: string[];
|
|
categories: string[];
|
|
awards?: Award[];
|
|
provider?: string;
|
|
providerBookId?: string;
|
|
thumbnailUrl?: string | null;
|
|
|
|
allFieldsLocked?: boolean;
|
|
titleLocked?: boolean;
|
|
subtitleLocked?: boolean;
|
|
publisherLocked?: boolean;
|
|
publishedDateLocked?: boolean;
|
|
descriptionLocked?: boolean;
|
|
seriesNameLocked?: boolean;
|
|
seriesNumberLocked?: boolean;
|
|
seriesTotalLocked?: boolean;
|
|
isbn13Locked?: boolean;
|
|
isbn10Locked?: boolean;
|
|
asinLocked?: boolean;
|
|
pageCountLocked?: boolean;
|
|
languageLocked?: boolean;
|
|
ratingLocked?: boolean;
|
|
reviewCountLocked?: boolean;
|
|
coverUpdatedOnLocked?: boolean;
|
|
authorsLocked?: boolean;
|
|
categoriesLocked?: boolean;
|
|
awardsLocked?: boolean;
|
|
coverLocked?: boolean;
|
|
|
|
[key: string]: any;
|
|
}
|
|
|
|
export interface Award {
|
|
name: string;
|
|
category: string;
|
|
designation: string;
|
|
awardedAt: string;
|
|
}
|
|
|
|
export interface PdfViewerSetting {
|
|
zoom: string | number;
|
|
spread: 'off' | 'even' | 'odd';
|
|
}
|
|
|
|
export interface EpubViewerSetting {
|
|
theme: string;
|
|
font: string;
|
|
fontSize: number;
|
|
}
|
|
|
|
export interface BookSetting {
|
|
pdfSettings?: PdfViewerSetting;
|
|
epubSettings?: EpubViewerSetting;
|
|
|
|
[key: string]: any;
|
|
}
|