// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { SlackAction } from "./SlackAction";
import type { SlackReaction } from "./SlackReaction";

/**
 * One message inside a thread (or the parent itself). Phase 11.1
 * renders these read-only as bubbles; 11.2 will diff successive
 * snapshots to detect edits via `edited_ts`.
 */
export type SlackMessage = { 
/**
 * Stable Slack message ID. Sortable lexicographically.
 */
ts: string, 
/**
 * Author's Slack user ID. `None` only for system / unknown
 * messages, which we still render but flag as "unknown sender".
 */
user_id: string | null, 
/**
 * Slack mrkdwn body. Synthesised from Block Kit blocks when the
 * bot uses them (the common case for moon-bot, Cursor, GitHub),
 * otherwise the raw `text` field. See
 * `crates/moon-slack::client::text_from_blocks`.
 */
text: string, 
/**
 * `edited.ts` when the message has been edited. Lets the UI
 * surface "(edited)" and lets 11.2's polling diff identify
 * changes without comparing the full body.
 */
edited_ts: string | null, 
/**
 * True when the author is a bot (per Slack's `bot_id` field on
 * the message). Used for bubble alignment + colour. Doesn't
 * distinguish *which* bot.
 */
is_bot: boolean, 
/**
 * Link buttons extracted from `actions` blocks at the bottom of
 * the message — moon-bot uses these for "Response", "Download",
 * "Session" footer links. Empty when the message has no action
 * row. Buttons without a `url` (interactive `value` buttons that
 * require a webhook to handle) are filtered out — we'd need to
 * post `block_actions` back to the bot's app, which is out of
 * scope for the read-only chat panel.
 */
actions: Array<SlackAction>, 
/**
 * Reactions attached to the message, in the order Slack returns
 * them (which is roughly first-reacted-first). Empty when the
 * message has no reactions. Read-only in v1 — tapping a chip
 * doesn't toggle the user's own reaction yet.
 */
reactions: Array<SlackReaction>, };
