import type { Block, KnownBlock } from '@slack/types'; export interface SlackChartSeries { name: string; values: number[]; } export interface SlackChartSpec { chartType: 'line' | 'bar' | 'area' | 'pie'; title: string; categories?: string[]; series?: SlackChartSeries[]; segments?: Array<{ label: string; value: number; }>; xLabel?: string; yLabel?: string; } export interface SlackTableSpec { caption?: string; headers: string[]; rows: Array>; rowHeaderColumnIndex?: number; } /** * Render a portable chart specification to Slack's native `data_visualization` Block Kit block * plus an accessible plain-text fallback representation. */ export declare function buildSlackChartBlock(spec: SlackChartSpec): { block: Record | null; fallbackText: string; reason?: string; }; export declare function formatChartFallbackText(spec: SlackChartSpec): string; /** * Render a portable table specification to Slack's native `data_table` Block Kit block * (`raw_text` for strings, `raw_number` for finite numbers) plus literal fallback text. */ export declare function buildSlackTableBlock(spec: SlackTableSpec): { block: Record | null; fallbackText: string; reason?: string; }; export declare function formatTableFallbackText(spec: SlackTableSpec): string; export interface SlackBlockBatch { text: string; blocks?: Array>; hasNativeDataBlocks: boolean; fallbackText: string; } /** * Compile optional authored text, charts, tables, and raw blocks into one or more * Slack message batches honoring Slack's 2-chart-per-message subtype limit. */ export declare function compileSlackRichBatches(params: { text?: string; charts?: SlackChartSpec[]; tables?: SlackTableSpec[]; rawBlocks?: Array>; }): SlackBlockBatch[]; export declare function stripNativeDataBlocks(blocks: Array> | undefined): Array>; export declare function isSlackInvalidBlocksError(err: unknown): boolean; /** * Convert xopc generic 2D button rows (`OutboundMessage.buttons`) into Slack Block Kit `actions` blocks. */ export declare function buildSlackButtonBlocks(buttons: Array>): Array>;