mgbuild 2.1.86 → 2.1.88

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.
@@ -0,0 +1,46 @@
1
+ export declare class BritaniaAPI {
2
+ constructor();
3
+ private generateKey;
4
+ private decryptSecurePayload;
5
+ private request;
6
+ get<T>(endpoint: string): Promise<T>;
7
+ recents(): Promise<{
8
+ obras: {
9
+ id: number;
10
+ nome: string;
11
+ imagem: string;
12
+ ultimos_capitulos: {
13
+ numero: string;
14
+ }[];
15
+ tags: {
16
+ nome: string;
17
+ }[];
18
+ }[];
19
+ }>;
20
+ manga(mangaId: string | number): Promise<{
21
+ obra: {
22
+ id: number;
23
+ nome: string;
24
+ descricao: string;
25
+ imagem: string;
26
+ slug: string;
27
+ formato_nome: string;
28
+ tags: {
29
+ nome: string;
30
+ }[];
31
+ capitulos: {
32
+ id: number;
33
+ numero: string;
34
+ paywall: boolean;
35
+ }[];
36
+ };
37
+ }>;
38
+ chapter(chapterId: string | number): Promise<{
39
+ capitulo: {
40
+ paginas: {
41
+ cdn_id: string;
42
+ numero: number;
43
+ }[];
44
+ };
45
+ }>;
46
+ }
@@ -0,0 +1,38 @@
1
+ type Log = {
2
+ type: "ping" | "error";
3
+ method: string;
4
+ url: string;
5
+ time: string;
6
+ };
7
+ type Logger = (log: Log) => any;
8
+ export declare class Scraper {
9
+ private logger?;
10
+ private api;
11
+ constructor(logger?: Logger);
12
+ manga(manga_code: string): Promise<{
13
+ id: number;
14
+ title: string;
15
+ description: string;
16
+ available: boolean;
17
+ chapters: {
18
+ number: number;
19
+ geek: string;
20
+ title: string;
21
+ id: string;
22
+ }[];
23
+ cover: string;
24
+ geek: string;
25
+ slug: string;
26
+ tags: string[];
27
+ }>;
28
+ chapterById(chapter_id: string | number): Promise<{
29
+ pages: string[];
30
+ }>;
31
+ recents(): Promise<{
32
+ title: string;
33
+ code: string;
34
+ chapters: number[];
35
+ cover: string;
36
+ }[]>;
37
+ }
38
+ export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="cheerio" />
2
- export declare function getChapter($: cheerio.Root): Promise<{
1
+ export declare function getChapter($: any): Promise<{
3
2
  pages: string[];
4
3
  }>;
@@ -0,0 +1 @@
1
+ export declare function getAllPages(firstPageUrl: string): Promise<string[]>;
@@ -5,7 +5,9 @@ export declare class API {
5
5
  constructor(baseURL: string, logger?: ((logger: any) => void) | undefined, secret?: string);
6
6
  request<T>(route: string, headers?: Record<string, string>): Promise<T | undefined>;
7
7
  page(path: string): Promise<string | undefined>;
8
- chapterById(chapter_id: string): Promise<(string | undefined)[]>;
8
+ chapterById(chapter_id: string): Promise<{
9
+ pages: (string | undefined)[];
10
+ }>;
9
11
  manga(manga_code: string): Promise<any>;
10
12
  recents(): Promise<{
11
13
  title: string;
@@ -10,7 +10,9 @@ export declare class Scraper {
10
10
  private api;
11
11
  constructor(...rest: (Logger | any)[]);
12
12
  manga(manga_code: string): Promise<ScrapedManga>;
13
- chapterById(chapter_id: string | number): Promise<(string | undefined)[]>;
13
+ chapterById(chapter_id: string | number): Promise<{
14
+ pages: (string | undefined)[];
15
+ }>;
14
16
  recents(_page?: number): Promise<RecentScrapeList[]>;
15
17
  }
16
18
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mgbuild",
3
- "version": "2.1.86",
3
+ "version": "2.1.88",
4
4
  "scripts": {},
5
5
  "description": "",
6
6
  "main": "lib/index.js",