-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.d.ts
74 lines (65 loc) · 1.05 KB
/
index.d.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
declare type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
declare interface Hadith {
id: number;
idInBook: number;
arabic: string;
english: {
narrator: string;
text: string;
};
chapterId: number;
bookId: number;
}
interface Introduction {
arabic: string;
english: string;
}
interface Chapter {
id: number;
bookId: number;
arabic: string;
english: string;
}
interface BookInfo {
title: string;
author: string;
introduction: string | undefined;
}
interface Metadata {
length: number;
arabic: Prettify<BookInfo>;
english: Prettify<BookInfo>;
}
interface ChapterFile {
metadata: Prettify<Metadata>;
hadiths: Hadith[];
chapter: Chapter | undefined;
}
interface BookMetadata extends Metadata {
id: number;
}
interface BookFile {
id: number;
metadata: Prettify<BookMetadata>;
chapters: Chapter[];
hadiths: Hadith[];
}
interface ScrapedBook {
id: number;
arabic: {
title: string;
author: string;
};
english: {
title: string;
author: string;
};
length?: number;
path: string[];
route: {
base: string;
chapters: string[];
};
}