feat: ajout des services spécialisés (base, book, home, library, series) et des types associés

This commit is contained in:
Julien Froidefond
2025-02-12 08:47:13 +01:00
parent 2fa96072e8
commit 545f44749a
7 changed files with 405 additions and 0 deletions

37
src/types/library.ts Normal file
View File

@@ -0,0 +1,37 @@
export interface Library {
id: string;
name: string;
root: string;
importLastModified: string;
lastModified: string;
unavailable: boolean;
}
export interface LibraryResponse<T> {
content: T[];
empty: boolean;
first: boolean;
last: boolean;
number: number;
numberOfElements: number;
pageable: {
offset: number;
pageNumber: number;
pageSize: number;
paged: boolean;
sort: {
empty: boolean;
sorted: boolean;
unsorted: boolean;
};
unpaged: boolean;
};
size: number;
sort: {
empty: boolean;
sorted: boolean;
unsorted: boolean;
};
totalElements: number;
totalPages: number;
}

50
src/types/series.ts Normal file
View File

@@ -0,0 +1,50 @@
export interface Series {
id: string;
libraryId: string;
name: string;
url: string;
created: string;
lastModified: string;
fileLastModified: string;
booksCount: number;
booksReadCount: number;
booksUnreadCount: number;
booksInProgressCount: number;
metadata: {
status: string;
created: string;
lastModified: string;
title: string;
titleSort: string;
summary: string;
readingDirection: string;
publisher: string;
ageRating: number;
language: string;
genres: string[];
tags: string[];
totalBookCount: number;
sharingLabels: string[];
links: Array<{
label: string;
url: string;
}>;
alternateTitles: string[];
};
booksMetadata: {
status: string;
created: string;
lastModified: string;
title: string;
titleSort: string;
summary: string;
number: string;
numberSort: number;
releaseDate: string;
authors: Array<{
name: string;
role: string;
}>;
};
deleted: boolean;
}