-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.ts
109 lines (95 loc) · 2.16 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
export const SET_MANGA_LIST = "SET_MANGA_LIST";
export const SET_BOOKS_BY_CATEGORY = "SET_BOOKS_BY_CATEGORY";
export const SET_BOOK = "SET_BOOK";
export const SET_SEARCH_WORD = "SET_SEARCH_WORD";
export const SET_CHAPTER_CONTENT = "SET_CHAPTER_CONTENT";
export const CLEAR_CHAPTER_CONTENT = "CLEAR_CHAPTER_CONTENT";
export const REVERSE_CHAPTERS = "REVERSE_CHAPTERS";
export interface IBookInfo extends IBookDetails {
contentColor: string;
imageBorderColor: string;
handlePress: () => {};
}
export interface IKeys {
i: string;
a: string;
c: [string];
h: number;
im?: string | null;
s: number;
t: string;
ld: number | undefined;
}
export interface IBookItems {
bookId: string;
title: string;
last_chapter_date: string;
image: string;
fetchBookDetails: (bookId: string) => {};
}
export interface IBook {
id: string;
alias: string;
categories: string[];
hits: number;
image: string;
status: number;
title: string;
last_chapter_date?: number;
}
export interface IBookDetails {
id: string;
author: string;
categories: string[];
chapters: [];
description: string;
image: string;
last_chapter_date: number;
released: number;
title: string;
url: string;
}
export interface IBookState {
allMangaBooks: IBook[];
searchWord: string;
categories: string[];
booksByCategory: IBook[];
bookDetails: IBookDetails;
chapterContent: string[];
}
interface ISetBooks {
type: typeof SET_MANGA_LIST;
books: IBook[];
categories: string[];
}
interface ISetBooksByCategory {
type: typeof SET_BOOKS_BY_CATEGORY;
booksByCategory: IBook[];
}
interface ISetBook {
type: typeof SET_BOOK;
bookDetails: IBookDetails;
}
interface ISetChapterContent {
type: typeof SET_CHAPTER_CONTENT;
chapterContent: string[];
}
interface IClearChapterContent {
type: typeof CLEAR_CHAPTER_CONTENT;
}
interface IReverseChapters {
type: typeof REVERSE_CHAPTERS;
bookDetails: IBookDetails;
}
interface ISetSearchWord {
type: typeof SET_SEARCH_WORD;
searchWord: string;
}
export type BookActionsType =
| ISetBooks
| ISetBooksByCategory
| ISetBook
| ISetChapterContent
| IClearChapterContent
| IReverseChapters
| ISetSearchWord;