e621 3.0.3 → 3.2.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 +52 -0
- package/dist/browser/e621.d.ts +2 -0
- package/dist/browser/e621.js +19289 -0
- package/dist/browser/e621.js.map +7 -0
- package/dist/lib/Debug.browser.d.ts +6 -0
- package/dist/lib/Debug.browser.js +8 -0
- package/dist/lib/client.d.ts +59 -0
- package/dist/lib/client.js +72 -0
- package/dist/lib/errors.d.ts +3 -3
- package/dist/lib/errors.js +6 -2
- package/dist/lib/generated/client/client.js +105 -124
- 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 +4 -4
- 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/schemas.d.ts +1192 -219
- package/dist/lib/generated/schemas.js +1780 -483
- package/dist/lib/generated/sdk.d.ts +612 -380
- package/dist/lib/generated/sdk.js +895 -546
- package/dist/lib/generated/types.d.ts +6241 -4549
- package/dist/lib/index.d.ts +2 -43
- package/dist/lib/index.js +5 -61
- package/dist/lib/models/Appeal.d.ts +48 -0
- package/dist/lib/models/Appeal.js +74 -0
- package/dist/lib/models/Artist.d.ts +15 -18
- package/dist/lib/models/Artist.js +24 -27
- package/dist/lib/models/AvoidPosting.d.ts +11 -15
- package/dist/lib/models/AvoidPosting.js +21 -25
- package/dist/lib/models/Base.browser.d.ts +14 -0
- package/dist/lib/models/Base.browser.js +22 -0
- package/dist/lib/models/BasicPost.d.ts +14 -0
- package/dist/lib/models/BasicPost.js +17 -0
- package/dist/lib/models/Blip.d.ts +19 -24
- package/dist/lib/models/Blip.js +30 -35
- package/dist/lib/models/BulkUpdateRequest.d.ts +9 -12
- package/dist/lib/models/BulkUpdateRequest.js +18 -21
- package/dist/lib/models/Comment.d.ts +25 -32
- package/dist/lib/models/Comment.js +39 -46
- package/dist/lib/models/CommentVote.d.ts +47 -0
- package/dist/lib/models/CommentVote.js +74 -0
- package/dist/lib/models/CurrentUser.d.ts +33 -1
- package/dist/lib/models/CurrentUser.js +54 -3
- package/dist/lib/models/DMail.d.ts +15 -9
- package/dist/lib/models/DMail.js +27 -13
- package/dist/lib/models/DbExport.d.ts +14 -0
- package/dist/lib/models/DbExport.js +17 -0
- package/dist/lib/models/EmailBlacklist.d.ts +2 -3
- package/dist/lib/models/EmailBlacklist.js +4 -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 +37 -34
- package/dist/lib/models/ForumPost.js +57 -47
- package/dist/lib/models/ForumPostVote.d.ts +2 -3
- package/dist/lib/models/ForumPostVote.js +5 -6
- package/dist/lib/models/ForumTopic.d.ts +20 -26
- package/dist/lib/models/ForumTopic.js +33 -39
- package/dist/lib/models/HelpPage.d.ts +37 -0
- package/dist/lib/models/HelpPage.js +55 -0
- package/dist/lib/models/IpBan.d.ts +2 -3
- package/dist/lib/models/IpBan.js +4 -5
- package/dist/lib/models/Mascot.d.ts +6 -8
- package/dist/lib/models/Mascot.js +10 -12
- package/dist/lib/models/MinimalUser.d.ts +14 -0
- package/dist/lib/models/MinimalUser.js +17 -0
- package/dist/lib/models/NewsUpdate.d.ts +6 -8
- package/dist/lib/models/NewsUpdate.js +10 -12
- package/dist/lib/models/Note.d.ts +9 -12
- package/dist/lib/models/Note.js +18 -21
- package/dist/lib/models/NoteVersion.d.ts +2 -3
- package/dist/lib/models/NoteVersion.js +4 -5
- package/dist/lib/models/Pool.d.ts +15 -20
- package/dist/lib/models/Pool.js +28 -33
- package/dist/lib/models/PoolVersion.d.ts +2 -3
- package/dist/lib/models/PoolVersion.js +4 -5
- package/dist/lib/models/Post.d.ts +5 -174
- package/dist/lib/models/Post.js +8 -294
- package/dist/lib/models/PostApproval.d.ts +2 -3
- package/dist/lib/models/PostApproval.js +4 -5
- package/dist/lib/models/PostFlag.d.ts +4 -6
- package/dist/lib/models/PostFlag.js +8 -10
- package/dist/lib/models/PostReplacement.d.ts +10 -15
- package/dist/lib/models/PostReplacement.js +16 -21
- package/dist/lib/models/PostSet.d.ts +15 -20
- package/dist/lib/models/PostSet.js +26 -31
- package/dist/lib/models/PostVersion.d.ts +8 -12
- package/dist/lib/models/PostVersion.js +13 -17
- package/dist/lib/models/PostVote.d.ts +6 -9
- package/dist/lib/models/PostVote.js +11 -14
- package/dist/lib/models/SearchTrendBlacklist.d.ts +23 -0
- package/dist/lib/models/SearchTrendBlacklist.js +41 -3
- package/dist/lib/models/StaffFile.d.ts +37 -0
- package/dist/lib/models/StaffFile.js +55 -0
- package/dist/lib/models/StaffNote.d.ts +10 -13
- package/dist/lib/models/StaffNote.js +19 -22
- package/dist/lib/models/StaffWiki.d.ts +59 -0
- package/dist/lib/models/StaffWiki.js +93 -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 +16 -20
- package/dist/lib/models/Tag.js +28 -32
- package/dist/lib/models/TagAlias.d.ts +11 -14
- package/dist/lib/models/TagAlias.js +20 -23
- package/dist/lib/models/TagImplication.d.ts +11 -14
- package/dist/lib/models/TagImplication.js +20 -23
- package/dist/lib/models/Takedown.d.ts +18 -24
- package/dist/lib/models/Takedown.js +27 -33
- package/dist/lib/models/ThumbnailPost.d.ts +14 -0
- package/dist/lib/models/ThumbnailPost.js +17 -0
- package/dist/lib/models/Ticket.d.ts +11 -14
- package/dist/lib/models/Ticket.js +20 -23
- package/dist/lib/models/UploadWhitelist.d.ts +6 -8
- package/dist/lib/models/UploadWhitelist.js +10 -12
- package/dist/lib/models/User.d.ts +27 -23
- package/dist/lib/models/User.js +43 -31
- package/dist/lib/models/UserFeedback.d.ts +11 -15
- package/dist/lib/models/UserFeedback.js +21 -25
- package/dist/lib/models/UserNameChangeRequest.d.ts +2 -3
- package/dist/lib/models/UserNameChangeRequest.js +4 -5
- package/dist/lib/models/WikiPage.d.ts +11 -14
- package/dist/lib/models/WikiPage.js +20 -23
- package/dist/lib/models/WikiPageVersion.d.ts +2 -3
- package/dist/lib/models/WikiPageVersion.js +4 -5
- package/dist/lib/models/index.d.ts +12 -1
- package/dist/lib/models/index.js +13 -2
- package/dist/lib/models/posts/Actions.d.ts +279 -0
- package/dist/lib/models/posts/Actions.js +476 -0
- package/dist/lib/modules/Appeals.d.ts +69 -0
- package/dist/lib/modules/Appeals.js +125 -0
- package/dist/lib/modules/ArtistUrls.d.ts +5 -5
- package/dist/lib/modules/ArtistUrls.js +7 -7
- package/dist/lib/modules/ArtistVersions.d.ts +5 -5
- package/dist/lib/modules/ArtistVersions.js +7 -7
- package/dist/lib/modules/Artists.d.ts +31 -36
- package/dist/lib/modules/Artists.js +53 -58
- package/dist/lib/modules/AvoidPostingVersions.d.ts +5 -5
- package/dist/lib/modules/AvoidPostingVersions.js +7 -7
- package/dist/lib/modules/AvoidPostings.d.ts +29 -55
- package/dist/lib/modules/AvoidPostings.js +51 -75
- package/dist/lib/modules/Bans.d.ts +7 -8
- package/dist/lib/modules/Bans.js +11 -12
- package/dist/lib/modules/Base.d.ts +15 -4
- package/dist/lib/modules/Base.js +15 -4
- package/dist/lib/modules/Blips.d.ts +34 -41
- package/dist/lib/modules/Blips.js +59 -64
- package/dist/lib/modules/BulkUpdateRequests.d.ts +25 -30
- package/dist/lib/modules/BulkUpdateRequests.js +47 -52
- package/dist/lib/modules/CommentVotes.d.ts +45 -6
- package/dist/lib/modules/CommentVotes.js +75 -12
- package/dist/lib/modules/Comments.d.ts +34 -43
- package/dist/lib/modules/Comments.js +57 -66
- package/dist/lib/modules/DMails.d.ts +25 -20
- package/dist/lib/modules/DMails.js +37 -32
- package/dist/lib/modules/DText.d.ts +6 -6
- package/dist/lib/modules/DText.js +7 -7
- package/dist/lib/modules/DbExports.d.ts +13 -0
- package/dist/lib/modules/DbExports.js +27 -0
- package/dist/lib/modules/EditHistories.d.ts +8 -9
- package/dist/lib/modules/EditHistories.js +11 -12
- package/dist/lib/modules/EmailBlacklists.d.ts +10 -12
- package/dist/lib/modules/EmailBlacklists.js +16 -18
- package/dist/lib/modules/Favorites.d.ts +15 -17
- package/dist/lib/modules/Favorites.js +20 -20
- package/dist/lib/modules/ForumPostVotes.d.ts +40 -0
- package/dist/lib/modules/ForumPostVotes.js +71 -0
- package/dist/lib/modules/ForumPosts.d.ts +32 -41
- package/dist/lib/modules/ForumPosts.js +55 -64
- package/dist/lib/modules/ForumTopics.d.ts +36 -50
- package/dist/lib/modules/ForumTopics.js +61 -84
- package/dist/lib/modules/Health.d.ts +12 -0
- package/dist/lib/modules/Health.js +26 -0
- package/dist/lib/modules/HelpPages.d.ts +27 -26
- package/dist/lib/modules/HelpPages.js +58 -47
- package/dist/lib/modules/IpBans.d.ts +10 -12
- package/dist/lib/modules/IpBans.js +16 -18
- package/dist/lib/modules/IqdbQueries.d.ts +14 -14
- package/dist/lib/modules/IqdbQueries.js +25 -18
- package/dist/lib/modules/Mascots.d.ts +19 -22
- package/dist/lib/modules/Mascots.js +33 -36
- package/dist/lib/modules/ModActions.d.ts +7 -8
- package/dist/lib/modules/ModActions.js +11 -12
- package/dist/lib/modules/NewsUpdates.d.ts +19 -22
- package/dist/lib/modules/NewsUpdates.js +35 -38
- package/dist/lib/modules/NoteVersions.d.ts +5 -5
- package/dist/lib/modules/NoteVersions.js +7 -7
- package/dist/lib/modules/Notes.d.ts +24 -29
- package/dist/lib/modules/Notes.js +45 -50
- package/dist/lib/modules/PoolVersions.d.ts +5 -5
- package/dist/lib/modules/PoolVersions.js +7 -7
- package/dist/lib/modules/Pools.d.ts +33 -41
- package/dist/lib/modules/Pools.js +58 -66
- package/dist/lib/modules/Popular.d.ts +7 -7
- package/dist/lib/modules/Popular.js +13 -11
- package/dist/lib/modules/PostApprovals.d.ts +9 -11
- package/dist/lib/modules/PostApprovals.js +15 -17
- package/dist/lib/modules/PostDisapprovals.d.ts +11 -9
- package/dist/lib/modules/PostDisapprovals.js +12 -13
- package/dist/lib/modules/PostEvents.d.ts +5 -5
- package/dist/lib/modules/PostEvents.js +13 -9
- package/dist/lib/modules/PostFlags.d.ts +26 -15
- package/dist/lib/modules/PostFlags.js +42 -23
- package/dist/lib/modules/PostReplacements.d.ts +20 -26
- package/dist/lib/modules/PostReplacements.js +36 -38
- package/dist/lib/modules/PostSets.d.ts +34 -42
- package/dist/lib/modules/PostSets.js +60 -68
- package/dist/lib/modules/PostVersions.d.ts +11 -14
- package/dist/lib/modules/PostVersions.js +19 -22
- package/dist/lib/modules/PostVotes.d.ts +33 -12
- package/dist/lib/modules/PostVotes.js +56 -17
- package/dist/lib/modules/Posts.d.ts +130 -70
- package/dist/lib/modules/Posts.js +215 -115
- package/dist/lib/modules/RelatedTags.d.ts +7 -7
- package/dist/lib/modules/RelatedTags.js +7 -7
- package/dist/lib/modules/SearchTrendBlacklists.d.ts +11 -28
- package/dist/lib/modules/SearchTrendBlacklists.js +15 -40
- package/dist/lib/modules/SearchTrends.d.ts +30 -19
- package/dist/lib/modules/SearchTrends.js +41 -22
- package/dist/lib/modules/StaffAutomodDMails.d.ts +55 -0
- package/dist/lib/modules/StaffAutomodDMails.js +98 -0
- package/dist/lib/modules/{users/DMails.d.ts → StaffDMails.d.ts} +8 -9
- package/dist/lib/modules/StaffDMails.js +54 -0
- package/dist/lib/modules/StaffExceptionLogs.d.ts +33 -0
- package/dist/lib/modules/StaffExceptionLogs.js +54 -0
- package/dist/lib/modules/StaffFiles.d.ts +72 -0
- package/dist/lib/modules/StaffFiles.js +121 -0
- package/dist/lib/modules/StaffNotes.d.ts +26 -31
- package/dist/lib/modules/StaffNotes.js +47 -52
- package/dist/lib/modules/StaffUserCleanups.d.ts +60 -0
- package/dist/lib/modules/StaffUserCleanups.js +124 -0
- package/dist/lib/modules/StaffUsers.d.ts +43 -0
- package/dist/lib/modules/StaffUsers.js +75 -0
- package/dist/lib/modules/StaffVoteTrends.d.ts +26 -0
- package/dist/lib/modules/StaffVoteTrends.js +39 -0
- package/dist/lib/modules/StaffWikiVersions.d.ts +33 -0
- package/dist/lib/modules/StaffWikiVersions.js +54 -0
- package/dist/lib/modules/StaffWikis.d.ts +94 -0
- package/dist/lib/modules/StaffWikis.js +165 -0
- package/dist/lib/modules/TagAliases.d.ts +26 -31
- package/dist/lib/modules/TagAliases.js +47 -52
- package/dist/lib/modules/TagCorrections.d.ts +6 -7
- package/dist/lib/modules/TagCorrections.js +12 -13
- package/dist/lib/modules/TagImplications.d.ts +26 -31
- package/dist/lib/modules/TagImplications.js +47 -52
- package/dist/lib/modules/TagTypeVersions.d.ts +5 -5
- package/dist/lib/modules/TagTypeVersions.js +7 -7
- package/dist/lib/modules/Tags.d.ts +23 -27
- package/dist/lib/modules/Tags.js +42 -46
- package/dist/lib/modules/Takedowns.d.ts +37 -45
- package/dist/lib/modules/Takedowns.js +59 -67
- package/dist/lib/modules/Tickets.d.ts +24 -28
- package/dist/lib/modules/Tickets.js +44 -48
- package/dist/lib/modules/UploadWhitelists.d.ts +21 -25
- package/dist/lib/modules/UploadWhitelists.js +37 -41
- package/dist/lib/modules/Uploads.d.ts +11 -13
- package/dist/lib/modules/Uploads.js +16 -18
- package/dist/lib/modules/UserFeedbacks.d.ts +28 -34
- package/dist/lib/modules/UserFeedbacks.js +52 -58
- package/dist/lib/modules/UserNameChangeRequests.d.ts +12 -15
- package/dist/lib/modules/UserNameChangeRequests.js +20 -23
- package/dist/lib/modules/Users.d.ts +56 -40
- package/dist/lib/modules/Users.js +91 -63
- package/dist/lib/modules/WikiPageVersions.d.ts +7 -8
- package/dist/lib/modules/WikiPageVersions.js +11 -12
- package/dist/lib/modules/WikiPages.d.ts +26 -31
- package/dist/lib/modules/WikiPages.js +47 -52
- package/dist/lib/modules/index.d.ts +39 -10
- package/dist/lib/modules/index.js +27 -5
- package/dist/lib/modules/posts/Format.d.ts +27 -0
- package/dist/lib/modules/posts/Format.js +17 -0
- package/dist/lib/standalone.d.ts +20 -0
- package/dist/lib/standalone.js +17 -0
- package/dist/lib/util.js +4 -10
- package/dist/lib/version.d.ts +2 -0
- package/dist/lib/version.js +3 -0
- package/package.json +34 -10
- package/tsconfig.json +2 -2
- package/dist/lib/generated/source.json +0 -19075
- package/dist/lib/models/Help.d.ts +0 -39
- package/dist/lib/models/Help.js +0 -57
- package/dist/lib/modules/admin/Users.d.ts +0 -45
- 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
- package/dist/package.json +0 -73
|
@@ -1,78 +1,117 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { postVotes_create, postVotes_delete, postVotes_destroy, postVotes_lock, postVotes_index } from "../generated/sdk.js";
|
|
3
3
|
import PostVote from "../models/PostVote.js";
|
|
4
4
|
import { OperationID } from "../util.js";
|
|
5
5
|
import Base from "./Base.js";
|
|
6
6
|
/** @category Modules */
|
|
7
7
|
export default class PostVotes extends Base {
|
|
8
|
+
static moduleKey = "postVotes";
|
|
9
|
+
/**
|
|
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
|
+
}
|
|
8
24
|
/**
|
|
9
|
-
* Delete Post Vote
|
|
10
25
|
*
|
|
11
26
|
* You must be Admin+. Errors if ids is not provided.
|
|
12
27
|
*
|
|
13
28
|
* @requiresApiKeyAuth
|
|
14
29
|
*
|
|
15
|
-
* @operationId {@link https://e621.wiki/#operations-Post_Votes-
|
|
30
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes\#delete post_votes#delete}
|
|
16
31
|
*
|
|
17
|
-
* @see {@link https://e621.wiki/#operations-Post_Votes-
|
|
32
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes\#delete Documentation} for more details.
|
|
18
33
|
*/
|
|
19
34
|
async delete(ids) {
|
|
20
|
-
return
|
|
35
|
+
return postVotes_delete({
|
|
21
36
|
client: this.client,
|
|
22
37
|
query: { ids: ids.join(",") },
|
|
23
38
|
}).then(res => this._handleResponse(res, 204, true));
|
|
24
39
|
}
|
|
25
40
|
/**
|
|
26
|
-
* Lock Post Votes
|
|
27
41
|
*
|
|
28
42
|
* You must be Moderator+. Errors if ids is not provided.
|
|
29
43
|
*
|
|
30
44
|
* @requiresApiKeyAuth
|
|
31
45
|
*
|
|
32
|
-
* @operationId {@link https://e621.wiki/#operations-Post_Votes-
|
|
46
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes\#lock post_votes#lock}
|
|
33
47
|
*
|
|
34
|
-
* @see {@link https://e621.wiki/#operations-Post_Votes-
|
|
48
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes\#lock Documentation} for more details.
|
|
35
49
|
*/
|
|
36
50
|
async lock(ids) {
|
|
37
|
-
return
|
|
51
|
+
return postVotes_lock({
|
|
38
52
|
client: this.client,
|
|
39
53
|
query: { ids: ids.join(",") },
|
|
40
54
|
}).then(res => this._handleResponse(res, 204, true));
|
|
41
55
|
}
|
|
42
56
|
/**
|
|
43
|
-
* Search Post Votes
|
|
44
57
|
*
|
|
45
58
|
* You must be Moderator+.
|
|
46
59
|
*
|
|
47
60
|
* @requiresApiKeyAuth
|
|
48
61
|
*
|
|
49
|
-
* @operationId {@link https://e621.wiki/#operations-Post_Votes-
|
|
62
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes\#index post_votes#index}
|
|
50
63
|
*
|
|
51
|
-
* @see {@link https://e621.wiki/#operations-Post_Votes-
|
|
64
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes\#index Documentation} for more details.
|
|
52
65
|
*/
|
|
53
66
|
async search(options) {
|
|
54
|
-
return
|
|
67
|
+
return postVotes_index({
|
|
55
68
|
client: this.client,
|
|
56
69
|
query: options,
|
|
57
70
|
}).then(res => this._handleResponse(res, 200, true, PostVote));
|
|
58
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @requiresApiKeyAuth
|
|
75
|
+
*
|
|
76
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Votes-post_votes\#destroy post_votes#destroy}
|
|
77
|
+
*
|
|
78
|
+
* @see {@link https://e621.wiki/#operations-Post_Votes-post_votes\#destroy Documentation} for more details.
|
|
79
|
+
*/
|
|
80
|
+
async unvote(id) {
|
|
81
|
+
return postVotes_destroy({
|
|
82
|
+
client: this.client,
|
|
83
|
+
path: { id },
|
|
84
|
+
}).then(res => this._handleResponse(res, 204, true));
|
|
85
|
+
}
|
|
59
86
|
}
|
|
60
87
|
__decorate([
|
|
61
|
-
OperationID("
|
|
88
|
+
OperationID("post_votes#create"),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [Number, Number, Boolean]),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], PostVotes.prototype, "create", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
OperationID("post_votes#delete"),
|
|
62
95
|
__metadata("design:type", Function),
|
|
63
96
|
__metadata("design:paramtypes", [Array]),
|
|
64
97
|
__metadata("design:returntype", Promise)
|
|
65
98
|
], PostVotes.prototype, "delete", null);
|
|
66
99
|
__decorate([
|
|
67
|
-
OperationID("
|
|
100
|
+
OperationID("post_votes#lock"),
|
|
68
101
|
__metadata("design:type", Function),
|
|
69
102
|
__metadata("design:paramtypes", [Array]),
|
|
70
103
|
__metadata("design:returntype", Promise)
|
|
71
104
|
], PostVotes.prototype, "lock", null);
|
|
72
105
|
__decorate([
|
|
73
|
-
OperationID("
|
|
106
|
+
OperationID("post_votes#index"),
|
|
74
107
|
__metadata("design:type", Function),
|
|
75
108
|
__metadata("design:paramtypes", [Object]),
|
|
76
109
|
__metadata("design:returntype", Promise)
|
|
77
110
|
], PostVotes.prototype, "search", null);
|
|
78
|
-
|
|
111
|
+
__decorate([
|
|
112
|
+
OperationID("post_votes#destroy"),
|
|
113
|
+
__metadata("design:type", Function),
|
|
114
|
+
__metadata("design:paramtypes", [Number]),
|
|
115
|
+
__metadata("design:returntype", Promise)
|
|
116
|
+
], PostVotes.prototype, "unvote", null);
|
|
117
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9zdFZvdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL21vZHVsZXMvUG9zdFZvdGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsZ0JBQWdCLEVBQUUsaUJBQWlCLEVBQUUsY0FBYyxFQUFFLGVBQWUsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzdILE9BQU8sUUFBUSxNQUFNLHVCQUF1QixDQUFDO0FBQzdDLE9BQU8sRUFBZSxXQUFXLEVBQWtELE1BQU0sWUFBWSxDQUFDO0FBRXRHLE9BQU8sSUFBSSxNQUFNLFdBQVcsQ0FBQztBQVc3Qix3QkFBd0I7QUFDeEIsTUFBTSxDQUFDLE9BQU8sT0FBTyxTQUFVLFNBQVEsSUFBSTtJQUN2QyxNQUFNLENBQVUsU0FBUyxHQUFHLFdBQW9CLENBQUM7SUFDakQ7Ozs7Ozs7T0FPQTtJQUVNLEFBQU4sS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFVLEVBQUUsS0FBb0IsRUFBRSxTQUFtQjtRQUM5RCxPQUFPLGdCQUFnQixDQUFDO1lBQ3BCLE1BQU0sRUFBRSxJQUFJLENBQUMsTUFBTTtZQUNuQixJQUFJLEVBQUUsRUFBRSxFQUFFLEVBQUU7WUFDWixLQUFLLEVBQUUsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFO1NBQzlCLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsZUFBZSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQztJQUN6RCxDQUFDO0lBRUQ7Ozs7Ozs7OztPQVNBO0lBRU0sQUFBTixLQUFLLENBQUMsTUFBTSxDQUFDLEdBQWtCO1FBQzNCLE9BQU8sZ0JBQWdCLENBQUM7WUFDcEIsTUFBTSxFQUFFLElBQUksQ0FBQyxNQUFNO1lBQ25CLEtBQUssRUFBRSxFQUFFLEdBQUcsRUFBRSxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFO1NBQ2hDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsZUFBZSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQztJQUN6RCxDQUFDO0lBRUQ7Ozs7Ozs7OztPQVNBO0lBRU0sQUFBTixLQUFLLENBQUMsSUFBSSxDQUFDLEdBQWtCO1FBQ3pCLE9BQU8sY0FBYyxDQUFDO1lBQ2xCLE1BQU0sRUFBRSxJQUFJLENBQUMsTUFBTTtZQUNuQixLQUFLLEVBQUUsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRTtTQUNoQyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLElBQUksQ0FBQyxDQUFDLENBQUM7SUFDekQsQ0FBQztJQUVEOzs7Ozs7Ozs7T0FTQTtJQUVNLEFBQU4sS0FBSyxDQUFDLE1BQU0sQ0FBQyxPQUFnQztRQUN6QyxPQUFPLGVBQWUsQ0FBQztZQUNuQixNQUFNLEVBQUUsSUFBSSxDQUFDLE1BQU07WUFDbkIsS0FBSyxFQUFFLE9BQU87U0FDakIsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsR0FBRyxFQUFFLEdBQUcsRUFBRSxJQUFJLEVBQUUsUUFBUSxDQUFDLENBQUMsQ0FBQztJQUNuRSxDQUFDO0lBRUQ7Ozs7Ozs7T0FPQTtJQUVNLEFBQU4sS0FBSyxDQUFDLE1BQU0sQ0FBQyxFQUFVO1FBQ25CLE9BQU8saUJBQWlCLENBQUM7WUFDckIsTUFBTSxFQUFFLElBQUksQ0FBQyxNQUFNO1lBQ25CLElBQUksRUFBRSxFQUFFLEVBQUUsRUFBRTtTQUNmLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsZUFBZSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQztJQUN6RCxDQUFDOztBQTVFSztJQURSLFdBQVcsQ0FBQyxtQkFBbUIsQ0FBQzs7Ozt1Q0FPN0I7QUFhSztJQURSLFdBQVcsQ0FBQyxtQkFBbUIsQ0FBQzs7cUNBQ1osS0FBSzs7dUNBS3RCO0FBYUs7SUFEUixXQUFXLENBQUMsaUJBQWlCLENBQUM7O3FDQUNaLEtBQUs7O3FDQUtwQjtBQWFLO0lBRFIsV0FBVyxDQUFDLGtCQUFrQixDQUFDOzs7O3VDQU01QjtBQVdLO0lBRFIsV0FBVyxDQUFDLG9CQUFvQixDQUFDOzs7O3VDQU05QiJ9
|
|
@@ -1,204 +1,264 @@
|
|
|
1
|
+
import MinimalUser from "../models/MinimalUser.js";
|
|
1
2
|
import Post from "../models/Post.js";
|
|
2
|
-
import
|
|
3
|
+
import ThumbnailPost from "../models/ThumbnailPost.js";
|
|
4
|
+
import { type TransformDataBodyToOptions, type TransformDataQueryToOptions } from "../util.js";
|
|
3
5
|
import Base from "./Base.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import type { DeletePostData, GetPostInSequenceData, GetRecommendedPostsData, ListPostFavoritesData, MovePostFavoritesData, RecommendedPosts, SearchPostsData } from "../generated/types.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";
|
|
7
8
|
/** @category Modules/Types */
|
|
8
|
-
export interface DeletePostOptions extends TransformDataBodyToOptions<
|
|
9
|
+
export interface DeletePostOptions extends TransformDataBodyToOptions<StaffPostPostsDeleteData> {
|
|
9
10
|
}
|
|
10
11
|
/** @category Modules/Types */
|
|
11
|
-
export interface MovePostFavoritesOptions extends TransformDataBodyToOptions<
|
|
12
|
+
export interface MovePostFavoritesOptions extends TransformDataBodyToOptions<StaffPostPostsMoveFavoritesData> {
|
|
12
13
|
}
|
|
13
14
|
/** @category Modules/Types */
|
|
14
|
-
export interface SearchPostsOptions extends TransformDataQueryToOptions<
|
|
15
|
+
export interface SearchPostsOptions extends TransformDataQueryToOptions<PostsIndexData> {
|
|
15
16
|
}
|
|
16
17
|
/** @category Modules/Types */
|
|
17
|
-
export interface ListPostFavoritesOptions extends TransformDataQueryToOptions<
|
|
18
|
+
export interface ListPostFavoritesOptions extends TransformDataQueryToOptions<PostFavoritesIndexData> {
|
|
18
19
|
}
|
|
19
20
|
/** @category Modules/Types */
|
|
20
|
-
export interface
|
|
21
|
+
export interface GetRandomPostOptions extends TransformDataQueryToOptions<PostsRandomData> {
|
|
21
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
|
+
}
|
|
35
|
+
/** @category Modules/Types */
|
|
36
|
+
export interface UpdatePostIqdbOptions extends TransformDataQueryToOptions<PostsUpdateIqdbData> {
|
|
37
|
+
}
|
|
38
|
+
/** @category Modules/Types */
|
|
39
|
+
export interface RecommendedPostsOptions extends TransformDataQueryToOptions<PostRecommendationsArtistData> {
|
|
40
|
+
}
|
|
41
|
+
/** @category Modules/Types */
|
|
42
|
+
export interface ReownPostOptions extends TransformDataBodyToOptions<StaffPostPostsReownerData> {
|
|
43
|
+
}
|
|
44
|
+
/** @category Modules/Types */
|
|
45
|
+
export interface PostPreviousOwner {
|
|
46
|
+
id: number;
|
|
47
|
+
name: string;
|
|
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"]>>;
|
|
22
60
|
/** @category Modules */
|
|
23
61
|
export default class Posts extends Base {
|
|
24
|
-
|
|
25
|
-
votes: PostVotes;
|
|
62
|
+
static readonly moduleKey: "posts";
|
|
26
63
|
/**
|
|
27
|
-
* AI Check Post
|
|
28
64
|
*
|
|
29
65
|
* You must be Janitor+.
|
|
30
66
|
*
|
|
31
67
|
* @requiresApiKeyAuth
|
|
32
68
|
*
|
|
33
|
-
* @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}
|
|
34
70
|
*
|
|
35
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
71
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#ai_check Documentation} for more details.
|
|
36
72
|
*/
|
|
37
73
|
aiCheck(id: number): Promise<string>;
|
|
38
74
|
/**
|
|
39
|
-
* Copy Notes To Post
|
|
40
75
|
*
|
|
41
76
|
* @requiresApiKeyAuth
|
|
42
77
|
*
|
|
43
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
78
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#copy_notes posts#copy_notes}
|
|
44
79
|
*
|
|
45
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
80
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#copy_notes Documentation} for more details.
|
|
46
81
|
*/
|
|
47
82
|
copyNotes(id: number, other_post_id: number): Promise<null>;
|
|
48
83
|
/**
|
|
49
|
-
* Delete Post
|
|
50
84
|
*
|
|
51
85
|
* You must have the "Approve Posts" permission. `commit=Delete` must be set.
|
|
52
86
|
*
|
|
53
87
|
* @requiresApiKeyAuth
|
|
54
88
|
*
|
|
55
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
89
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts\#delete staff/post/posts#delete}
|
|
56
90
|
*
|
|
57
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
91
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#delete Documentation} for more details.
|
|
58
92
|
*/
|
|
59
93
|
delete(id: number, options: DeletePostOptions): Promise<unknown>;
|
|
60
94
|
/**
|
|
61
|
-
* Expunge Post
|
|
62
95
|
*
|
|
63
96
|
* You must have the "Approve Posts" permission and be Admin+.
|
|
64
97
|
*
|
|
65
98
|
* @requiresApiKeyAuth
|
|
66
99
|
*
|
|
67
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
100
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts\#expunge staff/post/posts#expunge}
|
|
68
101
|
*
|
|
69
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
102
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#expunge Documentation} for more details.
|
|
70
103
|
*/
|
|
71
104
|
expunge(id: number, reason: string): Promise<Post>;
|
|
72
105
|
/**
|
|
73
|
-
* List Post Favorites
|
|
74
106
|
*
|
|
75
107
|
* You must be the user or Moderator+ to see users that have their favorites hidden.
|
|
76
108
|
*
|
|
77
|
-
* @operationId {@link https://e621.wiki/#operations-
|
|
109
|
+
* @operationId {@link https://e621.wiki/#operations-Post_Favorites-post_favorites\#index post_favorites#index}
|
|
78
110
|
*
|
|
79
|
-
* @see {@link https://e621.wiki/#operations-
|
|
111
|
+
* @see {@link https://e621.wiki/#operations-Post_Favorites-post_favorites\#index Documentation} for more details.
|
|
80
112
|
*/
|
|
81
|
-
favorites(id: number, options: ListPostFavoritesOptions): Promise<Array<
|
|
113
|
+
favorites(id: number, options: ListPostFavoritesOptions): Promise<Array<MinimalUser>>;
|
|
82
114
|
/**
|
|
83
|
-
* Get Post
|
|
84
115
|
*
|
|
85
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
116
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#show posts#show}
|
|
86
117
|
*
|
|
87
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
118
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#show Documentation} for more details.
|
|
88
119
|
*/
|
|
89
|
-
get(id: number): Promise<
|
|
120
|
+
get<const O extends GetPostOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]> | null>;
|
|
90
121
|
/**
|
|
91
|
-
* Mark Post As Translated
|
|
92
122
|
*
|
|
93
123
|
* Will error if no body is provided.
|
|
94
124
|
*
|
|
95
125
|
* @requiresApiKeyAuth
|
|
96
126
|
*
|
|
97
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
127
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#mark_as_translated posts#mark_as_translated}
|
|
98
128
|
*
|
|
99
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
129
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#mark_as_translated Documentation} for more details.
|
|
100
130
|
*/
|
|
101
|
-
markTranslated(id: number): Promise<
|
|
131
|
+
markTranslated<const O extends MarkPostAsTranslatedOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
102
132
|
/**
|
|
103
|
-
* Move Post Favorites
|
|
104
133
|
*
|
|
105
134
|
* You must have the "Approve Posts" permission. `commit=Submit`` must be set.
|
|
106
135
|
*
|
|
107
136
|
* @requiresApiKeyAuth
|
|
108
137
|
*
|
|
109
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
138
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts\#move_favorites staff/post/posts#move_favorites}
|
|
110
139
|
*
|
|
111
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
140
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#move_favorites Documentation} for more details.
|
|
112
141
|
*/
|
|
113
142
|
moveFavorites(id: number, options: MovePostFavoritesOptions): Promise<unknown>;
|
|
114
143
|
/**
|
|
115
|
-
* Get Random Post
|
|
116
144
|
*
|
|
117
|
-
*
|
|
145
|
+
* You must be an Approver
|
|
146
|
+
*
|
|
147
|
+
* @requiresApiKeyAuth
|
|
148
|
+
*
|
|
149
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts\#previous_owners staff/post/posts#previous_owners}
|
|
150
|
+
*
|
|
151
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#previous_owners Documentation} for more details.
|
|
152
|
+
*/
|
|
153
|
+
previousOwners(id: number): Promise<Array<PostPreviousOwner>>;
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#random posts#random}
|
|
118
157
|
*
|
|
119
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
158
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#random Documentation} for more details.
|
|
120
159
|
*/
|
|
121
|
-
random(
|
|
160
|
+
random<const O extends GetRandomPostOptions = NoV2Options>(options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
122
161
|
/**
|
|
123
|
-
* Get Recommended Posts
|
|
124
162
|
*
|
|
125
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
163
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-post_recommendations\#artist post_recommendations#artist}
|
|
126
164
|
*
|
|
127
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
165
|
+
* @see {@link https://e621.wiki/#operations-Posts-post_recommendations\#artist Documentation} for more details.
|
|
128
166
|
*/
|
|
129
|
-
|
|
167
|
+
recommendedByArtist(id: number, options?: RecommendedPostsOptions): Promise<RecommendedPostsResult>;
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-post_recommendations\#tags post_recommendations#tags}
|
|
171
|
+
*
|
|
172
|
+
* @see {@link https://e621.wiki/#operations-Posts-post_recommendations\#tags Documentation} for more details.
|
|
173
|
+
*/
|
|
174
|
+
recommendedByTags(id: number, options?: RecommendedPostsOptions): Promise<RecommendedPostsResult>;
|
|
130
175
|
/**
|
|
131
|
-
* Regenerate Post Thumbnails
|
|
132
176
|
*
|
|
133
177
|
* You must be Janitor+.
|
|
134
178
|
*
|
|
135
179
|
* @requiresApiKeyAuth
|
|
136
180
|
*
|
|
137
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
181
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts\#regenerate_thumbnails staff/post/posts#regenerate_thumbnails}
|
|
138
182
|
*
|
|
139
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
183
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#regenerate_thumbnails Documentation} for more details.
|
|
140
184
|
*/
|
|
141
185
|
regenerateThumbnails(id: number): Promise<Post>;
|
|
142
186
|
/**
|
|
143
|
-
* Regenerate Post Videos
|
|
144
187
|
*
|
|
145
188
|
* You must be Janitor+.
|
|
146
189
|
*
|
|
147
190
|
* @requiresApiKeyAuth
|
|
148
191
|
*
|
|
149
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
192
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts\#regenerate_videos staff/post/posts#regenerate_videos}
|
|
150
193
|
*
|
|
151
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
194
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#regenerate_videos Documentation} for more details.
|
|
152
195
|
*/
|
|
153
196
|
regenerateVideos(id: number): Promise<null>;
|
|
154
197
|
/**
|
|
155
|
-
*
|
|
198
|
+
*
|
|
199
|
+
* You must have be Janitor+ and an Approver
|
|
200
|
+
*
|
|
201
|
+
* @requiresApiKeyAuth
|
|
202
|
+
*
|
|
203
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts\#reowner staff/post/posts#reowner}
|
|
204
|
+
*
|
|
205
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#reowner Documentation} for more details.
|
|
206
|
+
*/
|
|
207
|
+
reown(id: number, options: ReownPostOptions): Promise<string>;
|
|
208
|
+
/**
|
|
156
209
|
*
|
|
157
210
|
* @requiresApiKeyAuth
|
|
158
211
|
*
|
|
159
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
212
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#revert posts#revert}
|
|
160
213
|
*
|
|
161
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
214
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#revert Documentation} for more details.
|
|
162
215
|
*/
|
|
163
216
|
revert(id: number, version_id: number): Promise<null>;
|
|
164
217
|
/**
|
|
165
|
-
* Search Posts
|
|
166
218
|
*
|
|
167
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
219
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#index posts#index}
|
|
168
220
|
*
|
|
169
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
221
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#index Documentation} for more details.
|
|
170
222
|
*/
|
|
171
|
-
search(options?:
|
|
223
|
+
search<const O extends SearchPostsOptions = NoV2Options>(options?: O): Promise<PostSearchResult<O>>;
|
|
172
224
|
/**
|
|
173
|
-
* Get Post In Sequence
|
|
174
225
|
*
|
|
175
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
226
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#show_seq posts#show_seq}
|
|
176
227
|
*
|
|
177
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
228
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#show_seq Documentation} for more details.
|
|
178
229
|
*/
|
|
179
|
-
sequence(id: number,
|
|
230
|
+
sequence<const O extends GetPostInSequenceOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
180
231
|
/**
|
|
181
|
-
* Undelete Post
|
|
182
232
|
*
|
|
183
233
|
* You must have the "Approve Posts" permission.
|
|
184
234
|
*
|
|
185
235
|
* @requiresApiKeyAuth
|
|
186
236
|
*
|
|
187
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
237
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-staff/post/posts\#undelete staff/post/posts#undelete}
|
|
188
238
|
*
|
|
189
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
239
|
+
* @see {@link https://e621.wiki/#operations-Posts-staff/post/posts\#undelete Documentation} for more details.
|
|
190
240
|
*/
|
|
191
241
|
undelete(id: number): Promise<Post>;
|
|
192
242
|
/**
|
|
193
|
-
*
|
|
243
|
+
*
|
|
244
|
+
* Most errors are silently swallowed.
|
|
245
|
+
*
|
|
246
|
+
* @requiresApiKeyAuth
|
|
247
|
+
*
|
|
248
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#update posts#update}
|
|
249
|
+
*
|
|
250
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#update Documentation} for more details.
|
|
251
|
+
*/
|
|
252
|
+
update<const O extends UpdatePostOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
253
|
+
/**
|
|
194
254
|
*
|
|
195
255
|
* You must be Admin+.
|
|
196
256
|
*
|
|
197
257
|
* @requiresApiKeyAuth
|
|
198
258
|
*
|
|
199
|
-
* @operationId {@link https://e621.wiki/#operations-Posts-
|
|
259
|
+
* @operationId {@link https://e621.wiki/#operations-Posts-posts\#update_iqdb posts#update_iqdb}
|
|
200
260
|
*
|
|
201
|
-
* @see {@link https://e621.wiki/#operations-Posts-
|
|
261
|
+
* @see {@link https://e621.wiki/#operations-Posts-posts\#update_iqdb Documentation} for more details.
|
|
202
262
|
*/
|
|
203
|
-
updateIqdb(id: number): Promise<
|
|
263
|
+
updateIqdb<const O extends UpdatePostIqdbOptions = NoV2Options>(id: number, options?: O): Promise<PostFormat<O["v2"], O["mode"]>>;
|
|
204
264
|
}
|