import ForumPost from "../models/ForumPost.js"; import { type ExtractValue, type TransformDataBodyToOptions, type TransformDataQueryToOptions, GetResponse } from "../util.js"; import Base from "./Base.js"; import ForumPostVotes from "./forum_posts/Votes.js"; import type { CreateForumPostData, EditForumPostData, MarkForumPostData, MarkForumPostResponses, SearchForumPostsData } from "../generated/types.js"; /** @category Modules/Types */ export interface CreateForumPostOptions extends TransformDataBodyToOptions { } /** @category Modules/Types */ export interface EditForumPostOptions extends TransformDataBodyToOptions { } /** @category Modules/Types */ export interface SearchForumPostsOptions extends TransformDataQueryToOptions { } /** @category Modules/Types */ export interface MarkForumPostResponse extends GetResponse { } /** @category Modules */ export default class ForumPosts extends Base { votes: ForumPostVotes; /** * Create Forum Post * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Forum_Posts-createForumPost createForumPost} * * @see {@link https://e621.wiki/#operations-Forum_Posts-createForumPost Documentation} for more details. */ create(options: CreateForumPostOptions): Promise; /** * Delete Forum Post * * You must be Admin+. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Forum_Posts-deleteForumPost deleteForumPost} * * @see {@link https://e621.wiki/#operations-Forum_Posts-deleteForumPost Documentation} for more details. */ delete(id: number): Promise; /** * Edit Forum Post * * You must be the creator of the forum post, or Admin+ to edit. Marked forum posts cannot be edited. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Forum_Posts-editForumPost editForumPost} * * @see {@link https://e621.wiki/#operations-Forum_Posts-editForumPost Documentation} for more details. */ edit(id: number, options: EditForumPostOptions): Promise; /** * Get Forum Post * * If the forum post is hidden, you must be the creator or Moderator+ to see it. * * @operationId {@link https://e621.wiki/#operations-Forum_Posts-getForumPost getForumPost} * * @see {@link https://e621.wiki/#operations-Forum_Posts-getForumPost Documentation} for more details. */ get(id: number): Promise; /** * Hide Forum Post * * You must be the creator or Moderator+. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Forum_Posts-hideForumPost hideForumPost} * * @see {@link https://e621.wiki/#operations-Forum_Posts-hideForumPost Documentation} for more details. */ hide(id: number): Promise; /** * Mark Forum Post * * You must be Moderator+. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Forum_Posts-markForumPost markForumPost} * * @see {@link https://e621.wiki/#operations-Forum_Posts-markForumPost Documentation} for more details. */ mark(id: number, type: ExtractValue<"record_type", MarkForumPostData>): Promise; /** * Search Forum Posts * * @operationId {@link https://e621.wiki/#operations-Forum_Posts-searchForumPosts searchForumPosts} * * @see {@link https://e621.wiki/#operations-Forum_Posts-searchForumPosts Documentation} for more details. */ search(options?: SearchForumPostsOptions): Promise>; /** * Unhide Forum Post * * You must be Moderator+. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Forum_Posts-unhideForumPost unhideForumPost} * * @see {@link https://e621.wiki/#operations-Forum_Posts-unhideForumPost Documentation} for more details. */ unhide(id: number): Promise; }