ani-client 1.4.3 → 1.4.4
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/README.md +9 -548
- package/dist/index.d.mts +87 -75
- package/dist/index.d.ts +87 -75
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -4
package/dist/index.d.mts
CHANGED
|
@@ -96,6 +96,18 @@ interface AniListClientOptions {
|
|
|
96
96
|
hooks?: AniListHooks;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
declare enum StaffSort {
|
|
100
|
+
ID = "ID",
|
|
101
|
+
ID_DESC = "ID_DESC",
|
|
102
|
+
ROLE = "ROLE",
|
|
103
|
+
ROLE_DESC = "ROLE_DESC",
|
|
104
|
+
LANGUAGE = "LANGUAGE",
|
|
105
|
+
LANGUAGE_DESC = "LANGUAGE_DESC",
|
|
106
|
+
SEARCH_MATCH = "SEARCH_MATCH",
|
|
107
|
+
FAVOURITES = "FAVOURITES",
|
|
108
|
+
FAVOURITES_DESC = "FAVOURITES_DESC",
|
|
109
|
+
RELEVANCE = "RELEVANCE"
|
|
110
|
+
}
|
|
99
111
|
interface StaffName {
|
|
100
112
|
first: string | null;
|
|
101
113
|
middle: string | null;
|
|
@@ -176,7 +188,7 @@ interface StaffIncludeOptions {
|
|
|
176
188
|
}
|
|
177
189
|
interface SearchStaffOptions {
|
|
178
190
|
query?: string;
|
|
179
|
-
sort?:
|
|
191
|
+
sort?: StaffSort[];
|
|
180
192
|
page?: number;
|
|
181
193
|
perPage?: number;
|
|
182
194
|
}
|
|
@@ -259,6 +271,78 @@ interface SearchCharacterOptions {
|
|
|
259
271
|
voiceActors?: boolean;
|
|
260
272
|
}
|
|
261
273
|
|
|
274
|
+
declare enum MediaListStatus {
|
|
275
|
+
CURRENT = "CURRENT",
|
|
276
|
+
PLANNING = "PLANNING",
|
|
277
|
+
COMPLETED = "COMPLETED",
|
|
278
|
+
DROPPED = "DROPPED",
|
|
279
|
+
PAUSED = "PAUSED",
|
|
280
|
+
REPEATING = "REPEATING"
|
|
281
|
+
}
|
|
282
|
+
declare enum MediaListSort {
|
|
283
|
+
MEDIA_ID = "MEDIA_ID",
|
|
284
|
+
MEDIA_ID_DESC = "MEDIA_ID_DESC",
|
|
285
|
+
SCORE = "SCORE",
|
|
286
|
+
SCORE_DESC = "SCORE_DESC",
|
|
287
|
+
STATUS = "STATUS",
|
|
288
|
+
STATUS_DESC = "STATUS_DESC",
|
|
289
|
+
PROGRESS = "PROGRESS",
|
|
290
|
+
PROGRESS_DESC = "PROGRESS_DESC",
|
|
291
|
+
PROGRESS_VOLUMES = "PROGRESS_VOLUMES",
|
|
292
|
+
PROGRESS_VOLUMES_DESC = "PROGRESS_VOLUMES_DESC",
|
|
293
|
+
REPEAT = "REPEAT",
|
|
294
|
+
REPEAT_DESC = "REPEAT_DESC",
|
|
295
|
+
PRIORITY = "PRIORITY",
|
|
296
|
+
PRIORITY_DESC = "PRIORITY_DESC",
|
|
297
|
+
STARTED_ON = "STARTED_ON",
|
|
298
|
+
STARTED_ON_DESC = "STARTED_ON_DESC",
|
|
299
|
+
FINISHED_ON = "FINISHED_ON",
|
|
300
|
+
FINISHED_ON_DESC = "FINISHED_ON_DESC",
|
|
301
|
+
ADDED_TIME = "ADDED_TIME",
|
|
302
|
+
ADDED_TIME_DESC = "ADDED_TIME_DESC",
|
|
303
|
+
UPDATED_TIME = "UPDATED_TIME",
|
|
304
|
+
UPDATED_TIME_DESC = "UPDATED_TIME_DESC",
|
|
305
|
+
MEDIA_TITLE_ROMAJI = "MEDIA_TITLE_ROMAJI",
|
|
306
|
+
MEDIA_TITLE_ROMAJI_DESC = "MEDIA_TITLE_ROMAJI_DESC",
|
|
307
|
+
MEDIA_TITLE_ENGLISH = "MEDIA_TITLE_ENGLISH",
|
|
308
|
+
MEDIA_TITLE_ENGLISH_DESC = "MEDIA_TITLE_ENGLISH_DESC",
|
|
309
|
+
MEDIA_TITLE_NATIVE = "MEDIA_TITLE_NATIVE",
|
|
310
|
+
MEDIA_TITLE_NATIVE_DESC = "MEDIA_TITLE_NATIVE_DESC",
|
|
311
|
+
MEDIA_POPULARITY = "MEDIA_POPULARITY",
|
|
312
|
+
MEDIA_POPULARITY_DESC = "MEDIA_POPULARITY_DESC"
|
|
313
|
+
}
|
|
314
|
+
interface MediaListEntry {
|
|
315
|
+
id: number;
|
|
316
|
+
mediaId: number;
|
|
317
|
+
status: MediaListStatus;
|
|
318
|
+
score: number | null;
|
|
319
|
+
progress: number | null;
|
|
320
|
+
progressVolumes: number | null;
|
|
321
|
+
repeat: number | null;
|
|
322
|
+
priority: number | null;
|
|
323
|
+
private: boolean | null;
|
|
324
|
+
notes: string | null;
|
|
325
|
+
startedAt: FuzzyDate | null;
|
|
326
|
+
completedAt: FuzzyDate | null;
|
|
327
|
+
updatedAt: number | null;
|
|
328
|
+
createdAt: number | null;
|
|
329
|
+
media: Media;
|
|
330
|
+
}
|
|
331
|
+
interface GetUserMediaListOptions {
|
|
332
|
+
/** User ID (provide either userId or userName) */
|
|
333
|
+
userId?: number;
|
|
334
|
+
/** Username (provide either userId or userName) */
|
|
335
|
+
userName?: string;
|
|
336
|
+
/** ANIME or MANGA */
|
|
337
|
+
type: MediaType;
|
|
338
|
+
/** Filter by list status (CURRENT, COMPLETED, etc.) */
|
|
339
|
+
status?: MediaListStatus;
|
|
340
|
+
/** Sort order */
|
|
341
|
+
sort?: MediaListSort[];
|
|
342
|
+
page?: number;
|
|
343
|
+
perPage?: number;
|
|
344
|
+
}
|
|
345
|
+
|
|
262
346
|
interface Studio {
|
|
263
347
|
id: number;
|
|
264
348
|
name: string;
|
|
@@ -462,7 +546,7 @@ interface ScoreDistribution {
|
|
|
462
546
|
amount: number;
|
|
463
547
|
}
|
|
464
548
|
interface StatusDistribution {
|
|
465
|
-
status: string;
|
|
549
|
+
status: MediaListStatus | string;
|
|
466
550
|
amount: number;
|
|
467
551
|
}
|
|
468
552
|
interface MediaStats {
|
|
@@ -633,78 +717,6 @@ interface AiringSchedule {
|
|
|
633
717
|
media: Media;
|
|
634
718
|
}
|
|
635
719
|
|
|
636
|
-
declare enum MediaListStatus {
|
|
637
|
-
CURRENT = "CURRENT",
|
|
638
|
-
PLANNING = "PLANNING",
|
|
639
|
-
COMPLETED = "COMPLETED",
|
|
640
|
-
DROPPED = "DROPPED",
|
|
641
|
-
PAUSED = "PAUSED",
|
|
642
|
-
REPEATING = "REPEATING"
|
|
643
|
-
}
|
|
644
|
-
declare enum MediaListSort {
|
|
645
|
-
MEDIA_ID = "MEDIA_ID",
|
|
646
|
-
MEDIA_ID_DESC = "MEDIA_ID_DESC",
|
|
647
|
-
SCORE = "SCORE",
|
|
648
|
-
SCORE_DESC = "SCORE_DESC",
|
|
649
|
-
STATUS = "STATUS",
|
|
650
|
-
STATUS_DESC = "STATUS_DESC",
|
|
651
|
-
PROGRESS = "PROGRESS",
|
|
652
|
-
PROGRESS_DESC = "PROGRESS_DESC",
|
|
653
|
-
PROGRESS_VOLUMES = "PROGRESS_VOLUMES",
|
|
654
|
-
PROGRESS_VOLUMES_DESC = "PROGRESS_VOLUMES_DESC",
|
|
655
|
-
REPEAT = "REPEAT",
|
|
656
|
-
REPEAT_DESC = "REPEAT_DESC",
|
|
657
|
-
PRIORITY = "PRIORITY",
|
|
658
|
-
PRIORITY_DESC = "PRIORITY_DESC",
|
|
659
|
-
STARTED_ON = "STARTED_ON",
|
|
660
|
-
STARTED_ON_DESC = "STARTED_ON_DESC",
|
|
661
|
-
FINISHED_ON = "FINISHED_ON",
|
|
662
|
-
FINISHED_ON_DESC = "FINISHED_ON_DESC",
|
|
663
|
-
ADDED_TIME = "ADDED_TIME",
|
|
664
|
-
ADDED_TIME_DESC = "ADDED_TIME_DESC",
|
|
665
|
-
UPDATED_TIME = "UPDATED_TIME",
|
|
666
|
-
UPDATED_TIME_DESC = "UPDATED_TIME_DESC",
|
|
667
|
-
MEDIA_TITLE_ROMAJI = "MEDIA_TITLE_ROMAJI",
|
|
668
|
-
MEDIA_TITLE_ROMAJI_DESC = "MEDIA_TITLE_ROMAJI_DESC",
|
|
669
|
-
MEDIA_TITLE_ENGLISH = "MEDIA_TITLE_ENGLISH",
|
|
670
|
-
MEDIA_TITLE_ENGLISH_DESC = "MEDIA_TITLE_ENGLISH_DESC",
|
|
671
|
-
MEDIA_TITLE_NATIVE = "MEDIA_TITLE_NATIVE",
|
|
672
|
-
MEDIA_TITLE_NATIVE_DESC = "MEDIA_TITLE_NATIVE_DESC",
|
|
673
|
-
MEDIA_POPULARITY = "MEDIA_POPULARITY",
|
|
674
|
-
MEDIA_POPULARITY_DESC = "MEDIA_POPULARITY_DESC"
|
|
675
|
-
}
|
|
676
|
-
interface MediaListEntry {
|
|
677
|
-
id: number;
|
|
678
|
-
mediaId: number;
|
|
679
|
-
status: MediaListStatus;
|
|
680
|
-
score: number | null;
|
|
681
|
-
progress: number | null;
|
|
682
|
-
progressVolumes: number | null;
|
|
683
|
-
repeat: number | null;
|
|
684
|
-
priority: number | null;
|
|
685
|
-
private: boolean | null;
|
|
686
|
-
notes: string | null;
|
|
687
|
-
startedAt: FuzzyDate | null;
|
|
688
|
-
completedAt: FuzzyDate | null;
|
|
689
|
-
updatedAt: number | null;
|
|
690
|
-
createdAt: number | null;
|
|
691
|
-
media: Media;
|
|
692
|
-
}
|
|
693
|
-
interface GetUserMediaListOptions {
|
|
694
|
-
/** User ID (provide either userId or userName) */
|
|
695
|
-
userId?: number;
|
|
696
|
-
/** Username (provide either userId or userName) */
|
|
697
|
-
userName?: string;
|
|
698
|
-
/** ANIME or MANGA */
|
|
699
|
-
type: MediaType;
|
|
700
|
-
/** Filter by list status (CURRENT, COMPLETED, etc.) */
|
|
701
|
-
status?: MediaListStatus;
|
|
702
|
-
/** Sort order */
|
|
703
|
-
sort?: MediaListSort[];
|
|
704
|
-
page?: number;
|
|
705
|
-
perPage?: number;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
720
|
/**
|
|
709
721
|
* Lightweight AniList GraphQL client with built-in caching and rate limiting.
|
|
710
722
|
*
|
|
@@ -1260,4 +1272,4 @@ declare class RateLimiter {
|
|
|
1260
1272
|
private sleep;
|
|
1261
1273
|
}
|
|
1262
1274
|
|
|
1263
|
-
export { type AiringSchedule, AiringSort, AniListClient, type AniListClientOptions, AniListError, type AniListHooks, type CacheAdapter, type CacheOptions, type Character, type CharacterImage, type CharacterIncludeOptions, type CharacterMediaEdge, type CharacterName, CharacterRole, CharacterSort, type ExternalLink, type FuzzyDate, type GetAiringOptions, type GetPlanningOptions, type GetRecentChaptersOptions, type GetRecommendationsOptions, type GetSeasonOptions, type GetUserMediaListOptions, type Media, type MediaCharacterConnection, type MediaCharacterEdge, type MediaConnection, type MediaCoverImage, type MediaEdge, MediaFormat, type MediaIncludeOptions, type MediaListEntry, MediaListSort, MediaListStatus, type MediaRecommendationNode, MediaRelationType, MediaSeason, MediaSort, type MediaStaffConnection, type MediaStaffEdge, type MediaStats, MediaStatus, type MediaTag, type MediaTitle, type MediaTrailer, MediaType, MemoryCache, type PageInfo, type PagedResult, type RateLimitOptions, RateLimiter, type Recommendation, RecommendationSort, RedisCache, type RedisCacheOptions, type RedisLikeClient, type ScoreDistribution, type SearchCharacterOptions, type SearchMediaOptions, type SearchStaffOptions, type SearchStudioOptions, type Staff, type StaffImage, type StaffIncludeOptions, type StaffMediaNode, type StaffName, type StatusDistribution, type StreamingEpisode, type Studio, type StudioConnection, type StudioDetail, type User, type UserAvatar, type UserStatistics, type VoiceActor };
|
|
1275
|
+
export { type AiringSchedule, AiringSort, AniListClient, type AniListClientOptions, AniListError, type AniListHooks, type CacheAdapter, type CacheOptions, type Character, type CharacterImage, type CharacterIncludeOptions, type CharacterMediaEdge, type CharacterName, CharacterRole, CharacterSort, type ExternalLink, type FuzzyDate, type GetAiringOptions, type GetPlanningOptions, type GetRecentChaptersOptions, type GetRecommendationsOptions, type GetSeasonOptions, type GetUserMediaListOptions, type Media, type MediaCharacterConnection, type MediaCharacterEdge, type MediaConnection, type MediaCoverImage, type MediaEdge, MediaFormat, type MediaIncludeOptions, type MediaListEntry, MediaListSort, MediaListStatus, type MediaRecommendationNode, MediaRelationType, MediaSeason, MediaSort, type MediaStaffConnection, type MediaStaffEdge, type MediaStats, MediaStatus, type MediaTag, type MediaTitle, type MediaTrailer, MediaType, MemoryCache, type PageInfo, type PagedResult, type RateLimitOptions, RateLimiter, type Recommendation, RecommendationSort, RedisCache, type RedisCacheOptions, type RedisLikeClient, type ScoreDistribution, type SearchCharacterOptions, type SearchMediaOptions, type SearchStaffOptions, type SearchStudioOptions, type Staff, type StaffImage, type StaffIncludeOptions, type StaffMediaNode, type StaffName, StaffSort, type StatusDistribution, type StreamingEpisode, type Studio, type StudioConnection, type StudioDetail, type User, type UserAvatar, type UserStatistics, type VoiceActor };
|
package/dist/index.d.ts
CHANGED
|
@@ -96,6 +96,18 @@ interface AniListClientOptions {
|
|
|
96
96
|
hooks?: AniListHooks;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
declare enum StaffSort {
|
|
100
|
+
ID = "ID",
|
|
101
|
+
ID_DESC = "ID_DESC",
|
|
102
|
+
ROLE = "ROLE",
|
|
103
|
+
ROLE_DESC = "ROLE_DESC",
|
|
104
|
+
LANGUAGE = "LANGUAGE",
|
|
105
|
+
LANGUAGE_DESC = "LANGUAGE_DESC",
|
|
106
|
+
SEARCH_MATCH = "SEARCH_MATCH",
|
|
107
|
+
FAVOURITES = "FAVOURITES",
|
|
108
|
+
FAVOURITES_DESC = "FAVOURITES_DESC",
|
|
109
|
+
RELEVANCE = "RELEVANCE"
|
|
110
|
+
}
|
|
99
111
|
interface StaffName {
|
|
100
112
|
first: string | null;
|
|
101
113
|
middle: string | null;
|
|
@@ -176,7 +188,7 @@ interface StaffIncludeOptions {
|
|
|
176
188
|
}
|
|
177
189
|
interface SearchStaffOptions {
|
|
178
190
|
query?: string;
|
|
179
|
-
sort?:
|
|
191
|
+
sort?: StaffSort[];
|
|
180
192
|
page?: number;
|
|
181
193
|
perPage?: number;
|
|
182
194
|
}
|
|
@@ -259,6 +271,78 @@ interface SearchCharacterOptions {
|
|
|
259
271
|
voiceActors?: boolean;
|
|
260
272
|
}
|
|
261
273
|
|
|
274
|
+
declare enum MediaListStatus {
|
|
275
|
+
CURRENT = "CURRENT",
|
|
276
|
+
PLANNING = "PLANNING",
|
|
277
|
+
COMPLETED = "COMPLETED",
|
|
278
|
+
DROPPED = "DROPPED",
|
|
279
|
+
PAUSED = "PAUSED",
|
|
280
|
+
REPEATING = "REPEATING"
|
|
281
|
+
}
|
|
282
|
+
declare enum MediaListSort {
|
|
283
|
+
MEDIA_ID = "MEDIA_ID",
|
|
284
|
+
MEDIA_ID_DESC = "MEDIA_ID_DESC",
|
|
285
|
+
SCORE = "SCORE",
|
|
286
|
+
SCORE_DESC = "SCORE_DESC",
|
|
287
|
+
STATUS = "STATUS",
|
|
288
|
+
STATUS_DESC = "STATUS_DESC",
|
|
289
|
+
PROGRESS = "PROGRESS",
|
|
290
|
+
PROGRESS_DESC = "PROGRESS_DESC",
|
|
291
|
+
PROGRESS_VOLUMES = "PROGRESS_VOLUMES",
|
|
292
|
+
PROGRESS_VOLUMES_DESC = "PROGRESS_VOLUMES_DESC",
|
|
293
|
+
REPEAT = "REPEAT",
|
|
294
|
+
REPEAT_DESC = "REPEAT_DESC",
|
|
295
|
+
PRIORITY = "PRIORITY",
|
|
296
|
+
PRIORITY_DESC = "PRIORITY_DESC",
|
|
297
|
+
STARTED_ON = "STARTED_ON",
|
|
298
|
+
STARTED_ON_DESC = "STARTED_ON_DESC",
|
|
299
|
+
FINISHED_ON = "FINISHED_ON",
|
|
300
|
+
FINISHED_ON_DESC = "FINISHED_ON_DESC",
|
|
301
|
+
ADDED_TIME = "ADDED_TIME",
|
|
302
|
+
ADDED_TIME_DESC = "ADDED_TIME_DESC",
|
|
303
|
+
UPDATED_TIME = "UPDATED_TIME",
|
|
304
|
+
UPDATED_TIME_DESC = "UPDATED_TIME_DESC",
|
|
305
|
+
MEDIA_TITLE_ROMAJI = "MEDIA_TITLE_ROMAJI",
|
|
306
|
+
MEDIA_TITLE_ROMAJI_DESC = "MEDIA_TITLE_ROMAJI_DESC",
|
|
307
|
+
MEDIA_TITLE_ENGLISH = "MEDIA_TITLE_ENGLISH",
|
|
308
|
+
MEDIA_TITLE_ENGLISH_DESC = "MEDIA_TITLE_ENGLISH_DESC",
|
|
309
|
+
MEDIA_TITLE_NATIVE = "MEDIA_TITLE_NATIVE",
|
|
310
|
+
MEDIA_TITLE_NATIVE_DESC = "MEDIA_TITLE_NATIVE_DESC",
|
|
311
|
+
MEDIA_POPULARITY = "MEDIA_POPULARITY",
|
|
312
|
+
MEDIA_POPULARITY_DESC = "MEDIA_POPULARITY_DESC"
|
|
313
|
+
}
|
|
314
|
+
interface MediaListEntry {
|
|
315
|
+
id: number;
|
|
316
|
+
mediaId: number;
|
|
317
|
+
status: MediaListStatus;
|
|
318
|
+
score: number | null;
|
|
319
|
+
progress: number | null;
|
|
320
|
+
progressVolumes: number | null;
|
|
321
|
+
repeat: number | null;
|
|
322
|
+
priority: number | null;
|
|
323
|
+
private: boolean | null;
|
|
324
|
+
notes: string | null;
|
|
325
|
+
startedAt: FuzzyDate | null;
|
|
326
|
+
completedAt: FuzzyDate | null;
|
|
327
|
+
updatedAt: number | null;
|
|
328
|
+
createdAt: number | null;
|
|
329
|
+
media: Media;
|
|
330
|
+
}
|
|
331
|
+
interface GetUserMediaListOptions {
|
|
332
|
+
/** User ID (provide either userId or userName) */
|
|
333
|
+
userId?: number;
|
|
334
|
+
/** Username (provide either userId or userName) */
|
|
335
|
+
userName?: string;
|
|
336
|
+
/** ANIME or MANGA */
|
|
337
|
+
type: MediaType;
|
|
338
|
+
/** Filter by list status (CURRENT, COMPLETED, etc.) */
|
|
339
|
+
status?: MediaListStatus;
|
|
340
|
+
/** Sort order */
|
|
341
|
+
sort?: MediaListSort[];
|
|
342
|
+
page?: number;
|
|
343
|
+
perPage?: number;
|
|
344
|
+
}
|
|
345
|
+
|
|
262
346
|
interface Studio {
|
|
263
347
|
id: number;
|
|
264
348
|
name: string;
|
|
@@ -462,7 +546,7 @@ interface ScoreDistribution {
|
|
|
462
546
|
amount: number;
|
|
463
547
|
}
|
|
464
548
|
interface StatusDistribution {
|
|
465
|
-
status: string;
|
|
549
|
+
status: MediaListStatus | string;
|
|
466
550
|
amount: number;
|
|
467
551
|
}
|
|
468
552
|
interface MediaStats {
|
|
@@ -633,78 +717,6 @@ interface AiringSchedule {
|
|
|
633
717
|
media: Media;
|
|
634
718
|
}
|
|
635
719
|
|
|
636
|
-
declare enum MediaListStatus {
|
|
637
|
-
CURRENT = "CURRENT",
|
|
638
|
-
PLANNING = "PLANNING",
|
|
639
|
-
COMPLETED = "COMPLETED",
|
|
640
|
-
DROPPED = "DROPPED",
|
|
641
|
-
PAUSED = "PAUSED",
|
|
642
|
-
REPEATING = "REPEATING"
|
|
643
|
-
}
|
|
644
|
-
declare enum MediaListSort {
|
|
645
|
-
MEDIA_ID = "MEDIA_ID",
|
|
646
|
-
MEDIA_ID_DESC = "MEDIA_ID_DESC",
|
|
647
|
-
SCORE = "SCORE",
|
|
648
|
-
SCORE_DESC = "SCORE_DESC",
|
|
649
|
-
STATUS = "STATUS",
|
|
650
|
-
STATUS_DESC = "STATUS_DESC",
|
|
651
|
-
PROGRESS = "PROGRESS",
|
|
652
|
-
PROGRESS_DESC = "PROGRESS_DESC",
|
|
653
|
-
PROGRESS_VOLUMES = "PROGRESS_VOLUMES",
|
|
654
|
-
PROGRESS_VOLUMES_DESC = "PROGRESS_VOLUMES_DESC",
|
|
655
|
-
REPEAT = "REPEAT",
|
|
656
|
-
REPEAT_DESC = "REPEAT_DESC",
|
|
657
|
-
PRIORITY = "PRIORITY",
|
|
658
|
-
PRIORITY_DESC = "PRIORITY_DESC",
|
|
659
|
-
STARTED_ON = "STARTED_ON",
|
|
660
|
-
STARTED_ON_DESC = "STARTED_ON_DESC",
|
|
661
|
-
FINISHED_ON = "FINISHED_ON",
|
|
662
|
-
FINISHED_ON_DESC = "FINISHED_ON_DESC",
|
|
663
|
-
ADDED_TIME = "ADDED_TIME",
|
|
664
|
-
ADDED_TIME_DESC = "ADDED_TIME_DESC",
|
|
665
|
-
UPDATED_TIME = "UPDATED_TIME",
|
|
666
|
-
UPDATED_TIME_DESC = "UPDATED_TIME_DESC",
|
|
667
|
-
MEDIA_TITLE_ROMAJI = "MEDIA_TITLE_ROMAJI",
|
|
668
|
-
MEDIA_TITLE_ROMAJI_DESC = "MEDIA_TITLE_ROMAJI_DESC",
|
|
669
|
-
MEDIA_TITLE_ENGLISH = "MEDIA_TITLE_ENGLISH",
|
|
670
|
-
MEDIA_TITLE_ENGLISH_DESC = "MEDIA_TITLE_ENGLISH_DESC",
|
|
671
|
-
MEDIA_TITLE_NATIVE = "MEDIA_TITLE_NATIVE",
|
|
672
|
-
MEDIA_TITLE_NATIVE_DESC = "MEDIA_TITLE_NATIVE_DESC",
|
|
673
|
-
MEDIA_POPULARITY = "MEDIA_POPULARITY",
|
|
674
|
-
MEDIA_POPULARITY_DESC = "MEDIA_POPULARITY_DESC"
|
|
675
|
-
}
|
|
676
|
-
interface MediaListEntry {
|
|
677
|
-
id: number;
|
|
678
|
-
mediaId: number;
|
|
679
|
-
status: MediaListStatus;
|
|
680
|
-
score: number | null;
|
|
681
|
-
progress: number | null;
|
|
682
|
-
progressVolumes: number | null;
|
|
683
|
-
repeat: number | null;
|
|
684
|
-
priority: number | null;
|
|
685
|
-
private: boolean | null;
|
|
686
|
-
notes: string | null;
|
|
687
|
-
startedAt: FuzzyDate | null;
|
|
688
|
-
completedAt: FuzzyDate | null;
|
|
689
|
-
updatedAt: number | null;
|
|
690
|
-
createdAt: number | null;
|
|
691
|
-
media: Media;
|
|
692
|
-
}
|
|
693
|
-
interface GetUserMediaListOptions {
|
|
694
|
-
/** User ID (provide either userId or userName) */
|
|
695
|
-
userId?: number;
|
|
696
|
-
/** Username (provide either userId or userName) */
|
|
697
|
-
userName?: string;
|
|
698
|
-
/** ANIME or MANGA */
|
|
699
|
-
type: MediaType;
|
|
700
|
-
/** Filter by list status (CURRENT, COMPLETED, etc.) */
|
|
701
|
-
status?: MediaListStatus;
|
|
702
|
-
/** Sort order */
|
|
703
|
-
sort?: MediaListSort[];
|
|
704
|
-
page?: number;
|
|
705
|
-
perPage?: number;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
720
|
/**
|
|
709
721
|
* Lightweight AniList GraphQL client with built-in caching and rate limiting.
|
|
710
722
|
*
|
|
@@ -1260,4 +1272,4 @@ declare class RateLimiter {
|
|
|
1260
1272
|
private sleep;
|
|
1261
1273
|
}
|
|
1262
1274
|
|
|
1263
|
-
export { type AiringSchedule, AiringSort, AniListClient, type AniListClientOptions, AniListError, type AniListHooks, type CacheAdapter, type CacheOptions, type Character, type CharacterImage, type CharacterIncludeOptions, type CharacterMediaEdge, type CharacterName, CharacterRole, CharacterSort, type ExternalLink, type FuzzyDate, type GetAiringOptions, type GetPlanningOptions, type GetRecentChaptersOptions, type GetRecommendationsOptions, type GetSeasonOptions, type GetUserMediaListOptions, type Media, type MediaCharacterConnection, type MediaCharacterEdge, type MediaConnection, type MediaCoverImage, type MediaEdge, MediaFormat, type MediaIncludeOptions, type MediaListEntry, MediaListSort, MediaListStatus, type MediaRecommendationNode, MediaRelationType, MediaSeason, MediaSort, type MediaStaffConnection, type MediaStaffEdge, type MediaStats, MediaStatus, type MediaTag, type MediaTitle, type MediaTrailer, MediaType, MemoryCache, type PageInfo, type PagedResult, type RateLimitOptions, RateLimiter, type Recommendation, RecommendationSort, RedisCache, type RedisCacheOptions, type RedisLikeClient, type ScoreDistribution, type SearchCharacterOptions, type SearchMediaOptions, type SearchStaffOptions, type SearchStudioOptions, type Staff, type StaffImage, type StaffIncludeOptions, type StaffMediaNode, type StaffName, type StatusDistribution, type StreamingEpisode, type Studio, type StudioConnection, type StudioDetail, type User, type UserAvatar, type UserStatistics, type VoiceActor };
|
|
1275
|
+
export { type AiringSchedule, AiringSort, AniListClient, type AniListClientOptions, AniListError, type AniListHooks, type CacheAdapter, type CacheOptions, type Character, type CharacterImage, type CharacterIncludeOptions, type CharacterMediaEdge, type CharacterName, CharacterRole, CharacterSort, type ExternalLink, type FuzzyDate, type GetAiringOptions, type GetPlanningOptions, type GetRecentChaptersOptions, type GetRecommendationsOptions, type GetSeasonOptions, type GetUserMediaListOptions, type Media, type MediaCharacterConnection, type MediaCharacterEdge, type MediaConnection, type MediaCoverImage, type MediaEdge, MediaFormat, type MediaIncludeOptions, type MediaListEntry, MediaListSort, MediaListStatus, type MediaRecommendationNode, MediaRelationType, MediaSeason, MediaSort, type MediaStaffConnection, type MediaStaffEdge, type MediaStats, MediaStatus, type MediaTag, type MediaTitle, type MediaTrailer, MediaType, MemoryCache, type PageInfo, type PagedResult, type RateLimitOptions, RateLimiter, type Recommendation, RecommendationSort, RedisCache, type RedisCacheOptions, type RedisLikeClient, type ScoreDistribution, type SearchCharacterOptions, type SearchMediaOptions, type SearchStaffOptions, type SearchStudioOptions, type Staff, type StaffImage, type StaffIncludeOptions, type StaffMediaNode, type StaffName, StaffSort, type StatusDistribution, type StreamingEpisode, type Studio, type StudioConnection, type StudioDetail, type User, type UserAvatar, type UserStatistics, type VoiceActor };
|
package/dist/index.js
CHANGED
|
@@ -854,6 +854,21 @@ var CharacterRole = /* @__PURE__ */ ((CharacterRole2) => {
|
|
|
854
854
|
return CharacterRole2;
|
|
855
855
|
})(CharacterRole || {});
|
|
856
856
|
|
|
857
|
+
// src/types/staff.ts
|
|
858
|
+
var StaffSort = /* @__PURE__ */ ((StaffSort2) => {
|
|
859
|
+
StaffSort2["ID"] = "ID";
|
|
860
|
+
StaffSort2["ID_DESC"] = "ID_DESC";
|
|
861
|
+
StaffSort2["ROLE"] = "ROLE";
|
|
862
|
+
StaffSort2["ROLE_DESC"] = "ROLE_DESC";
|
|
863
|
+
StaffSort2["LANGUAGE"] = "LANGUAGE";
|
|
864
|
+
StaffSort2["LANGUAGE_DESC"] = "LANGUAGE_DESC";
|
|
865
|
+
StaffSort2["SEARCH_MATCH"] = "SEARCH_MATCH";
|
|
866
|
+
StaffSort2["FAVOURITES"] = "FAVOURITES";
|
|
867
|
+
StaffSort2["FAVOURITES_DESC"] = "FAVOURITES_DESC";
|
|
868
|
+
StaffSort2["RELEVANCE"] = "RELEVANCE";
|
|
869
|
+
return StaffSort2;
|
|
870
|
+
})(StaffSort || {});
|
|
871
|
+
|
|
857
872
|
// src/types/lists.ts
|
|
858
873
|
var MediaListStatus = /* @__PURE__ */ ((MediaListStatus2) => {
|
|
859
874
|
MediaListStatus2["CURRENT"] = "CURRENT";
|
|
@@ -1293,7 +1308,7 @@ var AniListClient = class {
|
|
|
1293
1308
|
mediaId,
|
|
1294
1309
|
sort: options.sort ?? ["RATING_DESC"],
|
|
1295
1310
|
page: options.page ?? 1,
|
|
1296
|
-
perPage: options.perPage ?? 20
|
|
1311
|
+
perPage: clampPerPage(options.perPage ?? 20)
|
|
1297
1312
|
};
|
|
1298
1313
|
const data = await this.request(QUERY_RECOMMENDATIONS, variables);
|
|
1299
1314
|
return {
|
|
@@ -1648,5 +1663,6 @@ exports.MemoryCache = MemoryCache;
|
|
|
1648
1663
|
exports.RateLimiter = RateLimiter;
|
|
1649
1664
|
exports.RecommendationSort = RecommendationSort;
|
|
1650
1665
|
exports.RedisCache = RedisCache;
|
|
1666
|
+
exports.StaffSort = StaffSort;
|
|
1651
1667
|
//# sourceMappingURL=index.js.map
|
|
1652
1668
|
//# sourceMappingURL=index.js.map
|