import type { EffectiveRoleValue, RoleProfileEntryLike, RoleProfileSummaryLike } from './role-profile-match.js'; import { emptyGroupsSnapshot, fetchGroupsSnapshot, type GroupBot, type GroupChat, type GroupFilters, type GroupsSnapshot } from './groups-api.js'; export { emptyGroupsSnapshot, fetchGroupsSnapshot, }; export type { GroupBot, GroupChat, GroupFilters, GroupsSnapshot, }; export declare const GROUPS_PAGE_SIZE = 30; export interface RoleProfileContext { profiles: RoleProfileSummaryLike[]; entriesById: Map; groupRoleContentByBot: Map; loaded: boolean; } export interface GroupPageWindow { rows: T[]; page: number; totalPages: number; from: number; to: number; total: number; } export type SaveProfileEntryStatus = 'chat' | 'team' | 'empty' | 'error'; export interface SaveProfileEntry { larkAppId: string; botName?: string; content: string; status: SaveProfileEntryStatus; } export interface GroupAddBotResult { id?: unknown; ok?: unknown; error?: unknown; } export interface AddBotsSummary { rows: GroupAddBotResult[]; okCount: number; failed: number; } export interface RoleProfileBootstrapStatus { kind: 'ok' | 'warn'; text: string; } export declare function roleKey(larkAppId: string, chatId: string): string; /** Keep the expensive group coverage matrix bounded to one client-side page. */ export declare function paginateGroupRows(rows: T[], requestedPage: number, pageSize?: number): GroupPageWindow; export declare function isValidProfileId(profileId: string): boolean; export declare function suggestRoleProfileIdFromChat(value: string): string; export declare function fetchRoleProfileSummaries(): Promise; export declare function loadGroupRoleProfileContext(snapshot: GroupsSnapshot): Promise; export declare function collectGroupProfileEntries(chat: GroupChat): Promise; export declare function availableBotsForPicker(bots: GroupBot[], excludeIds?: Set): GroupBot[]; export declare function filterGroupChats(chats: GroupChat[], filters: GroupFilters): GroupChat[]; /** True iff every expected bot id appears in the row's memberBots with * inChat:true. Used by refreshUntilSeen to defer committing a canonical * snapshot until all invited bots have caught up Lark-side. */ export declare function allExpectedInChat(row: GroupChat | null | undefined, expectedBotIds: Set): boolean; export declare function summarizeAddBotsResult(result: GroupAddBotResult[]): AddBotsSummary; export declare function roleProfileBootstrapStatus(profileId: string, messageId?: unknown, error?: unknown): RoleProfileBootstrapStatus | null; export declare function injectOptimisticChat(snapshot: GroupsSnapshot, chatId: string, displayName: string, memberIds: string[], creator: string | undefined): GroupsSnapshot; //# sourceMappingURL=groups.d.ts.map