import type { WebClient } from '@slack/web-api'; import { type SlackDirectoryConversation, type SlackDirectoryUser } from '../storage/schema/cache.js'; import type { SlackUserCandidate } from '../../shared/agent-config.js'; import { type SlackConversationInfo as SlackApiConversationInfo, type SlackUserInfo as SlackApiUserInfo } from './slack.helper.js'; export type SlackConversationInfo = SlackDirectoryConversation; export type SlackUserInfo = SlackDirectoryUser; export interface SlackWorkspaceDirectoryEvent { channel?: SlackApiConversationInfo | string; channel_id?: string; team?: string; type?: string; user?: SlackApiUserInfo; } export declare function normalizeSlackUserInfo(user: SlackApiUserInfo, syncedAt?: string): SlackUserInfo | undefined; export declare function normalizeSlackConversationInfo(channel: SlackApiConversationInfo, syncedAt?: string): SlackConversationInfo | undefined; export declare class SlackWorkspaceDirectoryService { private readonly input; private botUserIdPromise?; constructor(input: { botUserId?: string; client: WebClient; teamId?: string; }); getUser(userId: string): Promise; getUserByHandle(handleInput: string): Promise; getUserByHandleForTarget(handleInput: string, target: { channelId?: string; }): Promise; getUsers(): Promise; getUserCandidates(): Promise; getUserDisplayName(user: SlackUserInfo | SlackApiUserInfo | undefined, fallback: string): string; openDm(userId: string): Promise; getConversation(channel: string): Promise; /** * Resolve one channel with membership from the current client's bot identity. * Membership is deliberately fetched live: a workspace cache is shared by many * bots, while Slack's `is_member` answer is relative to the calling bot. */ getConversationForCurrentBot(channel: string): Promise; getConversationByName(nameInput: string, types?: string): Promise; getConversationByNameForCurrentBot(nameInput: string, types?: string): Promise; getMemberConversations(types?: string): Promise; getWorkspaceIconUrl(teamId?: string | undefined): Promise; getConversationMemberIds(channel: string): Promise; applyEvent(event: SlackWorkspaceDirectoryEvent): Promise; private preferredUniqueUserByHandle; private preferredUniqueWorkspaceUser; private recoverUsersByHandle; private recoverConversationsByName; private fetchUser; private fetchConversation; private fetchConversationForCurrentBot; private refreshUsers; private refreshConversations; private refreshMemberConversations; private resolveBotUserId; private fetchWorkspaceIconUrl; private readEntry; private readCollection; private triggerEntryRefresh; private triggerCollectionRefresh; private singleFlightEntryFetch; private singleFlightCollectionFetch; private upsertUser; private upsertConversation; private readCache; private updateCache; } //# sourceMappingURL=workspace-directory.service.d.ts.map