import { type RedisClient, type SessionStore } from './session-store.js'; import type { SessionState } from './state.js'; /** Parses session JSON from Redis — Upstash may return a deserialized object. */ export declare function parseSessionValue(raw: unknown): SessionState | null; /** Coerces Redis active-pointer values (Upstash may return non-string shapes). */ export declare function coerceActivePointerValue(raw: unknown): string | null; /** * Space id for multi-tenant Redis isolation on shared cmsedit-sessions. * Prefer explicit arg; fall back to host env (CONTENTFUL_SPACE_ID). */ export declare function resolveSessionSpaceId(explicit?: string): string | undefined; export declare class RedisSessionStore implements SessionStore { private readonly redis; private readonly keyPrefix; constructor(redis: RedisClient, keyPrefix?: string); private fullKey; /** * Active pointer is space-scoped so shared Redis across hosts does not * cross-load sessions for the same Contentful user. * - default: cms-edit:session:{userId}:active:{spaceId} * - named: cms-edit:session:{userId}:active:{spaceId}:{sessionName} */ private activePointerKey; /** * SET of full Redis keys (session blobs + pointers) for this user+space. * Enables clearAll without KEYS scans on shared Upstash. */ private spaceIndexKey; private getUserId; load(spaceId?: string, rootEntryId?: string, sessionName?: string): Promise; save(state: SessionState, sessionName?: string): Promise; clear(spaceId: string, rootEntryId: string, sessionName?: string): Promise; /** * Clears sessions for this host's space only (CONTENTFUL_SPACE_ID / multi-tenant safe). * Uses the per-user+space SET index — no KEYS scan. */ clearAll(): Promise; private readSession; } //# sourceMappingURL=redis-session-store.d.ts.map