openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
50 lines (49 loc) • 1.59 kB
TypeScript
import type { SlackMonitorContext } from "../context.js";
type InteractionSelectionFields = {
blockId?: string;
callbackId?: string;
value?: string;
inputKind?: "number" | "text" | "url" | "email" | "rich_text";
inputValue?: string;
inputNumber?: number;
inputEmail?: string;
inputUrl?: string;
richTextValue?: unknown;
richTextPreview?: string;
selectedValues?: string[];
selectedUsers?: string[];
selectedChannels?: string[];
selectedConversations?: string[];
selectedLabels?: string[];
selectedDate?: string;
selectedTime?: string;
selectedDateTime?: number;
actionType?: string;
viewId?: string;
privateMetadata?: string;
viewHash?: string;
inputs?: unknown[];
isCleared?: boolean;
routedChannelType?: string;
routedChannelId?: string;
};
export type InteractionSummary = InteractionSelectionFields & {
interactionType?: "block_action" | "view_submission" | "view_closed";
actionId: string;
userId?: string;
teamId?: string;
triggerId?: string;
responseUrl?: string;
workflowTriggerUrl?: string;
workflowId?: string;
channelId?: string;
messageTs?: string;
threadTs?: string;
};
type SlackActionSummary = Omit<InteractionSummary, "actionId" | "blockId">;
export declare function summarizeAction(action: Record<string, unknown>): SlackActionSummary;
export declare function registerSlackBlockActionHandler(params: {
ctx: SlackMonitorContext;
formatSystemEvent: (payload: Record<string, unknown>) => string;
}): void;
export {};