@crysoline/lib 0.1.5 → 0.1.7

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.
Files changed (156) hide show
  1. package/dist/core/anime/123anime/index.d.ts +27 -0
  2. package/dist/core/anime/123anime/index.js +18 -0
  3. package/dist/core/anime/anicore/index.d.ts +27 -0
  4. package/dist/core/anime/anicore/index.js +18 -0
  5. package/dist/core/anime/anicore/types.d.ts +16 -0
  6. package/dist/core/anime/anicore/types.js +1 -0
  7. package/dist/core/anime/anidap/index.d.ts +27 -0
  8. package/dist/core/anime/anidap/index.js +18 -0
  9. package/dist/core/anime/aniliberty/index.d.ts +28 -0
  10. package/dist/core/anime/aniliberty/index.js +19 -0
  11. package/dist/core/anime/aniliberty/types.d.ts +31 -0
  12. package/dist/core/anime/aniliberty/types.js +1 -0
  13. package/dist/core/anime/anime3rb/index.d.ts +28 -0
  14. package/dist/core/anime/anime3rb/index.js +19 -0
  15. package/dist/core/anime/anime3rb/types.d.ts +7 -0
  16. package/dist/core/anime/anime3rb/types.js +1 -0
  17. package/dist/core/anime/animeav1/index.d.ts +28 -0
  18. package/dist/core/anime/animeav1/index.js +19 -0
  19. package/dist/core/anime/animeav1/types.d.ts +17 -0
  20. package/dist/core/anime/animeav1/types.js +1 -0
  21. package/dist/core/anime/animegg/index.d.ts +28 -0
  22. package/dist/core/anime/animegg/index.js +19 -0
  23. package/dist/core/anime/animegg/types.d.ts +14 -0
  24. package/dist/core/anime/animegg/types.js +1 -0
  25. package/dist/core/anime/animeheaven/index.d.ts +27 -0
  26. package/dist/core/anime/animeheaven/index.js +18 -0
  27. package/dist/core/anime/animeheaven/types.d.ts +1 -1
  28. package/dist/core/anime/animekai/index.d.ts +27 -0
  29. package/dist/core/anime/animekai/index.js +18 -0
  30. package/dist/core/anime/animekai/types.d.ts +7 -7
  31. package/dist/core/anime/animelib/index.d.ts +32 -0
  32. package/dist/core/anime/animelib/index.js +19 -0
  33. package/dist/core/anime/animelib/types.d.ts +12 -0
  34. package/dist/core/anime/animelib/types.js +1 -0
  35. package/dist/core/anime/animemeow/index.d.ts +28 -0
  36. package/dist/core/anime/animemeow/index.js +19 -0
  37. package/dist/core/anime/animemeow/types.d.ts +6 -0
  38. package/dist/core/anime/animemeow/types.js +1 -0
  39. package/dist/core/anime/animenexus/index.d.ts +27 -0
  40. package/dist/core/anime/animenexus/index.js +18 -0
  41. package/dist/core/anime/animenexus/types.d.ts +16 -16
  42. package/dist/core/anime/animenix/index.d.ts +28 -0
  43. package/dist/core/anime/animenix/index.js +19 -0
  44. package/dist/core/anime/animenix/types.d.ts +6 -0
  45. package/dist/core/anime/animenix/types.js +1 -0
  46. package/dist/core/anime/animeonsen/index.d.ts +27 -0
  47. package/dist/core/anime/animeonsen/index.js +18 -0
  48. package/dist/core/anime/animeonsen/types.d.ts +8 -8
  49. package/dist/core/anime/animepahe/index.d.ts +27 -0
  50. package/dist/core/anime/animepahe/index.js +18 -0
  51. package/dist/core/anime/animeparadise/index.d.ts +26 -0
  52. package/dist/core/anime/animeparadise/index.js +18 -0
  53. package/dist/core/anime/anizone/index.d.ts +27 -0
  54. package/dist/core/anime/anizone/index.js +18 -0
  55. package/dist/core/anime/anizone/types.d.ts +5 -5
  56. package/dist/core/anime/hianime/index.d.ts +31 -0
  57. package/dist/core/anime/hianime/index.js +18 -0
  58. package/dist/core/anime/hianime/types.d.ts +8 -8
  59. package/dist/core/anime/index.d.ts +175 -44
  60. package/dist/core/anime/index.js +52 -233
  61. package/dist/core/anime/kickassanime/index.d.ts +27 -0
  62. package/dist/core/anime/kickassanime/index.js +18 -0
  63. package/dist/core/anime/kickassanime/types.d.ts +8 -8
  64. package/dist/core/anime/lunar/index.d.ts +28 -0
  65. package/dist/core/anime/lunar/index.js +19 -0
  66. package/dist/core/anime/lunar/types.d.ts +8 -8
  67. package/dist/core/anime/uniquestream/index.d.ts +27 -0
  68. package/dist/core/anime/uniquestream/index.js +18 -0
  69. package/dist/core/anime/uniquestream/types.d.ts +3 -3
  70. package/dist/core/extractors/index.d.ts +16 -0
  71. package/dist/core/extractors/index.js +10 -0
  72. package/dist/core/extractors/kodik/index.d.ts +1 -0
  73. package/dist/core/extractors/kodik/index.js +1 -0
  74. package/dist/core/extractors/kodik/types.d.ts +14 -0
  75. package/dist/core/extractors/kodik/types.js +1 -0
  76. package/dist/core/hentai/hanime/index.d.ts +28 -0
  77. package/dist/core/hentai/hanime/index.js +19 -0
  78. package/dist/core/hentai/hentaigasm/index.d.ts +14 -0
  79. package/dist/core/hentai/hentaigasm/index.js +5 -0
  80. package/dist/core/hentai/hentaigasm/types.d.ts +15 -0
  81. package/dist/core/hentai/hentaigasm/types.js +1 -0
  82. package/dist/core/hentai/hentaihaven/index.d.ts +30 -0
  83. package/dist/core/hentai/hentaihaven/index.js +21 -0
  84. package/dist/core/hentai/hstream/index.d.ts +27 -0
  85. package/dist/core/hentai/hstream/index.js +18 -0
  86. package/dist/core/hentai/index.d.ts +39 -13
  87. package/dist/core/hentai/index.js +13 -58
  88. package/dist/core/hentai/watchhentai/index.d.ts +28 -0
  89. package/dist/core/hentai/watchhentai/index.js +19 -0
  90. package/dist/core/hentai/watchhentai/types.d.ts +16 -0
  91. package/dist/core/hentai/watchhentai/types.js +1 -0
  92. package/dist/core/index.d.ts +7 -5
  93. package/dist/core/index.js +7 -5
  94. package/dist/core/manga/1manga/index.d.ts +27 -0
  95. package/dist/core/manga/1manga/index.js +20 -0
  96. package/dist/core/manga/1manga/types.d.ts +17 -0
  97. package/dist/core/manga/1manga/types.js +1 -0
  98. package/dist/core/manga/comix/index.d.ts +28 -0
  99. package/dist/core/manga/comix/index.js +20 -0
  100. package/dist/core/manga/comix/types.d.ts +15 -0
  101. package/dist/core/manga/comix/types.js +1 -0
  102. package/dist/core/manga/index.d.ts +243 -11
  103. package/dist/core/manga/index.js +36 -67
  104. package/dist/core/manga/lunar/index.d.ts +27 -0
  105. package/dist/core/manga/lunar/index.js +19 -0
  106. package/dist/core/manga/lunar/types.d.ts +2 -2
  107. package/dist/core/manga/mangadex/index.d.ts +28 -0
  108. package/dist/core/manga/mangadex/index.js +20 -0
  109. package/dist/core/manga/mangadex/types.d.ts +2 -2
  110. package/dist/core/manga/mangafire/index.d.ts +27 -0
  111. package/dist/core/manga/mangafire/index.js +19 -0
  112. package/dist/core/manga/mangafire/types.d.ts +4 -4
  113. package/dist/core/manga/mbbcdn/index.d.ts +288 -0
  114. package/dist/core/manga/mbbcdn/index.js +200 -0
  115. package/dist/core/manga/mbbcdn/types.d.ts +14 -0
  116. package/dist/core/manga/mbbcdn/types.js +1 -0
  117. package/dist/core/manga/toonilycdn/index.d.ts +131 -0
  118. package/dist/core/manga/toonilycdn/index.js +91 -0
  119. package/dist/core/manga/toonilycdn/types.d.ts +14 -0
  120. package/dist/core/manga/toonilycdn/types.js +1 -0
  121. package/dist/core/manga/weebcentral/index.d.ts +28 -0
  122. package/dist/core/manga/weebcentral/index.js +20 -0
  123. package/dist/core/manga/weebcentral/types.d.ts +22 -0
  124. package/dist/core/manga/weebcentral/types.js +1 -0
  125. package/dist/core/mapper/index.d.ts +1 -0
  126. package/dist/core/mapper/index.js +1 -0
  127. package/dist/core/meta/anilist/index.d.ts +21 -0
  128. package/dist/core/meta/anilist/index.js +19 -0
  129. package/dist/core/meta/anilist/types.d.ts +69 -0
  130. package/dist/core/meta/anilist/types.js +1 -0
  131. package/dist/core/meta/index.d.ts +14 -8
  132. package/dist/core/meta/index.js +8 -51
  133. package/dist/core/meta/myanimelist/index.d.ts +20 -0
  134. package/dist/core/meta/myanimelist/index.js +18 -0
  135. package/dist/core/meta/myanimelist/types.d.ts +15 -15
  136. package/dist/core/meta/mymangalist/index.d.ts +7 -0
  137. package/dist/core/meta/mymangalist/index.js +5 -0
  138. package/dist/core/meta/mymangalist/types.d.ts +9 -9
  139. package/dist/core/novels/index.d.ts +41 -0
  140. package/dist/core/novels/index.js +11 -0
  141. package/dist/core/novels/jnovels/index.d.ts +26 -0
  142. package/dist/core/novels/jnovels/index.js +19 -0
  143. package/dist/core/novels/novelfire/index.d.ts +28 -0
  144. package/dist/core/novels/novelfire/index.js +20 -0
  145. package/dist/core/novels/novelfire/types.d.ts +4 -0
  146. package/dist/core/novels/novelfire/types.js +1 -0
  147. package/dist/core/novels/novelhall/index.d.ts +26 -0
  148. package/dist/core/novels/novelhall/index.js +19 -0
  149. package/dist/core/types.d.ts +8 -7
  150. package/dist/helpers/fetch.d.ts +14 -0
  151. package/dist/helpers/fetch.js +30 -0
  152. package/dist/helpers/index.d.ts +1 -0
  153. package/dist/helpers/index.js +1 -0
  154. package/dist/index.d.ts +2 -1
  155. package/dist/index.js +2 -1
  156. package/package.json +2 -2
@@ -1,32 +1,32 @@
1
- export interface MMSearchMeta {
1
+ export interface MyMangaListSearchMeta {
2
2
  type: string | null;
3
3
  score: string | null;
4
4
  members: string | null;
5
5
  volumes: string | null;
6
6
  }
7
- export interface MMLink {
7
+ export interface MyMangaListLink {
8
8
  label: string | null;
9
9
  url: string | null;
10
10
  }
11
- export interface MMLRelation {
11
+ export interface MyMangaListRelation {
12
12
  id: number | null;
13
13
  image: string | null;
14
14
  title: string | null;
15
15
  relationType: string | null;
16
16
  }
17
- export interface MMLCharacter {
17
+ export interface MyMangaListCharacter {
18
18
  id: number | null;
19
19
  image: string | null;
20
20
  name: string | null;
21
21
  role: string | null;
22
22
  }
23
- export interface MMLVoiceActor {
23
+ export interface MyMangaListVoiceActor {
24
24
  id: number | null;
25
25
  image: string | null;
26
26
  name: string | null;
27
27
  language: string | null;
28
28
  }
29
- export interface MMLInfoMeta {
29
+ export interface MyMangaListInfoMeta {
30
30
  moreInfo: string | null;
31
31
  score: string | null;
32
32
  rank: string | null;
@@ -42,7 +42,7 @@ export interface MMLInfoMeta {
42
42
  themes: string[] | null;
43
43
  authors: string[] | null;
44
44
  favorites: string | null;
45
- externalLinks: MMLink[] | null;
46
- relations: MMLRelation[] | null;
47
- characters: MMLCharacter[] | null;
45
+ externalLinks: MyMangaListLink[] | null;
46
+ relations: MyMangaListRelation[] | null;
47
+ characters: MyMangaListCharacter[] | null;
48
48
  }
@@ -0,0 +1,41 @@
1
+ export declare const Novels: {
2
+ JNovels: (apiKey: string) => {
3
+ name: string;
4
+ } & {
5
+ search: (q: string) => Promise<import("../types").Search<unknown>[]>;
6
+ info: (id: string | number) => Promise<import("../types").Info<unknown, import("../types").Episode<unknown>>>;
7
+ chapters: (id: string | number) => Promise<import("../types").Chapter<unknown>[]>;
8
+ pages: (params: {
9
+ id: string | number;
10
+ chapterId: string | number;
11
+ lang?: string;
12
+ }) => Promise<import("../types").Page[]>;
13
+ };
14
+ NovelFire: (apiKey: string) => {
15
+ name: string;
16
+ } & {
17
+ search: (q: string) => Promise<import("../types").Search<import("./novelfire").NovelFireSearchMeta>[]>;
18
+ info: (id: string | number) => Promise<import("../types").Info<unknown, import("../types").Episode<unknown>>>;
19
+ chapters: (id: string | number) => Promise<import("../types").Chapter<unknown>[]>;
20
+ pages: (params: {
21
+ id: string | number;
22
+ chapterId: string | number;
23
+ lang?: string;
24
+ }) => Promise<import("../types").Page[]>;
25
+ };
26
+ NovelHall: (apiKey: string) => {
27
+ name: string;
28
+ } & {
29
+ search: (q: string) => Promise<import("../types").Search<unknown>[]>;
30
+ info: (id: string | number) => Promise<import("../types").Info<unknown, import("../types").Episode<unknown>>>;
31
+ chapters: (id: string | number) => Promise<import("../types").Chapter<unknown>[]>;
32
+ pages: (params: {
33
+ id: string | number;
34
+ chapterId: string | number;
35
+ lang?: string;
36
+ }) => Promise<import("../types").Page[]>;
37
+ };
38
+ };
39
+ export * from './jnovels';
40
+ export * from './novelfire';
41
+ export * from './novelhall';
@@ -0,0 +1,11 @@
1
+ import { JNovels } from './jnovels';
2
+ import { NovelFire } from './novelfire';
3
+ import { NovelHall } from './novelhall';
4
+ export const Novels = {
5
+ JNovels,
6
+ NovelFire,
7
+ NovelHall,
8
+ };
9
+ export * from './jnovels';
10
+ export * from './novelfire';
11
+ export * from './novelhall';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Creates a JNovels API client.
3
+ *
4
+ * @param apiKey - Your API key for authentication
5
+ * @returns API client with methods: search, info, chapters, pages
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const client = JNovels(process.env.API_KEY);
10
+ * const results = await client.search("one piece");
11
+ * const info = await client.info(results[0].id);
12
+ * const chapters = await client.chapters(results[0].id);
13
+ * ```
14
+ */
15
+ export declare const JNovels: (apiKey: string) => {
16
+ name: string;
17
+ } & {
18
+ search: (q: string) => Promise<import("../../types").Search<unknown>[]>;
19
+ info: (id: string | number) => Promise<import("../../types").Info<unknown, import("../../types").Episode<unknown>>>;
20
+ chapters: (id: string | number) => Promise<import("../../types").Chapter<unknown>[]>;
21
+ pages: (params: {
22
+ id: string | number;
23
+ chapterId: string | number;
24
+ lang?: string;
25
+ }) => Promise<import("../../types").Page[]>;
26
+ };
@@ -0,0 +1,19 @@
1
+ import { NovelFetch } from '../../../helpers';
2
+ /**
3
+ * Creates a JNovels API client.
4
+ *
5
+ * @param apiKey - Your API key for authentication
6
+ * @returns API client with methods: search, info, chapters, pages
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const client = JNovels(process.env.API_KEY);
11
+ * const results = await client.search("one piece");
12
+ * const info = await client.info(results[0].id);
13
+ * const chapters = await client.chapters(results[0].id);
14
+ * ```
15
+ */
16
+ export const JNovels = (apiKey) => NovelFetch({
17
+ provider: 'jnovels',
18
+ apiKey,
19
+ });
@@ -0,0 +1,28 @@
1
+ import type { NovelFireSearchMeta } from './types';
2
+ /**
3
+ * Creates a NovelFire API client.
4
+ *
5
+ * @param apiKey - Your API key for authentication
6
+ * @returns API client with methods: search, info, chapters, pages
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const client = NovelFire(process.env.API_KEY);
11
+ * const results = await client.search("one piece");
12
+ * const info = await client.info(results[0].id);
13
+ * const chapters = await client.chapters(results[0].id);
14
+ * ```
15
+ */
16
+ export declare const NovelFire: (apiKey: string) => {
17
+ name: string;
18
+ } & {
19
+ search: (q: string) => Promise<import("../../types").Search<NovelFireSearchMeta>[]>;
20
+ info: (id: string | number) => Promise<import("../../types").Info<unknown, import("../../types").Episode<unknown>>>;
21
+ chapters: (id: string | number) => Promise<import("../../types").Chapter<unknown>[]>;
22
+ pages: (params: {
23
+ id: string | number;
24
+ chapterId: string | number;
25
+ lang?: string;
26
+ }) => Promise<import("../../types").Page[]>;
27
+ };
28
+ export * from './types';
@@ -0,0 +1,20 @@
1
+ import { NovelFetch } from '../../../helpers';
2
+ /**
3
+ * Creates a NovelFire API client.
4
+ *
5
+ * @param apiKey - Your API key for authentication
6
+ * @returns API client with methods: search, info, chapters, pages
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const client = NovelFire(process.env.API_KEY);
11
+ * const results = await client.search("one piece");
12
+ * const info = await client.info(results[0].id);
13
+ * const chapters = await client.chapters(results[0].id);
14
+ * ```
15
+ */
16
+ export const NovelFire = (apiKey) => NovelFetch({
17
+ provider: 'novelfire',
18
+ apiKey,
19
+ });
20
+ export * from './types';
@@ -0,0 +1,4 @@
1
+ export interface NovelFireSearchMeta {
2
+ rank: number | null;
3
+ chapters: number | null;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Creates a NovelHall API client.
3
+ *
4
+ * @param apiKey - Your API key for authentication
5
+ * @returns API client with methods: search, info, chapters, pages
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const client = NovelHall(process.env.API_KEY);
10
+ * const results = await client.search("one piece");
11
+ * const info = await client.info(results[0].id);
12
+ * const chapters = await client.chapters(results[0].id);
13
+ * ```
14
+ */
15
+ export declare const NovelHall: (apiKey: string) => {
16
+ name: string;
17
+ } & {
18
+ search: (q: string) => Promise<import("../../types").Search<unknown>[]>;
19
+ info: (id: string | number) => Promise<import("../../types").Info<unknown, import("../../types").Episode<unknown>>>;
20
+ chapters: (id: string | number) => Promise<import("../../types").Chapter<unknown>[]>;
21
+ pages: (params: {
22
+ id: string | number;
23
+ chapterId: string | number;
24
+ lang?: string;
25
+ }) => Promise<import("../../types").Page[]>;
26
+ };
@@ -0,0 +1,19 @@
1
+ import { NovelFetch } from '../../../helpers';
2
+ /**
3
+ * Creates a NovelHall API client.
4
+ *
5
+ * @param apiKey - Your API key for authentication
6
+ * @returns API client with methods: search, info, chapters, pages
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const client = NovelHall(process.env.API_KEY);
11
+ * const results = await client.search("one piece");
12
+ * const info = await client.info(results[0].id);
13
+ * const chapters = await client.chapters(results[0].id);
14
+ * ```
15
+ */
16
+ export const NovelHall = (apiKey) => NovelFetch({
17
+ provider: 'novelhall',
18
+ apiKey,
19
+ });
@@ -5,13 +5,14 @@ export interface Image {
5
5
  large: string;
6
6
  }
7
7
  export interface Title {
8
- english?: string | null | undefined;
9
- romaji?: string | null | undefined;
10
- japanese?: string | null | undefined;
11
- native?: string | null | undefined;
8
+ english?: string | null;
9
+ romaji?: string | null;
10
+ japanese?: string | null;
11
+ native?: string | null;
12
+ other?: string | null;
12
13
  }
13
14
  export interface Chapter<T = unknown> {
14
- id?: string | null;
15
+ id?: string | number | null;
15
16
  title?: string | null;
16
17
  number?: number | null;
17
18
  rating?: number | null;
@@ -39,7 +40,7 @@ export interface Info<T = unknown, E = unknown> {
39
40
  synonyms?: string[] | null;
40
41
  description?: string | null;
41
42
  image?: Image | null;
42
- banner?: Image | null;
43
+ background?: Image | null;
43
44
  logo?: Image | null;
44
45
  airedEpisodes?: number | null;
45
46
  totalEpisodes?: number | null;
@@ -78,7 +79,7 @@ export interface Download {
78
79
  export interface VideoSource {
79
80
  url?: string | null;
80
81
  isM3U8?: boolean | null;
81
- type?: VideoType | null;
82
+ type?: VideoType | string | null;
82
83
  quality?: string | null;
83
84
  isDub?: boolean | null;
84
85
  }
@@ -1,3 +1,4 @@
1
+ import type { KodikTranslation } from '../core/extractors/kodik/types';
1
2
  import type { Mapping } from '../core/mapper/types';
2
3
  import type { Chapter, Episode, Info, Page, Search, Server, Source } from '../core/types';
3
4
  type SearchRoute<T = unknown> = (q: string) => Promise<Search<T>[]>;
@@ -19,6 +20,7 @@ type PagesRoute = (params: {
19
20
  chapterId: string | number;
20
21
  lang?: string;
21
22
  }) => Promise<Page[]>;
23
+ type TranslationsRoute = (id: string | number) => Promise<KodikTranslation[]>;
22
24
  type MapRoute = (params: {
23
25
  id: number;
24
26
  provider: string;
@@ -31,6 +33,7 @@ type RouteMap<TSearchMeta = unknown, TInfoMeta = unknown, TEpisodeMeta = unknown
31
33
  servers: ServersRoute<TServerMeta>;
32
34
  chapters: ChaptersRoute<TChapterMeta>;
33
35
  pages: PagesRoute;
36
+ translations: TranslationsRoute;
34
37
  map: MapRoute;
35
38
  };
36
39
  type SelectRoutes = {
@@ -68,6 +71,12 @@ export declare const MangaFetch: <TSearchMeta = unknown, TInfoMeta = unknown, TC
68
71
  chapters: true;
69
72
  pages: true;
70
73
  }>(config: FetchModuleConfig) => BuildMangaRoutes<S, TSearchMeta, TInfoMeta, TChapterMeta>;
74
+ export declare const NovelFetch: <TSearchMeta = unknown, TInfoMeta = unknown, TChapterMeta = unknown, S extends SelectRoutes = {
75
+ search: true;
76
+ info: true;
77
+ chapters: true;
78
+ pages: true;
79
+ }>(config: FetchModuleConfig) => BuildMangaRoutes<S, TSearchMeta, TInfoMeta, TChapterMeta>;
71
80
  export declare const MetaFetch: <TSearchMeta = unknown, TInfoMeta = unknown, S extends SelectRoutes = {
72
81
  search: true;
73
82
  info: true;
@@ -75,4 +84,9 @@ export declare const MetaFetch: <TSearchMeta = unknown, TInfoMeta = unknown, S e
75
84
  export declare const MapperFetch: (config: FetchModuleConfig) => BuildRoutes<{
76
85
  map: true;
77
86
  }>;
87
+ export declare const KodikFetch: (config: FetchModuleConfig) => BuildRoutes<{
88
+ episodes: true;
89
+ translations: true;
90
+ sources: true;
91
+ }>;
78
92
  export {};
@@ -71,6 +71,22 @@ export const MangaFetch = (config) => {
71
71
  pages,
72
72
  };
73
73
  };
74
+ export const NovelFetch = (config) => {
75
+ const { baseUrl = 'https://api.crysoline.moe', provider, apiKey } = config;
76
+ const basePath = `${baseUrl}/api/novels/${provider}/`;
77
+ const fetcher = fetchFn(basePath, apiKey);
78
+ const search = async (q) => fetcher('search', { q });
79
+ const info = async (id) => fetcher(`info/${encodeURIComponent(id)}`);
80
+ const chapters = async (id) => fetcher(`chapters/${encodeURIComponent(id)}`);
81
+ const pages = (params) => fetcher('pages', params);
82
+ return {
83
+ name: provider,
84
+ search,
85
+ info,
86
+ chapters,
87
+ pages,
88
+ };
89
+ };
74
90
  export const MetaFetch = (config) => {
75
91
  const { baseUrl = 'https://api.crysoline.moe', provider, apiKey } = config;
76
92
  const basePath = `${baseUrl}/api/meta/${provider}/`;
@@ -92,3 +108,17 @@ export const MapperFetch = (config) => {
92
108
  map,
93
109
  };
94
110
  };
111
+ export const KodikFetch = (config) => {
112
+ const { baseUrl = 'https://api.crysoline.moe', provider, apiKey } = config;
113
+ const basePath = `${baseUrl}/extractor/${provider}/`;
114
+ const fetcher = fetchFn(basePath, apiKey);
115
+ const episodes = async (id) => fetcher(`episodes/${encodeURIComponent(id)}`);
116
+ const sources = (params) => fetcher('sources', params);
117
+ const translations = (id) => fetcher(`translations/${encodeURIComponent(id)}`);
118
+ return {
119
+ name: provider,
120
+ episodes,
121
+ sources,
122
+ translations,
123
+ };
124
+ };
@@ -0,0 +1 @@
1
+ export * from './fetch';
@@ -0,0 +1 @@
1
+ export * from './fetch';
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export { Anime, Hentai, Manga, Mapper, Meta } from './core';
1
+ export * from './core';
2
+ export * from './core/types';
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
- export { Anime, Hentai, Manga, Mapper, Meta } from './core';
1
+ export * from './core';
2
+ export * from './core/types';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@crysoline/lib",
3
3
  "description": "The official crysoline library for anime, manga using the Crysoline API",
4
4
  "license": "MIT",
5
- "version": "0.1.5",
5
+ "version": "0.1.7",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "format": "biome format . --write"
31
31
  },
32
32
  "devDependencies": {
33
- "@biomejs/biome": "2.3.10",
33
+ "@biomejs/biome": "2.3.13",
34
34
  "typescript": "^5",
35
35
  "@types/bun": "latest"
36
36
  },