import type * as Whop from "../index.mjs"; /** * A message sent within an experience chat, direct message, or group chat. */ export interface Message { /** The message content formatted as Markdown. Null if the message has no text content. */ content: string | null; /** The timestamp when this message was originally created. */ created_at: string; /** Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID. */ id: string; /** Whether the message content has been edited after it was originally sent. */ is_edited: boolean; /** Whether this message is pinned to the top of the channel for easy access. */ is_pinned: boolean; /** A list of user IDs that are explicitly mentioned in this message. */ mentions: string[]; /** Whether the message includes an @everyone mention that notifies all channel members. */ mentions_everyone: boolean; /** The classification of this message: regular, system, or automated. */ message_type: Whop.DmsPostTypes; /** A poll attached to this message. Null if the message does not contain a poll. */ poll: Message.Poll | null; /** Aggregated reaction counts on this message, filtered to a specific reaction type. */ poll_votes: Message.PollVotes.Item[]; /** Aggregated reaction counts on this message, filtered to a specific reaction type. */ reaction_counts: Message.ReactionCounts.Item[]; /** The unique identifier of the message this post is replying to. Null if this is not a reply. */ replying_to_message_id: string | null; /** The timestamp when this message was last modified. */ updated_at: string; /** The user who authored this message. */ user: Message.User; /** The number of unique views this message has received. Null if view tracking is not enabled for this channel. */ view_count: number | null; } export declare namespace Message { /** * A poll attached to this message. Null if the message does not contain a poll. */ interface Poll { /** The options for the poll */ options: Poll.Options.Item[] | null; } namespace Poll { type Options = Options.Item[]; namespace Options { /** * Represents a single poll option */ interface Item { /** The unique identifier for the poll option. */ id: string; /** The text of the poll option */ text: string; } } } type PollVotes = PollVotes.Item[]; namespace PollVotes { /** * Represents a reaction count for a feed post */ interface Item { /** The number of users who reacted */ count: number; /** The reaction that was used */ option_id: string | null; } } type ReactionCounts = ReactionCounts.Item[]; namespace ReactionCounts { /** * Represents a reaction count for a feed post */ interface Item { /** The number of users who reacted */ count: number; /** The emoji that was used in shortcode format (:heart:) */ emoji: string | null; } } /** * The user who authored this message. */ interface User { /** The unique identifier for the user. */ id: string; /** The user's display name shown on their public profile. */ name: string | null; /** The user's unique username shown on their public profile. */ username: string; } }