import type { WebClient } from "@slack/web-api"; import type { Attachment, ConversationKind, OfficeAddress } from "../../types.js"; import type { Workspace } from "../../office/types.js"; import type { SlackMessagingBot } from "./bot.js"; export interface SlackWebApi { auth: Pick; chat: Pick; conversations: Pick; users: Pick; reactions: Pick; views: Pick; files: Pick; assistant: { threads: Pick; }; apiCall: WebClient["apiCall"]; } export interface SlackSocketEventArgs { ack: () => Promise; event?: unknown; body?: unknown; } export interface SlackSocketConnection { on(event: string, listener: (args: SlackSocketEventArgs) => unknown): unknown; start(): Promise; disconnect(): Promise; } export interface SlackMessagingBotOptions { appToken: string; botToken: string; workspace: Workspace; webApi?: SlackWebApi; socket?: SlackSocketConnection; fetch?: typeof fetch; } export type SlackResponderBot = Pick; export interface SlackEvent { address: OfficeAddress; type: "mention" | "dm"; conversationKind: ConversationKind; channel: string; ts: string; thread_ts?: string; user: string; text: string; files?: Array<{ name?: string; url_private_download?: string; url_private?: string; }>; attachments?: Attachment[]; sessionKey?: string; } export interface SlackUser { id: string; userName: string; displayName: string; isBot?: boolean; } export interface SlackChannel { id: string; name: string; isPrivate?: boolean; isExternallyShared?: boolean; } export interface SlackAdapterOptions { initialMessageTs?: string; replyMode?: "top-level" | "thread"; } export type SlackSessionRef = { kind: "channel"; channelId: string; } | { kind: "thread"; channelId: string; threadTs: string; }; export interface SlackAdapterSessionPlan { sessionKey: string; rootTs?: string; initialMessageTs?: string; isThreaded: boolean; } export interface SlackEventAnchorRunPlan { event: T; initialMessageTs?: string; } export interface SlackBlockAction { action_id: string; block_id?: string; type?: string; value?: string; selected_option?: { text?: { text?: string; }; value?: string; }; selected_options?: Array<{ text?: { text?: string; }; value?: string; }>; } export interface SlackBlockActionBody { actions?: SlackBlockAction[]; container?: { channel_id?: string; thread_ts?: string; message_ts?: string; }; user?: { id?: string; username?: string; name?: string; }; } export interface PlatformSlackOps { postBlocks(conversationId: string, args: { text: string; blocks: object[]; threadTs?: string; }): Promise<{ ts: string; }>; updateBlocks(conversationId: string, args: { ts: string; text: string; blocks: object[]; threadTs?: string; }): Promise; ownsBlockKitMessage(conversationId: string, ts: string, threadTs?: string): boolean; } export interface SlackBlockKitOps { postBlocks(args: { text: string; blocks: object[]; threadTs?: string; }): Promise<{ ts: string; }>; updateBlocks(args: { ts: string; text: string; blocks: object[]; }): Promise; } export interface AssistantThreadPayload { user_id?: string; channel_id?: string; thread_ts?: string; context?: AgentContext; } export interface AgentContext { channel_id?: string; team_id?: string; enterprise_id?: string | null; } export interface SuggestedPrompt { title: string; message: string; } export interface AssistantSurfaceOps { postInThread(channel: string, threadTs: string, text: string): Promise; setSuggestedPrompts(channel: string, threadTs: string | undefined, prompts: SuggestedPrompt[]): Promise; setTitle(channel: string, threadTs: string, title: string): Promise; channelName(channelId: string): string | undefined; } //# sourceMappingURL=types.d.ts.map