import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Whop from "../../../index.js"; export declare namespace MessagesClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A Message contains Markdown and optional attachments, a poll or a reply. Read history, synchronize edits and deletions, or fetch a window around a message. Existing permissions govern sending, editing, pinning and deletion. * * Add or remove an emoji reaction, list who reacted, and vote once on a message poll. Messages include aggregate reaction and vote counts and whether you reacted or voted, without exposing other voters. */ export declare class MessagesClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: MessagesClient.Options); /** * Lists messages in an experience chat, DM, or group chat channel, sorted by creation time. * * Required permissions (one of): * - `chat:read` * - `dms:read` * - `support_chat:read` * * @param {Whop.ListMessagesRequest} request * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.messages.list({ * first: 42, * last: 42, * channel_id: "channel_id" * }) */ list(request: Whop.ListMessagesRequest, requestOptions?: MessagesClient.RequestOptions): Promise>; /** * Sends a message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies. * * Required permissions (one of): * - `chat:message:create` * - `dms:message:manage` * - `livestream:chat:write` * - `support_chat:message:create` * * @param {Whop.CreateMessagesRequest} request * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.messages.create({ * channel_id: "channel_id", * content: "content" * }) */ create(request: Whop.CreateMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves the details of an existing message. * * Required permissions (one of): * - `chat:read` * - `dms:read` * - `livestream:chat:read` * - `support_chat:read` * * @param {Whop.RetrieveMessagesRequest} request * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.messages.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Permanently deletes a message from an experience chat, DM, or group chat channel. Only the message author or a channel admin can delete a message. * * Required permissions (one of): * - `chat:message:create` and `chat:read` * - `dms:message:manage` and `dms:read` * - `livestream:chat:write` and `livestream:chat:read` * - `support_chat:message:create` and `support_chat:read` * * @param {Whop.DeleteMessagesRequest} request * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.messages.delete({ * id: "id" * }) */ delete(request: Whop.DeleteMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Edits the content, attachments, or pinned status of a message in an experience chat, DM, or group chat channel. * * Required permissions (one of): * - `chat:message:create` * - `dms:message:manage` * - `livestream:chat:write` * - `support_chat:message:create` * * @param {Whop.UpdateMessagesRequest} request * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.UnprocessableEntityError} * @throws {@link Whop.TooManyRequestsError} * @throws {@link Whop.InternalServerError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.messages.update({ * id: "id" * }) */ update(request: Whop.UpdateMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise; private __update; }