import Comment from "../models/Comment.js"; import { type ExtractValue, type TransformDataBodyToOptions, type TransformDataQueryToOptions, GetResponse } from "../util.js"; import Base from "./Base.js"; import CommentVotes from "./comments/Votes.js"; import type { CreateCommentData, EditCommentData, MarkCommentData, MarkCommentResponses, SearchCommentsData } from "../generated/types.js"; /** @category Modules/Types */ export interface SearchCommentsOptions extends TransformDataQueryToOptions { } /** @category Modules/Types */ export interface CreateCommentOptions extends TransformDataBodyToOptions { } /** @category Modules/Types */ export interface EditCommentOptions extends TransformDataBodyToOptions { } /** @category Modules/Types */ export interface MarkCommentResponse extends GetResponse { } /** @category Modules */ export default class Comments extends Base { votes: CommentVotes; /** * Create Comment * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Comments-createComment createComment} * * @see {@link https://e621.wiki/#operations-Comments-createComment Documentation} for more details. */ create(options: CreateCommentOptions): Promise; /** * Delete Comment * * You must be Admin+. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Comments-deleteComment deleteComment} * * @see {@link https://e621.wiki/#operations-Comments-deleteComment Documentation} for more details. */ delete(id: number): Promise; /** * Edit Comment * * You must be the creator of the comment, or Admin+ to edit. Marked comments cannot be edited. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Comments-editComment editComment} * * @see {@link https://e621.wiki/#operations-Comments-editComment Documentation} for more details. */ edit(id: number, options: EditCommentOptions): Promise; /** * Get Comment * * If the comment is hidden, you must be the creator or Janitor+ to see it. * * @operationId {@link https://e621.wiki/#operations-Comments-getComment getComment} * * @see {@link https://e621.wiki/#operations-Comments-getComment Documentation} for more details. */ get(id: number): Promise; /** * Hide Comment * * You must be the creator or Moderator+. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Comments-hideComment hideComment} * * @see {@link https://e621.wiki/#operations-Comments-hideComment Documentation} for more details. */ hide(id: number): Promise; /** * Mark Comment * * You must be Moderator+. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Comments-markComment markComment} * * @see {@link https://e621.wiki/#operations-Comments-markComment Documentation} for more details. */ mark(id: number, type: ExtractValue<"record_type", MarkCommentData>): Promise; /** * Search Comments * * For searching comments, group_by=comment must be set. * * @operationId {@link https://e621.wiki/#operations-Comments-searchComments searchComments} * * @see {@link https://e621.wiki/#operations-Comments-searchComments Documentation} for more details. */ search(options?: SearchCommentsOptions): Promise>; /** * Unhide Comment * * You must be Moderator+. * * @requiresApiKeyAuth * * @operationId {@link https://e621.wiki/#operations-Comments-unhideComment unhideComment} * * @see {@link https://e621.wiki/#operations-Comments-unhideComment Documentation} for more details. */ unhide(id: number): Promise; }