e621 3.0.3 → 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/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/source.json +9210 -5616
- package/dist/lib/generated/types.d.ts +6241 -4549
- 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 +26 -26
- package/dist/lib/models/AvoidPosting.d.ts +15 -15
- package/dist/lib/models/AvoidPosting.js +25 -25
- package/dist/lib/models/BasicPost.d.ts +14 -0
- package/dist/lib/models/BasicPost.js +17 -0
- package/dist/lib/models/Blip.d.ts +22 -22
- package/dist/lib/models/Blip.js +33 -33
- package/dist/lib/models/BulkUpdateRequest.d.ts +11 -11
- package/dist/lib/models/BulkUpdateRequest.js +20 -20
- package/dist/lib/models/Comment.d.ts +28 -28
- package/dist/lib/models/Comment.js +42 -42
- 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 +28 -10
- 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 -2
- package/dist/lib/models/EmailBlacklist.js +4 -4
- 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 +40 -29
- package/dist/lib/models/ForumPost.js +59 -41
- package/dist/lib/models/ForumPostVote.d.ts +2 -2
- package/dist/lib/models/ForumPostVote.js +5 -5
- package/dist/lib/models/ForumTopic.d.ts +21 -21
- package/dist/lib/models/ForumTopic.js +34 -34
- 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 +4 -4
- package/dist/lib/models/Mascot.d.ts +7 -7
- package/dist/lib/models/Mascot.js +11 -11
- package/dist/lib/models/MinimalUser.d.ts +14 -0
- package/dist/lib/models/MinimalUser.js +17 -0
- package/dist/lib/models/NewsUpdate.d.ts +7 -7
- package/dist/lib/models/NewsUpdate.js +11 -11
- package/dist/lib/models/Note.d.ts +11 -11
- package/dist/lib/models/Note.js +20 -20
- package/dist/lib/models/NoteVersion.d.ts +2 -2
- package/dist/lib/models/NoteVersion.js +4 -4
- package/dist/lib/models/Pool.d.ts +18 -18
- package/dist/lib/models/Pool.js +31 -31
- package/dist/lib/models/PoolVersion.d.ts +2 -2
- package/dist/lib/models/PoolVersion.js +4 -4
- 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 -2
- package/dist/lib/models/PostApproval.js +4 -4
- package/dist/lib/models/PostFlag.d.ts +4 -4
- package/dist/lib/models/PostFlag.js +8 -8
- package/dist/lib/models/PostReplacement.d.ts +10 -10
- package/dist/lib/models/PostReplacement.js +16 -16
- package/dist/lib/models/PostSet.d.ts +17 -17
- package/dist/lib/models/PostSet.js +28 -28
- package/dist/lib/models/PostVersion.d.ts +8 -8
- package/dist/lib/models/PostVersion.js +13 -13
- package/dist/lib/models/PostVote.d.ts +7 -7
- package/dist/lib/models/PostVote.js +12 -12
- 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 +21 -21
- 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 +30 -30
- package/dist/lib/models/TagAlias.d.ts +13 -13
- package/dist/lib/models/TagAlias.js +22 -22
- package/dist/lib/models/TagImplication.d.ts +13 -13
- package/dist/lib/models/TagImplication.js +22 -22
- package/dist/lib/models/Takedown.d.ts +20 -20
- package/dist/lib/models/Takedown.js +29 -29
- 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 +22 -22
- package/dist/lib/models/UploadWhitelist.d.ts +7 -7
- package/dist/lib/models/UploadWhitelist.js +11 -11
- package/dist/lib/models/User.d.ts +28 -16
- package/dist/lib/models/User.js +44 -24
- package/dist/lib/models/UserFeedback.d.ts +13 -13
- package/dist/lib/models/UserFeedback.js +23 -23
- package/dist/lib/models/UserNameChangeRequest.d.ts +2 -2
- package/dist/lib/models/UserNameChangeRequest.js +4 -4
- package/dist/lib/models/WikiPage.d.ts +13 -13
- package/dist/lib/models/WikiPage.js +22 -22
- package/dist/lib/models/WikiPageVersion.d.ts +2 -2
- package/dist/lib/models/WikiPageVersion.js +4 -4
- 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 +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 +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 +33 -33
- package/dist/lib/modules/Artists.js +54 -54
- package/dist/lib/modules/AvoidPostingVersions.d.ts +5 -5
- package/dist/lib/modules/AvoidPostingVersions.js +7 -7
- package/dist/lib/modules/AvoidPostings.d.ts +35 -55
- package/dist/lib/modules/AvoidPostings.js +57 -75
- package/dist/lib/modules/Bans.d.ts +7 -7
- package/dist/lib/modules/Bans.js +11 -11
- package/dist/lib/modules/Base.d.ts +2 -2
- package/dist/lib/modules/Base.js +3 -3
- package/dist/lib/modules/Blips.d.ts +35 -35
- package/dist/lib/modules/Blips.js +60 -58
- package/dist/lib/modules/BulkUpdateRequests.d.ts +27 -27
- package/dist/lib/modules/BulkUpdateRequests.js +48 -48
- package/dist/lib/modules/CommentVotes.d.ts +47 -4
- package/dist/lib/modules/CommentVotes.js +77 -10
- package/dist/lib/modules/Comments.d.ts +35 -37
- package/dist/lib/modules/Comments.js +58 -60
- package/dist/lib/modules/DMails.d.ts +25 -15
- package/dist/lib/modules/DMails.js +37 -27
- package/dist/lib/modules/DText.d.ts +5 -5
- package/dist/lib/modules/DText.js +6 -6
- 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 -8
- package/dist/lib/modules/EditHistories.js +11 -11
- package/dist/lib/modules/EmailBlacklists.d.ts +10 -10
- package/dist/lib/modules/EmailBlacklists.js +16 -16
- package/dist/lib/modules/Favorites.d.ts +17 -17
- package/dist/lib/modules/Favorites.js +22 -20
- package/dist/lib/modules/ForumPostVotes.d.ts +42 -0
- package/dist/lib/modules/ForumPostVotes.js +73 -0
- package/dist/lib/modules/ForumPosts.d.ts +33 -35
- package/dist/lib/modules/ForumPosts.js +56 -58
- package/dist/lib/modules/ForumTopics.d.ts +37 -42
- package/dist/lib/modules/ForumTopics.js +62 -76
- package/dist/lib/modules/Health.d.ts +12 -0
- package/dist/lib/modules/Health.js +26 -0
- package/dist/lib/modules/HelpPages.d.ts +30 -24
- package/dist/lib/modules/HelpPages.js +61 -45
- package/dist/lib/modules/IpBans.d.ts +10 -10
- package/dist/lib/modules/IpBans.js +16 -16
- package/dist/lib/modules/IqdbQueries.d.ts +13 -12
- package/dist/lib/modules/IqdbQueries.js +24 -16
- package/dist/lib/modules/Mascots.d.ts +20 -20
- package/dist/lib/modules/Mascots.js +34 -34
- package/dist/lib/modules/ModActions.d.ts +7 -7
- package/dist/lib/modules/ModActions.js +11 -11
- package/dist/lib/modules/NewsUpdates.d.ts +20 -20
- package/dist/lib/modules/NewsUpdates.js +36 -36
- package/dist/lib/modules/NoteVersions.d.ts +5 -5
- package/dist/lib/modules/NoteVersions.js +7 -7
- package/dist/lib/modules/Notes.d.ts +25 -25
- package/dist/lib/modules/Notes.js +46 -46
- package/dist/lib/modules/PoolVersions.d.ts +5 -5
- package/dist/lib/modules/PoolVersions.js +7 -7
- package/dist/lib/modules/Pools.d.ts +34 -34
- package/dist/lib/modules/Pools.js +59 -59
- 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 -9
- package/dist/lib/modules/PostApprovals.js +15 -15
- package/dist/lib/modules/PostDisapprovals.d.ts +11 -8
- package/dist/lib/modules/PostDisapprovals.js +12 -12
- package/dist/lib/modules/PostEvents.d.ts +5 -5
- package/dist/lib/modules/PostEvents.js +13 -9
- package/dist/lib/modules/PostFlags.d.ts +27 -12
- package/dist/lib/modules/PostFlags.js +43 -20
- package/dist/lib/modules/PostReplacements.d.ts +20 -20
- package/dist/lib/modules/PostReplacements.js +36 -32
- package/dist/lib/modules/PostSets.d.ts +35 -35
- package/dist/lib/modules/PostSets.js +61 -61
- package/dist/lib/modules/PostVersions.d.ts +11 -11
- package/dist/lib/modules/PostVersions.js +19 -19
- package/dist/lib/modules/PostVotes.d.ts +36 -11
- package/dist/lib/modules/PostVotes.js +59 -16
- package/dist/lib/modules/Posts.d.ts +136 -56
- package/dist/lib/modules/Posts.js +221 -101
- package/dist/lib/modules/RelatedTags.d.ts +6 -6
- package/dist/lib/modules/RelatedTags.js +6 -6
- package/dist/lib/modules/SearchTrendBlacklists.d.ts +11 -26
- package/dist/lib/modules/SearchTrendBlacklists.js +15 -38
- package/dist/lib/modules/SearchTrends.d.ts +31 -16
- package/dist/lib/modules/SearchTrends.js +42 -19
- package/dist/lib/modules/StaffNotes.d.ts +27 -27
- package/dist/lib/modules/StaffNotes.js +48 -48
- package/dist/lib/modules/TagAliases.d.ts +27 -27
- package/dist/lib/modules/TagAliases.js +48 -48
- package/dist/lib/modules/TagCorrections.d.ts +5 -5
- package/dist/lib/modules/TagCorrections.js +11 -11
- package/dist/lib/modules/TagImplications.d.ts +27 -27
- package/dist/lib/modules/TagImplications.js +48 -48
- package/dist/lib/modules/TagTypeVersions.d.ts +5 -5
- package/dist/lib/modules/TagTypeVersions.js +7 -7
- package/dist/lib/modules/Tags.d.ts +24 -24
- package/dist/lib/modules/Tags.js +43 -43
- package/dist/lib/modules/Takedowns.d.ts +39 -39
- package/dist/lib/modules/Takedowns.js +60 -60
- package/dist/lib/modules/Tickets.d.ts +26 -26
- package/dist/lib/modules/Tickets.js +45 -45
- package/dist/lib/modules/UploadWhitelists.d.ts +22 -22
- package/dist/lib/modules/UploadWhitelists.js +38 -38
- package/dist/lib/modules/Uploads.d.ts +11 -11
- package/dist/lib/modules/Uploads.js +16 -16
- package/dist/lib/modules/UserFeedbacks.d.ts +30 -30
- package/dist/lib/modules/UserFeedbacks.js +53 -53
- package/dist/lib/modules/UserNameChangeRequests.d.ts +12 -12
- package/dist/lib/modules/UserNameChangeRequests.js +20 -20
- package/dist/lib/modules/Users.d.ts +58 -30
- package/dist/lib/modules/Users.js +93 -53
- package/dist/lib/modules/WikiPageVersions.d.ts +7 -7
- package/dist/lib/modules/WikiPageVersions.js +11 -11
- package/dist/lib/modules/WikiPages.d.ts +27 -27
- package/dist/lib/modules/WikiPages.js +48 -48
- package/dist/lib/modules/index.d.ts +41 -10
- package/dist/lib/modules/index.js +29 -5
- 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/package.json +7 -7
- package/package.json +7 -7
- package/tsconfig.json +1 -1
- 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,31 +1,29 @@
|
|
|
1
1
|
import ForumPost from "../models/ForumPost.js";
|
|
2
2
|
import { type ExtractValue, type TransformDataBodyToOptions, type TransformDataQueryToOptions, GetResponse } from "../util.js";
|
|
3
3
|
import Base from "./Base.js";
|
|
4
|
-
import
|
|
5
|
-
import type { CreateForumPostData, EditForumPostData, MarkForumPostData, MarkForumPostResponses, SearchForumPostsData } from "../generated/types.js";
|
|
4
|
+
import type { ForumPostsCreateData, ForumPostsUpdateData, ForumPostsWarningData, ForumPostsWarningResponses, ForumPostsIndexData } from "../generated/types.js";
|
|
6
5
|
/** @category Modules/Types */
|
|
7
|
-
export interface CreateForumPostOptions extends TransformDataBodyToOptions<
|
|
6
|
+
export interface CreateForumPostOptions extends TransformDataBodyToOptions<ForumPostsCreateData> {
|
|
8
7
|
}
|
|
9
8
|
/** @category Modules/Types */
|
|
10
|
-
export interface
|
|
9
|
+
export interface UpdateForumPostOptions extends TransformDataBodyToOptions<ForumPostsUpdateData> {
|
|
11
10
|
}
|
|
12
11
|
/** @category Modules/Types */
|
|
13
|
-
export interface SearchForumPostsOptions extends TransformDataQueryToOptions<
|
|
12
|
+
export interface SearchForumPostsOptions extends TransformDataQueryToOptions<ForumPostsIndexData> {
|
|
14
13
|
}
|
|
15
14
|
/** @category Modules/Types */
|
|
16
|
-
export interface
|
|
15
|
+
export interface ForumPostsWarningResponse extends GetResponse<ForumPostsWarningResponses, 200> {
|
|
17
16
|
}
|
|
18
17
|
/** @category Modules */
|
|
19
18
|
export default class ForumPosts extends Base {
|
|
20
|
-
votes: ForumPostVotes;
|
|
21
19
|
/**
|
|
22
20
|
* Create Forum Post
|
|
23
21
|
*
|
|
24
22
|
* @requiresApiKeyAuth
|
|
25
23
|
*
|
|
26
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
24
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#create forum_posts#create}
|
|
27
25
|
*
|
|
28
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
26
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#create Documentation} for more details.
|
|
29
27
|
*/
|
|
30
28
|
create(options: CreateForumPostOptions): Promise<ForumPost>;
|
|
31
29
|
/**
|
|
@@ -35,31 +33,19 @@ export default class ForumPosts extends Base {
|
|
|
35
33
|
*
|
|
36
34
|
* @requiresApiKeyAuth
|
|
37
35
|
*
|
|
38
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
36
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#destroy forum_posts#destroy}
|
|
39
37
|
*
|
|
40
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
38
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#destroy Documentation} for more details.
|
|
41
39
|
*/
|
|
42
40
|
delete(id: number): Promise<null>;
|
|
43
|
-
/**
|
|
44
|
-
* Edit Forum Post
|
|
45
|
-
*
|
|
46
|
-
* You must be the creator of the forum post, or Admin+ to edit. Marked forum posts cannot be edited.
|
|
47
|
-
*
|
|
48
|
-
* @requiresApiKeyAuth
|
|
49
|
-
*
|
|
50
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-editForumPost editForumPost}
|
|
51
|
-
*
|
|
52
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-editForumPost Documentation} for more details.
|
|
53
|
-
*/
|
|
54
|
-
edit(id: number, options: EditForumPostOptions): Promise<null>;
|
|
55
41
|
/**
|
|
56
42
|
* Get Forum Post
|
|
57
43
|
*
|
|
58
44
|
* If the forum post is hidden, you must be the creator or Moderator+ to see it.
|
|
59
45
|
*
|
|
60
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
46
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#show forum_posts#show}
|
|
61
47
|
*
|
|
62
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
48
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#show Documentation} for more details.
|
|
63
49
|
*/
|
|
64
50
|
get(id: number): Promise<ForumPost | null>;
|
|
65
51
|
/**
|
|
@@ -69,9 +55,9 @@ export default class ForumPosts extends Base {
|
|
|
69
55
|
*
|
|
70
56
|
* @requiresApiKeyAuth
|
|
71
57
|
*
|
|
72
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
58
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#hide forum_posts#hide}
|
|
73
59
|
*
|
|
74
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
60
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#hide Documentation} for more details.
|
|
75
61
|
*/
|
|
76
62
|
hide(id: number): Promise<ForumPost>;
|
|
77
63
|
/**
|
|
@@ -82,17 +68,17 @@ export default class ForumPosts extends Base {
|
|
|
82
68
|
*
|
|
83
69
|
* @requiresApiKeyAuth
|
|
84
70
|
*
|
|
85
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
71
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#warning forum_posts#warning}
|
|
86
72
|
*
|
|
87
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
73
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#warning Documentation} for more details.
|
|
88
74
|
*/
|
|
89
|
-
mark(id: number, type: ExtractValue<"record_type",
|
|
75
|
+
mark(id: number, type: ExtractValue<"record_type", ForumPostsWarningData>): Promise<ForumPostsWarningResponse>;
|
|
90
76
|
/**
|
|
91
|
-
*
|
|
77
|
+
* Forum Posts Index
|
|
92
78
|
*
|
|
93
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
79
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#index forum_posts#index}
|
|
94
80
|
*
|
|
95
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
81
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#index Documentation} for more details.
|
|
96
82
|
*/
|
|
97
83
|
search(options?: SearchForumPostsOptions): Promise<Array<ForumPost>>;
|
|
98
84
|
/**
|
|
@@ -102,9 +88,21 @@ export default class ForumPosts extends Base {
|
|
|
102
88
|
*
|
|
103
89
|
* @requiresApiKeyAuth
|
|
104
90
|
*
|
|
105
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
91
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#unhide forum_posts#unhide}
|
|
106
92
|
*
|
|
107
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
93
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#unhide Documentation} for more details.
|
|
108
94
|
*/
|
|
109
95
|
unhide(id: number): Promise<ForumPost>;
|
|
96
|
+
/**
|
|
97
|
+
* Update Forum Post
|
|
98
|
+
*
|
|
99
|
+
* You must be the creator of the forum post, or Admin+ to edit. Marked forum posts cannot be edited.
|
|
100
|
+
*
|
|
101
|
+
* @requiresApiKeyAuth
|
|
102
|
+
*
|
|
103
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#update forum_posts#update}
|
|
104
|
+
*
|
|
105
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#update Documentation} for more details.
|
|
106
|
+
*/
|
|
107
|
+
update(id: number, options: UpdateForumPostOptions): Promise<null>;
|
|
110
108
|
}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { forumPosts_create, forumPosts_destroy, forumPosts_update, forumPosts_show, forumPosts_hide, forumPosts_warning, forumPosts_index, forumPosts_unhide, } from "../generated/sdk.js";
|
|
3
3
|
import ForumPost from "../models/ForumPost.js";
|
|
4
4
|
import { OperationID, prefixKeys, } from "../util.js";
|
|
5
5
|
import Base from "./Base.js";
|
|
6
|
-
import ForumPostVotes from "./forum_posts/Votes.js";
|
|
7
6
|
/** @category Modules */
|
|
8
7
|
export default class ForumPosts extends Base {
|
|
9
|
-
votes = new ForumPostVotes(this.e621, this.client);
|
|
10
8
|
/**
|
|
11
9
|
* Create Forum Post
|
|
12
10
|
*
|
|
13
11
|
* @requiresApiKeyAuth
|
|
14
12
|
*
|
|
15
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
13
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#create forum_posts#create}
|
|
16
14
|
*
|
|
17
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
15
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#create Documentation} for more details.
|
|
18
16
|
*/
|
|
19
17
|
async create(options) {
|
|
20
|
-
return
|
|
18
|
+
return forumPosts_create({
|
|
21
19
|
client: this.client,
|
|
22
|
-
body:
|
|
20
|
+
body: options,
|
|
23
21
|
}).then(res => this._handleResponse(res, 201, true, ForumPost));
|
|
24
22
|
}
|
|
25
23
|
/**
|
|
@@ -29,45 +27,27 @@ export default class ForumPosts extends Base {
|
|
|
29
27
|
*
|
|
30
28
|
* @requiresApiKeyAuth
|
|
31
29
|
*
|
|
32
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
30
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#destroy forum_posts#destroy}
|
|
33
31
|
*
|
|
34
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
32
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#destroy Documentation} for more details.
|
|
35
33
|
*/
|
|
36
34
|
async delete(id) {
|
|
37
|
-
return
|
|
35
|
+
return forumPosts_destroy({
|
|
38
36
|
client: this.client,
|
|
39
37
|
path: { id },
|
|
40
38
|
}).then(res => this._handleResponse(res, 204, true));
|
|
41
39
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Edit Forum Post
|
|
44
|
-
*
|
|
45
|
-
* You must be the creator of the forum post, or Admin+ to edit. Marked forum posts cannot be edited.
|
|
46
|
-
*
|
|
47
|
-
* @requiresApiKeyAuth
|
|
48
|
-
*
|
|
49
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-editForumPost editForumPost}
|
|
50
|
-
*
|
|
51
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-editForumPost Documentation} for more details.
|
|
52
|
-
*/
|
|
53
|
-
async edit(id, options) {
|
|
54
|
-
return editForumPost({
|
|
55
|
-
client: this.client,
|
|
56
|
-
path: { id },
|
|
57
|
-
body: prefixKeys(options, "forum_post"),
|
|
58
|
-
}).then(res => this._handleResponse(res, 204, true));
|
|
59
|
-
}
|
|
60
40
|
/**
|
|
61
41
|
* Get Forum Post
|
|
62
42
|
*
|
|
63
43
|
* If the forum post is hidden, you must be the creator or Moderator+ to see it.
|
|
64
44
|
*
|
|
65
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
45
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#show forum_posts#show}
|
|
66
46
|
*
|
|
67
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
47
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#show Documentation} for more details.
|
|
68
48
|
*/
|
|
69
49
|
async get(id) {
|
|
70
|
-
return
|
|
50
|
+
return forumPosts_show({
|
|
71
51
|
client: this.client,
|
|
72
52
|
path: { id },
|
|
73
53
|
}).then(res => this._handleResponse(res, 200, false, ForumPost));
|
|
@@ -79,12 +59,12 @@ export default class ForumPosts extends Base {
|
|
|
79
59
|
*
|
|
80
60
|
* @requiresApiKeyAuth
|
|
81
61
|
*
|
|
82
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
62
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#hide forum_posts#hide}
|
|
83
63
|
*
|
|
84
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
64
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#hide Documentation} for more details.
|
|
85
65
|
*/
|
|
86
66
|
async hide(id) {
|
|
87
|
-
return
|
|
67
|
+
return forumPosts_hide({
|
|
88
68
|
client: this.client,
|
|
89
69
|
path: { id },
|
|
90
70
|
}).then(res => this._handleResponse(res, 201, true, ForumPost));
|
|
@@ -97,26 +77,26 @@ export default class ForumPosts extends Base {
|
|
|
97
77
|
*
|
|
98
78
|
* @requiresApiKeyAuth
|
|
99
79
|
*
|
|
100
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
80
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#warning forum_posts#warning}
|
|
101
81
|
*
|
|
102
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
82
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#warning Documentation} for more details.
|
|
103
83
|
*/
|
|
104
84
|
async mark(id, type) {
|
|
105
|
-
return
|
|
85
|
+
return forumPosts_warning({
|
|
106
86
|
client: this.client,
|
|
107
87
|
path: { id },
|
|
108
88
|
body: { record_type: type },
|
|
109
89
|
}).then(res => this._handleResponse(res, 200, true));
|
|
110
90
|
}
|
|
111
91
|
/**
|
|
112
|
-
*
|
|
92
|
+
* Forum Posts Index
|
|
113
93
|
*
|
|
114
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
94
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#index forum_posts#index}
|
|
115
95
|
*
|
|
116
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
96
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#index Documentation} for more details.
|
|
117
97
|
*/
|
|
118
98
|
async search(options) {
|
|
119
|
-
return
|
|
99
|
+
return forumPosts_index({
|
|
120
100
|
client: this.client,
|
|
121
101
|
query: prefixKeys(options, "search", ["limit", "page"]),
|
|
122
102
|
}).then(res => this._handleResponse(res, 200, true, ForumPost));
|
|
@@ -128,63 +108,81 @@ export default class ForumPosts extends Base {
|
|
|
128
108
|
*
|
|
129
109
|
* @requiresApiKeyAuth
|
|
130
110
|
*
|
|
131
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-
|
|
111
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#unhide forum_posts#unhide}
|
|
132
112
|
*
|
|
133
|
-
* @see {@link https://e621.wiki/#operations-Forum_Posts-
|
|
113
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#unhide Documentation} for more details.
|
|
134
114
|
*/
|
|
135
115
|
async unhide(id) {
|
|
136
|
-
return
|
|
116
|
+
return forumPosts_unhide({
|
|
137
117
|
client: this.client,
|
|
138
118
|
path: { id },
|
|
139
119
|
}).then(res => this._handleResponse(res, 201, true, ForumPost));
|
|
140
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Update Forum Post
|
|
123
|
+
*
|
|
124
|
+
* You must be the creator of the forum post, or Admin+ to edit. Marked forum posts cannot be edited.
|
|
125
|
+
*
|
|
126
|
+
* @requiresApiKeyAuth
|
|
127
|
+
*
|
|
128
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#update forum_posts#update}
|
|
129
|
+
*
|
|
130
|
+
* @see {@link https://e621.wiki/#operations-Forum_Posts-forum_posts#update Documentation} for more details.
|
|
131
|
+
*/
|
|
132
|
+
async update(id, options) {
|
|
133
|
+
return forumPosts_update({
|
|
134
|
+
client: this.client,
|
|
135
|
+
path: { id },
|
|
136
|
+
body: options,
|
|
137
|
+
}).then(res => this._handleResponse(res, 204, true));
|
|
138
|
+
}
|
|
141
139
|
}
|
|
142
140
|
__decorate([
|
|
143
|
-
OperationID("
|
|
141
|
+
OperationID("forum_posts#create"),
|
|
144
142
|
__metadata("design:type", Function),
|
|
145
143
|
__metadata("design:paramtypes", [Object]),
|
|
146
144
|
__metadata("design:returntype", Promise)
|
|
147
145
|
], ForumPosts.prototype, "create", null);
|
|
148
146
|
__decorate([
|
|
149
|
-
OperationID("
|
|
147
|
+
OperationID("forum_posts#destroy"),
|
|
150
148
|
__metadata("design:type", Function),
|
|
151
149
|
__metadata("design:paramtypes", [Number]),
|
|
152
150
|
__metadata("design:returntype", Promise)
|
|
153
151
|
], ForumPosts.prototype, "delete", null);
|
|
154
152
|
__decorate([
|
|
155
|
-
OperationID("
|
|
156
|
-
__metadata("design:type", Function),
|
|
157
|
-
__metadata("design:paramtypes", [Number, Object]),
|
|
158
|
-
__metadata("design:returntype", Promise)
|
|
159
|
-
], ForumPosts.prototype, "edit", null);
|
|
160
|
-
__decorate([
|
|
161
|
-
OperationID("getForumPost"),
|
|
153
|
+
OperationID("forum_posts#show"),
|
|
162
154
|
__metadata("design:type", Function),
|
|
163
155
|
__metadata("design:paramtypes", [Number]),
|
|
164
156
|
__metadata("design:returntype", Promise)
|
|
165
157
|
], ForumPosts.prototype, "get", null);
|
|
166
158
|
__decorate([
|
|
167
|
-
OperationID("
|
|
159
|
+
OperationID("forum_posts#hide"),
|
|
168
160
|
__metadata("design:type", Function),
|
|
169
161
|
__metadata("design:paramtypes", [Number]),
|
|
170
162
|
__metadata("design:returntype", Promise)
|
|
171
163
|
], ForumPosts.prototype, "hide", null);
|
|
172
164
|
__decorate([
|
|
173
|
-
OperationID("
|
|
165
|
+
OperationID("forum_posts#warning"),
|
|
174
166
|
__metadata("design:type", Function),
|
|
175
167
|
__metadata("design:paramtypes", [Number, Object]),
|
|
176
168
|
__metadata("design:returntype", Promise)
|
|
177
169
|
], ForumPosts.prototype, "mark", null);
|
|
178
170
|
__decorate([
|
|
179
|
-
OperationID("
|
|
171
|
+
OperationID("forum_posts#index"),
|
|
180
172
|
__metadata("design:type", Function),
|
|
181
173
|
__metadata("design:paramtypes", [Object]),
|
|
182
174
|
__metadata("design:returntype", Promise)
|
|
183
175
|
], ForumPosts.prototype, "search", null);
|
|
184
176
|
__decorate([
|
|
185
|
-
OperationID("
|
|
177
|
+
OperationID("forum_posts#unhide"),
|
|
186
178
|
__metadata("design:type", Function),
|
|
187
179
|
__metadata("design:paramtypes", [Number]),
|
|
188
180
|
__metadata("design:returntype", Promise)
|
|
189
181
|
], ForumPosts.prototype, "unhide", null);
|
|
190
|
-
|
|
182
|
+
__decorate([
|
|
183
|
+
OperationID("forum_posts#update"),
|
|
184
|
+
__metadata("design:type", Function),
|
|
185
|
+
__metadata("design:paramtypes", [Number, Object]),
|
|
186
|
+
__metadata("design:returntype", Promise)
|
|
187
|
+
], ForumPosts.prototype, "update", null);
|
|
188
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm9ydW1Qb3N0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9tb2R1bGVzL0ZvcnVtUG9zdHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFDSCxpQkFBaUIsRUFDakIsa0JBQWtCLEVBQ2xCLGlCQUFpQixFQUNqQixlQUFlLEVBQ2YsZUFBZSxFQUNmLGtCQUFrQixFQUNsQixnQkFBZ0IsRUFDaEIsaUJBQWlCLEdBQ3BCLE1BQU0scUJBQXFCLENBQUM7QUFDN0IsT0FBTyxTQUFTLE1BQU0sd0JBQXdCLENBQUM7QUFDL0MsT0FBTyxFQUNILFdBQVcsRUFFWCxVQUFVLEdBSWIsTUFBTSxZQUFZLENBQUM7QUFFcEIsT0FBTyxJQUFJLE1BQ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VcsQ0FBQyxxQkFBcUIsQ0FBQzs7Ozt3Q0FNL0I7QUFZSztJQURSLFdBQVcsQ0FBQyxrQkFBa0IsQ0FBQzs7OztxQ0FNNUI7QUFjSztJQURSLFdBQVcsQ0FBQyxrQkFBa0IsQ0FBQzs7OztzQ0FNNUI7QUFlSztJQURSLFdBQVcsQ0FBQyxxQkFBcUIsQ0FBQzs7OztzQ0FPL0I7QUFVSztJQURSLFdBQVcsQ0FBQyxtQkFBbUIsQ0FBQzs7Ozt3Q0FNN0I7QUFjSztJQURSLFdBQVcsQ0FBQyxvQkFBb0IsQ0FBQzs7Ozt3Q0FNOUI7QUFjSztJQURSLFdBQVcsQ0FBQyxvQkFBb0IsQ0FBQzs7Ozt3Q0FPOUIifQ==
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import ForumTopic from "../models/ForumTopic.js";
|
|
2
|
-
import { type TransformDataQueryToOptions } from "../util.js";
|
|
2
|
+
import { type TransformDataBodyToOptions, type TransformDataQueryToOptions } from "../util.js";
|
|
3
3
|
import Base from "./Base.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { ForumTopicsCreateData, ForumTopicsIndexData, ForumTopicsUpdateData } from "../generated/types.js";
|
|
5
5
|
/** @category Modules/Types */
|
|
6
|
-
export interface
|
|
7
|
-
category_id: number;
|
|
8
|
-
is_locked?: boolean;
|
|
9
|
-
is_sticky?: boolean;
|
|
10
|
-
original_post_attributes?: {
|
|
11
|
-
body?: string;
|
|
12
|
-
id?: number;
|
|
13
|
-
};
|
|
14
|
-
title: string;
|
|
6
|
+
export interface CreateForumTopicOptions extends TransformDataBodyToOptions<ForumTopicsCreateData> {
|
|
15
7
|
}
|
|
16
8
|
/** @category Modules/Types */
|
|
17
|
-
export interface
|
|
9
|
+
export interface UpdateForumTopicOptions extends TransformDataBodyToOptions<ForumTopicsUpdateData> {
|
|
10
|
+
}
|
|
11
|
+
/** @category Modules/Types */
|
|
12
|
+
export interface SearchForumTopicsOptions extends TransformDataQueryToOptions<ForumTopicsIndexData> {
|
|
18
13
|
}
|
|
19
14
|
/** @category Modules */
|
|
20
15
|
export default class ForumTopics extends Base {
|
|
@@ -23,11 +18,11 @@ export default class ForumTopics extends Base {
|
|
|
23
18
|
*
|
|
24
19
|
* @requiresApiKeyAuth
|
|
25
20
|
*
|
|
26
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
21
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#create forum_topics#create}
|
|
27
22
|
*
|
|
28
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
23
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#create Documentation} for more details.
|
|
29
24
|
*/
|
|
30
|
-
create(options:
|
|
25
|
+
create(options: CreateForumTopicOptions): Promise<ForumTopic>;
|
|
31
26
|
/**
|
|
32
27
|
* Delete Forum Topic
|
|
33
28
|
*
|
|
@@ -35,29 +30,19 @@ export default class ForumTopics extends Base {
|
|
|
35
30
|
*
|
|
36
31
|
* @requiresApiKeyAuth
|
|
37
32
|
*
|
|
38
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
33
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#destroy forum_topics#destroy}
|
|
39
34
|
*
|
|
40
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
35
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#destroy Documentation} for more details.
|
|
41
36
|
*/
|
|
42
37
|
delete(id: number): Promise<null>;
|
|
43
|
-
/**
|
|
44
|
-
* Edit Forum Topic
|
|
45
|
-
*
|
|
46
|
-
* @requiresApiKeyAuth
|
|
47
|
-
*
|
|
48
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-editForumTopic editForumTopic}
|
|
49
|
-
*
|
|
50
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-editForumTopic Documentation} for more details.
|
|
51
|
-
*/
|
|
52
|
-
edit(id: number, options: ForumTopicOptions): Promise<null>;
|
|
53
38
|
/**
|
|
54
39
|
* Get Forum Forum Topic
|
|
55
40
|
*
|
|
56
41
|
* If the forum topic is hidden, you must be the creator or Moderator+ to see it.
|
|
57
42
|
*
|
|
58
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
43
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#show forum_topics#show}
|
|
59
44
|
*
|
|
60
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
45
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#show Documentation} for more details.
|
|
61
46
|
*/
|
|
62
47
|
get(id: number): Promise<ForumTopic | null>;
|
|
63
48
|
/**
|
|
@@ -67,9 +52,9 @@ export default class ForumTopics extends Base {
|
|
|
67
52
|
*
|
|
68
53
|
* @requiresApiKeyAuth
|
|
69
54
|
*
|
|
70
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
55
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#hide forum_topics#hide}
|
|
71
56
|
*
|
|
72
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
57
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#hide Documentation} for more details.
|
|
73
58
|
*/
|
|
74
59
|
hide(id: number): Promise<ForumTopic>;
|
|
75
60
|
/**
|
|
@@ -77,17 +62,17 @@ export default class ForumTopics extends Base {
|
|
|
77
62
|
*
|
|
78
63
|
* @requiresApiKeyAuth
|
|
79
64
|
*
|
|
80
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
65
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#mark_all_as_read forum_topics#mark_all_as_read}
|
|
81
66
|
*
|
|
82
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
67
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#mark_all_as_read Documentation} for more details.
|
|
83
68
|
*/
|
|
84
69
|
markAllRead(): Promise<null>;
|
|
85
70
|
/**
|
|
86
|
-
*
|
|
71
|
+
* Forum Topics Index
|
|
87
72
|
*
|
|
88
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
73
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#index forum_topics#index}
|
|
89
74
|
*
|
|
90
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
75
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#index Documentation} for more details.
|
|
91
76
|
*/
|
|
92
77
|
search(options?: SearchForumTopicsOptions): Promise<Array<ForumTopic>>;
|
|
93
78
|
/**
|
|
@@ -95,9 +80,9 @@ export default class ForumTopics extends Base {
|
|
|
95
80
|
*
|
|
96
81
|
* @requiresApiKeyAuth
|
|
97
82
|
*
|
|
98
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
83
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#subscribe forum_topics#subscribe}
|
|
99
84
|
*
|
|
100
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
85
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#subscribe Documentation} for more details.
|
|
101
86
|
*/
|
|
102
87
|
subscribe(id: number): Promise<ForumTopic>;
|
|
103
88
|
/**
|
|
@@ -107,9 +92,9 @@ export default class ForumTopics extends Base {
|
|
|
107
92
|
*
|
|
108
93
|
* @requiresApiKeyAuth
|
|
109
94
|
*
|
|
110
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
95
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#unhide forum_topics#unhide}
|
|
111
96
|
*
|
|
112
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
97
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#unhide Documentation} for more details.
|
|
113
98
|
*/
|
|
114
99
|
unhide(id: number): Promise<ForumTopic>;
|
|
115
100
|
/**
|
|
@@ -117,9 +102,19 @@ export default class ForumTopics extends Base {
|
|
|
117
102
|
*
|
|
118
103
|
* @requiresApiKeyAuth
|
|
119
104
|
*
|
|
120
|
-
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-
|
|
105
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#unsubscribe forum_topics#unsubscribe}
|
|
121
106
|
*
|
|
122
|
-
* @see {@link https://e621.wiki/#operations-Forum_Topics-
|
|
107
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#unsubscribe Documentation} for more details.
|
|
123
108
|
*/
|
|
124
109
|
unsubscribe(id: number): Promise<ForumTopic>;
|
|
110
|
+
/**
|
|
111
|
+
* Update Forum Topic
|
|
112
|
+
*
|
|
113
|
+
* @requiresApiKeyAuth
|
|
114
|
+
*
|
|
115
|
+
* @operationId {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#update forum_topics#update}
|
|
116
|
+
*
|
|
117
|
+
* @see {@link https://e621.wiki/#operations-Forum_Topics-forum_topics#update Documentation} for more details.
|
|
118
|
+
*/
|
|
119
|
+
update(id: number, options: UpdateForumTopicOptions): Promise<null>;
|
|
125
120
|
}
|