@irfanshadikrishad/anilist 1.2.0-forbidden.1 → 1.2.1-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/LICENSE.md +382 -382
- package/README.md +255 -245
- package/bin/helpers/auth.d.ts +48 -8
- package/bin/helpers/auth.js +415 -259
- package/bin/helpers/fetcher.d.ts +1 -1
- package/bin/helpers/lists.d.ts +5 -2
- package/bin/helpers/lists.js +317 -246
- package/bin/helpers/mutations.js +35 -35
- package/bin/helpers/queries.d.ts +7 -4
- package/bin/helpers/queries.js +173 -154
- package/bin/helpers/types.d.ts +349 -8
- package/bin/helpers/validation.d.ts +29 -0
- package/bin/helpers/validation.js +117 -0
- package/bin/helpers/workers.d.ts +8 -5
- package/bin/helpers/workers.js +155 -72
- package/bin/index.js +36 -5
- package/package.json +84 -80
- package/assets/binance.jpg +0 -0
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,351 @@ 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 SaveTextActivityResponse {
|
|
125
|
+
data?: {
|
|
126
|
+
SaveTextActivity: {
|
|
127
|
+
id: number;
|
|
128
|
+
userId: number;
|
|
129
|
+
text: string;
|
|
130
|
+
createdAt: number;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
errors?: {
|
|
134
|
+
message: string;
|
|
135
|
+
}[];
|
|
136
|
+
}
|
|
137
|
+
interface MediaListCollectionResponse {
|
|
138
|
+
data?: {
|
|
139
|
+
MediaListCollection: {
|
|
140
|
+
lists: MediaList[];
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
errors?: {
|
|
144
|
+
message: string;
|
|
145
|
+
}[];
|
|
146
|
+
}
|
|
147
|
+
interface List {
|
|
148
|
+
name: string;
|
|
149
|
+
entries: MediaEntry[];
|
|
150
|
+
}
|
|
151
|
+
interface MediaList {
|
|
152
|
+
id(id: number | string): string;
|
|
153
|
+
title: {
|
|
154
|
+
english?: string;
|
|
155
|
+
romaji?: string;
|
|
156
|
+
};
|
|
157
|
+
name: string;
|
|
158
|
+
entries: MediaListEntry[];
|
|
159
|
+
}
|
|
160
|
+
interface Myself {
|
|
161
|
+
data?: {
|
|
162
|
+
Viewer: {
|
|
163
|
+
id: number;
|
|
164
|
+
name: string;
|
|
165
|
+
siteUrl: string;
|
|
166
|
+
options: {
|
|
167
|
+
profileColor: string;
|
|
168
|
+
timezone: string;
|
|
169
|
+
activityMergeTime: string;
|
|
170
|
+
};
|
|
171
|
+
donatorTier: string;
|
|
172
|
+
donatorBadge: string;
|
|
173
|
+
unreadNotificationCount: number;
|
|
174
|
+
createdAt: number;
|
|
175
|
+
updatedAt: number;
|
|
176
|
+
statistics: {
|
|
177
|
+
anime: {
|
|
178
|
+
count: number;
|
|
179
|
+
meanScore: string;
|
|
180
|
+
minutesWatched: string;
|
|
181
|
+
episodesWatched: number;
|
|
182
|
+
};
|
|
183
|
+
manga: {
|
|
184
|
+
count: number;
|
|
185
|
+
meanScore: string;
|
|
186
|
+
chaptersRead: number;
|
|
187
|
+
volumesRead: number;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
errors?: {
|
|
193
|
+
message: string;
|
|
194
|
+
}[];
|
|
195
|
+
}
|
|
196
|
+
interface DateMonthYear {
|
|
197
|
+
day?: number;
|
|
198
|
+
month?: number;
|
|
199
|
+
year?: number;
|
|
200
|
+
}
|
|
201
|
+
interface AnimeDetails {
|
|
202
|
+
data?: {
|
|
203
|
+
Media: {
|
|
204
|
+
id: number;
|
|
205
|
+
title: MediaTitle;
|
|
206
|
+
description: string;
|
|
207
|
+
duration: string;
|
|
208
|
+
startDate: DateMonthYear;
|
|
209
|
+
endDate: DateMonthYear;
|
|
210
|
+
countryOfOrigin: string;
|
|
211
|
+
isAdult: boolean;
|
|
212
|
+
status: string;
|
|
213
|
+
season: string;
|
|
214
|
+
format: string;
|
|
215
|
+
genres: [string];
|
|
216
|
+
siteUrl: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
errors?: {
|
|
220
|
+
message: string;
|
|
221
|
+
}[];
|
|
222
|
+
}
|
|
223
|
+
interface SaveMediaListEntryResponse {
|
|
224
|
+
data?: {
|
|
225
|
+
SaveMediaListEntry: {
|
|
226
|
+
id: number;
|
|
227
|
+
status: string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
errors?: {
|
|
231
|
+
message: string;
|
|
232
|
+
}[];
|
|
233
|
+
}
|
|
234
|
+
interface MediaListEntry {
|
|
235
|
+
id?: number;
|
|
236
|
+
media: {
|
|
237
|
+
id?: number;
|
|
238
|
+
idMal?: number;
|
|
239
|
+
title?: MediaTitle;
|
|
240
|
+
episodes?: number;
|
|
241
|
+
siteUrl?: string;
|
|
242
|
+
chapters?: number;
|
|
243
|
+
};
|
|
244
|
+
progress?: number;
|
|
245
|
+
status?: string;
|
|
246
|
+
hiddenFromStatusLists?: boolean;
|
|
247
|
+
private?: boolean;
|
|
248
|
+
}
|
|
249
|
+
interface TheActivity {
|
|
250
|
+
type: string;
|
|
251
|
+
id: number;
|
|
252
|
+
message?: string;
|
|
253
|
+
createdAt: number;
|
|
254
|
+
recipient?: {
|
|
255
|
+
id: number;
|
|
256
|
+
name: string;
|
|
257
|
+
};
|
|
258
|
+
isLiked?: boolean;
|
|
259
|
+
user?: {
|
|
260
|
+
id?: number;
|
|
261
|
+
name?: string;
|
|
262
|
+
};
|
|
263
|
+
messenger?: {
|
|
264
|
+
name: string;
|
|
265
|
+
};
|
|
266
|
+
media?: {
|
|
267
|
+
title?: {
|
|
268
|
+
userPreferred: string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
progress?: string | null;
|
|
272
|
+
status?: string;
|
|
273
|
+
}
|
|
274
|
+
type UserActivitiesResponse = {
|
|
275
|
+
data?: {
|
|
276
|
+
Page: {
|
|
277
|
+
activities: Activity[];
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
errors?: {
|
|
281
|
+
message: string;
|
|
282
|
+
}[];
|
|
283
|
+
};
|
|
284
|
+
type UserResponse = {
|
|
285
|
+
data?: {
|
|
286
|
+
User: {
|
|
287
|
+
id: number;
|
|
288
|
+
name: string;
|
|
289
|
+
siteUrl: string;
|
|
290
|
+
donatorTier: string;
|
|
291
|
+
donatorBadge: string;
|
|
292
|
+
createdAt: number;
|
|
293
|
+
updatedAt: number;
|
|
294
|
+
isBlocked: boolean;
|
|
295
|
+
isFollower: boolean;
|
|
296
|
+
isFollowing: boolean;
|
|
297
|
+
options: {
|
|
298
|
+
profileColor: string;
|
|
299
|
+
timezone: string;
|
|
300
|
+
};
|
|
301
|
+
statistics: {
|
|
302
|
+
anime: {
|
|
303
|
+
count: number;
|
|
304
|
+
episodesWatched: number;
|
|
305
|
+
minutesWatched: number;
|
|
306
|
+
};
|
|
307
|
+
manga: {
|
|
308
|
+
count: number;
|
|
309
|
+
chaptersRead: number;
|
|
310
|
+
volumesRead: number;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
errors?: {
|
|
316
|
+
message: string;
|
|
317
|
+
}[];
|
|
318
|
+
};
|
|
319
|
+
type UserFollower = {
|
|
320
|
+
data?: {
|
|
321
|
+
Page: {
|
|
322
|
+
pageInfo: {
|
|
323
|
+
total: number;
|
|
324
|
+
perPage: number;
|
|
325
|
+
currentPage: number;
|
|
326
|
+
lastPage: number;
|
|
327
|
+
hasNextPage: boolean;
|
|
328
|
+
};
|
|
329
|
+
followers: User[];
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
errors?: {
|
|
333
|
+
message: string;
|
|
334
|
+
}[];
|
|
335
|
+
};
|
|
336
|
+
type User = {
|
|
337
|
+
id: number;
|
|
338
|
+
name: string;
|
|
339
|
+
avatar: {
|
|
340
|
+
large: string;
|
|
341
|
+
medium: string;
|
|
342
|
+
};
|
|
343
|
+
bannerImage: string;
|
|
344
|
+
isFollower: boolean;
|
|
345
|
+
isFollowing: boolean;
|
|
346
|
+
};
|
|
347
|
+
type UserFollowing = {
|
|
348
|
+
data?: {
|
|
349
|
+
Page: {
|
|
350
|
+
pageInfo: {
|
|
351
|
+
total: number;
|
|
352
|
+
perPage: number;
|
|
353
|
+
currentPage: number;
|
|
354
|
+
lastPage: number;
|
|
355
|
+
hasNextPage: boolean;
|
|
356
|
+
};
|
|
357
|
+
following: User[];
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
errors?: {
|
|
361
|
+
message: string;
|
|
362
|
+
}[];
|
|
363
|
+
};
|
|
364
|
+
type AnimeSearchResponse = {
|
|
365
|
+
data?: {
|
|
366
|
+
Page: {
|
|
367
|
+
media: {
|
|
368
|
+
id: number;
|
|
369
|
+
title: MediaTitle;
|
|
370
|
+
startDate: DateMonthYear;
|
|
371
|
+
episodes: number;
|
|
372
|
+
status: string;
|
|
373
|
+
description: string;
|
|
374
|
+
}[];
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
errors?: {
|
|
378
|
+
message: string;
|
|
379
|
+
}[];
|
|
380
|
+
};
|
|
381
|
+
type LikeActivityResponse = {
|
|
382
|
+
data?: {
|
|
383
|
+
ToggleLike: {
|
|
384
|
+
id: number;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
errors?: {
|
|
388
|
+
message: string;
|
|
389
|
+
}[];
|
|
390
|
+
};
|
|
391
|
+
type SpecificUserActivitiesResponse = {
|
|
392
|
+
data?: {
|
|
393
|
+
Page: {
|
|
394
|
+
pageInfo: {
|
|
395
|
+
total: number;
|
|
396
|
+
perPage: number;
|
|
397
|
+
currentPage: number;
|
|
398
|
+
lastPage: number;
|
|
399
|
+
hasNextPage: boolean;
|
|
400
|
+
};
|
|
401
|
+
activities: TheActivity[];
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
errors?: {
|
|
405
|
+
message: string;
|
|
406
|
+
}[];
|
|
407
|
+
};
|
|
408
|
+
type DeleteActivityResponse = {
|
|
409
|
+
data?: {
|
|
410
|
+
DeleteMediaListEntry: {
|
|
411
|
+
deleted: boolean;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
errors?: {
|
|
415
|
+
message: string;
|
|
416
|
+
}[];
|
|
417
|
+
};
|
|
418
|
+
type ToggleFollowResponse = {
|
|
419
|
+
data?: {
|
|
420
|
+
ToggleFollow: {
|
|
421
|
+
id: number;
|
|
422
|
+
name: string;
|
|
423
|
+
isFollower: boolean;
|
|
424
|
+
isFollowing: boolean;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
errors?: {
|
|
428
|
+
message: string;
|
|
429
|
+
}[];
|
|
430
|
+
};
|
|
431
|
+
type DeleteMediaListResponse = {
|
|
432
|
+
data?: {
|
|
433
|
+
DeleteMediaListEntry: {
|
|
434
|
+
deleted: boolean;
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
errors?: {
|
|
438
|
+
message: string;
|
|
439
|
+
}[];
|
|
440
|
+
};
|
|
441
|
+
type Activity = {
|
|
442
|
+
id: number;
|
|
443
|
+
type: string;
|
|
444
|
+
status: string;
|
|
445
|
+
progress: number | null;
|
|
446
|
+
media: {
|
|
447
|
+
id?: number;
|
|
448
|
+
title: MediaTitle;
|
|
449
|
+
};
|
|
450
|
+
createdAt: number;
|
|
451
|
+
};
|
|
452
|
+
export { Activity, AniListMediaStatus, AnimeDetails, AnimeList, AnimeSearchResponse, DateMonthYear, DeleteActivityResponse, DeleteMangaResponse, DeleteMediaListResponse, LikeActivityResponse, List, MALAnimeStatus, MALAnimeXML, MALMangaStatus, MalIdToAnilistIdResponse, MediaEntry, MediaList, MediaListCollectionResponse, MediaListEntry, MediaTitle, MediaWithProgress, Myself, SaveMediaListEntryResponse, SaveTextActivityResponse, SpecificUserActivitiesResponse, TheActivity, 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 };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { parseStringPromise } from "xml2js";
|
|
11
|
+
class Validate {
|
|
12
|
+
/**
|
|
13
|
+
* Validate importable JSON file
|
|
14
|
+
* @param data string
|
|
15
|
+
* @returns boolean
|
|
16
|
+
*/
|
|
17
|
+
static Import_JSON(data) {
|
|
18
|
+
return (Array.isArray(data) &&
|
|
19
|
+
data.every((item) => typeof item === "object" && item !== null && "id" in item));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Validate if MyAnimeList Anime XML file is valid or not
|
|
23
|
+
* @param xmlData string
|
|
24
|
+
* @returns boolean
|
|
25
|
+
*/
|
|
26
|
+
static Import_AnimeXML(xmlData) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
try {
|
|
29
|
+
const result = yield parseStringPromise(xmlData, { explicitArray: false });
|
|
30
|
+
if (!result || !result.myanimelist) {
|
|
31
|
+
console.error("Invalid XML structure: Missing 'myanimelist' root element.");
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
const animeList = result.myanimelist.anime;
|
|
35
|
+
if (!animeList) {
|
|
36
|
+
console.error("Invalid XML structure: Missing 'anime' elements.");
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
const animeArray = Array.isArray(animeList) ? animeList : [animeList];
|
|
40
|
+
const isValid = animeArray.every((anime) => {
|
|
41
|
+
const isValidId = anime.series_animedb_id && !isNaN(Number(anime.series_animedb_id));
|
|
42
|
+
const hasRequiredFields = anime.series_title && anime.my_status;
|
|
43
|
+
return isValidId && hasRequiredFields;
|
|
44
|
+
});
|
|
45
|
+
if (!isValid) {
|
|
46
|
+
console.error("Validation failed: Some anime entries are missing required fields or have invalid IDs.");
|
|
47
|
+
}
|
|
48
|
+
return isValid;
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
console.error("Error parsing or validating XML:", error);
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Validate if MyAnimeList Anime XML file is valid or not
|
|
58
|
+
* @param xmlData string
|
|
59
|
+
* @returns boolean
|
|
60
|
+
*/
|
|
61
|
+
static Import_MangaXML(xmlData) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
try {
|
|
64
|
+
const result = yield parseStringPromise(xmlData, { explicitArray: false });
|
|
65
|
+
if (!result || !result.myanimelist) {
|
|
66
|
+
console.error("Invalid XML structure: Missing 'myanimelist' root element.");
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const mangaList = result.myanimelist.manga;
|
|
70
|
+
if (!mangaList) {
|
|
71
|
+
console.error("Invalid XML structure: Missing 'manga' elements.");
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
const mangaArray = Array.isArray(mangaList) ? mangaList : [mangaList];
|
|
75
|
+
const isValid = mangaArray.every((manga) => {
|
|
76
|
+
const isValidId = manga.manga_mangadb_id && !isNaN(Number(manga.manga_mangadb_id));
|
|
77
|
+
const hasRequiredFields = manga.manga_title && manga.my_status;
|
|
78
|
+
return isValidId && hasRequiredFields;
|
|
79
|
+
});
|
|
80
|
+
if (!isValid) {
|
|
81
|
+
console.error("Validation failed: Some manga entries are missing required fields or have invalid IDs.");
|
|
82
|
+
}
|
|
83
|
+
return isValid;
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
console.error("Error parsing or validating XML:", error);
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Validate AniDB json-large file
|
|
93
|
+
* @param file string of anidb json-large
|
|
94
|
+
* @returns boolean
|
|
95
|
+
*/
|
|
96
|
+
static Import_AniDBJSONLarge(file) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
try {
|
|
99
|
+
if (!(file === null || file === void 0 ? void 0 : file.trim())) {
|
|
100
|
+
console.error("File content is empty or invalid.");
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
const obj3ct = JSON.parse(file);
|
|
104
|
+
if (!obj3ct || !Array.isArray(obj3ct.anime)) {
|
|
105
|
+
console.error("Invalid JSON structure: Missing or malformed 'anime' array.");
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
console.error("Failed to parse JSON file:", error);
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export { Validate };
|
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;
|
|
@@ -35,4 +35,7 @@ declare function createMangaXML(malId: number, progress: number, status: MALMang
|
|
|
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
|
-
|
|
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, };
|