@tutkli/jikan-ts 2.1.0 → 3.0.0

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 (102) hide show
  1. package/README.md +61 -58
  2. package/dist/chunk-b9f01kcn.js +1 -0
  3. package/dist/chunk-ygw2424n.js +1 -0
  4. package/dist/client.d.ts +19 -0
  5. package/dist/client.js +1 -0
  6. package/dist/clients/anime.client.d.ts +123 -0
  7. package/dist/clients/base.client.d.ts +45 -0
  8. package/dist/clients/characters.client.d.ts +46 -0
  9. package/dist/clients/clubs.client.d.ts +39 -0
  10. package/dist/clients/genres.client.d.ts +21 -0
  11. package/dist/clients/jikan.client.d.ts +41 -0
  12. package/dist/clients/magazines.client.d.ts +9 -0
  13. package/dist/clients/manga.client.d.ts +84 -0
  14. package/dist/clients/people.client.d.ts +46 -0
  15. package/dist/clients/producers.client.d.ts +31 -0
  16. package/dist/clients/random.client.d.ts +27 -0
  17. package/dist/clients/recommendations.client.d.ts +21 -0
  18. package/dist/clients/reviews.client.d.ts +21 -0
  19. package/dist/clients/schedules.client.d.ts +16 -0
  20. package/dist/clients/seasons.client.d.ts +32 -0
  21. package/dist/clients/top.client.d.ts +36 -0
  22. package/dist/clients/watch.client.d.ts +27 -0
  23. package/dist/config/cache.d.ts +11 -0
  24. package/dist/config/ky.config.d.ts +11 -0
  25. package/dist/config/logging.config.d.ts +4 -0
  26. package/dist/constants/base.const.d.ts +1 -0
  27. package/dist/endpoints/anime.endpoints.d.ts +23 -0
  28. package/dist/endpoints/characters.endpoints.d.ts +9 -0
  29. package/dist/endpoints/clubs.endpoints.d.ts +7 -0
  30. package/dist/endpoints/genres.endpoints.d.ts +4 -0
  31. package/dist/endpoints/magazines.endpoints.d.ts +3 -0
  32. package/dist/endpoints/manga.endpoints.d.ts +16 -0
  33. package/dist/endpoints/people.endpoints.d.ts +9 -0
  34. package/dist/endpoints/producers.endpoints.d.ts +6 -0
  35. package/dist/endpoints/random.endpoints.d.ts +7 -0
  36. package/dist/endpoints/recommendations.endpoints.d.ts +4 -0
  37. package/dist/endpoints/reviews.endpoints.d.ts +4 -0
  38. package/dist/endpoints/schedules.endpoints.d.ts +3 -0
  39. package/dist/endpoints/seasons.endpoints.d.ts +6 -0
  40. package/dist/endpoints/top.endpoints.d.ts +7 -0
  41. package/dist/endpoints/watch.endpoints.d.ts +6 -0
  42. package/dist/index.d.ts +1 -940
  43. package/dist/index.js +1 -1
  44. package/dist/models/Anime/anime-character.model.d.ts +4 -0
  45. package/dist/models/Anime/anime-episode.model.d.ts +12 -0
  46. package/dist/models/Anime/anime-picture.model.d.ts +4 -0
  47. package/dist/models/Anime/anime-staff.model.d.ts +5 -0
  48. package/dist/models/Anime/anime-statistics.model.d.ts +5 -0
  49. package/dist/models/Anime/anime-video.model.d.ts +32 -0
  50. package/dist/models/Anime/anime.model.d.ts +60 -0
  51. package/dist/models/Anime/index.d.ts +7 -0
  52. package/dist/models/Character/character.model.d.ts +28 -0
  53. package/dist/models/Character/index.d.ts +1 -0
  54. package/dist/models/Common/character.model.d.ts +18 -0
  55. package/dist/models/Common/external-link.model.d.ts +4 -0
  56. package/dist/models/Common/forum.model.d.ts +16 -0
  57. package/dist/models/Common/image.model.d.ts +11 -0
  58. package/dist/models/Common/index.d.ts +12 -0
  59. package/dist/models/Common/more-info.model.d.ts +3 -0
  60. package/dist/models/Common/news.model.d.ts +13 -0
  61. package/dist/models/Common/person.model.d.ts +7 -0
  62. package/dist/models/Common/recommendation.model.d.ts +12 -0
  63. package/dist/models/Common/relation.model.d.ts +10 -0
  64. package/dist/models/Common/resource.model.d.ts +35 -0
  65. package/dist/models/Common/seasons-list.model.d.ts +5 -0
  66. package/dist/models/Common/statistics.model.d.ts +12 -0
  67. package/dist/models/Genre/genre.model.d.ts +5 -0
  68. package/dist/models/Genre/index.d.ts +1 -0
  69. package/dist/models/Manga/index.d.ts +2 -0
  70. package/dist/models/Manga/manga-statistics.model.d.ts +5 -0
  71. package/dist/models/Manga/manga.model.d.ts +37 -0
  72. package/dist/models/Params/characters-params.model.d.ts +10 -0
  73. package/dist/models/Params/genres-params.model.d.ts +1 -0
  74. package/dist/models/Params/index.d.ts +7 -0
  75. package/dist/models/Params/pagination-params.model.d.ts +3 -0
  76. package/dist/models/Params/schedules-params.model.d.ts +9 -0
  77. package/dist/models/Params/search-params.model.d.ts +47 -0
  78. package/dist/models/Params/seasons-params.model.d.ts +12 -0
  79. package/dist/models/Params/top-params.model.d.ts +28 -0
  80. package/dist/models/Person/index.d.ts +2 -0
  81. package/dist/models/Person/person-params.model.d.ts +10 -0
  82. package/dist/models/Person/person.model.d.ts +50 -0
  83. package/dist/models/Producer/index.d.ts +2 -0
  84. package/dist/models/Producer/producer-params.model.d.ts +10 -0
  85. package/dist/models/Producer/producer.model.d.ts +14 -0
  86. package/dist/models/Recommendation/index.d.ts +1 -0
  87. package/dist/models/Recommendation/recommendation.model.d.ts +18 -0
  88. package/dist/models/Response/index.d.ts +1 -0
  89. package/dist/models/Response/response.model.d.ts +15 -0
  90. package/dist/models/Review/index.d.ts +2 -0
  91. package/dist/models/Review/review-params.model.d.ts +5 -0
  92. package/dist/models/Review/review.model.d.ts +42 -0
  93. package/dist/models/UserUpdate/index.d.ts +1 -0
  94. package/dist/models/UserUpdate/user-update.model.d.ts +24 -0
  95. package/dist/models/clubs/clubs-params.model.d.ts +14 -0
  96. package/dist/models/clubs/clubs.model.d.ts +25 -0
  97. package/dist/models/index.d.ts +12 -0
  98. package/dist/models/magazine/magazine.model.d.ts +16 -0
  99. package/dist/models/watch/watch.model.d.ts +21 -0
  100. package/dist/types.d.ts +21 -0
  101. package/dist/types.js +1 -0
  102. package/package.json +62 -40
package/dist/index.d.ts CHANGED
@@ -1,940 +1 @@
1
- import { AxiosInstance, AxiosError } from 'axios';
2
- import { CacheOptions, InternalCacheRequestConfig, CacheAxiosResponse } from 'axios-cache-interceptor';
3
-
4
- interface JikanImages {
5
- jpg: JikanImagesCollection;
6
- webp?: JikanImagesCollection;
7
- }
8
- interface JikanImagesCollection {
9
- image_url: string;
10
- small_image_url?: string;
11
- medium_image_url?: string;
12
- large_image_url?: string;
13
- maximum_image_url?: string;
14
- }
15
-
16
- interface JikanPerson {
17
- mal_id: number;
18
- url: string;
19
- images: JikanImages;
20
- name: string;
21
- }
22
-
23
- interface CommonCharacter {
24
- character: CommonCharacterData & {
25
- name: string;
26
- };
27
- role: CharacterRole;
28
- }
29
- interface CommonCharacterData {
30
- mal_id: number;
31
- url: string;
32
- images: JikanImages;
33
- }
34
- interface CharacterVoiceActor {
35
- person: JikanPerson;
36
- language: string;
37
- }
38
- type CharacterRole = 'Main' | 'Supporting';
39
-
40
- interface JikanMoreInfo {
41
- moreinfo: string;
42
- }
43
-
44
- interface JikanNews {
45
- mal_id: number;
46
- url: string;
47
- title: string;
48
- date: string;
49
- author_username: string;
50
- author_url: string;
51
- forum_url: string;
52
- images: JikanImages;
53
- comments: number;
54
- excerpt: string;
55
- }
56
-
57
- interface Recommendation {
58
- entry: RecommendationEntry;
59
- }
60
- interface RecommendationEntry {
61
- mal_id: number;
62
- url: string;
63
- images: JikanImages;
64
- title: string;
65
- }
66
-
67
- interface JikanRelation {
68
- relation: string;
69
- entry: RelationEntry[];
70
- }
71
- interface RelationEntry {
72
- mal_id: number;
73
- type: string;
74
- name: string;
75
- url: string;
76
- }
77
-
78
- interface JikanResource {
79
- mal_id: number;
80
- type: string;
81
- name: string;
82
- url: string;
83
- }
84
- interface JikanNamedResource {
85
- name: string;
86
- url: string;
87
- }
88
- interface JikanResourceTitle {
89
- type: string;
90
- title: string;
91
- }
92
- interface JikanResourcePeriod {
93
- from: string;
94
- to: string;
95
- prop: {
96
- from: {
97
- day: number;
98
- month: number;
99
- year: number;
100
- };
101
- to: {
102
- day: number;
103
- month: number;
104
- year: number;
105
- };
106
- string: string;
107
- };
108
- }
109
- interface JikanResourceRelation {
110
- relation: string;
111
- entry: JikanResource[];
112
- }
113
-
114
- interface SeasonsListData {
115
- year: number;
116
- seasons: AnimeSeason[];
117
- }
118
-
119
- interface Statistics {
120
- completed: number;
121
- on_hold: number;
122
- dropped: number;
123
- total: number;
124
- scores: StatisticsScore[];
125
- }
126
- interface StatisticsScore {
127
- score: number;
128
- votes: number;
129
- percentage: number;
130
- }
131
-
132
- interface JikanForum {
133
- mal_id: number;
134
- url: string;
135
- title: string;
136
- date: string;
137
- author_username: string;
138
- author_url: string;
139
- comments: number;
140
- last_comment: {
141
- url: string;
142
- author_username: string;
143
- author_url: string;
144
- date: string;
145
- };
146
- }
147
- type ForumFilter = 'all' | 'episode' | 'other';
148
-
149
- interface JikanExternalLink {
150
- name: string;
151
- url: string;
152
- }
153
-
154
- interface AnimeCharacter extends CommonCharacter {
155
- voice_actors: CharacterVoiceActor[];
156
- }
157
-
158
- interface AnimeEpisode {
159
- mal_id: number;
160
- url: string;
161
- title: string;
162
- title_japanese: string;
163
- title_romanji: string;
164
- duration: number;
165
- aired: string;
166
- filler: boolean;
167
- recap: boolean;
168
- forum_url: string;
169
- }
170
-
171
- interface AnimePicture {
172
- images: JikanImages;
173
- }
174
-
175
- interface AnimeStaff {
176
- person: JikanPerson;
177
- positions: string[];
178
- }
179
-
180
- interface AnimeStatistics extends Statistics {
181
- watching: number;
182
- plan_to_watch: number;
183
- }
184
-
185
- interface AnimeVideos {
186
- promo: AnimePromoVideo[];
187
- episodes: AnimeEpisodeVideo[];
188
- music_videos: AnimeMusicVideo[];
189
- }
190
- interface AnimePromoVideo {
191
- title: string;
192
- trailer: AnimeYoutubeVideo;
193
- }
194
- interface AnimeYoutubeVideo {
195
- youtube_id: string;
196
- url: string;
197
- embed_url: string;
198
- images?: JikanImagesCollection;
199
- }
200
- interface AnimeEpisodeVideo {
201
- mal_id: number;
202
- url: string;
203
- title: string;
204
- episode: string;
205
- images: JikanImages;
206
- }
207
- interface AnimeMusicVideo {
208
- title: string;
209
- video: AnimeYoutubeVideo;
210
- meta: AnimeVideoMeta;
211
- }
212
- interface AnimeVideoMeta {
213
- title: string;
214
- author: string;
215
- }
216
-
217
- interface Anime {
218
- mal_id: number;
219
- url: string;
220
- images: JikanImages;
221
- trailer: AnimeYoutubeVideo;
222
- approved: boolean;
223
- titles: JikanResourceTitle[];
224
- title: string;
225
- title_english?: string;
226
- title_japanese: string;
227
- title_synonyms: string[];
228
- type: AnimeType;
229
- source: string;
230
- episodes: number;
231
- status: AnimeStatus;
232
- airing: boolean;
233
- aired: JikanResourcePeriod;
234
- duration: string;
235
- rating: AnimeRating;
236
- score: number;
237
- scored_by: number;
238
- rank: number;
239
- popularity: number;
240
- members: number;
241
- favorites: number;
242
- synopsis?: string;
243
- background: string;
244
- season?: AnimeSeason;
245
- year: number;
246
- broadcast: AnimeBroadcast;
247
- producers: JikanResource[];
248
- licensors: JikanResource[];
249
- studios: JikanResource[];
250
- genres: JikanResource[];
251
- explicit_genres: JikanResource[];
252
- themes: JikanResource[];
253
- demographics: JikanResource[];
254
- relations?: JikanResourceRelation[];
255
- theme?: AnimeTheme;
256
- external?: JikanNamedResource[];
257
- streaming: JikanNamedResource[];
258
- }
259
- interface AnimeBroadcast {
260
- day: string;
261
- time: string;
262
- timezone: string;
263
- string: string;
264
- }
265
- interface AnimeTheme {
266
- openings: string[];
267
- endings: string[];
268
- }
269
- type AnimeType = 'TV' | 'Movie' | 'Ova' | 'Special' | 'Ona' | 'Music';
270
- type AnimeStatus = 'Finished Airing' | 'Currently Airing' | 'Complete' | 'Not yet aired';
271
- type AnimeRating = 'g' | 'pg' | 'pg13' | 'r17' | 'r' | 'rx';
272
- type AnimeSeason = 'spring' | 'summer' | 'fall' | 'winter';
273
-
274
- interface Character {
275
- mal_id: number;
276
- url: string;
277
- images: JikanImages;
278
- name: string;
279
- name_kanji: string;
280
- nicknames: string[];
281
- favorites: number;
282
- about: string;
283
- }
284
- interface CharacterFull extends Character {
285
- anime: CharacterAnime[];
286
- manga: CharacterManga[];
287
- voices: CharacterVoiceActor[];
288
- }
289
- interface CharacterAnime {
290
- role: CharacterRole;
291
- anime: CommonCharacterData & {
292
- title: string;
293
- };
294
- }
295
- interface CharacterManga {
296
- role: CharacterRole;
297
- manga: CommonCharacterData & {
298
- title: string;
299
- };
300
- }
301
-
302
- interface Genre extends JikanNamedResource {
303
- mal_id: number;
304
- count: number;
305
- }
306
-
307
- interface MangaStatistics extends Statistics {
308
- reading: number;
309
- plan_to_read: number;
310
- }
311
-
312
- interface Manga {
313
- mal_id: number;
314
- url: string;
315
- images: JikanImages;
316
- approved: boolean;
317
- titles: JikanResourceTitle[];
318
- title: string;
319
- title_english?: string;
320
- title_japanese: string;
321
- title_synonyms?: string[];
322
- type: MangaType;
323
- chapters: number;
324
- volumes: number;
325
- status: MangaStatus;
326
- publishing: boolean;
327
- published: JikanResourcePeriod;
328
- score: number;
329
- scored_by: number;
330
- rank: number;
331
- popularity: number;
332
- members: number;
333
- favorites: number;
334
- synopsis: string;
335
- background: string;
336
- authors: JikanResource[];
337
- serializations: JikanResource[];
338
- genres: JikanResource[];
339
- explicit_genres: JikanResource[];
340
- themes: JikanResource[];
341
- demographics: JikanResource[];
342
- relations?: JikanResourceRelation[];
343
- external?: JikanNamedResource[];
344
- }
345
- type MangaType = 'Manga' | 'Novel' | 'Lightnovel' | 'Oneshot' | 'Doujin' | 'Manhwa' | 'Manhua';
346
- type MangaStatus = 'Publishing' | 'Complete' | 'On Hiatus' | 'Discontinued' | 'Upcoming';
347
-
348
- type SortOptions = 'asc' | 'desc';
349
- type SearchOrder = 'mal_id' | 'title' | 'start_date' | 'end_date' | 'score' | 'scored_by' | 'rank' | 'popularity' | 'members' | 'favorites';
350
- type AnimeSearchOrder = 'type' | 'rating' | 'episodes' | SearchOrder;
351
- type AnimeSearchStatus = 'airing' | 'complete' | 'upcoming';
352
- type MangaSearchOrder = 'chapters' | 'volumes' | SearchOrder;
353
- type MangaSearchStatus = 'publishing' | 'complete' | 'hiatus' | 'discontinued' | 'upcoming';
354
- interface JikanSearchParams {
355
- q?: string;
356
- page?: number;
357
- limit?: number;
358
- score?: number;
359
- min_score?: number;
360
- max_score?: number;
361
- sfw?: boolean;
362
- genres?: string;
363
- genres_exclude?: string;
364
- sort?: SortOptions;
365
- letter?: string;
366
- producers?: string;
367
- start_date?: string;
368
- end_date?: string;
369
- unapproved?: boolean;
370
- }
371
- /**
372
- * QueryParams used in **getMangaSearch** call
373
- *
374
- * See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/manga/operation/getMangaSearch)
375
- */
376
- interface MangaSearchParams extends JikanSearchParams {
377
- type?: MangaType;
378
- status?: MangaSearchStatus;
379
- order_by?: MangaSearchOrder;
380
- magazines?: string;
381
- }
382
- /**
383
- * QueryParams used in **getAnimeSearch** call
384
- *
385
- * See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/anime/operation/getAnimeSearch)
386
- */
387
- interface AnimeSearchParams extends JikanSearchParams {
388
- type?: AnimeType;
389
- status?: AnimeSearchStatus;
390
- rating?: AnimeRating;
391
- order_by?: AnimeSearchOrder;
392
- }
393
-
394
- interface CharactersSearchParams {
395
- page?: number;
396
- limit?: number;
397
- q?: string;
398
- order_by?: CharactersSearchOrder;
399
- sort?: SortOptions;
400
- letter?: string;
401
- }
402
- type CharactersSearchOrder = 'mal_id' | 'name' | 'favorites';
403
-
404
- type GenresFilter = 'genres' | 'explicit_genres' | 'themes' | 'demographics';
405
-
406
- interface SchedulesParams {
407
- page?: number;
408
- limit?: number;
409
- filter?: SchedulesFilter;
410
- kids?: boolean;
411
- sfw?: boolean;
412
- unapproved?: boolean;
413
- }
414
- type SchedulesFilter = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'unknown' | 'other';
415
-
416
- interface JikanSeasonsParams {
417
- page?: number;
418
- limit?: number;
419
- filter?: AnimeType;
420
- }
421
- /**
422
- * QueryParams used in **getSeasonNow** call
423
- */
424
- type SeasonNowParams = Omit<JikanSeasonsParams, 'filter'>;
425
-
426
- type TopFilter = 'upcoming' | 'bypopularity' | 'favorite';
427
- type TopAnimeFilter = 'airing' | TopFilter;
428
- type TopMangaFilter = 'publishing' | TopFilter;
429
- interface JikanTopParams {
430
- page?: number;
431
- limit?: number;
432
- }
433
- /**
434
- * QueryParams used in **getTopAnime** call
435
- *
436
- * See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/top/operation/getTopAnime)
437
- */
438
- interface AnimeTopParams extends JikanTopParams {
439
- type?: AnimeType;
440
- filter?: TopAnimeFilter;
441
- }
442
- /**
443
- * QueryParams used in **getTopManga** call
444
- *
445
- * See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/top/operation/getTopManga)
446
- */
447
- interface MangaTopParams extends JikanTopParams {
448
- type?: MangaType;
449
- filter?: TopMangaFilter;
450
- }
451
-
452
- interface JikanPagination {
453
- last_visible_page: number;
454
- has_next_page: boolean;
455
- items?: JikanPaginationItems;
456
- }
457
- interface JikanPaginationItems {
458
- count: number;
459
- total: number;
460
- per_page: number;
461
- }
462
- interface JikanResponse<T> {
463
- data: T;
464
- pagination?: JikanPagination;
465
- }
466
-
467
- /**
468
- * **Client Args**
469
- *
470
- * Used to pass optional configuration for logging and cache to the clients.
471
- */
472
- interface ClientArgs {
473
- /**
474
- * **EnableLogging**
475
- * Enables logging request responses.
476
- */
477
- enableLogging: boolean;
478
- /**
479
- * **Axios Cache Options**
480
- * Options for cache.
481
- * @see https://axios-cache-interceptor.js.org/#/pages/configuration
482
- */
483
- cacheOptions: Partial<CacheOptions>;
484
- /**
485
- * **Base URL**
486
- * Location of the JikanAPI. Leave empty to use the official JikanAPI instance.
487
- */
488
- baseURL: string;
489
- /**
490
- * **Axios Instance**
491
- * Еhe ability to build your own axios instance if you need it
492
- */
493
- axiosInstance?: AxiosInstance;
494
- }
495
- /**
496
- * **Base Client**
497
- *
498
- * This client is responsible for creating an Axios Instance and the cache and logging configurations
499
- */
500
- declare abstract class BaseClient {
501
- private api;
502
- constructor(clientOptions?: Partial<ClientArgs>);
503
- protected getResource<T>(endpoint: string, pathParams?: {
504
- [key in string]: unknown;
505
- }, params?: {
506
- [key in string]: unknown;
507
- }): Promise<JikanResponse<T>>;
508
- private replacePathParams;
509
- private addLoggingInterceptors;
510
- }
511
-
512
- /**
513
- * **Anime Client**
514
- *
515
- * Client used to access the Anime Endpoints:
516
- *
517
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
518
- */
519
- declare class AnimeClient extends BaseClient {
520
- /**
521
- * Get complete anime resource data
522
- * @param id anime id
523
- */
524
- getAnimeFullById(id: number): Promise<JikanResponse<Anime>>;
525
- /**
526
- * Get anime resource
527
- * @param id anime id
528
- */
529
- getAnimeById(id: number): Promise<JikanResponse<Anime>>;
530
- /**
531
- * Get characters of a specific anime
532
- * @param id anime id
533
- */
534
- getAnimeCharacters(id: number): Promise<JikanResponse<AnimeCharacter[]>>;
535
- /**
536
- * Get staff of a specific Anime
537
- * @param id anime id
538
- */
539
- getAnimeStaff(id: number): Promise<JikanResponse<AnimeStaff[]>>;
540
- /**
541
- * Get a list of all the episodes of a specific anime
542
- * @param id anime id
543
- * @param page page number
544
- */
545
- getAnimeEpisodes(id: number, page?: number): Promise<JikanResponse<AnimeEpisode[]>>;
546
- /**
547
- * Get a single episode of a specific anime by its id
548
- * @param anime_id anime id
549
- * @param episode_id episode id
550
- */
551
- getAnimeEpisodeById(anime_id: number, episode_id: number): Promise<JikanResponse<AnimeEpisode>>;
552
- /**
553
- * Get a list of news articles related to the anime
554
- * @param id anime id
555
- * @param page page number
556
- */
557
- getAnimeNews(id: number, page: number): Promise<JikanResponse<JikanNews[]>>;
558
- /**
559
- * Get a list of forum topics related to the anime
560
- * @param id anime id
561
- * @param filter filter topics
562
- */
563
- getAnimeForum(id: number, filter?: ForumFilter): Promise<JikanResponse<JikanForum[]>>;
564
- /**
565
- * Get videos related to the anime
566
- * @param id anime id
567
- */
568
- getAnimeVideos(id: number): Promise<JikanResponse<AnimeVideos>>;
569
- /**
570
- * Get episode videos related to the anime
571
- * @param id anime id
572
- * @param page page number
573
- */
574
- getAnimeEpisodeVideos(id: number, page?: number): Promise<JikanResponse<AnimeEpisodeVideo[]>>;
575
- /**
576
- * Get pictures related to the Anime
577
- * @param id anime id
578
- */
579
- getAnimePictures(id: number): Promise<JikanResponse<AnimePicture[]>>;
580
- /**
581
- * Get statistics related to the Anime
582
- * @param id anime id
583
- */
584
- getAnimeStatistics(id: number): Promise<JikanResponse<AnimeStatistics>>;
585
- /**
586
- * Get more info related to the anime
587
- * @param id anime id
588
- */
589
- getAnimeMoreInfo(id: number): Promise<JikanResponse<JikanMoreInfo>>;
590
- /**
591
- * Get recommendations based on the anime
592
- * @param id anime id
593
- */
594
- getAnimeRecommendations(id: number): Promise<JikanResponse<Recommendation[]>>;
595
- /**
596
- * Get anime relations
597
- * @param id anime id
598
- */
599
- getAnimeRelations(id: number): Promise<JikanResponse<JikanRelation[]>>;
600
- /**
601
- * Get anime external links
602
- * @param id anime id
603
- */
604
- getAnimeExternal(id: number): Promise<JikanResponse<JikanExternalLink[]>>;
605
- /**
606
- * Get all the Animes within the given filter. Returns all the Animes if no filters are given.
607
- * @param searchParams Filter parameters
608
- */
609
- getAnimeSearch(searchParams?: Partial<AnimeSearchParams>): Promise<JikanResponse<Anime[]>>;
610
- }
611
-
612
- /**
613
- * **Characters Client**
614
- *
615
- * Client used to access the Character Endpoints:
616
- *
617
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
618
- */
619
- declare class CharactersClient extends BaseClient {
620
- /**
621
- * Get complete Character data
622
- * @param id The Character ID
623
- */
624
- getCharacterFullById(id: number): Promise<JikanResponse<CharacterFull>>;
625
- /**
626
- * Get Character data
627
- * @param id The Character ID
628
- */
629
- getCharacterById(id: number): Promise<JikanResponse<Character>>;
630
- /**
631
- * Get Character anime data
632
- * @param id The Character ID
633
- */
634
- getCharacterAnime(id: number): Promise<JikanResponse<CharacterAnime[]>>;
635
- /**
636
- * Get Character manga data
637
- * @param id The Character ID
638
- */
639
- getCharacterManga(id: number): Promise<JikanResponse<CharacterManga[]>>;
640
- /**
641
- * Get Character voices data
642
- * @param id The Character ID
643
- */
644
- getCharacterVoiceActors(id: number): Promise<JikanResponse<CharacterVoiceActor[]>>;
645
- /**
646
- * Get Character pictures data
647
- * @param id The Character ID
648
- */
649
- getCharacterPictures(id: number): Promise<JikanResponse<JikanImagesCollection[]>>;
650
- /**
651
- * Get all the Characters within the given filter. Returns all Characters if no filters are given.
652
- * @param searchParams Filter parameters
653
- */
654
- getCharacterSearch(searchParams: Partial<CharactersSearchParams>): Promise<JikanResponse<Character[]>>;
655
- }
656
-
657
- /**
658
- * **Genres Client**
659
- *
660
- * Client used to access the Genres Endpoints:
661
- *
662
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
663
- */
664
- declare class GenresClient extends BaseClient {
665
- /**
666
- * Get Anime genres
667
- * @param filter Type of the desired genres
668
- */
669
- getAnimeGenres(filter?: GenresFilter): Promise<JikanResponse<Genre[]>>;
670
- /**
671
- * Get Manga genres
672
- * @param filter Type of the desired genres
673
- */
674
- getMangaGenres(filter?: GenresFilter): Promise<JikanResponse<Genre[]>>;
675
- }
676
-
677
- /**
678
- * **Manga Client**
679
- *
680
- * Client used to access the Manga Endpoints:
681
- *
682
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
683
- */
684
- declare class MangaClient extends BaseClient {
685
- /**
686
- * Get a Manga with full information by its ID
687
- * @param id The Manga ID
688
- */
689
- getMangaFullById(id: number): Promise<JikanResponse<Manga>>;
690
- /**
691
- * Get a Manga by its ID
692
- * @param id The Manga ID
693
- */
694
- getMangaById(id: number): Promise<JikanResponse<Manga>>;
695
- /**
696
- * Get Characters of a specific Manga
697
- * @param id The Manga ID
698
- */
699
- getMangaCharacters(id: number): Promise<JikanResponse<CommonCharacter[]>>;
700
- /**
701
- * Get a list of manga news
702
- * @param id The Manga ID
703
- */
704
- getMangaNews(id: string): Promise<JikanResponse<JikanNews[]>>;
705
- /**
706
- * Get a list og manga forum topics
707
- * @param id The manga ID
708
- * @param filter Filter topics
709
- */
710
- getMangaTopics(id: string, filter?: ForumFilter): Promise<JikanResponse<JikanForum[]>>;
711
- /**
712
- * Get Pictures related to a specific Manga
713
- * @param id The Manga ID
714
- */
715
- getMangaPictures(id: number): Promise<JikanResponse<JikanImages[]>>;
716
- /**
717
- * Get Statistics related to a specific Manga
718
- * @param id The Manga ID
719
- */
720
- getMangaStatistics(id: number): Promise<JikanResponse<MangaStatistics>>;
721
- /**
722
- * Get more info related to the manga
723
- * @param id manga id
724
- */
725
- getMangaMoreInfo(id: number): Promise<JikanResponse<JikanMoreInfo>>;
726
- /**
727
- * Get Recommendations related to a specific Manga
728
- * @param id The Manga ID
729
- */
730
- getMangaRecommendations(id: number): Promise<JikanResponse<Recommendation[]>>;
731
- /**
732
- * Get anime Relations
733
- * @param id manga id
734
- */
735
- getMangaRelations(id: number): Promise<JikanResponse<JikanRelation[]>>;
736
- /**
737
- * Get manga external links
738
- * @param id manga id
739
- */
740
- getMangaExternal(id: number): Promise<JikanResponse<JikanExternalLink[]>>;
741
- /**
742
- * Get all the filtered Mangas. Returns all the Mangas if no filters are given.
743
- * @param searchParams Filter parameters
744
- */
745
- getMangaSearch(searchParams?: Partial<MangaSearchParams>): Promise<JikanResponse<Manga[]>>;
746
- }
747
-
748
- /**
749
- * **Random Client**
750
- *
751
- * Client used to access the Random Endpoints:
752
- *
753
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
754
- */
755
- declare class RandomClient extends BaseClient {
756
- /**
757
- * Get random anime
758
- */
759
- getRandomAnime(): Promise<JikanResponse<Anime>>;
760
- /**
761
- * Get random manga
762
- */
763
- getRandomManga(): Promise<JikanResponse<Manga>>;
764
- /**
765
- * Get random character
766
- */
767
- getRandomCharacters(): Promise<JikanResponse<Character>>;
768
- }
769
-
770
- /**
771
- * **Schedules Client**
772
- *
773
- * Client used to access the Schedules Endpoints
774
- *
775
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
776
- */
777
- declare class SchedulesClient extends BaseClient {
778
- /**
779
- * Returns weekly schedule
780
- * @param searchParams Filter parameters
781
- */
782
- getSchedules(searchParams?: Partial<SchedulesParams>): Promise<JikanResponse<Anime[]>>;
783
- }
784
-
785
- /**
786
- * **Seasons Client**
787
- *
788
- * Client used to access the Seasons Endpoints
789
- *
790
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
791
- */
792
- declare class SeasonsClient extends BaseClient {
793
- /**
794
- * Get the seasonal anime by year and season
795
- * @param year Season year
796
- * @param season Season value
797
- * @param searchParams Filter parameters
798
- */
799
- getSeason(year: number, season: AnimeSeason, searchParams?: Partial<JikanSeasonsParams>): Promise<JikanResponse<Anime[]>>;
800
- /**
801
- * Get current seasonal anime
802
- * @param searchParams Filter parameters
803
- */
804
- getSeasonNow(searchParams?: Partial<SeasonNowParams>): Promise<JikanResponse<Anime[]>>;
805
- /**
806
- * Get available list of seasons
807
- */
808
- getSeasonsList(): Promise<JikanResponse<SeasonsListData[]>>;
809
- /**
810
- * Get upcoming season's anime
811
- * @param searchParams Filter parameters
812
- */
813
- getSeasonUpcoming(searchParams?: Partial<JikanSeasonsParams>): Promise<JikanResponse<Anime[]>>;
814
- }
815
-
816
- /**
817
- * **Top Client**
818
- *
819
- * Client used to access the Top Endpoints:
820
- *
821
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
822
- */
823
- declare class TopClient extends BaseClient {
824
- /**
825
- * Get the top Animes
826
- * @param searchParams Filter parameters
827
- */
828
- getTopAnime(searchParams?: Partial<AnimeTopParams>): Promise<JikanResponse<Anime[]>>;
829
- /**
830
- * Get the top Mangas
831
- * @param searchParams Filter parameters
832
- */
833
- getTopManga(searchParams?: Partial<MangaTopParams>): Promise<JikanResponse<Manga[]>>;
834
- /**
835
- * Get the top Characters
836
- * @param searchParams Filter parameters
837
- */
838
- getTopCharacters(searchParams?: Partial<JikanTopParams>): Promise<JikanResponse<Character[]>>;
839
- }
840
-
841
- /**
842
- * **Jikan Client**
843
- *
844
- * The main client used to access all the Jikan Endpoints:
845
- *
846
- * See also: [Jikan Documentation](https://docs.api.jikan.moe/)
847
- */
848
- declare class JikanClient {
849
- anime: AnimeClient;
850
- characters: CharactersClient;
851
- genres: GenresClient;
852
- manga: MangaClient;
853
- top: TopClient;
854
- schedules: SchedulesClient;
855
- seasons: SeasonsClient;
856
- random: RandomClient;
857
- constructor(clientOptions?: Partial<ClientArgs>);
858
- }
859
-
860
- declare const handleRequest: (requestConfig: InternalCacheRequestConfig) => InternalCacheRequestConfig;
861
- declare const handleRequestError: (error: AxiosError) => Promise<AxiosError>;
862
- declare const handleResponse: (response: CacheAxiosResponse) => CacheAxiosResponse;
863
- declare const handleResponseError: (error: AxiosError) => Promise<AxiosError>;
864
-
865
- declare const BaseURL = "https://api.jikan.moe/v4";
866
-
867
- declare const AnimeEndpoints: {
868
- readonly animeFullById: "/anime/{id}/full";
869
- readonly animeById: "/anime/{id}";
870
- readonly animeCharacters: "/anime/{id}/characters";
871
- readonly animeStaff: "/anime/{id}/staff";
872
- readonly animeEpisodes: "/anime/{id}/episodes";
873
- readonly animeEpisodeById: "/anime/{id}/episodes/{episode}";
874
- readonly animeNews: "/anime/{id}/news";
875
- readonly animeForum: "/anime/{id}/forum";
876
- readonly animeVideos: "/anime/{id}/videos";
877
- readonly animeVideosEpisodes: "/anime/{id}/videos/episodes";
878
- readonly animePictures: "/anime/{id}/pictures";
879
- readonly animeStatistics: "/anime/{id}/statistics";
880
- readonly animeMoreInfo: "/anime/{id}/moreinfo";
881
- readonly animeRecommendations: "/anime/{id}/recommendations";
882
- readonly animeUserUpdates: "/anime/{id}/userupdates";
883
- readonly animeReviews: "/anime/{id}/reviews";
884
- readonly animeRelations: "/anime/{id}/relations";
885
- readonly animeThemes: "/anime/{id}/themes";
886
- readonly animeExternal: "/anime/{id}/external";
887
- readonly animeStreaming: "/anime/{id}/streaming";
888
- readonly animeSearch: "/anime";
889
- };
890
-
891
- declare const CharactersEndpoints: {
892
- readonly characterFullById: "/characters/{id}/full";
893
- readonly characterById: "/characters/{id}";
894
- readonly characterAnime: "/characters/{id}/anime";
895
- readonly charactersManga: "/characters/{id}/manga";
896
- readonly characterVoiceActors: "/characters/{id}/voices";
897
- readonly characterPictures: "/characters/{id}/pictures";
898
- readonly characterSearch: "/characters";
899
- };
900
-
901
- declare const GenresEndpoints: {
902
- readonly animeGenres: "/genres/anime";
903
- readonly mangaGenres: "/genres/manga";
904
- };
905
-
906
- declare const MangaEndpoints: {
907
- readonly mangaSearch: "/manga";
908
- readonly mangaFullById: "/manga/{id}/full";
909
- readonly mangaById: "/manga/{id}";
910
- readonly mangaCharacters: "/manga/{id}/characters";
911
- readonly mangaNews: "manga/{id}/news";
912
- readonly mangaTopics: "/manga/{id}/forum";
913
- readonly mangaPictures: "/manga/{id}/pictures";
914
- readonly mangaStatistics: "/manga/{id}/statistics";
915
- readonly mangaMoreInfo: "/manga/{id}/moreinfo";
916
- readonly mangaRelations: "manga/{id}/relations";
917
- readonly mangaExternal: "/manga/{id}/external";
918
- readonly mangaRecommendations: "/manga/{id}/recommendations";
919
- };
920
-
921
- declare const SeasonsEndpoints: {
922
- readonly season: "/seasons/{year}/{season}";
923
- readonly seasonNow: "/seasons/now";
924
- readonly seasonsList: "/seasons";
925
- readonly seasonUpcoming: "/seasons/upcoming";
926
- };
927
-
928
- declare const TopEndpoints: {
929
- readonly topAnime: "/top/anime";
930
- readonly topManga: "/top/manga";
931
- readonly topCharacters: "/top/characters";
932
- };
933
-
934
- declare const RandomEndpoints: {
935
- readonly randomAnime: "/random/anime";
936
- readonly randomManga: "/random/manga";
937
- readonly randomCharacters: "/random/characters";
938
- };
939
-
940
- export { type Anime, type AnimeBroadcast, type AnimeCharacter, AnimeClient, AnimeEndpoints, type AnimeEpisode, type AnimeEpisodeVideo, type AnimeMusicVideo, type AnimePicture, type AnimePromoVideo, type AnimeRating, type AnimeSearchOrder, type AnimeSearchParams, type AnimeSearchStatus, type AnimeSeason, type AnimeStaff, type AnimeStatistics, type AnimeStatus, type AnimeTheme, type AnimeTopParams, type AnimeType, type AnimeVideoMeta, type AnimeVideos, type AnimeYoutubeVideo, BaseClient, BaseURL, type Character, type CharacterAnime, type CharacterFull, type CharacterManga, type CharacterRole, type CharacterVoiceActor, CharactersClient, CharactersEndpoints, type CharactersSearchOrder, type CharactersSearchParams, type ClientArgs, type CommonCharacter, type CommonCharacterData, type ForumFilter, type Genre, GenresClient, GenresEndpoints, type GenresFilter, JikanClient, type JikanExternalLink, type JikanForum, type JikanImages, type JikanImagesCollection, type JikanMoreInfo, type JikanNamedResource, type JikanNews, type JikanPagination, type JikanPaginationItems, type JikanPerson, type JikanRelation, type JikanResource, type JikanResourcePeriod, type JikanResourceRelation, type JikanResourceTitle, type JikanResponse, type JikanSearchParams, type JikanSeasonsParams, type JikanTopParams, type Manga, MangaClient, MangaEndpoints, type MangaSearchOrder, type MangaSearchParams, type MangaSearchStatus, type MangaStatistics, type MangaStatus, type MangaTopParams, type MangaType, RandomClient, RandomEndpoints, type Recommendation, type RecommendationEntry, type RelationEntry, SchedulesClient, type SchedulesFilter, type SchedulesParams, type SearchOrder, type SeasonNowParams, SeasonsClient, SeasonsEndpoints, type SeasonsListData, type SortOptions, type Statistics, type StatisticsScore, type TopAnimeFilter, TopClient, TopEndpoints, type TopMangaFilter, handleRequest, handleRequestError, handleResponse, handleResponseError };
1
+ export * from './client';