mgbuild 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/@types/index.d.ts +30 -0
- package/lib/data/tagMatcher.d.ts +7 -0
- package/lib/data/tagMatcherx.d.ts +7 -0
- package/lib/hqs/getHqAndChapters.d.ts +1 -0
- package/lib/hqs/getHqChapterById.d.ts +8 -0
- package/lib/hqs/getHqDetails.d.ts +1 -0
- package/lib/hqs/index.d.ts +5 -0
- package/lib/hqs/listHqIds.d.ts +5 -0
- package/lib/hqs/listUpdatedHqs.d.ts +6 -0
- package/lib/hqs/utils.d.ts +46 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +1 -0
- package/lib/mgs/md/core/predict.d.ts +3 -0
- package/lib/mgs/md/core/scraper.d.ts +35 -0
- package/lib/mgs/md/core/transform.d.ts +18 -0
- package/lib/mgs/md/core/utils.d.ts +38 -0
- package/lib/mgs/md/index.d.ts +22 -0
- package/lib/mgs/md/types/bulk-info.d.ts +112 -0
- package/lib/mgs/md/types/chapters.d.ts +59 -0
- package/lib/mgs/md/types/info.d.ts +77 -0
- package/lib/mgs/md/types/pages.d.ts +11 -0
- package/lib/mgs/md/types/recents.d.ts +134 -0
- package/lib/mgs/md/types/transform.d.ts +42 -0
- package/lib/utils/graphQLRequest.d.ts +7 -0
- package/lib/utils/tag.d.ts +2 -0
- package/lib/utils/tools.d.ts +21 -0
- package/lib/utils/type.d.ts +5 -0
- package/package.json +9 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChapterEndpointConfig, ChaptersEndpointConfig } from "./utils";
|
|
2
|
+
import type { GetMangaInfoResponse } from "../types/info";
|
|
3
|
+
import type { GetMangaChaptersResponse } from "../types/chapters";
|
|
4
|
+
import type { GetRecentChaptersResponse } from "../types/recents";
|
|
5
|
+
import type { GetChapterPagesResponse } from "../types/pages";
|
|
6
|
+
import { Languages } from "../../../utils/type";
|
|
7
|
+
export declare type Log = {
|
|
8
|
+
type: "ping" | "error";
|
|
9
|
+
method: string;
|
|
10
|
+
url: string;
|
|
11
|
+
time: string;
|
|
12
|
+
};
|
|
13
|
+
export declare type ChapterConfig = {
|
|
14
|
+
page?: number;
|
|
15
|
+
order?: "asc" | "desc";
|
|
16
|
+
};
|
|
17
|
+
export declare type Logger = (log: Log) => any;
|
|
18
|
+
export declare class BruteScraper {
|
|
19
|
+
private logger?;
|
|
20
|
+
constructor(logger?: Logger);
|
|
21
|
+
request<T>(url: string): Promise<T>;
|
|
22
|
+
getChapter(manga_id: string, config: ChapterEndpointConfig): Promise<GetMangaChaptersResponse | undefined>;
|
|
23
|
+
getChapterList(manga_id: string, config: ChaptersEndpointConfig): Promise<GetMangaChaptersResponse | undefined>;
|
|
24
|
+
getMangaInfo(manga_id: string): Promise<GetMangaInfoResponse | undefined>;
|
|
25
|
+
getChapterPages(chapter_id: string): Promise<GetChapterPagesResponse | undefined>;
|
|
26
|
+
getRecentChapters(language: Languages): Promise<{
|
|
27
|
+
recent: GetRecentChaptersResponse;
|
|
28
|
+
mangas: {
|
|
29
|
+
code: string;
|
|
30
|
+
cover: string;
|
|
31
|
+
title: string;
|
|
32
|
+
chapters: never[];
|
|
33
|
+
}[];
|
|
34
|
+
} | undefined>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { GetMangaInfoResponse } from "../types/info";
|
|
2
|
+
import type { GetMangaChaptersResponse } from "../types/chapters";
|
|
3
|
+
import type { GetRecentChaptersResponse } from "../types/recents";
|
|
4
|
+
import type { GetChapterPagesResponse } from "../types/pages";
|
|
5
|
+
import { Chapter, MangaInfo, Recent } from "../types/transform";
|
|
6
|
+
import { RecentScrapeList } from "../../../@types";
|
|
7
|
+
import { Languages } from "../../../utils/type";
|
|
8
|
+
export declare class Transform {
|
|
9
|
+
chapterList(response?: GetMangaChaptersResponse, language?: Languages, slug?: string): Chapter[];
|
|
10
|
+
mangaInfo(response?: GetMangaInfoResponse, language?: Languages): MangaInfo;
|
|
11
|
+
chapterPages(response?: GetChapterPagesResponse): {
|
|
12
|
+
pages: string[];
|
|
13
|
+
};
|
|
14
|
+
recentChapters(response?: {
|
|
15
|
+
recent: GetRecentChaptersResponse;
|
|
16
|
+
mangas: Recent[];
|
|
17
|
+
}): RecentScrapeList[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LanguageItem, Languages } from "../../../utils/type";
|
|
2
|
+
export declare const CHAPTERS_PER_PAGE = 96;
|
|
3
|
+
export declare function getPage(targetChapterPage: number): number;
|
|
4
|
+
export declare type ChapterEndpointConfig = {
|
|
5
|
+
number: number;
|
|
6
|
+
language: Languages;
|
|
7
|
+
};
|
|
8
|
+
export declare type ChaptersEndpointConfig = {
|
|
9
|
+
order: "asc" | "desc";
|
|
10
|
+
language: Languages;
|
|
11
|
+
page: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const endpoints: {
|
|
14
|
+
info: (manga_id: string) => string;
|
|
15
|
+
chapters: (manga_id: string, config: ChaptersEndpointConfig) => string;
|
|
16
|
+
chapter: (manga_id: string, config: ChapterEndpointConfig) => string;
|
|
17
|
+
pages: (chapter_id: string) => string;
|
|
18
|
+
recents: (language: Languages) => string;
|
|
19
|
+
bulkInfo: (manga_ids: string[]) => string;
|
|
20
|
+
};
|
|
21
|
+
export declare const headers: {
|
|
22
|
+
accept: string;
|
|
23
|
+
"accept-language": string;
|
|
24
|
+
origin: string;
|
|
25
|
+
priority: string;
|
|
26
|
+
referer: string;
|
|
27
|
+
"sec-ch-ua": string;
|
|
28
|
+
"sec-ch-ua-mobile": string;
|
|
29
|
+
"sec-ch-ua-platform": string;
|
|
30
|
+
"sec-fetch-dest": string;
|
|
31
|
+
"sec-fetch-mode": string;
|
|
32
|
+
"sec-fetch-site": string;
|
|
33
|
+
"sec-gpc": string;
|
|
34
|
+
"user-agent": string;
|
|
35
|
+
};
|
|
36
|
+
export declare function request<T>(url: string): Promise<T>;
|
|
37
|
+
export declare function getLanguageItem(data: LanguageItem, language: Languages): string;
|
|
38
|
+
export declare function cleanDescription(description: string): string | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Logger } from "./core/scraper";
|
|
2
|
+
import { Languages } from "../../utils/type";
|
|
3
|
+
declare type MangaConfig = {
|
|
4
|
+
full?: boolean;
|
|
5
|
+
last?: boolean;
|
|
6
|
+
language: Languages;
|
|
7
|
+
};
|
|
8
|
+
export declare class Scraper {
|
|
9
|
+
private bruteScraper;
|
|
10
|
+
private transform;
|
|
11
|
+
constructor(logger?: Logger);
|
|
12
|
+
private chapters;
|
|
13
|
+
manga(manga_id: string, config: MangaConfig): Promise<import("./types/transform").MangaInfo | undefined>;
|
|
14
|
+
chapter(manga_id: string, number: number, language: Languages): Promise<{
|
|
15
|
+
pages: string[];
|
|
16
|
+
} | undefined>;
|
|
17
|
+
chapterById(chapter_id: string): Promise<{
|
|
18
|
+
pages: string[];
|
|
19
|
+
}>;
|
|
20
|
+
recents(language: Languages): Promise<import("../../@types").RecentScrapeList[]>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export declare type GetBulkInfoResponse = {
|
|
2
|
+
result: string;
|
|
3
|
+
response: string;
|
|
4
|
+
data: Data[];
|
|
5
|
+
limit: number;
|
|
6
|
+
offset: number;
|
|
7
|
+
total: number;
|
|
8
|
+
};
|
|
9
|
+
declare type Data = {
|
|
10
|
+
id: string;
|
|
11
|
+
type: string;
|
|
12
|
+
attributes: Attributes;
|
|
13
|
+
relationships: Relationship[];
|
|
14
|
+
};
|
|
15
|
+
declare type Attributes = {
|
|
16
|
+
title: Title;
|
|
17
|
+
altTitles: AltTitle[];
|
|
18
|
+
description: Description;
|
|
19
|
+
isLocked: boolean;
|
|
20
|
+
links: Links;
|
|
21
|
+
originalLanguage: string;
|
|
22
|
+
lastVolume: string;
|
|
23
|
+
lastChapter: string;
|
|
24
|
+
publicationDemographic?: string;
|
|
25
|
+
status: string;
|
|
26
|
+
year: number;
|
|
27
|
+
contentRating: "erotica" | "safe" | "suggestive";
|
|
28
|
+
tags: Tag[];
|
|
29
|
+
state: string;
|
|
30
|
+
chapterNumbersResetOnNewVolume: boolean;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
version: number;
|
|
34
|
+
availableTranslatedLanguages: string[];
|
|
35
|
+
latestUploadedChapter: string;
|
|
36
|
+
};
|
|
37
|
+
declare type Title = {
|
|
38
|
+
en: string;
|
|
39
|
+
};
|
|
40
|
+
declare type AltTitle = {
|
|
41
|
+
en?: string;
|
|
42
|
+
"ko-ro"?: string;
|
|
43
|
+
ru?: string;
|
|
44
|
+
ja?: string;
|
|
45
|
+
ko?: string;
|
|
46
|
+
id?: string;
|
|
47
|
+
zh?: string;
|
|
48
|
+
th?: string;
|
|
49
|
+
"zh-hk"?: string;
|
|
50
|
+
el?: string;
|
|
51
|
+
"zh-ro"?: string;
|
|
52
|
+
vi?: string;
|
|
53
|
+
uk?: string;
|
|
54
|
+
tr?: string;
|
|
55
|
+
kk?: string;
|
|
56
|
+
bg?: string;
|
|
57
|
+
sl?: string;
|
|
58
|
+
"ja-ro"?: string;
|
|
59
|
+
};
|
|
60
|
+
declare type Description = {
|
|
61
|
+
en: string;
|
|
62
|
+
pt?: string;
|
|
63
|
+
"es-la"?: string;
|
|
64
|
+
"pt-br"?: string;
|
|
65
|
+
fr?: string;
|
|
66
|
+
ru?: string;
|
|
67
|
+
};
|
|
68
|
+
declare type Links = {
|
|
69
|
+
al: string;
|
|
70
|
+
ap: string;
|
|
71
|
+
bw?: string;
|
|
72
|
+
kt?: string;
|
|
73
|
+
mu: string;
|
|
74
|
+
nu?: string;
|
|
75
|
+
amz?: string;
|
|
76
|
+
cdj?: string;
|
|
77
|
+
ebj?: string;
|
|
78
|
+
mal?: string;
|
|
79
|
+
raw?: string;
|
|
80
|
+
engtl?: string;
|
|
81
|
+
};
|
|
82
|
+
declare type Tag = {
|
|
83
|
+
id: string;
|
|
84
|
+
type: string;
|
|
85
|
+
attributes: Attributes2;
|
|
86
|
+
relationships: any[];
|
|
87
|
+
};
|
|
88
|
+
declare type Attributes2 = {
|
|
89
|
+
name: Name;
|
|
90
|
+
description: object;
|
|
91
|
+
group: string;
|
|
92
|
+
version: number;
|
|
93
|
+
};
|
|
94
|
+
declare type Name = {
|
|
95
|
+
en: string;
|
|
96
|
+
};
|
|
97
|
+
declare type Relationship = {
|
|
98
|
+
id: string;
|
|
99
|
+
type: string;
|
|
100
|
+
attributes?: Attributes3;
|
|
101
|
+
related?: string;
|
|
102
|
+
};
|
|
103
|
+
declare type Attributes3 = {
|
|
104
|
+
description: string;
|
|
105
|
+
volume: string;
|
|
106
|
+
fileName: string;
|
|
107
|
+
locale: string;
|
|
108
|
+
createdAt: string;
|
|
109
|
+
updatedAt: string;
|
|
110
|
+
version: number;
|
|
111
|
+
};
|
|
112
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare type GetMangaChaptersResponse = {
|
|
2
|
+
result: string;
|
|
3
|
+
response: string;
|
|
4
|
+
data: Data[];
|
|
5
|
+
limit: number;
|
|
6
|
+
offset: number;
|
|
7
|
+
total: number;
|
|
8
|
+
last_page: number;
|
|
9
|
+
invalid_page: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare type Data = {
|
|
12
|
+
id: string;
|
|
13
|
+
type: string;
|
|
14
|
+
attributes: Attributes;
|
|
15
|
+
relationships: Relationship[];
|
|
16
|
+
};
|
|
17
|
+
declare type Attributes = {
|
|
18
|
+
volume?: string;
|
|
19
|
+
chapter: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
translatedLanguage: string;
|
|
22
|
+
externalUrl?: string;
|
|
23
|
+
publishAt: string;
|
|
24
|
+
readableAt: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
pages: number;
|
|
28
|
+
version: number;
|
|
29
|
+
};
|
|
30
|
+
declare type Relationship = {
|
|
31
|
+
id: string;
|
|
32
|
+
type: string;
|
|
33
|
+
attributes?: Attributes2;
|
|
34
|
+
};
|
|
35
|
+
declare type Attributes2 = {
|
|
36
|
+
username?: string;
|
|
37
|
+
roles?: string[];
|
|
38
|
+
version: number;
|
|
39
|
+
name?: string;
|
|
40
|
+
altNames?: any[];
|
|
41
|
+
locked?: boolean;
|
|
42
|
+
website?: string;
|
|
43
|
+
ircServer: any;
|
|
44
|
+
ircChannel: any;
|
|
45
|
+
discord?: string;
|
|
46
|
+
contactEmail?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
twitter?: string;
|
|
49
|
+
mangaUpdates?: string;
|
|
50
|
+
focusedLanguages?: string[];
|
|
51
|
+
official?: boolean;
|
|
52
|
+
verified?: boolean;
|
|
53
|
+
inactive?: boolean;
|
|
54
|
+
publishDelay: any;
|
|
55
|
+
exLicensed?: boolean;
|
|
56
|
+
createdAt?: string;
|
|
57
|
+
updatedAt?: string;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { LanguageItem } from "../../../utils/type";
|
|
2
|
+
export declare type GetMangaInfoResponse = {
|
|
3
|
+
result: string;
|
|
4
|
+
response: string;
|
|
5
|
+
data: Data;
|
|
6
|
+
};
|
|
7
|
+
declare type Data = {
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
attributes: Attributes;
|
|
11
|
+
relationships: Relationship[];
|
|
12
|
+
};
|
|
13
|
+
declare type Attributes = {
|
|
14
|
+
title: Title;
|
|
15
|
+
altTitles: AltTitle[];
|
|
16
|
+
description: Description;
|
|
17
|
+
isLocked: boolean;
|
|
18
|
+
links: Links;
|
|
19
|
+
originalLanguage: string;
|
|
20
|
+
lastVolume: string;
|
|
21
|
+
lastChapter: string;
|
|
22
|
+
publicationDemographic: any;
|
|
23
|
+
status: string;
|
|
24
|
+
year: number;
|
|
25
|
+
contentRating: "erotica" | "safe" | "suggestive";
|
|
26
|
+
tags: Tag[];
|
|
27
|
+
state: string;
|
|
28
|
+
chapterNumbersResetOnNewVolume: boolean;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
version: number;
|
|
32
|
+
availableTranslatedLanguages: string[];
|
|
33
|
+
latestUploadedChapter: string;
|
|
34
|
+
};
|
|
35
|
+
declare type Title = LanguageItem;
|
|
36
|
+
declare type AltTitle = LanguageItem;
|
|
37
|
+
declare type Description = LanguageItem;
|
|
38
|
+
declare type Links = {
|
|
39
|
+
al: string;
|
|
40
|
+
ap: string;
|
|
41
|
+
bw: string;
|
|
42
|
+
kt: string;
|
|
43
|
+
mu: string;
|
|
44
|
+
amz: string;
|
|
45
|
+
ebj: string;
|
|
46
|
+
mal: string;
|
|
47
|
+
raw: string;
|
|
48
|
+
engtl: string;
|
|
49
|
+
};
|
|
50
|
+
declare type Tag = {
|
|
51
|
+
id: string;
|
|
52
|
+
type: string;
|
|
53
|
+
attributes: Attributes2;
|
|
54
|
+
relationships: any[];
|
|
55
|
+
};
|
|
56
|
+
declare type Attributes2 = {
|
|
57
|
+
name: Name;
|
|
58
|
+
description: object;
|
|
59
|
+
group: string;
|
|
60
|
+
version: number;
|
|
61
|
+
};
|
|
62
|
+
declare type Name = {
|
|
63
|
+
en: string;
|
|
64
|
+
};
|
|
65
|
+
declare type Relationship = {
|
|
66
|
+
id: string;
|
|
67
|
+
type: string;
|
|
68
|
+
related?: string;
|
|
69
|
+
attributes: {
|
|
70
|
+
volume: string;
|
|
71
|
+
fileName: string;
|
|
72
|
+
locale: string;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export declare type GetRecentChaptersResponse = {
|
|
2
|
+
result: string;
|
|
3
|
+
response: string;
|
|
4
|
+
data: Daum[];
|
|
5
|
+
limit: number;
|
|
6
|
+
offset: number;
|
|
7
|
+
total: number;
|
|
8
|
+
};
|
|
9
|
+
declare type Daum = {
|
|
10
|
+
id: string;
|
|
11
|
+
type: string;
|
|
12
|
+
attributes: Attributes;
|
|
13
|
+
relationships: Relationship[];
|
|
14
|
+
};
|
|
15
|
+
declare type Attributes = {
|
|
16
|
+
volume?: string;
|
|
17
|
+
chapter: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
translatedLanguage: string;
|
|
20
|
+
externalUrl: any;
|
|
21
|
+
publishAt: string;
|
|
22
|
+
readableAt: string;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
pages: number;
|
|
26
|
+
version: number;
|
|
27
|
+
};
|
|
28
|
+
declare type Relationship = {
|
|
29
|
+
id: string;
|
|
30
|
+
type: string;
|
|
31
|
+
attributes: Attributes2;
|
|
32
|
+
};
|
|
33
|
+
declare type Attributes2 = {
|
|
34
|
+
name?: string;
|
|
35
|
+
altNames?: AltName[];
|
|
36
|
+
locked?: boolean;
|
|
37
|
+
website?: string;
|
|
38
|
+
ircServer: any;
|
|
39
|
+
ircChannel: any;
|
|
40
|
+
discord?: string;
|
|
41
|
+
contactEmail?: string;
|
|
42
|
+
description: any;
|
|
43
|
+
twitter?: string;
|
|
44
|
+
mangaUpdates?: string;
|
|
45
|
+
focusedLanguages?: string[];
|
|
46
|
+
official?: boolean;
|
|
47
|
+
verified?: boolean;
|
|
48
|
+
inactive?: boolean;
|
|
49
|
+
publishDelay: any;
|
|
50
|
+
createdAt?: string;
|
|
51
|
+
updatedAt?: string;
|
|
52
|
+
version: number;
|
|
53
|
+
exLicensed?: boolean;
|
|
54
|
+
title?: Title;
|
|
55
|
+
altTitles?: AltTitle[];
|
|
56
|
+
isLocked?: boolean;
|
|
57
|
+
links?: Links;
|
|
58
|
+
originalLanguage?: string;
|
|
59
|
+
lastVolume?: string;
|
|
60
|
+
lastChapter?: string;
|
|
61
|
+
publicationDemographic?: string;
|
|
62
|
+
status?: string;
|
|
63
|
+
year?: number;
|
|
64
|
+
contentRating?: "erotica" | "safe" | "suggestive";
|
|
65
|
+
tags?: Tag[];
|
|
66
|
+
state?: string;
|
|
67
|
+
chapterNumbersResetOnNewVolume?: boolean;
|
|
68
|
+
availableTranslatedLanguages?: string[];
|
|
69
|
+
latestUploadedChapter?: string;
|
|
70
|
+
username?: string;
|
|
71
|
+
roles?: string[];
|
|
72
|
+
};
|
|
73
|
+
declare type AltName = {
|
|
74
|
+
en: string;
|
|
75
|
+
};
|
|
76
|
+
declare type Title = {
|
|
77
|
+
en: string;
|
|
78
|
+
};
|
|
79
|
+
declare type AltTitle = {
|
|
80
|
+
ja?: string;
|
|
81
|
+
en?: string;
|
|
82
|
+
fr?: string;
|
|
83
|
+
zh?: string;
|
|
84
|
+
"zh-hk"?: string;
|
|
85
|
+
ru?: string;
|
|
86
|
+
ne?: string;
|
|
87
|
+
ar?: string;
|
|
88
|
+
th?: string;
|
|
89
|
+
ko?: string;
|
|
90
|
+
de?: string;
|
|
91
|
+
it?: string;
|
|
92
|
+
"zh-ro"?: string;
|
|
93
|
+
vi?: string;
|
|
94
|
+
es?: string;
|
|
95
|
+
"pt-br"?: string;
|
|
96
|
+
"ja-ro"?: string;
|
|
97
|
+
"ko-ro"?: string;
|
|
98
|
+
pt?: string;
|
|
99
|
+
uk?: string;
|
|
100
|
+
tr?: string;
|
|
101
|
+
"es-la"?: string;
|
|
102
|
+
tl?: string;
|
|
103
|
+
pl?: string;
|
|
104
|
+
};
|
|
105
|
+
declare type Links = {
|
|
106
|
+
al?: string;
|
|
107
|
+
ap?: string;
|
|
108
|
+
bw?: string;
|
|
109
|
+
kt?: string;
|
|
110
|
+
mu?: string;
|
|
111
|
+
nu?: string;
|
|
112
|
+
amz?: string;
|
|
113
|
+
cdj?: string;
|
|
114
|
+
ebj?: string;
|
|
115
|
+
mal?: string;
|
|
116
|
+
raw?: string;
|
|
117
|
+
engtl?: string;
|
|
118
|
+
};
|
|
119
|
+
declare type Tag = {
|
|
120
|
+
id: string;
|
|
121
|
+
type: string;
|
|
122
|
+
attributes: Attributes3;
|
|
123
|
+
relationships: any[];
|
|
124
|
+
};
|
|
125
|
+
declare type Attributes3 = {
|
|
126
|
+
name: Name;
|
|
127
|
+
description: object;
|
|
128
|
+
group: string;
|
|
129
|
+
version: number;
|
|
130
|
+
};
|
|
131
|
+
declare type Name = {
|
|
132
|
+
en: string;
|
|
133
|
+
};
|
|
134
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare type Chapter = {
|
|
2
|
+
id: string;
|
|
3
|
+
number: number;
|
|
4
|
+
title: string;
|
|
5
|
+
geek: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type Manga = {
|
|
8
|
+
id: number;
|
|
9
|
+
title: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
geek: string;
|
|
12
|
+
description: string;
|
|
13
|
+
cover: string;
|
|
14
|
+
tags: string[];
|
|
15
|
+
available: boolean;
|
|
16
|
+
alternative_name?: string;
|
|
17
|
+
chapters: Chapter[];
|
|
18
|
+
chapter_code?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare type Recent = {
|
|
21
|
+
code: string;
|
|
22
|
+
chapters: number[];
|
|
23
|
+
title: string;
|
|
24
|
+
cover?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare type MangaCoverInfo = {
|
|
27
|
+
id: string;
|
|
28
|
+
cover: string;
|
|
29
|
+
coverPath: string;
|
|
30
|
+
};
|
|
31
|
+
export declare type MangaInfo = {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
slug: string;
|
|
35
|
+
geek: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
cover: string;
|
|
38
|
+
tags: string[];
|
|
39
|
+
available: boolean;
|
|
40
|
+
alternative_name?: string;
|
|
41
|
+
chapters?: Chapter[];
|
|
42
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="cheerio" />
|
|
2
|
+
import { RequestInit } from "node-fetch";
|
|
3
|
+
export declare function getText(url: string, options?: RequestInit): Promise<string>;
|
|
4
|
+
export declare function getJSON(url: string, options?: RequestInit): Promise<any>;
|
|
5
|
+
export declare function HTML(url: string, options?: RequestInit): Promise<cheerio.Root>;
|
|
6
|
+
export declare function checkThumb(thumbnail?: string): string | undefined;
|
|
7
|
+
export declare function hasFinished(finished?: string): boolean;
|
|
8
|
+
export declare function getSlug(href?: string): string | undefined;
|
|
9
|
+
export declare function toSlug(title?: string): string | undefined;
|
|
10
|
+
export declare function GeekGen(title: string): string;
|
|
11
|
+
export declare function isExtra(title: string): boolean;
|
|
12
|
+
export declare function toStringNumber(value: string): string | null;
|
|
13
|
+
export declare function toNumber(value: string): number | null;
|
|
14
|
+
export declare function generateHash(size?: number): string;
|
|
15
|
+
export declare function hash(): string;
|
|
16
|
+
export declare function getChapterNumber(number?: string | number): number;
|
|
17
|
+
export declare function getChapterTitle(number?: string | number, language?: string): string;
|
|
18
|
+
export declare function getChapterId(url?: string): number | false;
|
|
19
|
+
export declare function unionChapterNumberFormat(chapter_number: number): string;
|
|
20
|
+
export declare function atob(data: string): string;
|
|
21
|
+
export declare function btoa(data: string): string;
|