import { type CreateSiteShareParams, type SiteShareConfig, type SiteShareRecord } from './site-share-types.js'; export declare class SiteShareStore { private shares; private byToken; private bySubdomain; private config; private dirty; private debounceTimer; private cleanupTimer; /** Optional cleanup hook invoked when a record is dropped (e.g. delete staging dir). */ private onCleanup; constructor(config?: Partial); updateConfig(config: Partial): void; setCleanupHook(hook: (record: SiteShareRecord) => void): void; getConfig(): SiteShareConfig; create(params: CreateSiteShareParams & { workspaceRoot: string | null; gatewayTokenHash: string; }): Promise; private buildSource; private resolveSubdomain; getById(id: string): SiteShareRecord | null; getByToken(token: string): SiteShareRecord | null; getBySubdomain(subdomain: string): SiteShareRecord | null; /** * Look up a record by token first, then by subdomain. Subdomain label may * itself be the share token (when user didn't pick a custom subdomain). */ resolveByHostLabel(label: string): SiteShareRecord | null; getActiveShares(): SiteShareRecord[]; getAllShares(): SiteShareRecord[]; validateAccess(record: SiteShareRecord): { valid: boolean; reason?: string; }; /** Increment counters when a request lands. Debounced persist. */ recordRequest(id: string, clientIp: string): void; setThumbnailStatus(id: string, status: 'pending' | 'ready' | 'failed'): void; revoke(id: string): boolean; revokeMany(ids: string[]): number; revokeExpired(): number; update(id: string, patch: { extendTtlMs?: number; maxRequests?: number | null; }): SiteShareRecord | null; private load; private persistSync; private scheduleDebouncedPersist; private startCleanupTimer; shutdown(): void; } export declare function getSiteShareStore(config?: Partial): SiteShareStore; export declare function resetSiteShareStoreForTests(): void;