anilink-api-wrapper 1.18.6 → 1.20.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.
- package/README.md +49 -17
- package/dist/AniLink.js +11 -2
- package/dist/apis/anilist/interfaces/Activity.js +28 -1
- package/dist/apis/anilist/mutation/DeleteCustomList.js +60 -0
- package/dist/apis/anilist/mutation/DeleteMediaListEntry.js +58 -0
- package/dist/apis/anilist/mutation/SaveMediaListEntry.js +2 -2
- package/dist/apis/anilist/mutation/SaveTextActivity.js +62 -0
- package/dist/apis/anilist/mutation/UpdateMediaListEntries.js +2 -2
- package/dist/apis/anilist/mutation/UpdateUser.js +2 -2
- package/dist/apis/anilist/query/Activity.js +2 -2
- package/dist/apis/anilist/query/ActivityReply.js +1 -1
- package/dist/apis/anilist/query/AiringSchedule.js +2 -2
- package/dist/apis/anilist/query/Character.js +20 -0
- package/dist/apis/anilist/query/ExternalLinkSourceCollection.js +10 -0
- package/dist/apis/anilist/query/Follower.js +14 -0
- package/dist/apis/anilist/query/Following.js +14 -0
- package/dist/apis/anilist/query/Markdown.js +9 -1
- package/dist/apis/anilist/query/Media.js +84 -0
- package/dist/apis/anilist/query/MediaList.js +40 -0
- package/dist/apis/anilist/query/MediaListCollection.js +32 -0
- package/dist/apis/anilist/query/MediaTagCollection.js +7 -0
- package/dist/apis/anilist/query/MediaTrend.js +34 -0
- package/dist/apis/anilist/query/Notification.js +12 -0
- package/dist/apis/anilist/query/Recommendation.js +20 -2
- package/dist/apis/anilist/query/Review.js +14 -0
- package/dist/apis/anilist/query/SiteStatistics.js +28 -0
- package/dist/apis/anilist/query/Staff.js +29 -0
- package/dist/apis/anilist/query/Studio.js +32 -0
- package/dist/apis/anilist/query/Thread.js +18 -0
- package/dist/apis/anilist/query/ThreadComment.js +13 -0
- package/dist/apis/anilist/query/User.js +18 -0
- package/dist/apis/anilist/query/Viewer.js +14 -2
- package/dist/apis/anilist/query/page/Activities.js +38 -0
- package/dist/apis/anilist/query/page/ActivityReplies.js +12 -0
- package/dist/apis/anilist/query/page/AiringSchedules.js +30 -0
- package/dist/apis/anilist/query/page/Characters.js +22 -0
- package/dist/apis/anilist/query/page/Followers.js +16 -0
- package/dist/apis/anilist/query/page/Followings.js +16 -0
- package/dist/apis/anilist/query/page/Likes.js +12 -0
- package/dist/apis/anilist/query/page/MediaLists.js +42 -0
- package/dist/apis/anilist/query/page/MediaTrends.js +36 -0
- package/dist/apis/anilist/query/page/Medias.js +86 -0
- package/dist/apis/anilist/query/page/Notifications.js +14 -0
- package/dist/apis/anilist/query/page/Recommendations.js +20 -0
- package/dist/apis/anilist/query/page/Reviews.js +16 -0
- package/dist/apis/anilist/query/page/Staffs.js +31 -0
- package/dist/apis/anilist/query/page/Studios.js +34 -0
- package/dist/apis/anilist/query/page/ThreadCommments.js +15 -0
- package/dist/apis/anilist/query/page/Threads.js +20 -0
- package/dist/apis/anilist/query/page/Users.js +20 -0
- package/dist/apis/anilist/types/Format.js +30 -0
- package/dist/apis/anilist/types/Season.js +13 -0
- package/dist/apis/anilist/types/Sort.js +240 -1
- package/dist/apis/anilist/types/Source.js +25 -0
- package/dist/apis/anilist/types/Status.js +26 -0
- package/dist/apis/anilist/types/Type.js +44 -0
- package/package.json +1 -1
- package/.eslintrc.js +0 -16
- package/.gitattributes +0 -1
|
@@ -13,6 +13,8 @@ exports.StudiosQuery = void 0;
|
|
|
13
13
|
const APIWrapper_1 = require("../../../../base/APIWrapper");
|
|
14
14
|
const RequestHandler_1 = require("../../../../base/RequestHandler");
|
|
15
15
|
const Studio_1 = require("../../interfaces/responses/query/Studio");
|
|
16
|
+
const Sort_1 = require("../../types/Sort");
|
|
17
|
+
const ValidateVariables_1 = require("../../../../base/ValidateVariables");
|
|
16
18
|
/**
|
|
17
19
|
* `StudiosQuery` is a class representing a query for studios.
|
|
18
20
|
* It includes a method to get studios.
|
|
@@ -35,6 +37,38 @@ class StudiosQuery extends APIWrapper_1.APIWrapper {
|
|
|
35
37
|
*/
|
|
36
38
|
studios(variables) {
|
|
37
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (!variables) {
|
|
41
|
+
throw new Error('At least one variable must be provided');
|
|
42
|
+
}
|
|
43
|
+
const variableTypeMappings = {
|
|
44
|
+
page: 'number',
|
|
45
|
+
perPage: 'number',
|
|
46
|
+
id: 'number',
|
|
47
|
+
search: 'string',
|
|
48
|
+
id_not: 'number',
|
|
49
|
+
id_in: 'number[]',
|
|
50
|
+
id_not_in: 'number[]',
|
|
51
|
+
sort: Sort_1.StudioSortMappings,
|
|
52
|
+
asHtml: 'boolean',
|
|
53
|
+
mediaSort: Sort_1.MediaSortMappings,
|
|
54
|
+
mediaIsMain: 'boolean',
|
|
55
|
+
mediaOnList: 'boolean',
|
|
56
|
+
mediaPage: 'number',
|
|
57
|
+
mediaPerPage: 'number',
|
|
58
|
+
staffMediaSort: Sort_1.MediaSortMappings,
|
|
59
|
+
staffMediaType: 'string',
|
|
60
|
+
staffMediaOnList: 'boolean',
|
|
61
|
+
staffMediaPage: 'number',
|
|
62
|
+
staffMediaPerPage: 'number',
|
|
63
|
+
charactersSort: Sort_1.CharacterSortMappings,
|
|
64
|
+
charactersPage: 'number',
|
|
65
|
+
charactersPerPage: 'number',
|
|
66
|
+
characterMediaSort: Sort_1.MediaSortMappings,
|
|
67
|
+
characterMediaOnList: 'boolean',
|
|
68
|
+
characterMediaPage: 'number',
|
|
69
|
+
characterMediaPerPage: 'number'
|
|
70
|
+
};
|
|
71
|
+
(0, ValidateVariables_1.validateVariables)(variables, variableTypeMappings);
|
|
38
72
|
const query = `
|
|
39
73
|
query ($page: Int, $perPage: Int, $id: Int, $search: String, $id_not: Int, $id_in: [Int], $id_not_in: [Int], $sort: [StudioSort], $asHtml: Boolean, $mediaSort: [MediaSort], $mediaIsMain: Boolean, $mediaOnList: Boolean, $mediaPage: Int, $mediaPerPage: Int, $staffMediaSort: [MediaSort], $staffMediaType: MediaType, $staffMediaOnList: Boolean, $staffMediaPage: Int, $staffMediaPerPage: Int, $charactersSort: [CharacterSort], $charactersPage: Int, $charactersPerPage: Int, $characterMediaSort: [MediaSort], $characterMediaOnList: Boolean, $characterMediaPage: Int, $characterMediaPerPage: Int) {
|
|
40
74
|
Page (page: $page, perPage: $perPage) {
|
|
@@ -13,6 +13,8 @@ exports.ThreadCommentsQuery = void 0;
|
|
|
13
13
|
const APIWrapper_1 = require("../../../../base/APIWrapper");
|
|
14
14
|
const RequestHandler_1 = require("../../../../base/RequestHandler");
|
|
15
15
|
const ThreadComment_1 = require("../../interfaces/responses/query/ThreadComment");
|
|
16
|
+
const Sort_1 = require("../../types/Sort");
|
|
17
|
+
const ValidateVariables_1 = require("../../../../base/ValidateVariables");
|
|
16
18
|
/**
|
|
17
19
|
* `ThreadCommentsQuery` is a class representing a query for thread comments.
|
|
18
20
|
* It includes a method to get thread comments.
|
|
@@ -35,6 +37,19 @@ class ThreadCommentsQuery extends APIWrapper_1.APIWrapper {
|
|
|
35
37
|
*/
|
|
36
38
|
threadComments(variables) {
|
|
37
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (!variables) {
|
|
41
|
+
throw new Error('At least one variable must be provided');
|
|
42
|
+
}
|
|
43
|
+
const variableTypeMappings = {
|
|
44
|
+
page: 'number',
|
|
45
|
+
perPage: 'number',
|
|
46
|
+
id: 'number',
|
|
47
|
+
threadId: 'number',
|
|
48
|
+
userId: 'number',
|
|
49
|
+
sort: Sort_1.ThreadSortMappings,
|
|
50
|
+
asHtml: 'boolean'
|
|
51
|
+
};
|
|
52
|
+
(0, ValidateVariables_1.validateVariables)(variables, variableTypeMappings);
|
|
38
53
|
const query = `
|
|
39
54
|
query ($page: Int, $perPage: Int, $id: Int, $threadId: Int, $userId: Int, $sort: [ThreadCommentSort], $asHtml: Boolean) {
|
|
40
55
|
Page (page: $page, perPage: $perPage) {
|
|
@@ -13,6 +13,8 @@ exports.ThreadsQuery = void 0;
|
|
|
13
13
|
const APIWrapper_1 = require("../../../../base/APIWrapper");
|
|
14
14
|
const RequestHandler_1 = require("../../../../base/RequestHandler");
|
|
15
15
|
const Thread_1 = require("../../interfaces/responses/query/Thread");
|
|
16
|
+
const Sort_1 = require("../../types/Sort");
|
|
17
|
+
const ValidateVariables_1 = require("../../../../base/ValidateVariables");
|
|
16
18
|
/**
|
|
17
19
|
* `ThreadsQuery` is a class representing a query for threads.
|
|
18
20
|
* It includes a method to get threads.
|
|
@@ -35,6 +37,24 @@ class ThreadsQuery extends APIWrapper_1.APIWrapper {
|
|
|
35
37
|
*/
|
|
36
38
|
threads(variables) {
|
|
37
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (!variables) {
|
|
41
|
+
throw new Error('At least one variable must be provided');
|
|
42
|
+
}
|
|
43
|
+
const variableTypeMappings = {
|
|
44
|
+
page: 'number',
|
|
45
|
+
perPage: 'number',
|
|
46
|
+
id: 'number',
|
|
47
|
+
userId: 'number',
|
|
48
|
+
replyUserId: 'number',
|
|
49
|
+
subscribed: 'boolean',
|
|
50
|
+
categoryId: 'number',
|
|
51
|
+
mediaCategoryId: 'number',
|
|
52
|
+
search: 'string',
|
|
53
|
+
id_in: 'number[]',
|
|
54
|
+
sort: Sort_1.ThreadSortMappings,
|
|
55
|
+
asHtml: 'boolean'
|
|
56
|
+
};
|
|
57
|
+
(0, ValidateVariables_1.validateVariables)(variables, variableTypeMappings);
|
|
38
58
|
const query = `
|
|
39
59
|
query ($page: Int, $perPage: Int, $id: Int, $userId: Int, $replyUserId: Int, $subscribed: Boolean, $categoryId: Int, $mediaCategoryId: Int, $search: String, $id_in: [Int], $sort: [ThreadSort], $asHtml: Boolean) {
|
|
40
60
|
Page (page: $page, perPage: $perPage) {
|
|
@@ -13,6 +13,8 @@ exports.UsersQuery = void 0;
|
|
|
13
13
|
const APIWrapper_1 = require("../../../../base/APIWrapper");
|
|
14
14
|
const RequestHandler_1 = require("../../../../base/RequestHandler");
|
|
15
15
|
const User_1 = require("../../interfaces/responses/query/User");
|
|
16
|
+
const Sort_1 = require("../../types/Sort");
|
|
17
|
+
const ValidateVariables_1 = require("../../../../base/ValidateVariables");
|
|
16
18
|
/**
|
|
17
19
|
* `UsersQuery` is a class representing a query for users.
|
|
18
20
|
* It includes a method to get users.
|
|
@@ -35,6 +37,24 @@ class UsersQuery extends APIWrapper_1.APIWrapper {
|
|
|
35
37
|
*/
|
|
36
38
|
users(variables) {
|
|
37
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (!variables) {
|
|
41
|
+
throw new Error('At least one variable must be provided');
|
|
42
|
+
}
|
|
43
|
+
const variableTypeMappings = {
|
|
44
|
+
page: 'number',
|
|
45
|
+
perPage: 'number',
|
|
46
|
+
id: 'number',
|
|
47
|
+
name: 'string',
|
|
48
|
+
isModerator: 'boolean',
|
|
49
|
+
search: 'string',
|
|
50
|
+
sort: Sort_1.UserSortMappings,
|
|
51
|
+
asHtml: 'boolean',
|
|
52
|
+
animeStatLimit: 'number',
|
|
53
|
+
mangaStatLimit: 'number',
|
|
54
|
+
animeStatSort: Sort_1.UserStatisticSortMappings,
|
|
55
|
+
mangaStatSort: Sort_1.UserStatisticSortMappings
|
|
56
|
+
};
|
|
57
|
+
(0, ValidateVariables_1.validateVariables)(variables, variableTypeMappings);
|
|
38
58
|
const query = `
|
|
39
59
|
query ($page: Int, $perPage: Int, $id: Int, $name: String, $isModerator: Boolean, $search: String, $sort: [UserSort], $asHtml: Boolean, $animeStatLimit: Int, $mangaStatLimit: Int, $animeStatSort: [UserStatisticsSort], $mangaStatSort: [UserStatisticsSort]) {
|
|
40
60
|
Page (page: $page, perPage: $perPage) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScoreFormatMapping = exports.MediaFormatMappings = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* `MediaFormatMappings` is a mapping of `MediaFormat` enum values to their corresponding string values.
|
|
6
|
+
* It can be one of the following: 'TV', 'TV_SHORT', 'MOVIE', 'SPECIAL', 'OVA', 'ONA', 'MUSIC', 'MANGA', 'NOVEL', 'ONE_SHOT'.
|
|
7
|
+
*/
|
|
8
|
+
exports.MediaFormatMappings = [
|
|
9
|
+
'TV',
|
|
10
|
+
'TV_SHORT',
|
|
11
|
+
'MOVIE',
|
|
12
|
+
'SPECIAL',
|
|
13
|
+
'OVA',
|
|
14
|
+
'ONA',
|
|
15
|
+
'MUSIC',
|
|
16
|
+
'MANGA',
|
|
17
|
+
'NOVEL',
|
|
18
|
+
'ONE_SHOT'
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* `ScoreFormatMapping` is a mapping of `ScoreFormat` values to their string representations.
|
|
22
|
+
* It can be one of the following: 'POINT_100', 'POINT_10_DECIMAL', 'POINT_10', 'POINT_5', 'POINT_3'.
|
|
23
|
+
*/
|
|
24
|
+
exports.ScoreFormatMapping = [
|
|
25
|
+
'POINT_100',
|
|
26
|
+
'POINT_10_DECIMAL',
|
|
27
|
+
'POINT_10',
|
|
28
|
+
'POINT_5',
|
|
29
|
+
'POINT_3'
|
|
30
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaSeasonMappings = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* `MediaSeasonMappings` is a mapping of `MediaSeason` enum values to their corresponding string values.
|
|
6
|
+
* It can be one of the following: 'WINTER', 'SPRING', 'SUMMER', 'FALL'.
|
|
7
|
+
*/
|
|
8
|
+
exports.MediaSeasonMappings = [
|
|
9
|
+
'WINTER',
|
|
10
|
+
'SPRING',
|
|
11
|
+
'SUMMER',
|
|
12
|
+
'FALL'
|
|
13
|
+
];
|
|
@@ -1,6 +1,134 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AiringSortMappings = exports.ActivitySortMappings = void 0;
|
|
3
|
+
exports.ThreadCommentSortMappings = exports.ThreadSortMappings = exports.StudioSortMappings = exports.StaffSortMappings = exports.SiteTrendSortMappings = exports.ReviewSortMappings = exports.RecommendationSortMappings = exports.CharacterSortMappings = exports.AiringSortMappings = exports.ActivitySortMappings = exports.UserStatisticSortMappings = exports.UserSortMappings = exports.MediaTrendSortMappings = exports.MediaListSortMappings = exports.MediaSortMappings = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* `MediaSortMappings` is a mapping of `MediaSort` enum values to their corresponding string values.
|
|
6
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'TITLE_ROMAJI', 'TITLE_ROMAJI_DESC', 'TITLE_ENGLISH', 'TITLE_ENGLISH_DESC', 'TITLE_NATIVE', 'TITLE_NATIVE_DESC', 'TYPE', 'TYPE_DESC', 'FORMAT', 'FORMAT_DESC', 'START_DATE', 'START_DATE_DESC', 'END_DATE', 'END_DATE_DESC', 'SCORE', 'SCORE_DESC', 'POPULARITY', 'POPULARITY_DESC', 'TRENDING', 'TRENDING_DESC', 'EPISODES', 'EPISODES_DESC', 'DURATION', 'DURATION_DESC', 'STATUS', 'STATUS_DESC', 'CHAPTERS', 'CHAPTERS_DESC', 'VOLUMES', 'VOLUMES_DESC', 'UPDATED_AT', 'UPDATED_AT_DESC', 'SEARCH_MATCH', 'FAVOURITES', 'FAVOURITES_DESC'
|
|
7
|
+
*/
|
|
8
|
+
exports.MediaSortMappings = [
|
|
9
|
+
'ID',
|
|
10
|
+
'ID_DESC',
|
|
11
|
+
'TITLE_ROMAJI',
|
|
12
|
+
'TITLE_ROMAJI_DESC',
|
|
13
|
+
'TITLE_ENGLISH',
|
|
14
|
+
'TITLE_ENGLISH_DESC',
|
|
15
|
+
'TITLE_NATIVE',
|
|
16
|
+
'TITLE_NATIVE_DESC',
|
|
17
|
+
'TYPE',
|
|
18
|
+
'TYPE_DESC',
|
|
19
|
+
'FORMAT',
|
|
20
|
+
'FORMAT_DESC',
|
|
21
|
+
'START_DATE',
|
|
22
|
+
'START_DATE_DESC',
|
|
23
|
+
'END_DATE',
|
|
24
|
+
'END_DATE_DESC',
|
|
25
|
+
'SCORE',
|
|
26
|
+
'SCORE_DESC',
|
|
27
|
+
'POPULARITY',
|
|
28
|
+
'POPULARITY_DESC',
|
|
29
|
+
'TRENDING',
|
|
30
|
+
'TRENDING_DESC',
|
|
31
|
+
'EPISODES',
|
|
32
|
+
'EPISODES_DESC',
|
|
33
|
+
'DURATION',
|
|
34
|
+
'DURATION_DESC',
|
|
35
|
+
'STATUS',
|
|
36
|
+
'STATUS_DESC',
|
|
37
|
+
'CHAPTERS',
|
|
38
|
+
'CHAPTERS_DESC',
|
|
39
|
+
'VOLUMES',
|
|
40
|
+
'VOLUMES_DESC',
|
|
41
|
+
'UPDATED_AT',
|
|
42
|
+
'UPDATED_AT_DESC',
|
|
43
|
+
'SEARCH_MATCH',
|
|
44
|
+
'FAVOURITES',
|
|
45
|
+
'FAVOURITES_DESC'
|
|
46
|
+
];
|
|
47
|
+
/**
|
|
48
|
+
* `MediaListSortMappings` is a mapping of `MediaListSort` enum values to their corresponding string values.
|
|
49
|
+
* It can be one of the following: 'MEDIA_ID', 'MEDIA_ID_DESC', 'SCORE', 'SCORE_DESC', 'STATUS', 'STATUS_DESC', 'PROGRESS', 'PROGRESS_DESC', 'PROGRESS_VOLUMES', 'PROGRESS_VOLUMES_DESC', 'REPEAT', 'REPEAT_DESC', 'PRIORITY', 'PRIORITY_DESC', 'STARTED_ON', 'STARTED_ON_DESC', 'FINISHED_ON', 'FINISHED_ON_DESC', 'ADDED_TIME', 'ADDED_TIME_DESC', 'UPDATED_TIME', 'UPDATED_TIME_DESC', 'MEDIA_TITLE_ROMAJI', 'MEDIA_TITLE_ROMAJI_DESC', 'MEDIA_TITLE_ENGLISH', 'MEDIA_TITLE_ENGLISH_DESC', 'MEDIA_TITLE_NATIVE', 'MEDIA_TITLE_NATIVE_DESC', 'MEDIA_POPULARITY', 'MEDIA_POPULARITY_DESC'
|
|
50
|
+
*/
|
|
51
|
+
exports.MediaListSortMappings = [
|
|
52
|
+
'MEDIA_ID',
|
|
53
|
+
'MEDIA_ID_DESC',
|
|
54
|
+
'SCORE',
|
|
55
|
+
'SCORE_DESC',
|
|
56
|
+
'STATUS',
|
|
57
|
+
'STATUS_DESC',
|
|
58
|
+
'PROGRESS',
|
|
59
|
+
'PROGRESS_DESC',
|
|
60
|
+
'PROGRESS_VOLUMES',
|
|
61
|
+
'PROGRESS_VOLUMES_DESC',
|
|
62
|
+
'REPEAT',
|
|
63
|
+
'REPEAT_DESC',
|
|
64
|
+
'PRIORITY',
|
|
65
|
+
'PRIORITY_DESC',
|
|
66
|
+
'STARTED_ON',
|
|
67
|
+
'STARTED_ON_DESC',
|
|
68
|
+
'FINISHED_ON',
|
|
69
|
+
'FINISHED_ON_DESC',
|
|
70
|
+
'ADDED_TIME',
|
|
71
|
+
'ADDED_TIME_DESC',
|
|
72
|
+
'UPDATED_TIME',
|
|
73
|
+
'UPDATED_TIME_DESC',
|
|
74
|
+
'MEDIA_TITLE_ROMAJI',
|
|
75
|
+
'MEDIA_TITLE_ROMAJI_DESC',
|
|
76
|
+
'MEDIA_TITLE_ENGLISH',
|
|
77
|
+
'MEDIA_TITLE_ENGLISH_DESC',
|
|
78
|
+
'MEDIA_TITLE_NATIVE',
|
|
79
|
+
'MEDIA_TITLE_NATIVE_DESC',
|
|
80
|
+
'MEDIA_POPULARITY',
|
|
81
|
+
'MEDIA_POPULARITY_DESC'
|
|
82
|
+
];
|
|
83
|
+
/**
|
|
84
|
+
* `MediaTrendSortMappings` is a mapping of `MediaTrendSort` enum values to their corresponding string values.
|
|
85
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'MEDIA_ID', 'MEDIA_ID_DESC', 'DATE', 'DATE_DESC', 'SCORE', 'SCORE_DESC', 'POPULARITY', 'POPULARITY_DESC', 'TRENDING', 'TRENDING_DESC', 'EPISODE', 'EPISODE_DESC'.
|
|
86
|
+
*/
|
|
87
|
+
exports.MediaTrendSortMappings = [
|
|
88
|
+
'ID',
|
|
89
|
+
'ID_DESC',
|
|
90
|
+
'MEDIA_ID',
|
|
91
|
+
'MEDIA_ID_DESC',
|
|
92
|
+
'DATE',
|
|
93
|
+
'DATE_DESC',
|
|
94
|
+
'SCORE',
|
|
95
|
+
'SCORE_DESC',
|
|
96
|
+
'POPULARITY',
|
|
97
|
+
'POPULARITY_DESC',
|
|
98
|
+
'TRENDING',
|
|
99
|
+
'TRENDING_DESC',
|
|
100
|
+
'EPISODE',
|
|
101
|
+
'EPISODE_DESC'
|
|
102
|
+
];
|
|
103
|
+
/**
|
|
104
|
+
* `UserSortMappings` is a mapping of `UserSort` enum values to their corresponding string values.
|
|
105
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'USERNAME', 'USERNAME_DESC', 'WATCHED_TIME', 'WATCHED_TIME_DESC', 'CHAPTERS_READ', 'CHAPTERS_READ_DESC', 'SEARCH_MATCH'.
|
|
106
|
+
*/
|
|
107
|
+
exports.UserSortMappings = [
|
|
108
|
+
'ID',
|
|
109
|
+
'ID_DESC',
|
|
110
|
+
'USERNAME',
|
|
111
|
+
'USERNAME_DESC',
|
|
112
|
+
'WATCHED_TIME',
|
|
113
|
+
'WATCHED_TIME_DESC',
|
|
114
|
+
'CHAPTERS_READ',
|
|
115
|
+
'CHAPTERS_READ_DESC',
|
|
116
|
+
'SEARCH_MATCH'
|
|
117
|
+
];
|
|
118
|
+
/**
|
|
119
|
+
* `UserStatisticSortMappings` is a mapping of `UserStatisticSort` enum values to their corresponding string values.
|
|
120
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'COUNT', 'COUNT_DESC', 'PROGRESS', 'PROGRESS_DESC', 'MEAN_SCORE', 'MEAN_SCORE_DESC'.
|
|
121
|
+
*/
|
|
122
|
+
exports.UserStatisticSortMappings = [
|
|
123
|
+
'ID',
|
|
124
|
+
'ID_DESC',
|
|
125
|
+
'COUNT',
|
|
126
|
+
'COUNT_DESC',
|
|
127
|
+
'PROGRESS',
|
|
128
|
+
'PROGRESS_DESC',
|
|
129
|
+
'MEAN_SCORE',
|
|
130
|
+
'MEAN_SCORE_DESC'
|
|
131
|
+
];
|
|
4
132
|
/**
|
|
5
133
|
* `ActivitySortMappings` is a mapping of `ActivitySort` enum values to their corresponding string values.
|
|
6
134
|
* It can be one of the following: 'ID', 'ID_DESC', 'PINNED'.
|
|
@@ -24,3 +152,114 @@ exports.AiringSortMappings = [
|
|
|
24
152
|
'EPISODE',
|
|
25
153
|
'EPISODE_DESC'
|
|
26
154
|
];
|
|
155
|
+
/**
|
|
156
|
+
* `CharacterSortMappings` is a mapping of `CharacterSort` enum values to their corresponding string values.
|
|
157
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'ROLE', 'ROLE_DESC', 'SEARCH_MATCH', 'FAVOURITES', 'FAVOURITES_DESC', 'RELEVANCE'.
|
|
158
|
+
*/
|
|
159
|
+
exports.CharacterSortMappings = [
|
|
160
|
+
'ID',
|
|
161
|
+
'ID_DESC',
|
|
162
|
+
'ROLE',
|
|
163
|
+
'ROLE_DESC',
|
|
164
|
+
'SEARCH_MATCH',
|
|
165
|
+
'FAVOURITES',
|
|
166
|
+
'FAVOURITES_DESC',
|
|
167
|
+
'RELEVANCE'
|
|
168
|
+
];
|
|
169
|
+
/**
|
|
170
|
+
* `RecommendationSortMappings` is a mapping of `RecommendationSort` enum values to their corresponding string values.
|
|
171
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'RATING', 'RATING_DESC'.
|
|
172
|
+
*/
|
|
173
|
+
exports.RecommendationSortMappings = [
|
|
174
|
+
'ID',
|
|
175
|
+
'ID_DESC',
|
|
176
|
+
'RATING',
|
|
177
|
+
'RATING_DESC'
|
|
178
|
+
];
|
|
179
|
+
/**
|
|
180
|
+
* `ReviewSortMappings` is a mapping of `ReviewSort` enum values to their corresponding string values.
|
|
181
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'MEDIA_ID', 'MEDIA_ID_DESC', 'SCORE', 'SCORE_DESC', 'RATING', 'RATING_DESC', 'CREATED_AT', 'CREATED_AT_DESC', 'UPDATED_AT', 'UPDATED_AT_DESC'.
|
|
182
|
+
*/
|
|
183
|
+
exports.ReviewSortMappings = [
|
|
184
|
+
'ID',
|
|
185
|
+
'ID_DESC',
|
|
186
|
+
'MEDIA_ID',
|
|
187
|
+
'MEDIA_ID_DESC',
|
|
188
|
+
'SCORE',
|
|
189
|
+
'SCORE_DESC',
|
|
190
|
+
'RATING',
|
|
191
|
+
'RATING_DESC',
|
|
192
|
+
'CREATED_AT',
|
|
193
|
+
'CREATED_AT_DESC',
|
|
194
|
+
'UPDATED_AT',
|
|
195
|
+
'UPDATED_AT_DESC'
|
|
196
|
+
];
|
|
197
|
+
/**
|
|
198
|
+
* `SiteTrendSortMappings` is a mapping of `SiteTrendSort` enum values to their corresponding string values.
|
|
199
|
+
* It can be one of the following: 'DATE', 'DATE_DESC', 'COUNT', 'COUNT_DESC', 'CHANGE', 'CHANGE_DESC'.
|
|
200
|
+
*/
|
|
201
|
+
exports.SiteTrendSortMappings = [
|
|
202
|
+
'DATE',
|
|
203
|
+
'DATE_DESC',
|
|
204
|
+
'COUNT',
|
|
205
|
+
'COUNT_DESC',
|
|
206
|
+
'CHANGE',
|
|
207
|
+
'CHANGE_DESC'
|
|
208
|
+
];
|
|
209
|
+
/**
|
|
210
|
+
* `StaffSortMappings` is a mapping of `StaffSort` enum values to their corresponding string values.
|
|
211
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'ROLE', 'ROLE_DESC', 'SEARCH_MATCH', 'FAVOURITES', 'FAVOURITES_DESC', 'RELEVANCE'.
|
|
212
|
+
*/
|
|
213
|
+
exports.StaffSortMappings = [
|
|
214
|
+
'ID',
|
|
215
|
+
'ID_DESC',
|
|
216
|
+
'ROLE',
|
|
217
|
+
'ROLE_DESC',
|
|
218
|
+
'SEARCH_MATCH',
|
|
219
|
+
'FAVOURITES',
|
|
220
|
+
'FAVOURITES_DESC',
|
|
221
|
+
'RELEVANCE'
|
|
222
|
+
];
|
|
223
|
+
/**
|
|
224
|
+
* `StudioSortMappings` is a mapping of `StudioSort` enum values to their corresponding string values.
|
|
225
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'NAME', 'NAME_DESC', 'SEARCH_MATCH', 'FAVOURITES', 'FAVOURITES_DESC'.
|
|
226
|
+
*/
|
|
227
|
+
exports.StudioSortMappings = [
|
|
228
|
+
'ID',
|
|
229
|
+
'ID_DESC',
|
|
230
|
+
'NAME',
|
|
231
|
+
'NAME_DESC',
|
|
232
|
+
'SEARCH_MATCH',
|
|
233
|
+
'FAVOURITES',
|
|
234
|
+
'FAVOURITES_DESC'
|
|
235
|
+
];
|
|
236
|
+
/**
|
|
237
|
+
* `ThreadSortMappings` is a mapping of `ThreadSort` enum values to their corresponding string values.
|
|
238
|
+
* It can be one of the following: 'ID', 'ID_DESC', 'TITLE', 'TITLE_DESC', 'CREATED_AT', 'CREATED_AT_DESC', 'UPDATED_AT', 'UPDATED_AT_DESC', 'REPLIED_AT', 'REPLIED_AT_DESC', 'REPLY_COUNT', 'REPLY_COUNT_DESC', 'VIEW_COUNT', 'VIEW_COUNT_DESC', 'IS_STICKY', 'SEARCH_MATCH'.
|
|
239
|
+
*/
|
|
240
|
+
exports.ThreadSortMappings = [
|
|
241
|
+
'ID',
|
|
242
|
+
'ID_DESC',
|
|
243
|
+
'TITLE',
|
|
244
|
+
'TITLE_DESC',
|
|
245
|
+
'CREATED_AT',
|
|
246
|
+
'CREATED_AT_DESC',
|
|
247
|
+
'UPDATED_AT',
|
|
248
|
+
'UPDATED_AT_DESC',
|
|
249
|
+
'REPLIED_AT',
|
|
250
|
+
'REPLIED_AT_DESC',
|
|
251
|
+
'REPLY_COUNT',
|
|
252
|
+
'REPLY_COUNT_DESC',
|
|
253
|
+
'VIEW_COUNT',
|
|
254
|
+
'VIEW_COUNT_DESC',
|
|
255
|
+
'IS_STICKY',
|
|
256
|
+
'SEARCH_MATCH'
|
|
257
|
+
];
|
|
258
|
+
/**
|
|
259
|
+
* `ThreadCommentSortMappings` is a mapping of `ThreadCommentSort` enum values to their corresponding string values.
|
|
260
|
+
* It can be one of the following: 'ID', 'ID_DESC'.
|
|
261
|
+
*/
|
|
262
|
+
exports.ThreadCommentSortMappings = [
|
|
263
|
+
'ID',
|
|
264
|
+
'ID_DESC'
|
|
265
|
+
];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaSourceMappings = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* `MediaSourceMappings` is a mapping of `MediaSource` enum values to their corresponding string values.
|
|
6
|
+
* It can be one of the following: 'ORIGINAL', 'MANGA', 'LIGHT_NOVEL', 'VISUAL_NOVEL', 'VIDEO_GAME', 'OTHER', 'NOVEL', 'DOUJINSHI', 'ANIME', 'WEB_NOVEL', 'LIVE_ACTION', 'GAME', 'BOOK', 'MUSIC', 'MULTIMEDIA_PROJECT', 'PICTURE_BOOK'.
|
|
7
|
+
*/
|
|
8
|
+
exports.MediaSourceMappings = [
|
|
9
|
+
'ORIGINAL',
|
|
10
|
+
'MANGA',
|
|
11
|
+
'LIGHT_NOVEL',
|
|
12
|
+
'VISUAL_NOVEL',
|
|
13
|
+
'VIDEO_GAME',
|
|
14
|
+
'OTHER',
|
|
15
|
+
'NOVEL',
|
|
16
|
+
'DOUJINSHI',
|
|
17
|
+
'ANIME',
|
|
18
|
+
'WEB_NOVEL',
|
|
19
|
+
'LIVE_ACTION',
|
|
20
|
+
'GAME',
|
|
21
|
+
'BOOK',
|
|
22
|
+
'MUSIC',
|
|
23
|
+
'MULTIMEDIA_PROJECT',
|
|
24
|
+
'PICTURE_BOOK'
|
|
25
|
+
];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaListStatusMappings = exports.MediaStatusMappings = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* `MediaStatusMappings` is a mapping of `MediaStatus` enum values to their corresponding string values.
|
|
6
|
+
* It can be one of the following: 'FINISHED', 'RELEASING', 'NOT_YET_RELEASED', 'CANCELLED', 'HIATUS'.
|
|
7
|
+
*/
|
|
8
|
+
exports.MediaStatusMappings = [
|
|
9
|
+
'FINISHED',
|
|
10
|
+
'RELEASING',
|
|
11
|
+
'NOT_YET_RELEASED',
|
|
12
|
+
'CANCELLED',
|
|
13
|
+
'HIATUS'
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* `MediaListStatusMappings` is a mapping of `MediaListStatus` enum values to their corresponding string values.
|
|
17
|
+
* It can be one of the following: 'CURRENT', 'PLANNING', 'COMPLETED', 'DROPPED', 'PAUSED', 'REPEATING'.
|
|
18
|
+
*/
|
|
19
|
+
exports.MediaListStatusMappings = [
|
|
20
|
+
'CURRENT',
|
|
21
|
+
'PLANNING',
|
|
22
|
+
'COMPLETED',
|
|
23
|
+
'DROPPED',
|
|
24
|
+
'PAUSED',
|
|
25
|
+
'REPEATING'
|
|
26
|
+
];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LikeableTypeMappings = exports.NotificationTypeMappings = exports.MediaTypeMappings = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* `MediaTypeMappings` is a mapping of `MediaType` enum values to their corresponding string values.
|
|
6
|
+
* It can be one of the following: 'ANIME', 'MANGA'.
|
|
7
|
+
*/
|
|
8
|
+
exports.MediaTypeMappings = [
|
|
9
|
+
'ANIME',
|
|
10
|
+
'MANGA'
|
|
11
|
+
];
|
|
12
|
+
/**
|
|
13
|
+
* `NotificationTypeMappings` is a mapping of `NotificationType` enum values to their corresponding string values.
|
|
14
|
+
* It can be one of the following: 'ACTIVITY_MESSAGE', 'ACTIVITY_REPLY', 'FOLLOWING', 'ACTIVITY_MENTION', 'THREAD_COMMENT_MENTION', 'THREAD_SUBSCRIBED', 'THREAD_COMMENT_REPLY', 'AIRING', 'ACTIVITY_LIKE', 'ACTIVITY_REPLY_LIKE', 'THREAD_LIKE', 'THREAD_COMMENT_LIKE', 'ACTIVITY_REPLY_SUBSCRIBED', 'RELATED_MEDIA_ADDITION', 'MEDIA_DATA_CHANGE', 'MEDIA_MERGE', 'MEDIA_DELETION'.
|
|
15
|
+
*/
|
|
16
|
+
exports.NotificationTypeMappings = [
|
|
17
|
+
'ACTIVITY_MESSAGE',
|
|
18
|
+
'ACTIVITY_REPLY',
|
|
19
|
+
'FOLLOWING',
|
|
20
|
+
'ACTIVITY_MENTION',
|
|
21
|
+
'THREAD_COMMENT_MENTION',
|
|
22
|
+
'THREAD_SUBSCRIBED',
|
|
23
|
+
'THREAD_COMMENT_REPLY',
|
|
24
|
+
'AIRING',
|
|
25
|
+
'ACTIVITY_LIKE',
|
|
26
|
+
'ACTIVITY_REPLY_LIKE',
|
|
27
|
+
'THREAD_LIKE',
|
|
28
|
+
'THREAD_COMMENT_LIKE',
|
|
29
|
+
'ACTIVITY_REPLY_SUBSCRIBED',
|
|
30
|
+
'RELATED_MEDIA_ADDITION',
|
|
31
|
+
'MEDIA_DATA_CHANGE',
|
|
32
|
+
'MEDIA_MERGE',
|
|
33
|
+
'MEDIA_DELETION'
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* `LikeableTypeMappings` is a mapping of `LikeableType` enum values to their corresponding string values.
|
|
37
|
+
* It can be one of the following: 'THREAD', 'THREAD_COMMENT', 'ACTIVITY', 'ACTIVITY_REPLY'.
|
|
38
|
+
*/
|
|
39
|
+
exports.LikeableTypeMappings = [
|
|
40
|
+
'THREAD',
|
|
41
|
+
'THREAD_COMMENT',
|
|
42
|
+
'ACTIVITY',
|
|
43
|
+
'ACTIVITY_REPLY'
|
|
44
|
+
];
|
package/package.json
CHANGED
package/.eslintrc.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: 'standard-with-typescript',
|
|
3
|
-
parserOptions: {
|
|
4
|
-
project: './tsconfig.json'
|
|
5
|
-
},
|
|
6
|
-
rules: {
|
|
7
|
-
'@typescript-eslint/consistent-type-definitions': 'off'
|
|
8
|
-
},
|
|
9
|
-
ignorePatterns: ['**/*.js'],
|
|
10
|
-
overrides: [
|
|
11
|
-
{
|
|
12
|
-
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
|
13
|
-
files: ['./**/*.ts']
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
}
|
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.js linguist-vendored
|