@irfanshadikrishad/anilist 1.3.3-forbidden.1 → 1.4.1

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,175 +1,158 @@
1
- const currentUserQuery = `{
2
- Viewer {
3
- id name about bans siteUrl options { profileColor timezone activityMergeTime }
4
- donatorTier donatorBadge createdAt updatedAt unreadNotificationCount previousNames { name createdAt updatedAt }
5
- moderatorRoles favourites { anime { nodes { id title { romaji english } } } manga { nodes { id title { romaji english } } } }
6
- statistics { anime { count meanScore minutesWatched episodesWatched } manga { count chaptersRead volumesRead meanScore } }
7
- mediaListOptions { scoreFormat rowOrder animeList { sectionOrder } mangaList { sectionOrder } }
8
- }
9
- }`;
10
- const trendingQuery = `query ($page: Int, $perPage: Int) {
11
- Page(page: $page, perPage: $perPage) {
12
- media(sort: TRENDING_DESC, type: ANIME) { id title { romaji english } }
13
- }
14
- }`;
15
- const popularQuery = `query ($page: Int, $perPage: Int) {
16
- Page(page: $page, perPage: $perPage) {
17
- media(sort: POPULARITY_DESC, type: ANIME) { id title { romaji english } }
18
- }
19
- }`;
20
- const userQuery = `query ($username: String) {
21
- User(name: $username) {
22
- id name siteUrl donatorTier donatorBadge createdAt updatedAt previousNames { name createdAt updatedAt }
23
- isBlocked isFollower isFollowing options { profileColor timezone activityMergeTime }
24
- statistics { anime { count episodesWatched minutesWatched } manga { count chaptersRead volumesRead } }
25
- }
26
- }`;
27
- const currentUserAnimeList = `query ($id: Int) {
28
- MediaListCollection(userId: $id, type: ANIME) {
29
- lists { name entries { id progress hiddenFromStatusLists status media { id idMal title { romaji english } status episodes siteUrl } } }
30
- }
31
- }
1
+ const currentUserQuery = `{
2
+ Viewer {
3
+ id name about bans siteUrl options { profileColor timezone activityMergeTime }
4
+ donatorTier donatorBadge createdAt updatedAt unreadNotificationCount previousNames { name createdAt updatedAt }
5
+ moderatorRoles favourites { anime { nodes { id title { romaji english } } } manga { nodes { id title { romaji english } } } }
6
+ statistics { anime { count meanScore minutesWatched episodesWatched } manga { count chaptersRead volumesRead meanScore } }
7
+ mediaListOptions { scoreFormat rowOrder animeList { sectionOrder } mangaList { sectionOrder } }
8
+ }
9
+ }`;
10
+ const trendingQuery = `query ($page: Int, $perPage: Int) {
11
+ Page(page: $page, perPage: $perPage) {
12
+ media(sort: TRENDING_DESC, type: ANIME) { id title { romaji english } }
13
+ }
14
+ }`;
15
+ const popularQuery = `query ($page: Int, $perPage: Int) {
16
+ Page(page: $page, perPage: $perPage) {
17
+ media(sort: POPULARITY_DESC, type: ANIME) { id title { romaji english } }
18
+ }
19
+ }`;
20
+ const userQuery = `query ($username: String) {
21
+ User(name: $username) {
22
+ id name siteUrl donatorTier donatorBadge createdAt updatedAt previousNames { name createdAt updatedAt }
23
+ isBlocked isFollower isFollowing options { profileColor timezone activityMergeTime }
24
+ statistics { anime { count episodesWatched minutesWatched } manga { count chaptersRead volumesRead } }
25
+ }
26
+ }`;
27
+ const currentUserAnimeList = `query ($id: Int) {
28
+ MediaListCollection(userId: $id, type: ANIME) {
29
+ lists { name entries { id progress hiddenFromStatusLists status media { id idMal title { romaji english native userPreferred } status episodes siteUrl format } } }
30
+ }
31
+ }
32
32
  `;
33
- const currentUserMangaList = `query ($id: Int) {
34
- MediaListCollection(userId: $id, type: MANGA) {
35
- lists { name entries { id progress hiddenFromStatusLists private status media { id idMal title { romaji english } status chapters } } }
36
- }
37
- }
33
+ const currentUserMangaList = `query ($id: Int) {
34
+ MediaListCollection(userId: $id, type: MANGA) {
35
+ lists { name entries { id progress hiddenFromStatusLists private status media { id idMal title { romaji english native userPreferred } status chapters } } }
36
+ }
37
+ }
38
38
  `;
39
- const deleteMediaEntryMutation = `mutation($id: Int!) {
40
- DeleteMediaListEntry(id: $id) { deleted }
41
- }`;
42
- const deleteMangaEntryMutation = `mutation($id: Int) {
43
- DeleteMediaListEntry(id: $id) { deleted }
44
- }`;
45
- const upcomingAnimesQuery = `query GetNextSeasonAnime($nextSeason: MediaSeason, $nextYear: Int, $perPage: Int) {
46
- Page(perPage: $perPage) {
47
- media(season: $nextSeason, seasonYear: $nextYear, type: ANIME, sort: POPULARITY_DESC) {
48
- id title { romaji english native userPreferred } season seasonYear startDate { year month day }
49
- episodes description genres
50
- }
51
- }
52
- }`;
53
- const animeDetailsQuery = `query ($id: Int) {
54
- Media(id: $id) {
55
- id idMal title { romaji english native userPreferred } episodes nextAiringEpisode { id }
56
- duration startDate { year month day } endDate { year month day } countryOfOrigin description isAdult status season format genres siteUrl
57
- stats { scoreDistribution { score amount } statusDistribution { status amount } }
58
- }
59
- }`;
60
- const userActivityQuery = `query ($id: Int, $page: Int, $perPage: Int) {
61
- Page(page: $page, perPage: $perPage) {
62
- activities(userId: $id, type_in: [ANIME_LIST, MANGA_LIST], sort: ID_DESC) {
63
- ... on ListActivity { id status progress createdAt media { id title { romaji english } } }
64
- }
65
- }
66
- }`;
67
- const animeSearchQuery = `query ($search: String, $perPage: Int) {
68
- Page(perPage: $perPage) {
69
- media(search: $search, type: ANIME) { id title { romaji english native userPreferred } startDate { day month year } episodes status description }
70
- }
71
- }`;
72
- const mangaSearchQuery = `query ($search: String, $perPage: Int) {
73
- Page(perPage: $perPage) {
74
- media(search: $search, type: MANGA) { id title { romaji english native userPreferred } chapters status description }
75
- }
76
- }`;
77
- const activityTextQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
78
- Page(page: $page, perPage: $perPage) {
79
- activities(userId: $userId, type: TEXT, sort: ID_DESC) {
80
- ... on TextActivity { id type text createdAt user { id name } }
81
- }
82
- }
83
- }`;
84
- const activityAnimeListQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
85
- Page(page: $page, perPage: $perPage) {
86
- activities(userId: $userId, type: ANIME_LIST, sort: ID_DESC) {
87
- ... on ListActivity { id type status progress createdAt media { id title { romaji english native } } }
88
- }
89
- }
90
- }`;
91
- const activityMangaListQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
92
- Page(page: $page, perPage: $perPage) {
93
- activities(userId: $userId, type: MANGA_LIST, sort: ID_DESC) {
94
- ... on ListActivity { id type status progress createdAt media { id title { romaji english native } } }
95
- }
96
- }
97
- }`;
98
- const activityMessageQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
99
- Page(page: $page, perPage: $perPage) {
100
- activities(userId: $userId, type: MESSAGE, sort: ID_DESC) {
101
- ... on MessageActivity { id type message recipient { id name } createdAt }
102
- }
103
- }
104
- }`;
105
- const activityAllQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
106
- Page(page: $page, perPage: $perPage) {
107
- activities(userId: $userId, sort: ID_DESC) {
108
- ... on TextActivity { id type text createdAt user { id name } }
109
- ... on ListActivity { id type status progress createdAt media { id title { romaji english native } } }
110
- ... on MessageActivity { id type message recipient { id name } createdAt }
111
- }
112
- }
113
- }`;
114
- const activityMediaList = `query ($userId: Int, $page: Int, $perPage: Int, $type: ActivityType) {
115
- Page(page: $page, perPage: $perPage) {
116
- pageInfo { total currentPage lastPage hasNextPage perPage }
117
- activities(userId: $userId, type: $type, sort: ID_DESC) {
118
- ... on ListActivity { id type status progress media { id title { romaji english native } format } createdAt }
119
- }
120
- }
121
- }`;
122
- const malIdToAnilistAnimeId = `query ($malId: Int) {
123
- Media(idMal: $malId, type: ANIME) { id title { romaji english } } }
39
+ const deleteMediaEntryMutation = `mutation($id: Int!) {
40
+ DeleteMediaListEntry(id: $id) { deleted }
41
+ }`;
42
+ const deleteMangaEntryMutation = `mutation($id: Int) {
43
+ DeleteMediaListEntry(id: $id) { deleted }
44
+ }`;
45
+ const upcomingAnimesQuery = `query GetNextSeasonAnime($nextSeason: MediaSeason, $nextYear: Int, $perPage: Int) {
46
+ Page(perPage: $perPage) {
47
+ media(season: $nextSeason, seasonYear: $nextYear, type: ANIME, sort: POPULARITY_DESC) {
48
+ id title { romaji english native userPreferred } season seasonYear startDate { year month day }
49
+ episodes description genres
50
+ }
51
+ }
52
+ }`;
53
+ const animeDetailsQuery = `query ($id: Int) {
54
+ Media(id: $id) {
55
+ id idMal title { romaji english native userPreferred } episodes nextAiringEpisode { id }
56
+ duration startDate { year month day } endDate { year month day } countryOfOrigin description isAdult status season format genres siteUrl
57
+ stats { scoreDistribution { score amount } statusDistribution { status amount } }
58
+ }
59
+ }`;
60
+ const userActivityQuery = `query ($id: Int, $page: Int, $perPage: Int) {
61
+ Page(page: $page, perPage: $perPage) {
62
+ activities(userId: $id, type_in: [ANIME_LIST, MANGA_LIST], sort: ID_DESC) {
63
+ ... on ListActivity { id status progress createdAt media { id title { romaji english } } }
64
+ }
65
+ }
66
+ }`;
67
+ const animeSearchQuery = `query ($search: String, $perPage: Int) {
68
+ Page(perPage: $perPage) {
69
+ media(search: $search, type: ANIME) { id title { romaji english native userPreferred } startDate { day month year } episodes status description }
70
+ }
71
+ }`;
72
+ const mangaSearchQuery = `query ($search: String, $perPage: Int) {
73
+ Page(perPage: $perPage) {
74
+ media(search: $search, type: MANGA) { id title { romaji english native userPreferred } chapters status description }
75
+ }
76
+ }`;
77
+ const activityTextQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
78
+ Page(page: $page, perPage: $perPage) {
79
+ activities(userId: $userId, type: TEXT, sort: ID_DESC) {
80
+ ... on TextActivity { id type text createdAt user { id name } }
81
+ }
82
+ }
83
+ }`;
84
+ const activityAnimeListQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
85
+ Page(page: $page, perPage: $perPage) {
86
+ activities(userId: $userId, type: ANIME_LIST, sort: ID_DESC) {
87
+ ... on ListActivity { id type status progress createdAt media { id title { romaji english native } } }
88
+ }
89
+ }
90
+ }`;
91
+ const activityMangaListQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
92
+ Page(page: $page, perPage: $perPage) {
93
+ activities(userId: $userId, type: MANGA_LIST, sort: ID_DESC) {
94
+ ... on ListActivity { id type status progress createdAt media { id title { romaji english native } } }
95
+ }
96
+ }
97
+ }`;
98
+ const activityMessageQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
99
+ Page(page: $page, perPage: $perPage) {
100
+ activities(userId: $userId, type: MESSAGE, sort: ID_DESC) {
101
+ ... on MessageActivity { id type message recipient { id name } createdAt }
102
+ }
103
+ }
104
+ }`;
105
+ const activityAllQuery = `query ($userId: Int, $page: Int, $perPage: Int) {
106
+ Page(page: $page, perPage: $perPage) {
107
+ activities(userId: $userId, sort: ID_DESC) {
108
+ ... on TextActivity { id type text createdAt user { id name } }
109
+ ... on ListActivity { id type status progress createdAt media { id title { romaji english native } } }
110
+ ... on MessageActivity { id type message recipient { id name } createdAt }
111
+ }
112
+ }
113
+ }`;
114
+ const activityMediaList = `query ($userId: Int, $page: Int, $perPage: Int, $type: ActivityType) {
115
+ Page(page: $page, perPage: $perPage) {
116
+ pageInfo { total currentPage lastPage hasNextPage perPage }
117
+ activities(userId: $userId, type: $type, sort: ID_DESC) {
118
+ ... on ListActivity { id type status progress media { id title { romaji english native } format } createdAt }
119
+ }
120
+ }
121
+ }`;
122
+ const malIdToAnilistAnimeId = `query ($malId: Int) {
123
+ Media(idMal: $malId, type: ANIME) {
124
+ id title { romaji english } }
125
+ }
124
126
  `;
125
- const malIdToAnilistMangaId = `query ($malId: Int) {
126
- Media(idMal: $malId, type: MANGA) { id title { romaji english } } }
127
+ const malIdToAnilistMangaId = `query ($malId: Int) {
128
+ Media(idMal: $malId, type: MANGA) {
129
+ id title { romaji english } }
130
+ }
127
131
  `;
128
- const followingActivitiesQuery = `
129
- query ($page: Int, $perPage: Int) {
130
- Page(page: $page, perPage: $perPage) {
131
- activities(isFollowing: true, sort: ID_DESC) {
132
- ... on TextActivity { id type isLiked createdAt user { id name } }
133
- ... on ListActivity { id type isLiked status progress media { title { userPreferred } } createdAt user { id name } }
134
- ... on MessageActivity { id type isLiked message createdAt recipient { id name } }
135
- }
136
- }
137
- }
132
+ const userFollowingQuery = `query ($userId: Int!, $page: Int) {
133
+ Page (page: $page) {
134
+ pageInfo { total perPage currentPage lastPage hasNextPage }
135
+ following(userId: $userId, sort: [USERNAME]) { id name avatar { large medium } bannerImage isFollowing isFollower }
136
+ }
137
+ }
138
138
  `;
139
- const globalActivitiesQuery = `
140
- query ($page: Int, $perPage: Int) {
141
- Page(page: $page, perPage: $perPage) {
142
- activities(sort: ID_DESC) {
143
- ... on TextActivity { id type isLiked createdAt user { id name } }
144
- ... on ListActivity { id type isLiked status progress media { title { userPreferred } } createdAt user { id name } }
145
- ... on MessageActivity { id type isLiked message createdAt recipient { id name } }
146
- }
147
- }
148
- }
139
+ const userFollowersQuery = `query ($userId: Int!, $page: Int) {
140
+ Page (page: $page) {
141
+ pageInfo { total perPage currentPage lastPage hasNextPage }
142
+ followers(userId: $userId, sort: [USERNAME]) { id name avatar { large medium } bannerImage isFollowing isFollower }
143
+ }
144
+ }
149
145
  `;
150
- const specificUserActivitiesQuery = `
151
- query ($page: Int, $perPage: Int, $userId: Int) {
152
- Page(page: $page, perPage: $perPage) {
153
- activities(userId: $userId, sort: ID_DESC) {
154
- ... on TextActivity { id type isLiked createdAt user { id name } }
155
- ... on ListActivity { id type isLiked status progress media { title { userPreferred } } createdAt user { id name } }
156
- ... on MessageActivity { messenger { name } id type isLiked message createdAt recipient { id name } }
157
- }
158
- }
159
- }
146
+ const toggleFollowMutation = `mutation ($userId: Int!) {
147
+ ToggleFollow(userId: $userId) { id name isFollower isFollowing }
148
+ }
160
149
  `;
161
- const userFollowingQuery = `query ($userId: Int!) {
162
- Page {
163
- pageInfo { total perPage currentPage lastPage hasNextPage }
164
- following(userId: $userId, sort: [USERNAME]) { id name avatar { large medium } bannerImage }
165
- }
166
- }
150
+ const mangaDetailsQuery = `query ($id: Int) {
151
+ Media(id: $id, type: MANGA) {
152
+ id title { romaji english native userPreferred } coverImage { color medium large extraLarge }
153
+ bannerImage description chapters volumes status genres
154
+ startDate { year month day } endDate { year month day }
155
+ }
156
+ }
167
157
  `;
168
- const userFollowersQuery = `query ($userId: Int!) {
169
- Page {
170
- pageInfo { total perPage currentPage lastPage hasNextPage }
171
- followers(userId: $userId, sort: [USERNAME]) { id name avatar { large medium } bannerImage }
172
- }
173
- }
174
- `;
175
- export { activityAllQuery, activityAnimeListQuery, activityMangaListQuery, activityMediaList, activityMessageQuery, activityTextQuery, animeDetailsQuery, animeSearchQuery, currentUserAnimeList, currentUserMangaList, currentUserQuery, deleteMangaEntryMutation, deleteMediaEntryMutation, followingActivitiesQuery, globalActivitiesQuery, malIdToAnilistAnimeId, malIdToAnilistMangaId, mangaSearchQuery, popularQuery, specificUserActivitiesQuery, trendingQuery, upcomingAnimesQuery, userActivityQuery, userFollowersQuery, userFollowingQuery, userQuery, };
158
+ export { activityAllQuery, activityAnimeListQuery, activityMangaListQuery, activityMediaList, activityMessageQuery, activityTextQuery, animeDetailsQuery, animeSearchQuery, currentUserAnimeList, currentUserMangaList, currentUserQuery, deleteMangaEntryMutation, deleteMediaEntryMutation, malIdToAnilistAnimeId, malIdToAnilistMangaId, mangaDetailsQuery, mangaSearchQuery, popularQuery, toggleFollowMutation, trendingQuery, upcomingAnimesQuery, userActivityQuery, userFollowersQuery, userFollowingQuery, userQuery, };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Truncate text (No line break)
3
+ * @param str - Long text to trancate
4
+ */
5
+ declare function responsiveOutput(str: string): void;
6
+ export { responsiveOutput };
@@ -0,0 +1,10 @@
1
+ import cliTruncate from "cli-truncate";
2
+ import process from "process";
3
+ /**
4
+ * Truncate text (No line break)
5
+ * @param str - Long text to trancate
6
+ */
7
+ function responsiveOutput(str) {
8
+ console.log(cliTruncate(str, process.stdout.columns - 5));
9
+ }
10
+ export { responsiveOutput };
@@ -45,10 +45,7 @@ interface MalIdToAnilistIdResponse {
45
45
  data?: {
46
46
  Media: {
47
47
  id: number;
48
- title: {
49
- english?: string;
50
- romaji?: string;
51
- };
48
+ title: MediaTitle;
52
49
  };
53
50
  };
54
51
  errors?: {
@@ -92,15 +89,13 @@ interface AnimeList {
92
89
  }[];
93
90
  }
94
91
  interface MediaWithProgress {
95
- malId: number;
92
+ malId?: number;
96
93
  progress: number;
97
94
  status: string;
98
95
  episodes?: number;
99
96
  chapters?: number;
100
- title: {
101
- english?: string;
102
- romaji?: string;
103
- };
97
+ format?: string;
98
+ title: MediaTitle;
104
99
  }
105
100
  interface MediaTitle {
106
101
  english?: string;
@@ -121,16 +116,36 @@ interface MediaEntry {
121
116
  status: string;
122
117
  hiddenFromStatusLists: boolean;
123
118
  }
119
+ interface SaveTextActivityResponse {
120
+ data?: {
121
+ SaveTextActivity: {
122
+ id: number;
123
+ userId: number;
124
+ text: string;
125
+ createdAt: number;
126
+ };
127
+ };
128
+ errors?: {
129
+ message: string;
130
+ }[];
131
+ }
132
+ interface MediaListCollectionResponse {
133
+ data?: {
134
+ MediaListCollection: {
135
+ lists: MediaList[];
136
+ };
137
+ };
138
+ errors?: {
139
+ message: string;
140
+ }[];
141
+ }
124
142
  interface List {
125
143
  name: string;
126
144
  entries: MediaEntry[];
127
145
  }
128
146
  interface MediaList {
129
147
  id(id: number | string): string;
130
- title: {
131
- english?: string;
132
- romaji?: string;
133
- };
148
+ title: MediaTitle;
134
149
  name: string;
135
150
  entries: MediaListEntry[];
136
151
  }
@@ -171,9 +186,9 @@ interface Myself {
171
186
  }[];
172
187
  }
173
188
  interface DateMonthYear {
174
- day?: number;
175
- month?: number;
176
- year?: number;
189
+ day?: number | null;
190
+ month?: number | null;
191
+ year?: number | null;
177
192
  }
178
193
  interface AnimeDetails {
179
194
  data?: {
@@ -197,6 +212,17 @@ interface AnimeDetails {
197
212
  message: string;
198
213
  }[];
199
214
  }
215
+ interface SaveMediaListEntryResponse {
216
+ data?: {
217
+ SaveMediaListEntry: {
218
+ id: number;
219
+ status: string;
220
+ };
221
+ };
222
+ errors?: {
223
+ message: string;
224
+ }[];
225
+ }
200
226
  interface MediaListEntry {
201
227
  id?: number;
202
228
  media: {
@@ -206,48 +232,17 @@ interface MediaListEntry {
206
232
  episodes?: number;
207
233
  siteUrl?: string;
208
234
  chapters?: number;
235
+ format?: string;
209
236
  };
210
237
  progress?: number;
211
238
  status?: string;
212
239
  hiddenFromStatusLists?: boolean;
213
240
  private?: boolean;
214
241
  }
215
- interface TheActivity {
216
- type: string;
217
- id: number;
218
- message?: string;
219
- createdAt: number;
220
- recipient?: {
221
- id: number;
222
- name: string;
223
- };
224
- isLiked?: boolean;
225
- user?: {
226
- id?: number;
227
- name?: string;
228
- };
229
- messenger?: {
230
- name: string;
231
- };
232
- media?: {
233
- title?: {
234
- userPreferred: string;
235
- };
236
- };
237
- progress?: string | null;
238
- status?: string;
239
- }
240
242
  type UserActivitiesResponse = {
241
243
  data?: {
242
244
  Page: {
243
- activities: {
244
- status: string;
245
- progress: number;
246
- createdAt: number;
247
- media: {
248
- title: MediaTitle;
249
- };
250
- }[];
245
+ activities: Activity[];
251
246
  };
252
247
  };
253
248
  errors?: {
@@ -289,6 +284,17 @@ type UserResponse = {
289
284
  message: string;
290
285
  }[];
291
286
  };
287
+ type User = {
288
+ id: number;
289
+ name: string;
290
+ avatar: {
291
+ large: string;
292
+ medium: string;
293
+ };
294
+ bannerImage: string;
295
+ isFollower: boolean;
296
+ isFollowing: boolean;
297
+ };
292
298
  type UserFollower = {
293
299
  data?: {
294
300
  Page: {
@@ -299,15 +305,7 @@ type UserFollower = {
299
305
  lastPage: number;
300
306
  hasNextPage: boolean;
301
307
  };
302
- followers: {
303
- id: number;
304
- name: string;
305
- avatar: {
306
- large: string;
307
- medium: string;
308
- };
309
- bannerImage: string;
310
- }[];
308
+ followers: User[];
311
309
  };
312
310
  };
313
311
  errors?: {
@@ -324,15 +322,7 @@ type UserFollowing = {
324
322
  lastPage: number;
325
323
  hasNextPage: boolean;
326
324
  };
327
- following: {
328
- id: number;
329
- name: string;
330
- avatar: {
331
- large: string;
332
- medium: string;
333
- };
334
- bannerImage: string;
335
- }[];
325
+ following: User[];
336
326
  };
337
327
  };
338
328
  errors?: {
@@ -356,4 +346,65 @@ type AnimeSearchResponse = {
356
346
  message: string;
357
347
  }[];
358
348
  };
359
- export { AniListMediaStatus, AnimeDetails, AnimeList, AnimeSearchResponse, DateMonthYear, DeleteMangaResponse, List, MALAnimeStatus, MALAnimeXML, MALMangaStatus, MalIdToAnilistIdResponse, MediaEntry, MediaList, MediaListEntry, MediaTitle, MediaWithProgress, Myself, TheActivity, UserActivitiesResponse, UserFollower, UserFollowing, UserResponse, saveAnimeWithProgressResponse, };
349
+ type ToggleFollowResponse = {
350
+ data?: {
351
+ ToggleFollow: {
352
+ id: number;
353
+ name: string;
354
+ isFollower: boolean;
355
+ isFollowing: boolean;
356
+ };
357
+ };
358
+ errors?: {
359
+ message: string;
360
+ }[];
361
+ };
362
+ type DeleteMediaListResponse = {
363
+ data?: {
364
+ DeleteMediaListEntry: {
365
+ deleted: boolean;
366
+ };
367
+ };
368
+ errors?: {
369
+ message: string;
370
+ }[];
371
+ };
372
+ type Activity = {
373
+ id: number;
374
+ type: string;
375
+ status: string;
376
+ progress: number | null;
377
+ media: {
378
+ id?: number;
379
+ title: MediaTitle;
380
+ };
381
+ createdAt: number;
382
+ };
383
+ type Error = {
384
+ message: string;
385
+ }[];
386
+ type CoverImage = {
387
+ color: string;
388
+ medium: string;
389
+ large: string;
390
+ extraLarge: string;
391
+ };
392
+ type MangaDetails = {
393
+ data?: {
394
+ Media: {
395
+ id: number;
396
+ title: MediaTitle;
397
+ coverImage: CoverImage;
398
+ bannerImage: string;
399
+ description: string;
400
+ chapters: number | null;
401
+ volumes: number | null;
402
+ status: string;
403
+ genres: [string];
404
+ startDate: DateMonthYear;
405
+ endDate: DateMonthYear;
406
+ };
407
+ };
408
+ errors?: Error;
409
+ };
410
+ export { Activity, AniListMediaStatus, AnimeDetails, AnimeList, AnimeSearchResponse, DateMonthYear, DeleteMangaResponse, DeleteMediaListResponse, List, MALAnimeStatus, MALAnimeXML, MALMangaStatus, MalIdToAnilistIdResponse, MangaDetails, MediaEntry, MediaList, MediaListCollectionResponse, MediaListEntry, MediaTitle, MediaWithProgress, Myself, SaveMediaListEntryResponse, SaveTextActivityResponse, ToggleFollowResponse, User, UserActivitiesResponse, UserFollower, UserFollowing, UserResponse, saveAnimeWithProgressResponse, };
@@ -0,0 +1,29 @@
1
+ declare class Validate {
2
+ /**
3
+ * Validate importable JSON file
4
+ * @param data string
5
+ * @returns boolean
6
+ */
7
+ static Import_JSON(data: {
8
+ id: number;
9
+ }[]): boolean;
10
+ /**
11
+ * Validate if MyAnimeList Anime XML file is valid or not
12
+ * @param xmlData string
13
+ * @returns boolean
14
+ */
15
+ static Import_AnimeXML(xmlData: string): Promise<boolean>;
16
+ /**
17
+ * Validate if MyAnimeList Anime XML file is valid or not
18
+ * @param xmlData string
19
+ * @returns boolean
20
+ */
21
+ static Import_MangaXML(xmlData: string): Promise<boolean>;
22
+ /**
23
+ * Validate AniDB json-large file
24
+ * @param file string of anidb json-large
25
+ * @returns boolean
26
+ */
27
+ static Import_AniDBJSONLarge(file: string): Promise<boolean>;
28
+ }
29
+ export { Validate };