anilink-api-wrapper 1.20.0 → 1.22.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 (41) hide show
  1. package/README.md +6 -227
  2. package/dist/AniLink.js +25 -3
  3. package/dist/apis/anilist/interfaces/Activity.js +67 -1
  4. package/dist/apis/anilist/mutation/DeleteActivity.js +61 -0
  5. package/dist/apis/anilist/mutation/DeleteCustomList.js +4 -1
  6. package/dist/apis/anilist/mutation/DeleteMediaListEntry.js +3 -0
  7. package/dist/apis/anilist/mutation/SaveListActivity.js +64 -0
  8. package/dist/apis/anilist/mutation/SaveMediaListEntry.js +3 -0
  9. package/dist/apis/anilist/mutation/SaveMessageActivity.js +68 -0
  10. package/dist/apis/anilist/mutation/SaveTextActivity.js +3 -0
  11. package/dist/apis/anilist/mutation/ToggleActivityPin.js +64 -0
  12. package/dist/apis/anilist/mutation/ToggleActivitySubscription.js +64 -0
  13. package/dist/apis/anilist/mutation/UpdateMediaListEntries.js +3 -0
  14. package/dist/apis/anilist/mutation/UpdateUser.js +3 -0
  15. package/dist/apis/anilist/query/AniChartUser.js +3 -3
  16. package/dist/apis/anilist/query/Notification.js +3 -0
  17. package/dist/apis/anilist/query/Viewer.js +3 -0
  18. package/package.json +10 -4
  19. package/dist/apis/anilist/interfaces/Stats.js +0 -2
  20. package/dist/apis/anilist/interfaces/responses/AiringSchedule.js +0 -14
  21. package/dist/apis/anilist/interfaces/responses/AniChartUser.js +0 -2
  22. package/dist/apis/anilist/interfaces/responses/Character.js +0 -30
  23. package/dist/apis/anilist/interfaces/responses/ExternalLinkSourceCollection.js +0 -2
  24. package/dist/apis/anilist/interfaces/responses/Media.js +0 -210
  25. package/dist/apis/anilist/interfaces/responses/MediaList.js +0 -32
  26. package/dist/apis/anilist/interfaces/responses/MediaListCollectionResponse.js +0 -41
  27. package/dist/apis/anilist/interfaces/responses/MediaTag.js +0 -2
  28. package/dist/apis/anilist/interfaces/responses/MediaTagCollection.js +0 -2
  29. package/dist/apis/anilist/interfaces/responses/MediaTrend.js +0 -17
  30. package/dist/apis/anilist/interfaces/responses/Notification.js +0 -164
  31. package/dist/apis/anilist/interfaces/responses/Recommendation.js +0 -19
  32. package/dist/apis/anilist/interfaces/responses/Review.js +0 -26
  33. package/dist/apis/anilist/interfaces/responses/SiteStatistics.js +0 -27
  34. package/dist/apis/anilist/interfaces/responses/Staff.js +0 -55
  35. package/dist/apis/anilist/interfaces/responses/Studio.js +0 -56
  36. package/dist/apis/anilist/interfaces/responses/Thread.js +0 -40
  37. package/dist/apis/anilist/interfaces/responses/ThreadComment.js +0 -27
  38. package/dist/apis/anilist/interfaces/responses/User.js +0 -362
  39. package/dist/apis/anilist/query/Like.js +0 -69
  40. package/dist/apis/anilist/types/MediaListStatus.js +0 -15
  41. package/dist/apis/anilist/types/ScoreFormat.js +0 -14
@@ -1,362 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserSchema = void 0;
4
- const Image_1 = require("../Image");
5
- const UserStats_1 = require("../UserStats");
6
- const Title_1 = require("../Title");
7
- const Name_1 = require("../Name");
8
- const CoverImage_1 = require("../CoverImage");
9
- const Tag_1 = require("../Tag");
10
- exports.UserSchema = `
11
- id
12
- name
13
- about(asHtml: $asHtml)
14
- avatar {
15
- large
16
- medium
17
- }
18
- bannerImage
19
- isFollowing
20
- isFollower
21
- isBlocked
22
- bans
23
- options {
24
- titleLanguage
25
- displayAdultContent
26
- airingNotifications
27
- profileColor
28
- notificationOptions {
29
- type
30
- enabled
31
- }
32
- timezone
33
- activityMergeTime
34
- staffNameLanguage
35
- restrictMessagesToFollowing
36
- disabledListActivity {
37
- disabled
38
- type
39
- }
40
- }
41
- mediaListOptions {
42
- scoreFormat
43
- rowOrder
44
- animeList {
45
- sectionOrder
46
- splitCompletedSectionByFormat
47
- customLists
48
- advancedScoring
49
- advancedScoringEnabled
50
- }
51
- mangaList {
52
- sectionOrder
53
- splitCompletedSectionByFormat
54
- customLists
55
- advancedScoring
56
- advancedScoringEnabled
57
- }
58
- }
59
- favourites {
60
- anime (perPage: 50) {
61
- edges {
62
- node {
63
- id
64
- ${Title_1.TitleSchema}
65
- }
66
- }
67
- nodes {
68
- id
69
- ${Title_1.TitleSchema}
70
- }
71
- }
72
- manga (perPage: 50) {
73
- edges {
74
- node {
75
- id
76
- ${Title_1.TitleSchema}
77
- }
78
- }
79
- nodes {
80
- id
81
- ${Title_1.TitleSchema}
82
- }
83
- }
84
- characters (perPage: 50) {
85
- edges {
86
- id
87
- role
88
- name
89
- voiceActors {
90
- id
91
- ${Name_1.NameSchema}
92
- ${Image_1.ImageSchema}
93
- }
94
- media {
95
- id
96
- ${Title_1.TitleSchema}
97
- ${CoverImage_1.CoverImageSchema}
98
- }
99
- favouriteOrder
100
- node {
101
- id
102
- ${Name_1.NameSchema}
103
- ${Image_1.ImageSchema}
104
- }
105
- }
106
- }
107
- staff (perPage: 50) {
108
- edges {
109
- id
110
- role
111
- favouriteOrder
112
- node {
113
- id
114
- ${Name_1.NameSchema}
115
- ${Image_1.ImageSchema}
116
- }
117
- }
118
- }
119
- studios (perPage: 50) {
120
- edges {
121
- id
122
- isMain
123
- favouriteOrder
124
- node {
125
- id
126
- name
127
- isAnimationStudio
128
- siteUrl
129
- }
130
- }
131
- }
132
- }
133
- statistics {
134
- anime {
135
- count
136
- meanScore
137
- standardDeviation
138
- minutesWatched
139
- episodesWatched
140
- formats (limit: $animeStatLimit, sort: $animeStatSort) {
141
- ${UserStats_1.UserAnimeStatsSchema}
142
- format
143
- }
144
- statuses (limit: $animeStatLimit, sort: $animeStatSort) {
145
- ${UserStats_1.UserAnimeStatsSchema}
146
- status
147
- }
148
- scores (limit: $animeStatLimit, sort: $animeStatSort) {
149
- ${UserStats_1.UserAnimeStatsSchema}
150
- score
151
- }
152
- lengths (limit: $animeStatLimit, sort: $animeStatSort) {
153
- ${UserStats_1.UserAnimeStatsSchema}
154
- length
155
- }
156
- releaseYears (limit: $animeStatLimit, sort: $animeStatSort) {
157
- ${UserStats_1.UserAnimeStatsSchema}
158
- releaseYear
159
- }
160
- startYears (limit: $animeStatLimit, sort: $animeStatSort) {
161
- ${UserStats_1.UserAnimeStatsSchema}
162
- startYear
163
- }
164
- genres (limit: $animeStatLimit, sort: $animeStatSort) {
165
- ${UserStats_1.UserAnimeStatsSchema}
166
- genre
167
- }
168
- tags (limit: $animeStatLimit, sort: $animeStatSort) {
169
- ${UserStats_1.UserAnimeStatsSchema}
170
- tag {
171
- ${Tag_1.TagSchema}
172
- }
173
- }
174
- countries (limit: $animeStatLimit, sort: $animeStatSort) {
175
- ${UserStats_1.UserAnimeStatsSchema}
176
- country
177
- }
178
- voiceActors (limit: $animeStatLimit, sort: $animeStatSort) {
179
- ${UserStats_1.UserAnimeStatsSchema}
180
- voiceActor {
181
- id
182
- ${Name_1.NameSchema}
183
- }
184
- characterIds
185
- }
186
- staff (limit: $animeStatLimit, sort: $animeStatSort) {
187
- ${UserStats_1.UserAnimeStatsSchema}
188
- staff {
189
- id
190
- ${Name_1.NameSchema}
191
- }
192
- }
193
- studios (limit: $animeStatLimit, sort: $animeStatSort) {
194
- ${UserStats_1.UserAnimeStatsSchema}
195
- studio {
196
- id
197
- name
198
- }
199
- }
200
- }
201
- manga {
202
- count
203
- meanScore
204
- standardDeviation
205
- chaptersRead
206
- volumesRead
207
- formats (limit: $mangaStatLimit, sort: $mangaStatSort) {
208
- ${UserStats_1.UserMangaStatsSchema}
209
- format
210
- }
211
- statuses (limit: $mangaStatLimit, sort: $mangaStatSort) {
212
- ${UserStats_1.UserMangaStatsSchema}
213
- status
214
- }
215
- scores (limit: $mangaStatLimit, sort: $mangaStatSort) {
216
- ${UserStats_1.UserMangaStatsSchema}
217
- score
218
- }
219
- lengths (limit: $mangaStatLimit, sort: $mangaStatSort) {
220
- ${UserStats_1.UserMangaStatsSchema}
221
- length
222
- }
223
- releaseYears (limit: $mangaStatLimit, sort: $mangaStatSort) {
224
- ${UserStats_1.UserMangaStatsSchema}
225
- releaseYear
226
- }
227
- startYears (limit: $mangaStatLimit, sort: $mangaStatSort) {
228
- ${UserStats_1.UserMangaStatsSchema}
229
- startYear
230
- }
231
- genres (limit: $mangaStatLimit, sort: $mangaStatSort) {
232
- ${UserStats_1.UserMangaStatsSchema}
233
- genre
234
- }
235
- tags (limit: $mangaStatLimit, sort: $mangaStatSort) {
236
- ${UserStats_1.UserMangaStatsSchema}
237
- tag {
238
- ${Tag_1.TagSchema}
239
- }
240
- }
241
- countries (limit: $mangaStatLimit, sort: $mangaStatSort) {
242
- ${UserStats_1.UserMangaStatsSchema}
243
- country
244
- }
245
- staff (limit: $mangaStatLimit, sort: $mangaStatSort) {
246
- ${UserStats_1.UserMangaStatsSchema}
247
- staff {
248
- id
249
- ${Name_1.NameSchema}
250
- }
251
- }
252
- studios (limit: $mangaStatLimit, sort: $mangaStatSort) {
253
- ${UserStats_1.UserMangaStatsSchema}
254
- studio {
255
- id
256
- name
257
- }
258
- }
259
- }
260
- }
261
- stats {
262
- watchedTime
263
- chaptersRead
264
- activityHistory {
265
- date
266
- amount
267
- level
268
- }
269
- animeStatusDistribution {
270
- status
271
- amount
272
- }
273
- mangaStatusDistribution {
274
- status
275
- amount
276
- }
277
- animeScoreDistribution {
278
- score
279
- amount
280
- }
281
- mangaScoreDistribution {
282
- score
283
- amount
284
- }
285
- animeListScores {
286
- meanScore
287
- standardDeviation
288
- }
289
- mangaListScores {
290
- meanScore
291
- standardDeviation
292
- }
293
- favouredGenresOverview {
294
- genre
295
- amount
296
- meanScore
297
- timeWatched
298
- }
299
- favouredGenres {
300
- genre
301
- amount
302
- meanScore
303
- timeWatched
304
- }
305
- favouredTags {
306
- tag {
307
- ${Tag_1.TagSchema}
308
- }
309
- amount
310
- meanScore
311
- timeWatched
312
- }
313
- favouredActors {
314
- staff {
315
- id
316
- ${Name_1.NameSchema}
317
- }
318
- amount
319
- meanScore
320
- timeWatched
321
- }
322
- favouredStaff {
323
- staff {
324
- id
325
- ${Name_1.NameSchema}
326
- }
327
- amount
328
- meanScore
329
- timeWatched
330
- }
331
- favouredStudios {
332
- studio {
333
- id
334
- name
335
- }
336
- amount
337
- meanScore
338
- timeWatched
339
- }
340
- favouredYears {
341
- year
342
- amount
343
- meanScore
344
- }
345
- favouredFormats {
346
- format
347
- amount
348
- }
349
- }
350
- unreadNotificationCount
351
- siteUrl
352
- donatorTier
353
- donatorBadge
354
- moderatorRoles
355
- createdAt
356
- updatedAt
357
- previousNames {
358
- name
359
- createdAt
360
- updatedAt
361
- }
362
- `;
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) {
4
- return value instanceof P ? value : new P(function (resolve) {
5
- resolve(value);
6
- });
7
- }
8
-
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) {
11
- try {
12
- step(generator.next(value));
13
- } catch (e) {
14
- reject(e);
15
- }
16
- }
17
-
18
- function rejected(value) {
19
- try {
20
- step(generator["throw"](value));
21
- } catch (e) {
22
- reject(e);
23
- }
24
- }
25
-
26
- function step(result) {
27
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
28
- }
29
-
30
- step((generator = generator.apply(thisArg, _arguments || [])).next());
31
- });
32
- };
33
- Object.defineProperty(exports, "__esModule", {value: true});
34
- exports.LikeQuery = void 0;
35
- const APIWrapper_1 = require("../../../base/APIWrapper");
36
- const RequestHandler_1 = require("../../../base/RequestHandler");
37
- const BasicUser_1 = require("../interfaces/BasicUser");
38
-
39
- class LikeQuery extends APIWrapper_1.APIWrapper {
40
- constructor(authToken) {
41
- super('https://graphql.anilist.co');
42
- this.authToken = authToken;
43
- }
44
-
45
- like(variables) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- const query = `
48
- query ($likeableId: Int, $type: LikeableType, $page: Int, $perPage: Int) {
49
- Page (page: $page, perPage: $perPage) {
50
- pageInfo {
51
- total
52
- perPage
53
- currentPage
54
- lastPage
55
- hasNextPage
56
- }
57
- likes (likeableId: $likeableId, type: $type) {
58
- ${BasicUser_1.BasicUserSchema}
59
- }
60
- }
61
- }
62
- `;
63
- const data = {query, variables};
64
- return yield (0, RequestHandler_1.sendRequest)(this.baseURL, 'POST', data, this.authToken);
65
- });
66
- }
67
- }
68
-
69
- exports.LikeQuery = LikeQuery;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MediaListStatusMappings = void 0;
4
- /**
5
- * `MediaListStatusMappings` is a constant that maps the `MediaListStatus` values to their expected types.
6
- * The values are mapped to 'string'.
7
- */
8
- exports.MediaListStatusMappings = [
9
- 'CURRENT',
10
- 'PLANNING',
11
- 'COMPLETED',
12
- 'DROPPED',
13
- 'PAUSED',
14
- 'REPEATING'
15
- ];
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ScoreFormatMapping = void 0;
4
- /**
5
- * `ScoreFormatMapping` is a mapping of `ScoreFormat` values to their string representations.
6
- * It can be one of the following: 'POINT_100', 'POINT_10_DECIMAL', 'POINT_10', 'POINT_5', 'POINT_3'.
7
- */
8
- exports.ScoreFormatMapping = [
9
- 'POINT_100',
10
- 'POINT_10_DECIMAL',
11
- 'POINT_10',
12
- 'POINT_5',
13
- 'POINT_3'
14
- ];