import type { TeamConversation } from '../team-app-contract.js'; import type { TeamConversationGroup } from './team-conversation-directory.js'; export type TeamEntryTarget = { kind: 'folder'; group: TeamConversationGroup; } | { kind: 'conversation'; conversation: TeamConversation; }; type Removal = { at: number; sequences: Record; }; type Preference = { pinned: boolean; removal?: Removal; }; export type TeamDirectoryPreferences = Readonly>; export declare const teamConversationEntryKey: (c: TeamConversation) => string; export declare const teamFolderEntryKey: (channelId: string) => string; export declare const teamEntryKey: (target: TeamEntryTarget) => string; export declare const teamEntryConversations: (target: TeamEntryTarget) => TeamConversation[]; export declare function teamEntryHidden(preferences: TeamDirectoryPreferences, target: TeamEntryTarget): boolean; export declare const teamEntryPinned: (preferences: TeamDirectoryPreferences, target: TeamEntryTarget) => boolean; /** Only stable entry identifiers and message watermarks are persisted, never message bodies or signed refs. */ export declare class TeamDirectoryPreferenceStore { private storage; private durable; private cache; private listeners; constructor(storage: () => Pick | undefined, durable?: boolean); subscribe: (listener: () => void) => () => void; invalidate: () => void; read: (account: string) => TeamDirectoryPreferences; private write; pin(account: string, target: TeamEntryTarget, pinned: boolean): Promise | undefined; remove(account: string, target: TeamEntryTarget, at?: number): Promise | undefined; restore(account: string, key: string): void | Promise; private restoreLoaded; /** Unknown visitors may merely be older directory pages. Verify their latest actual message before restoring a folder. */ reconcile(account: string, conversations: TeamConversation[], latestMessageAt: (c: TeamConversation) => Promise, signal: AbortSignal): Promise; } export declare const teamDirectoryPreferences: TeamDirectoryPreferenceStore; export declare function useTeamDirectoryPreferences(account: string): Readonly>; export {}; //# sourceMappingURL=team-directory-preferences.d.ts.map