import type { ArkmeAuthSnapshot, ArkmeUserProfileSnapshot, ArkmeSourceItem } from '../types.js'; import { type SocialAccessSnapshots } from './social-access-snapshot-storage.js'; export declare const SOCIAL_ACCESS_TTL_MS = 60000; export declare const SOCIAL_ACCESS_READ_TIMEOUT_MS = 5000; export interface SocialAccessSnapshot { userId: number; allowed: boolean | null; checkedAtMillis?: number; } export declare function isSocialSource(source: Pick | undefined): boolean; export declare class SocialAccessStore { private readonly load; private readonly snapshots?; private state; private readonly listeners; private generation; private accountRevision; private flight; private controller; private checkedAtMillis; private retryAtMillis; private failures; private timer; private revalidationUsers; private stopRevalidation; constructor(load: (signal: AbortSignal, remote: boolean) => Promise, snapshots?: SocialAccessSnapshots | undefined); getSnapshot: () => { accountKey?: string; allowed: boolean | null; resolved: boolean; }; subscribe: (listener: () => void) => (() => void); confirm(accountKey: string, allowed: boolean): void; confirmProfile(snapshot: ArkmeUserProfileSnapshot): void; activate(accountKey: string | undefined, accountRevision?: number | string): void; /** Adopt binding confirmations from another window without another profile request. */ syncStoredConfirmation(): void; refreshIfStale(): Promise; /** Explicit refresh bypasses freshness/cooldown, but still shares the current read. */ refresh(remote?: boolean): Promise; /** One timer/listener set per UI store, shared by every mounted consumer. */ startRevalidation(): () => void; private invalidateRead; private accept; private schedule; private publish; } export declare function loadSocialAccess(signal: AbortSignal, remote?: boolean): Promise; export declare const socialAccessStore: SocialAccessStore; /** Invoke only after the existing bind/unbind command has confirmed the owner fact. */ export declare function confirmPhoneBinding(auth: ArkmeAuthSnapshot, bound: boolean): void; export declare function usePhoneBindingStatus(enabled?: boolean): { bound: boolean | null; ready: boolean; }; //# sourceMappingURL=social-access-store.d.ts.map