mgbuild 1.6.7 → 1.6.9

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.
@@ -1,9 +1,9 @@
1
1
  import { ChapterEndpointConfig, ChaptersEndpointConfig } from "./utils";
2
- import type { GetMangaInfoResponse } from "../types/info";
2
+ import type { GetMangaInfoResponse, ListMangaResponse } from "../types/info";
3
3
  import type { GetMangaChaptersResponse } from "../types/chapters";
4
4
  import type { GetRecentChaptersResponse } from "../types/recents";
5
5
  import type { GetChapterPagesResponse } from "../types/pages";
6
- import { Languages } from "../../../utils/type";
6
+ import { Languages, MainLanguages } from "../../../utils/type";
7
7
  export declare type Log = {
8
8
  type: "ping" | "error";
9
9
  method: string;
@@ -23,6 +23,7 @@ export declare class BruteScraper {
23
23
  getChapterList(manga_id: string, config: ChaptersEndpointConfig): Promise<GetMangaChaptersResponse | undefined>;
24
24
  getMangaInfo(manga_id: string): Promise<GetMangaInfoResponse | undefined>;
25
25
  getChapterPages(chapter_id: string): Promise<GetChapterPagesResponse | undefined>;
26
+ getMangaList(language: MainLanguages, page?: number): Promise<ListMangaResponse | undefined>;
26
27
  getRecentChapters(language: Languages): Promise<{
27
28
  recent: GetRecentChaptersResponse;
28
29
  mangas: {
@@ -1,4 +1,4 @@
1
- import type { GetMangaInfoResponse } from "../types/info";
1
+ import type { GetMangaInfoResponse, ListMangaResponse } from "../types/info";
2
2
  import type { GetMangaChaptersResponse } from "../types/chapters";
3
3
  import type { GetRecentChaptersResponse } from "../types/recents";
4
4
  import type { GetChapterPagesResponse } from "../types/pages";
@@ -11,6 +11,7 @@ export declare class Transform {
11
11
  chapterPages(response?: GetChapterPagesResponse): {
12
12
  pages: string[];
13
13
  };
14
+ mangaList(response?: ListMangaResponse, language?: MainLanguages): MangaInfo[];
14
15
  recentChapters(response?: {
15
16
  recent: GetRecentChaptersResponse;
16
17
  mangas: Recent[];
@@ -17,6 +17,7 @@ export declare const endpoints: {
17
17
  pages: (chapter_id: string) => string;
18
18
  recents: (language: Languages) => string;
19
19
  bulkInfo: (manga_ids: string[]) => string;
20
+ list: (language: Languages, page: number) => string;
20
21
  };
21
22
  export declare const headers: {
22
23
  accept: string;
@@ -10,7 +10,12 @@ export declare class Scraper {
10
10
  private transform;
11
11
  constructor(logger?: Logger);
12
12
  private chapters;
13
+ allChapters(manga_id: string, config: {
14
+ slug: string;
15
+ language: MainLanguages;
16
+ }): Promise<import("./types/transform").Chapter[]>;
13
17
  manga(manga_id: string, config: MangaConfig): Promise<import("./types/transform").MangaInfo | undefined>;
18
+ mangas(language: MainLanguages, page: number): Promise<import("./types/transform").MangaInfo[] | undefined>;
14
19
  chapter(manga_id: string, number: number, language: Languages): Promise<{
15
20
  pages: string[];
16
21
  } | undefined>;
@@ -4,6 +4,11 @@ export declare type GetMangaInfoResponse = {
4
4
  response: string;
5
5
  data: Data;
6
6
  };
7
+ export declare type ListMangaResponse = {
8
+ result: string;
9
+ response: string;
10
+ data: Data[];
11
+ };
7
12
  declare type Data = {
8
13
  id: string;
9
14
  type: string;
@@ -14,7 +14,7 @@ export declare function toStringNumber(value: string): string | null;
14
14
  export declare function toNumber(value: string): number | null;
15
15
  export declare function generateHash(size?: number): string;
16
16
  export declare function hash(): string;
17
- export declare function getChapterNumber(number?: string | number): number;
17
+ export declare function getChapterNumber(number?: string | number): number | undefined;
18
18
  export declare function getChapterTitle(number?: string | number, language?: string): string;
19
19
  export declare function getChapterId(url?: string): number | false;
20
20
  export declare function unionChapterNumberFormat(chapter_number: number): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mgbuild",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [],