Files
agency/.pnpm-store/v3/files/76/3105b02ff625d69a0c3c7e292ac920b1b4d5992f94a57292adb9b15d7eb44d4e5bb59460963fb8a215bb31e77dca341706e44c3079be79bdc7fa777d7c486a
hanzo-agent 5af6960b87 run project
Run: sess_f37640604ae254cb4d11dc6217f7b721
2026-09-30 00:04:56 +00:00

21 lines
980 B
Plaintext

/** Persisted snapshot. Server is the source of truth; this is just a cache. */
export interface PersistedEntry {
email: string;
rank?: number;
refCode?: string;
}
export declare function entryKey(slug: string): string;
/** Synchronous read (returns null on miss / parse error / SSR). */
export declare function readPersistedEntry(slug: string): PersistedEntry | null;
export declare function writePersistedEntry(slug: string, entry: PersistedEntry): void;
export declare function clearPersistedEntry(slug: string): void;
/** Capture an inbound ?ref=<code> URL param for later submission. */
export declare function captureReferrerFromUrl(): void;
export declare function readPendingReferrer(): string | undefined;
/**
* React hook: subscribes to the persisted entry for `slug`. Reactive to
* same-tab writes (via custom event) and cross-tab writes (via native
* `storage` event).
*/
export declare function usePersistedEntry(slug: string): PersistedEntry | null;