@book000/pixivts 0.51.2 → 0.52.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 +1 -2
- package/dist/checks.js +9 -9
- package/dist/checks.js.map +1 -1
- package/dist/checks.test.js +28 -28
- package/dist/checks.test.js.map +1 -1
- package/dist/http-client.d.ts +20 -20
- package/dist/http-client.d.ts.map +1 -1
- package/dist/http-client.js +28 -27
- package/dist/http-client.js.map +1 -1
- package/dist/http-client.test.js +11 -11
- package/dist/http-client.test.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/options.d.ts +89 -59
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js +57 -35
- package/dist/options.js.map +1 -1
- package/dist/pixiv.d.ts +121 -97
- package/dist/pixiv.d.ts.map +1 -1
- package/dist/pixiv.js +161 -104
- package/dist/pixiv.js.map +1 -1
- package/dist/pixiv.test.js +114 -47
- package/dist/pixiv.test.js.map +1 -1
- package/dist/saving-responses/index.d.ts +33 -33
- package/dist/saving-responses/index.js +31 -31
- package/dist/saving-responses/index.js.map +1 -1
- package/dist/saving-responses/index.test.js +20 -20
- package/dist/saving-responses/index.test.js.map +1 -1
- package/dist/saving-responses/response-entity.js +12 -12
- package/dist/saving-responses/response-entity.js.map +1 -1
- package/dist/types/endpoints/v1/illust/bookmark/delete.d.ts +3 -3
- package/dist/types/endpoints/v1/illust/detail.d.ts +4 -4
- package/dist/types/endpoints/v1/illust/ranking.d.ts +11 -11
- package/dist/types/endpoints/v1/illust/ranking.js +3 -3
- package/dist/types/endpoints/v1/illust/recommended.d.ts +13 -13
- package/dist/types/endpoints/v1/illust/series.d.ts +8 -8
- package/dist/types/endpoints/v1/illust/ugoira/metadata.d.ts +4 -4
- package/dist/types/endpoints/v1/manga/recommended.d.ts +11 -11
- package/dist/types/endpoints/v1/novel/bookmark/delete.d.ts +3 -3
- package/dist/types/endpoints/v1/novel/ranking.d.ts +10 -10
- package/dist/types/endpoints/v1/novel/ranking.js +3 -3
- package/dist/types/endpoints/v1/novel/recommended.d.ts +11 -11
- package/dist/types/endpoints/v1/novel/related.d.ts +7 -7
- package/dist/types/endpoints/v1/search/illust.d.ts +15 -15
- package/dist/types/endpoints/v1/search/novel.d.ts +15 -15
- package/dist/types/endpoints/v1/user/bookmarks/illust.d.ts +9 -9
- package/dist/types/endpoints/v1/user/bookmarks/novel.d.ts +8 -8
- package/dist/types/endpoints/v1/user/detail.d.ts +8 -8
- package/dist/types/endpoints/v1/user/follow/add.d.ts +24 -0
- package/dist/types/endpoints/v1/user/follow/add.d.ts.map +1 -0
- package/dist/types/endpoints/v1/user/follow/add.js +3 -0
- package/dist/types/endpoints/v1/user/follow/add.js.map +1 -0
- package/dist/types/endpoints/v1/user/follow/delete.d.ts +14 -0
- package/dist/types/endpoints/v1/user/follow/delete.d.ts.map +1 -0
- package/dist/types/endpoints/v1/user/follow/delete.js +3 -0
- package/dist/types/endpoints/v1/user/follow/delete.js.map +1 -0
- package/dist/types/endpoints/v1/user/following.d.ts +38 -0
- package/dist/types/endpoints/v1/user/following.d.ts.map +1 -0
- package/dist/types/endpoints/v1/user/following.js +26 -0
- package/dist/types/endpoints/v1/user/following.js.map +1 -0
- package/dist/types/endpoints/v2/illust/bookmark/add.d.ts +7 -7
- package/dist/types/endpoints/v2/illust/related.d.ts +8 -8
- package/dist/types/endpoints/v2/novel/bookmark/add.d.ts +7 -7
- package/dist/types/endpoints/v2/novel/detail.d.ts +4 -4
- package/dist/types/endpoints/v2/novel/series.d.ts +9 -9
- package/dist/types/endpoints/webview/v2/novel.d.ts +4 -4
- package/dist/types/error-response.d.ts +7 -7
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/errors.js +1 -1
- package/dist/types/pixiv-common.d.ts +25 -25
- package/dist/types/pixiv-common.d.ts.map +1 -1
- package/dist/types/pixiv-illust-series.d.ts +12 -12
- package/dist/types/pixiv-illust.d.ts +53 -52
- package/dist/types/pixiv-illust.d.ts.map +1 -1
- package/dist/types/pixiv-illust.js.map +1 -1
- package/dist/types/pixiv-novel-series.d.ts +18 -18
- package/dist/types/pixiv-novel.d.ts +34 -33
- package/dist/types/pixiv-novel.d.ts.map +1 -1
- package/dist/types/pixiv-novel.js.map +1 -1
- package/dist/types/pixiv-ugoira.d.ts +10 -10
- package/dist/types/pixiv-user.d.ts +108 -89
- package/dist/types/pixiv-user.d.ts.map +1 -1
- package/dist/types/pixiv-user.js +16 -1
- package/dist/types/pixiv-user.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,58 +2,58 @@ import { PixivIllustItem } from '../../../pixiv-illust';
|
|
|
2
2
|
import { OSFilter, SearchSort, SearchTarget } from '../../../../options';
|
|
3
3
|
import { BaseMultipleCheck, CheckFunctions } from '../../../../checks';
|
|
4
4
|
/**
|
|
5
|
-
* GET /v1/search/illust
|
|
5
|
+
* Request for GET /v1/search/illust
|
|
6
6
|
*/
|
|
7
7
|
export interface GetV1SearchIllustRequest {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Search word
|
|
10
10
|
*/
|
|
11
11
|
word: string;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Search target
|
|
14
14
|
*
|
|
15
15
|
* @default 'partial_match_for_tags'
|
|
16
16
|
*/
|
|
17
17
|
search_target: SearchTarget;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Sort order
|
|
20
20
|
*
|
|
21
21
|
* @default 'date_desc'
|
|
22
22
|
*/
|
|
23
23
|
sort: SearchSort;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Start date and time
|
|
26
26
|
*
|
|
27
27
|
* @default undefined
|
|
28
28
|
*/
|
|
29
29
|
start_date?: string;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* End date and time
|
|
32
32
|
*
|
|
33
33
|
* @default undefined
|
|
34
34
|
*/
|
|
35
35
|
end_date?: string;
|
|
36
36
|
/**
|
|
37
|
-
* OS
|
|
37
|
+
* OS filter
|
|
38
38
|
*
|
|
39
39
|
* @default 'for_ios'
|
|
40
40
|
*/
|
|
41
41
|
filter?: OSFilter;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Offset
|
|
44
44
|
*
|
|
45
45
|
* @default undefined
|
|
46
46
|
*/
|
|
47
47
|
offset?: number;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Whether to merge plain keyword search results (?)
|
|
50
50
|
*
|
|
51
51
|
* @default true
|
|
52
52
|
* @beta
|
|
53
53
|
*/
|
|
54
54
|
merge_plain_keyword_results: boolean;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Whether to include translated tag search results
|
|
57
57
|
*
|
|
58
58
|
* @default true
|
|
59
59
|
* @beta
|
|
@@ -61,23 +61,23 @@ export interface GetV1SearchIllustRequest {
|
|
|
61
61
|
include_translated_tag_results: boolean;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* GET /v1/search/illust
|
|
64
|
+
* Response for GET /v1/search/illust
|
|
65
65
|
*/
|
|
66
66
|
export interface GetV1SearchIllustResponse {
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Search result illusts
|
|
69
69
|
*/
|
|
70
70
|
illusts: PixivIllustItem[];
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* URL to use for the next request.
|
|
73
73
|
*
|
|
74
74
|
* @see {Pixiv.parseQueryString}
|
|
75
75
|
*/
|
|
76
76
|
next_url: string | null;
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Unknown
|
|
79
79
|
*
|
|
80
|
-
*
|
|
80
|
+
* Fixed at "31536000"? One year?
|
|
81
81
|
*
|
|
82
82
|
* @beta
|
|
83
83
|
*/
|
|
@@ -2,58 +2,58 @@ import { BaseMultipleCheck, CheckFunctions } from '../../../../checks';
|
|
|
2
2
|
import { OSFilter, SearchSort, SearchTarget } from '../../../../options';
|
|
3
3
|
import { PixivNovelItem } from '../../../pixiv-novel';
|
|
4
4
|
/**
|
|
5
|
-
* GET /v1/search/novel
|
|
5
|
+
* Request for GET /v1/search/novel
|
|
6
6
|
*/
|
|
7
7
|
export interface GetV1SearchNovelRequest {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Search word
|
|
10
10
|
*/
|
|
11
11
|
word: string;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Search target
|
|
14
14
|
*
|
|
15
15
|
* @default 'partial_match_for_tags'
|
|
16
16
|
*/
|
|
17
17
|
search_target: SearchTarget;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Sort order
|
|
20
20
|
*
|
|
21
21
|
* @default 'date_desc'
|
|
22
22
|
*/
|
|
23
23
|
sort: SearchSort;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Start date and time
|
|
26
26
|
*
|
|
27
27
|
* @default undefined
|
|
28
28
|
*/
|
|
29
29
|
start_date?: string;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* End date and time
|
|
32
32
|
*
|
|
33
33
|
* @default undefined
|
|
34
34
|
*/
|
|
35
35
|
end_date?: string;
|
|
36
36
|
/**
|
|
37
|
-
* OS
|
|
37
|
+
* OS filter
|
|
38
38
|
*
|
|
39
39
|
* @default 'for_ios'
|
|
40
40
|
*/
|
|
41
41
|
filter?: OSFilter;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Offset
|
|
44
44
|
*
|
|
45
45
|
* @default undefined
|
|
46
46
|
*/
|
|
47
47
|
offset?: number;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Whether to merge plain keyword search results (?)
|
|
50
50
|
*
|
|
51
51
|
* @default true
|
|
52
52
|
* @beta
|
|
53
53
|
*/
|
|
54
54
|
merge_plain_keyword_results: boolean;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Whether to include translated tag search results
|
|
57
57
|
*
|
|
58
58
|
* @default true
|
|
59
59
|
* @beta
|
|
@@ -61,23 +61,23 @@ export interface GetV1SearchNovelRequest {
|
|
|
61
61
|
include_translated_tag_results: boolean;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* GET /v1/search/novel
|
|
64
|
+
* Response for GET /v1/search/novel
|
|
65
65
|
*/
|
|
66
66
|
export interface GetV1SearchNovelResponse {
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Search result novels
|
|
69
69
|
*/
|
|
70
70
|
novels: PixivNovelItem[];
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* URL to use for the next request.
|
|
73
73
|
*
|
|
74
74
|
* @see {Pixiv.parseQueryString}
|
|
75
75
|
*/
|
|
76
76
|
next_url: string | null;
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Unknown
|
|
79
79
|
*
|
|
80
|
-
*
|
|
80
|
+
* Fixed at "31536000"? One year?
|
|
81
81
|
*
|
|
82
82
|
* @beta
|
|
83
83
|
*/
|
|
@@ -2,42 +2,42 @@ import { BaseMultipleCheck, CheckFunctions } from '../../../../../checks';
|
|
|
2
2
|
import { BookmarkRestrict, OSFilter } from '../../../../../options';
|
|
3
3
|
import { PixivIllustItem } from '../../../../pixiv-illust';
|
|
4
4
|
/**
|
|
5
|
-
* GET /v1/user/bookmarks/illust
|
|
5
|
+
* Request for GET /v1/user/bookmarks/illust
|
|
6
6
|
*/
|
|
7
7
|
export interface GetV1UserBookmarksIllustRequest {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* User ID
|
|
10
10
|
*/
|
|
11
11
|
user_id: number;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Bookmark visibility
|
|
14
14
|
*/
|
|
15
15
|
restrict: BookmarkRestrict;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Bookmark tag
|
|
18
18
|
*/
|
|
19
19
|
tag?: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Maximum bookmark ID (pagination?)
|
|
22
22
|
*
|
|
23
23
|
* @beta
|
|
24
24
|
*/
|
|
25
25
|
max_bookmark_id?: number;
|
|
26
26
|
/**
|
|
27
|
-
* OS
|
|
27
|
+
* OS filter
|
|
28
28
|
*/
|
|
29
29
|
filter?: OSFilter;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* GET /v1/user/bookmarks/illust
|
|
32
|
+
* Response for GET /v1/user/bookmarks/illust
|
|
33
33
|
*/
|
|
34
34
|
export interface GetV1UserBookmarksIllustResponse {
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Bookmarked illusts
|
|
37
37
|
*/
|
|
38
38
|
illusts: PixivIllustItem[];
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Next URL
|
|
41
41
|
*/
|
|
42
42
|
next_url: string | null;
|
|
43
43
|
}
|
|
@@ -2,38 +2,38 @@ import { BaseMultipleCheck, CheckFunctions } from '../../../../../checks';
|
|
|
2
2
|
import { BookmarkRestrict } from '../../../../../options';
|
|
3
3
|
import { PixivNovelItem } from '../../../../pixiv-novel';
|
|
4
4
|
/**
|
|
5
|
-
* GET /v1/user/bookmarks/novel
|
|
5
|
+
* Request for GET /v1/user/bookmarks/novel
|
|
6
6
|
*/
|
|
7
7
|
export interface GetV1UserBookmarksNovelRequest {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* User ID
|
|
10
10
|
*/
|
|
11
11
|
user_id: number;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Bookmark visibility
|
|
14
14
|
*/
|
|
15
15
|
restrict: BookmarkRestrict;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Bookmark tag
|
|
18
18
|
*/
|
|
19
19
|
tag?: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Maximum bookmark ID (pagination?)
|
|
22
22
|
*
|
|
23
23
|
* @beta
|
|
24
24
|
*/
|
|
25
25
|
max_bookmark_id?: number;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* GET /v1/user/bookmarks/novel
|
|
28
|
+
* Response for GET /v1/user/bookmarks/novel
|
|
29
29
|
*/
|
|
30
30
|
export interface GetV1UserBookmarksNovelResponse {
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Bookmarked novels
|
|
33
33
|
*/
|
|
34
34
|
novels: PixivNovelItem[];
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Next URL
|
|
37
37
|
*/
|
|
38
38
|
next_url: string | null;
|
|
39
39
|
}
|
|
@@ -2,38 +2,38 @@ import { PixivUserItem, PixivUserProfile, PixivUserProfilePublicity, PixivUserPr
|
|
|
2
2
|
import { OSFilter } from '../../../../options';
|
|
3
3
|
import { BaseMultipleCheck, CheckFunctions } from '../../../../checks';
|
|
4
4
|
/**
|
|
5
|
-
* GET /v1/user/detail
|
|
5
|
+
* Request for GET /v1/user/detail
|
|
6
6
|
*/
|
|
7
7
|
export interface GetV1UserDetailRequest {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* User ID
|
|
10
10
|
*/
|
|
11
11
|
user_id: number;
|
|
12
12
|
/**
|
|
13
|
-
* OS
|
|
13
|
+
* OS filter
|
|
14
14
|
*
|
|
15
15
|
* @default 'for_ios'
|
|
16
16
|
*/
|
|
17
17
|
filter?: OSFilter;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* GET /v1/user/detail
|
|
20
|
+
* Response for GET /v1/user/detail
|
|
21
21
|
*/
|
|
22
22
|
export interface GetV1UserDetailResponse {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* User details
|
|
25
25
|
*/
|
|
26
26
|
user: PixivUserItem;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* User profile information
|
|
29
29
|
*/
|
|
30
30
|
profile: PixivUserProfile;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* User public profile information
|
|
33
33
|
*/
|
|
34
34
|
profile_publicity: PixivUserProfilePublicity;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* User workspace information
|
|
37
37
|
*/
|
|
38
38
|
workspace: PixivUserProfileWorkspace;
|
|
39
39
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FollowRestrict } from '../../../../../options';
|
|
2
|
+
/**
|
|
3
|
+
* Request for POST /v1/user/follow/add
|
|
4
|
+
*/
|
|
5
|
+
export interface PostV1UserFollowAddRequest {
|
|
6
|
+
/**
|
|
7
|
+
* User ID
|
|
8
|
+
*/
|
|
9
|
+
user_id: number;
|
|
10
|
+
/**
|
|
11
|
+
* Visibility setting
|
|
12
|
+
*
|
|
13
|
+
* public: Public
|
|
14
|
+
* private: Private
|
|
15
|
+
*
|
|
16
|
+
* @default FollowRestrict.PUBLIC
|
|
17
|
+
*/
|
|
18
|
+
restrict: FollowRestrict;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Response for POST /v1/user/follow/add
|
|
22
|
+
*/
|
|
23
|
+
export type PostV1UserFollowAddResponse = Record<string, never>;
|
|
24
|
+
//# sourceMappingURL=add.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../../../../src/types/endpoints/v1/user/follow/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;;;;;OAOG;IACH,QAAQ,EAAE,cAAc,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../../src/types/endpoints/v1/user/follow/add.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request for POST /v1/user/follow/delete
|
|
3
|
+
*/
|
|
4
|
+
export interface PostV1UserFollowDeleteRequest {
|
|
5
|
+
/**
|
|
6
|
+
* User ID
|
|
7
|
+
*/
|
|
8
|
+
user_id: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Response for POST /v1/user/follow/delete
|
|
12
|
+
*/
|
|
13
|
+
export type PostV1UserFollowDeleteResponse = Record<string, never>;
|
|
14
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../../../src/types/endpoints/v1/user/follow/delete.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../../src/types/endpoints/v1/user/follow/delete.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BaseMultipleCheck, CheckFunctions } from '../../../../checks';
|
|
2
|
+
import { FollowRestrict } from '../../../../options';
|
|
3
|
+
import { PixivUserPreviewItem } from '../../../pixiv-user';
|
|
4
|
+
/**
|
|
5
|
+
* Request for GET /v1/user/following
|
|
6
|
+
*/
|
|
7
|
+
export interface GetV1UserFollowingRequest {
|
|
8
|
+
/**
|
|
9
|
+
* User ID
|
|
10
|
+
*/
|
|
11
|
+
user_id: number;
|
|
12
|
+
/**
|
|
13
|
+
* Visibility of the followed users to retrieve
|
|
14
|
+
*/
|
|
15
|
+
restrict: FollowRestrict;
|
|
16
|
+
/**
|
|
17
|
+
* Offset (for pagination)
|
|
18
|
+
*/
|
|
19
|
+
offset?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Response for GET /v1/user/following
|
|
23
|
+
*/
|
|
24
|
+
export interface GetV1UserFollowingResponse {
|
|
25
|
+
/**
|
|
26
|
+
* List of followed users
|
|
27
|
+
*/
|
|
28
|
+
user_previews: PixivUserPreviewItem[];
|
|
29
|
+
/**
|
|
30
|
+
* Next URL
|
|
31
|
+
*/
|
|
32
|
+
next_url: string | null;
|
|
33
|
+
}
|
|
34
|
+
export declare class GetV1UserFollowingCheck extends BaseMultipleCheck<GetV1UserFollowingRequest, GetV1UserFollowingResponse> {
|
|
35
|
+
requestChecks(): CheckFunctions<GetV1UserFollowingRequest>;
|
|
36
|
+
responseChecks(): CheckFunctions<GetV1UserFollowingResponse>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=following.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"following.d.ts","sourceRoot":"","sources":["../../../../../src/types/endpoints/v1/user/following.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,EAAE,cAAc,EAAuB,MAAM,qBAAqB,CAAA;AACzE,OAAO,EACL,oBAAoB,EAErB,MAAM,qBAAqB,CAAA;AAE5B;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,QAAQ,EAAE,cAAc,CAAA;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,aAAa,EAAE,oBAAoB,EAAE,CAAA;IAErC;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,qBAAa,uBAAwB,SAAQ,iBAAiB,CAC5D,yBAAyB,EACzB,0BAA0B,CAC3B;IACC,aAAa,IAAI,cAAc,CAAC,yBAAyB,CAAC;IAU1D,cAAc,IAAI,cAAc,CAAC,0BAA0B,CAAC;CAY7D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetV1UserFollowingCheck = void 0;
|
|
4
|
+
const checks_1 = require("../../../../checks");
|
|
5
|
+
const options_1 = require("../../../../options");
|
|
6
|
+
const pixiv_user_1 = require("../../../pixiv-user");
|
|
7
|
+
class GetV1UserFollowingCheck extends checks_1.BaseMultipleCheck {
|
|
8
|
+
requestChecks() {
|
|
9
|
+
return {
|
|
10
|
+
user_id: (data) => typeof data.user_id === 'number' && data.user_id > 0,
|
|
11
|
+
restrict: (data) => new options_1.FollowRestrictCheck().throwIfFailed(data.restrict),
|
|
12
|
+
offset: (data) => data.offset === undefined || typeof data.offset === 'number',
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
responseChecks() {
|
|
16
|
+
return {
|
|
17
|
+
user_previews: (data) => Array.isArray(data.user_previews) &&
|
|
18
|
+
data.user_previews.every((preview) => new pixiv_user_1.PixivUserPreviewItemCheck().throwIfFailed(preview)),
|
|
19
|
+
next_url: (data) =>
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
21
|
+
typeof data.next_url === 'string' || data.next_url === null,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.GetV1UserFollowingCheck = GetV1UserFollowingCheck;
|
|
26
|
+
//# sourceMappingURL=following.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"following.js","sourceRoot":"","sources":["../../../../../src/types/endpoints/v1/user/following.ts"],"names":[],"mappings":";;;AAAA,+CAAsE;AACtE,iDAAyE;AACzE,oDAG4B;AAqC5B,MAAa,uBAAwB,SAAQ,0BAG5C;IACC,aAAa;QACX,OAAO;YACL,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC;YACvE,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CACjB,IAAI,6BAAmB,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC;YACxD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;SAC/D,CAAA;IACH,CAAC;IAED,cAAc;QACZ,OAAO;YACL,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CACtB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC;gBACjC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CACnC,IAAI,sCAAyB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CACvD;YACH,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;YACjB,uEAAuE;YACvE,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI;SAC9D,CAAA;IACH,CAAC;CACF;AA1BD,0DA0BC"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { BookmarkRestrict } from '../../../../../options';
|
|
2
2
|
/**
|
|
3
|
-
* POST /v2/illust/bookmark/add
|
|
3
|
+
* Request for POST /v2/illust/bookmark/add
|
|
4
4
|
*/
|
|
5
5
|
export interface PostV2IllustBookmarkAddRequest {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Illust ID
|
|
8
8
|
*/
|
|
9
9
|
illust_id: number;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Visibility setting
|
|
12
12
|
*
|
|
13
|
-
* public:
|
|
14
|
-
* private:
|
|
13
|
+
* public: Public
|
|
14
|
+
* private: Private
|
|
15
15
|
*
|
|
16
16
|
* @default BookmarkRestrict.Public
|
|
17
17
|
*/
|
|
18
18
|
restrict: BookmarkRestrict;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Bookmark tags
|
|
21
21
|
*/
|
|
22
22
|
tags?: string[];
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* POST /v2/illust/bookmark/add
|
|
25
|
+
* Response for POST /v2/illust/bookmark/add
|
|
26
26
|
*/
|
|
27
27
|
export type PostV2IllustBookmarkAddResponse = Record<string, never>;
|
|
28
28
|
//# sourceMappingURL=add.d.ts.map
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { BaseMultipleCheck, CheckFunctions } from '../../../../checks';
|
|
2
2
|
import { PixivIllustItem } from '../../../pixiv-illust';
|
|
3
3
|
/**
|
|
4
|
-
* GET /v2/illust/related
|
|
4
|
+
* Request for GET /v2/illust/related
|
|
5
5
|
*/
|
|
6
6
|
export interface GetV2IllustRelatedRequest {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Illust ID
|
|
9
9
|
*/
|
|
10
10
|
illust_id: number;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Array of seed illust IDs (?)
|
|
13
13
|
*/
|
|
14
14
|
seed_illust_ids?: number[];
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Viewed illust IDs
|
|
17
17
|
*/
|
|
18
18
|
viewed?: number[];
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Offset
|
|
21
21
|
*/
|
|
22
22
|
offset?: number;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* GET /
|
|
25
|
+
* Response for GET /v2/illust/related
|
|
26
26
|
*/
|
|
27
27
|
export interface GetV2IllustRelatedResponse {
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Illust details
|
|
30
30
|
*/
|
|
31
31
|
illusts: PixivIllustItem[];
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Next URL
|
|
34
34
|
*/
|
|
35
35
|
next_url: string;
|
|
36
36
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* POST /v2/novel/bookmark/add
|
|
2
|
+
* Request for POST /v2/novel/bookmark/add
|
|
3
3
|
*/
|
|
4
4
|
export interface PostV2NovelBookmarkAddRequest {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Novel ID
|
|
7
7
|
*/
|
|
8
8
|
novel_id: string;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Visibility setting
|
|
11
11
|
*
|
|
12
|
-
* public:
|
|
13
|
-
* private:
|
|
12
|
+
* public: Public
|
|
13
|
+
* private: Private
|
|
14
14
|
*
|
|
15
15
|
* @default BookmarkRestrict.Public
|
|
16
16
|
*/
|
|
17
17
|
restrict: string;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Bookmark tags
|
|
20
20
|
*/
|
|
21
21
|
tags?: string[];
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* POST /v2/novel/bookmark/add
|
|
24
|
+
* Response for POST /v2/novel/bookmark/add
|
|
25
25
|
*/
|
|
26
26
|
export type PostV2NovelBookmarkAddResponse = Record<string, never>;
|
|
27
27
|
//# sourceMappingURL=add.d.ts.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { BaseMultipleCheck, CheckFunctions } from '../../../../checks';
|
|
2
2
|
import { PixivNovelItem } from '../../../pixiv-novel';
|
|
3
3
|
/**
|
|
4
|
-
* GET /v2/novel/detail
|
|
4
|
+
* Request for GET /v2/novel/detail
|
|
5
5
|
*/
|
|
6
6
|
export interface GetV2NovelDetailRequest {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Novel ID
|
|
9
9
|
*/
|
|
10
10
|
novel_id: number;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* GET /v2/novel/detail
|
|
13
|
+
* Response for GET /v2/novel/detail
|
|
14
14
|
*/
|
|
15
15
|
export interface GetV2NovelDetailResponse {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Novel details
|
|
18
18
|
*/
|
|
19
19
|
novel: PixivNovelItem;
|
|
20
20
|
}
|