anilink-api-wrapper 1.1.0 → 1.3.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 (72) hide show
  1. package/dist/AniLink.js +13 -1
  2. package/dist/apis/anilist/interfaces/Activity.js +19 -0
  3. package/dist/apis/anilist/interfaces/ActivityNotification.js +17 -0
  4. package/dist/apis/anilist/interfaces/BasicComment.js +8 -0
  5. package/dist/apis/anilist/interfaces/BasicThread.js +9 -0
  6. package/dist/apis/anilist/interfaces/BasicUser.js +10 -0
  7. package/dist/apis/anilist/interfaces/Tag.js +2 -0
  8. package/dist/apis/anilist/interfaces/ThreadNotification.js +23 -0
  9. package/dist/apis/anilist/interfaces/responses/MediaTag.js +2 -0
  10. package/dist/apis/anilist/interfaces/responses/MediaTagCollection.js +2 -0
  11. package/dist/apis/anilist/interfaces/responses/Notification.js +170 -0
  12. package/dist/apis/anilist/interfaces/responses/User.js +3 -3
  13. package/dist/apis/anilist/query/GenreCollection.js +32 -0
  14. package/dist/apis/anilist/query/MediaTagCollection.js +35 -0
  15. package/dist/apis/anilist/query/Notification.js +35 -0
  16. package/dist/apis/anilist/query/User.js +2 -15
  17. package/dist/apis/anilist/query/Viewer.js +35 -0
  18. package/package.json +3 -2
  19. package/.eslintignore +0 -1
  20. package/.github/workflows/code_quality.yml +0 -32
  21. package/.github/workflows/codeql.yml +0 -33
  22. package/.github/workflows/test.yml +0 -30
  23. package/__tests__/anilist.test.ts +0 -268
  24. package/babel.config.js +0 -6
  25. package/jest.config.js +0 -11
  26. package/src/AniLink.ts +0 -80
  27. package/src/apis/anilist/interfaces/ActivityHistory.ts +0 -5
  28. package/src/apis/anilist/interfaces/CoverImage.ts +0 -15
  29. package/src/apis/anilist/interfaces/Distribution.ts +0 -4
  30. package/src/apis/anilist/interfaces/ExternalLink.ts +0 -13
  31. package/src/apis/anilist/interfaces/Favoured.ts +0 -15
  32. package/src/apis/anilist/interfaces/FuzzyDate.ts +0 -11
  33. package/src/apis/anilist/interfaces/Image.ts +0 -11
  34. package/src/apis/anilist/interfaces/ListScores.ts +0 -4
  35. package/src/apis/anilist/interfaces/Media.ts +0 -59
  36. package/src/apis/anilist/interfaces/MediaListEntry.ts +0 -11
  37. package/src/apis/anilist/interfaces/MediaStatistics.ts +0 -23
  38. package/src/apis/anilist/interfaces/MediaStats.ts +0 -7
  39. package/src/apis/anilist/interfaces/Name.ts +0 -17
  40. package/src/apis/anilist/interfaces/NextAiringEpisode.ts +0 -13
  41. package/src/apis/anilist/interfaces/Ranking.ts +0 -23
  42. package/src/apis/anilist/interfaces/ScoreDistribution.ts +0 -11
  43. package/src/apis/anilist/interfaces/Staff.ts +0 -6
  44. package/src/apis/anilist/interfaces/Stat.ts +0 -24
  45. package/src/apis/anilist/interfaces/Statistics.ts +0 -6
  46. package/src/apis/anilist/interfaces/StatusDistribution.ts +0 -11
  47. package/src/apis/anilist/interfaces/StreamingEpisode.ts +0 -15
  48. package/src/apis/anilist/interfaces/Studio.ts +0 -4
  49. package/src/apis/anilist/interfaces/Tag.ts +0 -20
  50. package/src/apis/anilist/interfaces/Title.ts +0 -15
  51. package/src/apis/anilist/interfaces/Trailer.ts +0 -13
  52. package/src/apis/anilist/interfaces/UserStats.ts +0 -39
  53. package/src/apis/anilist/interfaces/responses/AiringSchedule.ts +0 -22
  54. package/src/apis/anilist/interfaces/responses/Character.ts +0 -50
  55. package/src/apis/anilist/interfaces/responses/Media.ts +0 -322
  56. package/src/apis/anilist/interfaces/responses/MediaList.ts +0 -54
  57. package/src/apis/anilist/interfaces/responses/MediaListCollectionResponse.ts +0 -75
  58. package/src/apis/anilist/interfaces/responses/MediaTrend.ts +0 -28
  59. package/src/apis/anilist/interfaces/responses/Staff.ts +0 -102
  60. package/src/apis/anilist/interfaces/responses/User.ts +0 -432
  61. package/src/apis/anilist/mutation/UpdateUser.ts +0 -162
  62. package/src/apis/anilist/query/AiringSchedule.ts +0 -48
  63. package/src/apis/anilist/query/Character.ts +0 -40
  64. package/src/apis/anilist/query/Media.ts +0 -98
  65. package/src/apis/anilist/query/MediaList.ts +0 -56
  66. package/src/apis/anilist/query/MediaListCollection.ts +0 -47
  67. package/src/apis/anilist/query/MediaTrend.ts +0 -54
  68. package/src/apis/anilist/query/Staff.ts +0 -48
  69. package/src/apis/anilist/query/User.ts +0 -41
  70. package/src/base/APIWrapper.ts +0 -7
  71. package/src/base/RequestHandler.ts +0 -21
  72. package/tsconfig.json +0 -15
@@ -1,15 +0,0 @@
1
- export interface StreamingEpisode {
2
- title: string
3
- thumbnail: string
4
- url: string
5
- site: string
6
- }
7
-
8
- export const StreamingEpisodeSchema = `
9
- streamingEpisodes {
10
- title
11
- thumbnail
12
- url
13
- site
14
- }
15
- `
@@ -1,4 +0,0 @@
1
- export interface Studio {
2
- id: number
3
- name: string
4
- }
@@ -1,20 +0,0 @@
1
- export interface Tag {
2
- id: number
3
- name: string
4
- description: string
5
- category: string
6
- rank: number
7
- isGeneralSpoiler: boolean
8
- isMediaSpoiler: boolean
9
- isAdult: boolean
10
- }
11
-
12
- export const TagSchema = `
13
- id
14
- name
15
- description
16
- rank
17
- isGeneralSpoiler
18
- isMediaSpoiler
19
- isAdult
20
- `
@@ -1,15 +0,0 @@
1
- export interface Title {
2
- romaji: string
3
- english: string
4
- native: string
5
- userPreferred: string
6
- }
7
-
8
- export const TitleSchema = `
9
- title {
10
- romaji
11
- english
12
- native
13
- userPreferred
14
- }
15
- `
@@ -1,13 +0,0 @@
1
- export interface Trailer {
2
- id: string
3
- site: string
4
- thumbnail: string
5
- }
6
-
7
- export const TrailerSchema = `
8
- trailer {
9
- id
10
- site
11
- thumbnail
12
- }
13
- `
@@ -1,39 +0,0 @@
1
- import { ActivityHistory } from './ActivityHistory'
2
- import { Distribution } from './Distribution'
3
- import { ScoreDistribution } from './ScoreDistribution'
4
- import { ListScores } from './ListScores'
5
- import { Favoured } from './Favoured'
6
-
7
- export interface UserStats {
8
- watchedTime: number
9
- chaptersRead: number
10
- activityHistory: ActivityHistory[]
11
- animeStatusDistribution: Distribution[]
12
- mangaStatusDistribution: Distribution[]
13
- animeScoreDistribution: ScoreDistribution[]
14
- mangaScoreDistribution: ScoreDistribution[]
15
- animeListScores: ListScores
16
- mangaListScores: ListScores
17
- favouredGenresOverview: Favoured[]
18
- favouredGenres: Favoured[]
19
- favouredTags: Favoured[]
20
- favouredActors: Favoured[]
21
- favouredStaff: Favoured[]
22
- favouredStudios: Favoured[]
23
- favouredYears: Favoured[]
24
- favouredFormats: Favoured[]
25
- }
26
-
27
- export const UserAnimeStatsSchema = `
28
- count
29
- meanScore
30
- minutesWatched
31
- mediaIds
32
- `
33
-
34
- export const UserMangaStatsSchema = `
35
- count
36
- meanScore
37
- chaptersRead
38
- mediaIds
39
- `
@@ -1,22 +0,0 @@
1
- import { Media } from '../Media'
2
- import { MediaSchema } from './Media'
3
-
4
- export interface AiringScheduleResponse {
5
- id: number
6
- airingAt: number
7
- timeUntilAiring: number
8
- episode: number
9
- mediaId: number
10
- media: Media
11
- }
12
-
13
- export const AiringScheduleSchema = `
14
- id
15
- airingAt
16
- timeUntilAiring
17
- episode
18
- mediaId
19
- media {
20
- ${MediaSchema}
21
- }
22
- `
@@ -1,50 +0,0 @@
1
- import { FuzzyDate, FuzzyDateSchema } from '../FuzzyDate'
2
- import { Name, NameSchema } from '../Name'
3
- import { Image, ImageSchema } from '../Image'
4
- import { Title, TitleSchema } from '../Title'
5
-
6
- export interface CharacterResponse {
7
- id: number
8
- name: Name
9
- image: Image
10
- description: string
11
- gender: string
12
- dateOfBirth: FuzzyDate
13
- age: string
14
- bloodType: string
15
- isFavourite: boolean
16
- isFavouriteBlocked: boolean
17
- siteUrl: string
18
- media: {
19
- nodes: Array<{
20
- id: number
21
- title: Title
22
- }>
23
- }
24
- favourites: number
25
- modNotes: string
26
- }
27
-
28
- export const CharacterSchema = `
29
- id
30
- ${NameSchema}
31
- ${ImageSchema}
32
- description(asHtml: $asHtml)
33
- gender
34
- dateOfBirth {
35
- ${FuzzyDateSchema}
36
- }
37
- age
38
- bloodType
39
- isFavourite
40
- isFavouriteBlocked
41
- siteUrl
42
- media(sort: $mediaSort, onList: $mediaOnList, page: $mediaPage, perPage: $mediaPerPage) {
43
- nodes {
44
- id
45
- ${TitleSchema}
46
- }
47
- }
48
- favourites
49
- modNotes
50
- `
@@ -1,322 +0,0 @@
1
- import { Title, TitleSchema } from '../Title'
2
- import { FuzzyDate, FuzzyDateSchema } from '../FuzzyDate'
3
- import { Trailer, TrailerSchema } from '../Trailer'
4
- import { CoverImage, CoverImageSchema } from '../CoverImage'
5
- import { Tag, TagSchema } from '../Tag'
6
- import { NextAiringEpisode, NextAiringEpisodeSchema } from '../NextAiringEpisode'
7
- import { ExternalLink, ExternalLinkSchema } from '../ExternalLink'
8
- import { StreamingEpisode, StreamingEpisodeSchema } from '../StreamingEpisode'
9
- import { Ranking, RankingSchema } from '../Ranking'
10
- import { MediaStats } from '../MediaStats'
11
- import { MediaListEntry, MediaListEntrySchema } from '../MediaListEntry'
12
- import { Name, NameSchema } from '../Name'
13
- import { Image, ImageSchema } from '../Image'
14
- import { StatusDistributionSchema } from '../StatusDistribution'
15
- import { ScoreDistributionSchema } from '../ScoreDistribution'
16
-
17
- export interface MediaResponse {
18
- id: number
19
- idMal: number
20
- title: Title
21
- type: string
22
- format: string
23
- status: string
24
- description: string
25
- startDate: FuzzyDate
26
- endDate: FuzzyDate
27
- season: string
28
- seasonYear: number
29
- seasonInt: number
30
- episodes?: number
31
- duration?: number
32
- chapters?: number
33
- volumes?: number
34
- countryOfOrigin: string
35
- isLicensed: boolean
36
- source: string
37
- hashtag: string
38
- trailer: Trailer
39
- updatedAt: number
40
- coverImage: CoverImage
41
- bannerImage: string
42
- genres: string[]
43
- synonyms: string[]
44
- averageScore: number
45
- meanScore: number
46
- popularity: number
47
- isLocked: boolean
48
- trending: number
49
- favourites: number
50
- tags: Tag[]
51
- relations: {
52
- edges: Array<{
53
- id: number
54
- relationType: string
55
- isMainStudio: boolean
56
- characterRole: string
57
- characterName: string
58
- roleNotes: string
59
- dubGroup: string
60
- staffRole: string
61
- node: {
62
- id: number
63
- title: FuzzyDate
64
- }
65
- }>
66
- }
67
- characters: {
68
- edges: Array<{
69
- id: number
70
- role: string
71
- name: string
72
- voiceActors: Array<{
73
- id: number
74
- name: Name
75
- image: Image
76
- }>
77
- media: {
78
- id: number
79
- title: Title
80
- coverImage: CoverImage
81
- }
82
- favouriteOrder: number
83
- node: {
84
- id: number
85
- name: Name
86
- image: Image
87
- }
88
- }>
89
- }
90
- staff: {
91
- edges: Array<{
92
- id: number
93
- role: string
94
- favouriteOrder: number
95
- node: {
96
- id: number
97
- name: Name
98
- image: Image
99
- }
100
- }>
101
- }
102
- studios: {
103
- edges: Array<{
104
- id: number
105
- isMain: boolean
106
- favouriteOrder: number
107
- node: {
108
- id: number
109
- name: string
110
- isAnimationStudio: boolean
111
- siteUrl: string
112
- }
113
- }>
114
- }
115
- isFavourite: boolean
116
- isAdult: boolean
117
- nextAiringEpisode: NextAiringEpisode
118
- externalLinks: ExternalLink[]
119
- streamingEpisodes: StreamingEpisode[]
120
- rankings: Ranking[]
121
- mediaListEntry: MediaListEntry
122
- stats: MediaStats
123
- siteUrl: string
124
- autoCreateForumThread: boolean
125
- isRecommendationBlocked: boolean
126
- modNotes: string
127
- }
128
-
129
- export const MediaWithRelationsSchema = `
130
- id
131
- idMal
132
- ${TitleSchema}
133
- type
134
- format
135
- status
136
- description (asHtml: $asHtml)
137
- startDate {
138
- ${FuzzyDateSchema}
139
- }
140
- endDate {
141
- ${FuzzyDateSchema}
142
- }
143
- season
144
- seasonYear
145
- seasonInt
146
- episodes
147
- duration
148
- chapters
149
- volumes
150
- countryOfOrigin
151
- isLicensed
152
- source
153
- hashtag
154
- ${TrailerSchema}
155
- updatedAt
156
- ${CoverImageSchema}
157
- bannerImage
158
- genres
159
- synonyms
160
- averageScore
161
- meanScore
162
- popularity
163
- isLocked
164
- trending
165
- favourites
166
- tags {
167
- ${TagSchema}
168
- }
169
- relations {
170
- edges {
171
- id
172
- relationType
173
- isMainStudio
174
- characters {
175
- id
176
- ${NameSchema}
177
- ${ImageSchema}
178
- description (asHtml: $asHtml)
179
- gender
180
- dateOfBirth {
181
- ${FuzzyDateSchema}
182
- }
183
- age
184
- bloodType
185
- isFavourite
186
- isFavouriteBlocked
187
- siteUrl
188
- favourites
189
- modNotes
190
- }
191
- characterRole
192
- characterName
193
- roleNotes
194
- dubGroup
195
- staffRole
196
- node {
197
- id
198
- ${TitleSchema}
199
- }
200
- }
201
- }
202
- characters {
203
- edges {
204
- id
205
- role
206
- name
207
- voiceActors {
208
- id
209
- ${NameSchema}
210
- ${ImageSchema}
211
- }
212
- media {
213
- id
214
- ${TitleSchema}
215
- ${CoverImageSchema}
216
- }
217
- favouriteOrder
218
- node {
219
- id
220
- ${NameSchema}
221
- ${ImageSchema}
222
- }
223
- }
224
- }
225
- staff {
226
- edges {
227
- id
228
- role
229
- favouriteOrder
230
- node {
231
- id
232
- ${NameSchema}
233
- ${ImageSchema}
234
- }
235
- }
236
- }
237
- studios {
238
- edges {
239
- id
240
- isMain
241
- favouriteOrder
242
- node {
243
- id
244
- name
245
- isAnimationStudio
246
- siteUrl
247
- }
248
- }
249
- }
250
- isFavourite
251
- isAdult
252
- ${NextAiringEpisodeSchema}
253
- ${ExternalLinkSchema}
254
- ${StreamingEpisodeSchema}
255
- ${RankingSchema}
256
- ${MediaListEntrySchema}
257
- stats {
258
- ${StatusDistributionSchema}
259
- ${ScoreDistributionSchema}
260
- }
261
- siteUrl
262
- autoCreateForumThread
263
- isRecommendationBlocked
264
- modNotes
265
- `
266
-
267
- export const MediaSchema = `
268
- id
269
- idMal
270
- ${TitleSchema}
271
- type
272
- format
273
- status
274
- description (asHtml: $asHtml)
275
- startDate {
276
- ${FuzzyDateSchema}
277
- }
278
- endDate {
279
- ${FuzzyDateSchema}
280
- }
281
- season
282
- seasonYear
283
- seasonInt
284
- episodes
285
- duration
286
- chapters
287
- volumes
288
- countryOfOrigin
289
- isLicensed
290
- source
291
- hashtag
292
- ${TrailerSchema}
293
- updatedAt
294
- ${CoverImageSchema}
295
- bannerImage
296
- genres
297
- synonyms
298
- averageScore
299
- meanScore
300
- popularity
301
- isLocked
302
- trending
303
- favourites
304
- tags {
305
- ${TagSchema}
306
- }
307
- isFavourite
308
- isAdult
309
- ${NextAiringEpisodeSchema}
310
- ${ExternalLinkSchema}
311
- ${StreamingEpisodeSchema}
312
- ${RankingSchema}
313
- ${MediaListEntrySchema}
314
- stats {
315
- ${StatusDistributionSchema}
316
- ${ScoreDistributionSchema}
317
- }
318
- siteUrl
319
- autoCreateForumThread
320
- isRecommendationBlocked
321
- modNotes
322
- `
@@ -1,54 +0,0 @@
1
- import { Media } from '../Media'
2
- import { FuzzyDateSchema } from '../FuzzyDate'
3
- import { MediaSchema } from './Media'
4
-
5
- export interface MediaListResponse {
6
- id: number
7
- userId: number
8
- mediaId: number
9
- status: string
10
- score: number
11
- progress: number
12
- progressVolumes: number
13
- repeat: number
14
- priority: number
15
- private: boolean
16
- notes: string
17
- hiddenFromStatusLists: boolean
18
- customLists: any
19
- advancedScores: any
20
- startedAt: any
21
- completedAt: any
22
- updatedAt: number
23
- createdAt: number
24
- media: Media
25
- user: any
26
- }
27
-
28
- export const MediaListSchema = `
29
- id
30
- userId
31
- mediaId
32
- status
33
- score (format: $ScoreFormat)
34
- progress
35
- progressVolumes
36
- repeat
37
- priority
38
- private
39
- notes
40
- hiddenFromStatusLists
41
- customLists (asArray: $asArray)
42
- advancedScores
43
- startedAt {
44
- ${FuzzyDateSchema}
45
- }
46
- completedAt {
47
- ${FuzzyDateSchema}
48
- }
49
- updatedAt
50
- createdAt
51
- media {
52
- ${MediaSchema}
53
- }
54
- `
@@ -1,75 +0,0 @@
1
- import { FuzzyDate, FuzzyDateSchema } from '../FuzzyDate'
2
- import { Media } from '../Media'
3
- import { UserResponse } from './User'
4
-
5
- export interface MediaListCollectionResponse {
6
- MediaListCollection: {
7
- lists: Array<{
8
- entries: Array<{
9
- id: number
10
- userId: number
11
- mediaId: number
12
- status: string
13
- score: number
14
- progress: number
15
- progressVolumes: number
16
- repeat: number
17
- priority: number
18
- private: boolean
19
- notes: string
20
- hiddenFromStatusLists: boolean
21
- customLists: boolean[]
22
- advancedScores: number[]
23
- startedAt: FuzzyDate
24
- completedAt: FuzzyDate
25
- updatedAt: number
26
- createdAt: number
27
- media: Media
28
- }>
29
- name: string
30
- isCustomList: boolean
31
- isSplitCompletedList: boolean
32
- status: string
33
- }>
34
- user: UserResponse
35
- hasNextChunk: boolean
36
- }
37
- }
38
-
39
- export const MediaListCollectionQuerySchema = `
40
- query ($userId: Int, $userName: String, $type: MediaType, $status: MediaListStatus, $notes: String, $startedAt: FuzzyDateInt, $completedAt: FuzzyDateInt, $forceSingleCompletedList: Boolean, $chunk: Int, $perChunk: Int, $status_in: [MediaListStatus], $status_not_in: [MediaListStatus], $status_not: MediaListStatus, $notes_like: String, $startedAt_greater: FuzzyDateInt, $startedAt_lesser: FuzzyDateInt, $startedAt_like: String, $completedAt_greater: FuzzyDateInt, $completedAt_lesser: FuzzyDateInt, $completedAt_like: String, $sort: [MediaListSort], $scoreFormat: ScoreFormat, $asArray: Boolean) {
41
- MediaListCollection (userId: $userId, userName: $userName, type: $type, status: $status, notes: $notes, startedAt: $startedAt, completedAt: $completedAt, forceSingleCompletedList: $forceSingleCompletedList, chunk: $chunk, perChunk: $perChunk, status_in: $status_in, status_not_in: $status_not_in, status_not: $status_not, notes_like: $notes_like, startedAt_greater: $startedAt_greater, startedAt_lesser: $startedAt_lesser, startedAt_like: $startedAt_like, completedAt_greater: $completedAt_greater, completedAt_lesser: $completedAt_lesser, completedAt_like: $completedAt_like, sort: $sort) {
42
- lists {
43
- entries {
44
- id
45
- userId
46
- mediaId
47
- status
48
- score (format: $scoreFormat)
49
- progress
50
- progressVolumes
51
- repeat
52
- priority
53
- private
54
- notes
55
- hiddenFromStatusLists
56
- customLists (asArray: $asArray)
57
- advancedScores
58
- startedAt {
59
- ${FuzzyDateSchema}
60
- }
61
- completedAt {
62
- ${FuzzyDateSchema}
63
- }
64
- updatedAt
65
- createdAt
66
- }
67
- name
68
- isCustomList
69
- isSplitCompletedList
70
- status
71
- }
72
- hasNextChunk
73
- }
74
- }
75
- `
@@ -1,28 +0,0 @@
1
- import { Media } from '../Media'
2
- import { MediaSchema } from './Media'
3
-
4
- export interface MediaTrendResponse {
5
- mediaId: number
6
- date: number
7
- trending: number
8
- averageScore: number
9
- popularity: number
10
- inProgress: number
11
- releasing: boolean
12
- episode: number
13
- media: Media
14
- }
15
-
16
- export const MediaTrendSchema = `
17
- mediaId
18
- date
19
- trending
20
- averageScore
21
- popularity
22
- inProgress
23
- releasing
24
- episode
25
- media {
26
- ${MediaSchema}
27
- }
28
- `