UNPKG

modrinthjs

Version:
83 lines (82 loc) 2.9 kB
import type { CreatableReport } from '../models/CreatableReport'; import type { Report } from '../models/Report'; import type { Thread } from '../models/Thread'; import type { ThreadMessageBody } from '../models/ThreadMessageBody'; import type { CancelablePromise } from '../core/CancelablePromise'; export declare class ThreadsService { /** * Report a project, user, or version * Bring a project, user, or version to the attention of the moderators by reporting it. * @param requestBody The report to be sent * @returns Report Expected response to a valid request * @throws ApiError */ static submitReport(requestBody?: CreatableReport): CancelablePromise<Report>; /** * Get your open reports * @param count * @returns Report Expected response to a valid request * @throws ApiError */ static getOpenReports(count?: number): CancelablePromise<Array<Report>>; /** * Get report from ID * @param id The ID of the report * @returns Report Expected response to a valid request * @throws ApiError */ static getReport(id: string): CancelablePromise<Report>; /** * Modify a report * @param id The ID of the report * @param requestBody What to modify about the report * @returns void * @throws ApiError */ static modifyReport(id: string, requestBody?: { /** * The contents of the report */ body?: string; /** * Whether the thread should be closed */ closed?: boolean; }): CancelablePromise<void>; /** * Get multiple reports * @param ids The IDs of the reports * @returns Report Expected response to a valid request * @throws ApiError */ static getReports(ids: string): CancelablePromise<Array<Report>>; /** * Get a thread * @param id The ID of the thread * @returns Thread Expected response to a valid request * @throws ApiError */ static getThread(id: string): CancelablePromise<Thread>; /** * Send a text message to a thread * @param id The ID of the thread * @param requestBody The message to be sent. Note that you only need the fields applicable for the `text` type. * @returns Thread Expected response to a valid request * @throws ApiError */ static sendThreadMessage(id: string, requestBody?: ThreadMessageBody): CancelablePromise<Thread>; /** * Get multiple threads * @param ids The IDs of the threads * @returns Thread Expected response to a valid request * @throws ApiError */ static getThreads(ids: string): CancelablePromise<Array<Thread>>; /** * Delete a thread message * @param id The ID of the message * @returns void * @throws ApiError */ static deleteThreadMessage(id: string): CancelablePromise<void>; }