This commit is contained in:
2025-04-01 04:13:50 +02:00
parent 48b669dc07
commit 6b10aa8926
125 changed files with 6059 additions and 329 deletions

View File

@ -0,0 +1,4 @@
export enum LibraryType {
Komga = "Komga",
Kavita = "Kavita"
}

View File

@ -0,0 +1,7 @@
export enum MangaReleaseStatus {
Continuing = "Continuing",
Completed = "Completed",
OnHiatus = "OnHiatus",
Cancelled = "Cancelled",
Unreleased = "Unreleased",
}

View File

@ -0,0 +1,8 @@
export enum RequestLimitType {
Default = "Default",
MangaDexFeed = "MangaDexFeed",
MangaImage = "MangaImage",
MangaCover = "MangaCover",
MangaDexImage = "MangaDexImage",
MangaInfo = "MangaInfo"
}

View File

@ -0,0 +1,4 @@
export default interface IAuthor {
authorId: string;
authorName: string;
}

View File

@ -0,0 +1,18 @@
export default interface IBackendSettings {
downloadLocation: string;
workingDirectory: string;
userAgent: string;
aprilFoolsMode: boolean;
requestLimits: {
Default: number,
MangaInfo: number,
MangaDexFeed: number,
MangaDexImage: number,
MangaImage: number,
MangaCover: number,
};
compression: number;
bwImages: boolean;
startNewJobTimeoutMs: number;
chapterNamingScheme: string;
}

View File

@ -0,0 +1,10 @@
export default interface IChapter{
chapterId: string;
volumeNumber: number;
chapterNumber: string;
url: string;
title: string | undefined;
archiveFileName: string;
downloaded: boolean;
parentMangaId: string;
}

View File

@ -0,0 +1,4 @@
export default interface IFrontendSettings {
jobInterval: Date;
apiUri: string;
}

View File

@ -0,0 +1,8 @@
import {LibraryType} from "./EnumLibraryType";
export default interface ILibraryConnector {
libraryConnectorId: string;
libraryType: LibraryType;
baseUrl: string;
auth: string;
}

View File

@ -0,0 +1,5 @@
export default interface ILink {
linkId: string;
linkProvider: string;
linkUrl: string;
}

View File

@ -0,0 +1,5 @@
export default interface ILocalLibrary {
localLibraryId: string;
basePath: string;
libraryName: string;
}

View File

@ -0,0 +1,19 @@
import {MangaReleaseStatus} from "./EnumMangaReleaseStatus";
export default interface IManga{
mangaId: string;
idOnConnectorSite: string;
name: string;
description: string;
websiteUrl: string;
year: number;
originalLanguage: string;
releaseStatus: MangaReleaseStatus;
folderName: string;
ignoreChapterBefore: number;
mangaConnectorId: string;
authorIds: string[];
tags: string[];
linkIds: string[];
altTitleIds: string[];
}

View File

@ -0,0 +1,5 @@
export default interface IMangaAltTitle {
altTitleId: string;
language: string;
title: string;
}

View File

@ -0,0 +1,7 @@
export default interface IMangaConnector {
name: string;
supportedLanguages: string[];
iconUrl: string;
baseUris: string[];
enabled: boolean;
}

View File

@ -0,0 +1,7 @@
export default interface INotificationConnector {
name: string;
url: string;
headers: Record<string, string>[];
httpMethod: string;
body: string;
}

View File

@ -0,0 +1,8 @@
export default interface IRequestLimits {
Default: number;
MangaDexFeed: number;
MangaImage: number;
MangaCover: number;
MangaDexImage: number;
MangaInfo: number;
}

View File

@ -0,0 +1,5 @@
import IJob from "./IJob";
export default interface IDownloadAvailableChaptersJob extends IJob {
mangaId: string;
}

View File

@ -0,0 +1,5 @@
import IJob from "./IJob";
export default interface IDownloadMangaCoverJob extends IJob {
mangaId: string;
}

View File

@ -0,0 +1,5 @@
import IJob from "./IJob";
export default interface IDownloadSingleChapterJob extends IJob {
chapterId: string;
}

View File

@ -0,0 +1,29 @@
export default interface IJob{
jobId: string;
parentJobId: string;
dependsOnJobIds: string[];
jobType: JobType;
recurrenceMs: number;
lastExecution: Date;
nextExecution: Date;
state: JobState;
enabled: boolean;
}
export enum JobType {
DownloadSingleChapterJob = "DownloadSingleChapterJob",
DownloadAvailableChaptersJob = "DownloadAvailableChaptersJob",
UpdateMetaDataJob = "UpdateMetaDataJob",
MoveFileOrFolderJob = "MoveFileOrFolderJob",
DownloadMangaCoverJob = "DownloadMangaCoverJob",
RetrieveChaptersJob = "RetrieveChaptersJob",
UpdateFilesDownloadedJob = "UpdateFilesDownloadedJob",
MoveMangaLibraryJob = "MoveMangaLibraryJob"
}
export enum JobState {
Waiting = "Waiting",
Running = "Running",
Completed = "Completed",
Failed = "Failed"
}

View File

@ -0,0 +1,6 @@
import IJob from "./IJob";
export default interface IMoveFileOrFolderJob extends IJob {
fromLocation: string;
toLocation: string;
}

View File

@ -0,0 +1,6 @@
import IJob from "./IJob";
export default interface IMoveMangaLibraryJob extends IJob {
MangaId: string;
ToLibraryId: string;
}

View File

@ -0,0 +1,5 @@
import IJob from "./IJob";
export default interface IRetrieveChaptersJob extends IJob {
mangaId: string;
}

View File

@ -0,0 +1,5 @@
import IJob from "./IJob";
export default interface IUpdateFilesDownloadedJob extends IJob {
mangaId: string;
}

View File

@ -0,0 +1,5 @@
import IJob from "./IJob";
export default interface IUpdateMetadataJob extends IJob {
mangaId: string;
}

View File

@ -0,0 +1,4 @@
export default interface IDownloadAvailableJobsRecord {
recurrenceTimeMs: number;
localLibraryId: string;
}

View File

@ -0,0 +1,8 @@
import "../../../styles/notificationConnector.css";
import {isValidUri} from "../../../App";
export default interface IGotifyRecord {
endpoint: string;
appToken: string;
priority: number;
}

View File

@ -0,0 +1,8 @@
import {ReactElement, useState} from "react";
import NotificationConnector from "../../api/NotificationConnector";
import Loader from "../../Loader";
import "../../../styles/notificationConnector.css";
export default interface ILunaseaRecord {
id: string;
}

View File

@ -0,0 +1,4 @@
export default interface IModifyJobRecord {
recurrenceMs: number;
enabled: boolean;
}

View File

@ -0,0 +1,12 @@
export default interface INewLibraryRecord {
path: string;
name: string;
}
export function Validate(record: INewLibraryRecord) : boolean {
if(record.path.length < 1)
return false;
if(record.name.length < 1)
return false;
return true;
}

View File

@ -0,0 +1,9 @@
import "../../../styles/notificationConnector.css";
export default interface INtfyRecord {
endpoint: string;
username: string;
password: string;
topic: string;
priority: number;
}

View File

@ -0,0 +1,6 @@
import "../../../styles/notificationConnector.css";
export default interface IPushoverRecord {
apptoken: string;
user: string;
}