e621 3.0.2 → 3.1.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/dist/lib/Debug.js +4 -3
- package/dist/lib/errors.d.ts +3 -3
- package/dist/lib/errors.js +8 -3
- package/dist/lib/generated/client/client.js +108 -127
- package/dist/lib/generated/client/types.d.ts +6 -3
- package/dist/lib/generated/client/utils.d.ts +7 -3
- package/dist/lib/generated/client/utils.js +5 -5
- package/dist/lib/generated/core/params.js +5 -5
- package/dist/lib/generated/core/serverSentEvents.d.ts +1 -1
- package/dist/lib/generated/core/serverSentEvents.js +4 -5
- package/dist/lib/generated/core/types.d.ts +1 -1
- package/dist/lib/generated/core/utils.js +2 -2
- package/dist/lib/generated/schemas.d.ts +1273 -220
- package/dist/lib/generated/schemas.js +2005 -601
- package/dist/lib/generated/sdk.d.ts +624 -382
- package/dist/lib/generated/sdk.js +915 -552
- package/dist/lib/generated/source.json +13524 -9670
- package/dist/lib/generated/types.d.ts +6378 -4559
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +9 -9
- package/dist/lib/models/ApiKey.js +2 -2
- package/dist/lib/models/Appeal.d.ts +51 -0
- package/dist/lib/models/Appeal.js +77 -0
- package/dist/lib/models/Artist.d.ts +17 -17
- package/dist/lib/models/Artist.js +27 -27
- package/dist/lib/models/ArtistUrl.js +2 -2
- package/dist/lib/models/ArtistVersion.js +2 -2
- package/dist/lib/models/AvoidPosting.d.ts +16 -16
- package/dist/lib/models/AvoidPosting.js +27 -27
- package/dist/lib/models/AvoidPostingVersion.js +2 -2
- package/dist/lib/models/Ban.js +2 -2
- package/dist/lib/models/Base.d.ts +1 -1
- package/dist/lib/models/Base.js +4 -4
- package/dist/lib/models/BasicPost.d.ts +14 -0
- package/dist/lib/models/BasicPost.js +17 -0
- package/dist/lib/models/Blip.d.ts +28 -28
- package/dist/lib/models/Blip.js +42 -42
- package/dist/lib/models/BulkUpdateRequest.d.ts +11 -11
- package/dist/lib/models/BulkUpdateRequest.js +21 -21
- package/dist/lib/models/Comment.d.ts +29 -29
- package/dist/lib/models/Comment.js +43 -43
- package/dist/lib/models/CommentVote.d.ts +50 -0
- package/dist/lib/models/CommentVote.js +77 -0
- package/dist/lib/models/CurrentUser.d.ts +36 -1
- package/dist/lib/models/CurrentUser.js +57 -3
- package/dist/lib/models/DMail.d.ts +16 -6
- package/dist/lib/models/DMail.js +29 -11
- package/dist/lib/models/DbExport.d.ts +14 -0
- package/dist/lib/models/DbExport.js +17 -0
- package/dist/lib/models/EditHistory.js +2 -2
- package/dist/lib/models/EmailBlacklist.d.ts +2 -2
- package/dist/lib/models/EmailBlacklist.js +5 -5
- package/dist/lib/models/ExceptionLog.d.ts +14 -0
- package/dist/lib/models/ExceptionLog.js +17 -0
- package/dist/lib/models/ExtendedPost.d.ts +14 -0
- package/dist/lib/models/ExtendedPost.js +17 -0
- package/dist/lib/models/ForumPost.d.ts +41 -30
- package/dist/lib/models/ForumPost.js +60 -42
- package/dist/lib/models/ForumPostVote.d.ts +2 -2
- package/dist/lib/models/ForumPostVote.js +6 -6
- package/dist/lib/models/ForumTopic.d.ts +21 -21
- package/dist/lib/models/ForumTopic.js +35 -35
- package/dist/lib/models/FullCurrentUser.js +2 -2
- package/dist/lib/models/FullUser.js +2 -2
- package/dist/lib/models/HelpPage.d.ts +39 -0
- package/dist/lib/models/HelpPage.js +57 -0
- package/dist/lib/models/IpBan.d.ts +2 -2
- package/dist/lib/models/IpBan.js +5 -5
- package/dist/lib/models/IqdbPost.d.ts +1 -1
- package/dist/lib/models/IqdbPost.js +2 -2
- package/dist/lib/models/Mascot.d.ts +7 -7
- package/dist/lib/models/Mascot.js +12 -12
- package/dist/lib/models/MinimalUser.d.ts +14 -0
- package/dist/lib/models/MinimalUser.js +17 -0
- package/dist/lib/models/ModAction.js +2 -2
- package/dist/lib/models/NewsUpdate.d.ts +7 -7
- package/dist/lib/models/NewsUpdate.js +12 -12
- package/dist/lib/models/Note.d.ts +11 -11
- package/dist/lib/models/Note.js +21 -21
- package/dist/lib/models/NoteVersion.d.ts +2 -2
- package/dist/lib/models/NoteVersion.js +5 -5
- package/dist/lib/models/Pool.d.ts +18 -18
- package/dist/lib/models/Pool.js +32 -32
- package/dist/lib/models/PoolVersion.d.ts +2 -2
- package/dist/lib/models/PoolVersion.js +5 -5
- package/dist/lib/models/Post.d.ts +5 -166
- package/dist/lib/models/Post.js +8 -278
- package/dist/lib/models/PostApproval.d.ts +2 -2
- package/dist/lib/models/PostApproval.js +5 -5
- package/dist/lib/models/PostDisapproval.js +2 -2
- package/dist/lib/models/PostEvent.js +2 -2
- package/dist/lib/models/PostFlag.d.ts +4 -4
- package/dist/lib/models/PostFlag.js +9 -9
- package/dist/lib/models/PostReplacement.d.ts +10 -10
- package/dist/lib/models/PostReplacement.js +17 -17
- package/dist/lib/models/PostSet.d.ts +17 -17
- package/dist/lib/models/PostSet.js +29 -29
- package/dist/lib/models/PostVersion.d.ts +8 -8
- package/dist/lib/models/PostVersion.js +14 -14
- package/dist/lib/models/PostVote.d.ts +48 -0
- package/dist/lib/models/PostVote.js +75 -0
- package/dist/lib/models/RisingSearchTrend.js +2 -2
- package/dist/lib/models/SearchTrend.js +2 -2
- package/dist/lib/models/SearchTrendBlacklist.d.ts +25 -0
- package/dist/lib/models/SearchTrendBlacklist.js +43 -3
- package/dist/lib/models/StaffFile.d.ts +39 -0
- package/dist/lib/models/StaffFile.js +57 -0
- package/dist/lib/models/StaffNote.d.ts +12 -12
- package/dist/lib/models/StaffNote.js +22 -22
- package/dist/lib/models/StaffWiki.d.ts +63 -0
- package/dist/lib/models/StaffWiki.js +97 -0
- package/dist/lib/models/StaffWikiVersion.d.ts +14 -0
- package/dist/lib/models/StaffWikiVersion.js +17 -0
- package/dist/lib/models/Tag.d.ts +19 -19
- package/dist/lib/models/Tag.js +31 -31
- package/dist/lib/models/TagAlias.d.ts +13 -13
- package/dist/lib/models/TagAlias.js +23 -23
- package/dist/lib/models/TagCorrection.js +2 -2
- package/dist/lib/models/TagImplication.d.ts +13 -13
- package/dist/lib/models/TagImplication.js +23 -23
- package/dist/lib/models/TagPreview.js +2 -2
- package/dist/lib/models/TagTypeVersion.js +2 -2
- package/dist/lib/models/Takedown.d.ts +20 -20
- package/dist/lib/models/Takedown.js +30 -30
- package/dist/lib/models/ThumbnailPost.d.ts +14 -0
- package/dist/lib/models/ThumbnailPost.js +17 -0
- package/dist/lib/models/Ticket.d.ts +13 -13
- package/dist/lib/models/Ticket.js +23 -23
- package/dist/lib/models/Upload.js +2 -2
- package/dist/lib/models/UploadWhitelist.d.ts +7 -7
- package/dist/lib/models/UploadWhitelist.js +12 -12
- package/dist/lib/models/User.d.ts +28 -16
- package/dist/lib/models/User.js +46 -26
- package/dist/lib/models/UserFeedback.d.ts +13 -13
- package/dist/lib/models/UserFeedback.js +24 -24
- package/dist/lib/models/UserNameChangeRequest.d.ts +2 -2
- package/dist/lib/models/UserNameChangeRequest.js +5 -5
- package/dist/lib/models/WikiPage.d.ts +13 -13
- package/dist/lib/models/WikiPage.js +23 -23
- package/dist/lib/models/WikiPageVersion.d.ts +2 -2
- package/dist/lib/models/WikiPageVersion.js +5 -5
- package/dist/lib/models/index.d.ts +13 -1
- package/dist/lib/models/index.js +14 -2
- package/dist/lib/models/posts/Actions.d.ts +305 -0
- package/dist/lib/models/posts/Actions.js +502 -0
- package/dist/lib/modules/Appeals.d.ts +73 -0
- package/dist/lib/modules/Appeals.js +129 -0
- package/dist/lib/modules/ArtistUrls.d.ts +7 -7
- package/dist/lib/modules/ArtistUrls.js +10 -10
- package/dist/lib/modules/ArtistVersions.d.ts +7 -7
- package/dist/lib/modules/ArtistVersions.js +10 -10
- package/dist/lib/modules/Artists.d.ts +35 -35
- package/dist/lib/modules/Artists.js +59 -59
- package/dist/lib/modules/AvoidPostingVersions.d.ts +7 -7
- package/dist/lib/modules/AvoidPostingVersions.js +10 -10
- package/dist/lib/modules/AvoidPostings.d.ts +36 -56
- package/dist/lib/modules/AvoidPostings.js +63 -81
- package/dist/lib/modules/Bans.d.ts +9 -9
- package/dist/lib/modules/Bans.js +15 -15
- package/dist/lib/modules/Base.d.ts +2 -2
- package/dist/lib/modules/Base.js +4 -4
- package/dist/lib/modules/Blips.d.ts +43 -43
- package/dist/lib/modules/Blips.js +77 -75
- package/dist/lib/modules/BulkUpdateRequests.d.ts +29 -29
- package/dist/lib/modules/BulkUpdateRequests.js +54 -54
- package/dist/lib/modules/CommentVotes.d.ts +47 -4
- package/dist/lib/modules/CommentVotes.js +80 -13
- package/dist/lib/modules/Comments.d.ts +37 -39
- package/dist/lib/modules/Comments.js +65 -67
- package/dist/lib/modules/DMails.d.ts +27 -17
- package/dist/lib/modules/DMails.js +45 -35
- package/dist/lib/modules/DText.d.ts +6 -6
- package/dist/lib/modules/DText.js +8 -8
- package/dist/lib/modules/DbExports.d.ts +13 -0
- package/dist/lib/modules/DbExports.js +27 -0
- package/dist/lib/modules/EditHistories.d.ts +10 -10
- package/dist/lib/modules/EditHistories.js +15 -15
- package/dist/lib/modules/EmailBlacklists.d.ts +12 -12
- package/dist/lib/modules/EmailBlacklists.js +20 -20
- package/dist/lib/modules/Favorites.d.ts +18 -18
- package/dist/lib/modules/Favorites.js +27 -25
- package/dist/lib/modules/ForumPostVotes.d.ts +42 -0
- package/dist/lib/modules/ForumPostVotes.js +73 -0
- package/dist/lib/modules/ForumPosts.d.ts +35 -37
- package/dist/lib/modules/ForumPosts.js +63 -65
- package/dist/lib/modules/ForumTopics.d.ts +38 -43
- package/dist/lib/modules/ForumTopics.js +71 -85
- package/dist/lib/modules/Health.d.ts +12 -0
- package/dist/lib/modules/Health.js +26 -0
- package/dist/lib/modules/HelpPages.d.ts +31 -25
- package/dist/lib/modules/HelpPages.js +63 -47
- package/dist/lib/modules/IpBans.d.ts +12 -12
- package/dist/lib/modules/IpBans.js +20 -20
- package/dist/lib/modules/IqdbQueries.d.ts +14 -13
- package/dist/lib/modules/IqdbQueries.js +30 -22
- package/dist/lib/modules/Mascots.d.ts +22 -22
- package/dist/lib/modules/Mascots.js +39 -39
- package/dist/lib/modules/ModActions.d.ts +9 -9
- package/dist/lib/modules/ModActions.js +15 -15
- package/dist/lib/modules/NewsUpdates.d.ts +22 -22
- package/dist/lib/modules/NewsUpdates.js +39 -39
- package/dist/lib/modules/NoteVersions.d.ts +7 -7
- package/dist/lib/modules/NoteVersions.js +10 -10
- package/dist/lib/modules/Notes.d.ts +27 -27
- package/dist/lib/modules/Notes.js +51 -51
- package/dist/lib/modules/PoolVersions.d.ts +7 -7
- package/dist/lib/modules/PoolVersions.js +10 -10
- package/dist/lib/modules/Pools.d.ts +36 -36
- package/dist/lib/modules/Pools.js +67 -67
- package/dist/lib/modules/Popular.d.ts +8 -8
- package/dist/lib/modules/Popular.js +16 -14
- package/dist/lib/modules/PostApprovals.d.ts +11 -11
- package/dist/lib/modules/PostApprovals.js +21 -21
- package/dist/lib/modules/PostDisapprovals.d.ts +13 -10
- package/dist/lib/modules/PostDisapprovals.js +15 -15
- package/dist/lib/modules/PostEvents.d.ts +7 -7
- package/dist/lib/modules/PostEvents.js +15 -11
- package/dist/lib/modules/PostFlags.d.ts +29 -14
- package/dist/lib/modules/PostFlags.js +48 -25
- package/dist/lib/modules/PostReplacements.d.ts +23 -23
- package/dist/lib/modules/PostReplacements.js +46 -42
- package/dist/lib/modules/PostSets.d.ts +37 -37
- package/dist/lib/modules/PostSets.js +68 -68
- package/dist/lib/modules/PostVersions.d.ts +12 -12
- package/dist/lib/modules/PostVersions.js +24 -24
- package/dist/lib/modules/PostVotes.d.ts +48 -5
- package/dist/lib/modules/PostVotes.js +81 -14
- package/dist/lib/modules/Posts.d.ts +143 -52
- package/dist/lib/modules/Posts.js +257 -117
- package/dist/lib/modules/RelatedTags.d.ts +7 -7
- package/dist/lib/modules/RelatedTags.js +8 -8
- package/dist/lib/modules/SearchTrendBlacklists.d.ts +12 -27
- package/dist/lib/modules/SearchTrendBlacklists.js +20 -43
- package/dist/lib/modules/SearchTrends.d.ts +37 -19
- package/dist/lib/modules/SearchTrends.js +51 -28
- package/dist/lib/modules/StaffNotes.d.ts +29 -29
- package/dist/lib/modules/StaffNotes.js +54 -54
- package/dist/lib/modules/TagAliases.d.ts +29 -29
- package/dist/lib/modules/TagAliases.js +54 -54
- package/dist/lib/modules/TagCorrections.d.ts +6 -6
- package/dist/lib/modules/TagCorrections.js +15 -15
- package/dist/lib/modules/TagImplications.d.ts +28 -28
- package/dist/lib/modules/TagImplications.js +53 -53
- package/dist/lib/modules/TagTypeVersions.d.ts +6 -6
- package/dist/lib/modules/TagTypeVersions.js +9 -9
- package/dist/lib/modules/Tags.d.ts +26 -26
- package/dist/lib/modules/Tags.js +48 -48
- package/dist/lib/modules/Takedowns.d.ts +41 -41
- package/dist/lib/modules/Takedowns.js +68 -68
- package/dist/lib/modules/Tickets.d.ts +28 -28
- package/dist/lib/modules/Tickets.js +51 -51
- package/dist/lib/modules/UploadWhitelists.d.ts +24 -24
- package/dist/lib/modules/UploadWhitelists.js +42 -42
- package/dist/lib/modules/Uploads.d.ts +13 -13
- package/dist/lib/modules/Uploads.js +23 -23
- package/dist/lib/modules/UserFeedbacks.d.ts +32 -32
- package/dist/lib/modules/UserFeedbacks.js +59 -59
- package/dist/lib/modules/UserNameChangeRequests.d.ts +14 -14
- package/dist/lib/modules/UserNameChangeRequests.js +25 -25
- package/dist/lib/modules/Users.d.ts +61 -33
- package/dist/lib/modules/Users.js +113 -70
- package/dist/lib/modules/WikiPageVersions.d.ts +9 -9
- package/dist/lib/modules/WikiPageVersions.js +15 -15
- package/dist/lib/modules/WikiPages.d.ts +29 -29
- package/dist/lib/modules/WikiPages.js +53 -53
- package/dist/lib/modules/index.d.ts +53 -19
- package/dist/lib/modules/index.js +33 -6
- package/dist/lib/modules/posts/Format.d.ts +27 -0
- package/dist/lib/modules/posts/Format.js +17 -0
- package/dist/lib/modules/staff/AutomodDMails.d.ts +58 -0
- package/dist/lib/modules/staff/AutomodDMails.js +101 -0
- package/dist/lib/modules/{users → staff}/DMails.d.ts +5 -5
- package/dist/lib/modules/staff/DMails.js +55 -0
- package/dist/lib/modules/staff/ExceptionLogs.d.ts +34 -0
- package/dist/lib/modules/staff/ExceptionLogs.js +55 -0
- package/dist/lib/modules/staff/Files.d.ts +76 -0
- package/dist/lib/modules/staff/Files.js +125 -0
- package/dist/lib/modules/staff/UserCleanups.d.ts +64 -0
- package/dist/lib/modules/staff/UserCleanups.js +128 -0
- package/dist/lib/modules/{admin → staff}/Users.d.ts +10 -10
- package/dist/lib/modules/staff/Users.js +77 -0
- package/dist/lib/modules/staff/VoteTrends.d.ts +26 -0
- package/dist/lib/modules/staff/VoteTrends.js +39 -0
- package/dist/lib/modules/staff/WikiVersions.d.ts +34 -0
- package/dist/lib/modules/staff/WikiVersions.js +55 -0
- package/dist/lib/modules/staff/Wikis.d.ts +100 -0
- package/dist/lib/modules/staff/Wikis.js +171 -0
- package/dist/lib/util.d.ts +2 -6
- package/dist/lib/util.js +10 -9
- package/dist/package.json +19 -19
- package/package.json +19 -19
- package/tsconfig.json +2 -2
- package/dist/lib/models/Help.d.ts +0 -39
- package/dist/lib/models/Help.js +0 -57
- package/dist/lib/modules/admin/Users.js +0 -77
- package/dist/lib/modules/comments/Votes.d.ts +0 -31
- package/dist/lib/modules/comments/Votes.js +0 -51
- package/dist/lib/modules/forum_posts/Votes.d.ts +0 -29
- package/dist/lib/modules/forum_posts/Votes.js +0 -51
- package/dist/lib/modules/posts/Flag.d.ts +0 -16
- package/dist/lib/modules/posts/Flag.js +0 -31
- package/dist/lib/modules/posts/Votes.d.ts +0 -31
- package/dist/lib/modules/posts/Votes.js +0 -51
- package/dist/lib/modules/users/DMails.js +0 -55
|
@@ -1,16 +1,37 @@
|
|
|
1
|
+
import PostVote from "../models/PostVote.js";
|
|
2
|
+
import { GetResponse, type ExtractValue, TransformDataQueryToOptions } from "../util.js";
|
|
1
3
|
import Base from "./Base.js";
|
|
4
|
+
import type { PostVotesCreateData, PostVotesCreateResponses, PostVotesIndexData } from "../generated/types.js";
|
|
5
|
+
/** @category Modules/Types */
|
|
6
|
+
export type PostVoteScore = ExtractValue<"score", PostVotesCreateData>;
|
|
7
|
+
/** @category Modules/Types */
|
|
8
|
+
export interface PostVotesCreateResponse extends GetResponse<PostVotesCreateResponses, 200> {
|
|
9
|
+
}
|
|
10
|
+
/** @category Modules/Types */
|
|
11
|
+
export interface SearchPostVotesOptions extends TransformDataQueryToOptions<PostVotesIndexData> {
|
|
12
|
+
}
|
|
2
13
|
/** @category Modules */
|
|
3
14
|
export default class PostVotes extends Base {
|
|
4
15
|
/**
|
|
5
|
-
*
|
|
16
|
+
* Create Post Vote
|
|
17
|
+
*
|
|
18
|
+
* @requiresApiKeyAuth
|
|
19
|
+
*
|
|
20
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#create post_votes#create}
|
|
21
|
+
*
|
|
22
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#create Documentation} for more details.
|
|
23
|
+
*/
|
|
24
|
+
create(id: number, score: PostVoteScore, no_unvote?: boolean): Promise<PostVotesCreateResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Delete Post Votes
|
|
6
27
|
*
|
|
7
28
|
* You must be Admin+. Errors if ids is not provided.
|
|
8
29
|
*
|
|
9
30
|
* @requiresApiKeyAuth
|
|
10
31
|
*
|
|
11
|
-
* @operationId {@link https://e621.wiki/#operations-Post_Votes-
|
|
32
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#delete post_votes#delete}
|
|
12
33
|
*
|
|
13
|
-
* @see {@link https://e621.wiki/#operations-Post_Votes-
|
|
34
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#delete Documentation} for more details.
|
|
14
35
|
*/
|
|
15
36
|
delete(ids: Array<number>): Promise<null>;
|
|
16
37
|
/**
|
|
@@ -20,9 +41,31 @@ export default class PostVotes extends Base {
|
|
|
20
41
|
*
|
|
21
42
|
* @requiresApiKeyAuth
|
|
22
43
|
*
|
|
23
|
-
* @operationId {@link https://e621.wiki/#operations-Post_Votes-
|
|
44
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#lock post_votes#lock}
|
|
24
45
|
*
|
|
25
|
-
* @see {@link https://e621.wiki/#operations-Post_Votes-
|
|
46
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#lock Documentation} for more details.
|
|
26
47
|
*/
|
|
27
48
|
lock(ids: Array<number>): Promise<null>;
|
|
49
|
+
/**
|
|
50
|
+
* Post Votes Index
|
|
51
|
+
*
|
|
52
|
+
* You must be Moderator+.
|
|
53
|
+
*
|
|
54
|
+
* @requiresApiKeyAuth
|
|
55
|
+
*
|
|
56
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#index post_votes#index}
|
|
57
|
+
*
|
|
58
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#index Documentation} for more details.
|
|
59
|
+
*/
|
|
60
|
+
search(options?: SearchPostVotesOptions): Promise<Array<PostVote>>;
|
|
61
|
+
/**
|
|
62
|
+
* Delete Post Vote
|
|
63
|
+
*
|
|
64
|
+
* @requiresApiKeyAuth
|
|
65
|
+
*
|
|
66
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#destroy post_votes#destroy}
|
|
67
|
+
*
|
|
68
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#destroy Documentation} for more details.
|
|
69
|
+
*/
|
|
70
|
+
unvote(id: number): Promise<null>;
|
|
28
71
|
}
|
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { postVotes_create, postVotes_delete, postVotes_destroy, postVotes_lock, postVotes_index } from "../generated/sdk.js";
|
|
3
|
+
import PostVote from "../models/PostVote.js";
|
|
4
4
|
import { OperationID } from "../util.js";
|
|
5
|
+
import Base from "./Base.js";
|
|
5
6
|
/** @category Modules */
|
|
6
7
|
export default class PostVotes extends Base {
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Create Post Vote
|
|
10
|
+
*
|
|
11
|
+
* @requiresApiKeyAuth
|
|
12
|
+
*
|
|
13
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#create post_votes#create}
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#create Documentation} for more details.
|
|
16
|
+
*/
|
|
17
|
+
async create(id, score, no_unvote) {
|
|
18
|
+
return postVotes_create({
|
|
19
|
+
client: this.client,
|
|
20
|
+
path: { id },
|
|
21
|
+
query: { no_unvote, score },
|
|
22
|
+
}).then(res => this._handleResponse(res, 200, true));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Delete Post Votes
|
|
9
26
|
*
|
|
10
27
|
* You must be Admin+. Errors if ids is not provided.
|
|
11
28
|
*
|
|
12
29
|
* @requiresApiKeyAuth
|
|
13
30
|
*
|
|
14
|
-
* @operationId {@link https://e621.wiki/#operations-Post_Votes-
|
|
31
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#delete post_votes#delete}
|
|
15
32
|
*
|
|
16
|
-
* @see {@link https://e621.wiki/#operations-Post_Votes-
|
|
33
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#delete Documentation} for more details.
|
|
17
34
|
*/
|
|
18
35
|
async delete(ids) {
|
|
19
|
-
return
|
|
36
|
+
return postVotes_delete({
|
|
20
37
|
client: this.client,
|
|
21
|
-
query: { ids: ids.join(",") }
|
|
38
|
+
query: { ids: ids.join(",") },
|
|
22
39
|
}).then(res => this._handleResponse(res, 204, true));
|
|
23
40
|
}
|
|
24
41
|
/**
|
|
@@ -28,27 +45,77 @@ export default class PostVotes extends Base {
|
|
|
28
45
|
*
|
|
29
46
|
* @requiresApiKeyAuth
|
|
30
47
|
*
|
|
31
|
-
* @operationId {@link https://e621.wiki/#operations-Post_Votes-
|
|
48
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#lock post_votes#lock}
|
|
32
49
|
*
|
|
33
|
-
* @see {@link https://e621.wiki/#operations-Post_Votes-
|
|
50
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#lock Documentation} for more details.
|
|
34
51
|
*/
|
|
35
52
|
async lock(ids) {
|
|
36
|
-
return
|
|
53
|
+
return postVotes_lock({
|
|
37
54
|
client: this.client,
|
|
38
|
-
query: { ids: ids.join(",") }
|
|
55
|
+
query: { ids: ids.join(",") },
|
|
56
|
+
}).then(res => this._handleResponse(res, 204, true));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Post Votes Index
|
|
60
|
+
*
|
|
61
|
+
* You must be Moderator+.
|
|
62
|
+
*
|
|
63
|
+
* @requiresApiKeyAuth
|
|
64
|
+
*
|
|
65
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#index post_votes#index}
|
|
66
|
+
*
|
|
67
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#index Documentation} for more details.
|
|
68
|
+
*/
|
|
69
|
+
async search(options) {
|
|
70
|
+
return postVotes_index({
|
|
71
|
+
client: this.client,
|
|
72
|
+
query: options,
|
|
73
|
+
}).then(res => this._handleResponse(res, 200, true, PostVote));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Delete Post Vote
|
|
77
|
+
*
|
|
78
|
+
* @requiresApiKeyAuth
|
|
79
|
+
*
|
|
80
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes#destroy post_votes#destroy}
|
|
81
|
+
*
|
|
82
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes#destroy Documentation} for more details.
|
|
83
|
+
*/
|
|
84
|
+
async unvote(id) {
|
|
85
|
+
return postVotes_destroy({
|
|
86
|
+
client: this.client,
|
|
87
|
+
path: { id },
|
|
39
88
|
}).then(res => this._handleResponse(res, 204, true));
|
|
40
89
|
}
|
|
41
90
|
}
|
|
42
91
|
__decorate([
|
|
43
|
-
OperationID("
|
|
92
|
+
OperationID("post_votes#create"),
|
|
93
|
+
__metadata("design:type", Function),
|
|
94
|
+
__metadata("design:paramtypes", [Number, Number, Boolean]),
|
|
95
|
+
__metadata("design:returntype", Promise)
|
|
96
|
+
], PostVotes.prototype, "create", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
OperationID("post_votes#delete"),
|
|
44
99
|
__metadata("design:type", Function),
|
|
45
100
|
__metadata("design:paramtypes", [Array]),
|
|
46
101
|
__metadata("design:returntype", Promise)
|
|
47
102
|
], PostVotes.prototype, "delete", null);
|
|
48
103
|
__decorate([
|
|
49
|
-
OperationID("
|
|
104
|
+
OperationID("post_votes#lock"),
|
|
50
105
|
__metadata("design:type", Function),
|
|
51
106
|
__metadata("design:paramtypes", [Array]),
|
|
52
107
|
__metadata("design:returntype", Promise)
|
|
53
108
|
], PostVotes.prototype, "lock", null);
|
|
54
|
-
|
|
109
|
+
__decorate([
|
|
110
|
+
OperationID("post_votes#index"),
|
|
111
|
+
__metadata("design:type", Function),
|
|
112
|
+
__metadata("design:paramtypes", [Object]),
|
|
113
|
+
__metadata("design:returntype", Promise)
|
|
114
|
+
], PostVotes.prototype, "search", null);
|
|
115
|
+
__decorate([
|
|
116
|
+
OperationID("post_votes#destroy"),
|
|
117
|
+
__metadata("design:type", Function),
|
|
118
|
+
__metadata("design:paramtypes", [Number]),
|
|
119
|
+
__metadata("design:returntype", Promise)
|
|
120
|
+
], PostVotes.prototype, "unvote", null);
|
|
121
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9zdFZvdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL21vZHVsZXMvUG9zdFZvdGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsZ0JBQWdCLEVBQUUsaUJBQWlCLEVBQUUsY0FBYyxFQUFFLGVBQWUsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzdILE9BQU8sUUFBUSxNQUFNLHVCQUF1QixDQUFDO0FBQzdDLE9BQU8sRUFBZSxXQUFXLEVBQWtELE1BQU0sWUFBWSxDQUFDO0FBRXRHLE9BQU8sSUFBSSxNQUFNLFdBQVcsQ0FBQztBQVc3Qix3QkFBd0I7QUFDeEIsTUFBTSxDQUFDLE9BQU8sT0FBTyxTQUFVLFNBQVEsSUFBSTtJQUN2Qzs7Ozs7Ozs7T0FRQTtJQUVNLEFBQU4sS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFVLEVBQUUsS0FBb0IsRUFBRSxTQUFtQjtRQUM5RCxPQUFPLGdCQUFnQixDQUFDO1lBQ3BCLE1BQU0sRUFBRSxJQUFJLENBQUMsTUFBTTtZQUNuQixJQUFJLEVBQUUsRUFBRSxFQUFFLEVBQUU7WUFDWixLQUFLLEVBQUUsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFO1NBQzlCLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsZUFBZSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQztJQUN6RCxDQUFDO0lBRUQ7Ozs7Ozs7Ozs7T0FVQTtJQUVNLEFBQU4sS0FBSyxDQUFDLE1BQU0sQ0FBQyxHQUFrQjtRQUMzQixPQUFPLGdCQUFnQixDQUFDO1lBQ3BCLE1BQU0sRUFBRSxJQUFJLENBQUMsTUFBTTtZQUNuQixLQUFLLEVBQUUsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRTtTQUNoQyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLElBQUksQ0FBQyxDQUFDLENBQUM7SUFDekQsQ0FBQztJQUVEOzs7Ozs7Ozs7O09BVUE7SUFFTSxBQUFOLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBa0I7UUFDekIsT0FBTyxjQUFjLENBQUM7WUFDbEIsTUFBTSxFQUFFLElBQUksQ0FBQyxNQUFNO1lBQ25CLEtBQUssRUFBRSxFQUFFLEdBQUcsRUFBRSxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFO1NBQ2hDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsZUFBZSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQztJQUN6RCxDQUFDO0lBRUQ7Ozs7Ozs7Ozs7T0FVQTtJQUVNLEFBQU4sS0FBSyxDQUFDLE1BQU0sQ0FBQyxPQUFnQztRQUN6QyxPQUFPLGVBQWUsQ0FBQztZQUNuQixNQUFNLEVBQUUsSUFBSSxDQUFDLE1BQU07WUFDbkIsS0FBSyxFQUFFLE9BQU87U0FDakIsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsR0FBRyxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUUsUUFBUSxDQUFDLENBQUMsQ0FBQztJQUNuRSxDQUFDO0lBRUQ7Ozs7Ozs7O09BUUE7SUFFTSxBQUFOLEtBQUssQ0FBQyxNQUFNLENBQUMsRUFBVTtRQUNuQixPQUFPLGlCQUFpQixDQUFDO1lBQ3JCLE1BQU0sRUFBRSxJQUFJLENBQUMsTUFBTTtZQUNuQixJQUFJLEVBQUUsRUFBRSxFQUFFLEVBQUU7U0FDZixDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLElBQUksQ0FBQyxDQUFDLENBQUM7SUFDekQsQ0FBQztDQUNKO0FBakZTO0lBRFIsV0FBVyxDQUFDLG1CQUFtQixDQUFDOzs7O3VDQU83QjtBQWNLO0lBRFIsV0FBVyxDQUFDLG1CQUFtQixDQUFDOztxQ0FDWixLQUFLOzt1Q0FLdEI7QUFjSztJQURSLFdBQVcsQ0FBQyxpQkFBaUIsQ0FBQzs7cUNBQ1osS0FBSzs7cUNBS3BCO0FBY0s7SUFEUixXQUFXLENBQUMsa0JBQWtCLENBQUM7Ozs7dUNBTTVCO0FBWUs7SUFEUixXQUFXLENBQUMsb0JBQW9CLENBQUM7Ozs7dUNBTTlCIn0=
|
|
@@ -1,25 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import PostVotes from "./posts/Votes.js";
|
|
3
|
-
import PostFlag from "./posts/Flag.js";
|
|
4
|
-
import type { DeletePostData, GetPostInSequenceData, ListPostFavoritesData, MovePostFavoritesData, SearchPostsData } from "../generated/types.js";
|
|
5
|
-
import { type ExtractValue, type TransformDataBodyToOptions, type TransformDataQueryToOptions } from "../util.js";
|
|
1
|
+
import MinimalUser from "../models/MinimalUser.js";
|
|
6
2
|
import Post from "../models/Post.js";
|
|
3
|
+
import ThumbnailPost from "../models/ThumbnailPost.js";
|
|
4
|
+
import { type TransformDataBodyToOptions, type TransformDataQueryToOptions } from "../util.js";
|
|
5
|
+
import Base from "./Base.js";
|
|
6
|
+
import { type NoV2Options, type PostFormat } from "./posts/Format.js";
|
|
7
|
+
import type { StaffPostPostsDeleteData, PostsShowData, PostsShowSeqData, PostsRandomData, PostRecommendationsArtistData, PostFavoritesIndexData, PostsMarkAsTranslatedData, StaffPostPostsMoveFavoritesData, PostRecommendation, StaffPostPostsReownerData, PostsIndexData, PostsUpdateData, PostsUpdateIqdbData } from "../generated/types.js";
|
|
8
|
+
/** @category Modules/Types */
|
|
9
|
+
export interface DeletePostOptions extends TransformDataBodyToOptions<StaffPostPostsDeleteData> {
|
|
10
|
+
}
|
|
11
|
+
/** @category Modules/Types */
|
|
12
|
+
export interface MovePostFavoritesOptions extends TransformDataBodyToOptions<StaffPostPostsMoveFavoritesData> {
|
|
13
|
+
}
|
|
14
|
+
/** @category Modules/Types */
|
|
15
|
+
export interface SearchPostsOptions extends TransformDataQueryToOptions<PostsIndexData> {
|
|
16
|
+
}
|
|
17
|
+
/** @category Modules/Types */
|
|
18
|
+
export interface ListPostFavoritesOptions extends TransformDataQueryToOptions<PostFavoritesIndexData> {
|
|
19
|
+
}
|
|
20
|
+
/** @category Modules/Types */
|
|
21
|
+
export interface GetRandomPostOptions extends TransformDataQueryToOptions<PostsRandomData> {
|
|
22
|
+
}
|
|
23
|
+
/** @category Modules/Types */
|
|
24
|
+
export interface GetPostOptions extends TransformDataQueryToOptions<PostsShowData> {
|
|
25
|
+
}
|
|
26
|
+
/** @category Modules/Types */
|
|
27
|
+
export interface GetPostInSequenceOptions extends TransformDataQueryToOptions<PostsShowSeqData> {
|
|
28
|
+
}
|
|
29
|
+
/** @category Modules/Types */
|
|
30
|
+
export interface MarkPostAsTranslatedOptions extends TransformDataQueryToOptions<PostsMarkAsTranslatedData> {
|
|
31
|
+
}
|
|
32
|
+
/** @category Modules/Types */
|
|
33
|
+
export interface UpdatePostOptions extends TransformDataBodyToOptions<PostsUpdateData>, TransformDataQueryToOptions<PostsUpdateData> {
|
|
34
|
+
}
|
|
7
35
|
/** @category Modules/Types */
|
|
8
|
-
export interface
|
|
36
|
+
export interface UpdatePostIqdbOptions extends TransformDataQueryToOptions<PostsUpdateIqdbData> {
|
|
9
37
|
}
|
|
10
38
|
/** @category Modules/Types */
|
|
11
|
-
export interface
|
|
39
|
+
export interface RecommendedPostsOptions extends TransformDataQueryToOptions<PostRecommendationsArtistData> {
|
|
12
40
|
}
|
|
13
41
|
/** @category Modules/Types */
|
|
14
|
-
export interface
|
|
42
|
+
export interface ReownPostOptions extends TransformDataBodyToOptions<StaffPostPostsReownerData> {
|
|
15
43
|
}
|
|
16
44
|
/** @category Modules/Types */
|
|
17
|
-
export interface
|
|
45
|
+
export interface PostPreviousOwner {
|
|
46
|
+
id: number;
|
|
47
|
+
name: string;
|
|
18
48
|
}
|
|
49
|
+
/** @category Modules/Types */
|
|
50
|
+
export interface RecommendedPostsResult {
|
|
51
|
+
model_version: string;
|
|
52
|
+
post_data: Array<ThumbnailPost>;
|
|
53
|
+
post_id: number;
|
|
54
|
+
results: Array<PostRecommendation>;
|
|
55
|
+
}
|
|
56
|
+
/** @category Modules/Types */
|
|
57
|
+
export type PostSearchResult<O extends SearchPostsOptions> = O extends {
|
|
58
|
+
md5: string;
|
|
59
|
+
} ? PostFormat<O["v2"], O["mode"]> : Array<PostFormat<O["v2"], O["mode"]>>;
|
|
19
60
|
/** @category Modules */
|
|
20
61
|
export default class Posts extends Base {
|
|
21
|
-
flag: PostFlag;
|
|
22
|
-
votes: PostVotes;
|
|
23
62
|
/**
|
|
24
63
|
* AI Check Post
|
|
25
64
|
*
|
|
@@ -27,9 +66,9 @@ export default class Posts extends Base {
|
|
|
27
66
|
*
|
|
28
67
|
* @requiresApiKeyAuth
|
|
29
68
|
*
|
|
30
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
69
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#ai_check staff/post/posts#ai_check}
|
|
31
70
|
*
|
|
32
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
71
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#ai_check Documentation} for more details.
|
|
33
72
|
*/
|
|
34
73
|
aiCheck(id: number): Promise<string>;
|
|
35
74
|
/**
|
|
@@ -37,9 +76,9 @@ export default class Posts extends Base {
|
|
|
37
76
|
*
|
|
38
77
|
* @requiresApiKeyAuth
|
|
39
78
|
*
|
|
40
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
79
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#copy_notes posts#copy_notes}
|
|
41
80
|
*
|
|
42
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
81
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#copy_notes Documentation} for more details.
|
|
43
82
|
*/
|
|
44
83
|
copyNotes(id: number, other_post_id: number): Promise<null>;
|
|
45
84
|
/**
|
|
@@ -49,9 +88,9 @@ export default class Posts extends Base {
|
|
|
49
88
|
*
|
|
50
89
|
* @requiresApiKeyAuth
|
|
51
90
|
*
|
|
52
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
91
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#delete staff/post/posts#delete}
|
|
53
92
|
*
|
|
54
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
93
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#delete Documentation} for more details.
|
|
55
94
|
*/
|
|
56
95
|
delete(id: number, options: DeletePostOptions): Promise<unknown>;
|
|
57
96
|
/**
|
|
@@ -61,29 +100,29 @@ export default class Posts extends Base {
|
|
|
61
100
|
*
|
|
62
101
|
* @requiresApiKeyAuth
|
|
63
102
|
*
|
|
64
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
103
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#expunge staff/post/posts#expunge}
|
|
65
104
|
*
|
|
66
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
105
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#expunge Documentation} for more details.
|
|
67
106
|
*/
|
|
68
107
|
expunge(id: number, reason: string): Promise<Post>;
|
|
69
108
|
/**
|
|
70
|
-
*
|
|
109
|
+
* Post Favorites Index
|
|
71
110
|
*
|
|
72
111
|
* You must be the user or Moderator+ to see users that have their favorites hidden.
|
|
73
112
|
*
|
|
74
|
-
* @operationId {@link https://e621.wiki/#operations-
|
|
113
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Favorites-post_favorites#index post_favorites#index}
|
|
75
114
|
*
|
|
76
|
-
* @see {@link https://e621.wiki/#operations-
|
|
115
|
+
* @see {@link https://e621.wiki/#operations-Post_Favorites-post_favorites#index Documentation} for more details.
|
|
77
116
|
*/
|
|
78
|
-
favorites(id: number, options: ListPostFavoritesOptions): Promise<Array<
|
|
117
|
+
favorites(id: number, options: ListPostFavoritesOptions): Promise<Array<MinimalUser>>;
|
|
79
118
|
/**
|
|
80
119
|
* Get Post
|
|
81
120
|
*
|
|
82
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
121
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#show posts#show}
|
|
83
122
|
*
|
|
84
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
123
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#show Documentation} for more details.
|
|
85
124
|
*/
|
|
86
|
-
get(id: number): Promise<
|
|
125
|
+
get<const O extends GetPostOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]> | null>;
|
|
87
126
|
/**
|
|
88
127
|
* Mark Post As Translated
|
|
89
128
|
*
|
|
@@ -91,11 +130,11 @@ export default class Posts extends Base {
|
|
|
91
130
|
*
|
|
92
131
|
* @requiresApiKeyAuth
|
|
93
132
|
*
|
|
94
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
133
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#mark_as_translated posts#mark_as_translated}
|
|
95
134
|
*
|
|
96
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
135
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#mark_as_translated Documentation} for more details.
|
|
97
136
|
*/
|
|
98
|
-
markTranslated(id: number): Promise<
|
|
137
|
+
markTranslated<const O extends MarkPostAsTranslatedOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
99
138
|
/**
|
|
100
139
|
* Move Post Favorites
|
|
101
140
|
*
|
|
@@ -103,19 +142,47 @@ export default class Posts extends Base {
|
|
|
103
142
|
*
|
|
104
143
|
* @requiresApiKeyAuth
|
|
105
144
|
*
|
|
106
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
145
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#move_favorites staff/post/posts#move_favorites}
|
|
107
146
|
*
|
|
108
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
147
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#move_favorites Documentation} for more details.
|
|
109
148
|
*/
|
|
110
149
|
moveFavorites(id: number, options: MovePostFavoritesOptions): Promise<unknown>;
|
|
150
|
+
/**
|
|
151
|
+
* Get Post Previous Owners
|
|
152
|
+
*
|
|
153
|
+
* You must be an Approver
|
|
154
|
+
*
|
|
155
|
+
* @requiresApiKeyAuth
|
|
156
|
+
*
|
|
157
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#previous_owners staff/post/posts#previous_owners}
|
|
158
|
+
*
|
|
159
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#previous_owners Documentation} for more details.
|
|
160
|
+
*/
|
|
161
|
+
previousOwners(id: number): Promise<Array<PostPreviousOwner>>;
|
|
111
162
|
/**
|
|
112
163
|
* Get Random Post
|
|
113
164
|
*
|
|
114
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
165
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#random posts#random}
|
|
115
166
|
*
|
|
116
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
167
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#random Documentation} for more details.
|
|
117
168
|
*/
|
|
118
|
-
random(
|
|
169
|
+
random<const O extends GetRandomPostOptions = NoV2Options>(options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
170
|
+
/**
|
|
171
|
+
* Get Recommended Posts For Artist
|
|
172
|
+
*
|
|
173
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-post_recommendations#artist post_recommendations#artist}
|
|
174
|
+
*
|
|
175
|
+
* @see {@link https://e621.wiki/#operations-Posts-post_recommendations#artist Documentation} for more details.
|
|
176
|
+
*/
|
|
177
|
+
recommendedByArtist(id: number, options?: RecommendedPostsOptions): Promise<RecommendedPostsResult>;
|
|
178
|
+
/**
|
|
179
|
+
* Get Recommended Posts For Tags
|
|
180
|
+
*
|
|
181
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-post_recommendations#tags post_recommendations#tags}
|
|
182
|
+
*
|
|
183
|
+
* @see {@link https://e621.wiki/#operations-Posts-post_recommendations#tags Documentation} for more details.
|
|
184
|
+
*/
|
|
185
|
+
recommendedByTags(id: number, options?: RecommendedPostsOptions): Promise<RecommendedPostsResult>;
|
|
119
186
|
/**
|
|
120
187
|
* Regenerate Post Thumbnails
|
|
121
188
|
*
|
|
@@ -123,9 +190,9 @@ export default class Posts extends Base {
|
|
|
123
190
|
*
|
|
124
191
|
* @requiresApiKeyAuth
|
|
125
192
|
*
|
|
126
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
193
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#regenerate_thumbnails staff/post/posts#regenerate_thumbnails}
|
|
127
194
|
*
|
|
128
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
195
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#regenerate_thumbnails Documentation} for more details.
|
|
129
196
|
*/
|
|
130
197
|
regenerateThumbnails(id: number): Promise<Post>;
|
|
131
198
|
/**
|
|
@@ -135,37 +202,49 @@ export default class Posts extends Base {
|
|
|
135
202
|
*
|
|
136
203
|
* @requiresApiKeyAuth
|
|
137
204
|
*
|
|
138
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
205
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#regenerate_videos staff/post/posts#regenerate_videos}
|
|
139
206
|
*
|
|
140
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
207
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#regenerate_videos Documentation} for more details.
|
|
141
208
|
*/
|
|
142
209
|
regenerateVideos(id: number): Promise<null>;
|
|
210
|
+
/**
|
|
211
|
+
* Reown Post
|
|
212
|
+
*
|
|
213
|
+
* You must have be Janitor+ and an Approver
|
|
214
|
+
*
|
|
215
|
+
* @requiresApiKeyAuth
|
|
216
|
+
*
|
|
217
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#reowner staff/post/posts#reowner}
|
|
218
|
+
*
|
|
219
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#reowner Documentation} for more details.
|
|
220
|
+
*/
|
|
221
|
+
reown(id: number, options: ReownPostOptions): Promise<string>;
|
|
143
222
|
/**
|
|
144
223
|
* Revert Post
|
|
145
224
|
*
|
|
146
225
|
* @requiresApiKeyAuth
|
|
147
226
|
*
|
|
148
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
227
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#revert posts#revert}
|
|
149
228
|
*
|
|
150
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
229
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#revert Documentation} for more details.
|
|
151
230
|
*/
|
|
152
231
|
revert(id: number, version_id: number): Promise<null>;
|
|
153
232
|
/**
|
|
154
|
-
*
|
|
233
|
+
* Posts Index
|
|
155
234
|
*
|
|
156
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
235
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#index posts#index}
|
|
157
236
|
*
|
|
158
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
237
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#index Documentation} for more details.
|
|
159
238
|
*/
|
|
160
|
-
search(options?:
|
|
239
|
+
search<const O extends SearchPostsOptions = NoV2Options>(options?: O): Promise<PostSearchResult<O>>;
|
|
161
240
|
/**
|
|
162
241
|
* Get Post In Sequence
|
|
163
242
|
*
|
|
164
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
243
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#show_seq posts#show_seq}
|
|
165
244
|
*
|
|
166
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
245
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#show_seq Documentation} for more details.
|
|
167
246
|
*/
|
|
168
|
-
sequence(id: number,
|
|
247
|
+
sequence<const O extends GetPostInSequenceOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
169
248
|
/**
|
|
170
249
|
* Undelete Post
|
|
171
250
|
*
|
|
@@ -173,11 +252,23 @@ export default class Posts extends Base {
|
|
|
173
252
|
*
|
|
174
253
|
* @requiresApiKeyAuth
|
|
175
254
|
*
|
|
176
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
255
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts#undelete staff/post/posts#undelete}
|
|
177
256
|
*
|
|
178
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
257
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts#undelete Documentation} for more details.
|
|
179
258
|
*/
|
|
180
259
|
undelete(id: number): Promise<Post>;
|
|
260
|
+
/**
|
|
261
|
+
* Update Post
|
|
262
|
+
*
|
|
263
|
+
* Most errors are silently swallowed.
|
|
264
|
+
*
|
|
265
|
+
* @requiresApiKeyAuth
|
|
266
|
+
*
|
|
267
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#update posts#update}
|
|
268
|
+
*
|
|
269
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#update Documentation} for more details.
|
|
270
|
+
*/
|
|
271
|
+
update<const O extends UpdatePostOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
181
272
|
/**
|
|
182
273
|
* Update Post IQDB
|
|
183
274
|
*
|
|
@@ -185,9 +276,9 @@ export default class Posts extends Base {
|
|
|
185
276
|
*
|
|
186
277
|
* @requiresApiKeyAuth
|
|
187
278
|
*
|
|
188
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
279
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts#update_iqdb posts#update_iqdb}
|
|
189
280
|
*
|
|
190
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
281
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts#update_iqdb Documentation} for more details.
|
|
191
282
|
*/
|
|
192
|
-
updateIqdb(id: number): Promise<
|
|
283
|
+
updateIqdb<const O extends UpdatePostIqdbOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
193
284
|
}
|