tachiyomi-extensions-inspector/webUI/react/src/typings.d.ts

155 lines
2.7 KiB
TypeScript
Raw Normal View History

/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
2021-01-26 21:02:12 +01:00
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
2020-12-24 16:50:50 +01:00
interface IExtension {
name: string
pkgName: string
2020-12-24 16:50:50 +01:00
versionName: string
versionCode: number
lang: string
isNsfw: boolean
2020-12-25 00:38:08 +01:00
apkName: string
iconUrl: string
2021-03-29 00:17:51 +02:00
installed: boolean
hasUpdate: boolean
2021-03-29 00:17:51 +02:00
obsolete: boolean
2020-12-24 16:50:50 +01:00
}
2020-12-25 04:06:34 +01:00
interface ISource {
2020-12-25 19:44:54 +01:00
id: string
2020-12-25 04:06:34 +01:00
name: string
lang: string
iconUrl: string
supportsLatest: boolean
2020-12-25 19:44:54 +01:00
history: any
2020-12-25 04:06:34 +01:00
}
2020-12-25 17:42:22 +01:00
interface IMangaCard {
id: number
title: string
thumbnailUrl: string
}
2020-12-25 17:42:22 +01:00
interface IManga {
2021-01-19 17:50:28 +01:00
id: number
sourceId: string
url: string
2020-12-25 19:44:54 +01:00
title: string
thumbnailUrl: string
artist: string
author: string
description: string
genre: string
status: string
inLibrary: boolean
source: ISource
freshData: boolean
2020-12-25 17:42:22 +01:00
}
2021-01-19 18:32:57 +01:00
interface IChapter {
url: string
name: string
2021-05-11 16:15:53 +02:00
uploadDate: number
chapterNumber: number
2021-01-19 18:32:57 +01:00
scanlator: String
2021-01-19 21:34:12 +01:00
mangaId: number
2021-05-11 16:15:53 +02:00
read: boolean
bookmarked: boolean
lastPageRead: number
2021-05-14 15:01:07 +02:00
index: number
2021-03-23 00:20:55 +01:00
chapterCount: number
2021-02-04 01:12:30 +01:00
pageCount: number
2021-01-19 18:32:57 +01:00
}
2021-02-19 22:53:52 +01:00
2021-05-27 14:43:22 +02:00
interface IEpisode {
url: string
name: string
uploadDate: number
episodeNumber: number
scanlator: String
animeId: number
read: boolean
bookmarked: boolean
lastPageRead: number
index: number
episodeCount: number
2021-05-27 16:07:45 +02:00
linkUrl: string
2021-05-27 14:43:22 +02:00
}
2021-03-23 00:20:55 +01:00
interface IPartialChpter {
pageCount: number
2021-05-14 15:01:07 +02:00
index: number
2021-03-23 00:20:55 +01:00
chapterCount: number
}
2021-05-27 16:07:45 +02:00
interface IPartialEpisode {
linkUrl: string
index: number
episodeCount: number
}
2021-02-19 22:53:52 +01:00
interface ICategory {
id: number
order: number
name: String
default: boolean
2021-02-19 22:53:52 +01:00
}
2021-03-18 19:16:24 +01:00
interface INavbarOverride {
status: boolean
value: any
2021-03-29 00:17:51 +02:00
}
2021-05-15 14:48:57 +02:00
2021-05-15 20:52:37 +02:00
type ReaderType =
'ContinuesVertical'|
'Webtoon' |
'SingleVertical' |
'SingleRTL' |
'SingleLTR' |
'DoubleVertical' |
'DoubleRTL' |
'DoubleLTR' |
2021-05-15 20:52:37 +02:00
'ContinuesHorizontal';
2021-05-15 14:48:57 +02:00
interface IReaderSettings{
staticNav: boolean
showPageNumber: boolean
loadNextonEnding: boolean
2021-05-15 20:52:37 +02:00
readerType: ReaderType
2021-05-15 14:48:57 +02:00
}
interface IReaderPage {
index: number
src: string
}
2021-05-15 20:52:37 +02:00
interface IReaderProps {
pages: Array<IReaderPage>
pageCount: number
setCurPage: React.Dispatch<React.SetStateAction<number>>
curPage: number
settings: IReaderSettings
manga: IMangaCard | IManga
chapter: IChapter | IPartialChpter
nextChapter: () => void
prevChapter: () => void
2021-05-15 20:52:37 +02:00
}
2021-05-25 18:36:27 +02:00
interface IAbout {
name: string
version: string
revision: string
buildType: 'Stable' | 'Preview'
buildTime: number
github: string
discord: string
}