@irfanshadikrishad/anilist 1.0.0-forbidden.1 → 1.0.0-forbidden.2
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 +32 -26
- package/bin/helpers/auth.d.ts +36 -6
- package/bin/helpers/auth.js +139 -95
- package/bin/helpers/fetcher.d.ts +3 -2
- package/bin/helpers/fetcher.js +29 -24
- package/bin/helpers/lists.d.ts +4 -1
- package/bin/helpers/lists.js +357 -268
- package/bin/helpers/queries.d.ts +6 -4
- package/bin/helpers/queries.js +19 -4
- package/bin/helpers/types.d.ts +304 -8
- package/bin/helpers/workers.d.ts +9 -5
- package/bin/helpers/workers.js +155 -69
- package/bin/index.js +13 -9
- package/package.json +18 -10
- package/assets/binance.jpg +0 -0
- /package/{LICENSE → LICENSE.md} +0 -0
package/bin/helpers/queries.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const currentUserQuery = "{\n Viewer {\n id name about bans siteUrl options { profileColor timezone activityMergeTime }\n donatorTier donatorBadge createdAt updatedAt unreadNotificationCount previousNames { name createdAt updatedAt }\n moderatorRoles favourites { anime { nodes { id title { romaji english } } } manga { nodes { id title { romaji english } } } }\n statistics { anime { count meanScore minutesWatched } manga { count chaptersRead volumesRead } }\n mediaListOptions { scoreFormat rowOrder animeList { sectionOrder } mangaList { sectionOrder } }\n }\n}";
|
|
1
|
+
declare const currentUserQuery = "{\n Viewer {\n id name about bans siteUrl options { profileColor timezone activityMergeTime }\n donatorTier donatorBadge createdAt updatedAt unreadNotificationCount previousNames { name createdAt updatedAt }\n moderatorRoles favourites { anime { nodes { id title { romaji english } } } manga { nodes { id title { romaji english } } } }\n statistics { anime { count meanScore minutesWatched episodesWatched } manga { count chaptersRead volumesRead meanScore } }\n mediaListOptions { scoreFormat rowOrder animeList { sectionOrder } mangaList { sectionOrder } }\n }\n}";
|
|
2
2
|
declare const trendingQuery = "query ($page: Int, $perPage: Int) {\n Page(page: $page, perPage: $perPage) {\n media(sort: TRENDING_DESC, type: ANIME) { id title { romaji english } }\n }\n}";
|
|
3
3
|
declare const popularQuery = "query ($page: Int, $perPage: Int) {\n Page(page: $page, perPage: $perPage) {\n media(sort: POPULARITY_DESC, type: ANIME) { id title { romaji english } }\n }\n}";
|
|
4
4
|
declare const userQuery = "query ($username: String) {\n User(name: $username) {\n id name siteUrl donatorTier donatorBadge createdAt updatedAt previousNames { name createdAt updatedAt }\n isBlocked isFollower isFollowing options { profileColor timezone activityMergeTime }\n statistics { anime { count episodesWatched minutesWatched } manga { count chaptersRead volumesRead } }\n }\n}";
|
|
@@ -9,7 +9,7 @@ declare const deleteMangaEntryMutation = "mutation($id: Int) {\n DeleteMediaLis
|
|
|
9
9
|
declare const upcomingAnimesQuery = "query GetNextSeasonAnime($nextSeason: MediaSeason, $nextYear: Int, $perPage: Int) {\n Page(perPage: $perPage) {\n media(season: $nextSeason, seasonYear: $nextYear, type: ANIME, sort: POPULARITY_DESC) {\n id title { romaji english native userPreferred } season seasonYear startDate { year month day }\n episodes description genres\n }\n }\n}";
|
|
10
10
|
declare const animeDetailsQuery = "query ($id: Int) {\n Media(id: $id) {\n id idMal title { romaji english native userPreferred } episodes nextAiringEpisode { id }\n duration startDate { year month day } endDate { year month day } countryOfOrigin description isAdult status season format genres siteUrl\n stats { scoreDistribution { score amount } statusDistribution { status amount } }\n }\n}";
|
|
11
11
|
declare const userActivityQuery = "query ($id: Int, $page: Int, $perPage: Int) {\n Page(page: $page, perPage: $perPage) {\n activities(userId: $id, type_in: [ANIME_LIST, MANGA_LIST], sort: ID_DESC) {\n ... on ListActivity { id status progress createdAt media { id title { romaji english } } }\n }\n }\n}";
|
|
12
|
-
declare const animeSearchQuery = "query ($search: String, $perPage: Int) {\n Page(perPage: $perPage) {\n media(search: $search, type: ANIME) { id title { romaji english native userPreferred } episodes status description }\n }\n}";
|
|
12
|
+
declare const animeSearchQuery = "query ($search: String, $perPage: Int) {\n Page(perPage: $perPage) {\n media(search: $search, type: ANIME) { id title { romaji english native userPreferred } startDate { day month year } episodes status description }\n }\n}";
|
|
13
13
|
declare const mangaSearchQuery = "query ($search: String, $perPage: Int) {\n Page(perPage: $perPage) {\n media(search: $search, type: MANGA) { id title { romaji english native userPreferred } chapters status description }\n }\n}";
|
|
14
14
|
declare const activityTextQuery = "query ($userId: Int, $page: Int, $perPage: Int) {\n Page(page: $page, perPage: $perPage) {\n activities(userId: $userId, type: TEXT, sort: ID_DESC) {\n ... on TextActivity { id type text createdAt user { id name } }\n }\n }\n}";
|
|
15
15
|
declare const activityAnimeListQuery = "query ($userId: Int, $page: Int, $perPage: Int) {\n Page(page: $page, perPage: $perPage) {\n activities(userId: $userId, type: ANIME_LIST, sort: ID_DESC) {\n ... on ListActivity { id type status progress createdAt media { id title { romaji english native } } }\n }\n }\n}";
|
|
@@ -21,5 +21,7 @@ declare const malIdToAnilistAnimeId = "query ($malId: Int) {\n Media(idMal: $ma
|
|
|
21
21
|
declare const malIdToAnilistMangaId = "query ($malId: Int) {\n Media(idMal: $malId, type: MANGA) { id title { romaji english } } }\n";
|
|
22
22
|
declare const followingActivitiesQuery = "\nquery ($page: Int, $perPage: Int) {\n Page(page: $page, perPage: $perPage) {\n activities(isFollowing: true, sort: ID_DESC) {\n ... on TextActivity { id type isLiked createdAt user { id name } }\n ... on ListActivity { id type isLiked status progress media { title { userPreferred } } createdAt user { id name } }\n ... on MessageActivity { id type isLiked message createdAt recipient { id name } }\n }\n }\n}\n";
|
|
23
23
|
declare const globalActivitiesQuery = "\nquery ($page: Int, $perPage: Int) {\n Page(page: $page, perPage: $perPage) {\n activities(sort: ID_DESC) {\n ... on TextActivity { id type isLiked createdAt user { id name } }\n ... on ListActivity { id type isLiked status progress media { title { userPreferred } } createdAt user { id name } }\n ... on MessageActivity { id type isLiked message createdAt recipient { id name } }\n }\n }\n}\n";
|
|
24
|
-
declare const specificUserActivitiesQuery = "\nquery ($page: Int, $perPage: Int, $userId: Int) {\n Page(page: $page, perPage: $perPage) {\n activities(userId: $userId, sort: ID_DESC) {\n ... on TextActivity { id type isLiked createdAt user { id name } }\n ... on ListActivity { id type isLiked status progress media { title { userPreferred } } createdAt user { id name } }\n ... on MessageActivity { id type isLiked message createdAt recipient { id name } }\n }\n }\n}\n";
|
|
25
|
-
|
|
24
|
+
declare const specificUserActivitiesQuery = "\nquery ($page: Int, $perPage: Int, $userId: Int) {\n Page(page: $page, perPage: $perPage) {\n pageInfo { total perPage currentPage lastPage hasNextPage }\n activities(userId: $userId, sort: ID_DESC) {\n ... on TextActivity { id type isLiked createdAt user { id name } }\n ... on ListActivity { id type isLiked status progress media { title { userPreferred } } createdAt user { id name } }\n ... on MessageActivity { messenger { name } id type isLiked message createdAt recipient { id name } }\n }\n }\n}\n";
|
|
25
|
+
declare const userFollowingQuery = "query ($userId: Int!, $page:Int) {\n Page (page: $page) {\n pageInfo { total perPage currentPage lastPage hasNextPage }\n following(userId: $userId, sort: [USERNAME]) { id name avatar { large medium } bannerImage }\n }\n}\n";
|
|
26
|
+
declare const userFollowersQuery = "query ($userId: Int!) {\n Page {\n pageInfo { total perPage currentPage lastPage hasNextPage }\n followers(userId: $userId, sort: [USERNAME]) { id name avatar { large medium } bannerImage }\n }\n}\n";
|
|
27
|
+
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, };
|
package/bin/helpers/queries.js
CHANGED
|
@@ -3,7 +3,7 @@ const currentUserQuery = `{
|
|
|
3
3
|
id name about bans siteUrl options { profileColor timezone activityMergeTime }
|
|
4
4
|
donatorTier donatorBadge createdAt updatedAt unreadNotificationCount previousNames { name createdAt updatedAt }
|
|
5
5
|
moderatorRoles favourites { anime { nodes { id title { romaji english } } } manga { nodes { id title { romaji english } } } }
|
|
6
|
-
statistics { anime { count meanScore minutesWatched } manga { count chaptersRead volumesRead } }
|
|
6
|
+
statistics { anime { count meanScore minutesWatched episodesWatched } manga { count chaptersRead volumesRead meanScore } }
|
|
7
7
|
mediaListOptions { scoreFormat rowOrder animeList { sectionOrder } mangaList { sectionOrder } }
|
|
8
8
|
}
|
|
9
9
|
}`;
|
|
@@ -66,7 +66,7 @@ const userActivityQuery = `query ($id: Int, $page: Int, $perPage: Int) {
|
|
|
66
66
|
}`;
|
|
67
67
|
const animeSearchQuery = `query ($search: String, $perPage: Int) {
|
|
68
68
|
Page(perPage: $perPage) {
|
|
69
|
-
media(search: $search, type: ANIME) { id title { romaji english native userPreferred } episodes status description }
|
|
69
|
+
media(search: $search, type: ANIME) { id title { romaji english native userPreferred } startDate { day month year } episodes status description }
|
|
70
70
|
}
|
|
71
71
|
}`;
|
|
72
72
|
const mangaSearchQuery = `query ($search: String, $perPage: Int) {
|
|
@@ -150,12 +150,27 @@ query ($page: Int, $perPage: Int) {
|
|
|
150
150
|
const specificUserActivitiesQuery = `
|
|
151
151
|
query ($page: Int, $perPage: Int, $userId: Int) {
|
|
152
152
|
Page(page: $page, perPage: $perPage) {
|
|
153
|
+
pageInfo { total perPage currentPage lastPage hasNextPage }
|
|
153
154
|
activities(userId: $userId, sort: ID_DESC) {
|
|
154
155
|
... on TextActivity { id type isLiked createdAt user { id name } }
|
|
155
156
|
... on ListActivity { id type isLiked status progress media { title { userPreferred } } createdAt user { id name } }
|
|
156
|
-
... on MessageActivity { id type isLiked message createdAt recipient { id name } }
|
|
157
|
+
... on MessageActivity { messenger { name } id type isLiked message createdAt recipient { id name } }
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
}
|
|
160
161
|
`;
|
|
161
|
-
|
|
162
|
+
const userFollowingQuery = `query ($userId: Int!, $page:Int) {
|
|
163
|
+
Page (page: $page) {
|
|
164
|
+
pageInfo { total perPage currentPage lastPage hasNextPage }
|
|
165
|
+
following(userId: $userId, sort: [USERNAME]) { id name avatar { large medium } bannerImage }
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
169
|
+
const userFollowersQuery = `query ($userId: Int!) {
|
|
170
|
+
Page {
|
|
171
|
+
pageInfo { total perPage currentPage lastPage hasNextPage }
|
|
172
|
+
followers(userId: $userId, sort: [USERNAME]) { id name avatar { large medium } bannerImage }
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
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, };
|
package/bin/helpers/types.d.ts
CHANGED
|
@@ -84,13 +84,7 @@ declare enum MALMangaStatus {
|
|
|
84
84
|
interface AnimeList {
|
|
85
85
|
data?: {
|
|
86
86
|
MediaListCollection: {
|
|
87
|
-
lists:
|
|
88
|
-
name: string;
|
|
89
|
-
entries: {
|
|
90
|
-
id: number;
|
|
91
|
-
progress: number;
|
|
92
|
-
}[];
|
|
93
|
-
}[];
|
|
87
|
+
lists: MediaList[];
|
|
94
88
|
};
|
|
95
89
|
};
|
|
96
90
|
errors?: {
|
|
@@ -108,4 +102,306 @@ interface MediaWithProgress {
|
|
|
108
102
|
romaji?: string;
|
|
109
103
|
};
|
|
110
104
|
}
|
|
111
|
-
|
|
105
|
+
interface MediaTitle {
|
|
106
|
+
english?: string;
|
|
107
|
+
romaji?: string;
|
|
108
|
+
native?: string;
|
|
109
|
+
userPreferred?: string;
|
|
110
|
+
}
|
|
111
|
+
interface Media {
|
|
112
|
+
id: number;
|
|
113
|
+
idMal?: number;
|
|
114
|
+
title: MediaTitle;
|
|
115
|
+
chapters?: number;
|
|
116
|
+
}
|
|
117
|
+
interface MediaEntry {
|
|
118
|
+
media: Media;
|
|
119
|
+
private: boolean;
|
|
120
|
+
progress: number;
|
|
121
|
+
status: string;
|
|
122
|
+
hiddenFromStatusLists: boolean;
|
|
123
|
+
}
|
|
124
|
+
interface List {
|
|
125
|
+
name: string;
|
|
126
|
+
entries: MediaEntry[];
|
|
127
|
+
}
|
|
128
|
+
interface MediaList {
|
|
129
|
+
id(id: number | string): string;
|
|
130
|
+
title: {
|
|
131
|
+
english?: string;
|
|
132
|
+
romaji?: string;
|
|
133
|
+
};
|
|
134
|
+
name: string;
|
|
135
|
+
entries: MediaListEntry[];
|
|
136
|
+
}
|
|
137
|
+
interface Myself {
|
|
138
|
+
data?: {
|
|
139
|
+
Viewer: {
|
|
140
|
+
id: number;
|
|
141
|
+
name: string;
|
|
142
|
+
siteUrl: string;
|
|
143
|
+
options: {
|
|
144
|
+
profileColor: string;
|
|
145
|
+
timezone: string;
|
|
146
|
+
activityMergeTime: string;
|
|
147
|
+
};
|
|
148
|
+
donatorTier: string;
|
|
149
|
+
donatorBadge: string;
|
|
150
|
+
unreadNotificationCount: number;
|
|
151
|
+
createdAt: number;
|
|
152
|
+
updatedAt: number;
|
|
153
|
+
statistics: {
|
|
154
|
+
anime: {
|
|
155
|
+
count: number;
|
|
156
|
+
meanScore: string;
|
|
157
|
+
minutesWatched: string;
|
|
158
|
+
episodesWatched: number;
|
|
159
|
+
};
|
|
160
|
+
manga: {
|
|
161
|
+
count: number;
|
|
162
|
+
meanScore: string;
|
|
163
|
+
chaptersRead: number;
|
|
164
|
+
volumesRead: number;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
errors?: {
|
|
170
|
+
message: string;
|
|
171
|
+
}[];
|
|
172
|
+
}
|
|
173
|
+
interface DateMonthYear {
|
|
174
|
+
day?: number;
|
|
175
|
+
month?: number;
|
|
176
|
+
year?: number;
|
|
177
|
+
}
|
|
178
|
+
interface AnimeDetails {
|
|
179
|
+
data?: {
|
|
180
|
+
Media: {
|
|
181
|
+
id: number;
|
|
182
|
+
title: MediaTitle;
|
|
183
|
+
description: string;
|
|
184
|
+
duration: string;
|
|
185
|
+
startDate: DateMonthYear;
|
|
186
|
+
endDate: DateMonthYear;
|
|
187
|
+
countryOfOrigin: string;
|
|
188
|
+
isAdult: boolean;
|
|
189
|
+
status: string;
|
|
190
|
+
season: string;
|
|
191
|
+
format: string;
|
|
192
|
+
genres: [string];
|
|
193
|
+
siteUrl: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
errors?: {
|
|
197
|
+
message: string;
|
|
198
|
+
}[];
|
|
199
|
+
}
|
|
200
|
+
interface MediaListEntry {
|
|
201
|
+
id?: number;
|
|
202
|
+
media: {
|
|
203
|
+
id?: number;
|
|
204
|
+
idMal?: number;
|
|
205
|
+
title?: MediaTitle;
|
|
206
|
+
episodes?: number;
|
|
207
|
+
siteUrl?: string;
|
|
208
|
+
chapters?: number;
|
|
209
|
+
};
|
|
210
|
+
progress?: number;
|
|
211
|
+
status?: string;
|
|
212
|
+
hiddenFromStatusLists?: boolean;
|
|
213
|
+
private?: boolean;
|
|
214
|
+
}
|
|
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
|
+
type UserActivitiesResponse = {
|
|
241
|
+
data?: {
|
|
242
|
+
Page: {
|
|
243
|
+
activities: {
|
|
244
|
+
status: string;
|
|
245
|
+
progress: number;
|
|
246
|
+
createdAt: number;
|
|
247
|
+
media: {
|
|
248
|
+
title: MediaTitle;
|
|
249
|
+
};
|
|
250
|
+
}[];
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
errors?: {
|
|
254
|
+
message: string;
|
|
255
|
+
}[];
|
|
256
|
+
};
|
|
257
|
+
type UserResponse = {
|
|
258
|
+
data?: {
|
|
259
|
+
User: {
|
|
260
|
+
id: number;
|
|
261
|
+
name: string;
|
|
262
|
+
siteUrl: string;
|
|
263
|
+
donatorTier: string;
|
|
264
|
+
donatorBadge: string;
|
|
265
|
+
createdAt: number;
|
|
266
|
+
updatedAt: number;
|
|
267
|
+
isBlocked: boolean;
|
|
268
|
+
isFollower: boolean;
|
|
269
|
+
isFollowing: boolean;
|
|
270
|
+
options: {
|
|
271
|
+
profileColor: string;
|
|
272
|
+
timezone: string;
|
|
273
|
+
};
|
|
274
|
+
statistics: {
|
|
275
|
+
anime: {
|
|
276
|
+
count: number;
|
|
277
|
+
episodesWatched: number;
|
|
278
|
+
minutesWatched: number;
|
|
279
|
+
};
|
|
280
|
+
manga: {
|
|
281
|
+
count: number;
|
|
282
|
+
chaptersRead: number;
|
|
283
|
+
volumesRead: number;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
errors?: {
|
|
289
|
+
message: string;
|
|
290
|
+
}[];
|
|
291
|
+
};
|
|
292
|
+
type UserFollower = {
|
|
293
|
+
data?: {
|
|
294
|
+
Page: {
|
|
295
|
+
pageInfo: {
|
|
296
|
+
total: number;
|
|
297
|
+
perPage: number;
|
|
298
|
+
currentPage: number;
|
|
299
|
+
lastPage: number;
|
|
300
|
+
hasNextPage: boolean;
|
|
301
|
+
};
|
|
302
|
+
followers: {
|
|
303
|
+
id: number;
|
|
304
|
+
name: string;
|
|
305
|
+
avatar: {
|
|
306
|
+
large: string;
|
|
307
|
+
medium: string;
|
|
308
|
+
};
|
|
309
|
+
bannerImage: string;
|
|
310
|
+
}[];
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
errors?: {
|
|
314
|
+
message: string;
|
|
315
|
+
}[];
|
|
316
|
+
};
|
|
317
|
+
type User = {
|
|
318
|
+
id: number;
|
|
319
|
+
name: string;
|
|
320
|
+
avatar: {
|
|
321
|
+
large: string;
|
|
322
|
+
medium: string;
|
|
323
|
+
};
|
|
324
|
+
bannerImage: string;
|
|
325
|
+
};
|
|
326
|
+
type UserFollowing = {
|
|
327
|
+
data?: {
|
|
328
|
+
Page: {
|
|
329
|
+
pageInfo: {
|
|
330
|
+
total: number;
|
|
331
|
+
perPage: number;
|
|
332
|
+
currentPage: number;
|
|
333
|
+
lastPage: number;
|
|
334
|
+
hasNextPage: boolean;
|
|
335
|
+
};
|
|
336
|
+
following: User[];
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
errors?: {
|
|
340
|
+
message: string;
|
|
341
|
+
}[];
|
|
342
|
+
};
|
|
343
|
+
type AnimeSearchResponse = {
|
|
344
|
+
data?: {
|
|
345
|
+
Page: {
|
|
346
|
+
media: {
|
|
347
|
+
id: number;
|
|
348
|
+
title: MediaTitle;
|
|
349
|
+
startDate: DateMonthYear;
|
|
350
|
+
episodes: number;
|
|
351
|
+
status: string;
|
|
352
|
+
description: string;
|
|
353
|
+
}[];
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
errors?: {
|
|
357
|
+
message: string;
|
|
358
|
+
}[];
|
|
359
|
+
};
|
|
360
|
+
type LikeActivityResponse = {
|
|
361
|
+
data?: {
|
|
362
|
+
ToggleLike: {
|
|
363
|
+
id: number;
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
errors?: {
|
|
367
|
+
message: string;
|
|
368
|
+
}[];
|
|
369
|
+
};
|
|
370
|
+
type SpecificUserActivitiesResponse = {
|
|
371
|
+
data?: {
|
|
372
|
+
Page: {
|
|
373
|
+
pageInfo: {
|
|
374
|
+
total: number;
|
|
375
|
+
perPage: number;
|
|
376
|
+
currentPage: number;
|
|
377
|
+
lastPage: number;
|
|
378
|
+
hasNextPage: boolean;
|
|
379
|
+
};
|
|
380
|
+
activities: TheActivity[];
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
errors?: {
|
|
384
|
+
message: string;
|
|
385
|
+
}[];
|
|
386
|
+
};
|
|
387
|
+
type SaveTextActivityResponse = {
|
|
388
|
+
data?: {
|
|
389
|
+
SaveTextActivity: {
|
|
390
|
+
id: number;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
errors?: {
|
|
394
|
+
message: string;
|
|
395
|
+
}[];
|
|
396
|
+
};
|
|
397
|
+
type DeleteActivityResponse = {
|
|
398
|
+
data?: {
|
|
399
|
+
DeleteMediaListEntry: {
|
|
400
|
+
deleted: boolean;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
errors?: {
|
|
404
|
+
message: string;
|
|
405
|
+
}[];
|
|
406
|
+
};
|
|
407
|
+
export { AniListMediaStatus, AnimeDetails, AnimeList, AnimeSearchResponse, DateMonthYear, DeleteActivityResponse, DeleteMangaResponse, LikeActivityResponse, List, MALAnimeStatus, MALAnimeXML, MALMangaStatus, MalIdToAnilistIdResponse, MediaEntry, MediaList, MediaListEntry, MediaTitle, MediaWithProgress, Myself, SaveTextActivityResponse, SpecificUserActivitiesResponse, TheActivity, User, UserActivitiesResponse, UserFollower, UserFollowing, UserResponse, saveAnimeWithProgressResponse, };
|
package/bin/helpers/workers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MALAnimeStatus, MALMangaStatus, MediaWithProgress } from "./types.js";
|
|
1
|
+
import { MALAnimeStatus, MALMangaStatus, MediaWithProgress, TheActivity } from "./types.js";
|
|
2
2
|
declare const aniListEndpoint = "https://graphql.anilist.co";
|
|
3
3
|
declare const redirectUri = "https://anilist.co/api/v2/oauth/pin";
|
|
4
4
|
declare function getTitle(title: {
|
|
@@ -6,9 +6,9 @@ declare function getTitle(title: {
|
|
|
6
6
|
romaji?: string;
|
|
7
7
|
}): string;
|
|
8
8
|
declare function formatDateObject(dateObj: {
|
|
9
|
-
day?:
|
|
10
|
-
month?:
|
|
11
|
-
year?:
|
|
9
|
+
day?: number;
|
|
10
|
+
month?: number;
|
|
11
|
+
year?: number;
|
|
12
12
|
} | null): string;
|
|
13
13
|
declare function getNextSeasonAndYear(): {
|
|
14
14
|
nextSeason: string;
|
|
@@ -34,4 +34,8 @@ declare function createAnimeXML(malId: number, progress: number, status: MALAnim
|
|
|
34
34
|
declare function createMangaXML(malId: number, progress: number, status: MALMangaStatus, chapters: number, title: string): string;
|
|
35
35
|
declare function createAnimeListXML(mediaWithProgress: MediaWithProgress[]): Promise<string>;
|
|
36
36
|
declare function createMangaListXML(mediaWithProgress: MediaWithProgress[]): Promise<string>;
|
|
37
|
-
|
|
37
|
+
declare function getCurrentPackageVersion(): string | null;
|
|
38
|
+
declare function timestampToTimeAgo(timestamp: number): string;
|
|
39
|
+
declare function activityBy(activity: TheActivity): string;
|
|
40
|
+
declare const anidbToanilistMapper: (romanjiName: string, year: number, englishName?: string) => Promise<number | null>;
|
|
41
|
+
export { activityBy, anidbToanilistMapper, aniListEndpoint, createAnimeListXML, createAnimeXML, createMangaListXML, createMangaXML, formatDateObject, getCurrentPackageVersion, getDownloadFolderPath, getFormattedDate, getNextSeasonAndYear, getTitle, redirectUri, removeHtmlAndMarkdown, saveJSONasCSV, saveJSONasJSON, selectFile, timestampToTimeAgo, };
|